Guest User

Untitled

a guest
Mar 13th, 2015
2,681
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.93 KB | None | 0 0
  1. #include <Windows.h>
  2. #include <string>
  3. #include <fstream>
  4.  
  5. using namespace std;
  6.  
  7. DWORD GetOpCodeNameAddress = 0x0191D0A0;
  8.  
  9. string GetOpCodeName(DWORD Opcode)
  10. {
  11.     unsigned int pointer = 0;
  12.  
  13.     _asm
  14.     {
  15.             push Opcode
  16.             call GetOpCodeNameAddress
  17.             add esp, 4
  18.             mov [pointer], eax
  19.     }
  20.    
  21.     return string((LPCSTR)pointer);
  22. }
  23.  
  24. DWORD WINAPI Thread(LPVOID nothing)
  25. {
  26.     ofstream fileOut;
  27.     fileOut.open("opcodes.txt", ios::out);
  28.     string name = "";
  29.  
  30.     for (int i = 0; i < 0x10000; i++)
  31.     {
  32.         name = GetOpCodeName(i);
  33.         if (name != "")
  34.         {
  35.             fileOut << name << " = " << i << "," << endl;
  36.         }
  37.     }
  38.  
  39.     fileOut.close();
  40.     return 1;
  41. }
  42.  
  43. BOOL WINAPI DllMain(HINSTANCE Hinst, DWORD Reason, LPVOID Somethingelse)
  44. {
  45.     switch (Reason)
  46.     {
  47.         case DLL_PROCESS_ATTACH:
  48.             MessageBoxA(0, "Injected", "Desu", 0);
  49.             CreateThread(0, 0, Thread, 0, 0, 0);
  50.         case DLL_PROCESS_DETACH:
  51.             MessageBoxA(0, "Finished.", "Desu", 0);
  52.     }
  53.  
  54.     return 1;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment