BinaryNinja::MediumLevelILInstruction Struct Reference

Public Member Functions

 MediumLevelILInstruction ()
 
 MediumLevelILInstruction (MediumLevelILFunction *func, const BNMediumLevelILInstruction &instr, size_t expr, size_t instrIdx)
 
 MediumLevelILInstruction (const MediumLevelILInstructionBase &instr)
 
void VisitExprs (const std::function< bool(const MediumLevelILInstruction &expr)> &func) const
 
ExprId CopyTo (MediumLevelILFunction *dest) const
 
ExprId CopyTo (MediumLevelILFunction *dest, const std::function< ExprId(const MediumLevelILInstruction &subExpr)> &subExprHandler) const
 
template<BNMediumLevelILOperation N>
MediumLevelILInstruction GetSourceExpr () const
 
template<BNMediumLevelILOperation N>
Variable GetSourceVariable () const
 
template<BNMediumLevelILOperation N>
SSAVariable GetSourceSSAVariable () const
 
template<BNMediumLevelILOperation N>
MediumLevelILInstruction GetDestExpr () const
 
template<BNMediumLevelILOperation N>
Variable GetDestVariable () const
 
template<BNMediumLevelILOperation N>
SSAVariable GetDestSSAVariable () const
 
template<BNMediumLevelILOperation N>
MediumLevelILInstruction GetLeftExpr () const
 
template<BNMediumLevelILOperation N>
MediumLevelILInstruction GetRightExpr () const
 
template<BNMediumLevelILOperation N>
MediumLevelILInstruction GetCarryExpr () const
 
template<BNMediumLevelILOperation N>
MediumLevelILInstruction GetStackExpr () const
 
template<BNMediumLevelILOperation N>
MediumLevelILInstruction GetConditionExpr () const
 
template<BNMediumLevelILOperation N>
Variable GetHighVariable () const
 
template<BNMediumLevelILOperation N>
Variable GetLowVariable () const
 
template<BNMediumLevelILOperation N>
SSAVariable GetHighSSAVariable () const
 
template<BNMediumLevelILOperation N>
SSAVariable GetLowSSAVariable () const
 
template<BNMediumLevelILOperation N>
uint64_t GetOffset () const
 
template<BNMediumLevelILOperation N>
int64_t GetConstant () const
 
template<BNMediumLevelILOperation N>
int64_t GetVector () const
 
template<BNMediumLevelILOperation N>
uint32_t GetIntrinsic () const
 
template<BNMediumLevelILOperation N>
size_t GetTarget () const
 
template<BNMediumLevelILOperation N>
size_t GetTrueTarget () const
 
template<BNMediumLevelILOperation N>
size_t GetFalseTarget () const
 
template<BNMediumLevelILOperation N>
size_t GetDestMemoryVersion () const
 
template<BNMediumLevelILOperation N>
size_t GetSourceMemoryVersion () const
 
template<BNMediumLevelILOperation N>
MediumLevelILIndexMap GetTargets () const
 
template<BNMediumLevelILOperation N>
MediumLevelILIndexList GetSourceMemoryVersions () const
 
template<BNMediumLevelILOperation N>
MediumLevelILVariableList GetOutputVariables () const
 
template<BNMediumLevelILOperation N>
MediumLevelILSSAVariableList GetOutputSSAVariables () const
 
template<BNMediumLevelILOperation N>
MediumLevelILInstructionList GetParameterExprs () const
 
template<BNMediumLevelILOperation N>
MediumLevelILInstructionList GetSourceExprs () const
 
template<BNMediumLevelILOperation N>
MediumLevelILVariableList GetParameterVariables () const
 
template<BNMediumLevelILOperation N>
MediumLevelILSSAVariableList GetParameterSSAVariables () const
 
template<BNMediumLevelILOperation N>
MediumLevelILSSAVariableList GetSourceSSAVariables () const
 
template<BNMediumLevelILOperation N>
void SetDestSSAVersion (size_t version)
 
template<BNMediumLevelILOperation N>
void SetSourceSSAVersion (size_t version)
 
template<BNMediumLevelILOperation N>
void SetHighSSAVersion (size_t version)
 
template<BNMediumLevelILOperation N>
void SetLowSSAVersion (size_t version)
 
