Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int InicializeD3D(void)
- {
- DWORD D3DBase, ResultD3DBase, *vTable;
- D3DBase = 0; do {
- D3DBase = (DWORD)GetModuleHandle("d3d9.dll");
- Sleep(10);
- }
- while (!D3DBase);
- ResultadoD3DBase = ProcurePattern(D3DBase, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
- if (ResultadoD3DBase) {
- memcpy(&vTable, (void *)(ResultD3DBase + 2), 4);
- pBeginScene = (BeginScene_)DetourFunction((PBYTE)vTable[42], (PBYTE)nBeginScene);
- pReset = (Reset_t)DetourFunction((PBYTE)vTable[16], (PBYTE)nReset);
- pDrawIndexedPrimitive = (oDrawIndexedPrimitive)DetourFunction((PBYTE)vTable[82], (PBYTE)myDrawIndexedPrimitive);
- yourHookz = (mikeyQuery)DetourFunction((PBYTE)GetDeviceAddress(118), (PBYTE)tsunashit);
- }
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement