Welcome, Guest.

Author Topic: Get imports of an image  (Read 87 times)

Offline pr0jekt

  • Level 0 - Leacher Skid
  • Posts: 6
    • View Profile
Get imports of an image
« on: May 26, 2018, 06:32:51 pm »
This is useful for many functions, reverse engineering, manual mapping, etc.

Code: [Select]
typedef std::vector<IMAGE_IMPORT_DESCRIPTOR*> vecImports;

vecImports get_imports(void* _image)
{
vecImports imports;
auto import_desc = this->getDataDir<IMAGE_IMPORT_DESCRIPTOR*>(IMAGE_DIRECTORY_ENTRY_IMPORT, _image);

for (;
import_desc->FirstThunk;
++import_desc)
imports.emplace_back(import_desc); // emplace_back faster than push_back

return imports;
}




Total Members


  • Youtube Youtube
  • Facebook Facebook
  • Twitter Twitter
  • Steam Steam

  • Powered by SMF | SMF © 2018, Simple Machines

    2018 BigPackets. All rights reserved. All other trademarks, logos and copyrights are the property of their respective owners. This site is not associated with any company in any way.