Skip to content

Instantly share code, notes, and snippets.

@qycyfjy
Created October 28, 2022 08:40
Show Gist options
  • Save qycyfjy/99e17879fd29d92907075200f10e5fcb to your computer and use it in GitHub Desktop.
Save qycyfjy/99e17879fd29d92907075200f10e5fcb to your computer and use it in GitHub Desktop.
IDA export demangled function names
import idautils, ida_funcs
def get_function_name(ea):
origin = idaapi.get_func_name(ea)
function_name = idaapi.demangle_name(
origin,
idc.get_inf_attr(INF_SHORT_DN)
)
if function_name:
return function_name
else:
return origin
def get_func_names():
names = []
for ea in idautils.Functions():
name = get_function_name(ea)
names.append(name)
return names
with open('workfile_sorted', 'w', encoding="utf-8") as f:
names = get_func_names()
names.sort()
f.write('\n'.join(names))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment