Skip to content

Instantly share code, notes, and snippets.

@jfmherokiller
Created October 19, 2023 00:42
Show Gist options
  • Save jfmherokiller/2bebe6b0a9c9c2bca4ad02b27c26a0ac to your computer and use it in GitHub Desktop.
Save jfmherokiller/2bebe6b0a9c9c2bca4ad02b27c26a0ac to your computer and use it in GitHub Desktop.
add the function names from uruexplorer.map to ida
import idc
import idautils
import idaapi
def loadmap():
specialdelimiter = " f "
#change this path so its appropreate
with open("D:\\Games\\Myst Online Uru Live(again)\\UruExplorer.map") as file:
lines = [line.rstrip() for line in file]
# filter for special lines
lines = [line for line in lines if specialdelimiter in line]
prepared_lines = [prepare_line(line) for line in lines]
setline_in_ida(prepared_lines)
def prepare_line(linebit: str):
parts = [line for line in linebit.split(" ") if line]
trueparts = [parts[1], parts[2]]
return trueparts
def setline_in_ida(linebit2):
for parts in linebit2:
funcname = parts[0]
funcloc = parts[1]
idaapi.set_name(int(funcloc,16), funcname, idaapi.SN_FORCE)
print("")
loadmap()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment