Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Other Semi-Popular First Person Shooter Hacks › WarZ & Infestation Survivor Stories Hacks & Cheats › Simple Hook EndScene

Simple Hook EndScene

Posts 1–2 of 2 · Page 1 of 1
Hacker Fail
Hacker Fail
Simple Hook EndScene
Hello guys, I will post a simple method of EndScene for this game..
With this, you can do a menu, esp..


Screen Shoot



Code:
#include <windows.h>
#include <d3d9.h>
#include <d3dx9.h>
#include <stdio.h>

#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")

DWORD dwEndscene_hook;
DWORD dwEndscene_ret;

DWORD *vTable;

LPD3DXFONT pFont;

int text;

VOID WriteText( LPDIRECT3DDEVICE9 pDevice, INT x, INT y, DWORD color, CHAR *text )
{    
    RECT rect;
    SetRect( &rect, x, y, x, y );
    pFont->DrawText( NULL, text, -1, &rect, DT_NOCLIP | DT_LEFT, color );
}

void WriteMemory(void *address, void *bytes, int byteSize)
{
	DWORD NewProtection;
		
	VirtualProtect(address, byteSize, PAGE_EXECUTE_READWRITE, &NewProtection);
	memcpy(address, bytes, byteSize);
	VirtualProtect(address, byteSize, NewProtection, &NewProtection);
}

VOID WINAPI EndScene(LPDIRECT3DDEVICE9 pDevice)
{
	if( pFont )
    {
        pFont->Release();
        pFont = NULL;
    }
    if( !pFont )
    {
        D3DXCreateFont( pDevice, 14,0,FW_BOLD,1,0,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH | FF_DONTCARE,"Arial",&pFont );
    }

	WriteText( pDevice, 15, 80, D3DCOLOR_ARGB(255,255,000,000), "My Private Hook" );

}

__declspec(naked) void MyEndscene( )
{

	static LPDIRECT3DDEVICE9 pDevice;

    __asm
    {
        mov dword ptr ss:[ebp - 10], esp;
        mov esi, dword ptr ss:[ebp + 0x8];
        mov pDevice, esi;
    }

	EndScene(pDevice);

    __asm
    {
        jmp dwEndscene_ret;
    }
 
}

bool Mask(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
    for(;*szMask;++szMask,++pData,++bMask)
        if(*szMask=='x' && *pData!=*bMask ) 
            return false;
    return (*szMask) == NULL;
}

DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask)
{
    for(DWORD i=0; i<dwLen; i++)
        if(Mask((BYTE*)(dwAddress + i), bMask, szMask))
            return (DWORD)(dwAddress+i);
    return 0;
}

void MakeJMP(BYTE *pAddress, DWORD dwJumpTo, DWORD dwLen)
{
    DWORD dwOldProtect, dwBkup, dwRelAddr;
    VirtualProtect(pAddress, dwLen, PAGE_EXECUTE_READWRITE, &dwOldProtect);
    dwRelAddr = (DWORD) (dwJumpTo - (DWORD) pAddress) - 5;
    *pAddress = 0xE9;
    *((DWORD *)(pAddress + 0x1)) = dwRelAddr;
    for(DWORD x = 0x5; x < dwLen; x++) *(pAddress + x) = 0x90;
	VirtualProtect(pAddress, dwLen, dwOldProtect, &dwBkup);
    return;
}

void MyHook( void )
{
    DWORD hD3D = NULL;
    while (!hD3D) hD3D = (DWORD)GetModuleHandle("d3d9.dll");

    DWORD PPPDevice = FindPattern(hD3D, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");

    WriteMemory( &vTable, (void *)(PPPDevice + 2), 4);

    dwEndscene_hook = vTable[42] + 0x2A;

    dwEndscene_ret = dwEndscene_hook + 0x6;

	while(1)
	{
		Sleep(100);
		MakeJMP((PBYTE)dwEndscene_hook, (DWORD)MyEndscene, 6);
	}
}

BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
{
    if (dwReason == DLL_PROCESS_ATTACH)
    {
        DisableThreadLibraryCalls(hModule);
        CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)MyHook, NULL, NULL, NULL);
    }
    return TRUE;
}

Credits

Hacker Fail, ZeaS, Shad0w_
#1 · 11y ago
Jov
[MPGH]Jov
Quote Originally Posted by Hacker Fail View Post
Hello guys, I will post a simple method of EndScene for this game..
With this, you can do a menu, esp..


Screen Shoot



Code:
#include <windows.h>
#include <d3d9.h>
#include <d3dx9.h>
#include <stdio.h>

#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")

DWORD dwEndscene_hook;
DWORD dwEndscene_ret;

DWORD *vTable;

LPD3DXFONT pFont;

int text;

VOID WriteText( LPDIRECT3DDEVICE9 pDevice, INT x, INT y, DWORD color, CHAR *text )
{    
    RECT rect;
    SetRect( &rect, x, y, x, y );
    pFont->DrawText( NULL, text, -1, &rect, DT_NOCLIP | DT_LEFT, color );
}

void WriteMemory(void *address, void *bytes, int byteSize)
{
	DWORD NewProtection;
		
	VirtualProtect(address, byteSize, PAGE_EXECUTE_READWRITE, &NewProtection);
	memcpy(address, bytes, byteSize);
	VirtualProtect(address, byteSize, NewProtection, &NewProtection);
}

VOID WINAPI EndScene(LPDIRECT3DDEVICE9 pDevice)
{
	if( pFont )
    {
        pFont->Release();
        pFont = NULL;
    }
    if( !pFont )
    {
        D3DXCreateFont( pDevice, 14,0,FW_BOLD,1,0,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH | FF_DONTCARE,"Arial",&pFont );
    }

	WriteText( pDevice, 15, 80, D3DCOLOR_ARGB(255,255,000,000), "My Private Hook" );

}

__declspec(naked) void MyEndscene( )
{

	static LPDIRECT3DDEVICE9 pDevice;

    __asm
    {
        mov dword ptr ss:[ebp - 10], esp;
        mov esi, dword ptr ss:[ebp + 0x8];
        mov pDevice, esi;
    }

	EndScene(pDevice);

    __asm
    {
        jmp dwEndscene_ret;
    }
 
}

bool Mask(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
    for(;*szMask;++szMask,++pData,++bMask)
        if(*szMask=='x' && *pData!=*bMask ) 
            return false;
    return (*szMask) == NULL;
}

DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask)
{
    for(DWORD i=0; i<dwLen; i++)
        if(Mask((BYTE*)(dwAddress + i), bMask, szMask))
            return (DWORD)(dwAddress+i);
    return 0;
}

void MakeJMP(BYTE *pAddress, DWORD dwJumpTo, DWORD dwLen)
{
    DWORD dwOldProtect, dwBkup, dwRelAddr;
    VirtualProtect(pAddress, dwLen, PAGE_EXECUTE_READWRITE, &dwOldProtect);
    dwRelAddr = (DWORD) (dwJumpTo - (DWORD) pAddress) - 5;
    *pAddress = 0xE9;
    *((DWORD *)(pAddress + 0x1)) = dwRelAddr;
    for(DWORD x = 0x5; x < dwLen; x++) *(pAddress + x) = 0x90;
	VirtualProtect(pAddress, dwLen, dwOldProtect, &dwBkup);
    return;
}

void MyHook( void )
{
    DWORD hD3D = NULL;
    while (!hD3D) hD3D = (DWORD)GetModuleHandle("d3d9.dll");

    DWORD PPPDevice = FindPattern(hD3D, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");

    WriteMemory( &vTable, (void *)(PPPDevice + 2), 4);

    dwEndscene_hook = vTable[42] + 0x2A;

    dwEndscene_ret = dwEndscene_hook + 0x6;

	while(1)
	{
		Sleep(100);
		MakeJMP((PBYTE)dwEndscene_hook, (DWORD)MyEndscene, 6);
	}
}

BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
{
    if (dwReason == DLL_PROCESS_ATTACH)
    {
        DisableThreadLibraryCalls(hModule);
        CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)MyHook, NULL, NULL, NULL);
    }
    return TRUE;
}

Credits

Hacker Fail, ZeaS, Shad0w_
Good release. Thanks for posting Credits.
#2 · 11y ago
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

  • Simple Hook V1By MugNuf in Combat Arms Hacks & Cheats
    17Last post 16y ago
  • Hook EndSceneBy inmate in C++/C Programming
    1Last post 16y ago
  • A simple Hooking classBy 258456 in CrossFire Hack Coding / Programming / Source Code
    13Last post 14y ago
  • Hooking EndSceneBy konsowa7 in Combat Arms Coding Help & Discussion
    1Last post 14y ago
  • [Question] Hook EndSceneBy Departure in Combat Arms Coding Help & Discussion
    30Last post 15y ago

Tags for this Thread

None