angr 9.2.116__py3-none-manylinux2014_aarch64.whl → 9.2.118__py3-none-manylinux2014_aarch64.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.
- angr/__init__.py +2 -1
- angr/__main__.py +21 -1
- angr/analyses/__init__.py +4 -0
- angr/analyses/analysis.py +45 -45
- angr/analyses/backward_slice.py +15 -18
- angr/analyses/binary_optimizer.py +29 -34
- angr/analyses/bindiff.py +35 -44
- angr/analyses/boyscout.py +1 -0
- angr/analyses/callee_cleanup_finder.py +3 -4
- angr/analyses/calling_convention.py +98 -98
- angr/analyses/cdg.py +5 -12
- angr/analyses/cfg/__init__.py +1 -0
- angr/analyses/cfg/cfb.py +14 -20
- angr/analyses/cfg/cfg.py +2 -1
- angr/analyses/cfg/cfg_arch_options.py +4 -1
- angr/analyses/cfg/cfg_base.py +122 -165
- angr/analyses/cfg/cfg_emulated.py +64 -96
- angr/analyses/cfg/cfg_fast.py +273 -314
- angr/analyses/cfg/cfg_fast_soot.py +10 -17
- angr/analyses/cfg/cfg_job_base.py +6 -7
- angr/analyses/cfg/indirect_jump_resolvers/__init__.py +1 -0
- angr/analyses/cfg/indirect_jump_resolvers/amd64_elf_got.py +2 -3
- angr/analyses/cfg/indirect_jump_resolvers/amd64_pe_iat.py +2 -3
- angr/analyses/cfg/indirect_jump_resolvers/arm_elf_fast.py +6 -8
- angr/analyses/cfg/indirect_jump_resolvers/const_resolver.py +3 -5
- angr/analyses/cfg/indirect_jump_resolvers/default_resolvers.py +1 -0
- angr/analyses/cfg/indirect_jump_resolvers/jumptable.py +104 -119
- angr/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py +29 -34
- angr/analyses/cfg/indirect_jump_resolvers/propagator_utils.py +1 -0
- angr/analyses/cfg/indirect_jump_resolvers/resolver.py +7 -7
- angr/analyses/cfg/indirect_jump_resolvers/x86_elf_pic_plt.py +3 -8
- angr/analyses/cfg/indirect_jump_resolvers/x86_pe_iat.py +2 -3
- angr/analyses/cfg_slice_to_sink/__init__.py +1 -0
- angr/analyses/cfg_slice_to_sink/cfg_slice_to_sink.py +4 -4
- angr/analyses/cfg_slice_to_sink/graph.py +4 -1
- angr/analyses/cfg_slice_to_sink/transitions.py +4 -2
- angr/analyses/class_identifier.py +1 -0
- angr/analyses/code_tagging.py +9 -9
- angr/analyses/complete_calling_conventions.py +28 -36
- angr/analyses/congruency_check.py +6 -11
- angr/analyses/data_dep/__init__.py +1 -0
- angr/analyses/data_dep/data_dependency_analysis.py +38 -48
- angr/analyses/data_dep/dep_nodes.py +13 -12
- angr/analyses/data_dep/sim_act_location.py +3 -0
- angr/analyses/datagraph_meta.py +7 -7
- angr/analyses/ddg.py +48 -69
- angr/analyses/decompiler/__init__.py +3 -0
- angr/analyses/decompiler/ail_simplifier.py +929 -400
- angr/analyses/decompiler/ailgraph_walker.py +1 -0
- angr/analyses/decompiler/block_io_finder.py +13 -4
- angr/analyses/decompiler/block_similarity.py +28 -18
- angr/analyses/decompiler/block_simplifier.py +40 -104
- angr/analyses/decompiler/callsite_maker.py +124 -82
- angr/analyses/decompiler/ccall_rewriters/__init__.py +1 -0
- angr/analyses/decompiler/ccall_rewriters/amd64_ccalls.py +115 -105
- angr/analyses/decompiler/ccall_rewriters/rewriter_base.py +2 -1
- angr/analyses/decompiler/clinic.py +348 -172
- angr/analyses/decompiler/condition_processor.py +86 -100
- angr/analyses/decompiler/counters/__init__.py +5 -0
- angr/analyses/decompiler/counters/boolean_counter.py +27 -0
- angr/analyses/decompiler/{call_counter.py → counters/call_counter.py} +5 -4
- angr/analyses/decompiler/{expression_counters.py → counters/expression_counters.py} +5 -4
- angr/analyses/decompiler/counters/seq_cf_structure_counter.py +63 -0
- angr/analyses/decompiler/decompilation_cache.py +2 -1
- angr/analyses/decompiler/decompilation_options.py +1 -0
- angr/analyses/decompiler/decompiler.py +47 -27
- angr/analyses/decompiler/dephication/__init__.py +6 -0
- angr/analyses/decompiler/dephication/dephication_base.py +87 -0
- angr/analyses/decompiler/dephication/graph_dephication.py +63 -0
- angr/analyses/decompiler/dephication/graph_rewriting.py +116 -0
- angr/analyses/decompiler/dephication/graph_vvar_mapping.py +313 -0
- angr/analyses/decompiler/dephication/rewriting_engine.py +247 -0
- angr/analyses/decompiler/dephication/seqnode_dephication.py +106 -0
- angr/analyses/decompiler/empty_node_remover.py +1 -0
- angr/analyses/decompiler/expression_narrower.py +12 -17
- angr/analyses/decompiler/goto_manager.py +43 -4
- angr/analyses/decompiler/graph_region.py +19 -31
- angr/analyses/decompiler/jump_target_collector.py +1 -0
- angr/analyses/decompiler/jumptable_entry_condition_rewriter.py +1 -0
- angr/analyses/decompiler/optimization_passes/__init__.py +7 -3
- angr/analyses/decompiler/optimization_passes/base_ptr_save_simplifier.py +23 -18
- angr/analyses/decompiler/optimization_passes/call_stmt_rewriter.py +46 -0
- angr/analyses/decompiler/optimization_passes/code_motion.py +4 -2
- angr/analyses/decompiler/optimization_passes/const_derefs.py +36 -36
- angr/analyses/decompiler/optimization_passes/const_prop_reverter.py +6 -9
- angr/analyses/decompiler/optimization_passes/cross_jump_reverter.py +4 -3
- angr/analyses/decompiler/optimization_passes/deadblock_remover.py +1 -0
- angr/analyses/decompiler/optimization_passes/div_simplifier.py +78 -72
- angr/analyses/decompiler/optimization_passes/duplication_reverter/__init__.py +2 -0
- angr/analyses/decompiler/optimization_passes/duplication_reverter/ail_merge_graph.py +500 -0
- angr/analyses/decompiler/optimization_passes/duplication_reverter/duplication_reverter.py +1211 -0
- angr/analyses/decompiler/optimization_passes/duplication_reverter/errors.py +16 -0
- angr/analyses/decompiler/optimization_passes/duplication_reverter/similarity.py +126 -0
- angr/analyses/decompiler/optimization_passes/duplication_reverter/utils.py +169 -0
- angr/analyses/decompiler/optimization_passes/engine_base.py +60 -63
- angr/analyses/decompiler/optimization_passes/expr_op_swapper.py +6 -7
- angr/analyses/decompiler/optimization_passes/flip_boolean_cmp.py +1 -0
- angr/analyses/decompiler/optimization_passes/inlined_string_transformation_simplifier.py +88 -23
- angr/analyses/decompiler/optimization_passes/ite_expr_converter.py +8 -10
- angr/analyses/decompiler/optimization_passes/ite_region_converter.py +128 -18
- angr/analyses/decompiler/optimization_passes/lowered_switch_simplifier.py +142 -145
- angr/analyses/decompiler/optimization_passes/mod_simplifier.py +27 -23
- angr/analyses/decompiler/optimization_passes/multi_simplifier.py +30 -34
- angr/analyses/decompiler/optimization_passes/optimization_pass.py +108 -47
- angr/analyses/decompiler/optimization_passes/register_save_area_simplifier.py +10 -3
- angr/analyses/decompiler/optimization_passes/ret_addr_save_simplifier.py +5 -6
- angr/analyses/decompiler/optimization_passes/ret_deduplicator.py +3 -2
- angr/analyses/decompiler/optimization_passes/return_duplicator_base.py +125 -13
- angr/analyses/decompiler/optimization_passes/return_duplicator_high.py +1 -0
- angr/analyses/decompiler/optimization_passes/return_duplicator_low.py +3 -2
- angr/analyses/decompiler/optimization_passes/stack_canary_simplifier.py +52 -21
- angr/analyses/decompiler/optimization_passes/switch_default_case_duplicator.py +3 -2
- angr/analyses/decompiler/optimization_passes/win_stack_canary_simplifier.py +47 -36
- angr/analyses/decompiler/optimization_passes/x86_gcc_getpc_simplifier.py +2 -1
- angr/analyses/decompiler/peephole_optimizations/__init__.py +2 -0
- angr/analyses/decompiler/peephole_optimizations/a_div_const_add_a_mul_n_div_const.py +26 -22
- angr/analyses/decompiler/peephole_optimizations/a_mul_const_div_shr_const.py +2 -2
- angr/analyses/decompiler/peephole_optimizations/a_shl_const_sub_a.py +1 -0
- angr/analyses/decompiler/peephole_optimizations/a_sub_a_div.py +2 -2
- angr/analyses/decompiler/peephole_optimizations/a_sub_a_div_const_mul_const.py +1 -0
- angr/analyses/decompiler/peephole_optimizations/a_sub_a_sub_n.py +8 -4
- angr/analyses/decompiler/peephole_optimizations/arm_cmpf.py +28 -27
- angr/analyses/decompiler/peephole_optimizations/base.py +17 -20
- angr/analyses/decompiler/peephole_optimizations/basepointeroffset_add_n.py +1 -0
- angr/analyses/decompiler/peephole_optimizations/basepointeroffset_and_mask.py +1 -0
- angr/analyses/decompiler/peephole_optimizations/bitwise_or_to_logical_or.py +2 -2
- angr/analyses/decompiler/peephole_optimizations/bool_expr_xor_1.py +2 -2
- angr/analyses/decompiler/peephole_optimizations/bswap.py +29 -22
- angr/analyses/decompiler/peephole_optimizations/cmpord_rewriter.py +3 -4
- angr/analyses/decompiler/peephole_optimizations/coalesce_adjacent_shrs.py +39 -0
- angr/analyses/decompiler/peephole_optimizations/coalesce_same_cascading_ifs.py +2 -1
- angr/analyses/decompiler/peephole_optimizations/const_mull_a_shift.py +94 -29
- angr/analyses/decompiler/peephole_optimizations/constant_derefs.py +1 -0
- angr/analyses/decompiler/peephole_optimizations/conv_a_sub0_shr_and.py +48 -49
- angr/analyses/decompiler/peephole_optimizations/conv_shl_shr.py +1 -0
- angr/analyses/decompiler/peephole_optimizations/eager_eval.py +41 -34
- angr/analyses/decompiler/peephole_optimizations/extended_byte_and_mask.py +2 -1
- angr/analyses/decompiler/peephole_optimizations/inlined_strcpy.py +28 -18
- angr/analyses/decompiler/peephole_optimizations/inlined_strcpy_consolidation.py +8 -4
- angr/analyses/decompiler/peephole_optimizations/inlined_wstrcpy.py +28 -18
- angr/analyses/decompiler/peephole_optimizations/invert_negated_logical_conjuction_disjunction.py +32 -32
- angr/analyses/decompiler/peephole_optimizations/one_sub_bool.py +2 -2
- angr/analyses/decompiler/peephole_optimizations/remove_cascading_conversions.py +23 -3
- angr/analyses/decompiler/peephole_optimizations/remove_empty_if_body.py +2 -1
- angr/analyses/decompiler/peephole_optimizations/remove_noop_conversions.py +4 -0
- angr/analyses/decompiler/peephole_optimizations/remove_redundant_bitmasks.py +1 -0
- angr/analyses/decompiler/peephole_optimizations/remove_redundant_conversions.py +4 -6
- angr/analyses/decompiler/peephole_optimizations/remove_redundant_ite_branch.py +14 -13
- angr/analyses/decompiler/peephole_optimizations/remove_redundant_ite_comparisons.py +2 -2
- angr/analyses/decompiler/peephole_optimizations/remove_redundant_nots.py +1 -0
- angr/analyses/decompiler/peephole_optimizations/remove_redundant_reinterprets.py +3 -2
- angr/analyses/decompiler/peephole_optimizations/remove_redundant_shifts.py +2 -2
- angr/analyses/decompiler/peephole_optimizations/remove_redundant_shifts_around_comparators.py +20 -16
- angr/analyses/decompiler/peephole_optimizations/rewrite_bit_extractions.py +3 -3
- angr/analyses/decompiler/peephole_optimizations/rewrite_mips_gp_loads.py +4 -2
- angr/analyses/decompiler/peephole_optimizations/rol_ror.py +66 -40
- angr/analyses/decompiler/peephole_optimizations/sar_to_signed_div.py +64 -57
- angr/analyses/decompiler/peephole_optimizations/simplify_pc_relative_loads.py +14 -14
- angr/analyses/decompiler/peephole_optimizations/single_bit_cond_to_boolexpr.py +1 -0
- angr/analyses/decompiler/peephole_optimizations/single_bit_xor.py +8 -5
- angr/analyses/decompiler/peephole_optimizations/tidy_stack_addr.py +4 -6
- angr/analyses/decompiler/redundant_label_remover.py +20 -19
- angr/analyses/decompiler/region_identifier.py +64 -77
- angr/analyses/decompiler/region_simplifiers/__init__.py +1 -0
- angr/analyses/decompiler/region_simplifiers/cascading_cond_transformer.py +2 -1
- angr/analyses/decompiler/region_simplifiers/cascading_ifs.py +1 -0
- angr/analyses/decompiler/region_simplifiers/expr_folding.py +43 -29
- angr/analyses/decompiler/region_simplifiers/goto.py +1 -0
- angr/analyses/decompiler/region_simplifiers/if_.py +29 -36
- angr/analyses/decompiler/region_simplifiers/ifelse.py +1 -0
- angr/analyses/decompiler/region_simplifiers/loop.py +27 -13
- angr/analyses/decompiler/region_simplifiers/node_address_finder.py +1 -0
- angr/analyses/decompiler/region_simplifiers/region_simplifier.py +1 -0
- angr/analyses/decompiler/region_simplifiers/switch_cluster_simplifier.py +12 -16
- angr/analyses/decompiler/region_simplifiers/switch_expr_simplifier.py +36 -32
- angr/analyses/decompiler/region_walker.py +1 -0
- angr/analyses/decompiler/return_maker.py +1 -0
- angr/analyses/decompiler/seq_to_blocks.py +1 -0
- angr/analyses/decompiler/sequence_walker.py +5 -10
- angr/analyses/decompiler/ssailification/__init__.py +4 -0
- angr/analyses/decompiler/ssailification/rewriting.py +325 -0
- angr/analyses/decompiler/ssailification/rewriting_engine.py +601 -0
- angr/analyses/decompiler/ssailification/rewriting_state.py +60 -0
- angr/analyses/decompiler/ssailification/ssailification.py +213 -0
- angr/analyses/decompiler/ssailification/traversal.py +97 -0
- angr/analyses/decompiler/ssailification/traversal_engine.py +131 -0
- angr/analyses/decompiler/ssailification/traversal_state.py +42 -0
- angr/analyses/decompiler/structured_codegen/__init__.py +1 -0
- angr/analyses/decompiler/structured_codegen/base.py +2 -2
- angr/analyses/decompiler/structured_codegen/c.py +163 -158
- angr/analyses/decompiler/structured_codegen/dummy.py +1 -0
- angr/analyses/decompiler/structured_codegen/dwarf_import.py +1 -0
- angr/analyses/decompiler/structuring/__init__.py +1 -0
- angr/analyses/decompiler/structuring/dream.py +19 -36
- angr/analyses/decompiler/structuring/phoenix.py +199 -199
- angr/analyses/decompiler/structuring/recursive_structurer.py +4 -3
- angr/analyses/decompiler/structuring/sailr.py +5 -4
- angr/analyses/decompiler/structuring/structurer_base.py +26 -23
- angr/analyses/decompiler/structuring/structurer_nodes.py +14 -24
- angr/analyses/decompiler/utils.py +112 -52
- angr/analyses/disassembly.py +75 -77
- angr/analyses/disassembly_utils.py +10 -13
- angr/analyses/dominance_frontier.py +25 -7
- angr/analyses/find_objects_static.py +3 -2
- angr/analyses/flirt.py +7 -10
- angr/analyses/forward_analysis/__init__.py +1 -0
- angr/analyses/forward_analysis/forward_analysis.py +9 -6
- angr/analyses/forward_analysis/job_info.py +3 -3
- angr/analyses/forward_analysis/visitors/__init__.py +1 -0
- angr/analyses/forward_analysis/visitors/call_graph.py +1 -0
- angr/analyses/forward_analysis/visitors/function_graph.py +3 -2
- angr/analyses/forward_analysis/visitors/graph.py +9 -9
- angr/analyses/forward_analysis/visitors/loop.py +1 -0
- angr/analyses/forward_analysis/visitors/single_node_graph.py +2 -2
- angr/analyses/identifier/__init__.py +1 -0
- angr/analyses/identifier/custom_callable.py +2 -2
- angr/analyses/identifier/errors.py +1 -0
- angr/analyses/identifier/func.py +6 -3
- angr/analyses/identifier/functions/__init__.py +2 -1
- angr/analyses/identifier/functions/atoi.py +2 -4
- angr/analyses/identifier/functions/based_atoi.py +3 -6
- angr/analyses/identifier/functions/fdprintf.py +1 -0
- angr/analyses/identifier/functions/free.py +6 -6
- angr/analyses/identifier/functions/int2str.py +11 -26
- angr/analyses/identifier/functions/malloc.py +4 -6
- angr/analyses/identifier/functions/memcmp.py +2 -4
- angr/analyses/identifier/functions/memcpy.py +2 -2
- angr/analyses/identifier/functions/memset.py +2 -2
- angr/analyses/identifier/functions/printf.py +1 -0
- angr/analyses/identifier/functions/recv_until.py +3 -6
- angr/analyses/identifier/functions/skip_calloc.py +2 -1
- angr/analyses/identifier/functions/skip_realloc.py +4 -6
- angr/analyses/identifier/functions/skip_recv_n.py +4 -6
- angr/analyses/identifier/functions/snprintf.py +2 -4
- angr/analyses/identifier/functions/sprintf.py +1 -0
- angr/analyses/identifier/functions/strcasecmp.py +1 -0
- angr/analyses/identifier/functions/strcmp.py +2 -1
- angr/analyses/identifier/functions/strcpy.py +2 -2
- angr/analyses/identifier/functions/strlen.py +1 -0
- angr/analyses/identifier/functions/strncmp.py +2 -1
- angr/analyses/identifier/functions/strncpy.py +2 -2
- angr/analyses/identifier/functions/strtol.py +2 -4
- angr/analyses/identifier/identify.py +46 -67
- angr/analyses/identifier/runner.py +8 -7
- angr/analyses/init_finder.py +17 -17
- angr/analyses/loop_analysis.py +10 -14
- angr/analyses/loopfinder.py +9 -13
- angr/analyses/propagator/__init__.py +1 -0
- angr/analyses/propagator/engine_ail.py +159 -165
- angr/analyses/propagator/engine_base.py +3 -2
- angr/analyses/propagator/engine_vex.py +47 -48
- angr/analyses/propagator/outdated_definition_walker.py +18 -23
- angr/analyses/propagator/propagator.py +8 -12
- angr/analyses/propagator/tmpvar_finder.py +1 -0
- angr/analyses/propagator/top_checker_mixin.py +2 -4
- angr/analyses/propagator/values.py +1 -0
- angr/analyses/propagator/vex_vars.py +3 -2
- angr/analyses/proximity_graph.py +12 -20
- angr/analyses/reaching_definitions/__init__.py +5 -4
- angr/analyses/reaching_definitions/call_trace.py +7 -6
- angr/analyses/reaching_definitions/dep_graph.py +18 -23
- angr/analyses/reaching_definitions/engine_ail.py +89 -121
- angr/analyses/reaching_definitions/engine_vex.py +20 -32
- angr/analyses/reaching_definitions/function_handler.py +32 -33
- angr/analyses/reaching_definitions/function_handler_library/__init__.py +1 -0
- angr/analyses/reaching_definitions/function_handler_library/stdio.py +4 -6
- angr/analyses/reaching_definitions/function_handler_library/stdlib.py +1 -2
- angr/analyses/reaching_definitions/function_handler_library/string.py +2 -4
- angr/analyses/reaching_definitions/function_handler_library/unistd.py +1 -0
- angr/analyses/reaching_definitions/heap_allocator.py +7 -6
- angr/analyses/reaching_definitions/rd_initializer.py +27 -25
- angr/analyses/reaching_definitions/rd_state.py +14 -16
- angr/analyses/reaching_definitions/reaching_definitions.py +27 -36
- angr/analyses/reaching_definitions/subject.py +3 -2
- angr/analyses/reassembler.py +189 -253
- angr/analyses/s_liveness/__init__.py +2 -0
- angr/analyses/s_liveness/s_liveness.py +153 -0
- angr/analyses/s_propagator/__init__.py +2 -0
- angr/analyses/s_propagator/s_propagator.py +250 -0
- angr/analyses/s_reaching_definitions/__init__.py +2 -0
- angr/analyses/s_reaching_definitions/s_rda.py +479 -0
- angr/analyses/soot_class_hierarchy.py +15 -24
- angr/analyses/stack_pointer_tracker.py +83 -93
- angr/analyses/static_hooker.py +3 -2
- angr/analyses/typehoon/__init__.py +1 -0
- angr/analyses/typehoon/dfa.py +5 -5
- angr/analyses/typehoon/lifter.py +5 -4
- angr/analyses/typehoon/simple_solver.py +80 -64
- angr/analyses/typehoon/translator.py +7 -14
- angr/analyses/typehoon/typeconsts.py +14 -12
- angr/analyses/typehoon/typehoon.py +8 -10
- angr/analyses/typehoon/typevars.py +37 -49
- angr/analyses/typehoon/variance.py +1 -0
- angr/analyses/variable_recovery/__init__.py +1 -0
- angr/analyses/variable_recovery/annotations.py +1 -0
- angr/analyses/variable_recovery/engine_ail.py +78 -32
- angr/analyses/variable_recovery/engine_base.py +233 -59
- angr/analyses/variable_recovery/engine_vex.py +10 -11
- angr/analyses/variable_recovery/irsb_scanner.py +1 -0
- angr/analyses/variable_recovery/variable_recovery.py +14 -16
- angr/analyses/variable_recovery/variable_recovery_base.py +12 -14
- angr/analyses/variable_recovery/variable_recovery_fast.py +67 -47
- angr/analyses/veritesting.py +10 -16
- angr/analyses/vfg.py +105 -151
- angr/analyses/vsa_ddg.py +3 -5
- angr/analyses/vtable.py +6 -6
- angr/analyses/xrefs.py +9 -13
- angr/angrdb/__init__.py +4 -2
- angr/angrdb/db.py +51 -53
- angr/angrdb/models.py +1 -0
- angr/angrdb/serializers/__init__.py +1 -0
- angr/angrdb/serializers/cfg_model.py +2 -2
- angr/angrdb/serializers/comments.py +1 -0
- angr/angrdb/serializers/funcs.py +4 -3
- angr/angrdb/serializers/kb.py +3 -2
- angr/angrdb/serializers/labels.py +1 -0
- angr/angrdb/serializers/structured_code.py +5 -10
- angr/angrdb/serializers/variables.py +6 -6
- angr/angrdb/serializers/xrefs.py +2 -2
- angr/annocfg.py +17 -25
- angr/blade.py +19 -23
- angr/block.py +11 -13
- angr/callable.py +4 -3
- angr/calling_conventions.py +80 -123
- angr/code_location.py +12 -13
- angr/codenode.py +2 -1
- angr/concretization_strategies/__init__.py +6 -6
- angr/concretization_strategies/any.py +5 -4
- angr/concretization_strategies/any_named.py +4 -1
- angr/concretization_strategies/controlled_data.py +5 -2
- angr/concretization_strategies/eval.py +2 -2
- angr/concretization_strategies/logging.py +1 -0
- angr/concretization_strategies/max.py +6 -6
- angr/concretization_strategies/nonzero.py +1 -0
- angr/concretization_strategies/nonzero_range.py +4 -3
- angr/concretization_strategies/norepeats.py +2 -1
- angr/concretization_strategies/norepeats_range.py +1 -0
- angr/concretization_strategies/range.py +1 -0
- angr/concretization_strategies/signed_add.py +15 -9
- angr/concretization_strategies/single.py +2 -0
- angr/concretization_strategies/solutions.py +1 -0
- angr/concretization_strategies/unlimited_range.py +1 -0
- angr/distributed/__init__.py +1 -0
- angr/distributed/server.py +2 -2
- angr/distributed/worker.py +3 -3
- angr/engines/__init__.py +1 -0
- angr/engines/concrete.py +4 -1
- angr/engines/engine.py +4 -6
- angr/engines/failure.py +2 -1
- angr/engines/hook.py +1 -0
- angr/engines/light/__init__.py +1 -0
- angr/engines/light/data.py +221 -255
- angr/engines/light/engine.py +66 -74
- angr/engines/pcode/__init__.py +1 -0
- angr/engines/pcode/behavior.py +5 -3
- angr/engines/pcode/cc.py +1 -0
- angr/engines/pcode/emulate.py +16 -19
- angr/engines/pcode/engine.py +8 -10
- angr/engines/pcode/lifter.py +62 -79
- angr/engines/procedure.py +1 -0
- angr/engines/soot/__init__.py +1 -0
- angr/engines/soot/engine.py +48 -53
- angr/engines/soot/exceptions.py +3 -0
- angr/engines/soot/expressions/__init__.py +1 -0
- angr/engines/soot/expressions/arrayref.py +1 -0
- angr/engines/soot/expressions/base.py +4 -5
- angr/engines/soot/expressions/binop.py +1 -0
- angr/engines/soot/expressions/cast.py +1 -0
- angr/engines/soot/expressions/condition.py +1 -0
- angr/engines/soot/expressions/constants.py +7 -5
- angr/engines/soot/expressions/instanceOf.py +1 -0
- angr/engines/soot/expressions/instancefieldref.py +1 -0
- angr/engines/soot/expressions/invoke.py +7 -9
- angr/engines/soot/expressions/length.py +1 -0
- angr/engines/soot/expressions/local.py +1 -0
- angr/engines/soot/expressions/new.py +1 -0
- angr/engines/soot/expressions/newArray.py +4 -1
- angr/engines/soot/expressions/newMultiArray.py +6 -4
- angr/engines/soot/expressions/paramref.py +1 -0
- angr/engines/soot/expressions/phi.py +1 -0
- angr/engines/soot/expressions/staticfieldref.py +1 -0
- angr/engines/soot/expressions/thisref.py +1 -0
- angr/engines/soot/expressions/unsupported.py +1 -0
- angr/engines/soot/field_dispatcher.py +5 -8
- angr/engines/soot/method_dispatcher.py +4 -7
- angr/engines/soot/statements/__init__.py +4 -4
- angr/engines/soot/statements/assign.py +1 -0
- angr/engines/soot/statements/base.py +6 -7
- angr/engines/soot/statements/goto.py +4 -1
- angr/engines/soot/statements/identity.py +1 -0
- angr/engines/soot/statements/if_.py +4 -1
- angr/engines/soot/statements/invoke.py +1 -0
- angr/engines/soot/statements/return_.py +1 -0
- angr/engines/soot/statements/switch.py +4 -1
- angr/engines/soot/statements/throw.py +5 -2
- angr/engines/soot/values/__init__.py +4 -2
- angr/engines/soot/values/arrayref.py +13 -15
- angr/engines/soot/values/base.py +4 -1
- angr/engines/soot/values/constants.py +1 -0
- angr/engines/soot/values/instancefieldref.py +1 -0
- angr/engines/soot/values/local.py +1 -0
- angr/engines/soot/values/paramref.py +1 -0
- angr/engines/soot/values/staticfieldref.py +1 -0
- angr/engines/soot/values/strref.py +3 -2
- angr/engines/soot/values/thisref.py +1 -0
- angr/engines/successors.py +20 -23
- angr/engines/syscall.py +9 -9
- angr/engines/unicorn.py +20 -14
- angr/engines/vex/__init__.py +1 -0
- angr/engines/vex/claripy/__init__.py +1 -0
- angr/engines/vex/claripy/ccall.py +86 -112
- angr/engines/vex/claripy/datalayer.py +12 -16
- angr/engines/vex/claripy/irop.py +85 -104
- angr/engines/vex/heavy/__init__.py +1 -0
- angr/engines/vex/heavy/actions.py +1 -0
- angr/engines/vex/heavy/concretizers.py +14 -15
- angr/engines/vex/heavy/dirty.py +20 -21
- angr/engines/vex/heavy/heavy.py +17 -20
- angr/engines/vex/heavy/inspect.py +1 -0
- angr/engines/vex/heavy/resilience.py +2 -2
- angr/engines/vex/heavy/super_fastpath.py +2 -2
- angr/engines/vex/lifter.py +28 -35
- angr/engines/vex/light/__init__.py +1 -0
- angr/engines/vex/light/light.py +2 -4
- angr/engines/vex/light/resilience.py +1 -0
- angr/engines/vex/light/slicing.py +1 -0
- angr/errors.py +2 -1
- angr/exploration_techniques/__init__.py +3 -2
- angr/exploration_techniques/bucketizer.py +2 -3
- angr/exploration_techniques/common.py +3 -3
- angr/exploration_techniques/dfs.py +1 -0
- angr/exploration_techniques/director.py +18 -20
- angr/exploration_techniques/driller_core.py +5 -6
- angr/exploration_techniques/explorer.py +7 -3
- angr/exploration_techniques/lengthlimiter.py +1 -0
- angr/exploration_techniques/local_loop_seer.py +2 -2
- angr/exploration_techniques/loop_seer.py +11 -14
- angr/exploration_techniques/manual_mergepoint.py +3 -2
- angr/exploration_techniques/memory_watcher.py +1 -0
- angr/exploration_techniques/oppologist.py +4 -4
- angr/exploration_techniques/slicecutor.py +1 -0
- angr/exploration_techniques/spiller.py +8 -8
- angr/exploration_techniques/spiller_db.py +1 -0
- angr/exploration_techniques/stochastic.py +3 -4
- angr/exploration_techniques/stub_stasher.py +1 -0
- angr/exploration_techniques/suggestions.py +3 -2
- angr/exploration_techniques/symbion.py +1 -0
- angr/exploration_techniques/tech_builder.py +1 -0
- angr/exploration_techniques/threading.py +1 -0
- angr/exploration_techniques/timeout.py +1 -0
- angr/exploration_techniques/tracer.py +36 -40
- angr/exploration_techniques/unique.py +1 -0
- angr/exploration_techniques/veritesting.py +1 -0
- angr/factory.py +9 -9
- angr/flirt/__init__.py +1 -0
- angr/flirt/build_sig.py +8 -12
- angr/keyed_region.py +10 -17
- angr/knowledge_base/__init__.py +1 -0
- angr/knowledge_base/knowledge_base.py +17 -17
- angr/knowledge_plugins/__init__.py +1 -0
- angr/knowledge_plugins/callsite_prototypes.py +1 -0
- angr/knowledge_plugins/cfg/__init__.py +2 -0
- angr/knowledge_plugins/cfg/cfg_manager.py +2 -1
- angr/knowledge_plugins/cfg/cfg_model.py +25 -42
- angr/knowledge_plugins/cfg/cfg_node.py +8 -19
- angr/knowledge_plugins/cfg/indirect_jump.py +3 -5
- angr/knowledge_plugins/cfg/memory_data.py +3 -3
- angr/knowledge_plugins/comments.py +1 -0
- angr/knowledge_plugins/custom_strings.py +1 -0
- angr/knowledge_plugins/data.py +1 -0
- angr/knowledge_plugins/debug_variables.py +18 -23
- angr/knowledge_plugins/functions/__init__.py +1 -0
- angr/knowledge_plugins/functions/function.py +49 -53
- angr/knowledge_plugins/functions/function_manager.py +14 -14
- angr/knowledge_plugins/functions/function_parser.py +38 -42
- angr/knowledge_plugins/functions/soot_function.py +5 -6
- angr/knowledge_plugins/indirect_jumps.py +1 -0
- angr/knowledge_plugins/key_definitions/__init__.py +1 -0
- angr/knowledge_plugins/key_definitions/atoms.py +65 -17
- angr/knowledge_plugins/key_definitions/constants.py +6 -0
- angr/knowledge_plugins/key_definitions/definition.py +22 -25
- angr/knowledge_plugins/key_definitions/environment.py +18 -14
- angr/knowledge_plugins/key_definitions/heap_address.py +4 -3
- angr/knowledge_plugins/key_definitions/key_definition_manager.py +5 -4
- angr/knowledge_plugins/key_definitions/live_definitions.py +36 -45
- angr/knowledge_plugins/key_definitions/liveness.py +18 -23
- angr/knowledge_plugins/key_definitions/rd_model.py +29 -34
- angr/knowledge_plugins/key_definitions/tag.py +7 -6
- angr/knowledge_plugins/key_definitions/undefined.py +3 -0
- angr/knowledge_plugins/key_definitions/unknown_size.py +3 -0
- angr/knowledge_plugins/key_definitions/uses.py +21 -23
- angr/knowledge_plugins/labels.py +3 -2
- angr/knowledge_plugins/patches.py +2 -1
- angr/knowledge_plugins/plugin.py +2 -1
- angr/knowledge_plugins/propagations/__init__.py +1 -0
- angr/knowledge_plugins/propagations/prop_value.py +25 -27
- angr/knowledge_plugins/propagations/propagation_manager.py +2 -2
- angr/knowledge_plugins/propagations/propagation_model.py +5 -4
- angr/knowledge_plugins/propagations/states.py +71 -81
- angr/knowledge_plugins/structured_code/__init__.py +1 -0
- angr/knowledge_plugins/structured_code/manager.py +5 -4
- angr/knowledge_plugins/sync/__init__.py +1 -0
- angr/knowledge_plugins/sync/sync_controller.py +10 -15
- angr/knowledge_plugins/types.py +1 -0
- angr/knowledge_plugins/variables/__init__.py +1 -0
- angr/knowledge_plugins/variables/variable_access.py +9 -10
- angr/knowledge_plugins/variables/variable_manager.py +84 -55
- angr/knowledge_plugins/xrefs/__init__.py +1 -0
- angr/knowledge_plugins/xrefs/xref.py +7 -11
- angr/knowledge_plugins/xrefs/xref_manager.py +1 -0
- angr/knowledge_plugins/xrefs/xref_types.py +3 -0
- angr/misc/__init__.py +1 -0
- angr/misc/ansi.py +1 -0
- angr/misc/autoimport.py +3 -2
- angr/misc/bug_report.py +6 -5
- angr/misc/hookset.py +3 -2
- angr/misc/loggers.py +2 -2
- angr/misc/picklable_lock.py +1 -0
- angr/misc/plugins.py +11 -13
- angr/misc/range.py +3 -0
- angr/misc/testing.py +2 -1
- angr/misc/ux.py +5 -5
- angr/misc/weakpatch.py +1 -0
- angr/procedures/__init__.py +1 -0
- angr/procedures/cgc/_terminate.py +1 -0
- angr/procedures/cgc/allocate.py +9 -10
- angr/procedures/cgc/deallocate.py +11 -3
- angr/procedures/cgc/fdwait.py +16 -13
- angr/procedures/cgc/random.py +12 -5
- angr/procedures/cgc/receive.py +30 -28
- angr/procedures/cgc/transmit.py +6 -4
- angr/procedures/definitions/__init__.py +9 -10
- angr/procedures/definitions/cgc.py +1 -0
- angr/procedures/definitions/glibc.py +1 -0
- angr/procedures/definitions/gnulib.py +1 -0
- angr/procedures/definitions/libstdcpp.py +1 -0
- angr/procedures/definitions/linux_kernel.py +1 -0
- angr/procedures/definitions/linux_loader.py +1 -0
- angr/procedures/definitions/msvcr.py +1 -0
- angr/procedures/definitions/parse_syscalls_from_local_system.py +2 -1
- angr/procedures/definitions/parse_win32json.py +27 -30
- angr/procedures/definitions/types_win32.py +1 -0
- angr/procedures/definitions/wdk_api-ms-win-dx-d3dkmt-l1-1-4.py +1 -0
- angr/procedures/definitions/wdk_api-ms-win-dx-d3dkmt-l1-1-6.py +1 -0
- angr/procedures/definitions/wdk_clfs.py +1 -0
- angr/procedures/definitions/wdk_fltmgr.py +1 -0
- angr/procedures/definitions/wdk_fwpkclnt.py +1 -0
- angr/procedures/definitions/wdk_fwpuclnt.py +1 -0
- angr/procedures/definitions/wdk_gdi32.py +1 -0
- angr/procedures/definitions/wdk_hal.py +1 -0
- angr/procedures/definitions/wdk_ksecdd.py +1 -0
- angr/procedures/definitions/wdk_ndis.py +1 -0
- angr/procedures/definitions/wdk_ntoskrnl.py +1 -0
- angr/procedures/definitions/wdk_offreg.py +1 -0
- angr/procedures/definitions/wdk_pshed.py +1 -0
- angr/procedures/definitions/wdk_secur32.py +1 -0
- angr/procedures/definitions/wdk_vhfum.py +1 -0
- angr/procedures/definitions/win32_aclui.py +1 -0
- angr/procedures/definitions/win32_activeds.py +1 -0
- angr/procedures/definitions/win32_advapi32.py +1 -0
- angr/procedures/definitions/win32_advpack.py +1 -0
- angr/procedures/definitions/win32_amsi.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-appmodel-runtime-l1-1-1.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-appmodel-runtime-l1-1-3.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-appmodel-runtime-l1-1-6.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-apiquery-l2-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-backgroundtask-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-comm-l1-1-1.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-comm-l1-1-2.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-enclave-l1-1-1.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-errorhandling-l1-1-3.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-featurestaging-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-featurestaging-l1-1-1.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-file-fromapp-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-handle-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-ioring-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-marshal-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-3.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-4.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-5.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-6.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-7.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-8.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-path-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-psm-appnotify-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-psm-appnotify-l1-1-1.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-realtime-l1-1-1.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-realtime-l1-1-2.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-slapi-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-state-helpers-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-synch-l1-2-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-sysinfo-l1-2-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-sysinfo-l1-2-3.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-sysinfo-l1-2-4.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-sysinfo-l1-2-6.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-util-l1-1-1.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-winrt-error-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-winrt-error-l1-1-1.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-winrt-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-winrt-registration-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-winrt-robuffer-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-winrt-roparameterizediid-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-winrt-string-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-winrt-string-l1-1-1.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-core-wow64-l1-1-1.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-devices-query-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-devices-query-l1-1-1.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-dx-d3dkmt-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-gaming-deviceinformation-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-gaming-expandedresources-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-gaming-tcui-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-gaming-tcui-l1-1-1.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-gaming-tcui-l1-1-2.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-gaming-tcui-l1-1-3.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-gaming-tcui-l1-1-4.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-mm-misc-l1-1-1.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-net-isolation-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-security-base-l1-2-2.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-security-isolatedcontainer-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-security-isolatedcontainer-l1-1-1.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-service-core-l1-1-3.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-service-core-l1-1-4.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-service-core-l1-1-5.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-shcore-scaling-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-shcore-scaling-l1-1-1.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-shcore-scaling-l1-1-2.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-shcore-stream-winrt-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_api-ms-win-wsl-api-l1-1-0.py +1 -0
- angr/procedures/definitions/win32_apphelp.py +1 -0
- angr/procedures/definitions/win32_authz.py +1 -0
- angr/procedures/definitions/win32_avicap32.py +1 -0
- angr/procedures/definitions/win32_avifil32.py +1 -0
- angr/procedures/definitions/win32_avrt.py +1 -0
- angr/procedures/definitions/win32_bcp47mrm.py +1 -0
- angr/procedures/definitions/win32_bcrypt.py +1 -0
- angr/procedures/definitions/win32_bcryptprimitives.py +1 -0
- angr/procedures/definitions/win32_bluetoothapis.py +1 -0
- angr/procedures/definitions/win32_bthprops.py +1 -0
- angr/procedures/definitions/win32_bthprops_cpl.py +1 -0
- angr/procedures/definitions/win32_cabinet.py +1 -0
- angr/procedures/definitions/win32_certadm.py +1 -0
- angr/procedures/definitions/win32_certpoleng.py +1 -0
- angr/procedures/definitions/win32_cfgmgr32.py +1 -0
- angr/procedures/definitions/win32_chakra.py +1 -0
- angr/procedures/definitions/win32_cldapi.py +1 -0
- angr/procedures/definitions/win32_clfsw32.py +1 -0
- angr/procedures/definitions/win32_clusapi.py +1 -0
- angr/procedures/definitions/win32_comctl32.py +1 -0
- angr/procedures/definitions/win32_comdlg32.py +1 -0
- angr/procedures/definitions/win32_compstui.py +1 -0
- angr/procedures/definitions/win32_computecore.py +1 -0
- angr/procedures/definitions/win32_computenetwork.py +1 -0
- angr/procedures/definitions/win32_computestorage.py +1 -0
- angr/procedures/definitions/win32_comsvcs.py +1 -0
- angr/procedures/definitions/win32_coremessaging.py +1 -0
- angr/procedures/definitions/win32_credui.py +1 -0
- angr/procedures/definitions/win32_crypt32.py +1 -0
- angr/procedures/definitions/win32_cryptnet.py +1 -0
- angr/procedures/definitions/win32_cryptui.py +1 -0
- angr/procedures/definitions/win32_cryptxml.py +1 -0
- angr/procedures/definitions/win32_cscapi.py +1 -0
- angr/procedures/definitions/win32_d2d1.py +1 -0
- angr/procedures/definitions/win32_d3d10.py +1 -0
- angr/procedures/definitions/win32_d3d10_1.py +1 -0
- angr/procedures/definitions/win32_d3d11.py +1 -0
- angr/procedures/definitions/win32_d3d12.py +1 -0
- angr/procedures/definitions/win32_d3d9.py +1 -0
- angr/procedures/definitions/win32_d3dcompiler_47.py +1 -0
- angr/procedures/definitions/win32_d3dcsx.py +1 -0
- angr/procedures/definitions/win32_davclnt.py +1 -0
- angr/procedures/definitions/win32_dbgeng.py +1 -0
- angr/procedures/definitions/win32_dbghelp.py +1 -0
- angr/procedures/definitions/win32_dbgmodel.py +1 -0
- angr/procedures/definitions/win32_dciman32.py +1 -0
- angr/procedures/definitions/win32_dcomp.py +1 -0
- angr/procedures/definitions/win32_ddraw.py +1 -0
- angr/procedures/definitions/win32_deviceaccess.py +1 -0
- angr/procedures/definitions/win32_dflayout.py +1 -0
- angr/procedures/definitions/win32_dhcpcsvc.py +1 -0
- angr/procedures/definitions/win32_dhcpcsvc6.py +1 -0
- angr/procedures/definitions/win32_dhcpsapi.py +1 -0
- angr/procedures/definitions/win32_diagnosticdataquery.py +1 -0
- angr/procedures/definitions/win32_dinput8.py +1 -0
- angr/procedures/definitions/win32_directml.py +1 -0
- angr/procedures/definitions/win32_dmprocessxmlfiltered.py +1 -0
- angr/procedures/definitions/win32_dnsapi.py +1 -0
- angr/procedures/definitions/win32_drt.py +1 -0
- angr/procedures/definitions/win32_drtprov.py +1 -0
- angr/procedures/definitions/win32_drttransport.py +1 -0
- angr/procedures/definitions/win32_dsound.py +1 -0
- angr/procedures/definitions/win32_dsparse.py +1 -0
- angr/procedures/definitions/win32_dsprop.py +1 -0
- angr/procedures/definitions/win32_dssec.py +1 -0
- angr/procedures/definitions/win32_dsuiext.py +1 -0
- angr/procedures/definitions/win32_dwmapi.py +1 -0
- angr/procedures/definitions/win32_dwrite.py +1 -0
- angr/procedures/definitions/win32_dxcompiler.py +1 -0
- angr/procedures/definitions/win32_dxcore.py +1 -0
- angr/procedures/definitions/win32_dxgi.py +1 -0
- angr/procedures/definitions/win32_dxva2.py +1 -0
- angr/procedures/definitions/win32_eappcfg.py +1 -0
- angr/procedures/definitions/win32_eappprxy.py +1 -0
- angr/procedures/definitions/win32_efswrt.py +1 -0
- angr/procedures/definitions/win32_elscore.py +1 -0
- angr/procedures/definitions/win32_esent.py +1 -0
- angr/procedures/definitions/win32_evr.py +1 -0
- angr/procedures/definitions/win32_faultrep.py +1 -0
- angr/procedures/definitions/win32_fhsvcctl.py +1 -0
- angr/procedures/definitions/win32_firewallapi.py +1 -0
- angr/procedures/definitions/win32_fltlib.py +1 -0
- angr/procedures/definitions/win32_fontsub.py +1 -0
- angr/procedures/definitions/win32_forceinline.py +1 -0
- angr/procedures/definitions/win32_fwpuclnt.py +1 -0
- angr/procedures/definitions/win32_fxsutility.py +1 -0
- angr/procedures/definitions/win32_gdi32.py +1 -0
- angr/procedures/definitions/win32_gdiplus.py +1 -0
- angr/procedures/definitions/win32_glu32.py +1 -0
- angr/procedures/definitions/win32_gpedit.py +1 -0
- angr/procedures/definitions/win32_hhctrl_ocx.py +1 -0
- angr/procedures/definitions/win32_hid.py +1 -0
- angr/procedures/definitions/win32_hlink.py +1 -0
- angr/procedures/definitions/win32_hrtfapo.py +1 -0
- angr/procedures/definitions/win32_httpapi.py +1 -0
- angr/procedures/definitions/win32_icm32.py +1 -0
- angr/procedures/definitions/win32_icmui.py +1 -0
- angr/procedures/definitions/win32_icu.py +1 -0
- angr/procedures/definitions/win32_ieframe.py +1 -0
- angr/procedures/definitions/win32_imagehlp.py +1 -0
- angr/procedures/definitions/win32_imgutil.py +1 -0
- angr/procedures/definitions/win32_imm32.py +1 -0
- angr/procedures/definitions/win32_infocardapi.py +1 -0
- angr/procedures/definitions/win32_inkobjcore.py +1 -0
- angr/procedures/definitions/win32_iphlpapi.py +1 -0
- angr/procedures/definitions/win32_iscsidsc.py +1 -0
- angr/procedures/definitions/win32_isolatedwindowsenvironmentutils.py +1 -0
- angr/procedures/definitions/win32_kernel32.py +1 -0
- angr/procedures/definitions/win32_kernelbase.py +1 -0
- angr/procedures/definitions/win32_keycredmgr.py +1 -0
- angr/procedures/definitions/win32_ksproxy_ax.py +1 -0
- angr/procedures/definitions/win32_ksuser.py +1 -0
- angr/procedures/definitions/win32_ktmw32.py +1 -0
- angr/procedures/definitions/win32_licenseprotection.py +1 -0
- angr/procedures/definitions/win32_loadperf.py +1 -0
- angr/procedures/definitions/win32_magnification.py +1 -0
- angr/procedures/definitions/win32_mapi32.py +1 -0
- angr/procedures/definitions/win32_mdmlocalmanagement.py +1 -0
- angr/procedures/definitions/win32_mdmregistration.py +1 -0
- angr/procedures/definitions/win32_mf.py +1 -0
- angr/procedures/definitions/win32_mfcore.py +1 -0
- angr/procedures/definitions/win32_mfplat.py +1 -0
- angr/procedures/definitions/win32_mfplay.py +1 -0
- angr/procedures/definitions/win32_mfreadwrite.py +1 -0
- angr/procedures/definitions/win32_mfsensorgroup.py +1 -0
- angr/procedures/definitions/win32_mfsrcsnk.py +1 -0
- angr/procedures/definitions/win32_mgmtapi.py +1 -0
- angr/procedures/definitions/win32_mi.py +1 -0
- angr/procedures/definitions/win32_mmdevapi.py +1 -0
- angr/procedures/definitions/win32_mpr.py +1 -0
- angr/procedures/definitions/win32_mprapi.py +1 -0
- angr/procedures/definitions/win32_mqrt.py +1 -0
- angr/procedures/definitions/win32_mrmsupport.py +1 -0
- angr/procedures/definitions/win32_msacm32.py +1 -0
- angr/procedures/definitions/win32_msajapi.py +1 -0
- angr/procedures/definitions/win32_mscms.py +1 -0
- angr/procedures/definitions/win32_mscoree.py +1 -0
- angr/procedures/definitions/win32_msctfmonitor.py +1 -0
- angr/procedures/definitions/win32_msdelta.py +1 -0
- angr/procedures/definitions/win32_msdmo.py +1 -0
- angr/procedures/definitions/win32_msdrm.py +1 -0
- angr/procedures/definitions/win32_msi.py +1 -0
- angr/procedures/definitions/win32_msimg32.py +1 -0
- angr/procedures/definitions/win32_mspatcha.py +1 -0
- angr/procedures/definitions/win32_mspatchc.py +1 -0
- angr/procedures/definitions/win32_msports.py +1 -0
- angr/procedures/definitions/win32_msrating.py +1 -0
- angr/procedures/definitions/win32_mssign32.py +1 -0
- angr/procedures/definitions/win32_mstask.py +1 -0
- angr/procedures/definitions/win32_msvfw32.py +1 -0
- angr/procedures/definitions/win32_mswsock.py +1 -0
- angr/procedures/definitions/win32_mtxdm.py +1 -0
- angr/procedures/definitions/win32_ncrypt.py +1 -0
- angr/procedures/definitions/win32_ndfapi.py +1 -0
- angr/procedures/definitions/win32_netapi32.py +1 -0
- angr/procedures/definitions/win32_netsh.py +1 -0
- angr/procedures/definitions/win32_netshell.py +1 -0
- angr/procedures/definitions/win32_newdev.py +1 -0
- angr/procedures/definitions/win32_ninput.py +1 -0
- angr/procedures/definitions/win32_normaliz.py +1 -0
- angr/procedures/definitions/win32_ntdll.py +1 -0
- angr/procedures/definitions/win32_ntdllk.py +1 -0
- angr/procedures/definitions/win32_ntdsapi.py +1 -0
- angr/procedures/definitions/win32_ntlanman.py +1 -0
- angr/procedures/definitions/win32_odbc32.py +1 -0
- angr/procedures/definitions/win32_odbcbcp.py +1 -0
- angr/procedures/definitions/win32_ole32.py +1 -0
- angr/procedures/definitions/win32_oleacc.py +1 -0
- angr/procedures/definitions/win32_oleaut32.py +1 -0
- angr/procedures/definitions/win32_oledlg.py +1 -0
- angr/procedures/definitions/win32_ondemandconnroutehelper.py +1 -0
- angr/procedures/definitions/win32_opengl32.py +1 -0
- angr/procedures/definitions/win32_opmxbox.py +1 -0
- angr/procedures/definitions/win32_p2p.py +1 -0
- angr/procedures/definitions/win32_p2pgraph.py +1 -0
- angr/procedures/definitions/win32_pdh.py +1 -0
- angr/procedures/definitions/win32_peerdist.py +1 -0
- angr/procedures/definitions/win32_powrprof.py +1 -0
- angr/procedures/definitions/win32_prntvpt.py +1 -0
- angr/procedures/definitions/win32_projectedfslib.py +1 -0
- angr/procedures/definitions/win32_propsys.py +1 -0
- angr/procedures/definitions/win32_psapi.py +1 -0
- angr/procedures/definitions/win32_quartz.py +1 -0
- angr/procedures/definitions/win32_query.py +1 -0
- angr/procedures/definitions/win32_qwave.py +1 -0
- angr/procedures/definitions/win32_rasapi32.py +1 -0
- angr/procedures/definitions/win32_rasdlg.py +1 -0
- angr/procedures/definitions/win32_resutils.py +1 -0
- angr/procedures/definitions/win32_rometadata.py +1 -0
- angr/procedures/definitions/win32_rpcns4.py +1 -0
- angr/procedures/definitions/win32_rpcproxy.py +1 -0
- angr/procedures/definitions/win32_rpcrt4.py +1 -0
- angr/procedures/definitions/win32_rstrtmgr.py +1 -0
- angr/procedures/definitions/win32_rtm.py +1 -0
- angr/procedures/definitions/win32_rtutils.py +1 -0
- angr/procedures/definitions/win32_rtworkq.py +1 -0
- angr/procedures/definitions/win32_sas.py +1 -0
- angr/procedures/definitions/win32_scarddlg.py +1 -0
- angr/procedures/definitions/win32_schannel.py +1 -0
- angr/procedures/definitions/win32_sechost.py +1 -0
- angr/procedures/definitions/win32_secur32.py +1 -0
- angr/procedures/definitions/win32_sensapi.py +1 -0
- angr/procedures/definitions/win32_sensorsutilsv2.py +1 -0
- angr/procedures/definitions/win32_setupapi.py +1 -0
- angr/procedures/definitions/win32_sfc.py +1 -0
- angr/procedures/definitions/win32_shdocvw.py +1 -0
- angr/procedures/definitions/win32_shell32.py +1 -0
- angr/procedures/definitions/win32_shlwapi.py +1 -0
- angr/procedures/definitions/win32_slc.py +1 -0
- angr/procedures/definitions/win32_slcext.py +1 -0
- angr/procedures/definitions/win32_slwga.py +1 -0
- angr/procedures/definitions/win32_snmpapi.py +1 -0
- angr/procedures/definitions/win32_spoolss.py +1 -0
- angr/procedures/definitions/win32_srclient.py +1 -0
- angr/procedures/definitions/win32_srpapi.py +1 -0
- angr/procedures/definitions/win32_sspicli.py +1 -0
- angr/procedures/definitions/win32_sti.py +1 -0
- angr/procedures/definitions/win32_t2embed.py +1 -0
- angr/procedures/definitions/win32_tapi32.py +1 -0
- angr/procedures/definitions/win32_tbs.py +1 -0
- angr/procedures/definitions/win32_tdh.py +1 -0
- angr/procedures/definitions/win32_tokenbinding.py +1 -0
- angr/procedures/definitions/win32_traffic.py +1 -0
- angr/procedures/definitions/win32_txfw32.py +1 -0
- angr/procedures/definitions/win32_ualapi.py +1 -0
- angr/procedures/definitions/win32_uiautomationcore.py +1 -0
- angr/procedures/definitions/win32_urlmon.py +1 -0
- angr/procedures/definitions/win32_user32.py +1 -0
- angr/procedures/definitions/win32_userenv.py +1 -0
- angr/procedures/definitions/win32_usp10.py +1 -0
- angr/procedures/definitions/win32_uxtheme.py +1 -0
- angr/procedures/definitions/win32_verifier.py +1 -0
- angr/procedures/definitions/win32_version.py +1 -0
- angr/procedures/definitions/win32_vertdll.py +1 -0
- angr/procedures/definitions/win32_virtdisk.py +1 -0
- angr/procedures/definitions/win32_vmdevicehost.py +1 -0
- angr/procedures/definitions/win32_vmsavedstatedumpprovider.py +1 -0
- angr/procedures/definitions/win32_vssapi.py +1 -0
- angr/procedures/definitions/win32_wcmapi.py +1 -0
- angr/procedures/definitions/win32_wdsbp.py +1 -0
- angr/procedures/definitions/win32_wdsclientapi.py +1 -0
- angr/procedures/definitions/win32_wdsmc.py +1 -0
- angr/procedures/definitions/win32_wdspxe.py +1 -0
- angr/procedures/definitions/win32_wdstptc.py +1 -0
- angr/procedures/definitions/win32_webauthn.py +1 -0
- angr/procedures/definitions/win32_webservices.py +1 -0
- angr/procedures/definitions/win32_websocket.py +1 -0
- angr/procedures/definitions/win32_wecapi.py +1 -0
- angr/procedures/definitions/win32_wer.py +1 -0
- angr/procedures/definitions/win32_wevtapi.py +1 -0
- angr/procedures/definitions/win32_winbio.py +1 -0
- angr/procedures/definitions/win32_windows_ai_machinelearning.py +1 -0
- angr/procedures/definitions/win32_windows_data_pdf.py +1 -0
- angr/procedures/definitions/win32_windows_media_mediacontrol.py +1 -0
- angr/procedures/definitions/win32_windows_networking.py +1 -0
- angr/procedures/definitions/win32_windows_ui_xaml.py +1 -0
- angr/procedures/definitions/win32_windowscodecs.py +1 -0
- angr/procedures/definitions/win32_winfax.py +1 -0
- angr/procedures/definitions/win32_winhttp.py +1 -0
- angr/procedures/definitions/win32_winhvemulation.py +1 -0
- angr/procedures/definitions/win32_winhvplatform.py +1 -0
- angr/procedures/definitions/win32_wininet.py +1 -0
- angr/procedures/definitions/win32_winml.py +1 -0
- angr/procedures/definitions/win32_winmm.py +1 -0
- angr/procedures/definitions/win32_winscard.py +1 -0
- angr/procedures/definitions/win32_winspool.py +1 -0
- angr/procedures/definitions/win32_winspool_drv.py +1 -0
- angr/procedures/definitions/win32_wintrust.py +1 -0
- angr/procedures/definitions/win32_winusb.py +1 -0
- angr/procedures/definitions/win32_wlanapi.py +1 -0
- angr/procedures/definitions/win32_wlanui.py +1 -0
- angr/procedures/definitions/win32_wldap32.py +1 -0
- angr/procedures/definitions/win32_wldp.py +1 -0
- angr/procedures/definitions/win32_wmvcore.py +1 -0
- angr/procedures/definitions/win32_wnvapi.py +1 -0
- angr/procedures/definitions/win32_wofutil.py +1 -0
- angr/procedures/definitions/win32_ws2_32.py +1 -0
- angr/procedures/definitions/win32_wscapi.py +1 -0
- angr/procedures/definitions/win32_wsclient.py +1 -0
- angr/procedures/definitions/win32_wsdapi.py +1 -0
- angr/procedures/definitions/win32_wsmsvc.py +1 -0
- angr/procedures/definitions/win32_wsnmp32.py +1 -0
- angr/procedures/definitions/win32_wtsapi32.py +1 -0
- angr/procedures/definitions/win32_xaudio2_8.py +1 -0
- angr/procedures/definitions/win32_xinput1_4.py +1 -0
- angr/procedures/definitions/win32_xinputuap.py +1 -0
- angr/procedures/definitions/win32_xmllite.py +1 -0
- angr/procedures/definitions/win32_xolehlp.py +1 -0
- angr/procedures/definitions/win32_xpsprint.py +1 -0
- angr/procedures/glibc/__ctype_b_loc.py +2 -3
- angr/procedures/glibc/__ctype_tolower_loc.py +2 -3
- angr/procedures/glibc/__ctype_toupper_loc.py +2 -3
- angr/procedures/glibc/__errno_location.py +1 -0
- angr/procedures/glibc/__libc_init.py +1 -0
- angr/procedures/glibc/__libc_start_main.py +7 -7
- angr/procedures/glibc/dynamic_loading.py +1 -0
- angr/procedures/glibc/scanf.py +1 -0
- angr/procedures/glibc/sscanf.py +1 -0
- angr/procedures/gnulib/xalloc_die.py +1 -0
- angr/procedures/gnulib/xstrtol_fatal.py +1 -0
- angr/procedures/java/__init__.py +1 -0
- angr/procedures/java/unconstrained.py +3 -2
- angr/procedures/java_io/read.py +1 -0
- angr/procedures/java_io/write.py +1 -0
- angr/procedures/java_jni/__init__.py +8 -9
- angr/procedures/java_jni/array_operations.py +4 -1
- angr/procedures/java_jni/class_and_interface_operations.py +3 -3
- angr/procedures/java_jni/field_access.py +3 -6
- angr/procedures/java_jni/global_and_local_refs.py +1 -0
- angr/procedures/java_jni/method_calls.py +3 -2
- angr/procedures/java_jni/not_implemented.py +2 -1
- angr/procedures/java_jni/object_operations.py +3 -4
- angr/procedures/java_jni/string_operations.py +1 -0
- angr/procedures/java_jni/version_information.py +1 -0
- angr/procedures/java_lang/character.py +2 -3
- angr/procedures/java_lang/double.py +2 -2
- angr/procedures/java_lang/exit.py +1 -0
- angr/procedures/java_lang/getsimplename.py +2 -2
- angr/procedures/java_lang/integer.py +1 -0
- angr/procedures/java_lang/load_library.py +1 -0
- angr/procedures/java_lang/math.py +1 -0
- angr/procedures/java_lang/string.py +3 -3
- angr/procedures/java_lang/stringbuilder.py +1 -0
- angr/procedures/java_lang/system.py +1 -0
- angr/procedures/java_util/collection.py +1 -0
- angr/procedures/java_util/iterator.py +1 -0
- angr/procedures/java_util/list.py +1 -0
- angr/procedures/java_util/map.py +3 -4
- angr/procedures/java_util/random.py +4 -1
- angr/procedures/java_util/scanner_nextline.py +1 -0
- angr/procedures/libc/abort.py +1 -0
- angr/procedures/libc/access.py +5 -2
- angr/procedures/libc/atoi.py +2 -2
- angr/procedures/libc/atol.py +1 -0
- angr/procedures/libc/calloc.py +1 -0
- angr/procedures/libc/closelog.py +1 -0
- angr/procedures/libc/err.py +1 -0
- angr/procedures/libc/error.py +2 -3
- angr/procedures/libc/exit.py +1 -0
- angr/procedures/libc/fclose.py +2 -3
- angr/procedures/libc/feof.py +5 -3
- angr/procedures/libc/fflush.py +1 -0
- angr/procedures/libc/fgetc.py +4 -1
- angr/procedures/libc/fgets.py +22 -22
- angr/procedures/libc/fopen.py +9 -10
- angr/procedures/libc/fprintf.py +1 -0
- angr/procedures/libc/fputc.py +1 -0
- angr/procedures/libc/fputs.py +1 -0
- angr/procedures/libc/fread.py +5 -3
- angr/procedures/libc/free.py +1 -0
- angr/procedures/libc/fscanf.py +2 -2
- angr/procedures/libc/fseek.py +7 -5
- angr/procedures/libc/ftell.py +1 -0
- angr/procedures/libc/fwrite.py +1 -0
- angr/procedures/libc/getchar.py +2 -2
- angr/procedures/libc/getdelim.py +30 -27
- angr/procedures/libc/getegid.py +1 -0
- angr/procedures/libc/geteuid.py +1 -0
- angr/procedures/libc/getgid.py +1 -0
- angr/procedures/libc/gets.py +20 -18
- angr/procedures/libc/getuid.py +1 -0
- angr/procedures/libc/malloc.py +1 -0
- angr/procedures/libc/memcmp.py +21 -21
- angr/procedures/libc/memcpy.py +1 -0
- angr/procedures/libc/memset.py +10 -7
- angr/procedures/libc/openlog.py +1 -0
- angr/procedures/libc/perror.py +1 -0
- angr/procedures/libc/printf.py +1 -0
- angr/procedures/libc/putchar.py +1 -0
- angr/procedures/libc/puts.py +4 -1
- angr/procedures/libc/rand.py +1 -0
- angr/procedures/libc/realloc.py +1 -0
- angr/procedures/libc/rewind.py +2 -1
- angr/procedures/libc/scanf.py +2 -2
- angr/procedures/libc/setbuf.py +1 -0
- angr/procedures/libc/setvbuf.py +1 -0
- angr/procedures/libc/snprintf.py +5 -2
- angr/procedures/libc/sprintf.py +4 -1
- angr/procedures/libc/srand.py +1 -0
- angr/procedures/libc/sscanf.py +2 -2
- angr/procedures/libc/stpcpy.py +2 -2
- angr/procedures/libc/strcat.py +1 -0
- angr/procedures/libc/strchr.py +7 -3
- angr/procedures/libc/strcmp.py +6 -3
- angr/procedures/libc/strcpy.py +2 -2
- angr/procedures/libc/strlen.py +38 -34
- angr/procedures/libc/strncat.py +1 -0
- angr/procedures/libc/strncmp.py +34 -36
- angr/procedures/libc/strncpy.py +6 -2
- angr/procedures/libc/strnlen.py +2 -2
- angr/procedures/libc/strstr.py +17 -10
- angr/procedures/libc/strtol.py +39 -41
- angr/procedures/libc/strtoul.py +2 -2
- angr/procedures/libc/system.py +1 -0
- angr/procedures/libc/time.py +2 -2
- angr/procedures/libc/tmpnam.py +1 -0
- angr/procedures/libc/tolower.py +4 -1
- angr/procedures/libc/toupper.py +4 -1
- angr/procedures/libc/ungetc.py +1 -0
- angr/procedures/libc/vsnprintf.py +1 -0
- angr/procedures/libc/wchar.py +1 -0
- angr/procedures/libstdcpp/_unwind_resume.py +1 -0
- angr/procedures/libstdcpp/std____throw_bad_alloc.py +1 -0
- angr/procedures/libstdcpp/std____throw_bad_cast.py +1 -0
- angr/procedures/libstdcpp/std____throw_length_error.py +1 -0
- angr/procedures/libstdcpp/std____throw_logic_error.py +1 -0
- angr/procedures/libstdcpp/std__terminate.py +1 -0
- angr/procedures/linux_kernel/access.py +1 -0
- angr/procedures/linux_kernel/arch_prctl.py +1 -0
- angr/procedures/linux_kernel/arm_user_helpers.py +1 -0
- angr/procedures/linux_kernel/brk.py +1 -0
- angr/procedures/linux_kernel/cwd.py +1 -0
- angr/procedures/linux_kernel/fstat.py +15 -14
- angr/procedures/linux_kernel/fstat64.py +17 -16
- angr/procedures/linux_kernel/futex.py +3 -3
- angr/procedures/linux_kernel/getegid.py +1 -0
- angr/procedures/linux_kernel/geteuid.py +1 -0
- angr/procedures/linux_kernel/getgid.py +1 -0
- angr/procedures/linux_kernel/getpid.py +1 -0
- angr/procedures/linux_kernel/getrlimit.py +3 -3
- angr/procedures/linux_kernel/gettid.py +1 -0
- angr/procedures/linux_kernel/getuid.py +1 -0
- angr/procedures/linux_kernel/iovec.py +1 -0
- angr/procedures/linux_kernel/lseek.py +6 -3
- angr/procedures/linux_kernel/mmap.py +1 -0
- angr/procedures/linux_kernel/mprotect.py +7 -6
- angr/procedures/linux_kernel/munmap.py +1 -0
- angr/procedures/linux_kernel/openat.py +3 -5
- angr/procedures/linux_kernel/set_tid_address.py +1 -0
- angr/procedures/linux_kernel/sigaction.py +5 -2
- angr/procedures/linux_kernel/sigprocmask.py +6 -3
- angr/procedures/linux_kernel/stat.py +3 -2
- angr/procedures/linux_kernel/sysinfo.py +1 -0
- angr/procedures/linux_kernel/tgkill.py +4 -1
- angr/procedures/linux_kernel/time.py +7 -3
- angr/procedures/linux_kernel/uid.py +1 -0
- angr/procedures/linux_kernel/uname.py +1 -0
- angr/procedures/linux_kernel/unlink.py +2 -2
- angr/procedures/linux_kernel/vsyscall.py +1 -0
- angr/procedures/linux_loader/_dl_initial_error_catch_tsd.py +1 -0
- angr/procedures/linux_loader/_dl_rtld_lock.py +1 -0
- angr/procedures/linux_loader/sim_loader.py +1 -0
- angr/procedures/linux_loader/tls.py +2 -2
- angr/procedures/msvcr/__getmainargs.py +1 -0
- angr/procedures/msvcr/_initterm.py +1 -0
- angr/procedures/msvcr/fmode.py +4 -1
- angr/procedures/ntdll/exceptions.py +7 -4
- angr/procedures/posix/accept.py +2 -2
- angr/procedures/posix/bind.py +1 -0
- angr/procedures/posix/bzero.py +4 -1
- angr/procedures/posix/chroot.py +1 -0
- angr/procedures/posix/close.py +2 -2
- angr/procedures/posix/closedir.py +1 -0
- angr/procedures/posix/dup.py +4 -3
- angr/procedures/posix/fcntl.py +1 -0
- angr/procedures/posix/fdopen.py +19 -20
- angr/procedures/posix/fileno.py +1 -0
- angr/procedures/posix/fork.py +7 -4
- angr/procedures/posix/getenv.py +1 -0
- angr/procedures/posix/gethostbyname.py +1 -0
- angr/procedures/posix/getpass.py +1 -0
- angr/procedures/posix/getsockopt.py +1 -0
- angr/procedures/posix/htonl.py +2 -2
- angr/procedures/posix/htons.py +2 -2
- angr/procedures/posix/inet_ntoa.py +3 -5
- angr/procedures/posix/listen.py +1 -0
- angr/procedures/posix/mmap.py +8 -4
- angr/procedures/posix/open.py +1 -0
- angr/procedures/posix/opendir.py +1 -0
- angr/procedures/posix/poll.py +8 -7
- angr/procedures/posix/pread64.py +1 -0
- angr/procedures/posix/pthread.py +3 -3
- angr/procedures/posix/pwrite64.py +1 -0
- angr/procedures/posix/read.py +1 -0
- angr/procedures/posix/readdir.py +11 -8
- angr/procedures/posix/recv.py +1 -0
- angr/procedures/posix/recvfrom.py +1 -0
- angr/procedures/posix/select.py +10 -8
- angr/procedures/posix/send.py +6 -5
- angr/procedures/posix/setsockopt.py +1 -0
- angr/procedures/posix/sigaction.py +5 -2
- angr/procedures/posix/sim_time.py +4 -1
- angr/procedures/posix/sleep.py +1 -0
- angr/procedures/posix/socket.py +2 -2
- angr/procedures/posix/strcasecmp.py +4 -1
- angr/procedures/posix/strdup.py +1 -0
- angr/procedures/posix/strtok_r.py +38 -39
- angr/procedures/posix/syslog.py +1 -0
- angr/procedures/posix/tz.py +1 -0
- angr/procedures/posix/unlink.py +1 -0
- angr/procedures/posix/usleep.py +1 -0
- angr/procedures/posix/write.py +1 -0
- angr/procedures/procedure_dict.py +1 -0
- angr/procedures/stubs/CallReturn.py +1 -0
- angr/procedures/stubs/NoReturnUnconstrained.py +1 -0
- angr/procedures/stubs/Nop.py +1 -0
- angr/procedures/stubs/PathTerminator.py +1 -0
- angr/procedures/stubs/Redirect.py +5 -2
- angr/procedures/stubs/ReturnChar.py +4 -3
- angr/procedures/stubs/ReturnUnconstrained.py +2 -1
- angr/procedures/stubs/UnresolvableCallTarget.py +1 -0
- angr/procedures/stubs/UnresolvableJumpTarget.py +1 -0
- angr/procedures/stubs/UserHook.py +4 -1
- angr/procedures/stubs/b64_decode.py +4 -1
- angr/procedures/stubs/caller.py +1 -0
- angr/procedures/stubs/crazy_scanf.py +7 -4
- angr/procedures/stubs/format_parser.py +24 -30
- angr/procedures/stubs/syscall_stub.py +6 -7
- angr/procedures/testing/manyargs.py +1 -0
- angr/procedures/testing/retreg.py +2 -2
- angr/procedures/tracer/random.py +1 -0
- angr/procedures/tracer/receive.py +6 -4
- angr/procedures/tracer/transmit.py +6 -4
- angr/procedures/uclibc/__uClibc_main.py +1 -0
- angr/procedures/win32/EncodePointer.py +1 -0
- angr/procedures/win32/ExitProcess.py +1 -0
- angr/procedures/win32/GetCommandLine.py +1 -0
- angr/procedures/win32/GetCurrentProcessId.py +1 -0
- angr/procedures/win32/GetCurrentThreadId.py +1 -0
- angr/procedures/win32/GetLastInputInfo.py +5 -2
- angr/procedures/win32/GetModuleHandle.py +3 -4
- angr/procedures/win32/GetProcessAffinityMask.py +5 -2
- angr/procedures/win32/InterlockedExchange.py +2 -1
- angr/procedures/win32/IsProcessorFeaturePresent.py +1 -0
- angr/procedures/win32/VirtualAlloc.py +2 -1
- angr/procedures/win32/VirtualProtect.py +1 -0
- angr/procedures/win32/critical_section.py +1 -0
- angr/procedures/win32/dynamic_loading.py +2 -1
- angr/procedures/win32/file_handles.py +4 -4
- angr/procedures/win32/gethostbyname.py +5 -3
- angr/procedures/win32/heap.py +4 -1
- angr/procedures/win32/is_bad_ptr.py +1 -0
- angr/procedures/win32/local_storage.py +11 -8
- angr/procedures/win32/mutex.py +1 -0
- angr/procedures/win32/sim_time.py +9 -9
- angr/procedures/win32/system_paths.py +5 -4
- angr/procedures/win32_kernel/ExAllocatePool.py +1 -0
- angr/procedures/win32_kernel/ExFreePoolWithTag.py +1 -0
- angr/procedures/win_user32/chars.py +5 -2
- angr/procedures/win_user32/keyboard.py +1 -0
- angr/procedures/win_user32/messagebox.py +5 -5
- angr/project.py +15 -22
- angr/protos/__init__.py +1 -0
- angr/serializable.py +6 -3
- angr/sim_manager.py +18 -18
- angr/sim_options.py +5 -7
- angr/sim_procedure.py +18 -17
- angr/sim_state.py +48 -59
- angr/sim_state_options.py +9 -15
- angr/sim_type.py +96 -126
- angr/sim_variable.py +23 -38
- angr/simos/__init__.py +3 -1
- angr/simos/cgc.py +4 -3
- angr/simos/javavm.py +77 -83
- angr/simos/linux.py +53 -63
- angr/simos/simos.py +16 -24
- angr/simos/snimmuc_nxp.py +3 -6
- angr/simos/userland.py +6 -6
- angr/simos/windows.py +18 -15
- angr/slicer.py +13 -11
- angr/state_hierarchy.py +3 -3
- angr/state_plugins/__init__.py +1 -0
- angr/state_plugins/callstack.py +19 -18
- angr/state_plugins/cgc.py +5 -4
- angr/state_plugins/concrete.py +7 -8
- angr/state_plugins/debug_variables.py +15 -17
- angr/state_plugins/filesystem.py +13 -19
- angr/state_plugins/gdb.py +3 -2
- angr/state_plugins/globals.py +5 -1
- angr/state_plugins/heap/__init__.py +1 -0
- angr/state_plugins/heap/heap_base.py +1 -0
- angr/state_plugins/heap/heap_brk.py +14 -9
- angr/state_plugins/heap/heap_freelist.py +12 -9
- angr/state_plugins/heap/heap_libc.py +1 -0
- angr/state_plugins/heap/heap_ptmalloc.py +32 -40
- angr/state_plugins/heap/utils.py +1 -0
- angr/state_plugins/history.py +14 -15
- angr/state_plugins/inspect.py +1 -0
- angr/state_plugins/javavm_classloader.py +3 -2
- angr/state_plugins/jni_references.py +2 -1
- angr/state_plugins/libc.py +4 -4
- angr/state_plugins/light_registers.py +8 -10
- angr/state_plugins/log.py +1 -0
- angr/state_plugins/loop_data.py +1 -0
- angr/state_plugins/plugin.py +9 -10
- angr/state_plugins/posix.py +39 -45
- angr/state_plugins/preconstrainer.py +4 -2
- angr/state_plugins/scratch.py +5 -4
- angr/state_plugins/sim_action.py +15 -20
- angr/state_plugins/sim_action_object.py +205 -82
- angr/state_plugins/sim_event.py +1 -0
- angr/state_plugins/solver.py +73 -117
- angr/state_plugins/symbolizer.py +5 -6
- angr/state_plugins/trace_additions.py +33 -47
- angr/state_plugins/uc_manager.py +20 -11
- angr/state_plugins/unicorn_engine.py +22 -38
- angr/state_plugins/view.py +21 -20
- angr/storage/__init__.py +1 -0
- angr/storage/file.py +40 -47
- angr/storage/memory_mixins/__init__.py +12 -15
- angr/storage/memory_mixins/__init__.pyi +13 -14
- angr/storage/memory_mixins/actions_mixin.py +5 -2
- angr/storage/memory_mixins/address_concretization_mixin.py +13 -17
- angr/storage/memory_mixins/bvv_conversion_mixin.py +10 -11
- angr/storage/memory_mixins/clouseau_mixin.py +1 -0
- angr/storage/memory_mixins/conditional_store_mixin.py +1 -0
- angr/storage/memory_mixins/convenient_mappings_mixin.py +1 -0
- angr/storage/memory_mixins/default_filler_mixin.py +16 -16
- angr/storage/memory_mixins/dirty_addrs_mixin.py +1 -0
- angr/storage/memory_mixins/hex_dumper_mixin.py +6 -9
- angr/storage/memory_mixins/javavm_memory/__init__.py +1 -0
- angr/storage/memory_mixins/javavm_memory/javavm_memory_mixin.py +23 -28
- angr/storage/memory_mixins/keyvalue_memory/__init__.py +1 -0
- angr/storage/memory_mixins/keyvalue_memory/keyvalue_memory_mixin.py +2 -1
- angr/storage/memory_mixins/label_merger_mixin.py +2 -2
- angr/storage/memory_mixins/multi_value_merger_mixin.py +1 -0
- angr/storage/memory_mixins/name_resolution_mixin.py +12 -15
- angr/storage/memory_mixins/paged_memory/page_backer_mixins.py +6 -6
- angr/storage/memory_mixins/paged_memory/paged_memory_mixin.py +23 -37
- angr/storage/memory_mixins/paged_memory/paged_memory_multivalue_mixin.py +1 -0
- angr/storage/memory_mixins/paged_memory/pages/__init__.py +1 -2
- angr/storage/memory_mixins/paged_memory/pages/cooperation.py +4 -3
- angr/storage/memory_mixins/paged_memory/pages/history_tracking_mixin.py +4 -4
- angr/storage/memory_mixins/paged_memory/pages/ispo_mixin.py +1 -0
- angr/storage/memory_mixins/paged_memory/pages/list_page.py +12 -20
- angr/storage/memory_mixins/paged_memory/pages/multi_values.py +14 -19
- angr/storage/memory_mixins/paged_memory/pages/mv_list_page.py +26 -32
- angr/storage/memory_mixins/paged_memory/pages/permissions_mixin.py +1 -0
- angr/storage/memory_mixins/paged_memory/pages/refcount_mixin.py +2 -2
- angr/storage/memory_mixins/paged_memory/pages/ultra_page.py +37 -41
- angr/storage/memory_mixins/paged_memory/privileged_mixin.py +1 -0
- angr/storage/memory_mixins/paged_memory/stack_allocation_mixin.py +1 -0
- angr/storage/memory_mixins/regioned_memory/__init__.py +1 -0
- angr/storage/memory_mixins/regioned_memory/abstract_address_descriptor.py +5 -4
- angr/storage/memory_mixins/regioned_memory/abstract_merger_mixin.py +6 -21
- angr/storage/memory_mixins/regioned_memory/region_category_mixin.py +1 -0
- angr/storage/memory_mixins/regioned_memory/region_data.py +7 -6
- angr/storage/memory_mixins/regioned_memory/region_meta_mixin.py +130 -14
- angr/storage/memory_mixins/regioned_memory/regioned_address_concretization_mixin.py +2 -1
- angr/storage/memory_mixins/regioned_memory/regioned_memory_mixin.py +38 -47
- angr/storage/memory_mixins/regioned_memory/static_find_mixin.py +7 -9
- angr/storage/memory_mixins/simple_interface_mixin.py +10 -13
- angr/storage/memory_mixins/simplification_mixin.py +1 -0
- angr/storage/memory_mixins/size_resolution_mixin.py +7 -4
- angr/storage/memory_mixins/slotted_memory.py +4 -4
- angr/storage/memory_mixins/smart_find_mixin.py +3 -2
- angr/storage/memory_mixins/symbolic_merger_mixin.py +6 -3
- angr/storage/memory_mixins/top_merger_mixin.py +2 -2
- angr/storage/memory_mixins/underconstrained_mixin.py +12 -14
- angr/storage/memory_mixins/unwrapper_mixin.py +1 -0
- angr/storage/memory_object.py +30 -28
- angr/storage/pcap.py +3 -3
- angr/tablespecs.py +4 -3
- angr/utils/__init__.py +1 -0
- angr/utils/ail.py +30 -0
- angr/utils/algo.py +1 -0
- angr/utils/bits.py +12 -0
- angr/utils/constants.py +2 -0
- angr/utils/cowdict.py +3 -4
- angr/utils/dynamic_dictlist.py +4 -7
- angr/utils/endness.py +1 -0
- angr/utils/enums_conv.py +1 -0
- angr/utils/env.py +1 -0
- angr/utils/formatting.py +1 -0
- angr/utils/funcid.py +15 -14
- angr/utils/graph.py +52 -19
- angr/utils/lazy_import.py +1 -0
- angr/utils/library.py +10 -13
- angr/utils/loader.py +6 -6
- angr/utils/mp.py +4 -3
- angr/utils/orderedset.py +1 -0
- angr/utils/segment_list.py +7 -9
- angr/utils/ssa/__init__.py +198 -0
- angr/utils/ssa/tmp_uses_collector.py +23 -0
- angr/utils/ssa/vvar_uses_collector.py +37 -0
- angr/utils/timing.py +2 -2
- angr/utils/typing.py +1 -0
- angr/vaults.py +7 -8
- {angr-9.2.116.dist-info → angr-9.2.118.dist-info}/METADATA +7 -8
- angr-9.2.118.dist-info/RECORD +1344 -0
- {angr-9.2.116.dist-info → angr-9.2.118.dist-info}/WHEEL +1 -1
- angr/analyses/decompiler/optimization_passes/spilled_register_finder.py +0 -18
- angr/analyses/decompiler/seq_cf_structure_counter.py +0 -37
- angr/service.py +0 -35
- angr-9.2.116.dist-info/RECORD +0 -1310
- {angr-9.2.116.dist-info → angr-9.2.118.dist-info}/LICENSE +0 -0
- {angr-9.2.116.dist-info → angr-9.2.118.dist-info}/entry_points.txt +0 -0
- {angr-9.2.116.dist-info → angr-9.2.118.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
from
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from typing import Any, TYPE_CHECKING
|
|
3
|
+
import contextlib
|
|
2
4
|
import logging
|
|
3
5
|
|
|
4
6
|
import ailment
|
|
@@ -58,7 +60,7 @@ class RichR:
|
|
|
58
60
|
return None
|
|
59
61
|
|
|
60
62
|
def __repr__(self):
|
|
61
|
-
return "R{
|
|
63
|
+
return f"R{{{self.data!r}}}"
|
|
62
64
|
|
|
63
65
|
|
|
64
66
|
class SimEngineVRBase(SimEngineLight):
|
|
@@ -67,14 +69,15 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
67
69
|
and storing data.
|
|
68
70
|
"""
|
|
69
71
|
|
|
70
|
-
state:
|
|
72
|
+
state: VariableRecoveryStateBase
|
|
71
73
|
|
|
72
74
|
def __init__(self, project, kb):
|
|
73
75
|
super().__init__()
|
|
74
76
|
|
|
75
77
|
self.project = project
|
|
76
78
|
self.kb = kb
|
|
77
|
-
self.variable_manager:
|
|
79
|
+
self.variable_manager: VariableManager | None = None
|
|
80
|
+
self.vvar_region: dict[int, Any] = {}
|
|
78
81
|
|
|
79
82
|
@property
|
|
80
83
|
def func_addr(self):
|
|
@@ -93,7 +96,7 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
93
96
|
|
|
94
97
|
def _process(
|
|
95
98
|
self, state, successors, block=None, func_addr=None
|
|
96
|
-
): # pylint:disable=unused-argument,arguments-differ
|
|
99
|
+
): # pylint:disable=unused-argument,arguments-differ,arguments-renamed
|
|
97
100
|
super()._process(state, successors, block=block)
|
|
98
101
|
|
|
99
102
|
#
|
|
@@ -102,39 +105,37 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
102
105
|
|
|
103
106
|
@staticmethod
|
|
104
107
|
def _addr_has_concrete_base(addr: claripy.ast.BV) -> bool:
|
|
105
|
-
if addr.op == "__add__":
|
|
106
|
-
if
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return True
|
|
108
|
+
if addr.op == "__add__" and len(addr.args) == 2:
|
|
109
|
+
if addr.args[0].concrete:
|
|
110
|
+
return True
|
|
111
|
+
if addr.args[1].concrete:
|
|
112
|
+
return True
|
|
111
113
|
return False
|
|
112
114
|
|
|
113
115
|
@staticmethod
|
|
114
|
-
def
|
|
115
|
-
if addr.op == "__add__":
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
elem_size = 2 ** abs_offset.args[1].concrete_value
|
|
116
|
+
def _parse_offsetted_addr(addr: claripy.ast.BV) -> tuple[claripy.ast.BV, claripy.ast.BV, claripy.ast.BV] | None:
|
|
117
|
+
if addr.op == "__add__" and len(addr.args) == 2:
|
|
118
|
+
concrete_base, byte_offset = None, None
|
|
119
|
+
if addr.args[0].concrete:
|
|
120
|
+
concrete_base, byte_offset = addr.args
|
|
121
|
+
elif addr.args[1].concrete:
|
|
122
|
+
concrete_base, byte_offset = addr.args[1], addr.args[0]
|
|
123
|
+
if concrete_base is None or byte_offset is None:
|
|
124
|
+
return None
|
|
125
|
+
base_addr = concrete_base
|
|
126
|
+
offset = None
|
|
127
|
+
elem_size = None
|
|
128
|
+
if byte_offset.concrete:
|
|
129
|
+
offset = byte_offset
|
|
130
|
+
elem_size = 1
|
|
131
|
+
else:
|
|
132
|
+
abs_offset = byte_offset
|
|
133
|
+
if abs_offset.op == "__lshift__" and abs_offset.args[1].concrete:
|
|
134
|
+
offset = abs_offset.args[0]
|
|
135
|
+
elem_size = 2 ** abs_offset.args[1].concrete_value
|
|
135
136
|
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
if base_addr is not None and offset is not None and elem_size is not None:
|
|
138
|
+
return base_addr, offset, elem_size
|
|
138
139
|
return None
|
|
139
140
|
|
|
140
141
|
#
|
|
@@ -217,7 +218,7 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
217
218
|
variable_manager = self.variable_manager["global"]
|
|
218
219
|
|
|
219
220
|
# special case for global variables: find existing variable by base address
|
|
220
|
-
existing_vars =
|
|
221
|
+
existing_vars = [(var, 0) for var in variable_manager.get_global_variables(global_var_addr)]
|
|
221
222
|
|
|
222
223
|
if not existing_vars:
|
|
223
224
|
variable = SimMemoryVariable(
|
|
@@ -269,7 +270,7 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
269
270
|
global_var_addr = data.concrete_value
|
|
270
271
|
variable_manager = self.variable_manager["global"]
|
|
271
272
|
# special case for global variables: find existing variable by base address
|
|
272
|
-
existing_vars =
|
|
273
|
+
existing_vars = [(var, 0) for var in variable_manager.get_global_variables(global_var_addr)]
|
|
273
274
|
else:
|
|
274
275
|
return
|
|
275
276
|
|
|
@@ -277,8 +278,7 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
277
278
|
# no associated variables. it's usually because _ensure_variable_existence() is not called, or the address
|
|
278
279
|
# is a TOP. we ignore this case.
|
|
279
280
|
return
|
|
280
|
-
|
|
281
|
-
variable, _ = existing_vars[0]
|
|
281
|
+
variable, _ = existing_vars[0]
|
|
282
282
|
|
|
283
283
|
if not self.state.typevars.has_type_variable_for(variable, codeloc):
|
|
284
284
|
variable_typevar = typevars.TypeVariable()
|
|
@@ -292,7 +292,9 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
292
292
|
offset = None
|
|
293
293
|
variable_manager.reference_at(var, offset, codeloc, atom=src)
|
|
294
294
|
|
|
295
|
-
def _assign_to_register(
|
|
295
|
+
def _assign_to_register(
|
|
296
|
+
self, offset, richr, size, src=None, dst=None, create_variable: bool = True
|
|
297
|
+
): # pylint:disable=unused-argument
|
|
296
298
|
"""
|
|
297
299
|
|
|
298
300
|
:param int offset:
|
|
@@ -311,8 +313,8 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
311
313
|
data: claripy.ast.Base = richr.data
|
|
312
314
|
|
|
313
315
|
# lea
|
|
314
|
-
self._ensure_variable_existence(richr, codeloc
|
|
315
|
-
self._reference(richr, codeloc
|
|
316
|
+
self._ensure_variable_existence(richr, codeloc)
|
|
317
|
+
self._reference(richr, codeloc)
|
|
316
318
|
|
|
317
319
|
# handle register writes
|
|
318
320
|
|
|
@@ -351,7 +353,97 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
351
353
|
v = MultiValues(annotated_data)
|
|
352
354
|
self.state.register_region.store(offset, v)
|
|
353
355
|
# register with the variable manager
|
|
354
|
-
self.variable_manager[self.func_addr].write_to(variable, None, codeloc, atom=dst)
|
|
356
|
+
self.variable_manager[self.func_addr].write_to(variable, None, codeloc, atom=dst, overwrite=False)
|
|
357
|
+
|
|
358
|
+
if richr.typevar is not None:
|
|
359
|
+
if not self.state.typevars.has_type_variable_for(variable, codeloc):
|
|
360
|
+
# assign a new type variable to it
|
|
361
|
+
typevar = typevars.TypeVariable()
|
|
362
|
+
self.state.typevars.add_type_variable(variable, codeloc, typevar)
|
|
363
|
+
# create constraints
|
|
364
|
+
else:
|
|
365
|
+
typevar = self.state.typevars.get_type_variable(variable, codeloc)
|
|
366
|
+
self.state.add_type_constraint(typevars.Subtype(richr.typevar, typevar))
|
|
367
|
+
self.state.add_type_constraint(typevars.Subtype(typevar, typeconsts.int_type(variable.size * 8)))
|
|
368
|
+
|
|
369
|
+
def _assign_to_vvar(
|
|
370
|
+
self,
|
|
371
|
+
vvar: ailment.Expr.VirtualVariable,
|
|
372
|
+
richr,
|
|
373
|
+
src=None,
|
|
374
|
+
dst=None,
|
|
375
|
+
create_variable: bool = True,
|
|
376
|
+
vvar_id: int | None = None,
|
|
377
|
+
): # pylint:disable=unused-argument
|
|
378
|
+
|
|
379
|
+
if vvar_id is None:
|
|
380
|
+
vvar_id = vvar.varid
|
|
381
|
+
|
|
382
|
+
if (
|
|
383
|
+
vvar.category == ailment.Expr.VirtualVariableCategory.REGISTER
|
|
384
|
+
and vvar.oident in (self.arch.ip_offset, self.arch.sp_offset, self.arch.lr_offset)
|
|
385
|
+
or not create_variable
|
|
386
|
+
):
|
|
387
|
+
# only store the value. don't worry about variables.
|
|
388
|
+
self.vvar_region[vvar_id] = richr.data
|
|
389
|
+
return
|
|
390
|
+
|
|
391
|
+
codeloc: CodeLocation = self._codeloc()
|
|
392
|
+
data: claripy.ast.Base = richr.data
|
|
393
|
+
|
|
394
|
+
# lea
|
|
395
|
+
self._ensure_variable_existence(richr, codeloc)
|
|
396
|
+
self._reference(richr, codeloc)
|
|
397
|
+
|
|
398
|
+
# first check if there is an existing variable for the atom at this location already
|
|
399
|
+
existing_vars: set[tuple[SimVariable, int]] = self.variable_manager[self.func_addr].find_variables_by_atom(
|
|
400
|
+
self.block.addr, self.stmt_idx, dst
|
|
401
|
+
)
|
|
402
|
+
if not existing_vars:
|
|
403
|
+
# next check if there is already a variable for the vvar ID
|
|
404
|
+
addr_and_variables = set()
|
|
405
|
+
try:
|
|
406
|
+
value = self.vvar_region[vvar_id]
|
|
407
|
+
addr_and_variables.update(self.state.extract_variables(value))
|
|
408
|
+
except KeyError:
|
|
409
|
+
pass
|
|
410
|
+
existing_vars = {(av[1], av[0]) for av in addr_and_variables}
|
|
411
|
+
|
|
412
|
+
if not existing_vars:
|
|
413
|
+
if vvar.was_reg:
|
|
414
|
+
variable = SimRegisterVariable(
|
|
415
|
+
vvar.reg_offset,
|
|
416
|
+
vvar.size,
|
|
417
|
+
ident=self.variable_manager[self.func_addr].next_variable_ident("register"),
|
|
418
|
+
region=self.func_addr,
|
|
419
|
+
)
|
|
420
|
+
self.variable_manager[self.func_addr].add_variable("register", vvar.reg_offset, variable)
|
|
421
|
+
elif vvar.was_stack:
|
|
422
|
+
variable = SimStackVariable(
|
|
423
|
+
vvar.stack_offset,
|
|
424
|
+
vvar.size,
|
|
425
|
+
ident=self.variable_manager[self.func_addr].next_variable_ident("stack"),
|
|
426
|
+
region=self.func_addr,
|
|
427
|
+
)
|
|
428
|
+
self.variable_manager[self.func_addr].add_variable("stack", vvar.stack_offset, variable)
|
|
429
|
+
elif vvar.was_parameter:
|
|
430
|
+
# FIXME: we assume all parameter vvars were registers
|
|
431
|
+
variable = SimRegisterVariable(
|
|
432
|
+
vvar.reg_offset,
|
|
433
|
+
vvar.size,
|
|
434
|
+
ident=self.variable_manager[self.func_addr].next_variable_ident("register"),
|
|
435
|
+
region=self.func_addr,
|
|
436
|
+
)
|
|
437
|
+
self.variable_manager[self.func_addr].add_variable("register", vvar.oident, variable)
|
|
438
|
+
else:
|
|
439
|
+
raise NotImplementedError
|
|
440
|
+
else:
|
|
441
|
+
variable, _ = next(iter(existing_vars))
|
|
442
|
+
|
|
443
|
+
# FIXME: The offset does not have to be 0
|
|
444
|
+
annotated_data = self.state.annotate_with_variables(data, [(0, variable)])
|
|
445
|
+
self.vvar_region[vvar_id] = annotated_data
|
|
446
|
+
self.variable_manager[self.func_addr].write_to(variable, None, codeloc, atom=dst, overwrite=False)
|
|
355
447
|
|
|
356
448
|
if richr.typevar is not None:
|
|
357
449
|
if not self.state.typevars.has_type_variable_for(variable, codeloc):
|
|
@@ -380,9 +472,9 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
380
472
|
# fully concrete. this is a global address
|
|
381
473
|
self._store_to_global(addr.concrete_value, data, size, stmt=stmt)
|
|
382
474
|
stored = True
|
|
383
|
-
elif self._addr_has_concrete_base(addr) and self.
|
|
475
|
+
elif self._addr_has_concrete_base(addr) and self._parse_offsetted_addr(addr) is not None:
|
|
384
476
|
# we are storing to a concrete global address with an offset
|
|
385
|
-
base_addr, offset, elem_size = self.
|
|
477
|
+
base_addr, offset, elem_size = self._parse_offsetted_addr(addr)
|
|
386
478
|
self._store_to_global(base_addr.concrete_value, data, size, stmt=stmt, offset=offset, elem_size=elem_size)
|
|
387
479
|
stored = True
|
|
388
480
|
else:
|
|
@@ -523,12 +615,10 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
523
615
|
)
|
|
524
616
|
values = None
|
|
525
617
|
if abs_addr is not None:
|
|
526
|
-
|
|
618
|
+
with contextlib.suppress(SimMemoryMissingError):
|
|
527
619
|
values: MultiValues = self.state.global_region.load(
|
|
528
620
|
abs_addr, size=size, endness=self.state.arch.memory_endness if stmt is None else stmt.endness
|
|
529
621
|
)
|
|
530
|
-
except SimMemoryMissingError:
|
|
531
|
-
pass
|
|
532
622
|
|
|
533
623
|
if values is not None:
|
|
534
624
|
for vs in values.values():
|
|
@@ -579,10 +669,7 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
579
669
|
for tc in richr_addr.type_constraints:
|
|
580
670
|
self.state.add_type_constraint(tc)
|
|
581
671
|
|
|
582
|
-
if richr_addr.typevar is None
|
|
583
|
-
typevar = typevars.TypeVariable()
|
|
584
|
-
else:
|
|
585
|
-
typevar = richr_addr.typevar
|
|
672
|
+
typevar = typevars.TypeVariable() if richr_addr.typevar is None else richr_addr.typevar
|
|
586
673
|
|
|
587
674
|
if typevar is not None:
|
|
588
675
|
if isinstance(typevar, typevars.DerivedTypeVariable) and isinstance(typevar.one_label, typevars.AddN):
|
|
@@ -749,9 +836,9 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
749
836
|
v = self._load_from_global(addr.concrete_value, size, expr=expr)
|
|
750
837
|
typevar = v.typevar
|
|
751
838
|
|
|
752
|
-
elif self._addr_has_concrete_base(addr) and self.
|
|
839
|
+
elif self._addr_has_concrete_base(addr) and self._parse_offsetted_addr(addr) is not None:
|
|
753
840
|
# Loading data from a memory address with an offset
|
|
754
|
-
base_addr, offset, elem_size = self.
|
|
841
|
+
base_addr, offset, elem_size = self._parse_offsetted_addr(addr)
|
|
755
842
|
v = self._load_from_global(base_addr.concrete_value, size, expr=expr, offset=offset, elem_size=elem_size)
|
|
756
843
|
typevar = v.typevar
|
|
757
844
|
|
|
@@ -848,7 +935,7 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
848
935
|
self.state.add_type_constraint(typevars.Subtype(load_typevar, typeconsts.TopType()))
|
|
849
936
|
else:
|
|
850
937
|
# FIXME: This is a hack
|
|
851
|
-
for i in range(
|
|
938
|
+
for i in range(4):
|
|
852
939
|
concrete_offset = size * i
|
|
853
940
|
load_typevar = self._create_access_typevar(typevar, True, size, concrete_offset)
|
|
854
941
|
self.state.add_type_constraint(typevars.Subtype(load_typevar, typeconsts.TopType()))
|
|
@@ -900,7 +987,7 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
900
987
|
for value_set in value_list:
|
|
901
988
|
for value in value_set:
|
|
902
989
|
for _, var in self.state.extract_variables(value):
|
|
903
|
-
self.variable_manager[self.func_addr].read_from(var, None, codeloc, atom=expr)
|
|
990
|
+
self.variable_manager[self.func_addr].read_from(var, None, codeloc, atom=expr, overwrite=False)
|
|
904
991
|
variable_set.add(var)
|
|
905
992
|
|
|
906
993
|
if offset == self.arch.sp_offset:
|
|
@@ -929,15 +1016,102 @@ class SimEngineVRBase(SimEngineLight):
|
|
|
929
1016
|
# | typevar = next(reversed(list(self.state.typevars[var].values())))
|
|
930
1017
|
typevar = self.state.typevars[var]
|
|
931
1018
|
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
r_value = self.state.top(size * self.arch.byte_width) # fall back to top
|
|
1019
|
+
r_value = (
|
|
1020
|
+
next(iter(value_list[0])) if len(value_list) == 1 else self.state.top(size * self.arch.byte_width)
|
|
1021
|
+
) # fall back to top
|
|
936
1022
|
if var is not None and var.size != size:
|
|
937
1023
|
# ignore the variable and the associated type if we are only reading part of the variable
|
|
938
1024
|
return RichR(r_value, variable=var)
|
|
939
1025
|
return RichR(r_value, variable=var, typevar=typevar)
|
|
940
1026
|
|
|
1027
|
+
def _read_from_vvar(
|
|
1028
|
+
self, vvar: ailment.Expr.VirtualVariable, expr=None, create_variable: bool = True, vvar_id: int | None = None
|
|
1029
|
+
):
|
|
1030
|
+
codeloc = self._codeloc()
|
|
1031
|
+
|
|
1032
|
+
if vvar_id is None:
|
|
1033
|
+
vvar_id = vvar.varid
|
|
1034
|
+
|
|
1035
|
+
value: claripy.ast.Base | None = self.vvar_region.get(vvar_id, None)
|
|
1036
|
+
|
|
1037
|
+
# fallback for register arguments
|
|
1038
|
+
if value is None and vvar.was_reg:
|
|
1039
|
+
return self._read_from_register(vvar.reg_offset, vvar.size, expr=vvar, create_variable=True)
|
|
1040
|
+
|
|
1041
|
+
if vvar.category == ailment.Expr.VirtualVariableCategory.REGISTER and vvar.oident in (
|
|
1042
|
+
self.arch.sp_offset,
|
|
1043
|
+
self.arch.ip_offset,
|
|
1044
|
+
):
|
|
1045
|
+
# load values. don't worry about variables
|
|
1046
|
+
r_value = self.state.top(vvar.size) if value is None else value
|
|
1047
|
+
return RichR(r_value, variable=None, typevar=None)
|
|
1048
|
+
|
|
1049
|
+
if value is None:
|
|
1050
|
+
# the value does not exist.
|
|
1051
|
+
value = self.state.top(vvar.bits)
|
|
1052
|
+
if create_variable:
|
|
1053
|
+
# create a new variable if necessary
|
|
1054
|
+
if vvar.category == ailment.Expr.VirtualVariableCategory.REGISTER:
|
|
1055
|
+
variable = SimRegisterVariable(
|
|
1056
|
+
vvar.reg_offset,
|
|
1057
|
+
vvar.size,
|
|
1058
|
+
ident=self.variable_manager[self.func_addr].next_variable_ident("register"),
|
|
1059
|
+
region=self.func_addr,
|
|
1060
|
+
)
|
|
1061
|
+
value = self.state.annotate_with_variables(value, [(0, variable)])
|
|
1062
|
+
self.variable_manager[self.func_addr].add_variable("register", vvar.reg_offset, variable)
|
|
1063
|
+
elif vvar.category == ailment.Expr.VirtualVariableCategory.STACK:
|
|
1064
|
+
variable = SimStackVariable(
|
|
1065
|
+
vvar.stack_offset,
|
|
1066
|
+
vvar.size,
|
|
1067
|
+
ident=self.variable_manager[self.func_addr].next_variable_ident("stack"),
|
|
1068
|
+
region=self.func_addr,
|
|
1069
|
+
)
|
|
1070
|
+
value = self.state.annotate_with_variables(value, [(0, variable)])
|
|
1071
|
+
self.variable_manager[self.func_addr].add_variable("stack", vvar.stack_offset, variable)
|
|
1072
|
+
elif vvar.category == ailment.Expr.VirtualVariableCategory.PARAMETER:
|
|
1073
|
+
raise KeyError(f"Missing virtual variable for parameter {vvar}")
|
|
1074
|
+
else:
|
|
1075
|
+
raise NotImplementedError
|
|
1076
|
+
|
|
1077
|
+
self.vvar_region[vvar_id] = value
|
|
1078
|
+
|
|
1079
|
+
variable_set = set()
|
|
1080
|
+
for _, var in self.state.extract_variables(value):
|
|
1081
|
+
self.variable_manager[self.func_addr].read_from(var, None, codeloc, atom=expr, overwrite=False)
|
|
1082
|
+
variable_set.add(var)
|
|
1083
|
+
|
|
1084
|
+
if vvar.category == ailment.Expr.VirtualVariableCategory.REGISTER and vvar.oident == self.arch.sp_offset:
|
|
1085
|
+
# ignore sp
|
|
1086
|
+
typevar = None
|
|
1087
|
+
var = None
|
|
1088
|
+
else:
|
|
1089
|
+
# we accept the precision loss here by only returning the first variable
|
|
1090
|
+
# FIXME: Multiple variables
|
|
1091
|
+
typevar = None
|
|
1092
|
+
var = None
|
|
1093
|
+
if variable_set:
|
|
1094
|
+
var = next(iter(variable_set))
|
|
1095
|
+
|
|
1096
|
+
# add delayed type constraints
|
|
1097
|
+
if var in self.state.delayed_type_constraints:
|
|
1098
|
+
for constraint in self.state.delayed_type_constraints[var]:
|
|
1099
|
+
self.state.add_type_constraint(constraint)
|
|
1100
|
+
self.state.delayed_type_constraints.pop(var)
|
|
1101
|
+
|
|
1102
|
+
if var not in self.state.typevars:
|
|
1103
|
+
typevar = typevars.TypeVariable()
|
|
1104
|
+
self.state.typevars.add_type_variable(var, codeloc, typevar)
|
|
1105
|
+
else:
|
|
1106
|
+
# FIXME: This is an extremely stupid hack. Fix it later.
|
|
1107
|
+
# | typevar = next(reversed(list(self.state.typevars[var].values())))
|
|
1108
|
+
typevar = self.state.typevars[var]
|
|
1109
|
+
|
|
1110
|
+
if var is not None and var.size != vvar.size:
|
|
1111
|
+
# ignore the variable and the associated type if we are only reading part of the variable
|
|
1112
|
+
return RichR(value, variable=var)
|
|
1113
|
+
return RichR(value, variable=var, typevar=typevar)
|
|
1114
|
+
|
|
941
1115
|
def _create_access_typevar(
|
|
942
1116
|
self, typevar: TypeVariable | DerivedTypeVariable, is_store: bool, size: int, offset: int
|
|
943
1117
|
) -> DerivedTypeVariable:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# pylint:disable=unused-argument
|
|
2
|
+
from __future__ import annotations
|
|
2
3
|
from typing import TYPE_CHECKING
|
|
3
4
|
|
|
4
5
|
import claripy
|
|
@@ -27,7 +28,7 @@ class SimEngineVRVEX(
|
|
|
27
28
|
Implements the VEX engine for variable recovery analysis.
|
|
28
29
|
"""
|
|
29
30
|
|
|
30
|
-
state:
|
|
31
|
+
state: VariableRecoveryStateBase
|
|
31
32
|
|
|
32
33
|
def __init__(self, *args, call_info=None, **kwargs):
|
|
33
34
|
super().__init__(*args, **kwargs)
|
|
@@ -41,8 +42,8 @@ class SimEngineVRVEX(
|
|
|
41
42
|
def _is_top(self, expr: RichR) -> bool:
|
|
42
43
|
return self.state.is_top(expr)
|
|
43
44
|
|
|
44
|
-
def _top(self, size: int):
|
|
45
|
-
return self.state.top(size)
|
|
45
|
+
def _top(self, size: int) -> RichR:
|
|
46
|
+
return RichR(self.state.top(size))
|
|
46
47
|
|
|
47
48
|
def _process_Stmt(self, whitelist=None):
|
|
48
49
|
scanner = VEXIRSBScanner(logger=self.l)
|
|
@@ -143,16 +144,14 @@ class SimEngineVRVEX(
|
|
|
143
144
|
# 49 | t300 = ITE(t299,0x00000000,t143)
|
|
144
145
|
# 50 | PUT(r3) = t300
|
|
145
146
|
# 51 | PUT(pc) = 0x000feca5
|
|
146
|
-
if is_arm_arch(self.arch) and (self.ins_addr & 1) == 1:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
return RichR(self.state.top(reg_size * 8))
|
|
147
|
+
if is_arm_arch(self.arch) and (self.ins_addr & 1) == 1 and self.stmt_idx < len(self.block.vex.statements) - 1:
|
|
148
|
+
next_stmt = self.block.vex.statements[self.stmt_idx + 1]
|
|
149
|
+
if isinstance(next_stmt, pyvex.IRStmt.WrTmp) and isinstance(next_stmt.data, pyvex.IRExpr.ITE):
|
|
150
|
+
return RichR(self.state.top(reg_size * 8))
|
|
151
151
|
|
|
152
152
|
force_variable_size = None
|
|
153
|
-
if self.stmts_to_lower and self.stmt_idx in self.stmts_to_lower:
|
|
154
|
-
|
|
155
|
-
force_variable_size = 4
|
|
153
|
+
if self.stmts_to_lower and self.stmt_idx in self.stmts_to_lower and reg_size == 8:
|
|
154
|
+
force_variable_size = 4
|
|
156
155
|
|
|
157
156
|
return self._read_from_register(
|
|
158
157
|
reg_offset,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
import logging
|
|
2
3
|
from collections import defaultdict
|
|
3
4
|
|
|
@@ -55,7 +56,7 @@ class VariableRecoveryState(VariableRecoveryStateBase):
|
|
|
55
56
|
return None
|
|
56
57
|
|
|
57
58
|
def copy(self):
|
|
58
|
-
|
|
59
|
+
return VariableRecoveryState(
|
|
59
60
|
self.block_addr,
|
|
60
61
|
self._analysis,
|
|
61
62
|
self.arch,
|
|
@@ -65,8 +66,6 @@ class VariableRecoveryState(VariableRecoveryStateBase):
|
|
|
65
66
|
register_region=self.register_region.copy(),
|
|
66
67
|
)
|
|
67
68
|
|
|
68
|
-
return state
|
|
69
|
-
|
|
70
69
|
def register_callbacks(self, concrete_states):
|
|
71
70
|
"""
|
|
72
71
|
|
|
@@ -89,7 +88,7 @@ class VariableRecoveryState(VariableRecoveryStateBase):
|
|
|
89
88
|
)
|
|
90
89
|
concrete_state.inspect.add_breakpoint("mem_write", BP(enabled=True, action=self._hook_memory_write))
|
|
91
90
|
|
|
92
|
-
def merge(self, others: tuple[
|
|
91
|
+
def merge(self, others: tuple[VariableRecoveryState], successor=None) -> tuple[VariableRecoveryState, bool]:
|
|
93
92
|
"""
|
|
94
93
|
Merge two abstract states.
|
|
95
94
|
|
|
@@ -377,29 +376,28 @@ class VariableRecoveryState(VariableRecoveryStateBase):
|
|
|
377
376
|
annotated = [True for annotated, _ in parsed if annotated is True]
|
|
378
377
|
if len(annotated) != 1:
|
|
379
378
|
# either nothing is annotated, or more than one element is annotated
|
|
380
|
-
raise ValueError
|
|
379
|
+
raise ValueError
|
|
381
380
|
|
|
382
381
|
return True, sum(off for _, off in parsed)
|
|
383
|
-
|
|
382
|
+
if addr.op == "__sub__":
|
|
384
383
|
# __sub__ might have multiple arguments
|
|
385
384
|
|
|
386
385
|
parsed = [_parse(arg) for arg in addr.args]
|
|
387
386
|
first_annotated, first_offset = parsed[0]
|
|
388
387
|
if first_annotated is False:
|
|
389
388
|
# the first argument is not annotated. we don't support it.
|
|
390
|
-
raise ValueError
|
|
389
|
+
raise ValueError
|
|
391
390
|
if any(annotated for annotated, _ in parsed[1:]):
|
|
392
391
|
# more than one argument is annotated. we don't support it.
|
|
393
|
-
raise ValueError
|
|
392
|
+
raise ValueError
|
|
394
393
|
|
|
395
394
|
return True, first_offset - sum(off for _, off in parsed[1:])
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
if
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
return True, anno.offset
|
|
395
|
+
anno = next(iter(anno for anno in addr.annotations if isinstance(anno, StackLocationAnnotation)), None)
|
|
396
|
+
if anno is None:
|
|
397
|
+
if addr.op == "BVV":
|
|
398
|
+
return False, addr.concrete_value
|
|
399
|
+
raise ValueError
|
|
400
|
+
return True, anno.offset
|
|
403
401
|
|
|
404
402
|
# find the annotated AST
|
|
405
403
|
try:
|
|
@@ -437,7 +435,7 @@ class VariableRecovery(ForwardAnalysis, VariableRecoveryBase): # pylint:disable
|
|
|
437
435
|
This analysis follows SSA, which means every write creates a new variable in registers or memory (statck, heap,
|
|
438
436
|
etc.). Things may get tricky when overlapping variable (in memory, as you cannot really have overlapping accesses
|
|
439
437
|
to registers) accesses exist, and in such cases, a new variable will be created, and this new variable will overlap
|
|
440
|
-
with one or more existing
|
|
438
|
+
with one or more existing variables. A decision procedure (which is pretty much TODO) is required at the end of this
|
|
441
439
|
analysis to resolve the conflicts between overlapping variables.
|
|
442
440
|
"""
|
|
443
441
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
import weakref
|
|
2
3
|
from typing import Any, TYPE_CHECKING
|
|
3
4
|
from collections.abc import Generator, Iterable
|
|
@@ -44,10 +45,10 @@ def parse_stack_pointer(sp):
|
|
|
44
45
|
off1 = parse_stack_pointer(op1)
|
|
45
46
|
if sp.op == "Sub":
|
|
46
47
|
return off0 - off1
|
|
47
|
-
|
|
48
|
+
if sp.op == "Add":
|
|
48
49
|
return off0 + off1
|
|
49
50
|
|
|
50
|
-
raise NotImplementedError("Unsupported stack pointer representation type
|
|
51
|
+
raise NotImplementedError(f"Unsupported stack pointer representation type {type(sp)}.")
|
|
51
52
|
|
|
52
53
|
|
|
53
54
|
class VariableAnnotation(Annotation):
|
|
@@ -81,7 +82,7 @@ class VariableRecoveryBase(Analysis):
|
|
|
81
82
|
The base class for VariableRecovery and VariableRecoveryFast.
|
|
82
83
|
"""
|
|
83
84
|
|
|
84
|
-
def __init__(self, func, max_iterations, store_live_variables: bool):
|
|
85
|
+
def __init__(self, func, max_iterations, store_live_variables: bool, vvar_to_vvar: dict[int, int] | None = None):
|
|
85
86
|
self.function = func
|
|
86
87
|
self.variable_manager = self.kb.variables
|
|
87
88
|
|
|
@@ -91,6 +92,7 @@ class VariableRecoveryBase(Analysis):
|
|
|
91
92
|
self._outstates = {}
|
|
92
93
|
self._instates: dict[Any, VariableRecoveryStateBase] = {}
|
|
93
94
|
self._dominance_frontiers = None
|
|
95
|
+
self.vvar_to_vvar = vvar_to_vvar
|
|
94
96
|
|
|
95
97
|
#
|
|
96
98
|
# Public methods
|
|
@@ -128,7 +130,7 @@ class VariableRecoveryBase(Analysis):
|
|
|
128
130
|
stack_vars_by_offset = defaultdict(list)
|
|
129
131
|
for sv in stack_vars:
|
|
130
132
|
stack_vars_by_offset[sv.offset].append(sv)
|
|
131
|
-
for
|
|
133
|
+
for _offset, var_list in stack_vars_by_offset.items():
|
|
132
134
|
if len(var_list) < 2:
|
|
133
135
|
continue
|
|
134
136
|
single_byte_vars = [v for v in var_list if v.size == 1]
|
|
@@ -241,12 +243,10 @@ class VariableRecoveryStateBase:
|
|
|
241
243
|
|
|
242
244
|
@staticmethod
|
|
243
245
|
def is_top(thing) -> bool:
|
|
244
|
-
|
|
245
|
-
return True
|
|
246
|
-
return False
|
|
246
|
+
return bool(isinstance(thing, claripy.ast.BV) and thing.op == "BVS" and thing.args[0] == "top")
|
|
247
247
|
|
|
248
248
|
@staticmethod
|
|
249
|
-
def extract_variables(expr: claripy.ast.Base) -> Generator[tuple[int, SimVariable | SpOffset]
|
|
249
|
+
def extract_variables(expr: claripy.ast.Base) -> Generator[tuple[int, SimVariable | SpOffset]]:
|
|
250
250
|
for anno in expr.annotations:
|
|
251
251
|
if isinstance(anno, VariableAnnotation):
|
|
252
252
|
yield from anno.addr_and_variables
|
|
@@ -255,8 +255,7 @@ class VariableRecoveryStateBase:
|
|
|
255
255
|
def annotate_with_variables(
|
|
256
256
|
expr: claripy.ast.Base, addr_and_variables: Iterable[tuple[int, SimVariable | SpOffset]]
|
|
257
257
|
) -> claripy.ast.Base:
|
|
258
|
-
|
|
259
|
-
return expr
|
|
258
|
+
return expr.replace_annotations((VariableAnnotation(list(addr_and_variables)),))
|
|
260
259
|
|
|
261
260
|
def stack_address(self, offset: int) -> claripy.ast.Base:
|
|
262
261
|
base = claripy.BVS("stack_base", self.arch.bits, explicit_name=True)
|
|
@@ -284,7 +283,7 @@ class VariableRecoveryStateBase:
|
|
|
284
283
|
if addr.args[0] == "stack_base":
|
|
285
284
|
return claripy.BVV(0, addr.size())
|
|
286
285
|
return None
|
|
287
|
-
|
|
286
|
+
if addr.op == "BVV":
|
|
288
287
|
r = addr
|
|
289
288
|
elif addr.op == "__add__":
|
|
290
289
|
arg_offsets = []
|
|
@@ -408,7 +407,7 @@ class VariableRecoveryStateBase:
|
|
|
408
407
|
|
|
409
408
|
@staticmethod
|
|
410
409
|
def _mo_cmp(
|
|
411
|
-
mos_self: set[
|
|
410
|
+
mos_self: set[SimMemoryObject], mos_other: set[SimMemoryObject], addr: int, size: int
|
|
412
411
|
): # pylint:disable=unused-argument
|
|
413
412
|
# comparing bytes from two sets of memory objects
|
|
414
413
|
# we don't need to resort to byte-level comparison. object-level is good enough.
|
|
@@ -436,8 +435,7 @@ class VariableRecoveryStateBase:
|
|
|
436
435
|
self.phi_variables[var] = phi_var
|
|
437
436
|
|
|
438
437
|
r = self.top(bits)
|
|
439
|
-
|
|
440
|
-
return r
|
|
438
|
+
return self.annotate_with_variables(r, [(0, phi_var)])
|
|
441
439
|
|
|
442
440
|
def _phi_node_contains(self, phi_variable, variable):
|
|
443
441
|
"""
|