Advertisement
CHEAT_THE_GAME

Untitled

Aug 19th, 2017
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.77 KB | None | 0 0
  1. int  InicializeD3D(void)
  2. {
  3.  
  4. DWORD D3DBase, ResultD3DBase, *vTable;
  5.  
  6.     D3DBase = 0; do {
  7.         D3DBase = (DWORD)GetModuleHandle("d3d9.dll");
  8.         Sleep(10);
  9.     }
  10.  
  11.     while (!D3DBase);
  12.     ResultadoD3DBase = ProcurePattern(D3DBase, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
  13.  
  14.     if (ResultadoD3DBase) {
  15.         memcpy(&vTable, (void *)(ResultD3DBase + 2), 4);
  16.  
  17.         pBeginScene = (BeginScene_)DetourFunction((PBYTE)vTable[42], (PBYTE)nBeginScene);
  18.         pReset = (Reset_t)DetourFunction((PBYTE)vTable[16], (PBYTE)nReset);
  19.         pDrawIndexedPrimitive = (oDrawIndexedPrimitive)DetourFunction((PBYTE)vTable[82], (PBYTE)myDrawIndexedPrimitive);
  20.         yourHookz = (mikeyQuery)DetourFunction((PBYTE)GetDeviceAddress(118), (PBYTE)tsunashit);
  21.     }
  22.  
  23.     return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement