hasmer
Public Member Functions | Static Public Member Functions | List of all members
Hasmer.Decompiler.FunctionDecompiler Class Reference

Represents a decompiler for an entire function. More...

Public Member Functions

 FunctionDecompiler (HbcDecompiler decompiler, HbcFuncHeader header)
 Creates a new FunctionDecompiler given the parent HbcDecompiler and the parsed header of the function in the binary. More...
 
SyntaxNode CreateAST (DecompilerContext parent)
 Decompiles this function into an AST structure. More...
 

Static Public Member Functions

static void WriteRemainingRegisters (DecompilerContext context)
 Writes all call expressions in all registers to the source tree, and then empties out the registers. More...
 
static void ObserveInstruction (DecompilerContext context, int insnIndex)
 Handles the instruction at the given instruction index, which is an offset in the DecompilerContext.Instructions list. Sets the DecompilerContext.CurrentInstructionIndex equal to the passed index parameter. If the instruction that is analyzed does not jump, then the CurrentInstructionIndex is incremented by one. Otherwise, if the instruction that is analyzed does jump, then the CurrentInstructionIndex is not modified (beyond when it was initially set to be the passed insnIndex). More...
 

Detailed Description

Represents a decompiler for an entire function.

Constructor & Destructor Documentation

◆ FunctionDecompiler()

Hasmer.Decompiler.FunctionDecompiler.FunctionDecompiler ( HbcDecompiler  decompiler,
HbcFuncHeader  header 
)
inline

Creates a new FunctionDecompiler given the parent HbcDecompiler and the parsed header of the function in the binary.

Member Function Documentation

◆ CreateAST()

SyntaxNode Hasmer.Decompiler.FunctionDecompiler.CreateAST ( DecompilerContext  parent)
inline

Decompiles this function into an AST structure.

◆ ObserveInstruction()

static void Hasmer.Decompiler.FunctionDecompiler.ObserveInstruction ( DecompilerContext  context,
int  insnIndex 
)
inlinestatic

Handles the instruction at the given instruction index, which is an offset in the DecompilerContext.Instructions list. Sets the DecompilerContext.CurrentInstructionIndex equal to the passed index parameter. If the instruction that is analyzed does not jump, then the CurrentInstructionIndex is incremented by one. Otherwise, if the instruction that is analyzed does jump, then the CurrentInstructionIndex is not modified (beyond when it was initially set to be the passed insnIndex).

◆ WriteRemainingRegisters()

static void Hasmer.Decompiler.FunctionDecompiler.WriteRemainingRegisters ( DecompilerContext  context)
inlinestatic

Writes all call expressions in all registers to the source tree, and then empties out the registers.

Parameters
context

The documentation for this class was generated from the following file: