binaryninja.function.Function

class Function(view, handle)[source]
__init__(view, handle)[source]

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

Methods

__init__(view, handle) x.__init__(…) initializes x; see help(type(x)) for signature
apply_auto_discovered_type(func_type)
apply_imported_types(sym)
create_auto_stack_var(offset, var_type, name)
create_auto_var(var, var_type, name[, …])
create_graph([graph_type, settings])
create_user_stack_var(offset, var_type, name)
create_user_var(var, var_type, name[, …])
delete_auto_stack_var(offset)
delete_auto_var(var)
delete_user_stack_var(offset)
delete_user_var(var)
get_basic_block_at(addr[, arch]) get_basic_block_at returns the BasicBlock of the optionally specified Architecture arch at the given address addr.
get_block_annotations(addr[, arch])
get_call_reg_stack_adjustment(addr[, arch])
get_call_reg_stack_adjustment_for_reg_stack(…)
get_call_stack_adjustment(addr[, arch])
get_comment_at(addr)
get_constants_referenced_by(addr[, arch])
get_flags_read_by_lifted_il_instruction(i)
get_flags_written_by_lifted_il_instruction(i)
get_indirect_branches_at(addr[, arch])
get_instr_highlight(addr[, arch])
Example:
get_int_display_type(instr_addr, value, operand)
get_lifted_il_at(addr[, arch])
get_lifted_il_flag_definitions_for_use(i, flag)
get_lifted_il_flag_uses_for_definition(i, flag)
get_low_level_il_at(addr[, arch]) get_low_level_il_at gets the LowLevelILInstruction corresponding to the given virtual address
get_low_level_il_exits_at(addr[, arch])
get_parameter_at(addr, func_type, i[, arch])
get_parameter_at_low_level_il_instruction(…)
get_reg_value_after(addr, reg[, arch]) get_reg_value_after gets the value instruction address corresponding to the given virtual address
get_reg_value_at(addr, reg[, arch]) get_reg_value_at gets the value the provided string register address corresponding to the given virtual address
get_reg_value_at_exit(reg)
get_regs_read_by(addr[, arch])
get_regs_written_by(addr[, arch])
get_stack_contents_after(addr, offset, size)
get_stack_contents_at(addr, offset, size[, arch]) get_stack_contents_at returns the RegisterValue for the item on the stack in the current function at the given virtual address addr, stack offset offset and size of size.
get_stack_var_at_frame_offset(offset, addr)
get_stack_vars_referenced_by(addr[, arch])
get_type_tokens([settings])
is_call_instruction(addr[, arch])
mark_recent_use()
reanalyze() reanalyze causes this functions to be reanalyzed.
release_advanced_analysis_data()
request_advanced_analysis_data()
request_debug_report(name)
set_auto_call_reg_stack_adjustment(addr, adjust)
set_auto_call_reg_stack_adjustment_for_reg_stack(…)
set_auto_call_stack_adjustment(addr, adjust)
set_auto_calling_convention(value)
set_auto_can_return(value)
set_auto_clobbered_regs(value)
set_auto_has_variable_arguments(value)
set_auto_indirect_branches(source, branches)
set_auto_instr_highlight(addr, color[, arch]) set_auto_instr_highlight highlights the instruction at the specified address with the supplied color
set_auto_parameter_vars(value)
set_auto_reg_stack_adjustments(value)
set_auto_return_regs(value)
set_auto_return_type(value)
set_auto_stack_adjustment(value)
set_auto_type(value)
set_call_reg_stack_adjustment(addr, adjust)
set_call_reg_stack_adjustment_for_reg_stack(…)
set_call_stack_adjustment(addr, adjust[, arch])
set_comment(addr, comment) Deprecated use set_comment_at instead
set_comment_at(addr, comment) set_comment_at sets a comment for the current function at the address specified
set_default_session_data(name, value)
set_int_display_type(instr_addr, value, …)
param int instr_addr:
 
set_user_indirect_branches(source, branches)
set_user_instr_highlight(addr, color[, arch]) set_user_instr_highlight highlights the instruction at the specified address with the supplied color
set_user_type(value)

Attributes

analysis_performance_info
analysis_skip_override Override for skipping of automatic analysis
analysis_skip_reason Function analysis skip reason
analysis_skipped Whether automatic analysis was skipped for this function
arch Function architecture (read-only)
auto Whether function was automatically discovered (read-only)
basic_blocks List of basic blocks (read-only)
calling_convention Calling convention used by the function
can_return Whether function can return
clobbered_regs Registers that are modified by this function
comment Gets the comment for the current function
comments Dict of comments (read-only)
explicitly_defined_type Whether function has explicitly defined types (read-only)
function_type Function type object
global_pointer_value Discovered value of the global pointer register, if the function uses one (read-only)
has_variable_arguments Whether the function takes a variable number of arguments
indirect_branches List of indirect branches (read-only)
instructions A generator of instruction tokens and their start addresses for the current function
lifted_il returns LowLevelILFunction used to represent lifted IL (read-only)
llil_basic_blocks A generator of all LowLevelILBasicBlock objects in the current function
llil_instructions A generator of llil instructions of the current function
low_level_il returns LowLevelILFunction used to represent Function low level IL (read-only)
medium_level_il Function medium level IL (read-only)
mlil_basic_blocks A generator of all MediumLevelILBasicBlock objects in the current function
mlil_instructions A generator of mlil instructions of the current function
name Symbol name for the function
needs_update Whether the function has analysis that needs to be updated (read-only)
parameter_vars List of variables for the incoming function parameters
platform Function platform (read-only)
reg_stack_adjustments Number of entries removed from each register stack after return
return_regs Registers that are used for the return value
return_type Return type of the function
session_data Dictionary object where plugins can store arbitrary data associated with the function
stack_adjustment Number of bytes removed from the stack after return
stack_layout List of function stack variables (read-only)
start Function start (read-only)
symbol Function symbol(read-only)
too_large Whether the function is too large to automatically perform analysis (read-only)
type_tokens Text tokens for this function’s prototype
unresolved_stack_adjustment_graph Flow graph of unresolved stack adjustments (read-only)
vars List of function variables (read-only)
view Function view (read-only)