Cromon

CImportModule.cpp

Oct 14th, 2012
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1.     void CImportModule::bindImports(LPVOID lpBaseOfDll, CMemory& mem /*, CModule& module */) {
  2.         DWORD dllBase = (DWORD)lpBaseOfDll;
  3.  
  4.         DWORD ofsIAT = (dllBase + mDescriptor.FirstThunk);
  5.  
  6.         DWORD i = 0;
  7.         for(auto entry : mEntries) {
  8.             DWORD dwImportResolve = 0;
  9.             // dwImportResolve = module.getFunction(entry.getFunctionIdentifier());
  10.  
  11.             mem.write(ofsIAT + i * sizeof(IMAGE_THUNK_DATA32), dwImportResolve);
  12.             ++i;
  13.         }
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment