Code:
int D3Dinit(void) //Just a hook I used for testing, got it from Marko I believe.
{
	DWORD		hD3D, adr, *vtbl;

	// wait for the d3dx dll
	hD3D=0;
	do {
		hD3D = (DWORD)GetModuleHandle("d3d9.dll");
		Sleep(10);
	} while(!hD3D);
	adr = FindPattern(hD3D, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
	if (adr) {
		memcpy(&vtbl,(void *)(adr+2),4);
		pReset	  = (oReset)	DetourFunction((PBYTE)vtbl[16]   , (PBYTE)Reset   ,5);
 		pEndScene = (oEndScene)	DetourFunction((PBYTE)vtbl[42], (PBYTE)EndScene,5);
 	}
	return 0;
}


is that patched? i got the base working but then when im in the game it says working 4 like 40 sec then the game crashs