template<BNMediumLevelILOperation N>
void SetDestMemoryVersion (size_t version)
 
template<BNMediumLevelILOperation N>
void SetSourceMemoryVersion (size_t version)
 
template<BNMediumLevelILOperation N>
void SetOutputSSAVariables (const std::vector< SSAVariable > &vars)
 
template<BNMediumLevelILOperation N>
void SetParameterSSAVariables (const std::vector< SSAVariable > &vars)
 
template<BNMediumLevelILOperation N>
void SetParameterExprs (const std::vector< MediumLevelILInstruction > &params)
 
template<BNMediumLevelILOperation N>
void SetParameterExprs (const std::vector< ExprId > &params)
 
template<BNMediumLevelILOperation N>
void SetSourceExprs (const std::vector< MediumLevelILInstruction > &params)
 
template<BNMediumLevelILOperation N>
void SetSourceExprs (const std::vector< ExprId > &params)
 
bool GetOperandIndexForUsage (MediumLevelILOperandUsage usage, size_t &operandIndex) const
 
MediumLevelILInstruction GetSourceExpr () const
 
Variable GetSourceVariable () const
 
SSAVariable GetSourceSSAVariable () const
 
MediumLevelILInstruction GetDestExpr () const
 
Variable GetDestVariable () const
 
SSAVariable GetDestSSAVariable () const
 
MediumLevelILInstruction GetLeftExpr () const
 
MediumLevelILInstruction GetRightExpr () const
 
MediumLevelILInstruction GetCarryExpr () const
 
MediumLevelILInstruction GetStackExpr () const
 
MediumLevelILInstruction GetConditionExpr () const
 
Variable GetHighVariable () const
 
Variable GetLowVariable () const
 
SSAVariable GetHighSSAVariable () const
 
SSAVariable GetLowSSAVariable () const
 
uint64_t GetOffset () const
 
int64_t GetConstant () const
 
int64_t GetVector () const
 
uint32_t GetIntrinsic () const
 
size_t GetTarget () const
 
size_t GetTrueTarget () const
 
size_t GetFalseTarget () const
 
size_t GetDestMemoryVersion () const
 
size_t GetSourceMemoryVersion () const
 
MediumLevelILIndexMap GetTargets () const
 
MediumLevelILIndexList GetSourceMemoryVersions () const
 
MediumLevelILVariableList GetOutputVariables () const
 
MediumLevelILSSAVariableList GetOutputSSAVariables () const
 
MediumLevelILInstructionList GetParameterExprs () const
 
MediumLevelILInstructionList GetSourceExprs () const
 
MediumLevelILVariableList GetParameterVariables () const
 
MediumLevelILSSAVariableList GetParameterSSAVariables () const
 
MediumLevelILSSAVariableList GetSourceSSAVariables () const
 
- Public Member Functions inherited from BinaryNinja::MediumLevelILInstructionBase
MediumLevelILOperandList GetOperands () const
 
uint64_t GetRawOperandAsInteger (size_t operand) const
 
size_t GetRawOperandAsIndex (size_t operand) const
 
MediumLevelILInstruction GetRawOperandAsExpr (size_t operand) const
 
Variable GetRawOperandAsVariable (size_t operand) const
 
SSAVariable GetRawOperandAsSSAVariable (size_t operand) const
 
SSAVariable GetRawOperandAsPartialSSAVariableSource (size_t operand) const
 
MediumLevelILIndexList GetRawOperandAsIndexList (size_t operand) const
 
MediumLevelILIndexMap GetRawOperandAsIndexMap (size_t operand) const
 
MediumLevelILVariableList GetRawOperandAsVariableList (size_t operand) const
 
MediumLevelILSSAVariableList GetRawOperandAsSSAVariableList (size_t operand) const
 
MediumLevelILInstructionList GetRawOperandAsExprList (size_t operand) const
 
void UpdateRawOperand (size_t operandIndex, ExprId value)
 
void UpdateRawOperandAsSSAVariableList (size_t operandIndex, const std::vector< SSAVariable > &vars)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< MediumLevelILInstruction > &exprs)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< size_t > &exprs)
 
RegisterValue GetValue () const
 
PossibleValueSet GetPossibleValues (const std::set< BNDataFlowQueryOption > &options=std::set< BNDataFlowQueryOption >()) const
 
Confidence< Ref< Type > > GetType () const
 
size_t GetSSAVarVersion (const Variable &var)
 
size_t GetSSAMemoryVersion ()
 
Variable GetVariableForRegister (uint32_t reg)
 
Variable GetVariableForFlag (uint32_t flag)
 
Variable GetVariableForStackLocation (int64_t offset)
 
PossibleValueSet GetPossibleSSAVarValues (const SSAVariable &var)
 
RegisterValue GetRegisterValue (uint32_t reg)
 
RegisterValue GetRegisterValueAfter (uint32_t reg)
 
PossibleValueSet GetPossibleRegisterValues (uint32_t reg)
 
PossibleValueSet GetPossibleRegisterValuesAfter (uint32_t reg)
 
RegisterValue GetFlagValue (uint32_t flag)
 
RegisterValue GetFlagValueAfter (uint32_t flag)
 
PossibleValueSet GetPossibleFlagValues (uint32_t flag)
 
PossibleValueSet GetPossibleFlagValuesAfter (uint32_t flag)
 
RegisterValue GetStackContents (int32_t offset, size_t len)
 
RegisterValue GetStackContentsAfter (int32_t offset, size_t len)
 
PossibleValueSet GetPossibleStackContents (int32_t offset, size_t len)
 
PossibleValueSet GetPossibleStackContentsAfter (int32_t offset, size_t len)
 
BNILBranchDependence GetBranchDependence (size_t branchInstr)
 
BNILBranchDependence GetBranchDependence (const MediumLevelILInstruction &branch)
 
std::unordered_map< size_t, BNILBranchDependenceGetAllBranchDependence ()
 
size_t GetSSAInstructionIndex () const
 
size_t GetNonSSAInstructionIndex () const
 
size_t GetSSAExprIndex () const
 
size_t GetNonSSAExprIndex () const
 
MediumLevelILInstruction GetSSAForm () const
 
MediumLevelILInstruction GetNonSSAForm () const
 
size_t GetLowLevelILInstructionIndex () const
 
size_t GetLowLevelILExprIndex () const
 
size_t GetHighLevelILInstructionIndex () const
 
size_t GetHighLevelILExprIndex () const
 
bool HasLowLevelIL () const
 
LowLevelILInstruction GetLowLevelIL () const
 
void MarkInstructionForRemoval ()
 
void Replace (ExprId expr)
 
template<BNMediumLevelILOperation N>
MediumLevelILInstructionAccessor< N > & As ()
 
MediumLevelILOneOperandInstructionAsOneOperand ()
 
MediumLevelILTwoOperandInstructionAsTwoOperand ()
 
MediumLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry ()
 
template<BNMediumLevelILOperation N>
const MediumLevelILInstructionAccessor< N > & As () const
 
const MediumLevelILConstantInstructionAsConstant () const
 
const MediumLevelILOneOperandInstructionAsOneOperand () const
 
const MediumLevelILTwoOperandInstructionAsTwoOperand () const
 
const MediumLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry () const
 

Additional Inherited Members

- Public Attributes inherited from BinaryNinja::MediumLevelILInstructionBase
Ref< MediumLevelILFunctionfunction
 
size_t exprIndex
 
size_t instructionIndex
 
- Public Attributes inherited from BNMediumLevelILInstruction
BNMediumLevelILOperation operation
 
uint32_t sourceOperand
 
size_t size
 
uint64_t operands [5]
 
uint64_t address
 
- Static Public Attributes inherited from BinaryNinja::MediumLevelILInstructionBase
static std::unordered_map< MediumLevelILOperandUsage, MediumLevelILOperandTypeoperandTypeForUsage
 
static std::unordered_map< BNMediumLevelILOperation, std::vector< MediumLevelILOperandUsage > > operationOperandUsage
 
static std::unordered_map< BNMediumLevelILOperation, std::unordered_map< MediumLevelILOperandUsage, size_t > > operationOperandIndex = GetOperandIndexForOperandUsages()
 

Constructor & Destructor Documentation

◆ MediumLevelILInstruction() [1/3]

MediumLevelILInstruction::MediumLevelILInstruction ( )

◆ MediumLevelILInstruction() [2/3]

MediumLevelILInstruction::MediumLevelILInstruction ( MediumLevelILFunction func,
const BNMediumLevelILInstruction instr,
size_t  expr,
size_t  instrIdx 
)

◆ MediumLevelILInstruction() [3/3]

MediumLevelILInstruction::MediumLevelILInstruction ( const MediumLevelILInstructionBase instr)

Member Function Documentation

◆ CopyTo() [1/2]

ExprId MediumLevelILInstruction::CopyTo ( MediumLevelILFunction dest) const

◆ CopyTo() [2/2]

ExprId MediumLevelILInstruction::CopyTo ( MediumLevelILFunction dest,
const std::function< ExprId(const MediumLevelILInstruction &subExpr)> &  subExprHandler 
) const

◆ GetCarryExpr() [1/2]

MediumLevelILInstruction BinaryNinja::MediumLevelILInstruction::GetCarryExpr ( ) const
inline

◆ GetCarryExpr() [2/2]

MediumLevelILInstruction MediumLevelILInstruction::GetCarryExpr ( ) const

◆ GetConditionExpr() [1/2]

MediumLevelILInstruction BinaryNinja::MediumLevelILInstruction::GetConditionExpr ( ) const
inline

◆ GetConditionExpr() [2/2]

MediumLevelILInstruction MediumLevelILInstruction::GetConditionExpr ( ) const

◆ GetConstant() [1/2]

int64_t BinaryNinja::MediumLevelILInstruction::GetConstant ( ) const
inline

◆ GetConstant() [2/2]

int64_t MediumLevelILInstruction::GetConstant ( ) const

◆ GetDestExpr() [1/2]

MediumLevelILInstruction BinaryNinja::MediumLevelILInstruction::GetDestExpr ( ) const
inline

◆ GetDestExpr() [2/2]

MediumLevelILInstruction MediumLevelILInstruction::GetDestExpr ( ) const

◆ GetDestMemoryVersion() [1/2]

size_t BinaryNinja::MediumLevelILInstruction::GetDestMemoryVersion ( ) const
inline

◆ GetDestMemoryVersion() [2/2]

size_t MediumLevelILInstruction::GetDestMemoryVersion ( ) const

◆ GetDestSSAVariable() [1/2]

SSAVariable BinaryNinja::MediumLevelILInstruction::GetDestSSAVariable ( ) const
inline

◆ GetDestSSAVariable() [2/2]

SSAVariable MediumLevelILInstruction::GetDestSSAVariable ( ) const

◆ GetDestVariable() [1/2]

Variable BinaryNinja::MediumLevelILInstruction::GetDestVariable ( ) const
inline

◆ GetDestVariable() [2/2]

Variable MediumLevelILInstruction::GetDestVariable ( ) const

◆ GetFalseTarget() [1/2]

size_t BinaryNinja::MediumLevelILInstruction::GetFalseTarget ( ) const
inline

◆ GetFalseTarget() [2/2]

size_t MediumLevelILInstruction::GetFalseTarget ( ) const

◆ GetHighSSAVariable() [1/2]

SSAVariable BinaryNinja::MediumLevelILInstruction::GetHighSSAVariable ( ) const
inline

◆ GetHighSSAVariable() [2/2]

SSAVariable MediumLevelILInstruction::GetHighSSAVariable ( ) const

◆ GetHighVariable() [1/2]

Variable BinaryNinja::MediumLevelILInstruction::GetHighVariable ( ) const
inline

◆ GetHighVariable() [2/2]

Variable MediumLevelILInstruction::GetHighVariable ( ) const

◆ GetIntrinsic() [1/2]

uint32_t BinaryNinja::MediumLevelILInstruction::GetIntrinsic ( ) const
inline

◆ GetIntrinsic() [2/2]

uint32_t MediumLevelILInstruction::GetIntrinsic ( ) const

◆ GetLeftExpr() [1/2]

MediumLevelILInstruction BinaryNinja::MediumLevelILInstruction::GetLeftExpr ( ) const
inline

◆ GetLeftExpr() [2/2]

MediumLevelILInstruction MediumLevelILInstruction::GetLeftExpr ( ) const

◆ GetLowSSAVariable() [1/2]

