angr 9.2.117__py3-none-macosx_11_0_arm64.whl → 9.2.119__py3-none-macosx_11_0_arm64.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 (1318) hide show
  1. angr/__init__.py +2 -1
  2. angr/__main__.py +21 -1
  3. angr/analyses/__init__.py +4 -0
  4. angr/analyses/analysis.py +88 -46
  5. angr/analyses/backward_slice.py +15 -18
  6. angr/analyses/binary_optimizer.py +29 -34
  7. angr/analyses/bindiff.py +35 -44
  8. angr/analyses/boyscout.py +1 -0
  9. angr/analyses/callee_cleanup_finder.py +3 -4
  10. angr/analyses/calling_convention.py +98 -98
  11. angr/analyses/cdg.py +5 -12
  12. angr/analyses/cfg/__init__.py +1 -0
  13. angr/analyses/cfg/cfb.py +14 -20
  14. angr/analyses/cfg/cfg.py +2 -1
  15. angr/analyses/cfg/cfg_arch_options.py +4 -1
  16. angr/analyses/cfg/cfg_base.py +122 -165
  17. angr/analyses/cfg/cfg_emulated.py +60 -92
  18. angr/analyses/cfg/cfg_fast.py +406 -335
  19. angr/analyses/cfg/cfg_fast_soot.py +10 -17
  20. angr/analyses/cfg/cfg_job_base.py +6 -7
  21. angr/analyses/cfg/indirect_jump_resolvers/__init__.py +1 -0
  22. angr/analyses/cfg/indirect_jump_resolvers/amd64_elf_got.py +2 -3
  23. angr/analyses/cfg/indirect_jump_resolvers/amd64_pe_iat.py +2 -3
  24. angr/analyses/cfg/indirect_jump_resolvers/arm_elf_fast.py +6 -8
  25. angr/analyses/cfg/indirect_jump_resolvers/const_resolver.py +3 -5
  26. angr/analyses/cfg/indirect_jump_resolvers/default_resolvers.py +1 -0
  27. angr/analyses/cfg/indirect_jump_resolvers/jumptable.py +97 -112
  28. angr/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py +26 -32
  29. angr/analyses/cfg/indirect_jump_resolvers/propagator_utils.py +1 -0
  30. angr/analyses/cfg/indirect_jump_resolvers/resolver.py +7 -7
  31. angr/analyses/cfg/indirect_jump_resolvers/x86_elf_pic_plt.py +3 -8
  32. angr/analyses/cfg/indirect_jump_resolvers/x86_pe_iat.py +2 -3
  33. angr/analyses/cfg_slice_to_sink/__init__.py +1 -0
  34. angr/analyses/cfg_slice_to_sink/cfg_slice_to_sink.py +4 -4
  35. angr/analyses/cfg_slice_to_sink/graph.py +4 -1
  36. angr/analyses/cfg_slice_to_sink/transitions.py +4 -2
  37. angr/analyses/class_identifier.py +1 -0
  38. angr/analyses/code_tagging.py +9 -9
  39. angr/analyses/complete_calling_conventions.py +28 -36
  40. angr/analyses/congruency_check.py +6 -11
  41. angr/analyses/data_dep/__init__.py +1 -0
  42. angr/analyses/data_dep/data_dependency_analysis.py +38 -48
  43. angr/analyses/data_dep/dep_nodes.py +13 -12
  44. angr/analyses/data_dep/sim_act_location.py +3 -0
  45. angr/analyses/datagraph_meta.py +7 -7
  46. angr/analyses/ddg.py +48 -69
  47. angr/analyses/decompiler/__init__.py +3 -0
  48. angr/analyses/decompiler/ail_simplifier.py +929 -400
  49. angr/analyses/decompiler/ailgraph_walker.py +1 -0
  50. angr/analyses/decompiler/block_io_finder.py +13 -4
  51. angr/analyses/decompiler/block_similarity.py +28 -18
  52. angr/analyses/decompiler/block_simplifier.py +40 -104
  53. angr/analyses/decompiler/callsite_maker.py +124 -82
  54. angr/analyses/decompiler/ccall_rewriters/__init__.py +1 -0
  55. angr/analyses/decompiler/ccall_rewriters/amd64_ccalls.py +115 -105
  56. angr/analyses/decompiler/ccall_rewriters/rewriter_base.py +2 -1
  57. angr/analyses/decompiler/clinic.py +371 -184
  58. angr/analyses/decompiler/condition_processor.py +127 -116
  59. angr/analyses/decompiler/counters/__init__.py +5 -0
  60. angr/analyses/decompiler/counters/boolean_counter.py +27 -0
  61. angr/analyses/decompiler/{call_counter.py → counters/call_counter.py} +5 -4
  62. angr/analyses/decompiler/{expression_counters.py → counters/expression_counters.py} +5 -4
  63. angr/analyses/decompiler/counters/seq_cf_structure_counter.py +63 -0
  64. angr/analyses/decompiler/decompilation_cache.py +2 -1
  65. angr/analyses/decompiler/decompilation_options.py +1 -0
  66. angr/analyses/decompiler/decompiler.py +50 -27
  67. angr/analyses/decompiler/dephication/__init__.py +6 -0
  68. angr/analyses/decompiler/dephication/dephication_base.py +87 -0
  69. angr/analyses/decompiler/dephication/graph_dephication.py +63 -0
  70. angr/analyses/decompiler/dephication/graph_rewriting.py +116 -0
  71. angr/analyses/decompiler/dephication/graph_vvar_mapping.py +313 -0
  72. angr/analyses/decompiler/dephication/rewriting_engine.py +247 -0
  73. angr/analyses/decompiler/dephication/seqnode_dephication.py +106 -0
  74. angr/analyses/decompiler/empty_node_remover.py +1 -0
  75. angr/analyses/decompiler/expression_narrower.py +12 -17
  76. angr/analyses/decompiler/goto_manager.py +43 -4
  77. angr/analyses/decompiler/graph_region.py +19 -31
  78. angr/analyses/decompiler/jump_target_collector.py +1 -0
  79. angr/analyses/decompiler/jumptable_entry_condition_rewriter.py +2 -1
  80. angr/analyses/decompiler/optimization_passes/__init__.py +7 -3
  81. angr/analyses/decompiler/optimization_passes/base_ptr_save_simplifier.py +23 -18
  82. angr/analyses/decompiler/optimization_passes/call_stmt_rewriter.py +46 -0
  83. angr/analyses/decompiler/optimization_passes/code_motion.py +4 -2
  84. angr/analyses/decompiler/optimization_passes/const_derefs.py +36 -36
  85. angr/analyses/decompiler/optimization_passes/const_prop_reverter.py +6 -9
  86. angr/analyses/decompiler/optimization_passes/cross_jump_reverter.py +4 -3
  87. angr/analyses/decompiler/optimization_passes/deadblock_remover.py +1 -0
  88. angr/analyses/decompiler/optimization_passes/div_simplifier.py +78 -72
  89. angr/analyses/decompiler/optimization_passes/duplication_reverter/__init__.py +2 -0
  90. angr/analyses/decompiler/optimization_passes/duplication_reverter/ail_merge_graph.py +503 -0
  91. angr/analyses/decompiler/optimization_passes/duplication_reverter/duplication_reverter.py +1215 -0
  92. angr/analyses/decompiler/optimization_passes/duplication_reverter/errors.py +16 -0
  93. angr/analyses/decompiler/optimization_passes/duplication_reverter/similarity.py +126 -0
  94. angr/analyses/decompiler/optimization_passes/duplication_reverter/utils.py +169 -0
  95. angr/analyses/decompiler/optimization_passes/engine_base.py +60 -63
  96. angr/analyses/decompiler/optimization_passes/expr_op_swapper.py +6 -7
  97. angr/analyses/decompiler/optimization_passes/flip_boolean_cmp.py +1 -0
  98. angr/analyses/decompiler/optimization_passes/inlined_string_transformation_simplifier.py +102 -37
  99. angr/analyses/decompiler/optimization_passes/ite_expr_converter.py +8 -10
  100. angr/analyses/decompiler/optimization_passes/ite_region_converter.py +128 -18
  101. angr/analyses/decompiler/optimization_passes/lowered_switch_simplifier.py +142 -145
  102. angr/analyses/decompiler/optimization_passes/mod_simplifier.py +27 -23
  103. angr/analyses/decompiler/optimization_passes/multi_simplifier.py +30 -34
  104. angr/analyses/decompiler/optimization_passes/optimization_pass.py +108 -47
  105. angr/analyses/decompiler/optimization_passes/register_save_area_simplifier.py +10 -3
  106. angr/analyses/decompiler/optimization_passes/ret_addr_save_simplifier.py +5 -6
  107. angr/analyses/decompiler/optimization_passes/ret_deduplicator.py +3 -2
  108. angr/analyses/decompiler/optimization_passes/return_duplicator_base.py +125 -13
  109. angr/analyses/decompiler/optimization_passes/return_duplicator_high.py +1 -0
  110. angr/analyses/decompiler/optimization_passes/return_duplicator_low.py +3 -2
  111. angr/analyses/decompiler/optimization_passes/stack_canary_simplifier.py +52 -21
  112. angr/analyses/decompiler/optimization_passes/switch_default_case_duplicator.py +3 -2
  113. angr/analyses/decompiler/optimization_passes/win_stack_canary_simplifier.py +47 -36
  114. angr/analyses/decompiler/optimization_passes/x86_gcc_getpc_simplifier.py +2 -1
  115. angr/analyses/decompiler/peephole_optimizations/__init__.py +2 -0
  116. angr/analyses/decompiler/peephole_optimizations/a_div_const_add_a_mul_n_div_const.py +26 -22
  117. angr/analyses/decompiler/peephole_optimizations/a_mul_const_div_shr_const.py +2 -2
  118. angr/analyses/decompiler/peephole_optimizations/a_shl_const_sub_a.py +1 -0
  119. angr/analyses/decompiler/peephole_optimizations/a_sub_a_div.py +2 -2
  120. angr/analyses/decompiler/peephole_optimizations/a_sub_a_div_const_mul_const.py +1 -0
  121. angr/analyses/decompiler/peephole_optimizations/a_sub_a_sub_n.py +8 -4
  122. angr/analyses/decompiler/peephole_optimizations/arm_cmpf.py +28 -27
  123. angr/analyses/decompiler/peephole_optimizations/base.py +17 -20
  124. angr/analyses/decompiler/peephole_optimizations/basepointeroffset_add_n.py +1 -0
  125. angr/analyses/decompiler/peephole_optimizations/basepointeroffset_and_mask.py +1 -0
  126. angr/analyses/decompiler/peephole_optimizations/bitwise_or_to_logical_or.py +2 -2
  127. angr/analyses/decompiler/peephole_optimizations/bool_expr_xor_1.py +2 -2
  128. angr/analyses/decompiler/peephole_optimizations/bswap.py +29 -22
  129. angr/analyses/decompiler/peephole_optimizations/cmpord_rewriter.py +3 -4
  130. angr/analyses/decompiler/peephole_optimizations/coalesce_adjacent_shrs.py +39 -0
  131. angr/analyses/decompiler/peephole_optimizations/coalesce_same_cascading_ifs.py +2 -1
  132. angr/analyses/decompiler/peephole_optimizations/const_mull_a_shift.py +94 -29
  133. angr/analyses/decompiler/peephole_optimizations/constant_derefs.py +1 -0
  134. angr/analyses/decompiler/peephole_optimizations/conv_a_sub0_shr_and.py +48 -49
  135. angr/analyses/decompiler/peephole_optimizations/conv_shl_shr.py +1 -0
  136. angr/analyses/decompiler/peephole_optimizations/eager_eval.py +41 -34
  137. angr/analyses/decompiler/peephole_optimizations/extended_byte_and_mask.py +2 -1
  138. angr/analyses/decompiler/peephole_optimizations/inlined_strcpy.py +28 -18
  139. angr/analyses/decompiler/peephole_optimizations/inlined_strcpy_consolidation.py +8 -4
  140. angr/analyses/decompiler/peephole_optimizations/inlined_wstrcpy.py +28 -18
  141. angr/analyses/decompiler/peephole_optimizations/invert_negated_logical_conjuction_disjunction.py +32 -32
  142. angr/analyses/decompiler/peephole_optimizations/one_sub_bool.py +2 -2
  143. angr/analyses/decompiler/peephole_optimizations/remove_cascading_conversions.py +23 -3
  144. angr/analyses/decompiler/peephole_optimizations/remove_empty_if_body.py +2 -1
  145. angr/analyses/decompiler/peephole_optimizations/remove_noop_conversions.py +4 -0
  146. angr/analyses/decompiler/peephole_optimizations/remove_redundant_bitmasks.py +1 -0
  147. angr/analyses/decompiler/peephole_optimizations/remove_redundant_conversions.py +4 -6
  148. angr/analyses/decompiler/peephole_optimizations/remove_redundant_ite_branch.py +14 -13
  149. angr/analyses/decompiler/peephole_optimizations/remove_redundant_ite_comparisons.py +2 -2
  150. angr/analyses/decompiler/peephole_optimizations/remove_redundant_nots.py +1 -0
  151. angr/analyses/decompiler/peephole_optimizations/remove_redundant_reinterprets.py +3 -2
  152. angr/analyses/decompiler/peephole_optimizations/remove_redundant_shifts.py +2 -2
  153. angr/analyses/decompiler/peephole_optimizations/remove_redundant_shifts_around_comparators.py +20 -16
  154. angr/analyses/decompiler/peephole_optimizations/rewrite_bit_extractions.py +3 -3
  155. angr/analyses/decompiler/peephole_optimizations/rewrite_mips_gp_loads.py +4 -2
  156. angr/analyses/decompiler/peephole_optimizations/rol_ror.py +66 -40
  157. angr/analyses/decompiler/peephole_optimizations/sar_to_signed_div.py +64 -57
  158. angr/analyses/decompiler/peephole_optimizations/simplify_pc_relative_loads.py +14 -14
  159. angr/analyses/decompiler/peephole_optimizations/single_bit_cond_to_boolexpr.py +1 -0
  160. angr/analyses/decompiler/peephole_optimizations/single_bit_xor.py +8 -5
  161. angr/analyses/decompiler/peephole_optimizations/tidy_stack_addr.py +4 -6
  162. angr/analyses/decompiler/redundant_label_remover.py +20 -19
  163. angr/analyses/decompiler/region_identifier.py +64 -77
  164. angr/analyses/decompiler/region_simplifiers/__init__.py +1 -0
  165. angr/analyses/decompiler/region_simplifiers/cascading_cond_transformer.py +2 -1
  166. angr/analyses/decompiler/region_simplifiers/cascading_ifs.py +1 -0
  167. angr/analyses/decompiler/region_simplifiers/expr_folding.py +43 -29
  168. angr/analyses/decompiler/region_simplifiers/goto.py +1 -0
  169. angr/analyses/decompiler/region_simplifiers/if_.py +29 -36
  170. angr/analyses/decompiler/region_simplifiers/ifelse.py +1 -0
  171. angr/analyses/decompiler/region_simplifiers/loop.py +27 -13
  172. angr/analyses/decompiler/region_simplifiers/node_address_finder.py +1 -0
  173. angr/analyses/decompiler/region_simplifiers/region_simplifier.py +1 -0
  174. angr/analyses/decompiler/region_simplifiers/switch_cluster_simplifier.py +12 -16
  175. angr/analyses/decompiler/region_simplifiers/switch_expr_simplifier.py +36 -32
  176. angr/analyses/decompiler/region_walker.py +1 -0
  177. angr/analyses/decompiler/return_maker.py +1 -0
  178. angr/analyses/decompiler/seq_to_blocks.py +1 -0
  179. angr/analyses/decompiler/sequence_walker.py +5 -10
  180. angr/analyses/decompiler/ssailification/__init__.py +4 -0
  181. angr/analyses/decompiler/ssailification/rewriting.py +325 -0
  182. angr/analyses/decompiler/ssailification/rewriting_engine.py +601 -0
  183. angr/analyses/decompiler/ssailification/rewriting_state.py +60 -0
  184. angr/analyses/decompiler/ssailification/ssailification.py +213 -0
  185. angr/analyses/decompiler/ssailification/traversal.py +97 -0
  186. angr/analyses/decompiler/ssailification/traversal_engine.py +131 -0
  187. angr/analyses/decompiler/ssailification/traversal_state.py +42 -0
  188. angr/analyses/decompiler/structured_codegen/__init__.py +1 -0
  189. angr/analyses/decompiler/structured_codegen/base.py +2 -2
  190. angr/analyses/decompiler/structured_codegen/c.py +172 -160
  191. angr/analyses/decompiler/structured_codegen/dummy.py +1 -0
  192. angr/analyses/decompiler/structured_codegen/dwarf_import.py +1 -0
  193. angr/analyses/decompiler/structuring/__init__.py +1 -0
  194. angr/analyses/decompiler/structuring/dream.py +27 -43
  195. angr/analyses/decompiler/structuring/phoenix.py +201 -201
  196. angr/analyses/decompiler/structuring/recursive_structurer.py +4 -3
  197. angr/analyses/decompiler/structuring/sailr.py +5 -4
  198. angr/analyses/decompiler/structuring/structurer_base.py +26 -23
  199. angr/analyses/decompiler/structuring/structurer_nodes.py +14 -24
  200. angr/analyses/decompiler/utils.py +112 -52
  201. angr/analyses/disassembly.py +75 -77
  202. angr/analyses/disassembly_utils.py +10 -13
  203. angr/analyses/dominance_frontier.py +25 -7
  204. angr/analyses/find_objects_static.py +3 -2
  205. angr/analyses/flirt.py +7 -10
  206. angr/analyses/forward_analysis/__init__.py +1 -0
  207. angr/analyses/forward_analysis/forward_analysis.py +9 -6
  208. angr/analyses/forward_analysis/job_info.py +3 -3
  209. angr/analyses/forward_analysis/visitors/__init__.py +1 -0
  210. angr/analyses/forward_analysis/visitors/call_graph.py +1 -0
  211. angr/analyses/forward_analysis/visitors/function_graph.py +3 -2
  212. angr/analyses/forward_analysis/visitors/graph.py +9 -9
  213. angr/analyses/forward_analysis/visitors/loop.py +1 -0
  214. angr/analyses/forward_analysis/visitors/single_node_graph.py +2 -2
  215. angr/analyses/identifier/__init__.py +1 -0
  216. angr/analyses/identifier/custom_callable.py +2 -2
  217. angr/analyses/identifier/errors.py +1 -0
  218. angr/analyses/identifier/func.py +6 -3
  219. angr/analyses/identifier/functions/__init__.py +2 -1
  220. angr/analyses/identifier/functions/atoi.py +2 -4
  221. angr/analyses/identifier/functions/based_atoi.py +3 -6
  222. angr/analyses/identifier/functions/fdprintf.py +1 -0
  223. angr/analyses/identifier/functions/free.py +3 -5
  224. angr/analyses/identifier/functions/int2str.py +11 -26
  225. angr/analyses/identifier/functions/malloc.py +4 -6
  226. angr/analyses/identifier/functions/memcmp.py +2 -4
  227. angr/analyses/identifier/functions/memcpy.py +2 -2
  228. angr/analyses/identifier/functions/memset.py +2 -2
  229. angr/analyses/identifier/functions/printf.py +1 -0
  230. angr/analyses/identifier/functions/recv_until.py +3 -6
  231. angr/analyses/identifier/functions/skip_calloc.py +2 -1
  232. angr/analyses/identifier/functions/skip_realloc.py +4 -6
  233. angr/analyses/identifier/functions/skip_recv_n.py +4 -6
  234. angr/analyses/identifier/functions/snprintf.py +2 -4
  235. angr/analyses/identifier/functions/sprintf.py +1 -0
  236. angr/analyses/identifier/functions/strcasecmp.py +1 -0
  237. angr/analyses/identifier/functions/strcmp.py +2 -1
  238. angr/analyses/identifier/functions/strcpy.py +2 -2
  239. angr/analyses/identifier/functions/strlen.py +1 -0
  240. angr/analyses/identifier/functions/strncmp.py +2 -1
  241. angr/analyses/identifier/functions/strncpy.py +2 -2
  242. angr/analyses/identifier/functions/strtol.py +2 -4
  243. angr/analyses/identifier/identify.py +35 -54
  244. angr/analyses/identifier/runner.py +6 -5
  245. angr/analyses/init_finder.py +17 -17
  246. angr/analyses/loop_analysis.py +10 -14
  247. angr/analyses/loopfinder.py +9 -13
  248. angr/analyses/propagator/__init__.py +1 -0
  249. angr/analyses/propagator/engine_ail.py +161 -166
  250. angr/analyses/propagator/engine_base.py +3 -2
  251. angr/analyses/propagator/engine_vex.py +47 -48
  252. angr/analyses/propagator/outdated_definition_walker.py +18 -23
  253. angr/analyses/propagator/propagator.py +8 -12
  254. angr/analyses/propagator/tmpvar_finder.py +1 -0
  255. angr/analyses/propagator/top_checker_mixin.py +2 -4
  256. angr/analyses/propagator/values.py +1 -0
  257. angr/analyses/propagator/vex_vars.py +3 -2
  258. angr/analyses/proximity_graph.py +12 -20
  259. angr/analyses/reaching_definitions/__init__.py +5 -4
  260. angr/analyses/reaching_definitions/call_trace.py +7 -6
  261. angr/analyses/reaching_definitions/dep_graph.py +18 -23
  262. angr/analyses/reaching_definitions/engine_ail.py +89 -121
  263. angr/analyses/reaching_definitions/engine_vex.py +20 -32
  264. angr/analyses/reaching_definitions/function_handler.py +38 -35
  265. angr/analyses/reaching_definitions/function_handler_library/__init__.py +1 -0
  266. angr/analyses/reaching_definitions/function_handler_library/stdio.py +4 -6
  267. angr/analyses/reaching_definitions/function_handler_library/stdlib.py +1 -2
  268. angr/analyses/reaching_definitions/function_handler_library/string.py +2 -4
  269. angr/analyses/reaching_definitions/function_handler_library/unistd.py +1 -0
  270. angr/analyses/reaching_definitions/heap_allocator.py +7 -6
  271. angr/analyses/reaching_definitions/rd_initializer.py +27 -25
  272. angr/analyses/reaching_definitions/rd_state.py +14 -16
  273. angr/analyses/reaching_definitions/reaching_definitions.py +27 -36
  274. angr/analyses/reaching_definitions/subject.py +3 -2
  275. angr/analyses/reassembler.py +189 -253
  276. angr/analyses/s_liveness/__init__.py +2 -0
  277. angr/analyses/s_liveness/s_liveness.py +153 -0
  278. angr/analyses/s_propagator/__init__.py +2 -0
  279. angr/analyses/s_propagator/s_propagator.py +250 -0
  280. angr/analyses/s_reaching_definitions/__init__.py +2 -0
  281. angr/analyses/s_reaching_definitions/s_rda.py +479 -0
  282. angr/analyses/soot_class_hierarchy.py +15 -24
  283. angr/analyses/stack_pointer_tracker.py +106 -98
  284. angr/analyses/static_hooker.py +3 -2
  285. angr/analyses/typehoon/__init__.py +1 -0
  286. angr/analyses/typehoon/dfa.py +5 -5
  287. angr/analyses/typehoon/lifter.py +5 -4
  288. angr/analyses/typehoon/simple_solver.py +80 -64
  289. angr/analyses/typehoon/translator.py +26 -16
  290. angr/analyses/typehoon/typeconsts.py +22 -12
  291. angr/analyses/typehoon/typehoon.py +8 -10
  292. angr/analyses/typehoon/typevars.py +37 -49
  293. angr/analyses/typehoon/variance.py +1 -0
  294. angr/analyses/variable_recovery/__init__.py +1 -0
  295. angr/analyses/variable_recovery/annotations.py +1 -0
  296. angr/analyses/variable_recovery/engine_ail.py +78 -32
  297. angr/analyses/variable_recovery/engine_base.py +233 -59
  298. angr/analyses/variable_recovery/engine_vex.py +17 -21
  299. angr/analyses/variable_recovery/irsb_scanner.py +1 -0
  300. angr/analyses/variable_recovery/variable_recovery.py +14 -16
  301. angr/analyses/variable_recovery/variable_recovery_base.py +12 -14
  302. angr/analyses/variable_recovery/variable_recovery_fast.py +67 -47
  303. angr/analyses/veritesting.py +10 -16
  304. angr/analyses/vfg.py +102 -148
  305. angr/analyses/vsa_ddg.py +3 -5
  306. angr/analyses/vtable.py +6 -6
  307. angr/analyses/xrefs.py +9 -13
  308. angr/angrdb/__init__.py +4 -2
  309. angr/angrdb/db.py +51 -53
  310. angr/angrdb/models.py +1 -0
  311. angr/angrdb/serializers/__init__.py +1 -0
  312. angr/angrdb/serializers/cfg_model.py +2 -2
  313. angr/angrdb/serializers/comments.py +1 -0
  314. angr/angrdb/serializers/funcs.py +4 -3
  315. angr/angrdb/serializers/kb.py +3 -2
  316. angr/angrdb/serializers/labels.py +1 -0
  317. angr/angrdb/serializers/structured_code.py +5 -10
  318. angr/angrdb/serializers/variables.py +6 -6
  319. angr/angrdb/serializers/xrefs.py +2 -2
  320. angr/annocfg.py +17 -25
  321. angr/blade.py +19 -23
  322. angr/block.py +11 -13
  323. angr/callable.py +4 -3
  324. angr/calling_conventions.py +147 -147
  325. angr/code_location.py +12 -13
  326. angr/codenode.py +2 -1
  327. angr/concretization_strategies/__init__.py +6 -6
  328. angr/concretization_strategies/any.py +5 -4
  329. angr/concretization_strategies/any_named.py +1 -0
  330. angr/concretization_strategies/controlled_data.py +1 -0
  331. angr/concretization_strategies/eval.py +2 -2
  332. angr/concretization_strategies/logging.py +1 -0
  333. angr/concretization_strategies/max.py +6 -6
  334. angr/concretization_strategies/nonzero.py +1 -0
  335. angr/concretization_strategies/nonzero_range.py +4 -3
  336. angr/concretization_strategies/norepeats.py +5 -4
  337. angr/concretization_strategies/norepeats_range.py +1 -0
  338. angr/concretization_strategies/range.py +1 -0
  339. angr/concretization_strategies/signed_add.py +13 -9
  340. angr/concretization_strategies/single.py +2 -0
  341. angr/concretization_strategies/solutions.py +1 -0
  342. angr/concretization_strategies/unlimited_range.py +1 -0
  343. angr/distributed/__init__.py +1 -0
  344. angr/distributed/server.py +2 -2
  345. angr/distributed/worker.py +3 -3
  346. angr/engines/__init__.py +1 -0
  347. angr/engines/concrete.py +2 -1
  348. angr/engines/engine.py +4 -6
  349. angr/engines/failure.py +2 -1
  350. angr/engines/hook.py +1 -0
  351. angr/engines/light/__init__.py +1 -0
  352. angr/engines/light/data.py +221 -255
  353. angr/engines/light/engine.py +72 -85
  354. angr/engines/pcode/__init__.py +1 -0
  355. angr/engines/pcode/behavior.py +3 -3
  356. angr/engines/pcode/cc.py +1 -0
  357. angr/engines/pcode/emulate.py +13 -16
  358. angr/engines/pcode/engine.py +7 -5
  359. angr/engines/pcode/lifter.py +62 -79
  360. angr/engines/procedure.py +1 -0
  361. angr/engines/soot/__init__.py +1 -0
  362. angr/engines/soot/engine.py +46 -52
  363. angr/engines/soot/exceptions.py +3 -0
  364. angr/engines/soot/expressions/__init__.py +1 -0
  365. angr/engines/soot/expressions/arrayref.py +1 -0
  366. angr/engines/soot/expressions/base.py +4 -5
  367. angr/engines/soot/expressions/binop.py +1 -0
  368. angr/engines/soot/expressions/cast.py +1 -0
  369. angr/engines/soot/expressions/condition.py +2 -1
  370. angr/engines/soot/expressions/constants.py +1 -0
  371. angr/engines/soot/expressions/instanceOf.py +1 -0
  372. angr/engines/soot/expressions/instancefieldref.py +1 -0
  373. angr/engines/soot/expressions/invoke.py +7 -9
  374. angr/engines/soot/expressions/length.py +1 -0
  375. angr/engines/soot/expressions/local.py +1 -0
  376. angr/engines/soot/expressions/new.py +1 -0
  377. angr/engines/soot/expressions/newArray.py +1 -0
  378. angr/engines/soot/expressions/newMultiArray.py +3 -3
  379. angr/engines/soot/expressions/paramref.py +1 -0
  380. angr/engines/soot/expressions/phi.py +1 -0
  381. angr/engines/soot/expressions/staticfieldref.py +1 -0
  382. angr/engines/soot/expressions/thisref.py +1 -0
  383. angr/engines/soot/expressions/unsupported.py +1 -0
  384. angr/engines/soot/field_dispatcher.py +5 -8
  385. angr/engines/soot/method_dispatcher.py +4 -7
  386. angr/engines/soot/statements/__init__.py +4 -4
  387. angr/engines/soot/statements/assign.py +1 -0
  388. angr/engines/soot/statements/base.py +6 -7
  389. angr/engines/soot/statements/goto.py +2 -1
  390. angr/engines/soot/statements/identity.py +1 -0
  391. angr/engines/soot/statements/if_.py +2 -1
  392. angr/engines/soot/statements/invoke.py +1 -0
  393. angr/engines/soot/statements/return_.py +1 -0
  394. angr/engines/soot/statements/switch.py +1 -0
  395. angr/engines/soot/statements/throw.py +2 -1
  396. angr/engines/soot/values/__init__.py +4 -2
  397. angr/engines/soot/values/arrayref.py +8 -10
  398. angr/engines/soot/values/base.py +4 -1
  399. angr/engines/soot/values/constants.py +1 -0
  400. angr/engines/soot/values/instancefieldref.py +1 -0
  401. angr/engines/soot/values/local.py +1 -0
  402. angr/engines/soot/values/paramref.py +1 -0
  403. angr/engines/soot/values/staticfieldref.py +1 -0
  404. angr/engines/soot/values/strref.py +3 -2
  405. angr/engines/soot/values/thisref.py +1 -0
  406. angr/engines/successors.py +21 -24
  407. angr/engines/syscall.py +9 -9
  408. angr/engines/unicorn.py +14 -9
  409. angr/engines/vex/__init__.py +1 -0
  410. angr/engines/vex/claripy/__init__.py +1 -0
  411. angr/engines/vex/claripy/ccall.py +86 -112
  412. angr/engines/vex/claripy/datalayer.py +12 -16
  413. angr/engines/vex/claripy/irop.py +85 -104
  414. angr/engines/vex/heavy/__init__.py +1 -0
  415. angr/engines/vex/heavy/actions.py +1 -0
  416. angr/engines/vex/heavy/concretizers.py +8 -9
  417. angr/engines/vex/heavy/dirty.py +6 -5
  418. angr/engines/vex/heavy/heavy.py +15 -14
  419. angr/engines/vex/heavy/inspect.py +1 -0
  420. angr/engines/vex/heavy/resilience.py +2 -2
  421. angr/engines/vex/heavy/super_fastpath.py +2 -2
  422. angr/engines/vex/lifter.py +28 -35
  423. angr/engines/vex/light/__init__.py +1 -0
  424. angr/engines/vex/light/light.py +2 -4
  425. angr/engines/vex/light/resilience.py +1 -0
  426. angr/engines/vex/light/slicing.py +1 -0
  427. angr/errors.py +6 -1
  428. angr/exploration_techniques/__init__.py +3 -2
  429. angr/exploration_techniques/bucketizer.py +2 -3
  430. angr/exploration_techniques/common.py +3 -3
  431. angr/exploration_techniques/dfs.py +1 -0
  432. angr/exploration_techniques/director.py +17 -19
  433. angr/exploration_techniques/driller_core.py +3 -7
  434. angr/exploration_techniques/explorer.py +7 -3
  435. angr/exploration_techniques/lengthlimiter.py +1 -0
  436. angr/exploration_techniques/local_loop_seer.py +2 -2
  437. angr/exploration_techniques/loop_seer.py +11 -14
  438. angr/exploration_techniques/manual_mergepoint.py +3 -2
  439. angr/exploration_techniques/memory_watcher.py +1 -0
  440. angr/exploration_techniques/oppologist.py +4 -4
  441. angr/exploration_techniques/slicecutor.py +1 -0
  442. angr/exploration_techniques/spiller.py +8 -8
  443. angr/exploration_techniques/spiller_db.py +1 -0
  444. angr/exploration_techniques/stochastic.py +3 -4
  445. angr/exploration_techniques/stub_stasher.py +1 -0
  446. angr/exploration_techniques/suggestions.py +5 -4
  447. angr/exploration_techniques/symbion.py +1 -0
  448. angr/exploration_techniques/tech_builder.py +1 -0
  449. angr/exploration_techniques/threading.py +1 -0
  450. angr/exploration_techniques/timeout.py +1 -0
  451. angr/exploration_techniques/tracer.py +34 -39
  452. angr/exploration_techniques/unique.py +1 -0
  453. angr/exploration_techniques/veritesting.py +1 -0
  454. angr/factory.py +9 -9
  455. angr/flirt/__init__.py +1 -0
  456. angr/flirt/build_sig.py +8 -12
  457. angr/keyed_region.py +10 -17
  458. angr/knowledge_base/__init__.py +1 -0
  459. angr/knowledge_base/knowledge_base.py +17 -17
  460. angr/knowledge_plugins/__init__.py +1 -0
  461. angr/knowledge_plugins/callsite_prototypes.py +1 -0
  462. angr/knowledge_plugins/cfg/__init__.py +2 -0
  463. angr/knowledge_plugins/cfg/cfg_manager.py +2 -1
  464. angr/knowledge_plugins/cfg/cfg_model.py +27 -43
  465. angr/knowledge_plugins/cfg/cfg_node.py +8 -19
  466. angr/knowledge_plugins/cfg/indirect_jump.py +3 -5
  467. angr/knowledge_plugins/cfg/memory_data.py +4 -3
  468. angr/knowledge_plugins/comments.py +1 -0
  469. angr/knowledge_plugins/custom_strings.py +1 -0
  470. angr/knowledge_plugins/data.py +1 -0
  471. angr/knowledge_plugins/debug_variables.py +18 -23
  472. angr/knowledge_plugins/functions/__init__.py +1 -0
  473. angr/knowledge_plugins/functions/function.py +49 -53
  474. angr/knowledge_plugins/functions/function_manager.py +14 -14
  475. angr/knowledge_plugins/functions/function_parser.py +38 -42
  476. angr/knowledge_plugins/functions/soot_function.py +5 -6
  477. angr/knowledge_plugins/indirect_jumps.py +1 -0
  478. angr/knowledge_plugins/key_definitions/__init__.py +1 -0
  479. angr/knowledge_plugins/key_definitions/atoms.py +65 -17
  480. angr/knowledge_plugins/key_definitions/constants.py +6 -0
  481. angr/knowledge_plugins/key_definitions/definition.py +22 -25
  482. angr/knowledge_plugins/key_definitions/environment.py +18 -14
  483. angr/knowledge_plugins/key_definitions/heap_address.py +4 -3
  484. angr/knowledge_plugins/key_definitions/key_definition_manager.py +5 -4
  485. angr/knowledge_plugins/key_definitions/live_definitions.py +36 -45
  486. angr/knowledge_plugins/key_definitions/liveness.py +18 -23
  487. angr/knowledge_plugins/key_definitions/rd_model.py +29 -34
  488. angr/knowledge_plugins/key_definitions/tag.py +7 -6
  489. angr/knowledge_plugins/key_definitions/undefined.py +3 -0
  490. angr/knowledge_plugins/key_definitions/unknown_size.py +3 -0
  491. angr/knowledge_plugins/key_definitions/uses.py +21 -23
  492. angr/knowledge_plugins/labels.py +3 -2
  493. angr/knowledge_plugins/patches.py +2 -1
  494. angr/knowledge_plugins/plugin.py +2 -1
  495. angr/knowledge_plugins/propagations/__init__.py +1 -0
  496. angr/knowledge_plugins/propagations/prop_value.py +25 -27
  497. angr/knowledge_plugins/propagations/propagation_manager.py +2 -2
  498. angr/knowledge_plugins/propagations/propagation_model.py +5 -4
  499. angr/knowledge_plugins/propagations/states.py +71 -81
  500. angr/knowledge_plugins/structured_code/__init__.py +1 -0
  501. angr/knowledge_plugins/structured_code/manager.py +5 -4
  502. angr/knowledge_plugins/sync/__init__.py +1 -0
  503. angr/knowledge_plugins/sync/sync_controller.py +10 -15
  504. angr/knowledge_plugins/types.py +1 -0
  505. angr/knowledge_plugins/variables/__init__.py +1 -0
  506. angr/knowledge_plugins/variables/variable_access.py +9 -10
  507. angr/knowledge_plugins/variables/variable_manager.py +84 -55
  508. angr/knowledge_plugins/xrefs/__init__.py +1 -0
  509. angr/knowledge_plugins/xrefs/xref.py +7 -11
  510. angr/knowledge_plugins/xrefs/xref_manager.py +1 -0
  511. angr/knowledge_plugins/xrefs/xref_types.py +3 -0
  512. angr/lib/angr_native.dylib +0 -0
  513. angr/misc/__init__.py +1 -0
  514. angr/misc/ansi.py +1 -0
  515. angr/misc/autoimport.py +3 -2
  516. angr/misc/bug_report.py +6 -5
  517. angr/misc/hookset.py +3 -2
  518. angr/misc/loggers.py +2 -2
  519. angr/misc/picklable_lock.py +1 -0
  520. angr/misc/plugins.py +11 -13
  521. angr/misc/range.py +3 -0
  522. angr/misc/telemetry.py +54 -0
  523. angr/misc/testing.py +2 -1
  524. angr/misc/ux.py +5 -5
  525. angr/misc/weakpatch.py +1 -0
  526. angr/procedures/__init__.py +1 -0
  527. angr/procedures/cgc/_terminate.py +1 -0
  528. angr/procedures/cgc/allocate.py +1 -0
  529. angr/procedures/cgc/deallocate.py +1 -0
  530. angr/procedures/cgc/fdwait.py +1 -0
  531. angr/procedures/cgc/random.py +1 -0
  532. angr/procedures/cgc/receive.py +26 -26
  533. angr/procedures/cgc/transmit.py +1 -0
  534. angr/procedures/definitions/__init__.py +9 -10
  535. angr/procedures/definitions/cgc.py +1 -0
  536. angr/procedures/definitions/glibc.py +1 -0
  537. angr/procedures/definitions/gnulib.py +1 -0
  538. angr/procedures/definitions/libstdcpp.py +1 -0
  539. angr/procedures/definitions/linux_kernel.py +1 -0
  540. angr/procedures/definitions/linux_loader.py +1 -0
  541. angr/procedures/definitions/msvcr.py +1 -0
  542. angr/procedures/definitions/parse_syscalls_from_local_system.py +2 -1
  543. angr/procedures/definitions/parse_win32json.py +27 -30
  544. angr/procedures/definitions/types_win32.py +1 -0
  545. angr/procedures/definitions/wdk_api-ms-win-dx-d3dkmt-l1-1-4.py +1 -0
  546. angr/procedures/definitions/wdk_api-ms-win-dx-d3dkmt-l1-1-6.py +1 -0
  547. angr/procedures/definitions/wdk_clfs.py +1 -0
  548. angr/procedures/definitions/wdk_fltmgr.py +1 -0
  549. angr/procedures/definitions/wdk_fwpkclnt.py +1 -0
  550. angr/procedures/definitions/wdk_fwpuclnt.py +1 -0
  551. angr/procedures/definitions/wdk_gdi32.py +1 -0
  552. angr/procedures/definitions/wdk_hal.py +1 -0
  553. angr/procedures/definitions/wdk_ksecdd.py +1 -0
  554. angr/procedures/definitions/wdk_ndis.py +1 -0
  555. angr/procedures/definitions/wdk_ntoskrnl.py +1 -0
  556. angr/procedures/definitions/wdk_offreg.py +1 -0
  557. angr/procedures/definitions/wdk_pshed.py +1 -0
  558. angr/procedures/definitions/wdk_secur32.py +1 -0
  559. angr/procedures/definitions/wdk_vhfum.py +1 -0
  560. angr/procedures/definitions/win32_aclui.py +1 -0
  561. angr/procedures/definitions/win32_activeds.py +1 -0
  562. angr/procedures/definitions/win32_advapi32.py +1 -0
  563. angr/procedures/definitions/win32_advpack.py +1 -0
  564. angr/procedures/definitions/win32_amsi.py +1 -0
  565. angr/procedures/definitions/win32_api-ms-win-appmodel-runtime-l1-1-1.py +1 -0
  566. angr/procedures/definitions/win32_api-ms-win-appmodel-runtime-l1-1-3.py +1 -0
  567. angr/procedures/definitions/win32_api-ms-win-appmodel-runtime-l1-1-6.py +1 -0
  568. angr/procedures/definitions/win32_api-ms-win-core-apiquery-l2-1-0.py +1 -0
  569. angr/procedures/definitions/win32_api-ms-win-core-backgroundtask-l1-1-0.py +1 -0
  570. angr/procedures/definitions/win32_api-ms-win-core-comm-l1-1-1.py +1 -0
  571. angr/procedures/definitions/win32_api-ms-win-core-comm-l1-1-2.py +1 -0
  572. angr/procedures/definitions/win32_api-ms-win-core-enclave-l1-1-1.py +1 -0
  573. angr/procedures/definitions/win32_api-ms-win-core-errorhandling-l1-1-3.py +1 -0
  574. angr/procedures/definitions/win32_api-ms-win-core-featurestaging-l1-1-0.py +1 -0
  575. angr/procedures/definitions/win32_api-ms-win-core-featurestaging-l1-1-1.py +1 -0
  576. angr/procedures/definitions/win32_api-ms-win-core-file-fromapp-l1-1-0.py +1 -0
  577. angr/procedures/definitions/win32_api-ms-win-core-handle-l1-1-0.py +1 -0
  578. angr/procedures/definitions/win32_api-ms-win-core-ioring-l1-1-0.py +1 -0
  579. angr/procedures/definitions/win32_api-ms-win-core-marshal-l1-1-0.py +1 -0
  580. angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-3.py +1 -0
  581. angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-4.py +1 -0
  582. angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-5.py +1 -0
  583. angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-6.py +1 -0
  584. angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-7.py +1 -0
  585. angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-8.py +1 -0
  586. angr/procedures/definitions/win32_api-ms-win-core-path-l1-1-0.py +1 -0
  587. angr/procedures/definitions/win32_api-ms-win-core-psm-appnotify-l1-1-0.py +1 -0
  588. angr/procedures/definitions/win32_api-ms-win-core-psm-appnotify-l1-1-1.py +1 -0
  589. angr/procedures/definitions/win32_api-ms-win-core-realtime-l1-1-1.py +1 -0
  590. angr/procedures/definitions/win32_api-ms-win-core-realtime-l1-1-2.py +1 -0
  591. angr/procedures/definitions/win32_api-ms-win-core-slapi-l1-1-0.py +1 -0
  592. angr/procedures/definitions/win32_api-ms-win-core-state-helpers-l1-1-0.py +1 -0
  593. angr/procedures/definitions/win32_api-ms-win-core-synch-l1-2-0.py +1 -0
  594. angr/procedures/definitions/win32_api-ms-win-core-sysinfo-l1-2-0.py +1 -0
  595. angr/procedures/definitions/win32_api-ms-win-core-sysinfo-l1-2-3.py +1 -0
  596. angr/procedures/definitions/win32_api-ms-win-core-sysinfo-l1-2-4.py +1 -0
  597. angr/procedures/definitions/win32_api-ms-win-core-sysinfo-l1-2-6.py +1 -0
  598. angr/procedures/definitions/win32_api-ms-win-core-util-l1-1-1.py +1 -0
  599. angr/procedures/definitions/win32_api-ms-win-core-winrt-error-l1-1-0.py +1 -0
  600. angr/procedures/definitions/win32_api-ms-win-core-winrt-error-l1-1-1.py +1 -0
  601. angr/procedures/definitions/win32_api-ms-win-core-winrt-l1-1-0.py +1 -0
  602. angr/procedures/definitions/win32_api-ms-win-core-winrt-registration-l1-1-0.py +1 -0
  603. angr/procedures/definitions/win32_api-ms-win-core-winrt-robuffer-l1-1-0.py +1 -0
  604. angr/procedures/definitions/win32_api-ms-win-core-winrt-roparameterizediid-l1-1-0.py +1 -0
  605. angr/procedures/definitions/win32_api-ms-win-core-winrt-string-l1-1-0.py +1 -0
  606. angr/procedures/definitions/win32_api-ms-win-core-winrt-string-l1-1-1.py +1 -0
  607. angr/procedures/definitions/win32_api-ms-win-core-wow64-l1-1-1.py +1 -0
  608. angr/procedures/definitions/win32_api-ms-win-devices-query-l1-1-0.py +1 -0
  609. angr/procedures/definitions/win32_api-ms-win-devices-query-l1-1-1.py +1 -0
  610. angr/procedures/definitions/win32_api-ms-win-dx-d3dkmt-l1-1-0.py +1 -0
  611. angr/procedures/definitions/win32_api-ms-win-gaming-deviceinformation-l1-1-0.py +1 -0
  612. angr/procedures/definitions/win32_api-ms-win-gaming-expandedresources-l1-1-0.py +1 -0
  613. angr/procedures/definitions/win32_api-ms-win-gaming-tcui-l1-1-0.py +1 -0
  614. angr/procedures/definitions/win32_api-ms-win-gaming-tcui-l1-1-1.py +1 -0
  615. angr/procedures/definitions/win32_api-ms-win-gaming-tcui-l1-1-2.py +1 -0
  616. angr/procedures/definitions/win32_api-ms-win-gaming-tcui-l1-1-3.py +1 -0
  617. angr/procedures/definitions/win32_api-ms-win-gaming-tcui-l1-1-4.py +1 -0
  618. angr/procedures/definitions/win32_api-ms-win-mm-misc-l1-1-1.py +1 -0
  619. angr/procedures/definitions/win32_api-ms-win-net-isolation-l1-1-0.py +1 -0
  620. angr/procedures/definitions/win32_api-ms-win-security-base-l1-2-2.py +1 -0
  621. angr/procedures/definitions/win32_api-ms-win-security-isolatedcontainer-l1-1-0.py +1 -0
  622. angr/procedures/definitions/win32_api-ms-win-security-isolatedcontainer-l1-1-1.py +1 -0
  623. angr/procedures/definitions/win32_api-ms-win-service-core-l1-1-3.py +1 -0
  624. angr/procedures/definitions/win32_api-ms-win-service-core-l1-1-4.py +1 -0
  625. angr/procedures/definitions/win32_api-ms-win-service-core-l1-1-5.py +1 -0
  626. angr/procedures/definitions/win32_api-ms-win-shcore-scaling-l1-1-0.py +1 -0
  627. angr/procedures/definitions/win32_api-ms-win-shcore-scaling-l1-1-1.py +1 -0
  628. angr/procedures/definitions/win32_api-ms-win-shcore-scaling-l1-1-2.py +1 -0
  629. angr/procedures/definitions/win32_api-ms-win-shcore-stream-winrt-l1-1-0.py +1 -0
  630. angr/procedures/definitions/win32_api-ms-win-wsl-api-l1-1-0.py +1 -0
  631. angr/procedures/definitions/win32_apphelp.py +1 -0
  632. angr/procedures/definitions/win32_authz.py +1 -0
  633. angr/procedures/definitions/win32_avicap32.py +1 -0
  634. angr/procedures/definitions/win32_avifil32.py +1 -0
  635. angr/procedures/definitions/win32_avrt.py +1 -0
  636. angr/procedures/definitions/win32_bcp47mrm.py +1 -0
  637. angr/procedures/definitions/win32_bcrypt.py +1 -0
  638. angr/procedures/definitions/win32_bcryptprimitives.py +1 -0
  639. angr/procedures/definitions/win32_bluetoothapis.py +1 -0
  640. angr/procedures/definitions/win32_bthprops.py +1 -0
  641. angr/procedures/definitions/win32_bthprops_cpl.py +1 -0
  642. angr/procedures/definitions/win32_cabinet.py +1 -0
  643. angr/procedures/definitions/win32_certadm.py +1 -0
  644. angr/procedures/definitions/win32_certpoleng.py +1 -0
  645. angr/procedures/definitions/win32_cfgmgr32.py +1 -0
  646. angr/procedures/definitions/win32_chakra.py +1 -0
  647. angr/procedures/definitions/win32_cldapi.py +1 -0
  648. angr/procedures/definitions/win32_clfsw32.py +1 -0
  649. angr/procedures/definitions/win32_clusapi.py +1 -0
  650. angr/procedures/definitions/win32_comctl32.py +1 -0
  651. angr/procedures/definitions/win32_comdlg32.py +1 -0
  652. angr/procedures/definitions/win32_compstui.py +1 -0
  653. angr/procedures/definitions/win32_computecore.py +1 -0
  654. angr/procedures/definitions/win32_computenetwork.py +1 -0
  655. angr/procedures/definitions/win32_computestorage.py +1 -0
  656. angr/procedures/definitions/win32_comsvcs.py +1 -0
  657. angr/procedures/definitions/win32_coremessaging.py +1 -0
  658. angr/procedures/definitions/win32_credui.py +1 -0
  659. angr/procedures/definitions/win32_crypt32.py +1 -0
  660. angr/procedures/definitions/win32_cryptnet.py +1 -0
  661. angr/procedures/definitions/win32_cryptui.py +1 -0
  662. angr/procedures/definitions/win32_cryptxml.py +1 -0
  663. angr/procedures/definitions/win32_cscapi.py +1 -0
  664. angr/procedures/definitions/win32_d2d1.py +1 -0
  665. angr/procedures/definitions/win32_d3d10.py +1 -0
  666. angr/procedures/definitions/win32_d3d10_1.py +1 -0
  667. angr/procedures/definitions/win32_d3d11.py +1 -0
  668. angr/procedures/definitions/win32_d3d12.py +1 -0
  669. angr/procedures/definitions/win32_d3d9.py +1 -0
  670. angr/procedures/definitions/win32_d3dcompiler_47.py +1 -0
  671. angr/procedures/definitions/win32_d3dcsx.py +1 -0
  672. angr/procedures/definitions/win32_davclnt.py +1 -0
  673. angr/procedures/definitions/win32_dbgeng.py +1 -0
  674. angr/procedures/definitions/win32_dbghelp.py +1 -0
  675. angr/procedures/definitions/win32_dbgmodel.py +1 -0
  676. angr/procedures/definitions/win32_dciman32.py +1 -0
  677. angr/procedures/definitions/win32_dcomp.py +1 -0
  678. angr/procedures/definitions/win32_ddraw.py +1 -0
  679. angr/procedures/definitions/win32_deviceaccess.py +1 -0
  680. angr/procedures/definitions/win32_dflayout.py +1 -0
  681. angr/procedures/definitions/win32_dhcpcsvc.py +1 -0
  682. angr/procedures/definitions/win32_dhcpcsvc6.py +1 -0
  683. angr/procedures/definitions/win32_dhcpsapi.py +1 -0
  684. angr/procedures/definitions/win32_diagnosticdataquery.py +1 -0
  685. angr/procedures/definitions/win32_dinput8.py +1 -0
  686. angr/procedures/definitions/win32_directml.py +1 -0
  687. angr/procedures/definitions/win32_dmprocessxmlfiltered.py +1 -0
  688. angr/procedures/definitions/win32_dnsapi.py +1 -0
  689. angr/procedures/definitions/win32_drt.py +1 -0
  690. angr/procedures/definitions/win32_drtprov.py +1 -0
  691. angr/procedures/definitions/win32_drttransport.py +1 -0
  692. angr/procedures/definitions/win32_dsound.py +1 -0
  693. angr/procedures/definitions/win32_dsparse.py +1 -0
  694. angr/procedures/definitions/win32_dsprop.py +1 -0
  695. angr/procedures/definitions/win32_dssec.py +1 -0
  696. angr/procedures/definitions/win32_dsuiext.py +1 -0
  697. angr/procedures/definitions/win32_dwmapi.py +1 -0
  698. angr/procedures/definitions/win32_dwrite.py +1 -0
  699. angr/procedures/definitions/win32_dxcompiler.py +1 -0
  700. angr/procedures/definitions/win32_dxcore.py +1 -0
  701. angr/procedures/definitions/win32_dxgi.py +1 -0
  702. angr/procedures/definitions/win32_dxva2.py +1 -0
  703. angr/procedures/definitions/win32_eappcfg.py +1 -0
  704. angr/procedures/definitions/win32_eappprxy.py +1 -0
  705. angr/procedures/definitions/win32_efswrt.py +1 -0
  706. angr/procedures/definitions/win32_elscore.py +1 -0
  707. angr/procedures/definitions/win32_esent.py +1 -0
  708. angr/procedures/definitions/win32_evr.py +1 -0
  709. angr/procedures/definitions/win32_faultrep.py +1 -0
  710. angr/procedures/definitions/win32_fhsvcctl.py +1 -0
  711. angr/procedures/definitions/win32_firewallapi.py +1 -0
  712. angr/procedures/definitions/win32_fltlib.py +1 -0
  713. angr/procedures/definitions/win32_fontsub.py +1 -0
  714. angr/procedures/definitions/win32_forceinline.py +1 -0
  715. angr/procedures/definitions/win32_fwpuclnt.py +1 -0
  716. angr/procedures/definitions/win32_fxsutility.py +1 -0
  717. angr/procedures/definitions/win32_gdi32.py +1 -0
  718. angr/procedures/definitions/win32_gdiplus.py +1 -0
  719. angr/procedures/definitions/win32_glu32.py +1 -0
  720. angr/procedures/definitions/win32_gpedit.py +1 -0
  721. angr/procedures/definitions/win32_hhctrl_ocx.py +1 -0
  722. angr/procedures/definitions/win32_hid.py +1 -0
  723. angr/procedures/definitions/win32_hlink.py +1 -0
  724. angr/procedures/definitions/win32_hrtfapo.py +1 -0
  725. angr/procedures/definitions/win32_httpapi.py +1 -0
  726. angr/procedures/definitions/win32_icm32.py +1 -0
  727. angr/procedures/definitions/win32_icmui.py +1 -0
  728. angr/procedures/definitions/win32_icu.py +1 -0
  729. angr/procedures/definitions/win32_ieframe.py +1 -0
  730. angr/procedures/definitions/win32_imagehlp.py +1 -0
  731. angr/procedures/definitions/win32_imgutil.py +1 -0
  732. angr/procedures/definitions/win32_imm32.py +1 -0
  733. angr/procedures/definitions/win32_infocardapi.py +1 -0
  734. angr/procedures/definitions/win32_inkobjcore.py +1 -0
  735. angr/procedures/definitions/win32_iphlpapi.py +1 -0
  736. angr/procedures/definitions/win32_iscsidsc.py +1 -0
  737. angr/procedures/definitions/win32_isolatedwindowsenvironmentutils.py +1 -0
  738. angr/procedures/definitions/win32_kernel32.py +1 -0
  739. angr/procedures/definitions/win32_kernelbase.py +1 -0
  740. angr/procedures/definitions/win32_keycredmgr.py +1 -0
  741. angr/procedures/definitions/win32_ksproxy_ax.py +1 -0
  742. angr/procedures/definitions/win32_ksuser.py +1 -0
  743. angr/procedures/definitions/win32_ktmw32.py +1 -0
  744. angr/procedures/definitions/win32_licenseprotection.py +1 -0
  745. angr/procedures/definitions/win32_loadperf.py +1 -0
  746. angr/procedures/definitions/win32_magnification.py +1 -0
  747. angr/procedures/definitions/win32_mapi32.py +1 -0
  748. angr/procedures/definitions/win32_mdmlocalmanagement.py +1 -0
  749. angr/procedures/definitions/win32_mdmregistration.py +1 -0
  750. angr/procedures/definitions/win32_mf.py +1 -0
  751. angr/procedures/definitions/win32_mfcore.py +1 -0
  752. angr/procedures/definitions/win32_mfplat.py +1 -0
  753. angr/procedures/definitions/win32_mfplay.py +1 -0
  754. angr/procedures/definitions/win32_mfreadwrite.py +1 -0
  755. angr/procedures/definitions/win32_mfsensorgroup.py +1 -0
  756. angr/procedures/definitions/win32_mfsrcsnk.py +1 -0
  757. angr/procedures/definitions/win32_mgmtapi.py +1 -0
  758. angr/procedures/definitions/win32_mi.py +1 -0
  759. angr/procedures/definitions/win32_mmdevapi.py +1 -0
  760. angr/procedures/definitions/win32_mpr.py +1 -0
  761. angr/procedures/definitions/win32_mprapi.py +1 -0
  762. angr/procedures/definitions/win32_mqrt.py +1 -0
  763. angr/procedures/definitions/win32_mrmsupport.py +1 -0
  764. angr/procedures/definitions/win32_msacm32.py +1 -0
  765. angr/procedures/definitions/win32_msajapi.py +1 -0
  766. angr/procedures/definitions/win32_mscms.py +1 -0
  767. angr/procedures/definitions/win32_mscoree.py +1 -0
  768. angr/procedures/definitions/win32_msctfmonitor.py +1 -0
  769. angr/procedures/definitions/win32_msdelta.py +1 -0
  770. angr/procedures/definitions/win32_msdmo.py +1 -0
  771. angr/procedures/definitions/win32_msdrm.py +1 -0
  772. angr/procedures/definitions/win32_msi.py +1 -0
  773. angr/procedures/definitions/win32_msimg32.py +1 -0
  774. angr/procedures/definitions/win32_mspatcha.py +1 -0
  775. angr/procedures/definitions/win32_mspatchc.py +1 -0
  776. angr/procedures/definitions/win32_msports.py +1 -0
  777. angr/procedures/definitions/win32_msrating.py +1 -0
  778. angr/procedures/definitions/win32_mssign32.py +1 -0
  779. angr/procedures/definitions/win32_mstask.py +1 -0
  780. angr/procedures/definitions/win32_msvfw32.py +1 -0
  781. angr/procedures/definitions/win32_mswsock.py +1 -0
  782. angr/procedures/definitions/win32_mtxdm.py +1 -0
  783. angr/procedures/definitions/win32_ncrypt.py +1 -0
  784. angr/procedures/definitions/win32_ndfapi.py +1 -0
  785. angr/procedures/definitions/win32_netapi32.py +1 -0
  786. angr/procedures/definitions/win32_netsh.py +1 -0
  787. angr/procedures/definitions/win32_netshell.py +1 -0
  788. angr/procedures/definitions/win32_newdev.py +1 -0
  789. angr/procedures/definitions/win32_ninput.py +1 -0
  790. angr/procedures/definitions/win32_normaliz.py +1 -0
  791. angr/procedures/definitions/win32_ntdll.py +1 -0
  792. angr/procedures/definitions/win32_ntdllk.py +1 -0
  793. angr/procedures/definitions/win32_ntdsapi.py +1 -0
  794. angr/procedures/definitions/win32_ntlanman.py +1 -0
  795. angr/procedures/definitions/win32_odbc32.py +1 -0
  796. angr/procedures/definitions/win32_odbcbcp.py +1 -0
  797. angr/procedures/definitions/win32_ole32.py +1 -0
  798. angr/procedures/definitions/win32_oleacc.py +1 -0
  799. angr/procedures/definitions/win32_oleaut32.py +1 -0
  800. angr/procedures/definitions/win32_oledlg.py +1 -0
  801. angr/procedures/definitions/win32_ondemandconnroutehelper.py +1 -0
  802. angr/procedures/definitions/win32_opengl32.py +1 -0
  803. angr/procedures/definitions/win32_opmxbox.py +1 -0
  804. angr/procedures/definitions/win32_p2p.py +1 -0
  805. angr/procedures/definitions/win32_p2pgraph.py +1 -0
  806. angr/procedures/definitions/win32_pdh.py +1 -0
  807. angr/procedures/definitions/win32_peerdist.py +1 -0
  808. angr/procedures/definitions/win32_powrprof.py +1 -0
  809. angr/procedures/definitions/win32_prntvpt.py +1 -0
  810. angr/procedures/definitions/win32_projectedfslib.py +1 -0
  811. angr/procedures/definitions/win32_propsys.py +1 -0
  812. angr/procedures/definitions/win32_psapi.py +1 -0
  813. angr/procedures/definitions/win32_quartz.py +1 -0
  814. angr/procedures/definitions/win32_query.py +1 -0
  815. angr/procedures/definitions/win32_qwave.py +1 -0
  816. angr/procedures/definitions/win32_rasapi32.py +1 -0
  817. angr/procedures/definitions/win32_rasdlg.py +1 -0
  818. angr/procedures/definitions/win32_resutils.py +1 -0
  819. angr/procedures/definitions/win32_rometadata.py +1 -0
  820. angr/procedures/definitions/win32_rpcns4.py +1 -0
  821. angr/procedures/definitions/win32_rpcproxy.py +1 -0
  822. angr/procedures/definitions/win32_rpcrt4.py +1 -0
  823. angr/procedures/definitions/win32_rstrtmgr.py +1 -0
  824. angr/procedures/definitions/win32_rtm.py +1 -0
  825. angr/procedures/definitions/win32_rtutils.py +1 -0
  826. angr/procedures/definitions/win32_rtworkq.py +1 -0
  827. angr/procedures/definitions/win32_sas.py +1 -0
  828. angr/procedures/definitions/win32_scarddlg.py +1 -0
  829. angr/procedures/definitions/win32_schannel.py +1 -0
  830. angr/procedures/definitions/win32_sechost.py +1 -0
  831. angr/procedures/definitions/win32_secur32.py +1 -0
  832. angr/procedures/definitions/win32_sensapi.py +1 -0
  833. angr/procedures/definitions/win32_sensorsutilsv2.py +1 -0
  834. angr/procedures/definitions/win32_setupapi.py +1 -0
  835. angr/procedures/definitions/win32_sfc.py +1 -0
  836. angr/procedures/definitions/win32_shdocvw.py +1 -0
  837. angr/procedures/definitions/win32_shell32.py +1 -0
  838. angr/procedures/definitions/win32_shlwapi.py +1 -0
  839. angr/procedures/definitions/win32_slc.py +1 -0
  840. angr/procedures/definitions/win32_slcext.py +1 -0
  841. angr/procedures/definitions/win32_slwga.py +1 -0
  842. angr/procedures/definitions/win32_snmpapi.py +1 -0
  843. angr/procedures/definitions/win32_spoolss.py +1 -0
  844. angr/procedures/definitions/win32_srclient.py +1 -0
  845. angr/procedures/definitions/win32_srpapi.py +1 -0
  846. angr/procedures/definitions/win32_sspicli.py +1 -0
  847. angr/procedures/definitions/win32_sti.py +1 -0
  848. angr/procedures/definitions/win32_t2embed.py +1 -0
  849. angr/procedures/definitions/win32_tapi32.py +1 -0
  850. angr/procedures/definitions/win32_tbs.py +1 -0
  851. angr/procedures/definitions/win32_tdh.py +1 -0
  852. angr/procedures/definitions/win32_tokenbinding.py +1 -0
  853. angr/procedures/definitions/win32_traffic.py +1 -0
  854. angr/procedures/definitions/win32_txfw32.py +1 -0
  855. angr/procedures/definitions/win32_ualapi.py +1 -0
  856. angr/procedures/definitions/win32_uiautomationcore.py +1 -0
  857. angr/procedures/definitions/win32_urlmon.py +1 -0
  858. angr/procedures/definitions/win32_user32.py +1 -0
  859. angr/procedures/definitions/win32_userenv.py +1 -0
  860. angr/procedures/definitions/win32_usp10.py +1 -0
  861. angr/procedures/definitions/win32_uxtheme.py +1 -0
  862. angr/procedures/definitions/win32_verifier.py +1 -0
  863. angr/procedures/definitions/win32_version.py +1 -0
  864. angr/procedures/definitions/win32_vertdll.py +1 -0
  865. angr/procedures/definitions/win32_virtdisk.py +1 -0
  866. angr/procedures/definitions/win32_vmdevicehost.py +1 -0
  867. angr/procedures/definitions/win32_vmsavedstatedumpprovider.py +1 -0
  868. angr/procedures/definitions/win32_vssapi.py +1 -0
  869. angr/procedures/definitions/win32_wcmapi.py +1 -0
  870. angr/procedures/definitions/win32_wdsbp.py +1 -0
  871. angr/procedures/definitions/win32_wdsclientapi.py +1 -0
  872. angr/procedures/definitions/win32_wdsmc.py +1 -0
  873. angr/procedures/definitions/win32_wdspxe.py +1 -0
  874. angr/procedures/definitions/win32_wdstptc.py +1 -0
  875. angr/procedures/definitions/win32_webauthn.py +1 -0
  876. angr/procedures/definitions/win32_webservices.py +1 -0
  877. angr/procedures/definitions/win32_websocket.py +1 -0
  878. angr/procedures/definitions/win32_wecapi.py +1 -0
  879. angr/procedures/definitions/win32_wer.py +1 -0
  880. angr/procedures/definitions/win32_wevtapi.py +1 -0
  881. angr/procedures/definitions/win32_winbio.py +1 -0
  882. angr/procedures/definitions/win32_windows_ai_machinelearning.py +1 -0
  883. angr/procedures/definitions/win32_windows_data_pdf.py +1 -0
  884. angr/procedures/definitions/win32_windows_media_mediacontrol.py +1 -0
  885. angr/procedures/definitions/win32_windows_networking.py +1 -0
  886. angr/procedures/definitions/win32_windows_ui_xaml.py +1 -0
  887. angr/procedures/definitions/win32_windowscodecs.py +1 -0
  888. angr/procedures/definitions/win32_winfax.py +1 -0
  889. angr/procedures/definitions/win32_winhttp.py +1 -0
  890. angr/procedures/definitions/win32_winhvemulation.py +1 -0
  891. angr/procedures/definitions/win32_winhvplatform.py +1 -0
  892. angr/procedures/definitions/win32_wininet.py +1 -0
  893. angr/procedures/definitions/win32_winml.py +1 -0
  894. angr/procedures/definitions/win32_winmm.py +1 -0
  895. angr/procedures/definitions/win32_winscard.py +1 -0
  896. angr/procedures/definitions/win32_winspool.py +1 -0
  897. angr/procedures/definitions/win32_winspool_drv.py +1 -0
  898. angr/procedures/definitions/win32_wintrust.py +1 -0
  899. angr/procedures/definitions/win32_winusb.py +1 -0
  900. angr/procedures/definitions/win32_wlanapi.py +1 -0
  901. angr/procedures/definitions/win32_wlanui.py +1 -0
  902. angr/procedures/definitions/win32_wldap32.py +1 -0
  903. angr/procedures/definitions/win32_wldp.py +1 -0
  904. angr/procedures/definitions/win32_wmvcore.py +1 -0
  905. angr/procedures/definitions/win32_wnvapi.py +1 -0
  906. angr/procedures/definitions/win32_wofutil.py +1 -0
  907. angr/procedures/definitions/win32_ws2_32.py +1 -0
  908. angr/procedures/definitions/win32_wscapi.py +1 -0
  909. angr/procedures/definitions/win32_wsclient.py +1 -0
  910. angr/procedures/definitions/win32_wsdapi.py +1 -0
  911. angr/procedures/definitions/win32_wsmsvc.py +1 -0
  912. angr/procedures/definitions/win32_wsnmp32.py +1 -0
  913. angr/procedures/definitions/win32_wtsapi32.py +1 -0
  914. angr/procedures/definitions/win32_xaudio2_8.py +1 -0
  915. angr/procedures/definitions/win32_xinput1_4.py +1 -0
  916. angr/procedures/definitions/win32_xinputuap.py +1 -0
  917. angr/procedures/definitions/win32_xmllite.py +1 -0
  918. angr/procedures/definitions/win32_xolehlp.py +1 -0
  919. angr/procedures/definitions/win32_xpsprint.py +1 -0
  920. angr/procedures/glibc/__ctype_b_loc.py +2 -3
  921. angr/procedures/glibc/__ctype_tolower_loc.py +2 -3
  922. angr/procedures/glibc/__ctype_toupper_loc.py +2 -3
  923. angr/procedures/glibc/__errno_location.py +1 -0
  924. angr/procedures/glibc/__libc_init.py +1 -0
  925. angr/procedures/glibc/__libc_start_main.py +2 -3
  926. angr/procedures/glibc/dynamic_loading.py +1 -0
  927. angr/procedures/glibc/scanf.py +1 -0
  928. angr/procedures/glibc/sscanf.py +1 -0
  929. angr/procedures/gnulib/xalloc_die.py +1 -0
  930. angr/procedures/gnulib/xstrtol_fatal.py +1 -0
  931. angr/procedures/java/__init__.py +1 -0
  932. angr/procedures/java/unconstrained.py +4 -3
  933. angr/procedures/java_io/read.py +1 -0
  934. angr/procedures/java_io/write.py +1 -0
  935. angr/procedures/java_jni/__init__.py +25 -18
  936. angr/procedures/java_jni/array_operations.py +1 -0
  937. angr/procedures/java_jni/class_and_interface_operations.py +3 -3
  938. angr/procedures/java_jni/field_access.py +3 -6
  939. angr/procedures/java_jni/global_and_local_refs.py +1 -0
  940. angr/procedures/java_jni/method_calls.py +3 -2
  941. angr/procedures/java_jni/not_implemented.py +2 -1
  942. angr/procedures/java_jni/object_operations.py +3 -4
  943. angr/procedures/java_jni/string_operations.py +2 -1
  944. angr/procedures/java_jni/version_information.py +1 -0
  945. angr/procedures/java_lang/character.py +2 -3
  946. angr/procedures/java_lang/double.py +2 -2
  947. angr/procedures/java_lang/exit.py +1 -0
  948. angr/procedures/java_lang/getsimplename.py +2 -2
  949. angr/procedures/java_lang/integer.py +1 -0
  950. angr/procedures/java_lang/load_library.py +1 -0
  951. angr/procedures/java_lang/math.py +1 -0
  952. angr/procedures/java_lang/string.py +3 -3
  953. angr/procedures/java_lang/stringbuilder.py +1 -0
  954. angr/procedures/java_lang/system.py +1 -0
  955. angr/procedures/java_util/collection.py +1 -0
  956. angr/procedures/java_util/iterator.py +1 -0
  957. angr/procedures/java_util/list.py +1 -0
  958. angr/procedures/java_util/map.py +3 -4
  959. angr/procedures/java_util/random.py +1 -0
  960. angr/procedures/java_util/scanner_nextline.py +2 -1
  961. angr/procedures/libc/abort.py +1 -0
  962. angr/procedures/libc/access.py +1 -0
  963. angr/procedures/libc/atoi.py +2 -2
  964. angr/procedures/libc/atol.py +1 -0
  965. angr/procedures/libc/calloc.py +1 -0
  966. angr/procedures/libc/closelog.py +1 -0
  967. angr/procedures/libc/err.py +1 -0
  968. angr/procedures/libc/error.py +2 -3
  969. angr/procedures/libc/exit.py +1 -0
  970. angr/procedures/libc/fclose.py +2 -3
  971. angr/procedures/libc/feof.py +1 -0
  972. angr/procedures/libc/fflush.py +1 -0
  973. angr/procedures/libc/fgetc.py +1 -0
  974. angr/procedures/libc/fgets.py +19 -19
  975. angr/procedures/libc/fopen.py +6 -8
  976. angr/procedures/libc/fprintf.py +1 -0
  977. angr/procedures/libc/fputc.py +1 -0
  978. angr/procedures/libc/fputs.py +1 -0
  979. angr/procedures/libc/fread.py +1 -0
  980. angr/procedures/libc/free.py +1 -0
  981. angr/procedures/libc/fscanf.py +2 -2
  982. angr/procedures/libc/fseek.py +3 -2
  983. angr/procedures/libc/ftell.py +1 -0
  984. angr/procedures/libc/fwrite.py +1 -0
  985. angr/procedures/libc/getchar.py +2 -2
  986. angr/procedures/libc/getdelim.py +25 -25
  987. angr/procedures/libc/getegid.py +1 -0
  988. angr/procedures/libc/geteuid.py +1 -0
  989. angr/procedures/libc/getgid.py +1 -0
  990. angr/procedures/libc/gets.py +18 -18
  991. angr/procedures/libc/getuid.py +1 -0
  992. angr/procedures/libc/malloc.py +1 -0
  993. angr/procedures/libc/memcmp.py +3 -6
  994. angr/procedures/libc/memcpy.py +1 -0
  995. angr/procedures/libc/memset.py +1 -0
  996. angr/procedures/libc/openlog.py +1 -0
  997. angr/procedures/libc/perror.py +1 -0
  998. angr/procedures/libc/printf.py +1 -0
  999. angr/procedures/libc/putchar.py +1 -0
  1000. angr/procedures/libc/puts.py +1 -0
  1001. angr/procedures/libc/rand.py +1 -0
  1002. angr/procedures/libc/realloc.py +1 -0
  1003. angr/procedures/libc/rewind.py +2 -1
  1004. angr/procedures/libc/scanf.py +2 -2
  1005. angr/procedures/libc/setbuf.py +1 -0
  1006. angr/procedures/libc/setvbuf.py +1 -0
  1007. angr/procedures/libc/snprintf.py +1 -0
  1008. angr/procedures/libc/sprintf.py +1 -0
  1009. angr/procedures/libc/srand.py +1 -0
  1010. angr/procedures/libc/sscanf.py +2 -2
  1011. angr/procedures/libc/stpcpy.py +2 -2
  1012. angr/procedures/libc/strcat.py +1 -0
  1013. angr/procedures/libc/strchr.py +1 -0
  1014. angr/procedures/libc/strcmp.py +1 -0
  1015. angr/procedures/libc/strcpy.py +2 -2
  1016. angr/procedures/libc/strlen.py +35 -31
  1017. angr/procedures/libc/strncat.py +1 -0
  1018. angr/procedures/libc/strncmp.py +9 -11
  1019. angr/procedures/libc/strncpy.py +1 -0
  1020. angr/procedures/libc/strnlen.py +2 -2
  1021. angr/procedures/libc/strstr.py +8 -4
  1022. angr/procedures/libc/strtol.py +9 -9
  1023. angr/procedures/libc/strtoul.py +2 -2
  1024. angr/procedures/libc/system.py +1 -0
  1025. angr/procedures/libc/time.py +2 -2
  1026. angr/procedures/libc/tmpnam.py +1 -0
  1027. angr/procedures/libc/tolower.py +1 -0
  1028. angr/procedures/libc/toupper.py +1 -0
  1029. angr/procedures/libc/ungetc.py +1 -0
  1030. angr/procedures/libc/vsnprintf.py +1 -0
  1031. angr/procedures/libc/wchar.py +1 -0
  1032. angr/procedures/libstdcpp/_unwind_resume.py +1 -0
  1033. angr/procedures/libstdcpp/std____throw_bad_alloc.py +1 -0
  1034. angr/procedures/libstdcpp/std____throw_bad_cast.py +1 -0
  1035. angr/procedures/libstdcpp/std____throw_length_error.py +1 -0
  1036. angr/procedures/libstdcpp/std____throw_logic_error.py +1 -0
  1037. angr/procedures/libstdcpp/std__terminate.py +1 -0
  1038. angr/procedures/linux_kernel/access.py +1 -0
  1039. angr/procedures/linux_kernel/arch_prctl.py +1 -0
  1040. angr/procedures/linux_kernel/arm_user_helpers.py +1 -0
  1041. angr/procedures/linux_kernel/brk.py +1 -0
  1042. angr/procedures/linux_kernel/cwd.py +1 -0
  1043. angr/procedures/linux_kernel/fstat.py +2 -1
  1044. angr/procedures/linux_kernel/fstat64.py +2 -1
  1045. angr/procedures/linux_kernel/futex.py +3 -3
  1046. angr/procedures/linux_kernel/getegid.py +1 -0
  1047. angr/procedures/linux_kernel/geteuid.py +1 -0
  1048. angr/procedures/linux_kernel/getgid.py +1 -0
  1049. angr/procedures/linux_kernel/getpid.py +1 -0
  1050. angr/procedures/linux_kernel/getrlimit.py +3 -3
  1051. angr/procedures/linux_kernel/gettid.py +1 -0
  1052. angr/procedures/linux_kernel/getuid.py +1 -0
  1053. angr/procedures/linux_kernel/iovec.py +1 -0
  1054. angr/procedures/linux_kernel/lseek.py +1 -0
  1055. angr/procedures/linux_kernel/mmap.py +1 -0
  1056. angr/procedures/linux_kernel/mprotect.py +7 -6
  1057. angr/procedures/linux_kernel/munmap.py +1 -0
  1058. angr/procedures/linux_kernel/openat.py +3 -5
  1059. angr/procedures/linux_kernel/set_tid_address.py +1 -0
  1060. angr/procedures/linux_kernel/sigaction.py +1 -0
  1061. angr/procedures/linux_kernel/sigprocmask.py +1 -0
  1062. angr/procedures/linux_kernel/stat.py +3 -2
  1063. angr/procedures/linux_kernel/sysinfo.py +1 -0
  1064. angr/procedures/linux_kernel/tgkill.py +1 -0
  1065. angr/procedures/linux_kernel/time.py +2 -1
  1066. angr/procedures/linux_kernel/uid.py +1 -0
  1067. angr/procedures/linux_kernel/uname.py +1 -0
  1068. angr/procedures/linux_kernel/unlink.py +2 -2
  1069. angr/procedures/linux_kernel/vsyscall.py +2 -1
  1070. angr/procedures/linux_loader/_dl_initial_error_catch_tsd.py +1 -0
  1071. angr/procedures/linux_loader/_dl_rtld_lock.py +1 -0
  1072. angr/procedures/linux_loader/sim_loader.py +1 -0
  1073. angr/procedures/linux_loader/tls.py +2 -2
  1074. angr/procedures/msvcr/__getmainargs.py +1 -0
  1075. angr/procedures/msvcr/_initterm.py +1 -0
  1076. angr/procedures/msvcr/fmode.py +1 -0
  1077. angr/procedures/ntdll/exceptions.py +4 -3
  1078. angr/procedures/posix/accept.py +2 -2
  1079. angr/procedures/posix/bind.py +1 -0
  1080. angr/procedures/posix/bzero.py +1 -0
  1081. angr/procedures/posix/chroot.py +1 -0
  1082. angr/procedures/posix/close.py +2 -2
  1083. angr/procedures/posix/closedir.py +1 -0
  1084. angr/procedures/posix/dup.py +4 -3
  1085. angr/procedures/posix/fcntl.py +1 -0
  1086. angr/procedures/posix/fdopen.py +16 -19
  1087. angr/procedures/posix/fileno.py +1 -0
  1088. angr/procedures/posix/fork.py +1 -0
  1089. angr/procedures/posix/getenv.py +1 -0
  1090. angr/procedures/posix/gethostbyname.py +1 -0
  1091. angr/procedures/posix/getpass.py +1 -0
  1092. angr/procedures/posix/getsockopt.py +1 -0
  1093. angr/procedures/posix/htonl.py +2 -2
  1094. angr/procedures/posix/htons.py +2 -2
  1095. angr/procedures/posix/inet_ntoa.py +3 -5
  1096. angr/procedures/posix/listen.py +1 -0
  1097. angr/procedures/posix/mmap.py +2 -1
  1098. angr/procedures/posix/open.py +1 -0
  1099. angr/procedures/posix/opendir.py +1 -0
  1100. angr/procedures/posix/poll.py +3 -3
  1101. angr/procedures/posix/pread64.py +1 -0
  1102. angr/procedures/posix/pthread.py +3 -3
  1103. angr/procedures/posix/pwrite64.py +1 -0
  1104. angr/procedures/posix/read.py +1 -0
  1105. angr/procedures/posix/readdir.py +1 -1
  1106. angr/procedures/posix/recv.py +1 -0
  1107. angr/procedures/posix/recvfrom.py +1 -0
  1108. angr/procedures/posix/select.py +7 -7
  1109. angr/procedures/posix/send.py +2 -2
  1110. angr/procedures/posix/setsockopt.py +1 -0
  1111. angr/procedures/posix/sigaction.py +1 -0
  1112. angr/procedures/posix/sim_time.py +1 -0
  1113. angr/procedures/posix/sleep.py +1 -0
  1114. angr/procedures/posix/socket.py +2 -2
  1115. angr/procedures/posix/strcasecmp.py +1 -0
  1116. angr/procedures/posix/strdup.py +1 -0
  1117. angr/procedures/posix/strtok_r.py +32 -36
  1118. angr/procedures/posix/syslog.py +1 -0
  1119. angr/procedures/posix/tz.py +1 -0
  1120. angr/procedures/posix/unlink.py +1 -0
  1121. angr/procedures/posix/usleep.py +1 -0
  1122. angr/procedures/posix/write.py +1 -0
  1123. angr/procedures/procedure_dict.py +1 -0
  1124. angr/procedures/stubs/CallReturn.py +1 -0
  1125. angr/procedures/stubs/NoReturnUnconstrained.py +1 -0
  1126. angr/procedures/stubs/Nop.py +1 -0
  1127. angr/procedures/stubs/PathTerminator.py +1 -0
  1128. angr/procedures/stubs/Redirect.py +3 -2
  1129. angr/procedures/stubs/ReturnChar.py +1 -0
  1130. angr/procedures/stubs/ReturnUnconstrained.py +2 -1
  1131. angr/procedures/stubs/UnresolvableCallTarget.py +1 -0
  1132. angr/procedures/stubs/UnresolvableJumpTarget.py +1 -0
  1133. angr/procedures/stubs/UserHook.py +2 -1
  1134. angr/procedures/stubs/b64_decode.py +1 -0
  1135. angr/procedures/stubs/caller.py +1 -0
  1136. angr/procedures/stubs/crazy_scanf.py +1 -0
  1137. angr/procedures/stubs/format_parser.py +12 -16
  1138. angr/procedures/stubs/syscall_stub.py +6 -7
  1139. angr/procedures/testing/manyargs.py +1 -0
  1140. angr/procedures/testing/retreg.py +2 -2
  1141. angr/procedures/tracer/random.py +1 -0
  1142. angr/procedures/tracer/receive.py +4 -4
  1143. angr/procedures/tracer/transmit.py +4 -4
  1144. angr/procedures/uclibc/__uClibc_main.py +1 -0
  1145. angr/procedures/win32/EncodePointer.py +1 -0
  1146. angr/procedures/win32/ExitProcess.py +1 -0
  1147. angr/procedures/win32/GetCommandLine.py +1 -0
  1148. angr/procedures/win32/GetCurrentProcessId.py +1 -0
  1149. angr/procedures/win32/GetCurrentThreadId.py +1 -0
  1150. angr/procedures/win32/GetLastInputInfo.py +1 -0
  1151. angr/procedures/win32/GetModuleHandle.py +3 -4
  1152. angr/procedures/win32/GetProcessAffinityMask.py +1 -0
  1153. angr/procedures/win32/InterlockedExchange.py +2 -1
  1154. angr/procedures/win32/IsProcessorFeaturePresent.py +1 -0
  1155. angr/procedures/win32/VirtualAlloc.py +2 -1
  1156. angr/procedures/win32/VirtualProtect.py +1 -0
  1157. angr/procedures/win32/critical_section.py +1 -0
  1158. angr/procedures/win32/dynamic_loading.py +2 -1
  1159. angr/procedures/win32/file_handles.py +4 -4
  1160. angr/procedures/win32/gethostbyname.py +2 -2
  1161. angr/procedures/win32/heap.py +1 -0
  1162. angr/procedures/win32/is_bad_ptr.py +1 -0
  1163. angr/procedures/win32/local_storage.py +7 -6
  1164. angr/procedures/win32/mutex.py +1 -0
  1165. angr/procedures/win32/sim_time.py +7 -10
  1166. angr/procedures/win32/system_paths.py +5 -4
  1167. angr/procedures/win32_kernel/ExAllocatePool.py +1 -0
  1168. angr/procedures/win32_kernel/ExFreePoolWithTag.py +1 -0
  1169. angr/procedures/win_user32/chars.py +1 -0
  1170. angr/procedures/win_user32/keyboard.py +1 -0
  1171. angr/procedures/win_user32/messagebox.py +2 -4
  1172. angr/project.py +15 -22
  1173. angr/protos/__init__.py +1 -0
  1174. angr/serializable.py +6 -3
  1175. angr/sim_manager.py +18 -18
  1176. angr/sim_options.py +5 -7
  1177. angr/sim_procedure.py +16 -15
  1178. angr/sim_state.py +61 -88
  1179. angr/sim_state_options.py +9 -15
  1180. angr/sim_type.py +135 -123
  1181. angr/sim_variable.py +23 -38
  1182. angr/simos/__init__.py +3 -1
  1183. angr/simos/cgc.py +2 -1
  1184. angr/simos/javavm.py +84 -95
  1185. angr/simos/linux.py +54 -64
  1186. angr/simos/simos.py +14 -23
  1187. angr/simos/snimmuc_nxp.py +3 -6
  1188. angr/simos/userland.py +6 -6
  1189. angr/simos/windows.py +14 -11
  1190. angr/slicer.py +13 -11
  1191. angr/state_hierarchy.py +4 -4
  1192. angr/state_plugins/__init__.py +1 -0
  1193. angr/state_plugins/callstack.py +19 -18
  1194. angr/state_plugins/cgc.py +5 -4
  1195. angr/state_plugins/concrete.py +7 -8
  1196. angr/state_plugins/debug_variables.py +15 -17
  1197. angr/state_plugins/filesystem.py +13 -19
  1198. angr/state_plugins/gdb.py +3 -2
  1199. angr/state_plugins/globals.py +5 -1
  1200. angr/state_plugins/heap/__init__.py +1 -0
  1201. angr/state_plugins/heap/heap_base.py +1 -0
  1202. angr/state_plugins/heap/heap_brk.py +9 -6
  1203. angr/state_plugins/heap/heap_freelist.py +12 -9
  1204. angr/state_plugins/heap/heap_libc.py +1 -0
  1205. angr/state_plugins/heap/heap_ptmalloc.py +27 -36
  1206. angr/state_plugins/heap/utils.py +1 -0
  1207. angr/state_plugins/history.py +7 -10
  1208. angr/state_plugins/inspect.py +1 -0
  1209. angr/state_plugins/javavm_classloader.py +3 -2
  1210. angr/state_plugins/jni_references.py +2 -1
  1211. angr/state_plugins/libc.py +4 -4
  1212. angr/state_plugins/light_registers.py +6 -8
  1213. angr/state_plugins/log.py +1 -0
  1214. angr/state_plugins/loop_data.py +1 -0
  1215. angr/state_plugins/plugin.py +7 -8
  1216. angr/state_plugins/posix.py +14 -22
  1217. angr/state_plugins/preconstrainer.py +4 -3
  1218. angr/state_plugins/scratch.py +6 -5
  1219. angr/state_plugins/sim_action.py +15 -20
  1220. angr/state_plugins/sim_action_object.py +205 -82
  1221. angr/state_plugins/sim_event.py +1 -0
  1222. angr/state_plugins/solver.py +65 -93
  1223. angr/state_plugins/symbolizer.py +5 -6
  1224. angr/state_plugins/trace_additions.py +32 -42
  1225. angr/state_plugins/uc_manager.py +16 -9
  1226. angr/state_plugins/unicorn_engine.py +21 -37
  1227. angr/state_plugins/view.py +20 -19
  1228. angr/storage/__init__.py +1 -0
  1229. angr/storage/file.py +31 -33
  1230. angr/storage/memory_mixins/__init__.py +12 -15
  1231. angr/storage/memory_mixins/__init__.pyi +13 -14
  1232. angr/storage/memory_mixins/actions_mixin.py +2 -1
  1233. angr/storage/memory_mixins/address_concretization_mixin.py +11 -15
  1234. angr/storage/memory_mixins/bvv_conversion_mixin.py +10 -11
  1235. angr/storage/memory_mixins/clouseau_mixin.py +1 -0
  1236. angr/storage/memory_mixins/conditional_store_mixin.py +1 -0
  1237. angr/storage/memory_mixins/convenient_mappings_mixin.py +7 -8
  1238. angr/storage/memory_mixins/default_filler_mixin.py +12 -14
  1239. angr/storage/memory_mixins/dirty_addrs_mixin.py +1 -0
  1240. angr/storage/memory_mixins/hex_dumper_mixin.py +6 -9
  1241. angr/storage/memory_mixins/javavm_memory/__init__.py +1 -0
  1242. angr/storage/memory_mixins/javavm_memory/javavm_memory_mixin.py +16 -23
  1243. angr/storage/memory_mixins/keyvalue_memory/__init__.py +1 -0
  1244. angr/storage/memory_mixins/keyvalue_memory/keyvalue_memory_mixin.py +2 -1
  1245. angr/storage/memory_mixins/label_merger_mixin.py +2 -2
  1246. angr/storage/memory_mixins/multi_value_merger_mixin.py +6 -5
  1247. angr/storage/memory_mixins/name_resolution_mixin.py +12 -15
  1248. angr/storage/memory_mixins/paged_memory/page_backer_mixins.py +6 -6
  1249. angr/storage/memory_mixins/paged_memory/paged_memory_mixin.py +22 -36
  1250. angr/storage/memory_mixins/paged_memory/paged_memory_multivalue_mixin.py +1 -0
  1251. angr/storage/memory_mixins/paged_memory/pages/__init__.py +1 -2
  1252. angr/storage/memory_mixins/paged_memory/pages/cooperation.py +4 -3
  1253. angr/storage/memory_mixins/paged_memory/pages/history_tracking_mixin.py +4 -4
  1254. angr/storage/memory_mixins/paged_memory/pages/ispo_mixin.py +1 -0
  1255. angr/storage/memory_mixins/paged_memory/pages/list_page.py +12 -20
  1256. angr/storage/memory_mixins/paged_memory/pages/multi_values.py +14 -19
  1257. angr/storage/memory_mixins/paged_memory/pages/mv_list_page.py +26 -32
  1258. angr/storage/memory_mixins/paged_memory/pages/permissions_mixin.py +1 -0
  1259. angr/storage/memory_mixins/paged_memory/pages/refcount_mixin.py +2 -2
  1260. angr/storage/memory_mixins/paged_memory/pages/ultra_page.py +38 -42
  1261. angr/storage/memory_mixins/paged_memory/privileged_mixin.py +1 -0
  1262. angr/storage/memory_mixins/paged_memory/stack_allocation_mixin.py +1 -0
  1263. angr/storage/memory_mixins/regioned_memory/__init__.py +1 -0
  1264. angr/storage/memory_mixins/regioned_memory/abstract_address_descriptor.py +5 -4
  1265. angr/storage/memory_mixins/regioned_memory/abstract_merger_mixin.py +6 -21
  1266. angr/storage/memory_mixins/regioned_memory/region_category_mixin.py +1 -0
  1267. angr/storage/memory_mixins/regioned_memory/region_data.py +4 -5
  1268. angr/storage/memory_mixins/regioned_memory/region_meta_mixin.py +129 -13
  1269. angr/storage/memory_mixins/regioned_memory/regioned_address_concretization_mixin.py +2 -1
  1270. angr/storage/memory_mixins/regioned_memory/regioned_memory_mixin.py +34 -44
  1271. angr/storage/memory_mixins/regioned_memory/static_find_mixin.py +7 -9
  1272. angr/storage/memory_mixins/simple_interface_mixin.py +8 -11
  1273. angr/storage/memory_mixins/simplification_mixin.py +1 -0
  1274. angr/storage/memory_mixins/size_resolution_mixin.py +5 -4
  1275. angr/storage/memory_mixins/slotted_memory.py +3 -3
  1276. angr/storage/memory_mixins/smart_find_mixin.py +3 -2
  1277. angr/storage/memory_mixins/symbolic_merger_mixin.py +1 -0
  1278. angr/storage/memory_mixins/top_merger_mixin.py +2 -2
  1279. angr/storage/memory_mixins/underconstrained_mixin.py +12 -14
  1280. angr/storage/memory_mixins/unwrapper_mixin.py +1 -0
  1281. angr/storage/memory_object.py +35 -35
  1282. angr/storage/pcap.py +3 -3
  1283. angr/tablespecs.py +1 -0
  1284. angr/utils/__init__.py +1 -0
  1285. angr/utils/ail.py +30 -0
  1286. angr/utils/algo.py +1 -0
  1287. angr/utils/bits.py +12 -0
  1288. angr/utils/constants.py +2 -0
  1289. angr/utils/cowdict.py +3 -4
  1290. angr/utils/dynamic_dictlist.py +4 -7
  1291. angr/utils/endness.py +1 -0
  1292. angr/utils/enums_conv.py +1 -0
  1293. angr/utils/env.py +1 -0
  1294. angr/utils/formatting.py +1 -0
  1295. angr/utils/funcid.py +15 -14
  1296. angr/utils/graph.py +52 -19
  1297. angr/utils/lazy_import.py +1 -0
  1298. angr/utils/library.py +10 -13
  1299. angr/utils/loader.py +6 -6
  1300. angr/utils/mp.py +4 -3
  1301. angr/utils/orderedset.py +1 -0
  1302. angr/utils/segment_list.py +7 -9
  1303. angr/utils/ssa/__init__.py +198 -0
  1304. angr/utils/ssa/tmp_uses_collector.py +23 -0
  1305. angr/utils/ssa/vvar_uses_collector.py +37 -0
  1306. angr/utils/timing.py +32 -20
  1307. angr/utils/typing.py +1 -0
  1308. angr/vaults.py +7 -8
  1309. {angr-9.2.117.dist-info → angr-9.2.119.dist-info}/METADATA +9 -8
  1310. angr-9.2.119.dist-info/RECORD +1345 -0
  1311. {angr-9.2.117.dist-info → angr-9.2.119.dist-info}/WHEEL +1 -1
  1312. angr/analyses/decompiler/optimization_passes/spilled_register_finder.py +0 -18
  1313. angr/analyses/decompiler/seq_cf_structure_counter.py +0 -37
  1314. angr/service.py +0 -35
  1315. angr-9.2.117.dist-info/RECORD +0 -1310
  1316. {angr-9.2.117.dist-info → angr-9.2.119.dist-info}/LICENSE +0 -0
  1317. {angr-9.2.117.dist-info → angr-9.2.119.dist-info}/entry_points.txt +0 -0
  1318. {angr-9.2.117.dist-info → angr-9.2.119.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,4 @@
1
+ from __future__ import annotations
1
2
  import itertools
2
3
  import logging
3
4
  import sys
@@ -44,6 +45,7 @@ from ..backward_slice import BackwardSlice
44
45
  from ..loopfinder import LoopFinder, Loop
45
46
  from .cfg_base import CFGBase
46
47
  from .cfg_job_base import BlockID, CFGJobBase
48
+ import contextlib
47
49
 
48
50
  l = logging.getLogger(name=__name__)
49
51
 
@@ -95,7 +97,7 @@ class PendingJob:
95
97
  """
96
98
  A PendingJob is whatever will be put into our pending_exit list. A pending exit is an entry that created by the
97
99
  returning of a call or syscall. It is "pending" since we cannot immediately figure out whether this entry will
98
- be executed or not. If the corresponding call/syscall intentially doesn't return, then the pending exit will be
100
+ be executed or not. If the corresponding call/syscall intentionally doesn't return, then the pending exit will be
99
101
  removed. If the corresponding call/syscall returns, then the pending exit will be removed as well (since a real
100
102
  entry is created from the returning and will be analyzed later). If the corresponding call/syscall might
101
103
  return, but for some reason (for example, an unsupported instruction is met during the analysis) our analysis
@@ -226,7 +228,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
226
228
  :param networkx.DiGraph base_graph: A basic control flow graph to follow. Each node inside this graph
227
229
  must have the following properties: `addr` and `size`. CFG recovery
228
230
  will strictly follow nodes and edges shown in the graph, and discard
229
- any contorl flow that does not follow an existing edge in the base
231
+ any control flow that does not follow an existing edge in the base
230
232
  graph. For example, you can pass in a Function local transition
231
233
  graph as the base graph, and CFGEmulated will traverse nodes and
232
234
  edges and extract useful information.
@@ -350,7 +352,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
350
352
  # Public methods
351
353
  #
352
354
 
353
- def copy(self) -> "CFGEmulated":
355
+ def copy(self) -> CFGEmulated:
354
356
  """
355
357
  Make a copy of the CFG.
356
358
 
@@ -533,10 +535,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
533
535
  for n in networkx.dfs_preorder_nodes(graph_copy, source=start_node):
534
536
  if n in cycle:
535
537
  idx = cycle.index(n)
536
- if idx == 0:
537
- loop_backedge = (cycle[-1], cycle[idx])
538
- else:
539
- loop_backedge = (cycle[idx - 1], cycle[idx])
538
+ loop_backedge = (cycle[-1], cycle[idx]) if idx == 0 else (cycle[idx - 1], cycle[idx])
540
539
  break
541
540
 
542
541
  if loop_backedge not in loop_backedges:
@@ -680,7 +679,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
680
679
 
681
680
  if starting_node not in self.graph:
682
681
  raise AngrCFGError(
683
- 'get_subgraph(): the specified "starting_node" %s does not exist in the current CFG.' % starting_node
682
+ f'get_subgraph(): the specified "starting_node" {starting_node} does not exist in the current CFG.'
684
683
  )
685
684
 
686
685
  addr_set = set(block_addresses)
@@ -776,7 +775,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
776
775
  self._model = s["_model"]
777
776
 
778
777
  def __getstate__(self):
779
- s = {
778
+ return {
780
779
  "project": self.project,
781
780
  "indirect_jumps": self.indirect_jumps,
782
781
  "_loop_back_edges": self._loop_back_edges,
@@ -788,8 +787,6 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
788
787
  "_model": self._model,
789
788
  }
790
789
 
791
- return s
792
-
793
790
  #
794
791
  # Properties
795
792
  #
@@ -819,9 +816,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
819
816
  if self.graph is None:
820
817
  raise AngrCFGError("CFG hasn't been generated yet.")
821
818
 
822
- deadends = [i for i in self.graph if self.graph.out_degree(i) == 0]
823
-
824
- return deadends
819
+ return [i for i in self.graph if self.graph.out_degree(i) == 0]
825
820
 
826
821
  #
827
822
  # Private methods
@@ -875,7 +870,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
875
870
  for item in self._starts:
876
871
  if isinstance(item, tuple):
877
872
  if len(item) != 2:
878
- raise AngrCFGError('Unsupported item in "starts": %s' % str(item))
873
+ raise AngrCFGError(f'Unsupported item in "starts": {item!s}')
879
874
 
880
875
  new_starts.append(item)
881
876
  elif isinstance(item, int):
@@ -885,7 +880,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
885
880
  new_starts.append(item)
886
881
 
887
882
  else:
888
- raise AngrCFGError('Unsupported item type in "starts": %s' % type(item))
883
+ raise AngrCFGError(f'Unsupported item type in "starts": {type(item)}')
889
884
 
890
885
  self._starts = new_starts
891
886
 
@@ -948,7 +943,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
948
943
  self._reset_state_mode(state, "fastpath")
949
944
 
950
945
  else:
951
- raise AngrCFGError("Unsupported CFG start type: %s." % str(type(item)))
946
+ raise AngrCFGError(f"Unsupported CFG start type: {type(item)!s}.")
952
947
 
953
948
  self._symbolic_function_initial_state[ip] = state
954
949
  path_wrapper = CFGJob(ip, state, self._context_sensitivity_level, None, None, call_stack=callstack)
@@ -1172,9 +1167,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
1172
1167
 
1173
1168
  # Should we skip tracing this block?
1174
1169
  should_skip = False
1175
- if self._traced_addrs[job.call_stack_suffix][addr] >= self._max_iterations:
1176
- should_skip = True
1177
- elif (
1170
+ if self._traced_addrs[job.call_stack_suffix][addr] >= self._max_iterations or (
1178
1171
  self._is_call_jumpkind(job.jumpkind)
1179
1172
  and self._call_depth is not None
1180
1173
  and len(job.call_stack) > self._call_depth
@@ -1200,7 +1193,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
1200
1193
  src_cfgnode = self._nodes[src_block_id]
1201
1194
  depth = src_cfgnode.depth + 1
1202
1195
  # the depth will not be updated later on even if this block has a greater depth on another path.
1203
- # consequently, the `max_steps` limit is not veyr precise - I didn't see a need to make it precise
1196
+ # consequently, the `max_steps` limit is not very precise - I didn't see a need to make it precise
1204
1197
  # though.
1205
1198
 
1206
1199
  if block_id not in self._nodes:
@@ -1248,7 +1241,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
1248
1241
 
1249
1242
  the_jobs = []
1250
1243
  if block_id in self._pending_jobs:
1251
- the_jobs: "PendingJob" = self._pending_jobs.pop(block_id)
1244
+ the_jobs: PendingJob = self._pending_jobs.pop(block_id)
1252
1245
  for the_job in the_jobs:
1253
1246
  self._deregister_analysis_job(the_job.caller_func_addr, the_job)
1254
1247
  else:
@@ -1283,17 +1276,16 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
1283
1276
  )
1284
1277
 
1285
1278
  # We are good. Raise the exception and leave
1286
- raise AngrSkipJobNotice()
1279
+ raise AngrSkipJobNotice
1287
1280
 
1288
1281
  self._update_thumb_addrs(sim_successors, job.state)
1289
1282
 
1290
1283
  # We store the function hints first. Function hints will be checked at the end of the analysis to avoid
1291
1284
  # any duplication with existing jumping targets
1292
- if self._enable_function_hints:
1293
- if sim_successors.sort == "IRSB" and sim_successors.all_successors:
1294
- function_hints = self._search_for_function_hints(sim_successors.all_successors[0])
1295
- for f in function_hints:
1296
- self._pending_function_hints.add(f)
1285
+ if self._enable_function_hints and sim_successors.sort == "IRSB" and sim_successors.all_successors:
1286
+ function_hints = self._search_for_function_hints(sim_successors.all_successors[0])
1287
+ for f in function_hints:
1288
+ self._pending_function_hints.add(f)
1297
1289
 
1298
1290
  self._graph_add_edge(
1299
1291
  src_block_id, block_id, jumpkind=job.jumpkind, stmt_idx=src_exit_stmt_idx, ins_addr=src_ins_addr
@@ -1509,9 +1501,8 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
1509
1501
  """
1510
1502
 
1511
1503
  # Finally, post-process CFG Node and log the return target
1512
- if job.extra_info:
1513
- if job.extra_info["is_call_jump"] and job.extra_info["return_target"] is not None:
1514
- job.cfg_node.return_target = job.extra_info["return_target"]
1504
+ if job.extra_info and job.extra_info["is_call_jump"] and job.extra_info["return_target"] is not None:
1505
+ job.cfg_node.return_target = job.extra_info["return_target"]
1515
1506
 
1516
1507
  # Debugging output if needed
1517
1508
  if l.level == logging.DEBUG:
@@ -1583,7 +1574,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
1583
1574
  module_name = obj.provides if obj is not None else None
1584
1575
 
1585
1576
  node = self.model.get_node(job.block_id)
1586
- depth_str = "(D:%s)" % node.depth if node.depth is not None else ""
1577
+ depth_str = f"(D:{node.depth})" if node.depth is not None else ""
1587
1578
 
1588
1579
  l.debug(
1589
1580
  "%s [%#x%s | %s]",
@@ -1597,10 +1588,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
1597
1588
 
1598
1589
  for suc in successors:
1599
1590
  jumpkind = suc.history.jumpkind
1600
- if jumpkind == "Ijk_FakeRet":
1601
- exit_type_str = "Simulated Ret"
1602
- else:
1603
- exit_type_str = "-"
1591
+ exit_type_str = "Simulated Ret" if jumpkind == "Ijk_FakeRet" else "-"
1604
1592
  try:
1605
1593
  l.debug(
1606
1594
  "| target: %#x %s [%s] %s",
@@ -1709,9 +1697,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
1709
1697
 
1710
1698
  del self._pending_jobs[block_id]
1711
1699
 
1712
- if pending_exits_to_remove:
1713
- return True
1714
- return False
1700
+ return bool(pending_exits_to_remove)
1715
1701
 
1716
1702
  # Successor handling
1717
1703
 
@@ -1767,12 +1753,11 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
1767
1753
  return []
1768
1754
 
1769
1755
  call_target = job.extra_info["call_target"]
1770
- if suc_jumpkind == "Ijk_FakeRet" and call_target is not None:
1756
+ if suc_jumpkind == "Ijk_FakeRet" and call_target is not None and self.project.is_hooked(call_target):
1771
1757
  # if the call points to a SimProcedure that doesn't return, we don't follow the fakeret anymore
1772
- if self.project.is_hooked(call_target):
1773
- sim_proc = self.project._sim_procedures[call_target]
1774
- if sim_proc.NO_RET:
1775
- return []
1758
+ sim_proc = self.project._sim_procedures[call_target]
1759
+ if sim_proc.NO_RET:
1760
+ return []
1776
1761
 
1777
1762
  # Get target address
1778
1763
  try:
@@ -1795,10 +1780,9 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
1795
1780
  target_addr |= 1
1796
1781
 
1797
1782
  # see if the target successor is in our whitelist
1798
- if self._address_whitelist is not None:
1799
- if target_addr not in self._address_whitelist:
1800
- l.debug("Successor %#x is not in the address whitelist. Skip.", target_addr)
1801
- return []
1783
+ if self._address_whitelist is not None and target_addr not in self._address_whitelist:
1784
+ l.debug("Successor %#x is not in the address whitelist. Skip.", target_addr)
1785
+ return []
1802
1786
 
1803
1787
  # see if this edge is in the base graph
1804
1788
  if self._base_graph is not None:
@@ -1827,7 +1811,9 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
1827
1811
 
1828
1812
  if job.extra_info["skip_fakeret"]:
1829
1813
  l.debug("... skipping a fake return exit since the function it's calling doesn't return")
1830
- job.successor_status[state] = "Skipped - non-returning function 0x%x" % job.extra_info["call_target"]
1814
+ job.successor_status[state] = "Skipped - non-returning function 0x{:x}".format(
1815
+ job.extra_info["call_target"]
1816
+ )
1831
1817
  return []
1832
1818
 
1833
1819
  # TODO: Make it optional
@@ -1960,7 +1946,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
1960
1946
 
1961
1947
  def _handle_actions(self, state, current_run, func, sp_addr, accessed_registers):
1962
1948
  """
1963
- For a given state and current location of of execution, will update a function by adding the offets of
1949
+ For a given state and current location of of execution, will update a function by adding the offsets of
1964
1950
  appropriate actions to the stack variable or argument registers for the fnc.
1965
1951
 
1966
1952
  :param SimState state: upcoming state.
@@ -2160,12 +2146,9 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
2160
2146
  src_obj = self.project.loader.find_object_containing(src_node.addr)
2161
2147
  dest_obj = self.project.loader.find_object_containing(dst_node.addr) if dst_node is not None else None
2162
2148
 
2163
- if src_obj is dest_obj:
2164
- # Jump/branch within the same object. Might be an outside jump.
2165
- to_outside = src_node.function_address != dst_node_func_addr
2166
- else:
2167
- # Jump/branch between different objects. Must be an outside jump.
2168
- to_outside = True
2149
+ # if true: Jump/branch within the same object. Might be an outside jump.
2150
+ # if false: Jump/branch between different objects. Must be an outside jump.
2151
+ to_outside = src_node.function_address != dst_node_func_addr if src_obj is dest_obj else True
2169
2152
 
2170
2153
  if not to_outside:
2171
2154
  self.kb.functions._add_transition_to(
@@ -2223,13 +2206,10 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
2223
2206
  if sim_successors.sort == "IRSB":
2224
2207
  base_state = sim_successors.all_successors[0].copy()
2225
2208
  else:
2226
- if successors:
2227
- # We try to use the first successor.
2228
- base_state = successors[0].copy()
2229
- else:
2230
- # The SimProcedure doesn't have any successor (e.g. it's a PathTerminator)
2231
- # We'll use its input state instead
2232
- base_state = input_state
2209
+ # If true, we try to use the first successor.
2210
+ # If false, the SimProcedure doesn't have any successor (e.g. it's a PathTerminator)
2211
+ # We'll use its input state instead
2212
+ base_state = successors[0].copy() if successors else input_state
2233
2213
  base_state.ip = dst
2234
2214
  # TODO: Allow for sp adjustments
2235
2215
  successors.append(base_state)
@@ -2371,7 +2351,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
2371
2351
  if legit_successors:
2372
2352
  legit_successor = legit_successors[0]
2373
2353
  if legit_successor.ip.symbolic:
2374
- if not legit_successor.history.jumpkind == "Ijk_Call":
2354
+ if legit_successor.history.jumpkind != "Ijk_Call":
2375
2355
  should_resolve = False
2376
2356
  else:
2377
2357
  if legit_successor.history.jumpkind == "Ijk_Call":
@@ -2518,9 +2498,9 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
2518
2498
 
2519
2499
  # Let's slice backwards from the end of this exit
2520
2500
  next_tmp = irsb.next.tmp
2521
- stmt_id = [i for i, s in enumerate(irsb.statements) if isinstance(s, pyvex.IRStmt.WrTmp) and s.tmp == next_tmp][
2522
- 0
2523
- ]
2501
+ stmt_id = next(
2502
+ i for i, s in enumerate(irsb.statements) if isinstance(s, pyvex.IRStmt.WrTmp) and s.tmp == next_tmp
2503
+ )
2524
2504
 
2525
2505
  cdg = self.project.analyses[CDG].prep(fail_fast=self._fail_fast)(cfg=self)
2526
2506
  ddg = self.project.analyses[DDG].prep(fail_fast=self._fail_fast)(
@@ -2634,7 +2614,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
2634
2614
  CFGNode.
2635
2615
 
2636
2616
  :param SimSuccessors current_block: SimSuccessor with address to attempt to navigate to.
2637
- :param dict block_artifacts: Container of IRSB data - specifically used for known persistant register values.
2617
+ :param dict block_artifacts: Container of IRSB data - specifically used for known persistent register values.
2638
2618
  :param CFGNode cfg_node: Current node interested around.
2639
2619
  :returns: Double-checked concrete successors.
2640
2620
  :rtype: List
@@ -2649,7 +2629,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
2649
2629
  """
2650
2630
  Class to overwrite registers.
2651
2631
 
2652
- :param int reg_offest: Register offset to overwrite from.
2632
+ :param int reg_offset: Register offset to overwrite from.
2653
2633
  :param dict info_collection: New register offsets to use (in container).
2654
2634
  """
2655
2635
  self._reg_offset = reg_offset
@@ -2762,7 +2742,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
2762
2742
  for c in concrete_exits:
2763
2743
  unsat_state = current_block.unsat_successors[0].copy()
2764
2744
  unsat_state.history.jumpkind = c.history.jumpkind
2765
- for reg in unsat_state.arch.persistent_regs + ["ip"]:
2745
+ for reg in [*unsat_state.arch.persistent_regs, "ip"]:
2766
2746
  unsat_state.registers.store(reg, c.registers.load(reg))
2767
2747
  new_concrete_successors.append(unsat_state)
2768
2748
 
@@ -2772,7 +2752,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
2772
2752
  """
2773
2753
  Symbolically execute the first basic block of the specified function,
2774
2754
  then returns it. We prepares the state using the already existing
2775
- state in fastpath mode (if avaiable).
2755
+ state in fastpath mode (if available).
2776
2756
  :param function_addr: The function address
2777
2757
  :return: A symbolic state if succeeded, None otherwise
2778
2758
  """
@@ -2873,7 +2853,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
2873
2853
  function_hints.append(const)
2874
2854
 
2875
2855
  l.debug(
2876
- "Got %d possible exits, including: %s", len(function_hints), ", ".join(["0x%x" % f for f in function_hints])
2856
+ "Got %d possible exits, including: %s", len(function_hints), ", ".join([f"0x{f:x}" for f in function_hints])
2877
2857
  )
2878
2858
 
2879
2859
  return function_hints
@@ -3026,10 +3006,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
3026
3006
  except AngrError:
3027
3007
  exception_info = sys.exc_info()
3028
3008
  section = self.project.loader.main_object.find_section_containing(addr)
3029
- if section is None:
3030
- sec_name = "No section"
3031
- else:
3032
- sec_name = section.name
3009
+ sec_name = "No section" if section is None else section.name
3033
3010
  # AngrError shouldn't really happen though
3034
3011
  l.debug("Caught an AngrError during CFG recovery at %#x (%s)", addr, sec_name, exc_info=True)
3035
3012
  # We might be on a wrong branch, and is likely to encounter the
@@ -3086,10 +3063,8 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
3086
3063
  elif jumpkind == "Ijk_Ret":
3087
3064
  # Normal return
3088
3065
  new_call_stack = job.call_stack_copy()
3089
- try:
3066
+ with contextlib.suppress(SimEmptyCallStackError):
3090
3067
  new_call_stack = new_call_stack.ret(exit_target)
3091
- except SimEmptyCallStackError:
3092
- pass
3093
3068
 
3094
3069
  se = all_jobs[-1].solver
3095
3070
  sp = se.eval_one(all_jobs[-1].regs.sp, default=0)
@@ -3353,7 +3328,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
3353
3328
  target_graph = self.graph
3354
3329
 
3355
3330
  if node not in target_graph:
3356
- raise AngrCFGError("Target node %s is not in graph." % node)
3331
+ raise AngrCFGError(f"Target node {node} is not in graph.")
3357
3332
 
3358
3333
  graph = networkx.DiGraph(target_graph)
3359
3334
  if reverse_graph:
@@ -3412,11 +3387,9 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
3412
3387
  return False
3413
3388
 
3414
3389
  default_jumpkind = sim_successors.artifacts["irsb_default_jumpkind"]
3415
- if default_jumpkind not in ("Ijk_Call", "Ijk_Boring", "Ijk_InvalICache"):
3416
- # It's something else, like a ret of a syscall... we don't care about it
3417
- return False
3418
3390
 
3419
- return True
3391
+ # If false, it's something else, like a ret of a syscall... we don't care about it
3392
+ return not (default_jumpkind not in ("Ijk_Call", "Ijk_Boring", "Ijk_InvalICache"))
3420
3393
 
3421
3394
  @staticmethod
3422
3395
  def _generate_block_id(call_stack_suffix, block_addr, is_syscall):
@@ -3456,9 +3429,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
3456
3429
 
3457
3430
  @staticmethod
3458
3431
  def _is_call_jumpkind(jumpkind):
3459
- if jumpkind == "Ijk_Call" or jumpkind.startswith("Ijk_Sys_"):
3460
- return True
3461
- return False
3432
+ return bool(jumpkind == "Ijk_Call" or jumpkind.startswith("Ijk_Sys_"))
3462
3433
 
3463
3434
  def _push_unresolvable_run(self, block_address):
3464
3435
  """
@@ -3476,10 +3447,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
3476
3447
  :return: True if it's in an executable range, False otherwise
3477
3448
  """
3478
3449
 
3479
- for r in self._executable_address_ranges:
3480
- if r[0] <= address < r[1]:
3481
- return True
3482
- return False
3450
+ return any(r[0] <= address < r[1] for r in self._executable_address_ranges)
3483
3451
 
3484
3452
  def _update_thumb_addrs(self, simsuccessors, state):
3485
3453
  """
@@ -3491,7 +3459,7 @@ class CFGEmulated(ForwardAnalysis, CFGBase): # pylint: disable=abstract-method
3491
3459
  if simsuccessors.sort == "IRSB" and state.thumb:
3492
3460
  insn_addrs = simsuccessors.artifacts["insn_addrs"]
3493
3461
  self._thumb_addrs.update(insn_addrs)
3494
- self._thumb_addrs.update(map(lambda x: x + 1, insn_addrs)) # pylint:disable=bad-builtin
3462
+ self._thumb_addrs.update(x + 1 for x in insn_addrs) # pylint:disable=bad-builtin
3495
3463
 
3496
3464
  def _get_callsites(self, function_address):
3497
3465
  """