Idaapi GISTS

Force creation of an assembly function:

1
2
3
4
5
6
7
8
9
10
# get address from unstripped file
def check():
f = idaapi.get_func(ScreenEA())
print [hex(f.startEA), hex(f.endEA)]
# create function in stripped file
def create(ea_start, ea_end):
for addr in range(ea_start, ea_end):
idaapi.create_insn(addr)
MakeFunction(ea_start, ea_end)

Remove stack reference name in current function:

1
2
3
4
5
def unstack():
f = idaapi.get_func(ScreenEA())
for addr in range(f.startEA, f.endEA):
for i in range(5):
idc.OpOff(addr, i, 16)