Hey Guys
i want to share my d3d hook. I don't need this hook, thats why i am sharing this code. With this hook you can make WallHack, FullBright....
So i don't share all my code only the main part. This isn't a Tutorial and only for guys who is knowing c++....
Have Fun!
WallHack (I think all of you can make this )
Code:
void WallHackD3D(LPDIRECT3DDEVICE9 pDevice)
{
IDirect3DVertexBuffer9* pStreamData = NULL;
UINT iOffsetInBytes,iStride;
pDevice->GetStreamSource(0,&pStreamData,&iOffsetInBytes,&iStride);
if (iStride == 44)
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
}
}
The MidFunction
Code:
DWORD ret_MyMid;
_declspec(naked) void MyMid()
{
static LPDIRECT3DDEVICE9 pDevice;
__asm
{
MOV EDI,EDI
PUSH EBP
MOV EBP,ESP
MOV EAX,DWORD PTR [EBP + 0x8]
MOV pDevice,EAX
}
WallHackD3D(pDevice);
__asm
{
JMP ret_MyMid
}
}
and here you have the Main part
Code:
void Hook ()
{
DWORD hD3D;
do {
hD3D = (DWORD)LoadLibraryA("d3d9.dll");
} while(!hD3D);
DWORD Address = FindPattern(hD3D, 0x128000,(PBYTE)"\x8B\xFF\x55\x8B\xEC\x6A\xFF\x68\x00\x00\x00\x00\x64\xA1\x00\x00\x00\x00\x50\x83\xEC\x10\x53\x56\x57\xA1\x00\x00\x00\x00","xxxxxxxx????xx????xxxxxxxx????");
if(Address)
{
ret_myMid = Address + 5;
MakeJMP((PBYTE)Address,(DWORD)MyMid,5);
}
}