D3D9 Hook (WallHack)
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
)
The MidFunction
and here you have the Main part
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);
}
}
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
}
}
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);
}
}


I'm using C++ 2010 Express and DirectX SDK June 2010. Someone told me that the version that I've use is the one that is detected by xtrap, Is this true? BTW, What version did you used? Thanks..

, that means you have no clue about that source code