angr 9.2.119__py3-none-macosx_11_0_arm64.whl → 9.2.121__py3-none-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of angr might be problematic. Click here for more details.
- angr/__init__.py +217 -2
- angr/__main__.py +14 -4
- angr/analyses/__init__.py +54 -0
- angr/analyses/analysis.py +8 -8
- angr/analyses/backward_slice.py +4 -4
- angr/analyses/bindiff.py +2 -2
- angr/analyses/callee_cleanup_finder.py +1 -1
- angr/analyses/calling_convention.py +21 -15
- angr/analyses/cdg.py +1 -1
- angr/analyses/cfg/__init__.py +12 -1
- angr/analyses/cfg/cfb.py +2 -2
- angr/analyses/cfg/cfg.py +1 -1
- angr/analyses/cfg/cfg_base.py +28 -11
- angr/analyses/cfg/cfg_emulated.py +18 -18
- angr/analyses/cfg/cfg_fast.py +3 -2
- angr/analyses/cfg/cfg_fast_soot.py +5 -5
- angr/analyses/cfg/cfg_job_base.py +3 -3
- angr/analyses/cfg/indirect_jump_resolvers/__init__.py +15 -0
- angr/analyses/cfg/indirect_jump_resolvers/amd64_pe_iat.py +1 -1
- angr/analyses/cfg/indirect_jump_resolvers/arm_elf_fast.py +2 -2
- angr/analyses/cfg/indirect_jump_resolvers/const_resolver.py +4 -4
- angr/analyses/cfg/indirect_jump_resolvers/default_resolvers.py +2 -0
- angr/analyses/cfg/indirect_jump_resolvers/jumptable.py +27 -20
- angr/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py +140 -369
- angr/analyses/cfg/indirect_jump_resolvers/mips_elf_got.py +148 -0
- angr/analyses/cfg/indirect_jump_resolvers/resolver.py +2 -2
- angr/analyses/cfg/indirect_jump_resolvers/x86_pe_iat.py +1 -1
- angr/analyses/cfg_slice_to_sink/__init__.py +8 -0
- angr/analyses/class_identifier.py +2 -2
- angr/analyses/code_tagging.py +2 -2
- angr/analyses/complete_calling_conventions.py +3 -3
- angr/analyses/congruency_check.py +1 -2
- angr/analyses/data_dep/__init__.py +13 -0
- angr/analyses/data_dep/data_dependency_analysis.py +5 -5
- angr/analyses/datagraph_meta.py +1 -1
- angr/analyses/ddg.py +3 -3
- angr/analyses/decompiler/__init__.py +25 -0
- angr/analyses/decompiler/ail_simplifier.py +8 -8
- angr/analyses/decompiler/block_simplifier.py +3 -3
- angr/analyses/decompiler/callsite_maker.py +5 -3
- angr/analyses/decompiler/ccall_rewriters/amd64_ccalls.py +20 -0
- angr/analyses/decompiler/clinic.py +25 -26
- angr/analyses/decompiler/condition_processor.py +7 -5
- angr/analyses/decompiler/counters/__init__.py +11 -0
- angr/analyses/decompiler/decompiler.py +24 -10
- angr/analyses/decompiler/dephication/seqnode_dephication.py +19 -1
- angr/analyses/decompiler/optimization_passes/__init__.py +66 -54
- angr/analyses/decompiler/optimization_passes/const_derefs.py +1 -1
- angr/analyses/decompiler/optimization_passes/const_prop_reverter.py +3 -3
- angr/analyses/decompiler/optimization_passes/cross_jump_reverter.py +1 -1
- angr/analyses/decompiler/optimization_passes/duplication_reverter/__init__.py +3 -0
- angr/analyses/decompiler/optimization_passes/duplication_reverter/duplication_reverter.py +7 -7
- angr/analyses/decompiler/optimization_passes/duplication_reverter/similarity.py +1 -1
- angr/analyses/decompiler/optimization_passes/duplication_reverter/utils.py +1 -1
- angr/analyses/decompiler/optimization_passes/engine_base.py +2 -2
- angr/analyses/decompiler/optimization_passes/expr_op_swapper.py +2 -2
- angr/analyses/decompiler/optimization_passes/flip_boolean_cmp.py +4 -4
- angr/analyses/decompiler/optimization_passes/ite_expr_converter.py +6 -6
- angr/analyses/decompiler/optimization_passes/ite_region_converter.py +2 -2
- angr/analyses/decompiler/optimization_passes/lowered_switch_simplifier.py +7 -3
- angr/analyses/decompiler/optimization_passes/optimization_pass.py +34 -28
- angr/analyses/decompiler/optimization_passes/register_save_area_simplifier.py +2 -2
- angr/analyses/decompiler/optimization_passes/ret_addr_save_simplifier.py +1 -1
- angr/analyses/decompiler/optimization_passes/ret_deduplicator.py +3 -3
- angr/analyses/decompiler/optimization_passes/return_duplicator_base.py +5 -5
- angr/analyses/decompiler/optimization_passes/return_duplicator_high.py +1 -1
- angr/analyses/decompiler/peephole_optimizations/__init__.py +61 -19
- angr/analyses/decompiler/peephole_optimizations/simplify_pc_relative_loads.py +1 -1
- angr/analyses/decompiler/presets/__init__.py +20 -0
- angr/analyses/decompiler/presets/basic.py +30 -0
- angr/analyses/decompiler/presets/fast.py +54 -0
- angr/analyses/decompiler/presets/full.py +64 -0
- angr/analyses/decompiler/presets/preset.py +37 -0
- angr/analyses/decompiler/region_identifier.py +21 -7
- angr/analyses/decompiler/region_simplifiers/__init__.py +3 -0
- angr/analyses/decompiler/region_simplifiers/cascading_cond_transformer.py +3 -3
- angr/analyses/decompiler/region_simplifiers/cascading_ifs.py +3 -3
- angr/analyses/decompiler/region_simplifiers/expr_folding.py +2 -2
- angr/analyses/decompiler/region_simplifiers/goto.py +3 -3
- angr/analyses/decompiler/region_simplifiers/if_.py +2 -2
- angr/analyses/decompiler/region_simplifiers/ifelse.py +4 -4
- angr/analyses/decompiler/region_simplifiers/loop.py +4 -4
- angr/analyses/decompiler/region_simplifiers/node_address_finder.py +1 -1
- angr/analyses/decompiler/region_simplifiers/region_simplifier.py +6 -6
- angr/analyses/decompiler/region_simplifiers/switch_cluster_simplifier.py +12 -5
- angr/analyses/decompiler/region_simplifiers/switch_expr_simplifier.py +3 -3
- angr/analyses/decompiler/sequence_walker.py +11 -12
- angr/analyses/decompiler/structured_codegen/__init__.py +14 -0
- angr/analyses/decompiler/structured_codegen/base.py +1 -1
- angr/analyses/decompiler/structured_codegen/c.py +13 -13
- angr/analyses/decompiler/structured_codegen/dwarf_import.py +2 -2
- angr/analyses/decompiler/structuring/__init__.py +11 -1
- angr/analyses/decompiler/structuring/dream.py +8 -8
- angr/analyses/decompiler/structuring/phoenix.py +6 -6
- angr/analyses/decompiler/structuring/recursive_structurer.py +7 -7
- angr/analyses/decompiler/structuring/sailr.py +2 -2
- angr/analyses/decompiler/structuring/structurer_base.py +9 -4
- angr/analyses/decompiler/structuring/structurer_nodes.py +18 -9
- angr/analyses/decompiler/utils.py +4 -2
- angr/analyses/disassembly.py +6 -6
- angr/analyses/disassembly_utils.py +1 -1
- angr/analyses/dominance_frontier.py +1 -1
- angr/analyses/find_objects_static.py +5 -5
- angr/analyses/flirt.py +3 -3
- angr/analyses/forward_analysis/__init__.py +9 -0
- angr/analyses/forward_analysis/forward_analysis.py +4 -4
- angr/analyses/forward_analysis/job_info.py +1 -1
- angr/analyses/forward_analysis/visitors/__init__.py +9 -0
- angr/analyses/forward_analysis/visitors/graph.py +2 -2
- angr/analyses/identifier/__init__.py +3 -0
- angr/analyses/identifier/custom_callable.py +2 -3
- angr/analyses/identifier/errors.py +1 -1
- angr/analyses/identifier/functions/__init__.py +4 -4
- angr/analyses/identifier/functions/atoi.py +1 -1
- angr/analyses/identifier/functions/based_atoi.py +1 -1
- angr/analyses/identifier/functions/fdprintf.py +1 -1
- angr/analyses/identifier/functions/free.py +2 -2
- angr/analyses/identifier/functions/int2str.py +1 -1
- angr/analyses/identifier/functions/malloc.py +2 -2
- angr/analyses/identifier/functions/memcmp.py +1 -1
- angr/analyses/identifier/functions/memcpy.py +3 -3
- angr/analyses/identifier/functions/memset.py +1 -1
- angr/analyses/identifier/functions/printf.py +1 -1
- angr/analyses/identifier/functions/recv_until.py +2 -2
- angr/analyses/identifier/functions/skip_calloc.py +2 -2
- angr/analyses/identifier/functions/skip_realloc.py +2 -2
- angr/analyses/identifier/functions/skip_recv_n.py +1 -1
- angr/analyses/identifier/functions/snprintf.py +1 -1
- angr/analyses/identifier/functions/sprintf.py +1 -1
- angr/analyses/identifier/functions/strcmp.py +1 -1
- angr/analyses/identifier/functions/strcpy.py +1 -1
- angr/analyses/identifier/functions/strlen.py +1 -1
- angr/analyses/identifier/functions/strncmp.py +1 -1
- angr/analyses/identifier/functions/strncpy.py +1 -1
- angr/analyses/identifier/functions/strtol.py +1 -1
- angr/analyses/identifier/identify.py +3 -3
- angr/analyses/identifier/runner.py +6 -6
- angr/analyses/init_finder.py +1 -1
- angr/analyses/loop_analysis.py +2 -2
- angr/analyses/propagator/__init__.py +3 -0
- angr/analyses/propagator/engine_ail.py +4 -4
- angr/analyses/propagator/engine_base.py +2 -2
- angr/analyses/propagator/engine_vex.py +2 -2
- angr/analyses/propagator/outdated_definition_walker.py +3 -3
- angr/analyses/propagator/propagator.py +3 -3
- angr/analyses/propagator/top_checker_mixin.py +1 -1
- angr/analyses/proximity_graph.py +3 -3
- angr/analyses/reaching_definitions/__init__.py +6 -6
- angr/analyses/reaching_definitions/dep_graph.py +5 -5
- angr/analyses/reaching_definitions/engine_ail.py +8 -8
- angr/analyses/reaching_definitions/engine_vex.py +18 -13
- angr/analyses/reaching_definitions/heap_allocator.py +3 -3
- angr/analyses/reaching_definitions/rd_state.py +4 -10
- angr/analyses/reaching_definitions/reaching_definitions.py +11 -11
- angr/analyses/reaching_definitions/subject.py +3 -3
- angr/analyses/reassembler.py +5 -5
- angr/analyses/{s_propagator/s_propagator.py → s_propagator.py} +1 -1
- angr/analyses/s_reaching_definitions/__init__.py +11 -1
- angr/analyses/s_reaching_definitions/s_rda_model.py +117 -0
- angr/analyses/s_reaching_definitions/s_rda_view.py +213 -0
- angr/analyses/s_reaching_definitions/s_reaching_definitions.py +159 -0
- angr/analyses/stack_pointer_tracker.py +5 -5
- angr/analyses/static_hooker.py +2 -2
- angr/analyses/typehoon/__init__.py +3 -0
- angr/analyses/typehoon/lifter.py +1 -1
- angr/analyses/typehoon/translator.py +2 -2
- angr/analyses/typehoon/typehoon.py +3 -3
- angr/analyses/typehoon/typevars.py +37 -16
- angr/analyses/variable_recovery/__init__.py +6 -0
- angr/analyses/variable_recovery/engine_ail.py +5 -5
- angr/analyses/variable_recovery/engine_base.py +7 -7
- angr/analyses/variable_recovery/engine_vex.py +7 -7
- angr/analyses/variable_recovery/variable_recovery.py +5 -5
- angr/analyses/variable_recovery/variable_recovery_base.py +7 -7
- angr/analyses/variable_recovery/variable_recovery_fast.py +7 -7
- angr/analyses/veritesting.py +8 -8
- angr/analyses/vfg.py +13 -13
- angr/analyses/vsa_ddg.py +3 -3
- angr/analyses/vtable.py +1 -1
- angr/analyses/xrefs.py +3 -3
- angr/angrdb/__init__.py +3 -0
- angr/angrdb/db.py +3 -3
- angr/angrdb/serializers/__init__.py +7 -0
- angr/angrdb/serializers/cfg_model.py +2 -2
- angr/angrdb/serializers/comments.py +2 -2
- angr/angrdb/serializers/funcs.py +2 -2
- angr/angrdb/serializers/kb.py +2 -2
- angr/angrdb/serializers/labels.py +2 -2
- angr/angrdb/serializers/loader.py +2 -2
- angr/angrdb/serializers/structured_code.py +4 -4
- angr/angrdb/serializers/variables.py +3 -3
- angr/angrdb/serializers/xrefs.py +2 -2
- angr/block.py +9 -1
- angr/calling_conventions.py +1 -1
- angr/concretization_strategies/__init__.py +17 -0
- angr/concretization_strategies/max.py +1 -1
- angr/concretization_strategies/norepeats_range.py +1 -1
- angr/distributed/__init__.py +6 -1
- angr/distributed/server.py +0 -1
- angr/distributed/worker.py +6 -4
- angr/engines/__init__.py +25 -0
- angr/engines/concrete.py +1 -2
- angr/engines/engine.py +8 -15
- angr/engines/failure.py +2 -2
- angr/engines/light/__init__.py +12 -0
- angr/engines/light/data.py +1 -1
- angr/engines/light/engine.py +6 -6
- angr/engines/pcode/__init__.py +7 -1
- angr/engines/pcode/behavior.py +1 -1
- angr/engines/pcode/cc.py +1 -1
- angr/engines/pcode/emulate.py +4 -4
- angr/engines/pcode/engine.py +3 -3
- angr/engines/pcode/lifter.py +15 -7
- angr/engines/procedure.py +3 -3
- angr/engines/soot/__init__.py +3 -0
- angr/engines/soot/engine.py +8 -8
- angr/engines/soot/expressions/__init__.py +33 -0
- angr/engines/soot/expressions/arrayref.py +1 -1
- angr/engines/soot/expressions/base.py +1 -1
- angr/engines/soot/expressions/cast.py +1 -1
- angr/engines/soot/expressions/condition.py +1 -1
- angr/engines/soot/expressions/constants.py +1 -1
- angr/engines/soot/expressions/invoke.py +2 -2
- angr/engines/soot/expressions/new.py +1 -1
- angr/engines/soot/expressions/newArray.py +1 -1
- angr/engines/soot/expressions/newMultiArray.py +1 -1
- angr/engines/soot/statements/__init__.py +16 -0
- angr/engines/soot/statements/assign.py +1 -1
- angr/engines/soot/statements/base.py +3 -3
- angr/engines/soot/values/__init__.py +14 -0
- angr/engines/soot/values/arrayref.py +1 -1
- angr/engines/soot/values/instancefieldref.py +1 -1
- angr/engines/soot/values/staticfieldref.py +1 -1
- angr/engines/soot/values/thisref.py +2 -2
- angr/engines/successors.py +8 -8
- angr/engines/syscall.py +1 -1
- angr/engines/unicorn.py +11 -11
- angr/engines/vex/__init__.py +18 -3
- angr/engines/vex/claripy/__init__.py +3 -0
- angr/engines/vex/claripy/ccall.py +2 -3
- angr/engines/vex/claripy/datalayer.py +9 -12
- angr/engines/vex/heavy/__init__.py +11 -1
- angr/engines/vex/heavy/actions.py +19 -24
- angr/engines/vex/heavy/heavy.py +13 -7
- angr/engines/vex/heavy/inspect.py +2 -2
- angr/engines/vex/heavy/resilience.py +2 -2
- angr/engines/vex/heavy/super_fastpath.py +3 -3
- angr/engines/vex/lifter.py +8 -6
- angr/engines/vex/light/__init__.py +7 -0
- angr/engines/vex/light/light.py +4 -4
- angr/engines/vex/light/slicing.py +1 -1
- angr/errors.py +0 -4
- angr/exploration_techniques/__init__.py +0 -1
- angr/exploration_techniques/bucketizer.py +9 -10
- angr/exploration_techniques/common.py +2 -2
- angr/exploration_techniques/director.py +4 -4
- angr/exploration_techniques/explorer.py +3 -3
- angr/exploration_techniques/loop_seer.py +3 -3
- angr/exploration_techniques/oppologist.py +3 -3
- angr/exploration_techniques/slicecutor.py +1 -1
- angr/exploration_techniques/spiller.py +1 -1
- angr/exploration_techniques/suggestions.py +4 -4
- angr/exploration_techniques/symbion.py +0 -1
- angr/exploration_techniques/threading.py +2 -2
- angr/exploration_techniques/tracer.py +3 -3
- angr/exploration_techniques/veritesting.py +1 -1
- angr/factory.py +5 -0
- angr/flirt/__init__.py +0 -1
- angr/{knowledge_base/knowledge_base.py → knowledge_base.py} +13 -15
- angr/knowledge_plugins/__init__.py +23 -1
- angr/knowledge_plugins/callsite_prototypes.py +2 -2
- angr/knowledge_plugins/cfg/cfg_manager.py +1 -1
- angr/knowledge_plugins/cfg/cfg_model.py +6 -6
- angr/knowledge_plugins/cfg/indirect_jump.py +1 -1
- angr/knowledge_plugins/cfg/memory_data.py +3 -2
- angr/knowledge_plugins/debug_variables.py +2 -2
- angr/knowledge_plugins/functions/__init__.py +6 -0
- angr/knowledge_plugins/functions/function.py +21 -16
- angr/knowledge_plugins/functions/function_manager.py +2 -2
- angr/knowledge_plugins/functions/function_parser.py +3 -3
- angr/knowledge_plugins/functions/soot_function.py +2 -2
- angr/knowledge_plugins/key_definitions/atoms.py +2 -2
- angr/knowledge_plugins/key_definitions/definition.py +3 -3
- angr/knowledge_plugins/key_definitions/key_definition_manager.py +2 -2
- angr/knowledge_plugins/key_definitions/uses.py +2 -2
- angr/knowledge_plugins/propagations/__init__.py +7 -0
- angr/knowledge_plugins/propagations/prop_value.py +1 -1
- angr/knowledge_plugins/{structured_code/manager.py → structured_code.py} +6 -3
- angr/knowledge_plugins/types.py +1 -1
- angr/knowledge_plugins/variables/__init__.py +6 -0
- angr/knowledge_plugins/variables/variable_access.py +3 -3
- angr/knowledge_plugins/variables/variable_manager.py +7 -7
- angr/knowledge_plugins/xrefs/__init__.py +9 -1
- angr/knowledge_plugins/xrefs/xref.py +5 -5
- angr/knowledge_plugins/xrefs/xref_manager.py +3 -3
- angr/lib/angr_native.dylib +0 -0
- angr/misc/__init__.py +12 -2
- angr/misc/loggers.py +2 -2
- angr/procedures/__init__.py +9 -0
- angr/procedures/cgc/receive.py +2 -2
- angr/procedures/cgc/transmit.py +1 -1
- angr/procedures/definitions/__init__.py +8 -8
- angr/procedures/definitions/cgc.py +1 -1
- angr/procedures/definitions/glibc.py +2 -15
- angr/procedures/definitions/gnulib.py +2 -6
- angr/procedures/definitions/libstdcpp.py +2 -2
- angr/procedures/definitions/linux_kernel.py +2 -3
- angr/procedures/definitions/linux_loader.py +1 -1
- angr/procedures/definitions/msvcr.py +2 -2
- angr/procedures/definitions/wdk_api-ms-win-dx-d3dkmt-l1-1-4.py +3 -18
- angr/procedures/definitions/wdk_api-ms-win-dx-d3dkmt-l1-1-6.py +3 -18
- angr/procedures/definitions/wdk_clfs.py +3 -18
- angr/procedures/definitions/wdk_fltmgr.py +3 -18
- angr/procedures/definitions/wdk_fwpkclnt.py +3 -18
- angr/procedures/definitions/wdk_fwpuclnt.py +3 -18
- angr/procedures/definitions/wdk_gdi32.py +3 -18
- angr/procedures/definitions/wdk_hal.py +3 -18
- angr/procedures/definitions/wdk_ksecdd.py +3 -18
- angr/procedures/definitions/wdk_ndis.py +3 -18
- angr/procedures/definitions/wdk_ntoskrnl.py +3 -18
- angr/procedures/definitions/wdk_offreg.py +3 -18
- angr/procedures/definitions/wdk_pshed.py +3 -18
- angr/procedures/definitions/wdk_secur32.py +3 -18
- angr/procedures/definitions/wdk_vhfum.py +3 -18
- angr/procedures/definitions/win32_aclui.py +3 -18
- angr/procedures/definitions/win32_activeds.py +3 -18
- angr/procedures/definitions/win32_advapi32.py +3 -18
- angr/procedures/definitions/win32_advpack.py +3 -18
- angr/procedures/definitions/win32_amsi.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-appmodel-runtime-l1-1-1.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-appmodel-runtime-l1-1-3.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-appmodel-runtime-l1-1-6.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-apiquery-l2-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-backgroundtask-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-comm-l1-1-1.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-comm-l1-1-2.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-enclave-l1-1-1.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-errorhandling-l1-1-3.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-featurestaging-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-featurestaging-l1-1-1.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-file-fromapp-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-handle-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-ioring-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-marshal-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-3.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-4.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-5.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-6.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-7.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-memory-l1-1-8.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-path-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-psm-appnotify-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-psm-appnotify-l1-1-1.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-realtime-l1-1-1.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-realtime-l1-1-2.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-slapi-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-state-helpers-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-synch-l1-2-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-sysinfo-l1-2-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-sysinfo-l1-2-3.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-sysinfo-l1-2-4.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-sysinfo-l1-2-6.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-util-l1-1-1.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-core-winrt-error-l1-1-0.py +3 -3
- angr/procedures/definitions/win32_api-ms-win-core-winrt-error-l1-1-1.py +3 -3
- angr/procedures/definitions/win32_api-ms-win-core-winrt-l1-1-0.py +3 -3
- angr/procedures/definitions/win32_api-ms-win-core-winrt-registration-l1-1-0.py +3 -3
- angr/procedures/definitions/win32_api-ms-win-core-winrt-robuffer-l1-1-0.py +3 -3
- angr/procedures/definitions/win32_api-ms-win-core-winrt-roparameterizediid-l1-1-0.py +3 -3
- angr/procedures/definitions/win32_api-ms-win-core-winrt-string-l1-1-0.py +3 -3
- angr/procedures/definitions/win32_api-ms-win-core-winrt-string-l1-1-1.py +3 -3
- angr/procedures/definitions/win32_api-ms-win-core-wow64-l1-1-1.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-devices-query-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-devices-query-l1-1-1.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-dx-d3dkmt-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-gaming-deviceinformation-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-gaming-expandedresources-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-gaming-tcui-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-gaming-tcui-l1-1-1.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-gaming-tcui-l1-1-2.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-gaming-tcui-l1-1-3.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-gaming-tcui-l1-1-4.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-mm-misc-l1-1-1.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-net-isolation-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-security-base-l1-2-2.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-security-isolatedcontainer-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-security-isolatedcontainer-l1-1-1.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-service-core-l1-1-3.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-service-core-l1-1-4.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-service-core-l1-1-5.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-shcore-scaling-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-shcore-scaling-l1-1-1.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-shcore-scaling-l1-1-2.py +3 -18
- angr/procedures/definitions/win32_api-ms-win-shcore-stream-winrt-l1-1-0.py +3 -3
- angr/procedures/definitions/win32_api-ms-win-wsl-api-l1-1-0.py +3 -18
- angr/procedures/definitions/win32_apphelp.py +3 -18
- angr/procedures/definitions/win32_authz.py +3 -18
- angr/procedures/definitions/win32_avicap32.py +3 -18
- angr/procedures/definitions/win32_avifil32.py +3 -18
- angr/procedures/definitions/win32_avrt.py +3 -18
- angr/procedures/definitions/win32_bcp47mrm.py +3 -18
- angr/procedures/definitions/win32_bcrypt.py +3 -18
- angr/procedures/definitions/win32_bcryptprimitives.py +3 -18
- angr/procedures/definitions/win32_bluetoothapis.py +3 -18
- angr/procedures/definitions/win32_bthprops.py +3 -3
- angr/procedures/definitions/win32_bthprops_cpl.py +3 -18
- angr/procedures/definitions/win32_cabinet.py +3 -18
- angr/procedures/definitions/win32_certadm.py +3 -18
- angr/procedures/definitions/win32_certpoleng.py +3 -18
- angr/procedures/definitions/win32_cfgmgr32.py +3 -18
- angr/procedures/definitions/win32_chakra.py +3 -18
- angr/procedures/definitions/win32_cldapi.py +3 -18
- angr/procedures/definitions/win32_clfsw32.py +3 -18
- angr/procedures/definitions/win32_clusapi.py +3 -18
- angr/procedures/definitions/win32_comctl32.py +3 -18
- angr/procedures/definitions/win32_comdlg32.py +3 -18
- angr/procedures/definitions/win32_compstui.py +3 -18
- angr/procedures/definitions/win32_computecore.py +3 -18
- angr/procedures/definitions/win32_computenetwork.py +3 -18
- angr/procedures/definitions/win32_computestorage.py +3 -18
- angr/procedures/definitions/win32_comsvcs.py +3 -18
- angr/procedures/definitions/win32_coremessaging.py +3 -3
- angr/procedures/definitions/win32_credui.py +3 -18
- angr/procedures/definitions/win32_crypt32.py +3 -18
- angr/procedures/definitions/win32_cryptnet.py +3 -18
- angr/procedures/definitions/win32_cryptui.py +3 -18
- angr/procedures/definitions/win32_cryptxml.py +3 -18
- angr/procedures/definitions/win32_cscapi.py +3 -18
- angr/procedures/definitions/win32_d2d1.py +3 -18
- angr/procedures/definitions/win32_d3d10.py +3 -18
- angr/procedures/definitions/win32_d3d10_1.py +3 -18
- angr/procedures/definitions/win32_d3d11.py +3 -18
- angr/procedures/definitions/win32_d3d12.py +3 -18
- angr/procedures/definitions/win32_d3d9.py +3 -18
- angr/procedures/definitions/win32_d3dcompiler_47.py +3 -18
- angr/procedures/definitions/win32_d3dcsx.py +3 -18
- angr/procedures/definitions/win32_davclnt.py +3 -18
- angr/procedures/definitions/win32_dbgeng.py +3 -18
- angr/procedures/definitions/win32_dbghelp.py +3 -18
- angr/procedures/definitions/win32_dbgmodel.py +3 -18
- angr/procedures/definitions/win32_dciman32.py +3 -18
- angr/procedures/definitions/win32_dcomp.py +3 -18
- angr/procedures/definitions/win32_ddraw.py +3 -18
- angr/procedures/definitions/win32_deviceaccess.py +3 -18
- angr/procedures/definitions/win32_dflayout.py +3 -18
- angr/procedures/definitions/win32_dhcpcsvc.py +3 -18
- angr/procedures/definitions/win32_dhcpcsvc6.py +3 -18
- angr/procedures/definitions/win32_dhcpsapi.py +3 -18
- angr/procedures/definitions/win32_diagnosticdataquery.py +3 -18
- angr/procedures/definitions/win32_dinput8.py +3 -18
- angr/procedures/definitions/win32_directml.py +3 -18
- angr/procedures/definitions/win32_dmprocessxmlfiltered.py +3 -18
- angr/procedures/definitions/win32_dnsapi.py +3 -18
- angr/procedures/definitions/win32_drt.py +3 -18
- angr/procedures/definitions/win32_drtprov.py +3 -18
- angr/procedures/definitions/win32_drttransport.py +3 -18
- angr/procedures/definitions/win32_dsound.py +3 -18
- angr/procedures/definitions/win32_dsparse.py +3 -18
- angr/procedures/definitions/win32_dsprop.py +3 -18
- angr/procedures/definitions/win32_dssec.py +3 -18
- angr/procedures/definitions/win32_dsuiext.py +3 -18
- angr/procedures/definitions/win32_dwmapi.py +3 -18
- angr/procedures/definitions/win32_dwrite.py +3 -18
- angr/procedures/definitions/win32_dxcompiler.py +3 -18
- angr/procedures/definitions/win32_dxcore.py +3 -18
- angr/procedures/definitions/win32_dxgi.py +3 -18
- angr/procedures/definitions/win32_dxva2.py +3 -18
- angr/procedures/definitions/win32_eappcfg.py +3 -18
- angr/procedures/definitions/win32_eappprxy.py +3 -18
- angr/procedures/definitions/win32_efswrt.py +3 -18
- angr/procedures/definitions/win32_elscore.py +3 -18
- angr/procedures/definitions/win32_esent.py +3 -18
- angr/procedures/definitions/win32_evr.py +3 -18
- angr/procedures/definitions/win32_faultrep.py +3 -18
- angr/procedures/definitions/win32_fhsvcctl.py +3 -18
- angr/procedures/definitions/win32_firewallapi.py +3 -18
- angr/procedures/definitions/win32_fltlib.py +3 -18
- angr/procedures/definitions/win32_fontsub.py +3 -18
- angr/procedures/definitions/win32_forceinline.py +3 -18
- angr/procedures/definitions/win32_fwpuclnt.py +3 -18
- angr/procedures/definitions/win32_fxsutility.py +3 -18
- angr/procedures/definitions/win32_gdi32.py +3 -18
- angr/procedures/definitions/win32_gdiplus.py +3 -18
- angr/procedures/definitions/win32_glu32.py +3 -18
- angr/procedures/definitions/win32_gpedit.py +3 -18
- angr/procedures/definitions/win32_hhctrl_ocx.py +3 -18
- angr/procedures/definitions/win32_hid.py +3 -18
- angr/procedures/definitions/win32_hlink.py +3 -18
- angr/procedures/definitions/win32_hrtfapo.py +3 -18
- angr/procedures/definitions/win32_httpapi.py +3 -18
- angr/procedures/definitions/win32_icm32.py +3 -18
- angr/procedures/definitions/win32_icmui.py +3 -18
- angr/procedures/definitions/win32_icu.py +3 -18
- angr/procedures/definitions/win32_ieframe.py +3 -18
- angr/procedures/definitions/win32_imagehlp.py +3 -18
- angr/procedures/definitions/win32_imgutil.py +3 -18
- angr/procedures/definitions/win32_imm32.py +3 -18
- angr/procedures/definitions/win32_infocardapi.py +3 -18
- angr/procedures/definitions/win32_inkobjcore.py +3 -18
- angr/procedures/definitions/win32_iphlpapi.py +3 -18
- angr/procedures/definitions/win32_iscsidsc.py +3 -18
- angr/procedures/definitions/win32_isolatedwindowsenvironmentutils.py +3 -18
- angr/procedures/definitions/win32_kernel32.py +3 -18
- angr/procedures/definitions/win32_kernelbase.py +3 -18
- angr/procedures/definitions/win32_keycredmgr.py +3 -18
- angr/procedures/definitions/win32_ksproxy_ax.py +3 -18
- angr/procedures/definitions/win32_ksuser.py +3 -18
- angr/procedures/definitions/win32_ktmw32.py +3 -18
- angr/procedures/definitions/win32_licenseprotection.py +3 -18
- angr/procedures/definitions/win32_loadperf.py +3 -18
- angr/procedures/definitions/win32_magnification.py +3 -18
- angr/procedures/definitions/win32_mapi32.py +3 -18
- angr/procedures/definitions/win32_mdmlocalmanagement.py +3 -18
- angr/procedures/definitions/win32_mdmregistration.py +3 -18
- angr/procedures/definitions/win32_mf.py +3 -18
- angr/procedures/definitions/win32_mfcore.py +3 -18
- angr/procedures/definitions/win32_mfplat.py +3 -18
- angr/procedures/definitions/win32_mfplay.py +3 -18
- angr/procedures/definitions/win32_mfreadwrite.py +3 -18
- angr/procedures/definitions/win32_mfsensorgroup.py +3 -18
- angr/procedures/definitions/win32_mfsrcsnk.py +3 -18
- angr/procedures/definitions/win32_mgmtapi.py +3 -18
- angr/procedures/definitions/win32_mi.py +3 -18
- angr/procedures/definitions/win32_mmdevapi.py +3 -18
- angr/procedures/definitions/win32_mpr.py +3 -18
- angr/procedures/definitions/win32_mprapi.py +3 -18
- angr/procedures/definitions/win32_mqrt.py +3 -18
- angr/procedures/definitions/win32_mrmsupport.py +3 -18
- angr/procedures/definitions/win32_msacm32.py +3 -18
- angr/procedures/definitions/win32_msajapi.py +3 -18
- angr/procedures/definitions/win32_mscms.py +3 -18
- angr/procedures/definitions/win32_mscoree.py +3 -18
- angr/procedures/definitions/win32_msctfmonitor.py +3 -18
- angr/procedures/definitions/win32_msdelta.py +3 -18
- angr/procedures/definitions/win32_msdmo.py +3 -18
- angr/procedures/definitions/win32_msdrm.py +3 -18
- angr/procedures/definitions/win32_msi.py +3 -18
- angr/procedures/definitions/win32_msimg32.py +3 -18
- angr/procedures/definitions/win32_mspatcha.py +3 -18
- angr/procedures/definitions/win32_mspatchc.py +3 -18
- angr/procedures/definitions/win32_msports.py +3 -18
- angr/procedures/definitions/win32_msrating.py +3 -18
- angr/procedures/definitions/win32_mssign32.py +3 -18
- angr/procedures/definitions/win32_mstask.py +3 -18
- angr/procedures/definitions/win32_msvfw32.py +3 -18
- angr/procedures/definitions/win32_mswsock.py +3 -18
- angr/procedures/definitions/win32_mtxdm.py +3 -18
- angr/procedures/definitions/win32_ncrypt.py +3 -18
- angr/procedures/definitions/win32_ndfapi.py +3 -18
- angr/procedures/definitions/win32_netapi32.py +3 -18
- angr/procedures/definitions/win32_netsh.py +3 -18
- angr/procedures/definitions/win32_netshell.py +3 -18
- angr/procedures/definitions/win32_newdev.py +3 -18
- angr/procedures/definitions/win32_ninput.py +3 -18
- angr/procedures/definitions/win32_normaliz.py +3 -18
- angr/procedures/definitions/win32_ntdll.py +3 -18
- angr/procedures/definitions/win32_ntdllk.py +3 -18
- angr/procedures/definitions/win32_ntdsapi.py +3 -18
- angr/procedures/definitions/win32_ntlanman.py +3 -18
- angr/procedures/definitions/win32_odbc32.py +3 -18
- angr/procedures/definitions/win32_odbcbcp.py +3 -18
- angr/procedures/definitions/win32_ole32.py +3 -18
- angr/procedures/definitions/win32_oleacc.py +3 -18
- angr/procedures/definitions/win32_oleaut32.py +3 -18
- angr/procedures/definitions/win32_oledlg.py +3 -18
- angr/procedures/definitions/win32_ondemandconnroutehelper.py +3 -18
- angr/procedures/definitions/win32_opengl32.py +3 -18
- angr/procedures/definitions/win32_opmxbox.py +3 -18
- angr/procedures/definitions/win32_p2p.py +3 -18
- angr/procedures/definitions/win32_p2pgraph.py +3 -18
- angr/procedures/definitions/win32_pdh.py +3 -18
- angr/procedures/definitions/win32_peerdist.py +3 -18
- angr/procedures/definitions/win32_powrprof.py +3 -18
- angr/procedures/definitions/win32_prntvpt.py +3 -18
- angr/procedures/definitions/win32_projectedfslib.py +3 -18
- angr/procedures/definitions/win32_propsys.py +3 -18
- angr/procedures/definitions/win32_psapi.py +3 -18
- angr/procedures/definitions/win32_quartz.py +3 -18
- angr/procedures/definitions/win32_query.py +3 -18
- angr/procedures/definitions/win32_qwave.py +3 -18
- angr/procedures/definitions/win32_rasapi32.py +3 -18
- angr/procedures/definitions/win32_rasdlg.py +3 -18
- angr/procedures/definitions/win32_resutils.py +3 -18
- angr/procedures/definitions/win32_rometadata.py +3 -3
- angr/procedures/definitions/win32_rpcns4.py +3 -18
- angr/procedures/definitions/win32_rpcproxy.py +3 -18
- angr/procedures/definitions/win32_rpcrt4.py +3 -18
- angr/procedures/definitions/win32_rstrtmgr.py +3 -18
- angr/procedures/definitions/win32_rtm.py +3 -18
- angr/procedures/definitions/win32_rtutils.py +3 -18
- angr/procedures/definitions/win32_rtworkq.py +3 -18
- angr/procedures/definitions/win32_sas.py +3 -18
- angr/procedures/definitions/win32_scarddlg.py +3 -18
- angr/procedures/definitions/win32_schannel.py +3 -18
- angr/procedures/definitions/win32_sechost.py +3 -18
- angr/procedures/definitions/win32_secur32.py +3 -18
- angr/procedures/definitions/win32_sensapi.py +3 -18
- angr/procedures/definitions/win32_sensorsutilsv2.py +3 -18
- angr/procedures/definitions/win32_setupapi.py +3 -18
- angr/procedures/definitions/win32_sfc.py +3 -18
- angr/procedures/definitions/win32_shdocvw.py +3 -18
- angr/procedures/definitions/win32_shell32.py +3 -18
- angr/procedures/definitions/win32_shlwapi.py +3 -18
- angr/procedures/definitions/win32_slc.py +3 -18
- angr/procedures/definitions/win32_slcext.py +3 -18
- angr/procedures/definitions/win32_slwga.py +3 -18
- angr/procedures/definitions/win32_snmpapi.py +3 -18
- angr/procedures/definitions/win32_spoolss.py +3 -18
- angr/procedures/definitions/win32_srclient.py +3 -18
- angr/procedures/definitions/win32_srpapi.py +3 -18
- angr/procedures/definitions/win32_sspicli.py +3 -18
- angr/procedures/definitions/win32_sti.py +3 -18
- angr/procedures/definitions/win32_t2embed.py +3 -18
- angr/procedures/definitions/win32_tapi32.py +3 -18
- angr/procedures/definitions/win32_tbs.py +3 -18
- angr/procedures/definitions/win32_tdh.py +3 -18
- angr/procedures/definitions/win32_tokenbinding.py +3 -18
- angr/procedures/definitions/win32_traffic.py +3 -18
- angr/procedures/definitions/win32_txfw32.py +3 -18
- angr/procedures/definitions/win32_ualapi.py +3 -18
- angr/procedures/definitions/win32_uiautomationcore.py +3 -18
- angr/procedures/definitions/win32_urlmon.py +3 -18
- angr/procedures/definitions/win32_user32.py +4 -19
- angr/procedures/definitions/win32_userenv.py +3 -18
- angr/procedures/definitions/win32_usp10.py +3 -18
- angr/procedures/definitions/win32_uxtheme.py +3 -18
- angr/procedures/definitions/win32_verifier.py +3 -18
- angr/procedures/definitions/win32_version.py +3 -18
- angr/procedures/definitions/win32_vertdll.py +3 -18
- angr/procedures/definitions/win32_virtdisk.py +3 -18
- angr/procedures/definitions/win32_vmdevicehost.py +3 -18
- angr/procedures/definitions/win32_vmsavedstatedumpprovider.py +3 -18
- angr/procedures/definitions/win32_vssapi.py +3 -18
- angr/procedures/definitions/win32_wcmapi.py +3 -18
- angr/procedures/definitions/win32_wdsbp.py +3 -18
- angr/procedures/definitions/win32_wdsclientapi.py +3 -18
- angr/procedures/definitions/win32_wdsmc.py +3 -18
- angr/procedures/definitions/win32_wdspxe.py +3 -18
- angr/procedures/definitions/win32_wdstptc.py +3 -18
- angr/procedures/definitions/win32_webauthn.py +3 -18
- angr/procedures/definitions/win32_webservices.py +3 -18
- angr/procedures/definitions/win32_websocket.py +3 -18
- angr/procedures/definitions/win32_wecapi.py +3 -18
- angr/procedures/definitions/win32_wer.py +3 -18
- angr/procedures/definitions/win32_wevtapi.py +3 -18
- angr/procedures/definitions/win32_winbio.py +3 -18
- angr/procedures/definitions/win32_windows_ai_machinelearning.py +3 -18
- angr/procedures/definitions/win32_windows_data_pdf.py +3 -3
- angr/procedures/definitions/win32_windows_media_mediacontrol.py +3 -18
- angr/procedures/definitions/win32_windows_networking.py +3 -18
- angr/procedures/definitions/win32_windows_ui_xaml.py +3 -18
- angr/procedures/definitions/win32_windowscodecs.py +3 -18
- angr/procedures/definitions/win32_winfax.py +3 -18
- angr/procedures/definitions/win32_winhttp.py +3 -18
- angr/procedures/definitions/win32_winhvemulation.py +3 -18
- angr/procedures/definitions/win32_winhvplatform.py +3 -18
- angr/procedures/definitions/win32_wininet.py +3 -18
- angr/procedures/definitions/win32_winml.py +3 -18
- angr/procedures/definitions/win32_winmm.py +3 -18
- angr/procedures/definitions/win32_winscard.py +3 -18
- angr/procedures/definitions/win32_winspool.py +3 -3
- angr/procedures/definitions/win32_winspool_drv.py +3 -18
- angr/procedures/definitions/win32_wintrust.py +3 -18
- angr/procedures/definitions/win32_winusb.py +3 -18
- angr/procedures/definitions/win32_wlanapi.py +3 -18
- angr/procedures/definitions/win32_wlanui.py +3 -18
- angr/procedures/definitions/win32_wldap32.py +3 -18
- angr/procedures/definitions/win32_wldp.py +3 -18
- angr/procedures/definitions/win32_wmvcore.py +3 -18
- angr/procedures/definitions/win32_wnvapi.py +3 -18
- angr/procedures/definitions/win32_wofutil.py +3 -18
- angr/procedures/definitions/win32_ws2_32.py +3 -18
- angr/procedures/definitions/win32_wscapi.py +3 -18
- angr/procedures/definitions/win32_wsclient.py +3 -18
- angr/procedures/definitions/win32_wsdapi.py +3 -18
- angr/procedures/definitions/win32_wsmsvc.py +3 -18
- angr/procedures/definitions/win32_wsnmp32.py +3 -18
- angr/procedures/definitions/win32_wtsapi32.py +3 -18
- angr/procedures/definitions/win32_xaudio2_8.py +3 -18
- angr/procedures/definitions/win32_xinput1_4.py +3 -18
- angr/procedures/definitions/win32_xinputuap.py +3 -3
- angr/procedures/definitions/win32_xmllite.py +3 -18
- angr/procedures/definitions/win32_xolehlp.py +3 -18
- angr/procedures/definitions/win32_xpsprint.py +3 -18
- angr/procedures/glibc/scanf.py +2 -2
- angr/procedures/glibc/sscanf.py +1 -1
- angr/procedures/java/__init__.py +6 -3
- angr/procedures/java/unconstrained.py +3 -3
- angr/procedures/java_io/read.py +1 -1
- angr/procedures/java_io/write.py +1 -1
- angr/procedures/java_jni/__init__.py +4 -4
- angr/procedures/java_jni/array_operations.py +2 -2
- angr/procedures/java_jni/field_access.py +3 -3
- angr/procedures/java_jni/method_calls.py +2 -2
- angr/procedures/java_jni/object_operations.py +1 -1
- angr/procedures/java_jni/string_operations.py +1 -1
- angr/procedures/java_lang/character.py +1 -1
- angr/procedures/java_lang/double.py +1 -1
- angr/procedures/java_lang/exit.py +1 -1
- angr/procedures/java_lang/getsimplename.py +1 -1
- angr/procedures/java_lang/integer.py +2 -2
- angr/procedures/java_lang/load_library.py +1 -1
- angr/procedures/java_lang/math.py +1 -1
- angr/procedures/java_lang/string.py +3 -3
- angr/procedures/java_lang/stringbuilder.py +2 -2
- angr/procedures/java_lang/system.py +1 -1
- angr/procedures/java_util/collection.py +2 -2
- angr/procedures/java_util/iterator.py +2 -2
- angr/procedures/java_util/list.py +3 -3
- angr/procedures/java_util/map.py +3 -3
- angr/procedures/java_util/random.py +1 -1
- angr/procedures/java_util/scanner_nextline.py +2 -2
- angr/procedures/libc/fseek.py +1 -1
- angr/procedures/libc/memcpy.py +1 -1
- angr/procedures/libc/strlen.py +12 -4
- angr/procedures/libc/strncmp.py +9 -4
- angr/procedures/linux_kernel/iovec.py +3 -3
- angr/procedures/linux_kernel/mmap.py +1 -1
- angr/procedures/linux_kernel/stat.py +1 -1
- angr/procedures/linux_kernel/sysinfo.py +1 -1
- angr/procedures/posix/bzero.py +1 -1
- angr/procedures/posix/mmap.py +1 -1
- angr/procedures/posix/send.py +1 -1
- angr/procedures/posix/syslog.py +2 -3
- angr/procedures/procedure_dict.py +2 -2
- angr/procedures/stubs/format_parser.py +5 -5
- angr/procedures/tracer/random.py +1 -1
- angr/procedures/tracer/receive.py +1 -1
- angr/procedures/tracer/transmit.py +1 -1
- angr/procedures/uclibc/__uClibc_main.py +1 -1
- angr/protos/__init__.py +8 -0
- angr/protos/cfg_pb2.py +23 -15
- angr/protos/function_pb2.py +19 -21
- angr/protos/primitives_pb2.py +46 -112
- angr/protos/variables_pb2.py +38 -114
- angr/protos/xrefs_pb2.py +17 -18
- angr/sim_options.py +0 -4
- angr/sim_state.py +2 -78
- angr/sim_type.py +9 -18
- angr/simos/__init__.py +12 -0
- angr/simos/cgc.py +5 -5
- angr/simos/javavm.py +12 -12
- angr/simos/linux.py +5 -5
- angr/simos/simos.py +11 -15
- angr/simos/userland.py +3 -3
- angr/simos/windows.py +5 -10
- angr/state_plugins/__init__.py +84 -28
- angr/state_plugins/callstack.py +1 -1
- angr/state_plugins/concrete.py +3 -4
- angr/state_plugins/filesystem.py +3 -3
- angr/state_plugins/gdb.py +1 -1
- angr/state_plugins/heap/__init__.py +14 -5
- angr/state_plugins/heap/heap_base.py +5 -4
- angr/state_plugins/heap/heap_brk.py +1 -1
- angr/state_plugins/heap/heap_freelist.py +1 -1
- angr/state_plugins/heap/heap_ptmalloc.py +2 -20
- angr/state_plugins/heap/utils.py +1 -1
- angr/state_plugins/history.py +2 -2
- angr/state_plugins/javavm_classloader.py +3 -3
- angr/state_plugins/jni_references.py +1 -1
- angr/state_plugins/light_registers.py +3 -3
- angr/state_plugins/log.py +1 -1
- angr/state_plugins/plugin.py +3 -2
- angr/state_plugins/posix.py +3 -3
- angr/state_plugins/preconstrainer.py +4 -4
- angr/state_plugins/scratch.py +3 -3
- angr/state_plugins/sim_action_object.py +1 -1
- angr/state_plugins/solver.py +85 -32
- angr/state_plugins/symbolizer.py +2 -3
- angr/state_plugins/uc_manager.py +1 -1
- angr/state_plugins/unicorn_engine.py +4 -4
- angr/state_plugins/view.py +1 -1
- angr/storage/__init__.py +9 -4
- angr/storage/file.py +4 -4
- angr/storage/memory_mixins/__init__.py +89 -162
- angr/storage/memory_mixins/actions_mixin.py +3 -3
- angr/storage/memory_mixins/address_concretization_mixin.py +7 -7
- angr/storage/memory_mixins/bvv_conversion_mixin.py +2 -2
- angr/storage/memory_mixins/clouseau_mixin.py +3 -2
- angr/storage/memory_mixins/conditional_store_mixin.py +1 -1
- angr/storage/memory_mixins/convenient_mappings_mixin.py +3 -3
- angr/storage/memory_mixins/default_filler_mixin.py +4 -4
- angr/storage/memory_mixins/dirty_addrs_mixin.py +2 -1
- angr/storage/memory_mixins/hex_dumper_mixin.py +2 -2
- angr/storage/memory_mixins/{javavm_memory/javavm_memory_mixin.py → javavm_memory_mixin.py} +15 -12
- angr/storage/memory_mixins/{keyvalue_memory/keyvalue_memory_mixin.py → keyvalue_memory_mixin.py} +11 -6
- angr/storage/memory_mixins/label_merger_mixin.py +1 -1
- angr/storage/memory_mixins/memory_mixin.py +163 -0
- angr/storage/memory_mixins/multi_value_merger_mixin.py +1 -1
- angr/storage/memory_mixins/name_resolution_mixin.py +5 -3
- angr/storage/memory_mixins/paged_memory/paged_memory_mixin.py +2 -2
- angr/storage/memory_mixins/paged_memory/paged_memory_multivalue_mixin.py +2 -1
- angr/storage/memory_mixins/paged_memory/pages/__init__.py +16 -1
- angr/storage/memory_mixins/paged_memory/pages/history_tracking_mixin.py +1 -1
- angr/storage/memory_mixins/paged_memory/pages/ispo_mixin.py +2 -1
- angr/storage/memory_mixins/paged_memory/pages/mv_list_page.py +1 -1
- angr/storage/memory_mixins/paged_memory/pages/permissions_mixin.py +1 -1
- angr/storage/memory_mixins/paged_memory/pages/refcount_mixin.py +2 -1
- angr/storage/memory_mixins/paged_memory/pages/ultra_page.py +2 -2
- angr/storage/memory_mixins/paged_memory/stack_allocation_mixin.py +2 -2
- angr/storage/memory_mixins/regioned_memory/__init__.py +10 -0
- angr/storage/memory_mixins/regioned_memory/abstract_merger_mixin.py +1 -2
- angr/storage/memory_mixins/regioned_memory/region_category_mixin.py +2 -1
- angr/storage/memory_mixins/regioned_memory/region_data.py +2 -2
- angr/storage/memory_mixins/regioned_memory/region_meta_mixin.py +1 -1
- angr/storage/memory_mixins/regioned_memory/regioned_address_concretization_mixin.py +4 -4
- angr/storage/memory_mixins/regioned_memory/regioned_memory_mixin.py +8 -20
- angr/storage/memory_mixins/regioned_memory/static_find_mixin.py +1 -1
- angr/storage/memory_mixins/simple_interface_mixin.py +3 -2
- angr/storage/memory_mixins/simplification_mixin.py +3 -2
- angr/storage/memory_mixins/size_resolution_mixin.py +2 -2
- angr/storage/memory_mixins/slotted_memory.py +3 -3
- angr/storage/memory_mixins/smart_find_mixin.py +2 -2
- angr/storage/memory_mixins/symbolic_merger_mixin.py +2 -1
- angr/storage/memory_mixins/top_merger_mixin.py +3 -2
- angr/storage/memory_mixins/underconstrained_mixin.py +5 -3
- angr/storage/memory_mixins/unwrapper_mixin.py +3 -2
- angr/storage/memory_object.py +1 -1
- angr/utils/__init__.py +12 -0
- angr/utils/enums_conv.py +1 -1
- angr/utils/library.py +2 -2
- angr/utils/mp.py +1 -1
- {angr-9.2.119.dist-info → angr-9.2.121.dist-info}/METADATA +7 -8
- angr-9.2.121.dist-info/RECORD +1342 -0
- angr/analyses/s_liveness/__init__.py +0 -2
- angr/analyses/s_propagator/__init__.py +0 -2
- angr/analyses/s_reaching_definitions/s_rda.py +0 -479
- angr/knowledge_base/__init__.py +0 -2
- angr/knowledge_plugins/structured_code/__init__.py +0 -2
- angr/knowledge_plugins/sync/__init__.py +0 -2
- angr/knowledge_plugins/sync/sync_controller.py +0 -324
- angr/misc/range.py +0 -24
- angr/misc/weakpatch.py +0 -59
- angr/storage/memory_mixins/javavm_memory/__init__.py +0 -2
- angr/storage/memory_mixins/keyvalue_memory/__init__.py +0 -2
- angr/storage/pcap.py +0 -65
- angr/utils/typing.py +0 -18
- angr-9.2.119.dist-info/RECORD +0 -1345
- /angr/analyses/{s_liveness/s_liveness.py → s_liveness.py} +0 -0
- {angr-9.2.119.dist-info → angr-9.2.121.dist-info}/LICENSE +0 -0
- {angr-9.2.119.dist-info → angr-9.2.121.dist-info}/WHEEL +0 -0
- {angr-9.2.119.dist-info → angr-9.2.121.dist-info}/entry_points.txt +0 -0
- {angr-9.2.119.dist-info → angr-9.2.121.dist-info}/top_level.txt +0 -0
|
@@ -1,479 +0,0 @@
|
|
|
1
|
-
# pylint:disable=too-many-boolean-expressions
|
|
2
|
-
from __future__ import annotations
|
|
3
|
-
from typing import Any
|
|
4
|
-
from collections.abc import Generator
|
|
5
|
-
from collections import defaultdict
|
|
6
|
-
import logging
|
|
7
|
-
|
|
8
|
-
from ailment.block import Block
|
|
9
|
-
from ailment.statement import Assignment, Call, Return, Label
|
|
10
|
-
from ailment.expression import VirtualVariable, Tmp, Expression
|
|
11
|
-
|
|
12
|
-
from angr.utils.ail import is_phi_assignment
|
|
13
|
-
from angr.utils.graph import GraphUtils
|
|
14
|
-
from angr.knowledge_plugins.functions import Function
|
|
15
|
-
from angr.knowledge_plugins.key_definitions import atoms, Definition
|
|
16
|
-
from angr.knowledge_plugins.key_definitions.constants import ObservationPointType, ObservationPoint
|
|
17
|
-
from angr.code_location import CodeLocation, ExternalCodeLocation
|
|
18
|
-
from angr.analyses import Analysis, register_analysis
|
|
19
|
-
from angr.utils.ssa import get_vvar_uselocs, get_vvar_deflocs, get_tmp_deflocs, get_tmp_uselocs, get_reg_offset_base
|
|
20
|
-
from angr.calling_conventions import SimRegArg, default_cc
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_l = logging.getLogger(__name__)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class SRDAModel:
|
|
27
|
-
"""
|
|
28
|
-
The model for SRDA.
|
|
29
|
-
"""
|
|
30
|
-
|
|
31
|
-
def __init__(self, func_graph, arch):
|
|
32
|
-
self.func_graph = func_graph
|
|
33
|
-
self.arch = arch
|
|
34
|
-
self.varid_to_vvar: dict[int, VirtualVariable] = {}
|
|
35
|
-
self.all_vvar_definitions: dict[VirtualVariable, CodeLocation] = {}
|
|
36
|
-
self.all_vvar_uses: dict[VirtualVariable, set[tuple[VirtualVariable | None, CodeLocation]]] = defaultdict(set)
|
|
37
|
-
self.all_tmp_definitions: dict[CodeLocation, dict[atoms.Tmp, int]] = defaultdict(dict)
|
|
38
|
-
self.all_tmp_uses: dict[CodeLocation, dict[atoms.Tmp, set[tuple[Tmp, int]]]] = defaultdict(dict)
|
|
39
|
-
self.phi_vvar_ids: set[int] = set()
|
|
40
|
-
self.phivarid_to_varids: dict[int, set[int]] = {}
|
|
41
|
-
|
|
42
|
-
@property
|
|
43
|
-
def all_definitions(self) -> Generator[Definition]:
|
|
44
|
-
for vvar, defloc in self.all_vvar_definitions.items():
|
|
45
|
-
yield Definition(atoms.VirtualVariable(vvar.varid, vvar.size, vvar.category, vvar.oident), defloc)
|
|
46
|
-
|
|
47
|
-
def is_phi_vvar_id(self, idx: int) -> bool:
|
|
48
|
-
return idx in self.phi_vvar_ids
|
|
49
|
-
|
|
50
|
-
def get_all_definitions(self, block_loc: CodeLocation) -> set[Definition]:
|
|
51
|
-
s = set()
|
|
52
|
-
for vvar, codeloc in self.all_vvar_definitions.items():
|
|
53
|
-
if codeloc.block_addr == block_loc.block_addr and codeloc.block_idx == block_loc.block_idx:
|
|
54
|
-
s.add(Definition(atoms.VirtualVariable(vvar.varid, vvar.size, vvar.category, vvar.oident), codeloc))
|
|
55
|
-
return s | self.get_all_tmp_definitions(block_loc)
|
|
56
|
-
|
|
57
|
-
def get_all_tmp_definitions(self, block_loc: CodeLocation) -> set[Definition]:
|
|
58
|
-
s = set()
|
|
59
|
-
for tmp_atom, stmt_idx in self.all_tmp_definitions[block_loc].items():
|
|
60
|
-
s.add(Definition(tmp_atom, CodeLocation(block_loc.block_addr, stmt_idx, block_idx=block_loc.block_idx)))
|
|
61
|
-
return s
|
|
62
|
-
|
|
63
|
-
def get_uses_by_location(
|
|
64
|
-
self, loc: CodeLocation, exprs: bool = False
|
|
65
|
-
) -> set[Definition] | set[tuple[Definition, Any | None]]:
|
|
66
|
-
"""
|
|
67
|
-
Retrieve all definitions that are used at a given location.
|
|
68
|
-
|
|
69
|
-
:param loc: The code location.
|
|
70
|
-
:return: A set of definitions that are used at the given location.
|
|
71
|
-
"""
|
|
72
|
-
if exprs:
|
|
73
|
-
defs: set[tuple[Definition, Any]] = set()
|
|
74
|
-
for vvar, uses in self.all_vvar_uses.items():
|
|
75
|
-
for expr, loc_ in uses:
|
|
76
|
-
if loc_ == loc:
|
|
77
|
-
defs.add(
|
|
78
|
-
(
|
|
79
|
-
Definition(
|
|
80
|
-
atoms.VirtualVariable(vvar.varid, vvar.size, vvar.category, vvar.oident),
|
|
81
|
-
self.all_vvar_definitions[vvar],
|
|
82
|
-
),
|
|
83
|
-
expr,
|
|
84
|
-
)
|
|
85
|
-
)
|
|
86
|
-
return defs
|
|
87
|
-
|
|
88
|
-
defs: set[Definition] = set()
|
|
89
|
-
for vvar, uses in self.all_vvar_uses.items():
|
|
90
|
-
for _, loc_ in uses:
|
|
91
|
-
if loc_ == loc:
|
|
92
|
-
defs.add(
|
|
93
|
-
Definition(
|
|
94
|
-
atoms.VirtualVariable(vvar.varid, vvar.size, vvar.category, vvar.oident),
|
|
95
|
-
self.all_vvar_definitions[vvar],
|
|
96
|
-
)
|
|
97
|
-
)
|
|
98
|
-
return defs
|
|
99
|
-
|
|
100
|
-
def get_vvar_uses(self, obj: atoms.VirtualVariable) -> set[CodeLocation]:
|
|
101
|
-
the_vvar = self.varid_to_vvar.get(obj.varid, None)
|
|
102
|
-
if the_vvar is not None:
|
|
103
|
-
return {loc for _, loc in self.all_vvar_uses[the_vvar]}
|
|
104
|
-
return set()
|
|
105
|
-
|
|
106
|
-
def get_vvar_uses_with_expr(self, obj: atoms.VirtualVariable) -> set[tuple[CodeLocation, VirtualVariable]]:
|
|
107
|
-
the_vvar = self.varid_to_vvar.get(obj.varid, None)
|
|
108
|
-
if the_vvar is not None:
|
|
109
|
-
return {(loc, expr) for expr, loc in self.all_vvar_uses[the_vvar]}
|
|
110
|
-
return set()
|
|
111
|
-
|
|
112
|
-
def get_tmp_uses(self, obj: atoms.Tmp, block_loc: CodeLocation) -> set[CodeLocation]:
|
|
113
|
-
if block_loc not in self.all_tmp_uses:
|
|
114
|
-
return set()
|
|
115
|
-
if obj not in self.all_tmp_uses[block_loc]:
|
|
116
|
-
return set()
|
|
117
|
-
s = set()
|
|
118
|
-
for _, stmt_idx in self.all_tmp_uses[block_loc][obj]:
|
|
119
|
-
s.add(CodeLocation(block_loc.block_addr, stmt_idx, block_idx=block_loc.block_idx))
|
|
120
|
-
return s
|
|
121
|
-
|
|
122
|
-
def get_uses_by_def(self, def_: Definition) -> set[CodeLocation]:
|
|
123
|
-
if isinstance(def_.atom, atoms.Tmp):
|
|
124
|
-
return self.get_tmp_uses(
|
|
125
|
-
def_.atom,
|
|
126
|
-
CodeLocation(def_.codeloc.block_addr, def_.codeloc.stmt_idx, block_idx=def_.codeloc.block_idx),
|
|
127
|
-
)
|
|
128
|
-
if isinstance(def_.atom, atoms.VirtualVariable):
|
|
129
|
-
return self.get_vvar_uses(def_.atom)
|
|
130
|
-
return set()
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
class SRDAView:
|
|
134
|
-
"""
|
|
135
|
-
A view of SRDA model that provides various functionalities for querying the model.
|
|
136
|
-
"""
|
|
137
|
-
|
|
138
|
-
def __init__(self, model: SRDAModel):
|
|
139
|
-
self.model = model
|
|
140
|
-
|
|
141
|
-
def _get_call_clobbered_regs(self, stmt: Call) -> set[int]:
|
|
142
|
-
cc = stmt.calling_convention
|
|
143
|
-
if cc is None:
|
|
144
|
-
# get the default calling convention
|
|
145
|
-
cc = default_cc(self.model.arch.name) # TODO: platform and language
|
|
146
|
-
if cc is not None:
|
|
147
|
-
reg_list = cc.CALLER_SAVED_REGS
|
|
148
|
-
if isinstance(cc.RETURN_VAL, SimRegArg):
|
|
149
|
-
reg_list.append(cc.RETURN_VAL.reg_name)
|
|
150
|
-
return {self.model.arch.registers[reg_name][0] for reg_name in reg_list}
|
|
151
|
-
_l.warning("Cannot determine registers that are clobbered by call statement %r.", stmt)
|
|
152
|
-
return set()
|
|
153
|
-
|
|
154
|
-
def _get_vvar_by_insn(self, addr: int, op_type: ObservationPointType, predicate, block_idx: int | None = None):
|
|
155
|
-
# find the starting block
|
|
156
|
-
for block in self.model.func_graph:
|
|
157
|
-
if block.idx == block_idx and block.addr <= addr < block.addr + block.original_size:
|
|
158
|
-
the_block = block
|
|
159
|
-
break
|
|
160
|
-
else:
|
|
161
|
-
return
|
|
162
|
-
|
|
163
|
-
starting_stmt_idx = len(the_block.statements) if op_type == ObservationPointType.OP_AFTER else 0
|
|
164
|
-
for stmt_idx, stmt in enumerate(the_block.statements):
|
|
165
|
-
# skip all labels and phi assignments
|
|
166
|
-
if isinstance(stmt, Label) or is_phi_assignment(stmt):
|
|
167
|
-
if op_type == ObservationPointType.OP_BEFORE:
|
|
168
|
-
# ensure that we tick starting_stmt_idx forward
|
|
169
|
-
starting_stmt_idx = stmt_idx
|
|
170
|
-
continue
|
|
171
|
-
|
|
172
|
-
if (
|
|
173
|
-
op_type == ObservationPointType.OP_BEFORE
|
|
174
|
-
and stmt.ins_addr == addr
|
|
175
|
-
or op_type == ObservationPointType.OP_AFTER
|
|
176
|
-
and stmt.ins_addr > addr
|
|
177
|
-
):
|
|
178
|
-
starting_stmt_idx = stmt_idx
|
|
179
|
-
break
|
|
180
|
-
|
|
181
|
-
traversed = set()
|
|
182
|
-
queue = [(the_block, starting_stmt_idx)]
|
|
183
|
-
while queue:
|
|
184
|
-
block, start_stmt_idx = queue.pop(0)
|
|
185
|
-
traversed.add(block)
|
|
186
|
-
|
|
187
|
-
stmts = block.statements[:start_stmt_idx] if start_stmt_idx is not None else block.statements
|
|
188
|
-
|
|
189
|
-
for stmt in reversed(stmts):
|
|
190
|
-
should_break = predicate(stmt)
|
|
191
|
-
if should_break:
|
|
192
|
-
break
|
|
193
|
-
else:
|
|
194
|
-
# not found
|
|
195
|
-
for pred in self.model.func_graph.predecessors(block):
|
|
196
|
-
if pred not in traversed:
|
|
197
|
-
traversed.add(pred)
|
|
198
|
-
queue.append((pred, None))
|
|
199
|
-
|
|
200
|
-
def get_reg_vvar_by_insn(
|
|
201
|
-
self, reg_offset: int, addr: int, op_type: ObservationPointType, block_idx: int | None = None
|
|
202
|
-
) -> VirtualVariable | None:
|
|
203
|
-
reg_offset = get_reg_offset_base(reg_offset, self.model.arch)
|
|
204
|
-
vvars = set()
|
|
205
|
-
|
|
206
|
-
def _predicate(stmt) -> bool:
|
|
207
|
-
if (
|
|
208
|
-
isinstance(stmt, Assignment)
|
|
209
|
-
and isinstance(stmt.dst, VirtualVariable)
|
|
210
|
-
and stmt.dst.was_reg
|
|
211
|
-
and stmt.dst.reg_offset == reg_offset
|
|
212
|
-
):
|
|
213
|
-
vvars.add(stmt.dst)
|
|
214
|
-
return True
|
|
215
|
-
if isinstance(stmt, Call):
|
|
216
|
-
if (
|
|
217
|
-
isinstance(stmt.ret_expr, VirtualVariable)
|
|
218
|
-
and stmt.ret_expr.was_reg
|
|
219
|
-
and stmt.ret_expr.reg_offset == reg_offset
|
|
220
|
-
):
|
|
221
|
-
vvars.add(stmt.ret_expr)
|
|
222
|
-
return True
|
|
223
|
-
# is it clobbered maybe?
|
|
224
|
-
clobbered_regs = self._get_call_clobbered_regs(stmt)
|
|
225
|
-
if reg_offset in clobbered_regs:
|
|
226
|
-
return True
|
|
227
|
-
return False
|
|
228
|
-
|
|
229
|
-
self._get_vvar_by_insn(addr, op_type, _predicate, block_idx=block_idx)
|
|
230
|
-
|
|
231
|
-
assert len(vvars) <= 1
|
|
232
|
-
return next(iter(vvars), None)
|
|
233
|
-
|
|
234
|
-
def get_stack_vvar_by_insn(
|
|
235
|
-
self, stack_offset: int, size: int, addr: int, op_type: ObservationPointType, block_idx: int | None = None
|
|
236
|
-
) -> VirtualVariable | None:
|
|
237
|
-
vvars = set()
|
|
238
|
-
|
|
239
|
-
def _predicate(stmt) -> bool:
|
|
240
|
-
if (
|
|
241
|
-
isinstance(stmt, Assignment)
|
|
242
|
-
and isinstance(stmt.dst, VirtualVariable)
|
|
243
|
-
and stmt.dst.was_stack
|
|
244
|
-
and stmt.dst.stack_offset == stack_offset
|
|
245
|
-
and stmt.dst.size == size
|
|
246
|
-
):
|
|
247
|
-
vvars.add(stmt.dst)
|
|
248
|
-
return True
|
|
249
|
-
return False
|
|
250
|
-
|
|
251
|
-
self._get_vvar_by_insn(addr, op_type, _predicate, block_idx=block_idx)
|
|
252
|
-
|
|
253
|
-
assert len(vvars) <= 1
|
|
254
|
-
return next(iter(vvars), None)
|
|
255
|
-
|
|
256
|
-
def get_vvar_value(self, vvar: VirtualVariable) -> Expression | None:
|
|
257
|
-
if vvar not in self.model.all_vvar_definitions:
|
|
258
|
-
return None
|
|
259
|
-
codeloc = self.model.all_vvar_definitions[vvar]
|
|
260
|
-
|
|
261
|
-
for block in self.model.func_graph:
|
|
262
|
-
if block.addr == codeloc.block_addr and block.idx == codeloc.block_idx:
|
|
263
|
-
if codeloc.stmt_idx < len(block.statements):
|
|
264
|
-
stmt = block.statements[codeloc.stmt_idx]
|
|
265
|
-
if isinstance(stmt, Assignment) and stmt.dst.likes(vvar):
|
|
266
|
-
return stmt.src
|
|
267
|
-
break
|
|
268
|
-
return None
|
|
269
|
-
|
|
270
|
-
def observe(self, observation_points: list[ObservationPoint]):
|
|
271
|
-
|
|
272
|
-
insn_ops: dict[int, ObservationPointType] = {op[1]: op[2] for op in observation_points if op[0] == "insn"}
|
|
273
|
-
stmt_ops: dict[tuple[tuple[int, int | None], int], ObservationPointType] = {
|
|
274
|
-
op[1]: op[2] for op in observation_points if op[0] == "stmt"
|
|
275
|
-
}
|
|
276
|
-
node_ops: dict[tuple[int, int | None], ObservationPointType] = {
|
|
277
|
-
op[1]: op[2] for op in observation_points if op[0] == "node"
|
|
278
|
-
}
|
|
279
|
-
# TODO: Other types
|
|
280
|
-
|
|
281
|
-
traversal_order = GraphUtils.quasi_topological_sort_nodes(self.model.func_graph)
|
|
282
|
-
all_reg2vvarid: defaultdict[tuple[int, int | None], dict[int, int]] = defaultdict(dict)
|
|
283
|
-
|
|
284
|
-
observations = {}
|
|
285
|
-
for block in traversal_order:
|
|
286
|
-
reg2vvarid = all_reg2vvarid[block.addr, block.idx]
|
|
287
|
-
|
|
288
|
-
if (block.addr, block.idx) in node_ops and node_ops[
|
|
289
|
-
(block.addr, block.idx)
|
|
290
|
-
] == ObservationPointType.OP_BEFORE:
|
|
291
|
-
observations[("block", (block.addr, block.idx), ObservationPointType.OP_BEFORE)] = reg2vvarid.copy()
|
|
292
|
-
|
|
293
|
-
last_insn_addr = None
|
|
294
|
-
for stmt_idx, stmt in enumerate(block.statements):
|
|
295
|
-
if last_insn_addr != stmt.ins_addr:
|
|
296
|
-
# observe
|
|
297
|
-
if last_insn_addr in insn_ops and insn_ops[last_insn_addr] == ObservationPointType.OP_AFTER:
|
|
298
|
-
observations[("insn", last_insn_addr, ObservationPointType.OP_AFTER)] = reg2vvarid.copy()
|
|
299
|
-
if stmt.ins_addr in insn_ops and insn_ops[stmt.ins_addr] == ObservationPointType.OP_BEFORE:
|
|
300
|
-
observations[("insn", last_insn_addr, ObservationPointType.OP_BEFORE)] = reg2vvarid.copy()
|
|
301
|
-
last_insn_addr = stmt.ins_addr
|
|
302
|
-
|
|
303
|
-
stmt_key = (block.addr, block.idx), stmt_idx
|
|
304
|
-
if stmt_key in stmt_ops and stmt_ops[stmt_key] == ObservationPointType.OP_BEFORE:
|
|
305
|
-
observations[("stmt", stmt_key, ObservationPointType.OP_BEFORE)] = reg2vvarid.copy()
|
|
306
|
-
|
|
307
|
-
if isinstance(stmt, Assignment) and isinstance(stmt.dst, VirtualVariable) and stmt.dst.was_reg:
|
|
308
|
-
base_offset = get_reg_offset_base(stmt.dst.reg_offset, self.model.arch)
|
|
309
|
-
reg2vvarid[base_offset] = stmt.dst.varid
|
|
310
|
-
elif isinstance(stmt, Call) and isinstance(stmt.ret_expr, VirtualVariable) and stmt.ret_expr.was_reg:
|
|
311
|
-
base_offset = get_reg_offset_base(stmt.ret_expr.reg_offset, self.model.arch)
|
|
312
|
-
reg2vvarid[base_offset] = stmt.ret_expr.varid
|
|
313
|
-
|
|
314
|
-
if stmt_key in stmt_ops and stmt_ops[stmt_key] == ObservationPointType.OP_AFTER:
|
|
315
|
-
observations[("stmt", stmt_key, ObservationPointType.OP_AFTER)] = reg2vvarid.copy()
|
|
316
|
-
|
|
317
|
-
if (block.addr, block.idx) in node_ops and node_ops[
|
|
318
|
-
(block.addr, block.idx)
|
|
319
|
-
] == ObservationPointType.OP_AFTER:
|
|
320
|
-
observations[("block", (block.addr, block.idx), ObservationPointType.OP_AFTER)] = reg2vvarid.copy()
|
|
321
|
-
|
|
322
|
-
for succ in self.model.func_graph.successors(block):
|
|
323
|
-
if succ is block:
|
|
324
|
-
continue
|
|
325
|
-
all_reg2vvarid[succ.addr, succ.idx] = reg2vvarid.copy()
|
|
326
|
-
|
|
327
|
-
return observations
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
class SReachingDefinitionsAnalysis(Analysis):
|
|
331
|
-
"""
|
|
332
|
-
Constant and expression propagation that only supports SSA AIL graphs.
|
|
333
|
-
"""
|
|
334
|
-
|
|
335
|
-
def __init__(
|
|
336
|
-
self,
|
|
337
|
-
subject,
|
|
338
|
-
func_addr: int | None = None,
|
|
339
|
-
func_graph=None,
|
|
340
|
-
track_tmps: bool = False,
|
|
341
|
-
stack_pointer_tracker=None,
|
|
342
|
-
):
|
|
343
|
-
if isinstance(subject, Block):
|
|
344
|
-
self.block = subject
|
|
345
|
-
self.func = None
|
|
346
|
-
self.mode = "block"
|
|
347
|
-
elif isinstance(subject, Function):
|
|
348
|
-
self.block = None
|
|
349
|
-
self.func = subject
|
|
350
|
-
self.mode = "function"
|
|
351
|
-
else:
|
|
352
|
-
raise TypeError(f"Unsupported subject type {type(subject)}")
|
|
353
|
-
|
|
354
|
-
self.func_graph = func_graph
|
|
355
|
-
self.func_addr = func_addr if func_addr is not None else self.func.addr if self.func is not None else None
|
|
356
|
-
self._track_tmps = track_tmps
|
|
357
|
-
self._sp_tracker = stack_pointer_tracker # FIXME: Is it still used?
|
|
358
|
-
|
|
359
|
-
self._bp_as_gpr = False
|
|
360
|
-
if self.func is not None:
|
|
361
|
-
self._bp_as_gpr = self.func.info.get("bp_as_gpr", False)
|
|
362
|
-
|
|
363
|
-
self.model = SRDAModel(func_graph, self.project.arch)
|
|
364
|
-
|
|
365
|
-
self._analyze()
|
|
366
|
-
|
|
367
|
-
def _analyze(self):
|
|
368
|
-
|
|
369
|
-
match self.mode:
|
|
370
|
-
case "block":
|
|
371
|
-
blocks = {(self.block.addr, self.block.idx): self.block}
|
|
372
|
-
case "function":
|
|
373
|
-
blocks = {(block.addr, block.idx): block for block in self.func_graph}
|
|
374
|
-
case _:
|
|
375
|
-
raise NotImplementedError
|
|
376
|
-
|
|
377
|
-
phi_vvars = {}
|
|
378
|
-
# find all vvar definitions
|
|
379
|
-
vvar_deflocs = get_vvar_deflocs(blocks.values(), phi_vvars=phi_vvars)
|
|
380
|
-
# find all explicit vvar uses
|
|
381
|
-
vvar_uselocs = get_vvar_uselocs(blocks.values())
|
|
382
|
-
|
|
383
|
-
# update model
|
|
384
|
-
for vvar, defloc in vvar_deflocs.items():
|
|
385
|
-
self.model.varid_to_vvar[vvar.varid] = vvar
|
|
386
|
-
self.model.all_vvar_definitions[vvar] = defloc
|
|
387
|
-
|
|
388
|
-
for vvar_at_use, useloc in vvar_uselocs[vvar.varid]:
|
|
389
|
-
self.model.all_vvar_uses[vvar].add((vvar_at_use, useloc))
|
|
390
|
-
|
|
391
|
-
self.model.phi_vvar_ids = {vvar.varid for vvar in phi_vvars}
|
|
392
|
-
self.model.phivarid_to_varids = {}
|
|
393
|
-
for vvar, src_vvars in phi_vvars.items():
|
|
394
|
-
self.model.phivarid_to_varids[vvar.varid] = {
|
|
395
|
-
src_vvar.varid for src_vvar in src_vvars if src_vvar is not None
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
if self.mode == "function":
|
|
399
|
-
# fix register definitions for arguments
|
|
400
|
-
defined_vvarids = {vvar.varid for vvar in vvar_deflocs}
|
|
401
|
-
undefined_vvarids = set(vvar_uselocs.keys()).difference(defined_vvarids)
|
|
402
|
-
for vvar_id in undefined_vvarids:
|
|
403
|
-
used_vvar = next(iter(vvar_uselocs[vvar_id]))[0]
|
|
404
|
-
self.model.varid_to_vvar[used_vvar.varid] = used_vvar
|
|
405
|
-
self.model.all_vvar_definitions[used_vvar] = ExternalCodeLocation()
|
|
406
|
-
self.model.all_vvar_uses[used_vvar] |= vvar_uselocs[vvar_id]
|
|
407
|
-
|
|
408
|
-
srda_view = SRDAView(self.model)
|
|
409
|
-
|
|
410
|
-
# fix register uses at call sites
|
|
411
|
-
|
|
412
|
-
# find all implicit vvar uses
|
|
413
|
-
call_stmt_ids = []
|
|
414
|
-
for block in blocks.values():
|
|
415
|
-
for stmt_idx, stmt in enumerate(block.statements):
|
|
416
|
-
if (
|
|
417
|
-
isinstance(stmt, Call)
|
|
418
|
-
and stmt.args is None
|
|
419
|
-
or isinstance(stmt, Assignment)
|
|
420
|
-
and isinstance(stmt.src, Call)
|
|
421
|
-
and stmt.src.args is None
|
|
422
|
-
or isinstance(stmt, Return)
|
|
423
|
-
and stmt.ret_exprs
|
|
424
|
-
and isinstance(stmt.ret_exprs[0], Call)
|
|
425
|
-
):
|
|
426
|
-
call_stmt_ids.append(((block.addr, block.idx), stmt_idx))
|
|
427
|
-
|
|
428
|
-
observations = srda_view.observe(
|
|
429
|
-
[("stmt", insn_stmt_id, ObservationPointType.OP_BEFORE) for insn_stmt_id in call_stmt_ids]
|
|
430
|
-
)
|
|
431
|
-
for key, reg_to_vvarids in observations.items():
|
|
432
|
-
_, ((block_addr, block_idx), stmt_idx), _ = key
|
|
433
|
-
|
|
434
|
-
block = blocks[(block_addr, block_idx)]
|
|
435
|
-
stmt = block.statements[stmt_idx]
|
|
436
|
-
assert isinstance(stmt, (Call, Assignment, Return))
|
|
437
|
-
|
|
438
|
-
call: Call = (
|
|
439
|
-
stmt if isinstance(stmt, Call) else stmt.src if isinstance(stmt, Assignment) else stmt.ret_exprs[0]
|
|
440
|
-
)
|
|
441
|
-
if call.prototype is None:
|
|
442
|
-
# without knowing the prototype, we must conservatively add uses to all registers that are
|
|
443
|
-
# potentially used here
|
|
444
|
-
if call.calling_convention is not None:
|
|
445
|
-
cc = call.calling_convention
|
|
446
|
-
else:
|
|
447
|
-
# just use all registers in the default calling convention because we don't know anything about
|
|
448
|
-
# the calling convention yet
|
|
449
|
-
cc = default_cc(self.project.arch.name)(self.project.arch)
|
|
450
|
-
|
|
451
|
-
codeloc = CodeLocation(block_addr, stmt_idx, block_idx=block_idx, ins_addr=stmt.ins_addr)
|
|
452
|
-
arg_locs = cc.ARG_REGS
|
|
453
|
-
|
|
454
|
-
for arg_reg_name in arg_locs:
|
|
455
|
-
reg_offset = self.project.arch.registers[arg_reg_name][0]
|
|
456
|
-
if reg_offset in reg_to_vvarids:
|
|
457
|
-
vvarid = reg_to_vvarids[reg_offset]
|
|
458
|
-
vvar = self.model.varid_to_vvar[vvarid]
|
|
459
|
-
self.model.all_vvar_uses[vvar].add((None, codeloc))
|
|
460
|
-
|
|
461
|
-
if self._track_tmps:
|
|
462
|
-
# track tmps
|
|
463
|
-
tmp_deflocs = get_tmp_deflocs(blocks.values())
|
|
464
|
-
# find all vvar uses
|
|
465
|
-
tmp_uselocs = get_tmp_uselocs(blocks.values())
|
|
466
|
-
|
|
467
|
-
# update model
|
|
468
|
-
for block_loc, d in tmp_deflocs.items():
|
|
469
|
-
for tmp_atom, stmt_idx in d.items():
|
|
470
|
-
self.model.all_tmp_definitions[block_loc][tmp_atom] = stmt_idx
|
|
471
|
-
|
|
472
|
-
if tmp_atom in tmp_uselocs[block_loc]:
|
|
473
|
-
for tmp_at_use, use_stmt_idx in tmp_uselocs[block_loc][tmp_atom]:
|
|
474
|
-
if tmp_atom not in self.model.all_tmp_uses[block_loc]:
|
|
475
|
-
self.model.all_tmp_uses[block_loc][tmp_atom] = set()
|
|
476
|
-
self.model.all_tmp_uses[block_loc][tmp_atom].add((tmp_at_use, use_stmt_idx))
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
register_analysis(SReachingDefinitionsAnalysis, "SReachingDefinitions")
|
angr/knowledge_base/__init__.py
DELETED