angr.analyses.decompiler.expression_narrower

class angr.analyses.decompiler.expression_narrower.ExprNarrowingInfo

Bases: object

Stores the analysis result of _narrowing_needed().

__init__(narrowable, to_size=None, use_exprs=None, phi_vars=None)
Parameters:
narrowable
to_size
use_exprs
phi_vars
class angr.analyses.decompiler.expression_narrower.EffectiveSizeExtractor

Bases: AILBlockWalker[None, None, None]

Walks a statement or an expression and extracts the effective size (in bits).

For example, for target expression rax, (rax & 0xff) + 0x1 means the effective size of rax is 8 bits, from bit 0 to bit 7. We record this information in expr_to_effective_bits as {rax: (0, 8)}.

We pay special consideration to expressions that are used as Call arguments, as they may have been converted to a smaller size because the Call argument needs that size, but the Call prototype may have been incorrectly inferred.

__init__(target_expr, ignore_call_args=True)
Parameters:
expr_to_effective_bits: dict[Expression, tuple[int, int]]
expr_used_as_call_arg_effective_bits: tuple[int, int] | None
expr_used_as_insert_base: bool
class angr.analyses.decompiler.expression_narrower.ExpressionNarrower

Bases: AILBlockRewriter

Narrows an expression regardless of whether the expression is a definition or a use.

__init__(project, rd, manager, narrowables, addr2blocks, new_blocks)
Parameters:
new_vvar_sizes: dict[int, int]
replacement_core_vvars: dict[int, list[VirtualVariable]]
walk(block)
Parameters:

block (Block)