angr.analyses.decompiler.ireg_resolver

class angr.analyses.decompiler.ireg_resolver.IRegisterResolver

Bases: object

Resolves IRegister (VEX GetI/PutI register-array accesses, e.g. x87 fpreg[ftop]) into concrete Register expressions by forward-tracking constant register values across the AIL graph.

The x87 stack pointer ftop is 0 at the function entry (the ABI requires an empty x87 stack across calls). At a call site the callee’s net effect on ftop is derived from, in order, the callee’s own code, its prototype, and the first x87 stack access that follows the call in the caller. Blocks whose entry ftop cannot be determined exactly (conflicting predecessors, e.g. an unbalanced path) fall back to the most common value among their predecessors, so that every x87 access still resolves to a concrete st(i). Reads of ftop outside of register-array indices (fnstsw) are replaced with the tracked constant. fptan’s conditional push (ftop - 1Uto32(in_range)) is treated as unconditional.

__init__(project, kb, function, ail_graph, callee_deltas=None, call_st0=None, call_ftop=None)
Parameters:
static has_iregisters(ail_graph)
Return type:

bool

Parameters:

ail_graph (DiGraph)

resolve()
Return type:

None