binaryninja.function.Function¶
-
class
binaryninja.function.Function(view, handle)[source]¶ -
Methods
__init__(view, handle)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()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_atreturns the BasicBlock of the optionally specified Architecturearchat the givenget_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_atgets the LowLevelILInstruction corresponding to the given virtual addressget_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_aftergets the value instruction address corresponding to the given virtual addressget_reg_value_at(addr, reg[, arch])get_reg_value_atgets the value the provided string register address corresponding to the given virtual addressget_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_atreturns the RegisterValue for the item on the stack in the current function at theget_stack_var_at_frame_offset(offset, addr)get_stack_vars_referenced_by(addr[, arch])get_type_tokens([settings])mark_recent_use()reanalyze()reanalyzecauses this functions to be reanalyzed. This function does not wait for the analysis to finish.release_advanced_analysis_data()request_advanced_analysis_data()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_highlighthighlights the instruction at the specified address with the supplied colorset_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_atsets a comment for the current function at the address specifiedset_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_highlighthighlights the instruction at the specified address with the supplied colorset_user_type(value)Attributes
analysis_performance_infoanalysis_skip_overrideOverride for skipping of automatic analysis analysis_skip_reasonFunction analysis skip reason analysis_skippedWhether automatic analysis was skipped for this function archFunction architecture (read-only) autoWhether function was automatically discovered (read-only) basic_blocksList of basic blocks (read-only) calling_conventionCalling convention used by the function can_returnWhether function can return clobbered_regsRegisters that are modified by this function commentGets the comment for the current function commentsDict of comments (read-only) explicitly_defined_typeWhether function has explicitly defined types (read-only) function_typeFunction type object global_pointer_valueDiscovered value of the global pointer register, if the function uses one (read-only) has_variable_argumentsWhether the function takes a variable number of arguments indirect_branchesList of indirect branches (read-only) instructionsA generator of instruction tokens and their start addresses for the current function lifted_ilreturns LowLevelILFunction used to represent lifted IL (read-only) llil_basic_blocksA generator of all LowLevelILBasicBlock objects in the current function llil_instructionsA generator of llil instructions of the current function low_level_ilreturns LowLevelILFunction used to represent Function low level IL (read-only) medium_level_ilFunction medium level IL (read-only) mlil_basic_blocksA generator of all MediumLevelILBasicBlock objects in the current function mlil_instructionsA generator of mlil instructions of the current function nameSymbol name for the function needs_updateWhether the function has analysis that needs to be updated (read-only) parameter_varsList of variables for the incoming function parameters platformFunction platform (read-only) reg_stack_adjustmentsNumber of entries removed from each register stack after return return_regsRegisters that are used for the return value return_typeReturn type of the function session_dataDictionary object where plugins can store arbitrary data associated with the function stack_adjustmentNumber of bytes removed from the stack after return stack_layoutList of function stack variables (read-only) startFunction start (read-only) symbolFunction symbol(read-only) too_largeWhether the function is too large to automatically perform analysis (read-only) type_tokensText tokens for this function’s prototype varsList of function variables (read-only) viewFunction view (read-only)