angr 9.2.181__cp310-abi3-win_amd64.whl → 9.2.182__cp310-abi3-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of angr might be problematic. Click here for more details.

Files changed (139) hide show
  1. angr/__init__.py +1 -1
  2. angr/ailment/expression.py +2 -2
  3. angr/analyses/decompiler/ail_simplifier.py +77 -5
  4. angr/analyses/decompiler/callsite_maker.py +6 -1
  5. angr/analyses/decompiler/clinic.py +22 -10
  6. angr/analyses/decompiler/dephication/graph_vvar_mapping.py +4 -10
  7. angr/analyses/decompiler/ssailification/rewriting.py +82 -10
  8. angr/analyses/decompiler/ssailification/rewriting_engine.py +22 -11
  9. angr/analyses/decompiler/ssailification/ssailification.py +7 -5
  10. angr/analyses/s_reaching_definitions/s_rda_view.py +38 -16
  11. angr/analyses/s_reaching_definitions/s_reaching_definitions.py +59 -6
  12. angr/engines/pcode/behavior.py +6 -2
  13. angr/knowledge_plugins/functions/function_manager.py +1 -1
  14. angr/knowledge_plugins/variables/variable_manager.py +10 -19
  15. angr/procedures/definitions/parse_glibc.py +0 -1
  16. angr/procedures/definitions/parse_win32json.py +12 -3
  17. angr/procedures/definitions/wdk/fltmgr.json +11 -11
  18. angr/procedures/definitions/wdk/fwpuclnt.json +32 -32
  19. angr/procedures/definitions/wdk/gdi32.json +1 -1
  20. angr/procedures/definitions/wdk/ntoskrnl.json +61 -61
  21. angr/procedures/definitions/win32/_types_win32.json +1103 -1102
  22. angr/procedures/definitions/win32/activeds.json +2 -2
  23. angr/procedures/definitions/win32/advapi32.json +47 -47
  24. angr/procedures/definitions/win32/apphelp.json +1 -1
  25. angr/procedures/definitions/win32/avifil32.json +10 -10
  26. angr/procedures/definitions/win32/avrt.json +4 -4
  27. angr/procedures/definitions/win32/bluetoothapis.json +3 -3
  28. angr/procedures/definitions/win32/certpoleng.json +1 -1
  29. angr/procedures/definitions/win32/cfgmgr32.json +43 -43
  30. angr/procedures/definitions/win32/clusapi.json +1 -1
  31. angr/procedures/definitions/win32/comctl32.json +3 -3
  32. angr/procedures/definitions/win32/computenetwork.json +14 -14
  33. angr/procedures/definitions/win32/comsvcs.json +3 -3
  34. angr/procedures/definitions/win32/crypt32.json +5 -5
  35. angr/procedures/definitions/win32/d2d1.json +1 -1
  36. angr/procedures/definitions/win32/d3d12.json +6 -6
  37. angr/procedures/definitions/win32/d3dcompiler_47.json +2 -2
  38. angr/procedures/definitions/win32/dbgeng.json +4 -4
  39. angr/procedures/definitions/win32/dbghelp.json +2 -2
  40. angr/procedures/definitions/win32/dcomp.json +4 -4
  41. angr/procedures/definitions/win32/ddraw.json +6 -6
  42. angr/procedures/definitions/win32/diagnosticdataquery.json +1 -1
  43. angr/procedures/definitions/win32/dinput8.json +1 -1
  44. angr/procedures/definitions/win32/directml.json +2 -2
  45. angr/procedures/definitions/win32/dsound.json +10 -10
  46. angr/procedures/definitions/win32/dsparse.json +2 -2
  47. angr/procedures/definitions/win32/dwmapi.json +1 -1
  48. angr/procedures/definitions/win32/dwrite.json +1 -1
  49. angr/procedures/definitions/win32/dxcompiler.json +2 -2
  50. angr/procedures/definitions/win32/dxcore.json +1 -1
  51. angr/procedures/definitions/win32/dxgi.json +4 -4
  52. angr/procedures/definitions/win32/dxva2.json +1 -1
  53. angr/procedures/definitions/win32/eappprxy.json +3 -3
  54. angr/procedures/definitions/win32/evr.json +4 -4
  55. angr/procedures/definitions/win32/fwpuclnt.json +32 -32
  56. angr/procedures/definitions/win32/gdiplus.json +9 -9
  57. angr/procedures/definitions/win32/hid.json +1 -1
  58. angr/procedures/definitions/win32/hlink.json +7 -7
  59. angr/procedures/definitions/win32/ieframe.json +4 -4
  60. angr/procedures/definitions/win32/imgutil.json +1 -1
  61. angr/procedures/definitions/win32/inkobjcore.json +4 -4
  62. angr/procedures/definitions/win32/iphlpapi.json +8 -8
  63. angr/procedures/definitions/win32/kernel32.json +5 -5
  64. angr/procedures/definitions/win32/ksproxy_ax.json +2 -2
  65. angr/procedures/definitions/win32/ktmw32.json +10 -10
  66. angr/procedures/definitions/win32/mapi32.json +2 -2
  67. angr/procedures/definitions/win32/mf.json +5 -5
  68. angr/procedures/definitions/win32/mfplat.json +33 -33
  69. angr/procedures/definitions/win32/mfsensorgroup.json +2 -2
  70. angr/procedures/definitions/win32/mmdevapi.json +1 -1
  71. angr/procedures/definitions/win32/mqrt.json +2 -2
  72. angr/procedures/definitions/win32/mscoree.json +9 -9
  73. angr/procedures/definitions/win32/msdmo.json +5 -5
  74. angr/procedures/definitions/win32/mswsock.json +8 -8
  75. angr/procedures/definitions/win32/ndfapi.json +1 -1
  76. angr/procedures/definitions/win32/netapi32.json +6 -6
  77. angr/procedures/definitions/win32/netsh.json +1 -1
  78. angr/procedures/definitions/win32/ntdll.json +1 -1
  79. angr/procedures/definitions/win32/ntdsapi.json +14 -14
  80. angr/procedures/definitions/win32/ntlanman.json +3 -3
  81. angr/procedures/definitions/win32/ole32.json +78 -78
  82. angr/procedures/definitions/win32/oleacc.json +6 -6
  83. angr/procedures/definitions/win32/oleaut32.json +15 -15
  84. angr/procedures/definitions/win32/oledlg.json +1 -1
  85. angr/procedures/definitions/win32/p2p.json +11 -11
  86. angr/procedures/definitions/win32/p2pgraph.json +7 -7
  87. angr/procedures/definitions/win32/pdh.json +1 -1
  88. angr/procedures/definitions/win32/powrprof.json +47 -47
  89. angr/procedures/definitions/win32/projectedfslib.json +2 -2
  90. angr/procedures/definitions/win32/propsys.json +25 -25
  91. angr/procedures/definitions/win32/query.json +1 -1
  92. angr/procedures/definitions/win32/resutils.json +1 -1
  93. angr/procedures/definitions/win32/rpcns4.json +5 -5
  94. angr/procedures/definitions/win32/rpcrt4.json +33 -33
  95. angr/procedures/definitions/win32/rtm.json +1 -1
  96. angr/procedures/definitions/win32/sensorsutilsv2.json +4 -4
  97. angr/procedures/definitions/win32/setupapi.json +49 -49
  98. angr/procedures/definitions/win32/shell32.json +34 -34
  99. angr/procedures/definitions/win32/shlwapi.json +7 -7
  100. angr/procedures/definitions/win32/slc.json +25 -25
  101. angr/procedures/definitions/win32/slcext.json +2 -2
  102. angr/procedures/definitions/win32/slwga.json +1 -1
  103. angr/procedures/definitions/win32/tapi32.json +4 -4
  104. angr/procedures/definitions/win32/tdh.json +6 -6
  105. angr/procedures/definitions/win32/traffic.json +6 -6
  106. angr/procedures/definitions/win32/txfw32.json +1 -1
  107. angr/procedures/definitions/win32/uiautomationcore.json +1 -1
  108. angr/procedures/definitions/win32/urlmon.json +6 -6
  109. angr/procedures/definitions/win32/user32.json +1 -1
  110. angr/procedures/definitions/win32/userenv.json +4 -4
  111. angr/procedures/definitions/win32/virtdisk.json +4 -4
  112. angr/procedures/definitions/win32/vmdevicehost.json +1 -1
  113. angr/procedures/definitions/win32/wcmapi.json +2 -2
  114. angr/procedures/definitions/win32/webauthn.json +2 -2
  115. angr/procedures/definitions/win32/winbio.json +2 -2
  116. angr/procedures/definitions/win32/windows_ui_xaml.json +2 -2
  117. angr/procedures/definitions/win32/windowscodecs.json +9 -9
  118. angr/procedures/definitions/win32/winhttp.json +1 -1
  119. angr/procedures/definitions/win32/winhvplatform.json +1 -1
  120. angr/procedures/definitions/win32/winscard.json +12 -12
  121. angr/procedures/definitions/win32/winspool_drv.json +4 -4
  122. angr/procedures/definitions/win32/wintrust.json +9 -9
  123. angr/procedures/definitions/win32/wlanapi.json +27 -27
  124. angr/procedures/definitions/win32/wlanui.json +1 -1
  125. angr/procedures/definitions/win32/wldp.json +4 -4
  126. angr/procedures/definitions/win32/ws2_32.json +34 -34
  127. angr/procedures/definitions/win32/xaudio2_8.json +1 -1
  128. angr/procedures/definitions/win32/xmllite.json +2 -2
  129. angr/procedures/definitions/win32/xolehlp.json +4 -4
  130. angr/project.py +4 -1
  131. angr/rustylib.pyd +0 -0
  132. angr/unicornlib.dll +0 -0
  133. angr/utils/ail.py +107 -1
  134. {angr-9.2.181.dist-info → angr-9.2.182.dist-info}/METADATA +5 -5
  135. {angr-9.2.181.dist-info → angr-9.2.182.dist-info}/RECORD +139 -139
  136. {angr-9.2.181.dist-info → angr-9.2.182.dist-info}/WHEEL +0 -0
  137. {angr-9.2.181.dist-info → angr-9.2.182.dist-info}/entry_points.txt +0 -0
  138. {angr-9.2.181.dist-info → angr-9.2.182.dist-info}/licenses/LICENSE +0 -0
  139. {angr-9.2.181.dist-info → angr-9.2.182.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import logging
4
+ import copy
4
5
  from collections.abc import Callable
5
6
  from collections import defaultdict
6
7
 
@@ -24,8 +25,9 @@ class RegVVarPredicate:
24
25
  Implements a predicate that is used in get_reg_vvar_by_stmt_idx and get_reg_vvar_by_insn.
25
26
  """
26
27
 
27
- def __init__(self, reg_offset: int, vvars: list[VirtualVariable], arch):
28
+ def __init__(self, reg_offset: int, min_size: int, vvars: list[VirtualVariable], arch):
28
29
  self.reg_offset = reg_offset
30
+ self.min_size = min_size
29
31
  self.vvars = vvars
30
32
  self.arch = arch
31
33
 
@@ -52,6 +54,7 @@ class RegVVarPredicate:
52
54
  and isinstance(stmt.dst, VirtualVariable)
53
55
  and stmt.dst.was_reg
54
56
  and stmt.dst.reg_offset == self.reg_offset
57
+ and stmt.dst.size >= self.min_size
55
58
  ):
56
59
  if stmt.dst not in self.vvars:
57
60
  self.vvars.append(stmt.dst)
@@ -61,6 +64,7 @@ class RegVVarPredicate:
61
64
  isinstance(stmt.ret_expr, VirtualVariable)
62
65
  and stmt.ret_expr.was_reg
63
66
  and stmt.ret_expr.reg_offset == self.reg_offset
67
+ and stmt.ret_expr.size >= self.min_size
64
68
  ):
65
69
  if stmt.ret_expr not in self.vvars:
66
70
  self.vvars.append(stmt.ret_expr)
@@ -146,11 +150,17 @@ class SRDAView:
146
150
  queue.append((pred, None))
147
151
 
148
152
  def get_reg_vvar_by_stmt(
149
- self, reg_offset: int, block_addr: int, block_idx: int | None, stmt_idx: int, op_type: ObservationPointType
153
+ self,
154
+ reg_offset: int,
155
+ min_size: int,
156
+ block_addr: int,
157
+ block_idx: int | None,
158
+ stmt_idx: int,
159
+ op_type: ObservationPointType,
150
160
  ) -> VirtualVariable | None:
151
161
  reg_offset = get_reg_offset_base(reg_offset, self.model.arch)
152
162
  vvars = []
153
- predicater = RegVVarPredicate(reg_offset, vvars, self.model.arch)
163
+ predicater = RegVVarPredicate(reg_offset, min_size, vvars, self.model.arch)
154
164
  self._get_vvar_by_stmt(block_addr, block_idx, stmt_idx, op_type, predicater.predicate)
155
165
 
156
166
  if not vvars:
@@ -160,7 +170,7 @@ class SRDAView:
160
170
  func_arg_category = func_arg.parameter_category
161
171
  if func_arg_category == VirtualVariableCategory.REGISTER:
162
172
  func_arg_regoff = func_arg.parameter_reg_offset
163
- if func_arg_regoff == reg_offset:
173
+ if func_arg_regoff == reg_offset and func_arg.size >= min_size:
164
174
  vvars.append(func_arg)
165
175
 
166
176
  assert len(vvars) <= 1
@@ -225,11 +235,11 @@ class SRDAView:
225
235
  self._get_vvar_by_stmt(the_block.addr, the_block.idx, starting_stmt_idx, op_type, predicate)
226
236
 
227
237
  def get_reg_vvar_by_insn(
228
- self, reg_offset: int, addr: int, op_type: ObservationPointType, block_idx: int | None = None
238
+ self, reg_offset: int, min_size: int, addr: int, op_type: ObservationPointType, block_idx: int | None = None
229
239
  ) -> VirtualVariable | None:
230
240
  reg_offset = get_reg_offset_base(reg_offset, self.model.arch)
231
241
  vvars = []
232
- predicater = RegVVarPredicate(reg_offset, vvars, self.model.arch)
242
+ predicater = RegVVarPredicate(reg_offset, min_size, vvars, self.model.arch)
233
243
 
234
244
  self._get_vvar_by_insn(addr, op_type, predicater.predicate, block_idx=block_idx)
235
245
 
@@ -271,7 +281,7 @@ class SRDAView:
271
281
  # TODO: Other types
272
282
 
273
283
  traversal_order = GraphUtils.quasi_topological_sort_nodes(self.model.func_graph)
274
- all_reg2vvarid: defaultdict[tuple[int, int | None], dict[int, int]] = defaultdict(dict)
284
+ all_reg2vvarid: defaultdict[tuple[int, int | None], dict[int, dict[int, int]]] = defaultdict(dict)
275
285
 
276
286
  observations = {}
277
287
  for block in traversal_order:
@@ -280,40 +290,52 @@ class SRDAView:
280
290
  if (block.addr, block.idx) in node_ops and node_ops[
281
291
  (block.addr, block.idx)
282
292
  ] == ObservationPointType.OP_BEFORE:
283
- observations[("block", (block.addr, block.idx), ObservationPointType.OP_BEFORE)] = reg2vvarid.copy()
293
+ observations[("node", (block.addr, block.idx), ObservationPointType.OP_BEFORE)] = copy.deepcopy(
294
+ reg2vvarid
295
+ )
284
296
 
285
297
  last_insn_addr = None
286
298
  for stmt_idx, stmt in enumerate(block.statements):
287
299
  if last_insn_addr != stmt.ins_addr:
288
300
  # observe
289
301
  if last_insn_addr in insn_ops and insn_ops[last_insn_addr] == ObservationPointType.OP_AFTER:
290
- observations[("insn", last_insn_addr, ObservationPointType.OP_AFTER)] = reg2vvarid.copy()
302
+ observations[("insn", last_insn_addr, ObservationPointType.OP_AFTER)] = copy.deepcopy(
303
+ reg2vvarid
304
+ )
291
305
  if stmt.ins_addr in insn_ops and insn_ops[stmt.ins_addr] == ObservationPointType.OP_BEFORE:
292
- observations[("insn", last_insn_addr, ObservationPointType.OP_BEFORE)] = reg2vvarid.copy()
306
+ observations[("insn", last_insn_addr, ObservationPointType.OP_BEFORE)] = copy.deepcopy(
307
+ reg2vvarid
308
+ )
293
309
  last_insn_addr = stmt.ins_addr
294
310
 
295
311
  stmt_key = (block.addr, block.idx), stmt_idx
296
312
  if stmt_key in stmt_ops and stmt_ops[stmt_key] == ObservationPointType.OP_BEFORE:
297
- observations[("stmt", stmt_key, ObservationPointType.OP_BEFORE)] = reg2vvarid.copy()
313
+ observations[("stmt", stmt_key, ObservationPointType.OP_BEFORE)] = copy.deepcopy(reg2vvarid)
298
314
 
299
315
  if isinstance(stmt, Assignment) and isinstance(stmt.dst, VirtualVariable) and stmt.dst.was_reg:
300
316
  base_offset = get_reg_offset_base(stmt.dst.reg_offset, self.model.arch)
301
- reg2vvarid[base_offset] = stmt.dst.varid
317
+ if base_offset not in reg2vvarid:
318
+ reg2vvarid[base_offset] = {}
319
+ reg2vvarid[base_offset][stmt.dst.size] = stmt.dst.varid
302
320
  elif isinstance(stmt, Call) and isinstance(stmt.ret_expr, VirtualVariable) and stmt.ret_expr.was_reg:
303
321
  base_offset = get_reg_offset_base(stmt.ret_expr.reg_offset, self.model.arch)
304
- reg2vvarid[base_offset] = stmt.ret_expr.varid
322
+ if base_offset not in reg2vvarid:
323
+ reg2vvarid[base_offset] = {}
324
+ reg2vvarid[base_offset][stmt.ret_expr.size] = stmt.ret_expr.varid
305
325
 
306
326
  if stmt_key in stmt_ops and stmt_ops[stmt_key] == ObservationPointType.OP_AFTER:
307
- observations[("stmt", stmt_key, ObservationPointType.OP_AFTER)] = reg2vvarid.copy()
327
+ observations[("stmt", stmt_key, ObservationPointType.OP_AFTER)] = copy.deepcopy(reg2vvarid)
308
328
 
309
329
  if (block.addr, block.idx) in node_ops and node_ops[
310
330
  (block.addr, block.idx)
311
331
  ] == ObservationPointType.OP_AFTER:
312
- observations[("block", (block.addr, block.idx), ObservationPointType.OP_AFTER)] = reg2vvarid.copy()
332
+ observations[("node", (block.addr, block.idx), ObservationPointType.OP_AFTER)] = copy.deepcopy(
333
+ reg2vvarid
334
+ )
313
335
 
314
336
  for succ in self.model.func_graph.successors(block):
315
337
  if succ is block:
316
338
  continue
317
- all_reg2vvarid[succ.addr, succ.idx] = reg2vvarid.copy()
339
+ all_reg2vvarid[succ.addr, succ.idx] = copy.deepcopy(reg2vvarid)
318
340
 
319
341
  return observations
@@ -1,16 +1,17 @@
1
+ # pylint:disable=too-many-boolean-expressions
1
2
  from __future__ import annotations
2
3
 
4
+ import networkx
5
+
3
6
  from angr.ailment.block import Block
4
7
  from angr.ailment.statement import Assignment, Call, Return
5
8
  from angr.ailment.expression import VirtualVariable
6
- import networkx
7
-
8
9
  from angr.knowledge_plugins.functions import Function
9
10
  from angr.knowledge_plugins.key_definitions.constants import ObservationPointType
10
11
  from angr.code_location import CodeLocation, ExternalCodeLocation
11
12
  from angr.analyses import Analysis, register_analysis
12
13
  from angr.utils.ssa import get_vvar_uselocs, get_vvar_deflocs, get_tmp_deflocs, get_tmp_uselocs
13
- from angr.calling_conventions import default_cc
14
+ from angr.calling_conventions import default_cc, SimRegArg
14
15
  from .s_rda_model import SRDAModel
15
16
  from .s_rda_view import SRDAView
16
17
 
@@ -26,6 +27,7 @@ class SReachingDefinitionsAnalysis(Analysis):
26
27
  func_addr: int | None = None,
27
28
  func_graph: networkx.DiGraph[Block] | None = None,
28
29
  func_args: set[VirtualVariable] | None = None,
30
+ use_callee_saved_regs_at_return: bool = False,
29
31
  track_tmps: bool = False,
30
32
  ):
31
33
  if isinstance(subject, Block):
@@ -43,6 +45,7 @@ class SReachingDefinitionsAnalysis(Analysis):
43
45
  self.func_addr = func_addr if func_addr is not None else self.func.addr if self.func is not None else None
44
46
  self.func_args = func_args
45
47
  self._track_tmps = track_tmps
48
+ self._use_callee_saved_regs_at_return = use_callee_saved_regs_at_return
46
49
 
47
50
  self._bp_as_gpr = False
48
51
  if self.func is not None:
@@ -94,6 +97,8 @@ class SReachingDefinitionsAnalysis(Analysis):
94
97
 
95
98
  if self.mode == "function":
96
99
 
100
+ assert self.func is not None
101
+
97
102
  # fix register definitions for arguments
98
103
  defined_vvarids = set(vvar_deflocs)
99
104
  undefined_vvarids = set(vvar_uselocs.keys()).difference(defined_vvarids)
@@ -151,10 +156,58 @@ class SReachingDefinitionsAnalysis(Analysis):
151
156
  arg_locs += [r_name for r_name in cc.FP_ARG_REGS if r_name not in arg_locs]
152
157
 
153
158
  for arg_reg_name in arg_locs:
154
- reg_offset = self.project.arch.registers[arg_reg_name][0]
159
+ reg_offset, reg_size = self.project.arch.registers[arg_reg_name]
155
160
  if reg_offset in reg_to_vvarids:
156
- vvarid = reg_to_vvarids[reg_offset]
157
- self.model.add_vvar_use(vvarid, None, codeloc)
161
+ for vvar_size in reg_to_vvarids[reg_offset]:
162
+ if vvar_size >= reg_size:
163
+ vvarid = reg_to_vvarids[reg_offset][vvar_size]
164
+ self.model.add_vvar_use(vvarid, None, codeloc)
165
+
166
+ if self._use_callee_saved_regs_at_return:
167
+ # handle callee-saved registers: add uses for these registers so that the restoration statements are not
168
+ # considered dead assignments.
169
+ cc = self.func.calling_convention
170
+ if cc is None:
171
+ cc_cls = default_cc(
172
+ self.project.arch.name,
173
+ platform=self.project.simos.name if self.project.simos is not None else None,
174
+ )
175
+ assert cc_cls is not None
176
+ cc = cc_cls(self.project.arch)
177
+
178
+ arch = self.project.arch
179
+ ob_points = []
180
+ endpoint_addrs = {end_point.addr for end_point in self.func.endpoints}
181
+ for block in blocks.values():
182
+ if block.addr in endpoint_addrs:
183
+ ob_points.append(("node", (block.addr, block.idx), ObservationPointType.OP_AFTER))
184
+ func_end_observations = srda_view.observe(ob_points)
185
+ ignore_reg_offsets = {arch.sp_offset, arch.ip_offset}
186
+ if not self._bp_as_gpr:
187
+ ignore_reg_offsets.add(arch.bp_offset)
188
+ for key, reg_to_vvarids in func_end_observations.items():
189
+ _, (block_addr, block_idx), _ = key
190
+ block = blocks[(block_addr, block_idx)]
191
+ if not block.statements:
192
+ # totally unexpected
193
+ continue
194
+ stmt = block.statements[-1]
195
+ codeloc = CodeLocation(
196
+ block_addr, len(block.statements) - 1, block_idx=block_idx, ins_addr=stmt.ins_addr
197
+ )
198
+ for reg in arch.register_list:
199
+ if (
200
+ reg.general_purpose
201
+ and reg.name not in cc.CALLER_SAVED_REGS
202
+ and reg.name not in cc.ARG_REGS
203
+ and reg.vex_offset not in ignore_reg_offsets
204
+ and (isinstance(cc.RETURN_VAL, SimRegArg) and reg.name != cc.RETURN_VAL.reg_name)
205
+ ):
206
+ reg_offset = self.project.arch.registers[reg.name][0]
207
+ if reg_offset in reg_to_vvarids:
208
+ max_vvar_size = max(reg_to_vvarids[reg_offset])
209
+ vvarid = reg_to_vvarids[reg_offset][max_vvar_size]
210
+ self.model.add_vvar_use(vvarid, None, codeloc)
158
211
 
159
212
  if self._track_tmps:
160
213
  # track tmps
@@ -12,13 +12,17 @@ from angr.errors import AngrError
12
12
  # pylint:disable=abstract-method
13
13
 
14
14
 
15
- def make_bv_sizes_equal(bv1: BV, bv2: BV) -> tuple[BV, BV]:
15
+ def make_bv_sizes_equal(bv1: BV, bv2: BV, zero_ext: bool = False) -> tuple[BV, BV]:
16
16
  """
17
17
  Makes two BVs equal in length through sign extension.
18
18
  """
19
19
  if bv1.size() < bv2.size():
20
+ if zero_ext:
21
+ return (bv1.zero_extend(bv2.size() - bv1.size()), bv2)
20
22
  return (bv1.sign_extend(bv2.size() - bv1.size()), bv2)
21
23
  if bv1.size() > bv2.size():
24
+ if zero_ext:
25
+ return (bv1, bv2.zero_extend(bv1.size() - bv2.size()))
22
26
  return (bv1, bv2.sign_extend(bv1.size() - bv2.size()))
23
27
  return (bv1, bv2)
24
28
 
@@ -340,7 +344,7 @@ class OpBehaviorIntRight(OpBehavior):
340
344
  super().__init__(OpCode.INT_RIGHT, False)
341
345
 
342
346
  def evaluate_binary(self, size_out: int, size_in: int, in1: BV, in2: BV) -> BV:
343
- in1, in2 = make_bv_sizes_equal(in1, in2)
347
+ in1, in2 = make_bv_sizes_equal(in1, in2, zero_ext=True)
344
348
  return in1.LShR(in2)
345
349
 
346
350
 
@@ -175,7 +175,7 @@ class FunctionManager(KnowledgeBasePlugin, collections.abc.Mapping):
175
175
  idx = bisect.bisect_left(self._rplt_cache_ranges, obj_range)
176
176
  if not (idx < len(self._rplt_cache_ranges) and self._rplt_cache_ranges[idx] == obj_range):
177
177
  self._rplt_cache_ranges.insert(idx, obj_range)
178
- if isinstance(obj, cle.MetaELF):
178
+ if isinstance(obj, (cle.MetaELF, cle.MachO)):
179
179
  if self._rplt_cache is None:
180
180
  self._rplt_cache = set()
181
181
  self._rplt_cache |= set(obj.reverse_plt)
@@ -4,6 +4,7 @@ import logging
4
4
  from collections import defaultdict
5
5
  from itertools import count, chain
6
6
 
7
+ from sortedcontainers import SortedDict
7
8
  import networkx
8
9
 
9
10
  import angr.ailment as ailment
@@ -118,7 +119,8 @@ class VariableManagerInternal(Serializable):
118
119
  # optimization
119
120
  self._variables_without_writes = set()
120
121
 
121
- self.stack_offset_to_struct_member_info: dict[SimStackVariable, tuple[int, SimStackVariable, SimStruct]] = {}
122
+ # dict[int, tuple[SimStackVariable, SimStruct]]
123
+ self.stack_offset_to_struct = SortedDict()
122
124
 
123
125
  self.ret_val_size = None
124
126
 
@@ -515,7 +517,7 @@ class VariableManagerInternal(Serializable):
515
517
  self._atom_to_variable[key][atom_hash] = {var_and_offset}
516
518
  if isinstance(atom, ailment.Expr.VirtualVariable):
517
519
  self._vvarid_to_variable[atom.varid] = variable
518
- self._variable_to_vvarids[variable] = set(atom.varid)
520
+ self._variable_to_vvarids[variable] = {atom.varid}
519
521
  else:
520
522
  if location.ins_addr is not None:
521
523
  self._insn_to_variable[location.ins_addr].add(var_and_offset)
@@ -1058,22 +1060,7 @@ class VariableManagerInternal(Serializable):
1058
1060
  if mark_manual:
1059
1061
  self.variables_with_manual_types.add(other_var)
1060
1062
  if isinstance(var, SimStackVariable) and isinstance(ty, TypeRef) and isinstance(ty.type, SimStruct):
1061
- self.stack_offset_to_struct_member_info.update(self._extract_fields_from_struct(var, ty.type))
1062
-
1063
- def _extract_fields_from_struct(self, var, ty: SimStruct, top_struct_offset=0):
1064
- result = {}
1065
- for name, field_offset in ty.offsets.items():
1066
- field_ty = ty.fields[name]
1067
- offset = top_struct_offset + field_offset
1068
- if isinstance(field_ty, TypeRef):
1069
- field_ty = field_ty.type
1070
- if isinstance(field_ty, SimStruct):
1071
- result.update(
1072
- self._extract_fields_from_struct(var, field_ty, top_struct_offset=top_struct_offset + field_offset)
1073
- )
1074
- else:
1075
- result[var.offset + offset] = (offset, var, ty)
1076
- return result
1063
+ self.stack_offset_to_struct[var.offset] = var, ty.type
1077
1064
 
1078
1065
  def get_variable_type(self, var) -> SimType | None:
1079
1066
  return self.variable_to_types.get(var, None)
@@ -1228,7 +1215,11 @@ class VariableManagerInternal(Serializable):
1228
1215
  for acc in accesses:
1229
1216
  assert acc.location.block_addr is not None
1230
1217
  block = func_block_by_addr.get((acc.location.block_addr, acc.location.block_idx), None)
1231
- if block is not None:
1218
+ if (
1219
+ block is not None
1220
+ and acc.location.stmt_idx is not None
1221
+ and acc.location.stmt_idx < len(block.statements)
1222
+ ):
1232
1223
  stmt = block.statements[acc.location.stmt_idx]
1233
1224
  if not is_phi_assignment(stmt):
1234
1225
  return False
@@ -21,7 +21,6 @@ def main():
21
21
  c_decl = c_decl.strip("\n")
22
22
 
23
23
  # preprocessing
24
- c_decl = c_decl.replace("FILE *", "FILE_t *")
25
24
  c_decl = c_decl.replace("const ", "")
26
25
  c_decl = c_decl.replace("*restrict ", "* ")
27
26
 
@@ -21,6 +21,16 @@ altnames = set()
21
21
 
22
22
  typelib = SimTypeCollection()
23
23
  typelib.names = ["win32"]
24
+
25
+ # add Guid
26
+ guid_fields = OrderedDict()
27
+ guid_fields["Data1"] = angr.types.SimTypeInt(signed=False)
28
+ guid_fields["Data2"] = angr.types.SimTypeShort(signed=False)
29
+ guid_fields["Data3"] = angr.types.SimTypeShort(signed=False)
30
+ guid_fields["Data4"] = angr.types.SimTypeFixedSizeArray(angr.types.SimTypeChar(signed=False), length=8)
31
+ guid = angr.types.SimStruct(guid_fields, name="Guid", pack=True, align=1)
32
+ typelib.add("Guid", guid)
33
+
24
34
  known_struct_names: set[str] = set()
25
35
 
26
36
 
@@ -60,8 +70,7 @@ def get_angr_type_from_name(name):
60
70
  if name == "Boolean":
61
71
  return angr.types.SimTypeBool(label="Boolean")
62
72
  if name == "Guid":
63
- # FIXME
64
- return angr.types.SimTypeBottom(label="Guid")
73
+ return angr.types.SimTypeRef("Guid", angr.types.SimStruct)
65
74
  print(f"Unhandled Native Type: {name}")
66
75
  sys.exit(-1)
67
76
 
@@ -2470,7 +2479,7 @@ def do_it(in_dir):
2470
2479
  non_returning.append(func)
2471
2480
  if not non_returning:
2472
2481
  del d["non_returning"]
2473
- with open(os.path.join(prefix, filename), "w") as f:
2482
+ with open(os.path.join(prefix, filename), "w", encoding="utf-8") as f:
2474
2483
  f.write(json.dumps(d, indent="\t"))
2475
2484
 
2476
2485
  # Dump the type collection to a JSON file
@@ -51,10 +51,10 @@
51
51
  "proto": "{'_t': 'func', 'args': [], 'returnty': {'_t': '_ref', 'name': 'PFLT_DEFERRED_IO_WORKITEM', 'ot': 'ptr'}, 'arg_names': []}"
52
52
  },
53
53
  "FltAllocateExtraCreateParameter": {
54
- "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_FILTER', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Guid'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Guid'}}], 'returnty': {'_t': 'bot', 'label': 'Void'}, 'arg_names': ['EcpContext', 'EcpType']}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['Filter', 'EcpType', 'SizeOfContext', 'Flags', 'CleanupCallback', 'PoolTag', 'EcpContext']}"
54
+ "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_FILTER', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'Guid', 'ot': '_ref'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'Guid', 'ot': '_ref'}}], 'returnty': {'_t': 'bot', 'label': 'Void'}, 'arg_names': ['EcpContext', 'EcpType']}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['Filter', 'EcpType', 'SizeOfContext', 'Flags', 'CleanupCallback', 'PoolTag', 'EcpContext']}"
55
55
  },
56
56
  "FltAllocateExtraCreateParameterFromLookasideList": {
57
- "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_FILTER', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Guid'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Guid'}}], 'returnty': {'_t': 'bot', 'label': 'Void'}, 'arg_names': ['EcpContext', 'EcpType']}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'ptr', 'pts_to': {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['Filter', 'EcpType', 'SizeOfContext', 'Flags', 'CleanupCallback', 'LookasideList', 'EcpContext']}"
57
+ "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_FILTER', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'Guid', 'ot': '_ref'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'Guid', 'ot': '_ref'}}], 'returnty': {'_t': 'bot', 'label': 'Void'}, 'arg_names': ['EcpContext', 'EcpType']}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'ptr', 'pts_to': {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['Filter', 'EcpType', 'SizeOfContext', 'Flags', 'CleanupCallback', 'LookasideList', 'EcpContext']}"
58
58
  },
59
59
  "FltAllocateExtraCreateParameterList": {
60
60
  "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_FILTER', 'ot': 'ptr'}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'ECP_LIST', 'ot': '_ref'}}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['Filter', 'Flags', 'EcpList']}"
@@ -276,7 +276,7 @@
276
276
  "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_INSTANCE', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FILE_OBJECT', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'llong', 'label': 'Int64'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'MDL', 'ot': '_ref'}}}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'IO_STATUS_BLOCK', 'ot': '_ref'}}], 'returnty': {'_t': '_ref', 'name': 'BOOLEAN', 'ot': 'char'}, 'arg_names': ['InitiatingInstance', 'FileObject', 'FileOffset', 'Length', 'LockKey', 'MdlChain', 'IoStatus']}"
277
277
  },
278
278
  "FltFindExtraCreateParameter": {
279
- "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_FILTER', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'ECP_LIST', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Guid'}}, {'_t': 'ptr', 'pts_to': {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}}, {'_t': 'ptr', 'pts_to': {'_t': 'int', 'signed': false, 'label': 'UInt32'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['Filter', 'EcpList', 'EcpType', 'EcpContext', 'EcpContextSize']}"
279
+ "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_FILTER', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'ECP_LIST', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'Guid', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}}, {'_t': 'ptr', 'pts_to': {'_t': 'int', 'signed': false, 'label': 'UInt32'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['Filter', 'EcpList', 'EcpType', 'EcpContext', 'EcpContextSize']}"
280
280
  },
281
281
  "FltFlushBuffers": {
282
282
  "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_INSTANCE', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FILE_OBJECT', 'ot': '_ref'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['Instance', 'FileObject']}"
@@ -315,7 +315,7 @@
315
315
  "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_INSTANCE', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FILE_OBJECT', 'ot': '_ref'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'int', 'signed': false, 'label': 'UInt32'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['Instance', 'FileObject', 'FsControlCode', 'InputBuffer', 'InputBufferLength', 'OutputBuffer', 'OutputBufferLength', 'LengthReturned']}"
316
316
  },
317
317
  "FltGetActivityIdCallbackData": {
318
- "proto": "{'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FLT_CALLBACK_DATA', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Guid'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['CallbackData', 'Guid']}"
318
+ "proto": "{'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FLT_CALLBACK_DATA', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'Guid', 'ot': '_ref'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['CallbackData', 'Guid']}"
319
319
  },
320
320
  "FltGetBottomInstance": {
321
321
  "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_VOLUME', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'PFLT_INSTANCE', 'ot': '_ref'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['Volume', 'Instance']}"
@@ -393,7 +393,7 @@
393
393
  "proto": "{'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FLT_CALLBACK_DATA', 'ot': '_ref'}}], 'returnty': {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, 'arg_names': ['CallbackData']}"
394
394
  },
395
395
  "FltGetNextExtraCreateParameter": {
396
- "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_FILTER', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'ECP_LIST', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Guid'}}, {'_t': 'ptr', 'pts_to': {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}}, {'_t': 'ptr', 'pts_to': {'_t': 'int', 'signed': false, 'label': 'UInt32'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['Filter', 'EcpList', 'CurrentEcpContext', 'NextEcpType', 'NextEcpContext', 'NextEcpContextSize']}"
396
+ "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_FILTER', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'ECP_LIST', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'Guid', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}}, {'_t': 'ptr', 'pts_to': {'_t': 'int', 'signed': false, 'label': 'UInt32'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['Filter', 'EcpList', 'CurrentEcpContext', 'NextEcpType', 'NextEcpContext', 'NextEcpContextSize']}"
397
397
  },
398
398
  "FltGetRequestorProcess": {
399
399
  "proto": "{'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FLT_CALLBACK_DATA', 'ot': '_ref'}}], 'returnty': {'_t': '_ref', 'name': 'PEPROCESS', 'ot': 'ptr'}, 'arg_names': ['CallbackData']}"
@@ -582,7 +582,7 @@
582
582
  "proto": "{'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FILE_LOCK', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FLT_CALLBACK_DATA', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}], 'returnty': {'_t': '_ref', 'name': 'FLT_PREOP_CALLBACK_STATUS', 'ot': 'int'}, 'arg_names': ['FileLock', 'CallbackData', 'Context']}"
583
583
  },
584
584
  "FltPropagateActivityIdToThread": {
585
- "proto": "{'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FLT_CALLBACK_DATA', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Guid'}}, {'_t': 'ptr', 'pts_to': {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Guid'}}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['CallbackData', 'PropagateId', 'OriginalId']}"
585
+ "proto": "{'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FLT_CALLBACK_DATA', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'Guid', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'Guid', 'ot': '_ref'}}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['CallbackData', 'PropagateId', 'OriginalId']}"
586
586
  },
587
587
  "FltPropagateIrpExtension": {
588
588
  "proto": "{'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FLT_CALLBACK_DATA', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FLT_CALLBACK_DATA', 'ot': '_ref'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['SourceData', 'TargetData', 'Flags']}"
@@ -666,7 +666,7 @@
666
666
  "proto": "{'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'ERESOURCE', 'ot': '_ref'}}], 'returnty': {'_t': 'bot', 'label': 'Void'}, 'arg_names': ['Resource']}"
667
667
  },
668
668
  "FltRemoveExtraCreateParameter": {
669
- "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_FILTER', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'ECP_LIST', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Guid'}}, {'_t': 'ptr', 'pts_to': {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}}, {'_t': 'ptr', 'pts_to': {'_t': 'int', 'signed': false, 'label': 'UInt32'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['Filter', 'EcpList', 'EcpType', 'EcpContext', 'EcpContextSize']}"
669
+ "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_FILTER', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'ECP_LIST', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'Guid', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}}, {'_t': 'ptr', 'pts_to': {'_t': 'int', 'signed': false, 'label': 'UInt32'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['Filter', 'EcpList', 'EcpType', 'EcpContext', 'EcpContextSize']}"
670
670
  },
671
671
  "FltRemoveOpenReparseEntry": {
672
672
  "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_FILTER', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FLT_CALLBACK_DATA', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'OPEN_REPARSE_LIST_ENTRY', 'ot': '_ref'}}], 'returnty': {'_t': 'bot', 'label': 'Void'}, 'arg_names': ['Filter', 'Data', 'OpenReparseEntry']}"
@@ -702,7 +702,7 @@
702
702
  "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_FILTER', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'PFLT_PORT', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'ptr', 'pts_to': {'_t': 'int', 'signed': false, 'label': 'UInt32'}}, {'_t': 'ptr', 'pts_to': {'_t': 'llong', 'label': 'Int64'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['Filter', 'ClientPort', 'SenderBuffer', 'SenderBufferLength', 'ReplyBuffer', 'ReplyLength', 'Timeout']}"
703
703
  },
704
704
  "FltSetActivityIdCallbackData": {
705
- "proto": "{'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FLT_CALLBACK_DATA', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Guid'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['CallbackData', 'Guid']}"
705
+ "proto": "{'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FLT_CALLBACK_DATA', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'Guid', 'ot': '_ref'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['CallbackData', 'Guid']}"
706
706
  },
707
707
  "FltSetCallbackDataDirty": {
708
708
  "proto": "{'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FLT_CALLBACK_DATA', 'ot': '_ref'}}], 'returnty': {'_t': 'bot', 'label': 'Void'}, 'arg_names': ['Data']}"
@@ -777,10 +777,10 @@
777
777
  "proto": "{'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FILE_OBJECT', 'ot': '_ref'}}], 'returnty': {'_t': '_ref', 'name': 'BOOLEAN', 'ot': 'char'}, 'arg_names': ['FileObject']}"
778
778
  },
779
779
  "FltTagFile": {
780
- "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_INSTANCE', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FILE_OBJECT', 'ot': '_ref'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Guid'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'short', 'signed': false, 'label': 'UInt16'}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['InitiatingInstance', 'FileObject', 'FileTag', 'Guid', 'DataBuffer', 'DataBufferLength']}"
780
+ "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_INSTANCE', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FILE_OBJECT', 'ot': '_ref'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'Guid', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'short', 'signed': false, 'label': 'UInt16'}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['InitiatingInstance', 'FileObject', 'FileTag', 'Guid', 'DataBuffer', 'DataBufferLength']}"
781
781
  },
782
782
  "FltTagFileEx": {
783
- "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_INSTANCE', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FILE_OBJECT', 'ot': '_ref'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Guid'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'short', 'signed': false, 'label': 'UInt16'}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Guid'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['InitiatingInstance', 'FileObject', 'FileTag', 'Guid', 'DataBuffer', 'DataBufferLength', 'ExistingFileTag', 'ExistingGuid', 'Flags']}"
783
+ "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_INSTANCE', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FILE_OBJECT', 'ot': '_ref'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'Guid', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Void'}}, {'_t': 'short', 'signed': false, 'label': 'UInt16'}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'Guid', 'ot': '_ref'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['InitiatingInstance', 'FileObject', 'FileTag', 'Guid', 'DataBuffer', 'DataBufferLength', 'ExistingFileTag', 'ExistingGuid', 'Flags']}"
784
784
  },
785
785
  "FltUninitializeFileLock": {
786
786
  "proto": "{'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FILE_LOCK', 'ot': '_ref'}}], 'returnty': {'_t': 'bot', 'label': 'Void'}, 'arg_names': ['FileLock']}"
@@ -795,7 +795,7 @@
795
795
  "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_FILTER', 'ot': 'ptr'}], 'returnty': {'_t': 'bot', 'label': 'Void'}, 'arg_names': ['Filter']}"
796
796
  },
797
797
  "FltUntagFile": {
798
- "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_INSTANCE', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FILE_OBJECT', 'ot': '_ref'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': 'bot', 'label': 'Guid'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['InitiatingInstance', 'FileObject', 'FileTag', 'Guid']}"
798
+ "proto": "{'_t': 'func', 'args': [{'_t': '_ref', 'name': 'PFLT_INSTANCE', 'ot': 'ptr'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FILE_OBJECT', 'ot': '_ref'}}, {'_t': 'int', 'signed': false, 'label': 'UInt32'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'Guid', 'ot': '_ref'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['InitiatingInstance', 'FileObject', 'FileTag', 'Guid']}"
799
799
  },
800
800
  "FltVetoBypassIo": {
801
801
  "proto": "{'_t': 'func', 'args': [{'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FLT_CALLBACK_DATA', 'ot': '_ref'}}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'FLT_RELATED_OBJECTS', 'ot': '_ref'}}, {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, {'_t': 'ptr', 'pts_to': {'_t': '_ref', 'name': 'UNICODE_STRING', 'ot': '_ref'}}], 'returnty': {'_t': '_ref', 'name': 'NTSTATUS', 'ot': 'int'}, 'arg_names': ['CallbackData', 'FltObjects', 'OperationStatus', 'FailureReason']}"