Cromon

CMappedModule.cpp

Oct 18th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1.         // push ebp
  2.         ret.push_back(0x55);
  3.         // mov ebp, esp
  4.         ret.push_back(0x8B); ret.push_back(0xEC);
  5.  
  6.         // push imm8
  7.         ret.push_back(0x6A);
  8.         // lpReserved
  9.         ret.push_back(0);
  10.         // push imm8
  11.         ret.push_back(0x6A);
  12.         // dwReason
  13.         ret.push_back(1);
  14.         // push imm32
  15.         ret.push_back(0x68);
  16.         // hInstance
  17.         ret.insert(ret.end(), (BYTE*)&mBaseOfDll, ((BYTE*)&mBaseOfDll) + 4);
  18.         // call far ptr
  19.         ret.push_back(0x9A);
  20.         // dllEntryPoint
  21.         ret.insert(ret.end(), (BYTE*)&dwEntryPoint, ((BYTE*)&dwEntryPoint) + 4);
  22.  
  23.         // mov esp, ebp
  24.         ret.push_back(0x8B); ret.push_back(0xE5);
  25.         // pop ebp
  26.         ret.push_back(0x5D);
  27.         // retn 4
  28.         ret.push_back(0xC2); ret.push_back(4); ret.push_back(0);
Advertisement
Add Comment
Please, Sign In to add comment