angr 9.2.160__cp310-abi3-manylinux2014_x86_64.whl → 9.2.161__cp310-abi3-manylinux2014_x86_64.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 (31) hide show
  1. angr/__init__.py +4 -1
  2. angr/analyses/decompiler/ail_simplifier.py +81 -1
  3. angr/analyses/decompiler/block_simplifier.py +7 -5
  4. angr/analyses/decompiler/clinic.py +1 -0
  5. angr/analyses/decompiler/peephole_optimizations/__init__.py +4 -4
  6. angr/analyses/decompiler/peephole_optimizations/eager_eval.py +53 -0
  7. angr/analyses/decompiler/peephole_optimizations/modulo_simplifier.py +89 -0
  8. angr/analyses/decompiler/peephole_optimizations/{const_mull_a_shift.py → optimized_div_simplifier.py} +139 -25
  9. angr/analyses/decompiler/peephole_optimizations/remove_redundant_bitmasks.py +18 -9
  10. angr/analyses/decompiler/structuring/phoenix.py +19 -32
  11. angr/analyses/s_reaching_definitions/s_rda_model.py +1 -0
  12. angr/analyses/s_reaching_definitions/s_reaching_definitions.py +5 -2
  13. angr/analyses/variable_recovery/engine_base.py +9 -1
  14. angr/analyses/variable_recovery/variable_recovery_base.py +30 -2
  15. angr/analyses/variable_recovery/variable_recovery_fast.py +11 -2
  16. angr/emulator.py +143 -0
  17. angr/engines/concrete.py +66 -0
  18. angr/engines/icicle.py +66 -30
  19. angr/exploration_techniques/driller_core.py +2 -2
  20. angr/project.py +7 -0
  21. angr/rustylib.abi3.so +0 -0
  22. angr/sim_type.py +16 -8
  23. angr/utils/graph.py +20 -1
  24. angr/utils/ssa/__init__.py +3 -3
  25. {angr-9.2.160.dist-info → angr-9.2.161.dist-info}/METADATA +5 -5
  26. {angr-9.2.160.dist-info → angr-9.2.161.dist-info}/RECORD +30 -28
  27. angr/analyses/decompiler/peephole_optimizations/a_sub_a_div_const_mul_const.py +0 -57
  28. {angr-9.2.160.dist-info → angr-9.2.161.dist-info}/WHEEL +0 -0
  29. {angr-9.2.160.dist-info → angr-9.2.161.dist-info}/entry_points.txt +0 -0
  30. {angr-9.2.160.dist-info → angr-9.2.161.dist-info}/licenses/LICENSE +0 -0
  31. {angr-9.2.160.dist-info → angr-9.2.161.dist-info}/top_level.txt +0 -0
angr/sim_type.py CHANGED
@@ -609,33 +609,41 @@ class SimTypeWideChar(SimTypeReg):
609
609
 
610
610
  _base_name = "char"
611
611
 
612
- def __init__(self, signed=True, label=None):
612
+ def __init__(self, signed=True, label=None, endness: Endness = Endness.BE):
613
613
  """
614
614
  :param label: the type label.
615
615
  """
616
616
  SimTypeReg.__init__(self, 16, label=label)
617
617
  self.signed = signed
618
+ self.endness = endness
618
619
 
619
620
  def __repr__(self):
620
621
  return "wchar"
621
622
 
622
623
  def store(self, state, addr, value: StoreType):
623
- self._size = state.arch.byte_width
624
624
  try:
625
625
  super().store(state, addr, value)
626
626
  except TypeError:
627
627
  if isinstance(value, bytes) and len(value) == 2:
628
- value = claripy.BVV(value[0], state.arch.byte_width)
628
+ inner = (
629
+ ((value[0] << state.arch.byte_width) | value[1])
630
+ if self.endness == Endness.BE
631
+ else ((value[1] << state.arch.byte_width) | value[0])
632
+ )
633
+ value = claripy.BVV(inner, state.arch.byte_width * 2)
629
634
  super().store(state, addr, value)
630
635
  else:
631
636
  raise
632
637
 
633
638
  def extract(self, state, addr, concrete=False) -> Any:
634
- self._size = state.arch.byte_width
635
-
636
- out = super().extract(state, addr, concrete)
639
+ out = state.memory.load(addr, 2)
637
640
  if concrete:
638
- return bytes([out])
641
+ data = state.solver.eval(out, cast_to=bytes)
642
+ fmt_str = "utf-16be" if self.endness == Endness.BE else "utf-16le"
643
+ try:
644
+ return data.decode(fmt_str)
645
+ except UnicodeDecodeError:
646
+ return data
639
647
  return out
640
648
 
641
649
  def _init_str(self):
@@ -645,7 +653,7 @@ class SimTypeWideChar(SimTypeReg):
645
653
  )
646
654
 
647
655
  def copy(self):
648
- return self.__class__(signed=self.signed, label=self.label)
656
+ return self.__class__(signed=self.signed, label=self.label, endness=self.endness)
649
657
 
650
658
 
651
659
  class SimTypeBool(SimTypeReg):
angr/utils/graph.py CHANGED
@@ -534,11 +534,30 @@ class Dominators:
534
534
 
535
535
  def _pd_eval(self, v):
536
536
  assert self._ancestor is not None
537
+ assert self._semi is not None
537
538
  assert self._label is not None
538
539
 
539
540
  if self._ancestor[v.index] is None:
540
541
  return v
541
- self._pd_compress(v)
542
+
543
+ # pd_compress without recursion
544
+ queue = []
545
+ current = v
546
+ ancestor = self._ancestor[current.index]
547
+ greater_ancestor = self._ancestor[ancestor.index]
548
+ while greater_ancestor is not None:
549
+ queue.append(current)
550
+ current, ancestor = ancestor, greater_ancestor
551
+ greater_ancestor = self._ancestor[ancestor.index]
552
+
553
+ for vv in reversed(queue):
554
+ if (
555
+ self._semi[self._label[self._ancestor[vv.index].index].index].index
556
+ < self._semi[self._label[vv.index].index].index
557
+ ):
558
+ self._label[vv.index] = self._label[self._ancestor[vv.index].index]
559
+ self._ancestor[vv.index] = self._ancestor[self._ancestor[vv.index].index]
560
+
542
561
  return self._label[v.index]
543
562
 
544
563
  def _pd_compress(self, v):
@@ -89,7 +89,7 @@ def get_reg_offset_base(reg_offset, arch, size=None, resilient=True):
89
89
 
90
90
 
91
91
  def get_vvar_deflocs(
92
- blocks, phi_vvars: dict[int, set[int]] | None = None
92
+ blocks, phi_vvars: dict[int, set[int | None]] | None = None
93
93
  ) -> dict[int, tuple[VirtualVariable, CodeLocation]]:
94
94
  vvar_to_loc: dict[int, tuple[VirtualVariable, CodeLocation]] = {}
95
95
  for block in blocks:
@@ -100,7 +100,7 @@ def get_vvar_deflocs(
100
100
  )
101
101
  if phi_vvars is not None and isinstance(stmt.src, Phi):
102
102
  phi_vvars[stmt.dst.varid] = {
103
- vvar_.varid for src, vvar_ in stmt.src.src_and_vvars if vvar_ is not None
103
+ vvar_.varid if vvar_ is not None else None for src, vvar_ in stmt.src.src_and_vvars
104
104
  }
105
105
  elif isinstance(stmt, Call):
106
106
  if isinstance(stmt.ret_expr, VirtualVariable):
