now it gets the VAs of the addresses of imports

This commit is contained in:
Andrew 2013-07-26 21:37:23 -04:00
parent afb2287fdd
commit fe933ff9d6
2 changed files with 3 additions and 2 deletions

View File

@ -38,7 +38,8 @@ string to_string(T t, ios_base & (*f)(ios_base&)) {
}
void printImports(void *N, RVA impAddr, string &modName, string &symName) {
cout << to_string<uint32_t>(impAddr, hex) << " " << modName << "!" << symName;
cout << "0x" << to_string<uint32_t>(impAddr, hex);
cout << " " << modName << "!" << symName;
cout << endl;
return;
}

View File

@ -463,7 +463,7 @@ parsed_pe *ParsePEFromFile(const char *filePath) {
//okay now we know the pair... add it
importent ent;
ent.addr = 0;
ent.addr = curEnt.AddressRVA + p->peHeader.nt.OptionalHeader.ImageBase;
ent.symbolName = symName;
ent.moduleName = modName;
p->internal->imports.push_back(ent);