My Hook Detect

Posts 1–6 of 6 · Page 1 of 1
My Hook Detect
This Hook

DWORD dwEndRet;
__declspec( naked ) void EndRender()
{
__asm
{
{
mov ecx, [eax]
mov edx, [ecx+0A8h]
pushad
}
__asm
{
popad
jmp [dwEndRet]
}
}}
class CD3D9
{
public:
char _0x1FCE[168];
int cES;
char _0x2C2A[156];
int cDIP;
};
void MakeJMP( BYTE *pAddress, DWORD dwJumpTo, DWORD dwLen )
{
DWORD dwOldProtect, dwBkup, dwRelAddr;
VirtualProtect(pAddress, dwLen, PAGE_EXECUTE_READWRITE, &dwOldProtect);
dwRelAddr = (DWORD) (dwJumpTo - (DWORD) pAddress) - 5;
*pAddress = 0xE9;
*((DWORD *)(pAddress + 0x1)) = dwRelAddr;
for(DWORD x = 0x5; x < dwLen; x++) *(pAddress + x) = 0x90;
VirtualProtect(pAddress, dwLen, dwOldProtect, &dwBkup);
return;
}
//================================================== ================================================== =============================
//=======================HOOK======================= ===
DWORD WINAPI EngineProccess( LPVOID lpParam ){
while(1){
DWORD asu =(DWORD)GetModuleHandleA( "i3GfxDx.dll" )+0x252F0;
DWORD HookEngine = (DWORD) LoadLibraryA (XStr(0x03, 0x0B, 0xFF, 0x96334664, 0x7B407D28, 0x63646500 ).c());
unsigned long tmp1 = (DWORD) HookEngine + 1713260;
DWORD tmp3 = asu+0x8;
DWORD tmp4 = dwEndRet+tmp3;
DWORD Tempr2 =0;
while(!pGDevice)
{
if(IsBadReadPtr((PDWORD)tmp1,4)==NULL)
Tempr2 = *(PDWORD)((DWORD)(tmp1))+21376+dwEndRet;
if(IsBadReadPtr((PDWORD)Tempr2,4)==NULL)
{
DWORD OldProtect;
VirtualProtect((void*)(Tempr2), 4, PAGE_EXECUTE_READWRITE, &OldProtect);
memcpy(&pGDevice, (void *)Tempr2, 4);
VirtualProtect((void*)(Tempr2), 4, OldProtect, NULL);
}
}
DWORD *g_pDevice = (DWORD*)pGDevice;
g_pDevice = (DWORD*)g_pDevice[0];
while(!pDevice)
pDevice = (LPDIRECT3DDEVICE9)(DWORD*)g_pDevice;
*(PDWORD)&oDrawIndexedPrimitive = g_pDevice[82];
*(PDWORD)&oEndScene = g_pDevice[42];
MakeJMP((PBYTE)(g_pDevice[1] - 5), (DWORD)(g_pDevice[4] - 5),5);
MakeJMP((PBYTE)(g_pDevice[2] - 5), (DWORD)(g_pDevice[5] - 5),5);
MakeJMP((PBYTE)(g_pDevice[4] - 5), (DWORD)hkEndScene,5);
MakeJMP((PBYTE)(g_pDevice[5] - 5), (DWORD)hkDrawIndexedPrimitive,5);
while(1)
{
void* hkDrawIndexedPrimitive = (void*)(HookEngine + (DWORD) + (DWORD) + (DWORD) + (PDWORD)tmp1 + 1024);
void* hkEndScene = (void*)(HookEngine + (DWORD) + (DWORD) + (DWORD) + (PDWORD)tmp1 + 1030);
if(IsBadReadPtr((PDWORD)hkDrawIndexedPrimitive,4)= =NULL)
Tempr2 = *(PDWORD)((DWORD)(hkDrawIndexedPrimitive)+21376+dw EndRet,4);
if(IsBadReadPtr((PDWORD)hkDrawIndexedPrimitive,4)= =NULL)
{
DWORD OldProtect;
VirtualProtect((void*)(hkDrawIndexedPrimitive), 4, PAGE_EXECUTE_READWRITE, &OldProtect);
memcpy(&pGDevice,(void *)hkDrawIndexedPrimitive, 4);
VirtualProtect((void*)(hkDrawIndexedPrimitive), 4, OldProtect, NULL);
}
if(IsBadReadPtr((PDWORD)hkEndScene,4)==NULL)
Tempr2 = *(PDWORD)((DWORD)(hkEndScene)+21376+dwEndRet);
if(IsBadReadPtr((PDWORD)hkEndScene,4)==NULL)
{
DWORD OldProtect;
VirtualProtect((void*)(hkEndScene), 4, PAGE_EXECUTE_READWRITE, &OldProtect);
memcpy(&pGDevice,(void *)hkEndScene, 4);
VirtualProtect((void*)(hkEndScene), 4, OldProtect, NULL);
}
Sleep(218);
DWORD D3D9Hooking = (DWORD)LoadLibraryA(XStr(0x03, 0x09, 0x56, 0x333F2B2F, 0x39753831, 0x32000000 ).c()) + 1220880;//1208287
CD3D9 *cHook = *(CD3D9**)D3D9Hooking;
g_pDevice[42] = (DWORD)g_pDevice[1] - 5;
g_pDevice[82] = (DWORD)g_pDevice[2] - 5;
cHook->cES = g_pDevice[42];
cHook->cDIP = g_pDevice[82];
Sleep(1000);
}}
return 0;
}
Post this in general discussion?
Quote Originally Posted by Jim View Post
Post this in general discussion?
This belongs here more than the discussion section since we don't have MAT coding section.

OT : I'm afraid no one will be able to help you at this .
Code is Hook Games PointBlank ?
Please EDIT MY Hook
Nobody is going to do that for you , since you're begging for it .Also it means that you leeched it and didn't write the code down.
Not even MAT related .
Closed.
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us