binaryninja.mediumlevelil.MediumLevelILFunction

class MediumLevelILFunction(arch=None, handle=None, source_func=None)[source]

class MediumLevelILFunction contains the list of MediumLevelILExpr objects that make up a binaryninja.function. MediumLevelILExpr objects can be added to the MediumLevelILFunction by calling append and passing the result of the various class methods which return MediumLevelILExpr objects.

__init__(arch=None, handle=None, source_func=None)[source]

x.__init__(…) initializes x; see help(type(x)) for signature

Methods

__init__([arch, handle, source_func]) x.__init__(…) initializes x; see help(type(x)) for signature
add_label_list(labels) add_label_list returns a label list expression for the given list of MediumLevelILLabel objects.
add_operand_list(operands) add_operand_list returns an operand list expression for the given list of integer operands.
append(expr) append adds the MediumLevelILExpr expr to the current MediumLevelILFunction.
create_graph([settings])
expr(operation[, a, b, c, d, e, size])
finalize() finalize ends the function and computes the list of basic blocks.
get_instruction_start(addr[, arch])
get_low_level_il_expr_index(expr)
get_low_level_il_instruction_index(instr)
get_non_ssa_instruction_index(instr)
get_ssa_instruction_index(instr)
get_ssa_memory_definition(version)
get_ssa_memory_uses(version)
get_ssa_var_definition(ssa_var)
get_ssa_var_uses(ssa_var)
get_ssa_var_value(ssa_var)
get_var_definitions(var)
get_var_uses(var)
goto(label) goto returns a goto expression which jumps to the provided MediumLevelILLabel.
if_expr(operand, t, f) if_expr returns the if expression which depending on condition operand jumps to the MediumLevelILLabel t when the condition expression operand is non-zero and f when it’s zero.
is_ssa_var_live(ssa_var) is_ssa_var_live determines if ssa_var is live at any point in the function
mark_label(label) mark_label assigns a MediumLevelILLabel to the current IL address.
operand(n, expr) operand sets the operand number of the expression expr and passes back expr without modification.
set_current_address(value[, arch])

Attributes

basic_blocks list of MediumLevelILBasicBlock objects (read-only)
current_address Current IL Address (read/write)
instructions A generator of mlil instructions of the current function
low_level_il Low level IL for this function
non_ssa_form Medium level IL in non-SSA (default) form (read-only)
ssa_form Medium level IL in SSA form (read-only)