Created
October 28, 2022 08:40
-
-
Save qycyfjy/99e17879fd29d92907075200f10e5fcb to your computer and use it in GitHub Desktop.
IDA export demangled function names
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 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