Created
October 19, 2023 00:42
-
-
Save jfmherokiller/2bebe6b0a9c9c2bca4ad02b27c26a0ac to your computer and use it in GitHub Desktop.
add the function names from uruexplorer.map to ida
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 | |
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