SSAVariable BinaryNinja::MediumLevelILInstruction::GetLowSSAVariable ( ) const
inline

◆ GetLowSSAVariable() [2/2]

SSAVariable MediumLevelILInstruction::GetLowSSAVariable ( ) const

◆ GetLowVariable() [1/2]

Variable BinaryNinja::MediumLevelILInstruction::GetLowVariable ( ) const
inline

◆ GetLowVariable() [2/2]

Variable MediumLevelILInstruction::GetLowVariable ( ) const

◆ GetOffset() [1/2]

uint64_t BinaryNinja::MediumLevelILInstruction::GetOffset ( ) const
inline

◆ GetOffset() [2/2]

uint64_t MediumLevelILInstruction::GetOffset ( ) const

◆ GetOperandIndexForUsage()

bool MediumLevelILInstruction::GetOperandIndexForUsage ( MediumLevelILOperandUsage  usage,
size_t &  operandIndex 
) const

◆ GetOutputSSAVariables() [1/2]

MediumLevelILSSAVariableList BinaryNinja::MediumLevelILInstruction::GetOutputSSAVariables ( ) const
inline

◆ GetOutputSSAVariables() [2/2]

MediumLevelILSSAVariableList MediumLevelILInstruction::GetOutputSSAVariables ( ) const

◆ GetOutputVariables() [1/2]

MediumLevelILVariableList BinaryNinja::MediumLevelILInstruction::GetOutputVariables ( ) const
inline

◆ GetOutputVariables() [2/2]

MediumLevelILVariableList MediumLevelILInstruction::GetOutputVariables ( ) const

◆ GetParameterExprs() [1/2]

MediumLevelILInstructionList BinaryNinja::MediumLevelILInstruction::GetParameterExprs ( ) const
inline

◆ GetParameterExprs() [2/2]

MediumLevelILInstructionList MediumLevelILInstruction::GetParameterExprs ( ) const

◆ GetParameterSSAVariables() [1/2]

MediumLevelILSSAVariableList BinaryNinja::MediumLevelILInstruction::GetParameterSSAVariables ( ) const
inline

◆ GetParameterSSAVariables() [2/2]

MediumLevelILSSAVariableList MediumLevelILInstruction::GetParameterSSAVariables ( ) const

◆ GetParameterVariables() [1/2]

MediumLevelILVariableList BinaryNinja::MediumLevelILInstruction::GetParameterVariables ( ) const
inline

◆ GetParameterVariables() [2/2]

MediumLevelILVariableList MediumLevelILInstruction::GetParameterVariables ( ) const

◆ GetRightExpr() [1/2]

MediumLevelILInstruction BinaryNinja::MediumLevelILInstruction::GetRightExpr ( ) const
inline

◆ GetRightExpr() [2/2]

MediumLevelILInstruction MediumLevelILInstruction::GetRightExpr ( ) const

◆ GetSourceExpr() [1/2]

MediumLevelILInstruction BinaryNinja::MediumLevelILInstruction::GetSourceExpr ( ) const
inline

◆ GetSourceExpr() [2/2]

MediumLevelILInstruction MediumLevelILInstruction::GetSourceExpr ( ) const

◆ GetSourceExprs() [1/2]

MediumLevelILInstructionList BinaryNinja::MediumLevelILInstruction::GetSourceExprs ( ) const
inline

◆ GetSourceExprs() [2/2]

MediumLevelILInstructionList MediumLevelILInstruction::GetSourceExprs ( ) const

◆ GetSourceMemoryVersion() [1/2]

size_t BinaryNinja::MediumLevelILInstruction::GetSourceMemoryVersion ( ) const
inline

◆ GetSourceMemoryVersion() [2/2]

size_t MediumLevelILInstruction::GetSourceMemoryVersion ( ) const

◆ GetSourceMemoryVersions() [1/2]

MediumLevelILIndexList BinaryNinja::MediumLevelILInstruction::GetSourceMemoryVersions ( ) const
inline

◆ GetSourceMemoryVersions() [2/2]

MediumLevelILIndexList MediumLevelILInstruction::GetSourceMemoryVersions ( ) const

◆ GetSourceSSAVariable() [1/2]

SSAVariable BinaryNinja::MediumLevelILInstruction::GetSourceSSAVariable ( ) const
inline

◆ GetSourceSSAVariable() [2/2]

SSAVariable MediumLevelILInstruction::GetSourceSSAVariable ( ) const

◆ GetSourceSSAVariables() [1/2]

MediumLevelILSSAVariableList BinaryNinja::MediumLevelILInstruction::GetSourceSSAVariables ( ) const
inline

◆ GetSourceSSAVariables() [2/2]

MediumLevelILSSAVariableList MediumLevelILInstruction::GetSourceSSAVariables ( ) const

◆ GetSourceVariable() [1/2]

Variable BinaryNinja::MediumLevelILInstruction::GetSourceVariable ( ) const
inline

◆ GetSourceVariable() [2/2]

Variable MediumLevelILInstruction::GetSourceVariable ( ) const

◆ GetStackExpr() [1/2]

MediumLevelILInstruction BinaryNinja::MediumLevelILInstruction::GetStackExpr ( ) const
inline

◆ GetStackExpr() [2/2]

MediumLevelILInstruction MediumLevelILInstruction::GetStackExpr ( ) const

◆ GetTarget() [1/2]

size_t BinaryNinja::MediumLevelILInstruction::GetTarget ( ) const
inline

◆ GetTarget() [2/2]

size_t MediumLevelILInstruction::GetTarget ( ) const

◆ GetTargets() [1/2]

MediumLevelILIndexMap BinaryNinja::MediumLevelILInstruction::GetTargets ( ) const
inline

◆ GetTargets() [2/2]

MediumLevelILIndexMap MediumLevelILInstruction::GetTargets ( ) const

◆ GetTrueTarget() [1/2]

size_t BinaryNinja::MediumLevelILInstruction::GetTrueTarget ( ) const
inline

◆ GetTrueTarget() [2/2]

size_t MediumLevelILInstruction::GetTrueTarget ( ) const

◆ GetVector() [1/2]

int64_t BinaryNinja::MediumLevelILInstruction::GetVector ( ) const
inline

◆ GetVector() [2/2]

int64_t MediumLevelILInstruction::GetVector ( ) const

◆ SetDestMemoryVersion()

void BinaryNinja::MediumLevelILInstruction::SetDestMemoryVersion ( size_t  version)
inline

◆ SetDestSSAVersion()

void BinaryNinja::MediumLevelILInstruction::SetDestSSAVersion ( size_t  version)
inline

◆ SetHighSSAVersion()

void BinaryNinja::MediumLevelILInstruction::SetHighSSAVersion ( size_t  version)
inline

◆ SetLowSSAVersion()

void BinaryNinja::MediumLevelILInstruction::SetLowSSAVersion ( size_t  version)
inline

◆ SetOutputSSAVariables()

void BinaryNinja::MediumLevelILInstruction::SetOutputSSAVariables ( const std::vector< SSAVariable > &  vars)
inline

◆ SetParameterExprs() [1/2]

void BinaryNinja::MediumLevelILInstruction::SetParameterExprs ( const std::vector< ExprId > &  params)
inline

◆ SetParameterExprs() [2/2]

void BinaryNinja::MediumLevelILInstruction::SetParameterExprs ( const std::vector< MediumLevelILInstruction > &  params)
inline

◆ SetParameterSSAVariables()

void BinaryNinja::MediumLevelILInstruction::SetParameterSSAVariables ( const std::vector< SSAVariable > &  vars)
inline

◆ SetSourceExprs() [1/2]

void BinaryNinja::MediumLevelILInstruction::SetSourceExprs ( const std::vector< ExprId > &  params)
inline

◆ SetSourceExprs() [2/2]

void BinaryNinja::MediumLevelILInstruction::SetSourceExprs ( const std::vector< MediumLevelILInstruction > &  params)
inline

◆ SetSourceMemoryVersion()

void BinaryNinja::MediumLevelILInstruction::SetSourceMemoryVersion ( size_t  version)
inline

◆ SetSourceSSAVersion()

void BinaryNinja::MediumLevelILInstruction::SetSourceSSAVersion ( size_t  version)
inline

◆ VisitExprs()

void MediumLevelILInstruction::VisitExprs ( const std::function< bool(const MediumLevelILInstruction &expr)> &  func) const

The documentation for this struct was generated from the following files: