Need Help With Leeched Code
Can some one help me with this?
[HTML]void PreReset( LPDIRECT3DDEVICE9 pDevice )
{
// Code here
Menu.PreReset();
return;
}
void PostReset( LPDIRECT3DDEVICE9 pDevice )
{
// Code here
Menu.PostReset(pDevice);
return;
}[/HTML]
----------------------------------------------------------------//
[HTML]// Calculate the original address
NewocPBrs += (i-JMP32_SZ+1); // Inc to jmp
NewOrig = *(DWORD*)NewocPBrs; // Get 32bit jmp
NewocPBrs += BIT32_SZ; // Inc to end of jmp
NewOrig += (DWORD)NewocPBrs; // Add this addr to 32bit jmp
NewOrig -= (i-JMP32_SZ); // Dec by detour len to get to start of orig
// Write the overwritten bytes back to the original
VirtualProtect((LPVOID)NewOrig, (i-JMP32_SZ), PAGE_READWRITE, &NewProt);
memcpy((LPVOID)NewOrig, lpDetourCreatePtr, (i-JMP32_SZ));
VirtualProtect((LPVOID)NewOrig, (i-JMP32_SZ), NewProt, &Silamguard);[/HTML]