Skip to content

Instantly share code, notes, and snippets.

import idc
import ida_frame
import ida_struct
def get_local_var_value_64(loc_var_name):
frame = ida_frame.get_frame(idc.here())
loc_var = ida_struct.get_member_by_name(frame, loc_var_name)
loc_var_ea = loc_var.soff + idc.GetRegValue("RSP")
loc_var_value = idc.read_dbg_qword(loc_var_ea) # In case the variable is 32bit, use get_wide_dword() instead.
return loc_var_value
@0xgalz
0xgalz / AutoFunc.py
Last active January 25, 2024 01:09
IDAPython- Change Function Names in IDA According to their corresponding debug prints
import idc
import idautils
import idaapi
FUNCTIONS_REGISTERS = {"g_log": "rcx", "g_log_error": "rdx"}
def get_string_for_function(call_func_addr, register):
"""
:param start_addr: The function call address