Ida pro is an essential tool for reverse engineering, but it seems that Ida pro does not support direct import of Map Files (if anyone knows, please let me know ). When I analyzed a program a few days ago, it was strange that the map was provided but the PDB was not provided. Unhappy, I wrote a python applet that converts the map file into Ida pro's IDC script:
#-*-Coding: UTF-8 -*-
From _ future _ import with_statement
Import sys
Import OS
Def map2idc (in_file, out_file ):
With open (out_file, 'w') as fout:
Fout. Write ('# include <IDC. IDC> \ n ')
Fout. Write ('static main () \ n {\ n ')
With open (in_file) as fin:
For line in Fin:
List = line. Split ()
If Len (list)> = 3 and Len (STR (list [2]) = 8 and STR (list [2]). isalnum ():
Fout. Write ('\ tmakename (0x % s, "% s"); \ n' % (list [2], list [1])
Fout. Write ('} \ n ')
Def main ():
From optparse import optionparser
Parser = optionparser (usage = 'usage: % prog <map FILENAME> ')
(Options, argS) = parser. parse_args ()
If Len (ARGs) <1:
Parser. Error ('encrect Number of arguments ')
Return map2idc (ARGs [0], OS. Path. splitext (ARGs [0]) [0] + '. IDC ')
If _ name __= = "_ main __":
SYS. Exit (main ())
Usage:
Python map2idc. py/path/to/mapfile
In Ida pro, after loading the program to be analyzed, select file --> IDC File... and select the generated IDC File.