This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import idc, idaapi, idautils, ida_xref | |
def find_stack_members(func_ea): | |
members = {} | |
base = None | |
frame = idc.GetFrame(func_ea) | |
for frame_member in idautils.StructMembers(frame): | |
member_offset, member_name, _ = frame_member | |
members[member_offset] = member_name | |
if member_name == ' r': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from idaapi import * | |
from idc import * | |
def get_stack_arg(arg, base='ebp'): | |
# find the stack frame | |
stack = GetFrame(here()) | |
size = GetStrucSize(stack) | |
# figure out all of the variable names | |
names = [] |