@@ -161,7 +161,7 @@ def get_tmp_uselocs(blocks) -> dict[CodeLocation, dict[atoms.Tmp, set[tuple[Tmp,
161
161
  return tmp_to_loc
162
162
 
163
163
 
164
- def is_const_assignment(stmt: Statement) -> tuple[bool, Const | None]:
164
+ def is_const_assignment(stmt: Statement) -> tuple[bool, Const | StackBaseOffset | None]:
165
165
  if isinstance(stmt, Assignment) and isinstance(stmt.src, (Const, StackBaseOffset)):
166
166
  return True, stmt.src
167
167
  return False, None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: angr
3
- Version: 9.2.160
3
+ Version: 9.2.161
4
4
  Summary: A multi-architecture binary analysis toolkit, with the ability to perform dynamic symbolic execution and various static analyses on binaries
5
5
  License: BSD-2-Clause
6
6
  Project-URL: Homepage, https://angr.io/
@@ -16,12 +16,12 @@ Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
17
  Requires-Dist: cxxheaderparser
18
18
  Requires-Dist: GitPython
19
- Requires-Dist: archinfo==9.2.160
19
+ Requires-Dist: archinfo==9.2.161
20
20
  Requires-Dist: cachetools
21
21
  Requires-Dist: capstone==5.0.3
22
22
  Requires-Dist: cffi>=1.14.0
23
- Requires-Dist: claripy==9.2.160
24
- Requires-Dist: cle==9.2.160
23
+ Requires-Dist: claripy==9.2.161
24
+ Requires-Dist: cle==9.2.161
25
25
  Requires-Dist: mulpyplexer
26
26
  Requires-Dist: networkx!=2.8.1,>=2.0
27
27
  Requires-Dist: protobuf>=5.28.2
@@ -30,7 +30,7 @@ Requires-Dist: pycparser>=2.18
30
30
  Requires-Dist: pydemumble
31
31
  Requires-Dist: pyformlang
32
32
  Requires-Dist: pypcode<4.0,>=3.2.1
33
- Requires-Dist: pyvex==9.2.160
33
+ Requires-Dist: pyvex==9.2.161
34
34
  Requires-Dist: rich>=13.1.0
35
35
  Requires-Dist: sortedcontainers
36
36
  Requires-Dist: sympy
@@ -1,4 +1,4 @@
1
- angr/__init__.py,sha256=y2AyYUWq5y7F77fLWaQlVLS_IfEoqKG_0JJn943Yb0g,9153
1
+ angr/__init__.py,sha256=mTOm8j6yao9yvo4UH5hEsEQqWkyiAcmR1vMM7MYr5lQ,9246
2
2
  angr/__main__.py,sha256=AK9V6uPZ58UuTKmmiH_Kgn5pG9AvjnmJCPOku69A-WU,4993
3
3
  angr/annocfg.py,sha256=0NIvcuCskwz45hbBzigUTAuCrYutjDMwEXtMJf0y0S0,10742
4
4
  angr/blade.py,sha256=NhesOPloKJC1DQJRv_HBT18X7oNxK16JwAfNz2Lc1o0,15384
@@ -7,21 +7,22 @@ angr/callable.py,sha256=j9Orwd4H4fPqOYylcEt5GuLGPV7ZOqyA_OYO2bp5PAA,6437
7
7
  angr/calling_conventions.py,sha256=BWed6JA8QRDwqOdDLqeSzegjHtsd4jgiVhaTIVf_NMQ,101396
8
8
  angr/code_location.py,sha256=kXNJDEMge9VRHadrK4E6HQ8wDdCaHSXNqyAZuHDEGuM,5397
9
9
  angr/codenode.py,sha256=hCrQRp4Ebb2X6JicNmY1PXo3_Pm8GDxVivVW0Pwe84k,3918
10
+ angr/emulator.py,sha256=572e9l-N4VUzUzLKylqpv3JmBvVC5VExi1tLy6MZSoU,4633
10
11
  angr/errors.py,sha256=I0L-TbxmVYIkC-USuHwaQ9BGPi2YVObnhZXQQ3kJFuo,8385
11
12
  angr/factory.py,sha256=PPNWvTiWaIgzxzyoTr8ObSF-TXp1hCdbY2e-0xBePNc,17815
12
13
  angr/graph_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
14
  angr/keyed_region.py,sha256=Cx6dadqFgEvRmEHTbCJpg9mXkBtKGc_BKckHc6bk1IU,17992
14
15
  angr/knowledge_base.py,sha256=hRoSLuLaOXmddTSF9FN5TVs7liftpBGq_IICz5AaYBk,4533
15
- angr/project.py,sha256=ANJUNPF41_Gs1vH8SC28FktgogurkNdeTH-uqLNPeoQ,37567
16
+ angr/project.py,sha256=96j1q8aUamVSnn0gqj3mIGIIvwctfv0ZzVf-HTO_CQU,37962
16
17
  angr/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
17
- angr/rustylib.abi3.so,sha256=T7FaoDSUHvsDJCxpxUw2iaPOU-BBxtv4jMnWM_nFa-A,5863392
18
+ angr/rustylib.abi3.so,sha256=auGPawXOpnXSLZ1VeJibZyhz0GkFIIII7bShzAkqAeE,5863528
18
19
  angr/serializable.py,sha256=l908phj_KcqopEEL_oCufbP_H6cm3Wc9v-5xdux1-6g,1533
19
20
  angr/sim_manager.py,sha256=w7yTfWR-P9yoN5x85eeiNpj9dTrnjpJ3o5aoFpDAPnc,39396
20
21
  angr/sim_options.py,sha256=tfl57MFECmA7uvMMtQrRRbpG8g_A9jKOzwY6nApTW6Y,17782
21
22
  angr/sim_procedure.py,sha256=EfXQEX-Na7iNtoqc2-KQhs7AR3tsiMYnxEF1v_lL_ok,26235
22
23
  angr/sim_state.py,sha256=qK6XPl2Q23xEXBud_SBy1fzVPPcrlx0PEQwMtRKBaBI,33893
23
24
  angr/sim_state_options.py,sha256=dsMY3UefvL7yZKXloubMhzUET3N2Crw-Fpw2Vd1ouZQ,12468
24
- angr/sim_type.py,sha256=M3Jn3RWYRFnq152pwBFcfPXc9XEyAKqMzkvDgUUG6fU,134454
25
+ angr/sim_type.py,sha256=tmVye1wxVMNDJWt7vH_KobNPY3jrLX0JCHnkeae2-Nc,134909
25
26
  angr/sim_variable.py,sha256=3DssmMw5G7m_-MYToJ3LBP-ooy2UQEuI2YgxIuX3d4Y,13177
26
27
  angr/slicer.py,sha256=DND0BERanYKafasRH9MDFAng0rSjdjmzXj2-phCD6CQ,10634
27
28
  angr/state_hierarchy.py,sha256=qDQCUGXmQm3vOxE3CSoiqTH4OAFFOWZZt9BLhNpeOhA,8484
@@ -115,13 +116,13 @@ angr/analyses/data_dep/data_dependency_analysis.py,sha256=_vQPkw1NMrzD7kAFeotOaa
115
116
  angr/analyses/data_dep/dep_nodes.py,sha256=LcNcxeuKXMMc0GkmvKqqFwNlAk3GhzBR8ixM4CD305k,4640
116
117
  angr/analyses/data_dep/sim_act_location.py,sha256=EXmfFF3lV9XogcB2gFRMUoJCbjpDYiSKNyfafkBfiY8,1564
117
118
  angr/analyses/decompiler/__init__.py,sha256=eyxt2UKvPkbuS_l_1GPb0CJ6hrj2wTavh-mVf23wwiQ,1162
118
- angr/analyses/decompiler/ail_simplifier.py,sha256=mEJMbnd0BLDHEM3YyIbfZFtzHwF2SgyrD4FWp3vfnII,87879
119
+ angr/analyses/decompiler/ail_simplifier.py,sha256=8iev7hxXKO-nkqJ9Dt4uPb7RIxEkOgyGZ5QZd364hFE,91597
119
120
  angr/analyses/decompiler/ailgraph_walker.py,sha256=m71HCthOr9J8PZoMxJzCPskay8yfCZ2j8esWT4Ka3KI,1630
120
121
  angr/analyses/decompiler/block_io_finder.py,sha256=9J56W0_SQPczZ2-VoxqSv61T57foHmzy7wPtUtQKffU,10943
121
122
  angr/analyses/decompiler/block_similarity.py,sha256=S1lTlXFyOmJlQa7I3y7xgLsENLS4XGET7tdD55k_6Vg,6859
122
- angr/analyses/decompiler/block_simplifier.py,sha256=wjdp5fBMbAh6C3YKadQb56DP7jzuWq1bS7KJ1amah4g,14249
123
+ angr/analyses/decompiler/block_simplifier.py,sha256=hyrRwWyQxHzOH0HYRP2tUnZEQvo9qsqI_R8OOM_kfb4,14470
123
124
  angr/analyses/decompiler/callsite_maker.py,sha256=QxdNvnPt0oyRtsbFLCVpWdI7NL1LdT-TlEq27X5RAqA,23150
124
- angr/analyses/decompiler/clinic.py,sha256=wfUJO9BI0htA38x3HF_u1Uq9vch8vzMFXF2UzQ6btbE,150808
125
+ angr/analyses/decompiler/clinic.py,sha256=zu0t1FtjfdsVkpMXvFvuOraYbx0IFNtARKh0K_3tfUQ,150858
125
126
  angr/analyses/decompiler/condition_processor.py,sha256=r1lVXkFLai8DtU5gqtvxz3kpjW2S4oP4mNSx7iqzQ38,53175
126
127
  angr/analyses/decompiler/decompilation_cache.py,sha256=gAZtyXs-eoFj3680bTrJVAZcIoaPsFK0kayu30NYLb4,1509
127
128
  angr/analyses/decompiler/decompilation_options.py,sha256=NDB67DI1L-stvJ4b1eQkfV26HgDJ_rG9-6PEv08G9-8,8195
@@ -196,13 +197,12 @@ angr/analyses/decompiler/optimization_passes/duplication_reverter/duplication_re
196
197
  angr/analyses/decompiler/optimization_passes/duplication_reverter/errors.py,sha256=dJq1F3jbGBFWi0zIUmDu8bwUAKPt-JyAh5iegY9rYuU,527
197
198
  angr/analyses/decompiler/optimization_passes/duplication_reverter/similarity.py,sha256=H9FGTyxHm-KbqgxuTe2qjMotboRbUyOTeiPVcD_8DSk,4411
198
199
  angr/analyses/decompiler/optimization_passes/duplication_reverter/utils.py,sha256=_WiRuxiMaxRAYtU5LiHGQ383PiI0sCt-KgG2QFG0KX4,5176
199
- angr/analyses/decompiler/peephole_optimizations/__init__.py,sha256=jNsMxMq7NW8DlhzeArTocI9wBCp55YzR30kiJKuthTM,4859
200
+ angr/analyses/decompiler/peephole_optimizations/__init__.py,sha256=pqd1vDt1GO_6n1wbRtis0iq0nTkMh3bwwA17MaiUuIs,4869
200
201
  angr/analyses/decompiler/peephole_optimizations/a_div_const_add_a_mul_n_div_const.py,sha256=HY6EQkThiyMaahz3bodJUqLBKWY2n4aKGbKyspMXN50,1641
201
202
  angr/analyses/decompiler/peephole_optimizations/a_mul_const_div_shr_const.py,sha256=-V60wMaBKz1Ld1NcaQ8Dl0T4Xo9Qq6nfAQpXJ-MNsDI,1379
202
203
  angr/analyses/decompiler/peephole_optimizations/a_mul_const_sub_a.py,sha256=5Gsq3DSQEWt3tZSkrxnbAEePkKC_dmpoQHZ2PVNlSfs,1158
203
204
  angr/analyses/decompiler/peephole_optimizations/a_shl_const_sub_a.py,sha256=UIdsR1_ST2-NGXR5QtKM0GcuSd8teKOhafTzb7UvTO0,1142
204
205
  angr/analyses/decompiler/peephole_optimizations/a_sub_a_div.py,sha256=XuR33qLQRVD_fX1kqyAdG2NNi4o6bJGvvxXD8uzfzmw,963
205
- angr/analyses/decompiler/peephole_optimizations/a_sub_a_div_const_mul_const.py,sha256=o1U22X-cul8Njk0lbXnUE2t1gxoK92zU8lWCYq_rP_A,2090
206
206
  angr/analyses/decompiler/peephole_optimizations/a_sub_a_shr_const_shr_const.py,sha256=LsLcmnVNsjUJFzirktx0rFApex0ZXzn8T8_Z3ZGZH5A,1262
207
207
  angr/analyses/decompiler/peephole_optimizations/a_sub_a_sub_n.py,sha256=3ByEh3bbqaIeWcniCtKqzWFQqsULfeVEJlcEopN9iq0,667
208
208
  angr/analyses/decompiler/peephole_optimizations/arm_cmpf.py,sha256=eLy2wdVZgk9s7yH49T6-8mTkQhXXWtcoUmKSs8KB6t8,9302
@@ -216,22 +216,23 @@ angr/analyses/decompiler/peephole_optimizations/cas_intrinsics.py,sha256=B1FJjIW
216
216
  angr/analyses/decompiler/peephole_optimizations/cmpord_rewriter.py,sha256=sJV-8aP9KUx5Kt7pZmb3M28K3z2bGD3NWJFZOdYaBYc,2662
217
217
  angr/analyses/decompiler/peephole_optimizations/coalesce_adjacent_shrs.py,sha256=fXq-qFe7JUdD5LdtUhoA9AF3LnY-3Jrmo4t3ZRJIIiQ,1414
218
218
  angr/analyses/decompiler/peephole_optimizations/coalesce_same_cascading_ifs.py,sha256=--C1JQluHt8ltdfUPBHvRD3SjW_ZcBU3oWdFwpCtpuw,1072
219
- angr/analyses/decompiler/peephole_optimizations/const_mull_a_shift.py,sha256=aYyEHYcYCetPu9-cd1j69SgAyN9yCzDAG7UmZKWAmWw,9716
220
219
  angr/analyses/decompiler/peephole_optimizations/constant_derefs.py,sha256=-eQ3nI-3-aeD-2dsA-H1NS5N6JtcCWeBTpjFiN94QBw,1774
221
220
  angr/analyses/decompiler/peephole_optimizations/conv_a_sub0_shr_and.py,sha256=4fZUQGdEY2qVANb6xQWZJRf5N7X78R_gyECxzhC_5vU,2384
222
221
  angr/analyses/decompiler/peephole_optimizations/conv_shl_shr.py,sha256=STmu5FE0EHOkCdxFJt44DhMAjbAagnuics5VV6aNmnM,2110
223
- angr/analyses/decompiler/peephole_optimizations/eager_eval.py,sha256=O-c2Zmr0QzJ1dPhTZbe5gJBK5Us1Iw0n-OpDdRidMoA,18499
222
+ angr/analyses/decompiler/peephole_optimizations/eager_eval.py,sha256=t1Kn5ffzwio7AUO3EDtAbGvBFiR2gaRLIXBpOZ9LSIU,20612
224
223
  angr/analyses/decompiler/peephole_optimizations/extended_byte_and_mask.py,sha256=NU1D1xqyQi4SaCUrJ9bk51-hjcFNseQgqD0wgQkh558,2049
225
224
  angr/analyses/decompiler/peephole_optimizations/inlined_strcpy.py,sha256=HPXGn8PWsMGyi4EfgMIwho82H_RthwPKvlq2cdxFF2I,6462
226
225
  angr/analyses/decompiler/peephole_optimizations/inlined_strcpy_consolidation.py,sha256=1s7_nlpyJKuJGwCrZESlYw2dPL49VgKPQT8wVbmCeYs,4912
227
226
  angr/analyses/decompiler/peephole_optimizations/inlined_wstrcpy.py,sha256=irbBK2HB75f27L2EnHPuwDHumz1GBYqVwB96zoe-SFM,6787
228
227
  angr/analyses/decompiler/peephole_optimizations/invert_negated_logical_conjuction_disjunction.py,sha256=hRx0tuK_s47AEgPfaWYbzh5lPfBhx_anGDTVoIxHYkg,1990
228
+ angr/analyses/decompiler/peephole_optimizations/modulo_simplifier.py,sha256=M09Whprj6tOJdFI5n9a7b-82YZOgnm3QvIbISJ9Lvaw,3724
229
229
  angr/analyses/decompiler/peephole_optimizations/one_sub_bool.py,sha256=zljXiUnoH6AwgAoXVRwz9dXEedW7RiUTkHvBMZIA-o8,1140
230
+ angr/analyses/decompiler/peephole_optimizations/optimized_div_simplifier.py,sha256=M4GxEWKs6V9aEYejGluZ8w8QpvPKpaESeFFzid88HjE,14208
230
231
  angr/analyses/decompiler/peephole_optimizations/remove_cascading_conversions.py,sha256=JK8VIopPY29wgbd4EDGI-uAVfphARL4bqByj5iDRujI,1820
231
232
  angr/analyses/decompiler/peephole_optimizations/remove_cxx_destructor_calls.py,sha256=jaZJu0oo8zEuvvQ30IqxeH3CEIugZKBkVktK3SCzWFY,1010
232
233
  angr/analyses/decompiler/peephole_optimizations/remove_empty_if_body.py,sha256=lq41TsLU8kSEduzt66i-Jva_HB5Pqlg4Q6acO-nGAYw,1612
233
234
  angr/analyses/decompiler/peephole_optimizations/remove_noop_conversions.py,sha256=KRjv1VUMmzkmax_s1ZM3nz24iqz1wqInMgJn3NR9kd4,1788
234
- angr/analyses/decompiler/peephole_optimizations/remove_redundant_bitmasks.py,sha256=0mi-KC5FDkHxCAGSeNopAQv39Jqc8sxMaY5rGmZL7_0,4226
235
+ angr/analyses/decompiler/peephole_optimizations/remove_redundant_bitmasks.py,sha256=FUf1bg9nADlwT1upwTKcVhhPcvZ98C-8PlmkWoHqwZ4,4787
235
236
  angr/analyses/decompiler/peephole_optimizations/remove_redundant_conversions.py,sha256=VJCK1yPM2DBQpxuJ3ED-YpOfmDSpOE4pUdD8rPkGAkA,11130
236
237
  angr/analyses/decompiler/peephole_optimizations/remove_redundant_ite_branch.py,sha256=1pbXLE65KwREUoB9GqCXBgz-BeUrzXxoIRFUYZAnBVA,1133
237
238
  angr/analyses/decompiler/peephole_optimizations/remove_redundant_ite_comparisons.py,sha256=E2HMxTqzmuhvv7PhT3HhnRWmBCe2b9cTfr57J4UoGds,1883
@@ -283,7 +284,7 @@ angr/analyses/decompiler/structured_codegen/dummy.py,sha256=JZLeovXE-8C-unp2hbej
283
284
  angr/analyses/decompiler/structured_codegen/dwarf_import.py,sha256=J6V40RuIyKXN7r6ESftIYfoREgmgFavnUL5m3lyTzlM,7072
284
285
  angr/analyses/decompiler/structuring/__init__.py,sha256=kEFP-zv9CZrhJtLTKwT9-9cGVTls71wLYaLDUuYorBU,711
285
286
  angr/analyses/decompiler/structuring/dream.py,sha256=JfH5uIc8nwUhMYgbHH1FI8avRii34AWLSJJiHTUSsJM,48736
286
- angr/analyses/decompiler/structuring/phoenix.py,sha256=_X-KG97vOb71Oo1msVNCHgs3Y9ppH_xMfjEV4Mv27eA,139653
287
+ angr/analyses/decompiler/structuring/phoenix.py,sha256=0kPItjEm2puUKyxyYGOJBDqxjlkCKOCnsGwfE3F34Mo,139866
287
288
  angr/analyses/decompiler/structuring/recursive_structurer.py,sha256=4lHkzsEDSGsiEHrAImaJ4cQOmoZes87_GDSzOby90Rc,7219
288
289
  angr/analyses/decompiler/structuring/sailr.py,sha256=6lM9cK3iU1kQ_eki7v1Z2VxTiX5OwQzIRF_BbEsw67Q,5721
289
290
  angr/analyses/decompiler/structuring/structurer_base.py,sha256=VsmpptsIwX2e5-U3K2px3snhrOAu7qUU3nqjA7Be0xs,47415
@@ -371,9 +372,9 @@ angr/analyses/reaching_definitions/function_handler_library/stdlib.py,sha256=qig
371
372
  angr/analyses/reaching_definitions/function_handler_library/string.py,sha256=BHgsZPyMf5FASi8UBgeNm1mV9PpQyZD93v7OuKL3eGw,8181
372
373
  angr/analyses/reaching_definitions/function_handler_library/unistd.py,sha256=cKBMwwzKlwTzmmVR-EU5AhFnMbJuDVf45GgA5b-K7Jg,1916
373
374
  angr/analyses/s_reaching_definitions/__init__.py,sha256=TyfVplxkJj8FAAAw9wegzJlcrbGwlFpIB23PdCcwrLA,254
374
- angr/analyses/s_reaching_definitions/s_rda_model.py,sha256=62rr5uw1pZ_GZuwEAOP1oDNX66FyxElpP7fkawuUMDE,5723
375
+ angr/analyses/s_reaching_definitions/s_rda_model.py,sha256=FJSge_31FFzyzBJA1xm7dQz40TfuNna6v_RWAZMZvi0,5801
375
376
  angr/analyses/s_reaching_definitions/s_rda_view.py,sha256=PtYGELZYBr87xKe2u5LX7V7wfMx_AwhxiGueOnfTV5A,13702
376
- angr/analyses/s_reaching_definitions/s_reaching_definitions.py,sha256=GkMe-Kl4zzn-geCdiHZebSSSalIx53XZLTx4RtFmhQw,7611
377
+ angr/analyses/s_reaching_definitions/s_reaching_definitions.py,sha256=gNdg8xpu5by_McWU8j0g0502yQsO2evkTlben9yimV0,7826
377
378
  angr/analyses/typehoon/__init__.py,sha256=KjKBUZadAd3grXUy48_qO0L4Me-riSqPGteVDcTL59M,92
378
379
  angr/analyses/typehoon/dfa.py,sha256=41lzhE-QmkC342SjfaaPI41lr4Au5XROTu_7oenvg7g,3823
379
380
  angr/analyses/typehoon/lifter.py,sha256=hxYJmM_A0Kl6YgY7NyWBtA3ieaY49Ey3ESCHC61lMys,4000
@@ -389,12 +390,12 @@ angr/analyses/unpacker/packing_detector.py,sha256=SO6aXR1gZkQ7w17AAv3C1-U2KAc0yL
389
390
  angr/analyses/variable_recovery/__init__.py,sha256=eA1SHzfSx8aPufUdkvgMmBnbI6VDYKKMJklcOoCO7Ao,208
390
391
  angr/analyses/variable_recovery/annotations.py,sha256=2va7cXnRHYqVqXeVt00QanxfAo3zanL4BkAcC0-Bk20,1438
391
392
  angr/analyses/variable_recovery/engine_ail.py,sha256=8yqrl_qfO_DCvaIxwsa_eits5rIbly4rBEFh5W_U2O4,33709
392
- angr/analyses/variable_recovery/engine_base.py,sha256=uKtxlkGVWQC1ACAA9-9e2T5TriwD0bhOY-N4IRakCJc,52641
393
+ angr/analyses/variable_recovery/engine_base.py,sha256=d1Hx-pIYlflgAlLDyiNma6_fEGkuhZeTyVP_D5Bfb4Y,53047
393
394
  angr/analyses/variable_recovery/engine_vex.py,sha256=5Q2S1jAr7tALa0m0okqBHBe3cUePmJlnV1Grxos1xbo,21344
394
395
  angr/analyses/variable_recovery/irsb_scanner.py,sha256=1dL2IC7fZGuRrhmcpa2Q-G666aMPmbM8zSzmIRpLNSY,5141
395
396
  angr/analyses/variable_recovery/variable_recovery.py,sha256=I45eVUpOOcSobA_QyXl3aRNa0kppJH_7YOj95fPPTdE,22272
396
- angr/analyses/variable_recovery/variable_recovery_base.py,sha256=lLjGTvyZ4Zjvnp21BLMGTN9wDV3cswiR7d2NfiYzMX0,15675
397
- angr/analyses/variable_recovery/variable_recovery_fast.py,sha256=dOhuVe1lF6Yt0Dll_scOnQWtJAY-KpM6FiOznND4Lpk,27658
397
+ angr/analyses/variable_recovery/variable_recovery_base.py,sha256=Ewd0TzNdZ_gRYXtXjVrJfODNABMMPjnuvMy9-Nnyui0,16813
398
+ angr/analyses/variable_recovery/variable_recovery_fast.py,sha256=xahVegmxq0jl_mSu0EuoQLO_-GHtARPFPwoLyppBnHY,27910
398
399
  angr/angrdb/__init__.py,sha256=Jin6JjtVadtqsgm_a6gQGx3Hn7BblkbJvdcl_GwZshg,307
399
400
  angr/angrdb/db.py,sha256=ecwcJ9b_LcM9a74GXJUm7JVWTghk3JhXScLhaQ4ZP7o,6260
400
401
  angr/angrdb/models.py,sha256=5Akv-fIjk3E2YHymEWu_nrbE8aQ9l75zOAaSIDEzeTQ,4794
@@ -429,10 +430,11 @@ angr/distributed/__init__.py,sha256=KbEuL2qYp5UN8c0mv_38rfZefTvvvtMkp6_ejWVFpOQ,
429
430
  angr/distributed/server.py,sha256=g3STpFQ48AScjXciwCt1sGE-qWAvi3GHwb8tdScL1CE,6645
430
431
  angr/distributed/worker.py,sha256=MZVlxC9ksC6xUG2fy5h08Vv9R8RiG7QBQIomPYdFIJs,6065
431
432
  angr/engines/__init__.py,sha256=_3oRkiTrPO7QPiCg3qXymt4o9ZAOrAHt5pdfjkp3W9k,1661
433
+ angr/engines/concrete.py,sha256=kEt6Dyp8QAIaOP3oW5lRcDs_2UMP2vbiNzylGiqvf7g,2143
432
434
  angr/engines/engine.py,sha256=2kwOT-sbxKXAVX2PmsPTr8Ax36Vxq6hkRdDKaITBQNc,657
433
435
  angr/engines/failure.py,sha256=redqmkSuJoIc828hpmX3CTk4EqQ-PeEn7MK2uIqSAc0,1040
434
436
  angr/engines/hook.py,sha256=lAEYYAXQY_GDOpsz3JZ7IswxrBccZnZ6EaQwyNBb4W8,2590
435
- angr/engines/icicle.py,sha256=tBH6Fc0PtkIgHRlTMpv_-BHQOhbWTdwrGy78Z0QAB9A,8558
437
+ angr/engines/icicle.py,sha256=uV6ADnyJ3tpfH9k7wGGcxn3zpGEFmTmNvqBqMqhL9E4,9855
436
438
  angr/engines/procedure.py,sha256=8kgFH56nkqSWm0p1apuGBaFngl-4BnAzE0bXhq9mc6Y,2561
437
439
  angr/engines/successors.py,sha256=oQCW7Knxb4zz7EP6Mi6RrRNrwuhbv5fnX8UL76nn0sY,29501
438
440
  angr/engines/syscall.py,sha256=7wYTriURsDTTi3PEBj4u3ZWDi7RHBV-gRrxTRxwMAVk,2166
@@ -515,7 +517,7 @@ angr/exploration_techniques/bucketizer.py,sha256=BvkBr5SBbWHT6Z1G8AJaNA7BmN9NqRm
515
517
  angr/exploration_techniques/common.py,sha256=_FmR6IxiCm_lal1rP6382r-1hCj-EirDsq_eQdD3x3s,2277
516
518
  angr/exploration_techniques/dfs.py,sha256=_pPa8qdusyGN_98FSmqEDNKrDWsBYVJb7Swn55Ngbh8,1208
517
519
  angr/exploration_techniques/director.py,sha256=sdqTSCNoieBWln7egJBh7gkJoZAo7zpWC2telwEsn1w,17865
518
- angr/exploration_techniques/driller_core.py,sha256=VoTeui1DkqmQLRungOwGaZ_xrpnG2U27WEspvBJ_j8U,3468
520
+ angr/exploration_techniques/driller_core.py,sha256=ZguyrKpC0kHLotJOkdVX553JBMwvAgUtQW244EUf78k,3450
519
521
  angr/exploration_techniques/explorer.py,sha256=_SKBIFX-YDd71aIAJaV9MwCZt64wUvvZmZiBjrjuruk,6243
520
522
  angr/exploration_techniques/lengthlimiter.py,sha256=To8SlXhtdDVSqAlCSIvhvqyY8BUs37ZU7ABymhJDz14,590
521
523
  angr/exploration_techniques/local_loop_seer.py,sha256=qcXC3XByVc1WkznVoqCNt7MqBX_GL_qSwBHmwbHphmU,2605
@@ -1385,7 +1387,7 @@ angr/utils/enums_conv.py,sha256=fA6qeoRZ6Cj6gCIS_PZbP4PX7E8IybnYQ90OZGnBVrc,2746
1385
1387
  angr/utils/env.py,sha256=aO4N2h7DUsUQtTgnC5J_oPHvMxJRur20m5UFSkmy4XU,398
1386
1388
  angr/utils/formatting.py,sha256=OWzSfAlKcL09cEtcqxszYWHsRO9tih7hvXD2K9kUZc8,4343
1387
1389
  angr/utils/funcid.py,sha256=Rd4r8juv2IpeMtCpPp4wxJoEZTnZZ1NsxdT42tvrKVA,6353
1388
- angr/utils/graph.py,sha256=KgmX5yCe2AxqfPgpXbXWwQ7j32AYNIuhMaNoESPt5Hw,31537
1390
+ angr/utils/graph.py,sha256=gLLwLuhNtt2cXmqEZvtK2-3CQDBiaa9XqllO0vfaUBc,32319
1389
1391
  angr/utils/lazy_import.py,sha256=7Mx-y-aZFsXX9jNxvEcXT-rO8tL8rknb6D6RbSFOI1M,343
1390
1392
  angr/utils/library.py,sha256=z3rFYm7ePZTXNZJuKiQrR0SnlbVb-OzkX0t0U44nXDk,7181
1391
1393
  angr/utils/loader.py,sha256=5PtUlonkbqENNg3AMJ4YI3-g5dyyXJ0GP83SwO2dECY,1951
@@ -1394,12 +1396,12 @@ angr/utils/orderedset.py,sha256=aGfmLdOS77nzz2eoPpCqRICqzaAeBnuis1Et_I_hiZg,2047
1394
1396
  angr/utils/tagged_interval_map.py,sha256=rXKBuT14N23AAntpOKhZhmA-qqymnsvjpheFXoTRVRA,4417
1395
1397
  angr/utils/timing.py,sha256=n-YZ86g0ZWmLhsoNvcimRpKzewR5hmquLZe6fagxlBw,2224
1396
1398
  angr/utils/types.py,sha256=688trvR0_j93sfeRgFT1npcmjNGSx99m_IPe9Xyy9WY,4967
1397
- angr/utils/ssa/__init__.py,sha256=veiW783pfwUhphLOIgxBbiH6kL2i22daZQ2beJC5ZHs,15255
1399
+ angr/utils/ssa/__init__.py,sha256=F0HR0vok7_K-vPp6hV334XtvCZflyh5HnYMGAmGgeJo,15290
1398
1400
  angr/utils/ssa/tmp_uses_collector.py,sha256=digAUQpYoFR1VYfwoXlF3T1pYdDi6Pdq_ck54SjMabQ,813
1399
1401
  angr/utils/ssa/vvar_uses_collector.py,sha256=HewqUQluNE9EsaiLeFo7LaBvws_DDBDYNt9RBExy464,1367
1400
- angr-9.2.160.dist-info/licenses/LICENSE,sha256=PmWf0IlSz6Jjp9n7nyyBQA79Q5C2ma68LRykY1V3GF0,1456
1401
- angr-9.2.160.dist-info/METADATA,sha256=5PNZ_AfJn_ihj55HU-z9J2PzJpTkXem-HYY9lBXOT-c,4343
1402
- angr-9.2.160.dist-info/WHEEL,sha256=vNQqwq6-Jgs2nVZrTsbPdqYS3DdiDOZyeheR1m43n08,111
1403
- angr-9.2.160.dist-info/entry_points.txt,sha256=Vjh1C8PMyr5dZFMnik5WkEP01Uwr2T73I3a6N32sgQU,44
1404
- angr-9.2.160.dist-info/top_level.txt,sha256=dKw0KWTbwLXytFvv15oAAG4sUs3ey47tt6DorJG9-hw,5
1405
- angr-9.2.160.dist-info/RECORD,,
1402
+ angr-9.2.161.dist-info/licenses/LICENSE,sha256=PmWf0IlSz6Jjp9n7nyyBQA79Q5C2ma68LRykY1V3GF0,1456
1403
+ angr-9.2.161.dist-info/METADATA,sha256=4w136XFYvE-fQgzJUo-9NmD2l2ym_Cp-cFukBkFBiQc,4343
1404
+ angr-9.2.161.dist-info/WHEEL,sha256=vNQqwq6-Jgs2nVZrTsbPdqYS3DdiDOZyeheR1m43n08,111
1405
+ angr-9.2.161.dist-info/entry_points.txt,sha256=Vjh1C8PMyr5dZFMnik5WkEP01Uwr2T73I3a6N32sgQU,44
1406
+ angr-9.2.161.dist-info/top_level.txt,sha256=dKw0KWTbwLXytFvv15oAAG4sUs3ey47tt6DorJG9-hw,5
1407
+ angr-9.2.161.dist-info/RECORD,,
@@ -1,57 +0,0 @@
1
- from __future__ import annotations
2
- from angr.ailment.expression import BinaryOp, Const, Convert
3
-
4
- from .base import PeepholeOptimizationExprBase
5
-
6
-
7
- class ASubADivConstMulConst(PeepholeOptimizationExprBase):
8
- __slots__ = ()
9
-
10
- NAME = "a - (a / N) * N => a % N"
11
- expr_classes = (BinaryOp,)
12
-
13
- def optimize(self, expr: BinaryOp, **kwargs):
14
- if (
15
- expr.op == "Sub"
16
- and len(expr.operands) == 2
17
- and isinstance(expr.operands[1], BinaryOp)
18
- and expr.operands[1].op == "Mul"
19
- and isinstance(expr.operands[1].operands[1], Const)
20
- ):
21
- a0, op1 = expr.operands
22
- op1_left = op1.operands[0]
23
- mul_const = expr.operands[1].operands[1]
24
-
25
- if (
26
- isinstance(op1_left, Convert)
27
- and isinstance(a0, Convert)
28
- and op1_left.to_bits == a0.to_bits
29
- and op1_left.from_bits == a0.from_bits
30
- ):
31
- # Convert(a) - (Convert(a / N)) * N ==> Convert(a) % N
32
- conv_expr = a0
33
- a0 = a0.operand
34
- op1_left = op1_left.operand
35
- else:
36
- conv_expr = None
37
-
38
- if isinstance(op1_left, BinaryOp) and op1_left.op == "Div" and isinstance(op1_left.operands[1], Const):
39
- # a - (a / N) * N ==> a % N
40
- a1 = op1_left.operands[0]
41
- div_const = op1_left.operands[1]
42
-
43
- if a0.likes(a1) and mul_const.value == div_const.value:
44
- operands = [a0, div_const]
45
- mod = BinaryOp(expr.idx, "Mod", operands, False, bits=a0.bits, **expr.tags)
46
- if conv_expr is not None:
47
- mod = Convert(
48
- conv_expr.idx,
49
- conv_expr.from_bits,
50
- conv_expr.to_bits,
51
- conv_expr.is_signed,
52
- mod,
53
- **conv_expr.tags,
54
- )
55
- return mod
56
-
57
- return None
File without changes