wallhack source code

Posts 1–15 of 44 · Page 1 of 3
wallhack source code
test in
win xp
win7 32
win7 64
win 8

Code:
#include <windows.h>
#include <math.h> 
#include <STDIO.h> 
#include <d3dx9.h>
#include <tchar.h>
#pragma comment (lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
#include <cstdio>
#include <atlstr.h>

void MessageBox(DWORD AAA,LPCSTR lpText)
{
	CString str = "";
	str.Format("%x", AAA);
	MessageBoxA(NULL,str,lpText,0); 
}

DWORD org_scp = 0,JMPDZ=0;
__declspec(naked) DWORD __stdcall pDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinIndex,UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
{

__asm {
  
  MOV EDI,EDI
   PUSH EBP
   MOV EBP,ESP   
   jmp JMPDZ
}
}
//DrawIndexedPrimitive
HRESULT _stdcall  my_DrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinIndex,UINT NumVertices, UINT StartIndex, UINT PrimitiveCount) 
{

UINT iOffsetInBytes,iStride; 
IDirect3DVertexBuffer9* pStreamData = NULL;

if(pDevice->GetStreamSource(0,&pStreamData,&iOffsetInBytes,&iStride)== D3D_OK)
  pStreamData->Release(); 
if (iStride == 40 || iStride == 44)
{ 
  DWORD dwOldZEnable ; 
  pDevice->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable);
  if(dwOldZEnable == D3DZB_TRUE)
  {
	  pDevice->SetRenderState(D3DRS_ZENABLE,D3DZB_FALSE);
	  pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,D3DZB_FALSE);
	  pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
	  pDevice->SetRenderState(D3DRS_ZENABLE,dwOldZEnable); 
	  return 0;
  }
} 
return pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
} 




__declspec(naked) DWORD __stdcall D3DXCreateFont(DWORD A, DWORD B, DWORD C, DWORD D, DWORD E, DWORD F, DWORD G, DWORD H, DWORD I, DWORD J, DWORD K, DWORD L)
{

__asm 
{
	MOV EDI,EDI
	PUSH EBP
	MOV EBP,ESP   
	jmp org_scp
}
}


DWORD __stdcall MyD3DXCreateFont(DWORD A, DWORD B, DWORD C, DWORD D, DWORD E, DWORD F, DWORD G, DWORD H, DWORD I, DWORD J, DWORD K, DWORD L)
{
DWORD thisa;
thisa = *(DWORD*)A;
DWORD Address =  thisa + 328;//82*4 DrawIndexedPrimitive 
DWORD Proca = *(DWORD*)Address;
DWORD oldflag;
JMPDZ=Proca+5; // 




VirtualProtect((LPVOID)Proca, 5, PAGE_EXECUTE_READWRITE, &oldflag);
*(PBYTE)Proca = 0xe9;
*(PULONG)(Proca+1) = (DWORD)my_DrawIndexedPrimitive- (Proca + 5);



*(PULONG)(org_scp-5) = 0x0000008b;
*(PULONG)(org_scp-4) = 0xEC8B55FF;
return D3DXCreateFont(A,B,C,D,E,F,G,H,I,J,K,L); 
}

void hook() //hook D3DXCreateFontA
{
DWORD oldflag;
HMODULE User32 = LoadLibraryA("d3dx9_29.dll");
PVOID CrackAddr = (PVOID)GetProcAddress(User32, "D3DXCreateFontA");
VirtualProtect(CrackAddr, 5, PAGE_EXECUTE_READWRITE, &oldflag);
org_scp = (DWORD)CrackAddr + 5; 

*(PULONG)CrackAddr = 0x000000e9;
*(PULONG)((DWORD)CrackAddr+1) = (DWORD)MyD3DXCreateFont- ((DWORD)CrackAddr + 5);

}




BOOL WINAPI DllMain(HINSTANCE hinstModule, DWORD dwReason, LPVOID lpvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
    hook();
	/*DWORD Proca=0x6b0bb6b1;
	JMPDZ=Proca+0x5;
	*(PBYTE)Proca = 0xe9;
	*(PULONG)(Proca+1) = (DWORD)my_DrawIndexedPrimitive- (Proca + 5);
*/
	


}
return true;
}


extern "C" int _declspec(dllexport)HOOKFONK()
{
	return 0;
}
Good jop worked .
can u teach how to make a code???tnx
Quote Originally Posted by chainedheart View Post
can u teach how to make a code???tnx
vc 6.0 or vs 2008 2010 2012 2013
Working On XP! Thanks

P/s: This source Detected on xTrap 4400
Good Job Pro
where to put this ? please help
Quote Originally Posted by moho97 View Post
where to put this ? please help
Use c++ then build it
Quote Originally Posted by jers123 View Post
how to use it?
Use c++ then build it
Sorry but do i need cshell and loadlib or not? Confused as if i build a win32 project and put the code in it fails
where can i download c++ x86?
im havung error it says [Error] d3dx9.h: No such file or directory
compilation terminated.
Please approve the link or can you MP me a direct download link cmc5414 ? this hack work with Brick-Force ? if yes can it bypass Xtrap ?
Posts 1–15 of 44 · Page 1 of 3

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us