Outdated CSGO VTable Hook

  • CSGO recently moved logic from 'client_panorama.dll' to 'client.dll', you must update all code that uses 'client_panorama.dll' and replace it with 'client.dll' or the code will not work.
Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

gnuzim

Jr.Coder
Trump Tier Donator
Dank Tier Donator
Nobleman
Nov 28, 2012
67
1,418
0
Hey guys, i decided to share a CSGO Vtable Hook!
Lets post more things about D3D here plz :D

C++:
class CGame;
class cVMT;
class cD3D;

class CGame
{
public:
	cVMT* pVMT; //0x0000 

};//Size=0x0004

class cVMT
{
public:
	DWORD pD3D; //0x0000 

};//Size=0x0004


const DWORD_PTR dwAddy = reinterpret_cast<DWORD_PTR>(GetModuleHandleA("shaderapidx9.dll")) + 0x1A0A78;
CGame* pGame = (CGame*)dwAddy;

typedef HRESULT(WINAPI* tEndScene)(LPDIRECT3DDEVICE9 pDevice);
tEndScene pEndScene;

HRESULT WINAPI hkEndScene(LPDIRECT3DDEVICE9 pDevice)
{	
	_asm pushad;
	MessageBox(0, L"Test", 0, MB_OK);
	_asm popad;
	return pEndScene(pDevice);
}

DWORD WINAPI vThread()
{
	DWORD_PTR dwEndScene = NULL;

	while (pGame != NULL)
	{
		pEndScene = (HRESULT(WINAPI*)(LPDIRECT3DDEVICE9 pDevice)) *(DWORD_PTR*)(pGame->pVMT->pD3D + 0xA8);

		VirtualProtect((LPVOID)(pGame->pVMT->pD3D + 0xA8), sizeof(DWORD_PTR), PAGE_EXECUTE_READWRITE, &dwEndScene);

		while (TRUE)
		{
			*(DWORD_PTR*)(pGame->pVMT->pD3D + 0xA8) = (DWORD_PTR)hkEndScene;
		}

		VirtualProtect((LPVOID)(pGame->pVMT->pD3D + 0xA8), sizeof(DWORD_PTR), dwEndScene, &dwEndScene);
	}
	return 0;
}

BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
	if (fdwReason == DLL_PROCESS_ATTACH)
	{
		::CreateThread(0, 0, (LPTHREAD_START_ROUTINE)vThread, 0, 0, 0);
	}
	return TRUE;
}
Hooking EndScene, this is VAC PROOF, from this, you can adapt Fleeps Wallhack & Chams easily! :D
And if you make your hack public you will probably get your dll patched!

So becareful!

Credits goes to Crypt, has helped me alot with DirectX stuff!

Good luck you all ;)
 
Last edited:

Freak

Newbie
Full Member
Jan 17, 2013
7
174
0
C++:
class CGame;
class cVMT;
class cD3D;
 
class CGame
{
public:
    cVMT* pVMT; //0x0000
 
};//Size=0x0004
 
class cVMT
{
public:
    DWORD pD3D; //0x0000
 
};//Size=0x0004
 
 
const DWORD_PTR dwAddy = reinterpret_cast<DWORD_PTR>(GetModuleHandleA("shaderapidx9.dll")) + 0x1A0A78;
CGame* pGame = (CGame*)dwAddy;
 
typedef HRESULT(WINAPI* tEndScene)(LPDIRECT3DDEVICE9 pDevice);
tEndScene pEndScene;
 
HRESULT WINAPI hkEndScene(LPDIRECT3DDEVICE9 pDevice)
{  
    _asm pushad;
    MessageBox(0, L"Test", 0, MB_OK);
    _asm popad;
    return pEndScene(pDevice);
}
 
DWORD WINAPI vThread()
{
    DWORD_PTR dwEndScene = NULL;
 
    while (pGame != NULL)
    {
        pEndScene = (HRESULT(WINAPI*)(LPDIRECT3DDEVICE9 pDevice)) *(DWORD_PTR*)(pGame->pVMT->pD3D + 0xA8);
 
        VirtualProtect((LPVOID)(pGame->pVMT->pD3D + 0xA8), sizeof(DWORD_PTR), PAGE_EXECUTE_READWRITE, &dwEndScene);
 
        while (TRUE)
        {
            *(DWORD_PTR*)(pGame->pVMT->pD3D + 0xA8) = (DWORD_PTR)hkEndScene;
        }
 
        VirtualProtect((LPVOID)(pGame->pVMT->pD3D + 0xA8), sizeof(DWORD_PTR), dwEndScene, &dwEndScene);
    }
    return 0;
}
 
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
    if (fdwReason == DLL_PROCESS_ATTACH)
    {
        ::CreateThread(0, 0, (LPTHREAD_START_ROUTINE)vThread, 0, 0, 0);
    }
    return TRUE;
}
Very nice thanks for share
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods