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 › Alliance of Valiant Arms (AVA) Hacks & Cheats › Alliance of Valiant Arms (AVA) Coding / Source Code › For help to a player D3D wallhack For Source Code

For help to a player D3D wallhack For Source Code

Posts 1–4 of 4 · Page 1 of 1
A7
a749041304
For help to a player D3D wallhack For Source Code
I am Chinese, I just learned D3D, the great trouble to a WallHack Source Code to study
#1 · 14y ago
darkimp1
darkimp1
//================================================== ===================================



#include <windows.h>

#include <d3d9.h>
#pragma comment(lib, "d3d9.lib")

#include <d3dx9.h>
#pragma comment(lib, "d3dx9.lib")
#include <time.h>
#include <stdlib.h>
#include <fstream>
#include <vector>
#include <D3dx9tex.h>
#include <stdio.h>
#include <time.h>
#include <tchar.h>
#include <iostream>
#pragma warning(disable:4996)//to disable the sprintf warning in VC++ 2008
//-----------//
bool fCall = true;
bool Chams = false;
IDirect3DPixelShader9 *Front,
*Back;
//----------//




HRESULT CreateMyShader(IDirect3DPixelShader9 **pShader, IDirect3DDevice9 *Device, float red, float green, float blue, float alpha )
{
ID3DXBuffer *MyBuffer = NULL;
char MyShader[ 256 ];
sprintf( MyShader, "ps.1.1\ndef c0, %f, %f, %f, %f\nmov r0,c0", red/255, green/255, blue/255, alpha/255 );
D3DXAssembleShader( MyShader, sizeof( MyShader ), NULL, NULL, 0, &MyBuffer , NULL );
if( FAILED( Device->CreatePixelShader((const DWORD*)MyBuffer ->GetBufferPointer(), pShader)) )return E_FAIL;
return S_OK;
}

//================================================== ===================================

typedef HRESULT (WINAPI* CreateDevice_Prototype) (LPDIRECT3D9, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE9*);
typedef HRESULT (WINAPI* Reset_Prototype) (LPDIRECT3DDEVICE9, D3DPRESENT_PARAMETERS*);
typedef HRESULT (WINAPI* EndScene_Prototype) (LPDIRECT3DDEVICE9);
typedef HRESULT (WINAPI* DrawIndexedPrimitive_Prototype)(LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE, INT, UINT, UINT, UINT, UINT);

CreateDevice_Prototype CreateDevice_Pointer = NULL;
Reset_Prototype Reset_Pointer = NULL;
EndScene_Prototype EndScene_Pointer = NULL;
DrawIndexedPrimitive_Prototype DrawIndexedPrimitive_Pointer = NULL;

HRESULT WINAPI Direct3DCreate9_VMTable (VOID);
HRESULT WINAPI CreateDevice_Detour (LPDIRECT3D9, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE9*);
HRESULT WINAPI Reset_Detour (LPDIRECT3DDEVICE9, D3DPRESENT_PARAMETERS*);
HRESULT WINAPI EndScene_Detour (LPDIRECT3DDEVICE9);
HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE, INT, UINT, UINT, UINT, UINT);

DWORD WINAPI VirtualMethodTableRepatchingLoopToCounterExtension Repatching(LPVOID);
PDWORD Direct3D_VMTable = NULL;

//================================================== ===================================

BOOL WINAPI DllMain(HINSTANCE hinstModule, DWORD dwReason, LPVOID lpvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hinstModule);

if(Direct3DCreate9_VMTable() == D3D_OK)
return TRUE;
}

return FALSE;
}

//================================================== ===================================

HRESULT WINAPI Direct3DCreate9_VMTable(VOID)
{
LPDIRECT3D9 Direct3D_Object = Direct3DCreate9(D3D_SDK_VERSION);

if(Direct3D_Object == NULL)
return D3DERR_INVALIDCALL;

Direct3D_VMTable = (PDWORD)*(PDWORD)Direct3D_Object;
Direct3D_Object->Release();

DWORD dwProtect;

if(VirtualProtect(&Direct3D_VMTable[16], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0)
{
*(PDWORD)&CreateDevice_Pointer = Direct3D_VMTable[16];
*(PDWORD)&Direct3D_VMTable[16] = (DWORD)CreateDevice_Detour;

if(VirtualProtect(&Direct3D_VMTable[16], sizeof(DWORD), dwProtect, &dwProtect) == 0)
return D3DERR_INVALIDCALL;
}
else
return D3DERR_INVALIDCALL;

return D3D_OK;
}

//================================================== ===================================

HRESULT WINAPI CreateDevice_Detour(LPDIRECT3D9 Direct3D_Object, UINT Adapter, D3DDEVTYPE DeviceType, HWND FocusWindow,
DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* PresentationParameters,
LPDIRECT3DDEVICE9* Returned_Device_Interface)
{
HRESULT Returned_Result = CreateDevice_Pointer(Direct3D_Object, Adapter, DeviceType, FocusWindow, BehaviorFlags,
PresentationParameters, Returned_Device_Interface);

DWORD dwProtect;

if(VirtualProtect(&Direct3D_VMTable[16], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0)
{
*(PDWORD)&Direct3D_VMTable[16] = *(PDWORD)&CreateDevice_Pointer;
CreateDevice_Pointer = NULL;

if(VirtualProtect(&Direct3D_VMTable[16], sizeof(DWORD), dwProtect, &dwProtect) == 0)
return D3DERR_INVALIDCALL;
}
else
return D3DERR_INVALIDCALL;

if(Returned_Result == D3D_OK)
{
Direct3D_VMTable = (PDWORD)*(PDWORD)*Returned_Device_Interface;

*(PDWORD)&Reset_Pointer = (DWORD)Direct3D_VMTable[16];
*(PDWORD)&EndScene_Pointer = (DWORD)Direct3D_VMTable[42];
*(PDWORD)&DrawIndexedPrimitive_Pointer = (DWORD)Direct3D_VMTable[82];

if(CreateThread(NULL, 0, VirtualMethodTableRepatchingLoopToCounterExtension Repatching, NULL, 0, NULL) == NULL)
return D3DERR_INVALIDCALL;
}

return Returned_Result;
}

//================================================== ===================================

HRESULT WINAPI Reset_Detour(LPDIRECT3DDEVICE9 Device_Interface, D3DPRESENT_PARAMETERS* PresentationParameters)
{
return Reset_Pointer(Device_Interface, PresentationParameters);
}

//================================================== ===================================

HRESULT WINAPI EndScene_Detour(LPDIRECT3DDEVICE9 Device_Interface)
{
return EndScene_Pointer(Device_Interface);
}

//================================================== ===================================

HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE9 Device_Interface, D3DPRIMITIVETYPE Type, INT BaseIndex,
UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
{
LPDIRECT3DVERTEXBUFFER9 Stream_Data;
UINT Offset = 0;
UINT Stride = 0;

if(Device_Interface->GetStreamSource(0, &Stream_Data, &Offset, &Stride) == D3D_OK)
Stream_Data->Release();

if(fCall)
{
CreateMyShader( &Front, Device_Interface, 255, 0, 0, 255 );
CreateMyShader( &Back, Device_Interface, 255, 255, 0, 255 );
fCall = false;
}

if ( GetAsyncKeyState ( VK_NUMPAD1 ) &1 )
{
Chams = !Chams;
}

if(Chams && (Stride == 32 && StartIndex == 0))
{
DWORD dwOldZEnable = D3DZB_TRUE;
Device_Interface->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable);
Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
Device_Interface->SetPixelShader( Front );
DrawIndexedPrimitive_Pointer(Device_Interface, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
Device_Interface->SetRenderState(D3DRS_ZENABLE, dwOldZEnable);
Device_Interface->SetPixelShader( Back );
}

return DrawIndexedPrimitive_Pointer(Device_Interface, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
}

//================================================== ===================================

DWORD WINAPI VirtualMethodTableRepatchingLoopToCounterExtension Repatching(LPVOID Param)
{
UNREFERENCED_PARAMETER(Param);

while(1)
{
Sleep(100);

*(PDWORD)&Direct3D_VMTable[42] = (DWORD)EndScene_Detour;
*(PDWORD)&Direct3D_VMTable[82] = (DWORD)DrawIndexedPrimitive_Detour;
*(PDWORD)&Direct3D_VMTable[16] = (DWORD)Reset_Detour;
}

return 1;
}

//================================================== ===================================






google is your friend
#2 · edited 14y ago · 14y ago
YU
yunus6161
hey i have corssfaire source. thats 0 errors. but when i copy and paste this source code there is 1 error. can you help me?

---------- Post added at 06:35 AM ---------- Previous post was at 06:02 AM ----------

darkimp that source that you send is with errors
#3 · 14y ago
Hack_AdminV
Hack_AdminV
oh my head!!!,thanks my friend#2
#4 · 14y ago
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

  • how to make a hack for warrock and how to activate hack in source codeBy mihec16121 in C++/C Programming
    7Last post 16y ago
  • 2 Player Tic Tac Toe - source code includedBy Shark23 in C++/C Programming
    0Last post 16y ago
  • [HELP] need help finding my old nametags visual basics source code...By ken53406 in Combat Arms Hack Coding / Programming / Source Code
    10Last post 15y ago
  • WF D3D released the source code available in the AVA WF OP7By Peter pan i in WolfTeam General
    3Last post 15y ago
  • (help) How do i use the hack source codesBy khaisbeast in Combat Arms Coding Help & Discussion
    4Last post 15y ago

Tags for this Thread

#wallhack chams