Thumbs upFirst Selfwritten Base [NOOBPROOFED] [UNDETECTED] [WORKING] [EPIC PTC]

Posts 1–13 of 13 · Page 1 of 1
First Selfwritten Base [NOOBPROOFED] [UNDETECTED] [WORKING] [EPIC PTC]
Includes.h

Code:
#ifndef _Includes

#include <tchar.h>
#include <windows.h>
#include <stdio.h>
#include <d3dx9.h>
#include <malloc.h>
#include "ADE32.h"  


//Farben


bool NxChams=false; //
bool Wireframe=false; //
bool Rapidfire=false;//
bool Nametags =false;//
bool Weaponrange=false; //
bool Superbullets=false; //
bool Noreload =false;//
bool Norecoil =false;//
bool ShowFPS=false; //
bool Nospread=false; //
bool Stats=false;
bool nofog=false; //
bool playerwireframe=false;
bool skeleton=false;
bool superjump=false;//
bool weaponsway=false;
bool removals=false; //




#define black 0xFF000000
#define toxic 0xFF008B00
#define light_grey 0xAA757575
#define light_white 0xFFFCFCFC
#define white 0xFFFFFFFF
//Addys
/////*#define console1    
////#define console2 */ 
#define Cnsl_Unwrapped  0x485FC0
#define RapidFire 0x37425B35
#define WeaponRange1 0x374250B9
#define WeaponRange2 0x37425439
#define SuperBullets 0x3741FA5D 
#define NameTags1 0x372FCDC9
#define NameTags2 0x372FCE4F	
#define NoReload 0x37424E34
#define NoRecoil 0x373AB1BC
#define ptc_check1 0x0046FBDB //\x72 \x0E   //OLD 
#define ptc_check2 0x0046FBE4 //\x73 \x05   /OLD 
#define GAMESTATUS 0x377F4EFC


//#define
//#define
//#define
//#define
//#define
//#define
//#define
//#define






//Includes
#define WIN32_LEAN_AND_MEAN
#define WIN32_EXTRA_LEAN



//using namespace std;
#pragma comment (lib, "d3dx9")
#pragma comment (lib, "d3d9")
#pragma once 

typedef HRESULT (WINAPI* oPresent)(LPDIRECT3DDEVICE9 pDevice, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion);
typedef HRESULT (WINAPI* oReset)(LPDIRECT3DDEVICE9 pDevice,D3DPRESENT_PARAMETERS* Parametri);

#define D3D9_Name L"d3d9.dll"
#define  Font_Name "Verdana"   ///////
#define Reset     16
#define Present   17


#define Len_size 12
#define _Menu
#define _Main
long ScreenX;
long ScreenY;

void GetScreenRes(LPDIRECT3DDEVICE9 pDevice)
{
D3DVIEWPORT9 gViewPort;
pDevice->GetViewport(&gViewPort);
ScreenX = ( long )gViewPort.Width;
ScreenY = ( long )gViewPort.Height;
}


class cDetours
{
	public:
		/*Find yourself :P*/
		static LPVOID DetourCreate ( BYTE *orig, const BYTE *det, int iPatchType);
		/*Find yourself :P*/
};




//INT GetDetourLenAuto(PBYTE &pbFuncOrig,INT minDetLen);
/*Find yourself :P*/
//}




//INT cDetours::GetDetourLenAuto(PBYTE &pbFuncOrig,INT minDetLen)
//{
/*Find yourself :P*/
//}

#define JUNK_CODE             \
    __asm{push eax}            \
    __asm{xor eax, eax}        \
    __asm{setpo al}            \
    __asm{push edx}            \
    __asm{xor edx, eax}        \
    __asm{sal edx, 2}          \
    __asm{xchg eax, edx}       \
    __asm{pop edx}             \
    __asm{or eax, ecx}         \
    __asm{pop eax}



void* cDetours::memcpy_s( void* pvAddress, const void* pvBuffer, size_t stLen )
{
/*Find yourself :P*/
}
DWORD cDetours::DetourCreateE9( DWORD  SrcVA, DWORD  DstVA, DWORD  Size )
{

/*Find yourself :P*/
}

DWORD cDetours::CreateJMP_REL( DWORD  SrcVA, DWORD  DstVA, DWORD  Size )
{
	/*Find yourself :P*/
}



extern class cHook Hook;

class cMain
{
public: 
LPD3DXFONT pFont;
LPDIRECT3DDEVICE9 pDevice;
static void __cdecl PushToConsole( char* szCommand);
static void *DetourCreate (BYTE * src, const BYTE *dst, const int len);
bool bDataCompare(const BYTE* pData, const BYTE* bMask, const char* szMask); // 
DWORD FindPattern (DWORD dwAdress, DWORD dwLen, BYTE *bMask, char *szMask);
bool HookReady();//
void DrawString (int x, int y, DWORD color, LPD3DXFONT g_pFont, const char *fmt, ...);
void Render ( LPDIRECT3DDEVICE9 pDevice);
void Hook();
};

extern class cMain Main;

struct MenuSt_t
{
int x, y ;
	
bool IsVisible, Load;
};

class cMenu
{
public:
	MenuSt_t MenuSt;
	void Render (LPDIRECT3DDEVICE9 pDevice);
		void StyleRender (LPDIRECT3DDEVICE9 pDevice);

void DrawBox ( int x, int y , int w, int h, int PX, D3DCOLOR Hintergrund, D3DCOLOR Rahmen1, D3DCOLOR Rahmen2, IDirect3DDevice9 *pDevice);
void DrawBorder( int x, int y, int w, int h, int px, D3DCOLOR Rahmen1, D3DCOLOR Rahmen2 ,IDirect3DDevice9* pDevice ) ;
void FillRGB( int x, int y, int w, int h, D3DCOLOR meinefarbe, IDirect3DDevice9* pDevice );

};
extern class cMenu Menu;
void cMenu::Render (LPDIRECT3DDEVICE9 pDevice)
{
if (!MenuSt.Load)
{
MenuSt.x = -135;
MenuSt.y = -100 ;
MenuSt.Load = true ;
}

if (GetAsyncKeyState (VK_INSERT) &1)
	MenuSt.IsVisible = !MenuSt.IsVisible;

if (MenuSt.IsVisible)
{Menu.StyleRender (pDevice);}
}
void cMenu::DrawBox( int x, int y, int w, int h, int PX, D3DCOLOR Hintergrund, D3DCOLOR Rahmen1, D3DCOLOR Rahmen2,IDirect3DDevice9* pDevice ) 
{ 
if( !pDevice )
return;
Menu.FillRGB( x, y, w, h, Hintergrund, pDevice ); 
  Menu.DrawBorder( x, y, w, h, PX,    Rahmen1, Rahmen2, pDevice ); 
}
void cMenu::DrawBorder( int x, int y, int w, int h, int px, D3DCOLOR Rahmen1, D3DCOLOR Rahmen2 ,IDirect3DDevice9* pDevice ) 
{ if( !pDevice )
return;
 
FillRGB( x, (y + h - px), w, px,      Rahmen2, pDevice ); 
 FillRGB( x, y, px, h,                Rahmen1, pDevice ); 
 FillRGB( x, y, w, px,                Rahmen1, pDevice ); 
 FillRGB( (x + w - px), y, px, h,     Rahmen2, pDevice ); 
} 

void cMenu::FillRGB( int x, int y, int w, int h, D3DCOLOR Farbe, IDirect3DDevice9* pDevice )
{
if( !pDevice )
return;

const DWORD D3D_FVF = (D3DFVF_XYZRHW | D3DFVF_DIFFUSE);
	
struct Vertex
{
float x,y,z,ht;
DWORD meinefarbe;
}

V[4] = 
{
{(float)x		,(float)(y+h)	, 0.0f, 0.0f, Farbe},
{(float)x		,(float)y		, 0.0f, 0.0f, Farbe},
{(float)(x+w)	,(float)(y+h)	, 0.0f, 0.0f, Farbe},
{(float)(x+w)	,(float)y		, 0.0f, 0.0f, Farbe}
};
pDevice->SetTexture( 0, NULL );
pDevice->SetRenderState( D3DRS_LIGHTING, TRUE);
pDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW);
pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
pDevice->SetRenderState( D3DRS_FOGENABLE, false );
pDevice->SetFVF(D3D_FVF);
pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Vertex));
}
   

#endif
Main.cpp

Code:
#include "Includes.h"

cMain Main;
cMenu Menu;
cDetours Detours;
oPresent pPresent;
oReset pReset;
LPDIRECT3DDEVICE9 g_pDevice = 0;


int BereichItem;
long FPSCount;
long FPS;



void __cdecl cMain::PushToConsole(  char* szCommand)
{
	typedef int (__cdecl* PTC_t)(char* cmd); 
    PTC_t RCC = (PTC_t)	Cnsl_Unwrapped ;
    RCC(szCommand); 
}


















void cMain::Render(LPDIRECT3DDEVICE9 pDevice){  
if (Main.pFont != NULL )

{  
Menu.Render (pDevice);
} 
else if 
(g_pDevice !=pDevice)

g_pDevice = pDevice;
try
{
if (Main.pFont != 0)
Main.pFont->Release();
} catch (...) {}
Main.pFont = 0;
D3DXCreateFontA(pDevice, 13, 0, FW_NORMAL, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 
			PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, Font_Name, &Main.pFont);
}

 
   ////////////////Menü

void cMenu::StyleRender(LPDIRECT3DDEVICE9 pDevice)

{
GetScreenRes(pDevice);
FPSCount++;

Menu.DrawBox (Menu.MenuSt.x + 3, Menu.MenuSt.y -3, 120, 250 , 3, light_grey ,toxic, toxic , pDevice);
Main.DrawString( Menu.MenuSt.x  , Menu.MenuSt.y -33 ,white, Main.pFont, "Screen Resolution %d x %d | FPS: %d  ",ScreenX,ScreenY ,FPS);
 

	
	//////////BEREICHITEMS////////////////

 if (BereichItem==1){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +2 ,toxic, Main.pFont,  "Nx-Chams   |%d",NxChams);}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +2 ,white, Main.pFont,  "Nx-Chams   |%d",NxChams);}
 if (BereichItem==2){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +15 ,toxic, Main.pFont, "Wireframe   |%d",Wireframe);}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +15 ,white, Main.pFont, "Wireframe   |%d",Wireframe);}
if (BereichItem==3){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +32 ,toxic, Main.pFont,  "Rapidfire     |%d",Rapidfire);}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +32 ,white, Main.pFont, "Rapidfire     |%d",Rapidfire);}
 if (BereichItem==4){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +49 ,toxic, Main.pFont,  "NoWpnnrange   |%d",Weaponrange);}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +49 ,white, Main.pFont,  "NoWpnnrange   |%d",Weaponrange);}
 if (BereichItem==5){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +66 ,toxic, Main.pFont, "Superbullets   |%d",Superbullets );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +66 ,white, Main.pFont, "Superbullets   |%d",Superbullets );}
if (BereichItem==6){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +83 ,toxic, Main.pFont,  "Rapidfire    |%d",Nametags );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +83 ,white, Main.pFont, "Rapidfire      |%d",Nametags );}
if (BereichItem==7){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +100 ,toxic, Main.pFont,  "NoReload     |%d",Noreload );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +100 ,white, Main.pFont, "NoReload     |%d",Noreload );}
if (BereichItem==8){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +117 ,toxic, Main.pFont,  "ShowFps     |%d",Norecoil );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +117 ,white, Main.pFont, "ShowFps     |%d",Norecoil );}
if (BereichItem==9){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +134 ,toxic, Main.pFont,  "Test     |%d",Norecoil );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +134 ,white, Main.pFont, "Test    |%d",Norecoil );}
if (BereichItem==10){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +151 ,toxic, Main.pFont,  "NoSpread     |%d",Norecoil );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +151 ,white, Main.pFont, "NoSpread     |%d",Norecoil );}
if (BereichItem==11){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +168 ,toxic, Main.pFont,  "NoFog     |%d",Norecoil );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +168 ,white, Main.pFont, "NoFog    |%d",Norecoil );}
if (BereichItem==12){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +185 ,toxic, Main.pFont,  "Superjump     |%d",Norecoil );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +185 ,white, Main.pFont, "Superjump    |%d",Norecoil );}
if (BereichItem==13){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +202 ,toxic, Main.pFont,  "Removals    |%d",Norecoil );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +202 ,white, Main.pFont, "Removals    |%d",Norecoil );}


////////////////



if (BereichItem==1){
if ((GetAsyncKeyState (VK_RIGHT)))
NxChams=true;
if ((GetAsyncKeyState (VK_LEFT)))
NxChams=false; }

if (BereichItem==2){
if ((GetAsyncKeyState (VK_RIGHT)))
Wireframe=true;
if ((GetAsyncKeyState (VK_LEFT)))
Wireframe=false; }

if (BereichItem==3){
if ((GetAsyncKeyState (VK_RIGHT)))
Rapidfire=true;
if ((GetAsyncKeyState (VK_LEFT)))
Rapidfire=false; }


if (BereichItem==4){
if ((GetAsyncKeyState (VK_RIGHT)))
Weaponrange=true;
if ((GetAsyncKeyState (VK_LEFT)))
Weaponrange=false; }

if (BereichItem==5){
if ((GetAsyncKeyState (VK_RIGHT)))
Superbullets=true;
if ((GetAsyncKeyState (VK_LEFT)))
Superbullets=false; }

if (BereichItem==6){
if ((GetAsyncKeyState (VK_RIGHT)))
Rapidfire=true;
if ((GetAsyncKeyState (VK_LEFT)))
Rapidfire=false; }

if (BereichItem==7){
if ((GetAsyncKeyState (VK_RIGHT)))
Noreload=true;
if ((GetAsyncKeyState (VK_LEFT)))
Noreload=false; }

if (BereichItem==8){
if ((GetAsyncKeyState (VK_RIGHT)))
ShowFPS=true;
if ((GetAsyncKeyState (VK_LEFT)))
ShowFPS=false; }

if (BereichItem==9){
if ((GetAsyncKeyState (VK_RIGHT)))
Rapidfire=true;
if ((GetAsyncKeyState (VK_LEFT)))
Rapidfire=false; }

if (BereichItem==10){
if ((GetAsyncKeyState (VK_RIGHT)))
Nospread=true;
if ((GetAsyncKeyState (VK_LEFT)))
Nospread=false; }

if (BereichItem==11){
if ((GetAsyncKeyState (VK_RIGHT)))
nofog=true;
if ((GetAsyncKeyState (VK_LEFT)))
nofog=false; }

if (BereichItem==12){
if ((GetAsyncKeyState (VK_RIGHT)))
superjump=true;
if ((GetAsyncKeyState (VK_LEFT)))
superjump=false; }

if (BereichItem==13){
if ((GetAsyncKeyState (VK_RIGHT)))
removals=true;
if ((GetAsyncKeyState (VK_LEFT)))
removals=false; }



////////
if (GetAsyncKeyState (VK_UP)&1){
	BereichItem -- ; }
if (GetAsyncKeyState (VK_DOWN)&1){
	BereichItem ++ ;}
////
if (BereichItem <= 0){
	BereichItem = 13;}

if (BereichItem >= 14){
	BereichItem =1;}

}









HRESULT WINAPI MyPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT *pSourceRect, 
						   CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
{
if (NxChams==true){
		           //On
   cMain::PushToConsole("SkelModelStencil 1");
	}else{ if ((NxChams==true)&&(GetAsyncKeyState (VK_LEFT))) {
             //Off
    cMain::PushToConsole("SkelModelStencil 0");
	}}
if (Wireframe==true){
		           //On
   cMain::PushToConsole("WireFrame 1");
	}else{ if ((Wireframe==true)&&(GetAsyncKeyState (VK_LEFT))) {
             //Off
    cMain::PushToConsole("WireFrame 0");
	}}
	
	if (ShowFPS==true){
		           //On
   cMain::PushToConsole("ShowFps 1");
	}else{ if ((ShowFPS==true)&&(GetAsyncKeyState (VK_LEFT))) {
             //Off
    cMain::PushToConsole("ShowFps 0");
	}}
	
	if (Nospread==true){
		           //On
     cMain::PushToConsole("PerturbRotationEffect  0.000000");
	 cMain::PushToConsole("PerturbIncreaseSpeed 0.000000");
	 cMain::PushToConsole("PerturbWalkPercent 0.000000 ");
	 cMain::PushToConsole("PerturbFiringIncreaseSpeed 0.000000");
	 cMain::PushToConsole("PerturbRecoil 0.000000");
	 cMain::PushToConsole("FireMovePerturb 0.000000");
     cMain::PushToConsole("ZoomedFireMoveDuckPerturb 0.000000");
     cMain::PushToConsole("ZoomedFireMovePerturb 0.000000");
     cMain::PushToConsole("ZoomedFireDuckPerturb 0.000000");

	}else{ if ((Nospread==true)&&(GetAsyncKeyState (VK_LEFT))) {
             //Off
     cMain::PushToConsole("PerturbRotationEffect 3.000000");
	 cMain::PushToConsole("PerturbIncreaseSpeed 3.000000");
	 cMain::PushToConsole("PerturbWalkPercent 9.000000 ");
	 cMain::PushToConsole("PerturbFiringIncreaseSpeed 0.500000");
	 cMain::PushToConsole("PerturbRecoil 9.000000");
	 cMain::PushToConsole("FireMovePerturb 9.000000");
     cMain::PushToConsole("ZoomedFireMoveDuckPerturb 9.000000");
     cMain::PushToConsole("ZoomedFireMovePerturb 9.000000");
     cMain::PushToConsole("ZoomedFireDuckPerturb 9.000000");
	}}
	
	if (removals==true){
		           //On
cMain::PushToConsole ("DynamicLight 0");
cMain::PushToConsole ("EnableWeatherFX 0 ");
cMain::PushToConsole ("MuzzleLight 0 ");
cMain::PushToConsole ("SnowEnable 0 ");
cMain::PushToConsole ("CamDamage 0 ");
cMain::PushToConsole ("ModelApplySun 0" );
cMain::PushToConsole ("ClientFXDetailLevel 0" );
cMain::PushToConsole ("ModelShadow_Proj_Enable 0" );
cMain::PushToConsole ("DebrisFXLevel 0 ");
cMain::PushToConsole ("ScatterEnable 0 ");
cMain::PushToConsole ("modelshadow_proj_blurenable 0 ");
cMain::PushToConsole ("DrawAllModelShadows 0 ");
cMain::PushToConsole ("ModelShadow_Proj_MinColorComponent 0" );
cMain::PushToConsole ("ModelShadow_Proj_MaxProjDist 0 ");
	}else{ if ((removals==true)&&(GetAsyncKeyState (VK_LEFT))) {
             //Off
    cMain::PushToConsole ("DynamicLight 1");
cMain::PushToConsole ("EnableWeatherFX 1 ");
cMain::PushToConsole ("MuzzleLight 1 ");
cMain::PushToConsole ("SnowEnable 1 ");
cMain::PushToConsole ("CamDamage 1 ");
cMain::PushToConsole ("ModelApplySun 1" );
cMain::PushToConsole ("ClientFXDetailLevel 1" );
cMain::PushToConsole ("ModelShadow_Proj_Enable 1" );
cMain::PushToConsole ("DebrisFXLevel 1 ");
cMain::PushToConsole ("ScatterEnable 1 ");
cMain::PushToConsole ("modelshadow_proj_blurenable 1 ");
cMain::PushToConsole ("DrawAllModelShadows 1 ");
cMain::PushToConsole ("ModelShadow_Proj_MinColorComponent 1" );
cMain::PushToConsole ("ModelShadow_Proj_MaxProjDist 1 ");
	}}
	
		if (superjump==true){
		           //On
   cMain::PushToConsole("JumpVel 900.000000");
	}else{ if ((superjump==true)&&(GetAsyncKeyState (VK_LEFT))) {
             //Off
    cMain::PushToConsole("JumpVel 300.000000");
	}}
	
	
	
	
	
	
	
	if (Weaponrange==true){
		           //On
    memcpy( (PBYTE)WeaponRange1, (PBYTE)"\xB8\x00\x00\x00\x10\x90", 6 );
    memcpy( (PBYTE)WeaponRange2, (PBYTE)"\xB8\x00\x00\x00\x10\x90", 6 );
	}else{ if ((Weaponrange==true)&&(GetAsyncKeyState (VK_LEFT))) {
             //Off
    memcpy( (PBYTE)WeaponRange1, (PBYTE)"\x8B\x80\xC8\x02\x00\x00", 6 ); 
	memcpy( (PBYTE)WeaponRange2, (PBYTE)"\x8B\x80\xC8\x02\x00\x00", 6 );
	}}

	if (Superbullets==true){
		 //On
    memcpy( (PBYTE)SuperBullets, (PBYTE)"\x90\x90\x90", 3);
	}else{if ((Superbullets==true) &&(GetAsyncKeyState (VK_LEFT))){
            //Off
			memcpy( (PBYTE)SuperBullets, (PBYTE)"\x0F\x94\xC0", 3);
	}}

	if ((Rapidfire==true)&& (GetAsyncKeyState (VK_LBUTTON))){
		//On
memcpy((VOID *)RapidFire, (VOID *)(PBYTE)"\x90\x90", 2);

	}else{if ((Rapidfire==true)&&(GetAsyncKeyState (VK_LEFT))){
//Off
memcpy((VOID *)RapidFire, (VOID *)(PBYTE)"\x74\x3E", 2);
	}}





	if (Menu.MenuSt.y <= 35 && Menu.MenuSt.IsVisible==1 )
	{	Menu.MenuSt.y += 2; 
	Menu.MenuSt.x += 2; }
	if (Menu.MenuSt.y >= 35 && Menu.MenuSt.IsVisible==0 )
	{ Menu.MenuSt.y = -100; 
	Menu.MenuSt.x = -135;} 
	pDevice->SetTexture( NULL, NULL );
	pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, D3DZB_TRUE );
	pDevice->SetFVF( D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1 );
	pDevice->SetRenderState( D3DRS_FOGENABLE, false );
	pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
	Main.Render(pDevice);                                              //
	pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_TRUE );
    pDevice->SetTexture(0, NULL); 
	return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);

}



HRESULT WINAPI MyReset(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
{
	Main.pFont->OnLostDevice();
	HRESULT hRet = pReset(pDevice, pPresentationParameters);
	if(SUCCEEDED(hRet))
	Main.pFont->OnResetDevice();
	return pReset(pDevice, pPresentationParameters);
}


DWORD WINAPI GetFPS(LPVOID lpParam)
{
 while(true)
 {
 FPS = FPSCount;
 FPSCount=0;
 Sleep(1000);
 }
}




DWORD WINAPI dwHookThread(LPVOID)
{
while(!Main.HookReady())
Sleep(25);

Main.Hook();
return EXIT_SUCCESS;
}
//////////DLLMAIN
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == 1 )
//MessageBoxA( NULL, "Waiting for Olly... ","Dump-Helper", NULL );
CreateThread(NULL, NULL,dwHookThread, NULL, NULL, NULL); 
CreateThread(NULL, NULL,GetFPS, NULL, NULL, NULL);
 	
return TRUE;
}
//////
void cMain::DrawString(int x, int y, DWORD color, LPD3DXFONT g_pFont, const char *fmt, ...) 
{
if(!g_pFont)
return;

RECT FontPos = { x, y, x + 120, y + 16 };
char buf[1024] = {'\0'};
va_list va_alist;

va_start(va_alist, fmt);
vsprintf_s(buf, fmt, va_alist);
va_end(va_alist);

g_pFont->DrawTextA(NULL, buf, -1, &FontPos, DT_NOCLIP, color);
}

bool cMain::bDataCompare(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 cMain::FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask) 
{ 
for(DWORD i=0; i < dwLen; i++) 
if(Main.bDataCompare( (BYTE*)( dwAddress+i ),bMask,szMask) ) 
return (DWORD)(dwAddress+i); 

return 0; 
}



bool cMain::HookReady()
{
if( GetModuleHandleA( "d3d9.dll"     ) != NULL)
return true;
return false;
}

DWORD GetPointerII(int index)
{
/*Find yourself :P*/
}
DWORD * FindDevice(VOID)
{
 /*Find yourself :P*/
} 

void cMain::Hook() 
{
/*Find yourself :P*/

pReset = (oReset)/*Find yourself :P*/((DWORD)VTable[16],(DWORD)MyReset, Len_size);
pPresent = (oPresent)/*Find yourself :P*/((DWORD)VTable[17],(DWORD)MyPresent, Len_size);

	

}

ADE32.cpp

Code:
// ADE32 version 2.02c -- C edition
//Credits to Z0mbie

#define WIN32_LEAN_AND_MEAN
#define WIN32_EXTRA_LEAN

#include <windows.h>

#include "ADE32.h"

DWORD ade32_table[512] = {
/* 00 */  C_MODRM,
/* 01 */  C_MODRM,
/* 02 */  C_MODRM,
/* 03 */  C_MODRM,
/* 04 */  C_DATA1,
/* 05 */  C_DATA66,
/* 06 */  C_BAD,
/* 07 */  C_BAD,
/* 08 */  C_MODRM,
/* 09 */  C_MODRM,
/* 0A */  C_MODRM,
/* 0B */  C_MODRM,
/* 0C */  C_DATA1,
/* 0D */  C_DATA66,
/* 0E */  C_BAD,
/* 0F */  C_OPCODE2,
/* 10 */  C_MODRM+C_BAD,
/* 11 */  C_MODRM,
/* 12 */  C_MODRM+C_BAD,
/* 13 */  C_MODRM,
/* 14 */  C_DATA1+C_BAD,
/* 15 */  C_DATA66+C_BAD,
/* 16 */  C_BAD,
/* 17 */  C_BAD,
/* 18 */  C_MODRM+C_BAD,
/* 19 */  C_MODRM,
/* 1A */  C_MODRM,
/* 1B */  C_MODRM,
/* 1C */  C_DATA1+C_BAD,
/* 1D */  C_DATA66+C_BAD,
/* 1E */  C_BAD,
/* 1F */  C_BAD,
/* 20 */  C_MODRM,
/* 21 */  C_MODRM,
/* 22 */  C_MODRM,
/* 23 */  C_MODRM,
/* 24 */  C_DATA1,
/* 25 */  C_DATA66,
/* 26 */  C_SEG+C_BAD,
/* 27 */  C_BAD,
/* 28 */  C_MODRM,
/* 29 */  C_MODRM,
/* 2A */  C_MODRM,
/* 2B */  C_MODRM,
/* 2C */  C_DATA1,
/* 2D */  C_DATA66,
/* 2E */  C_SEG+C_BAD,
/* 2F */  C_BAD,
/* 30 */  C_MODRM,
/* 31 */  C_MODRM,
/* 32 */  C_MODRM,
/* 33 */  C_MODRM,
/* 34 */  C_DATA1,
/* 35 */  C_DATA66,
/* 36 */  C_SEG+C_BAD,
/* 37 */  C_BAD,
/* 38 */  C_MODRM,
/* 39 */  C_MODRM,
/* 3A */  C_MODRM,
/* 3B */  C_MODRM,
/* 3C */  C_DATA1,
/* 3D */  C_DATA66,
/* 3E */  C_SEG+C_BAD,
/* 3F */  C_BAD,
/* 40 */  0,
/* 41 */  0,
/* 42 */  0,
/* 43 */  0,
/* 44 */  C_BAD,
/* 45 */  0,
/* 46 */  0,
/* 47 */  0,
/* 48 */  0,
/* 49 */  0,
/* 4A */  0,
/* 4B */  0,
/* 4C */  C_BAD,
/* 4D */  0,
/* 4E */  0,
/* 4F */  0,
/* 50 */  0,
/* 51 */  0,
/* 52 */  0,
/* 53 */  0,
/* 54 */  0,
/* 55 */  0,
/* 56 */  0,
/* 57 */  0,
/* 58 */  0,
/* 59 */  0,
/* 5A */  0,
/* 5B */  0,
/* 5C */  C_BAD,
/* 5D */  0,
/* 5E */  0,
/* 5F */  0,
/* 60 */  C_BAD,
/* 61 */  C_BAD,
/* 62 */  C_MODRM+C_BAD,
/* 63 */  C_MODRM+C_BAD,
/* 64 */  C_SEG,
/* 65 */  C_SEG+C_BAD,
/* 66 */  C_66,
/* 67 */  C_67,
/* 68 */  C_DATA66,
/* 69 */  C_MODRM+C_DATA66,
/* 6A */  C_DATA1,
/* 6B */  C_MODRM+C_DATA1,
/* 6C */  C_BAD,
/* 6D */  C_BAD,
/* 6E */  C_BAD,
/* 6F */  C_BAD,
/* 70 */  C_DATA1+C_REL+C_BAD,
/* 71 */  C_DATA1+C_REL+C_BAD,
/* 72 */  C_DATA1+C_REL,
/* 73 */  C_DATA1+C_REL,
/* 74 */  C_DATA1+C_REL,
/* 75 */  C_DATA1+C_REL,
/* 76 */  C_DATA1+C_REL,
/* 77 */  C_DATA1+C_REL,
/* 78 */  C_DATA1+C_REL,
/* 79 */  C_DATA1+C_REL,
/* 7A */  C_DATA1+C_REL+C_BAD,
/* 7B */  C_DATA1+C_REL+C_BAD,
/* 7C */  C_DATA1+C_REL,
/* 7D */  C_DATA1+C_REL,
/* 7E */  C_DATA1+C_REL,
/* 7F */  C_DATA1+C_REL,
/* 80 */  C_MODRM+C_DATA1,
/* 81 */  C_MODRM+C_DATA66,
/* 82 */  C_MODRM+C_DATA1+C_BAD,
/* 83 */  C_MODRM+C_DATA1,
/* 84 */  C_MODRM,
/* 85 */  C_MODRM,
/* 86 */  C_MODRM,
/* 87 */  C_MODRM,
/* 88 */  C_MODRM,
/* 89 */  C_MODRM,
/* 8A */  C_MODRM,
/* 8B */  C_MODRM,
/* 8C */  C_MODRM+C_BAD,
/* 8D */  C_MODRM,
/* 8E */  C_MODRM+C_BAD,
/* 8F */  C_MODRM,
/* 90 */  0,
/* 91 */  0,
/* 92 */  0,
/* 93 */  C_BAD,
/* 94 */  C_BAD,
/* 95 */  C_BAD,
/* 96 */  C_BAD,
/* 97 */  C_BAD,
/* 98 */  C_BAD,
/* 99 */  0,
/* 9A */  C_DATA66+C_DATA2+C_BAD,
/* 9B */  0,
/* 9C */  C_BAD,
/* 9D */  C_BAD,
/* 9E */  C_BAD,
/* 9F */  C_BAD,
/* A0 */  C_ADDR67,
/* A1 */  C_ADDR67,
/* A2 */  C_ADDR67,
/* A3 */  C_ADDR67,
/* A4 */  0,
/* A5 */  0,
/* A6 */  0,
/* A7 */  0,
/* A8 */  C_DATA1,
/* A9 */  C_DATA66,
/* AA */  0,
/* AB */  0,
/* AC */  0,
/* AD */  C_BAD,
/* AE */  0,
/* AF */  C_BAD,
/* B0 */  C_DATA1,
/* B1 */  C_DATA1,
/* B2 */  C_DATA1,
/* B3 */  C_DATA1,
/* B4 */  C_DATA1,
/* B5 */  C_DATA1,
/* B6 */  C_DATA1+C_BAD,
/* B7 */  C_DATA1+C_BAD,
/* B8 */  C_DATA66,
/* B9 */  C_DATA66,
/* BA */  C_DATA66,
/* BB */  C_DATA66,
/* BC */  C_DATA66+C_BAD,
/* BD */  C_DATA66,
/* BE */  C_DATA66,
/* BF */  C_DATA66,
/* C0 */  C_MODRM+C_DATA1,
/* C1 */  C_MODRM+C_DATA1,
/* C2 */  C_DATA2+C_STOP,
/* C3 */  C_STOP,
/* C4 */  C_MODRM+C_BAD,
/* C5 */  C_MODRM+C_BAD,
/* C6 */  C_MODRM+C_DATA1,
/* C7 */  C_MODRM+C_DATA66,
/* C8 */  C_DATA2+C_DATA1,
/* C9 */  0,
/* CA */  C_DATA2+C_STOP+C_BAD,
/* CB */  C_STOP+C_BAD,
/* CC */  C_BAD,
/* CD */  C_BAD,
/* CE */  C_BAD,
/* CF */  C_STOP+C_BAD,
/* D0 */  C_MODRM,
/* D1 */  C_MODRM,
/* D2 */  C_MODRM,
/* D3 */  C_MODRM,
/* D4 */  C_DATA1+C_BAD,
/* D5 */  C_DATA1+C_BAD,
/* D6 */  C_BAD,
/* D7 */  C_BAD,
/* D8 */  C_MODRM,
/* D9 */  C_MODRM,
/* DA */  C_MODRM,
/* DB */  C_MODRM,
/* DC */  C_MODRM,
/* DD */  C_MODRM,
/* DE */  C_MODRM,
/* DF */  C_MODRM,
/* E0 */  C_DATA1+C_REL+C_BAD,
/* E1 */  C_DATA1+C_REL+C_BAD,
/* E2 */  C_DATA1+C_REL,
/* E3 */  C_DATA1+C_REL,
/* E4 */  C_DATA1+C_BAD,
/* E5 */  C_DATA1+C_BAD,
/* E6 */  C_DATA1+C_BAD,
/* E7 */  C_DATA1+C_BAD,
/* E8 */  C_DATA66+C_REL,
/* E9 */  C_DATA66+C_REL+C_STOP,
/* EA */  C_DATA66+C_DATA2+C_BAD,
/* EB */  C_DATA1+C_REL+C_STOP,
/* EC */  C_BAD,
/* ED */  C_BAD,
/* EE */  C_BAD,
/* EF */  C_BAD,
/* F0 */  C_LOCK+C_BAD,
/* F1 */  C_BAD,
/* F2 */  C_REP,
/* F3 */  C_REP,
/* F4 */  C_BAD,
/* F5 */  C_BAD,
/* F6 */  C_MODRM,
/* F7 */  C_MODRM,
/* F8 */  0,
/* F9 */  0,
/* FA */  C_BAD,
/* FB */  C_BAD,
/* FC */  0,
/* FD */  0,
/* FE */  C_MODRM,
/* FF */  C_MODRM,
/* 00 */  C_MODRM,
/* 01 */  C_MODRM,
/* 02 */  C_MODRM,
/* 03 */  C_MODRM,
/* 04 */  C_ERROR,
/* 05 */  C_ERROR,
/* 06 */  0,
/* 07 */  C_ERROR,
/* 08 */  0,
/* 09 */  0,
/* 0A */  0,
/* 0B */  0,
/* 0C */  C_ERROR,
/* 0D */  C_ERROR,
/* 0E */  C_ERROR,
/* 0F */  C_ERROR,
/* 10 */  C_ERROR,
/* 11 */  C_ERROR,
/* 12 */  C_ERROR,
/* 13 */  C_ERROR,
/* 14 */  C_ERROR,
/* 15 */  C_ERROR,
/* 16 */  C_ERROR,
/* 17 */  C_ERROR,
/* 18 */  C_ERROR,
/* 19 */  C_ERROR,
/* 1A */  C_ERROR,
/* 1B */  C_ERROR,
/* 1C */  C_ERROR,
/* 1D */  C_ERROR,
/* 1E */  C_ERROR,
/* 1F */  C_ERROR,
/* 20 */  C_ERROR,
/* 21 */  C_ERROR,
/* 22 */  C_ERROR,
/* 23 */  C_ERROR,
/* 24 */  C_ERROR,
/* 25 */  C_ERROR,
/* 26 */  C_ERROR,
/* 27 */  C_ERROR,
/* 28 */  C_ERROR,
/* 29 */  C_ERROR,
/* 2A */  C_ERROR,
/* 2B */  C_ERROR,
/* 2C */  C_ERROR,
/* 2D */  C_ERROR,
/* 2E */  C_ERROR,
/* 2F */  C_ERROR,
/* 30 */  C_ERROR,
/* 31 */  C_ERROR,
/* 32 */  C_ERROR,
/* 33 */  C_ERROR,
/* 34 */  C_ERROR,
/* 35 */  C_ERROR,
/* 36 */  C_ERROR,
/* 37 */  C_ERROR,
/* 38 */  C_ERROR,
/* 39 */  C_ERROR,
/* 3A */  C_ERROR,
/* 3B */  C_ERROR,
/* 3C */  C_ERROR,
/* 3D */  C_ERROR,
/* 3E */  C_ERROR,
/* 3F */  C_ERROR,
/* 40 */  C_ERROR,
/* 41 */  C_ERROR,
/* 42 */  C_ERROR,
/* 43 */  C_ERROR,
/* 44 */  C_ERROR,
/* 45 */  C_ERROR,
/* 46 */  C_ERROR,
/* 47 */  C_ERROR,
/* 48 */  C_ERROR,
/* 49 */  C_ERROR,
/* 4A */  C_ERROR,
/* 4B */  C_ERROR,
/* 4C */  C_ERROR,
/* 4D */  C_ERROR,
/* 4E */  C_ERROR,
/* 4F */  C_ERROR,
/* 50 */  C_ERROR,
/* 51 */  C_ERROR,
/* 52 */  C_ERROR,
/* 53 */  C_ERROR,
/* 54 */  C_ERROR,
/* 55 */  C_ERROR,
/* 56 */  C_ERROR,
/* 57 */  C_ERROR,
/* 58 */  C_ERROR,
/* 59 */  C_ERROR,
/* 5A */  C_ERROR,
/* 5B */  C_ERROR,
/* 5C */  C_ERROR,
/* 5D */  C_ERROR,
/* 5E */  C_ERROR,
/* 5F */  C_ERROR,
/* 60 */  C_ERROR,
/* 61 */  C_ERROR,
/* 62 */  C_ERROR,
/* 63 */  C_ERROR,
/* 64 */  C_ERROR,
/* 65 */  C_ERROR,
/* 66 */  C_ERROR,
/* 67 */  C_ERROR,
/* 68 */  C_ERROR,
/* 69 */  C_ERROR,
/* 6A */  C_ERROR,
/* 6B */  C_ERROR,
/* 6C */  C_ERROR,
/* 6D */  C_ERROR,
/* 6E */  C_ERROR,
/* 6F */  C_ERROR,
/* 70 */  C_ERROR,
/* 71 */  C_ERROR,
/* 72 */  C_ERROR,
/* 73 */  C_ERROR,
/* 74 */  C_ERROR,
/* 75 */  C_ERROR,
/* 76 */  C_ERROR,
/* 77 */  C_ERROR,
/* 78 */  C_ERROR,
/* 79 */  C_ERROR,
/* 7A */  C_ERROR,
/* 7B */  C_ERROR,
/* 7C */  C_ERROR,
/* 7D */  C_ERROR,
/* 7E */  C_ERROR,
/* 7F */  C_ERROR,
/* 80 */  C_DATA66+C_REL,
/* 81 */  C_DATA66+C_REL,
/* 82 */  C_DATA66+C_REL,
/* 83 */  C_DATA66+C_REL,
/* 84 */  C_DATA66+C_REL,
/* 85 */  C_DATA66+C_REL,
/* 86 */  C_DATA66+C_REL,
/* 87 */  C_DATA66+C_REL,
/* 88 */  C_DATA66+C_REL,
/* 89 */  C_DATA66+C_REL,
/* 8A */  C_DATA66+C_REL,
/* 8B */  C_DATA66+C_REL,
/* 8C */  C_DATA66+C_REL,
/* 8D */  C_DATA66+C_REL,
/* 8E */  C_DATA66+C_REL,
/* 8F */  C_DATA66+C_REL,
/* 90 */  C_MODRM,
/* 91 */  C_MODRM,
/* 92 */  C_MODRM,
/* 93 */  C_MODRM,
/* 94 */  C_MODRM,
/* 95 */  C_MODRM,
/* 96 */  C_MODRM,
/* 97 */  C_MODRM,
/* 98 */  C_MODRM,
/* 99 */  C_MODRM,
/* 9A */  C_MODRM,
/* 9B */  C_MODRM,
/* 9C */  C_MODRM,
/* 9D */  C_MODRM,
/* 9E */  C_MODRM,
/* 9F */  C_MODRM,
/* A0 */  0,
/* A1 */  0,
/* A2 */  0,
/* A3 */  C_MODRM,
/* A4 */  C_MODRM+C_DATA1,
/* A5 */  C_MODRM,
/* A6 */  C_ERROR,
/* A7 */  C_ERROR,
/* A8 */  0,
/* A9 */  0,
/* AA */  0,
/* AB */  C_MODRM,
/* AC */  C_MODRM+C_DATA1,
/* AD */  C_MODRM,
/* AE */  C_ERROR,
/* AF */  C_MODRM,
/* B0 */  C_MODRM,
/* B1 */  C_MODRM,
/* B2 */  C_MODRM,
/* B3 */  C_MODRM,
/* B4 */  C_MODRM,
/* B5 */  C_MODRM,
/* B6 */  C_MODRM,
/* B7 */  C_MODRM,
/* B8 */  C_ERROR,
/* B9 */  C_ERROR,
/* BA */  C_MODRM+C_DATA1,
/* BB */  C_MODRM,
/* BC */  C_MODRM,
/* BD */  C_MODRM,
/* BE */  C_MODRM,
/* BF */  C_MODRM,
/* C0 */  C_MODRM,
/* C1 */  C_MODRM,
/* C2 */  C_ERROR,
/* C3 */  C_ERROR,
/* C4 */  C_ERROR,
/* C5 */  C_ERROR,
/* C6 */  C_ERROR,
/* C7 */  C_ERROR,
/* C8 */  0,
/* C9 */  0,
/* CA */  0,
/* CB */  0,
/* CC */  0,
/* CD */  C_DATA1,
/* CE */  0,
/* CF */  0,
/* D0 */  C_ERROR,
/* D1 */  C_ERROR,
/* D2 */  C_ERROR,
/* D3 */  C_ERROR,
/* D4 */  C_ERROR,
/* D5 */  C_ERROR,
/* D6 */  C_ERROR,
/* D7 */  C_ERROR,
/* D8 */  C_ERROR,
/* D9 */  C_ERROR,
/* DA */  C_ERROR,
/* DB */  C_ERROR,
/* DC */  C_ERROR,
/* DD */  C_ERROR,
/* DE */  C_ERROR,
/* DF */  C_ERROR,
/* E0 */  C_ERROR,
/* E1 */  C_ERROR,
/* E2 */  C_ERROR,
/* E3 */  C_ERROR,
/* E4 */  C_ERROR,
/* E5 */  C_ERROR,
/* E6 */  C_ERROR,
/* E7 */  C_ERROR,
/* E8 */  C_ERROR,
/* E9 */  C_ERROR,
/* EA */  C_ERROR,
/* EB */  C_ERROR,
/* EC */  C_ERROR,
/* ED */  C_ERROR,
/* EE */  C_ERROR,
/* EF */  C_ERROR,
/* F0 */  C_ERROR,
/* F1 */  C_ERROR,
/* F2 */  C_ERROR,
/* F3 */  C_ERROR,
/* F4 */  C_ERROR,
/* F5 */  C_ERROR,
/* F6 */  C_ERROR,
/* F7 */  C_ERROR,
/* F8 */  C_ERROR,
/* F9 */  C_ERROR,
/* FA */  C_ERROR,
/* FB */  C_ERROR,
/* FC */  C_ERROR,
/* FD */  C_ERROR,
/* FE */  C_ERROR,
/* FF */  C_ERROR
}; // ade32_table[]


//Find yourself :P
ADE32.h

Code:
// ADE32 v2.02c by z0mbie


#ifndef __ADE32_H__
#define __ADE32_H__

#define C_ERROR		0xFFFFFFFF
#define C_ADDR1		0x00000001
#define C_ADDR2		0x00000002
#define C_ADDR4		0x00000004
#define C_LOCK		0x00000008
#define C_67		0x00000010
#define C_66		0x00000020
#define C_REP		0x00000040
#define C_SEG		0x00000080
#define C_ANYPREFIX	(C_66+C_67+C_LOCK+C_REP+C_SEG)
#define C_DATA1		0x00000100
#define C_DATA2		0x00000200
#define C_DATA4		0x00000400
#define C_SIB		0x00000800
#define C_ADDR67	0x00001000
#define C_DATA66	0x00002000
#define C_MODRM		0x00004000
#define C_BAD		0x00008000
#define C_OPCODE2	0x00010000
#define C_REL		0x00020000
#define C_STOP		0x00040000

#pragma pack(push)
#pragma pack(1)

//find out yourself
#endif // __ADE32_H__

Strings and Boxes By Haxo

I know messy Coding , but this is about 8 month's old , i just updated it for you

It is the first base i nearly coded completely alone

big thx to @kvn for teaching me ALOT C++ and reversing

im sorry but i didnt understand your ptc code
it doesnt make sense from what i understand
but if you can explain or there is a missing code ill appreceate that
ptc fully works

there is no missing ptc code
umm ok then so the addies u gave us are up to date or not ?
because if they are uptodate i did anything correctly but still it doesnt work :S
You cut out the detours?
No wonder why it isnt working...
yes i dropped that,
as far as i know it should work without the bases u all published but i am wrong
so ill took a look on Hans & Gellins Base Combined and it wont work with the base u published so i have to fill the code by myself
or to find another base
well ty anyway
well then i think i am not desiered to make hacks even simples
anyway can u just tell me why the ptc wont work without detour, because as far as i know u just push the command to the stack and call to the address of the function.
so basically it should work but why its not working and the detour is needed

if u want to explain ill apreceate it, and tnx for the help till now
nothin works without detours


Ca wont "start" your code
i understand that i dont understand why
if someone will have spare time to tell me then ill be glad
but ty anyway
Any SS?
Quote Originally Posted by Reflex- View Post
Any SS?




Quote Originally Posted by wraithkilla View Post
Includes.h

Code:
#ifndef _Includes

#include <tchar.h>
#include <windows.h>
#include <stdio.h>
#include <d3dx9.h>
#include <malloc.h>
#include "ADE32.h"  


//Farben


bool NxChams=false; //
bool Wireframe=false; //
bool Rapidfire=false;//
bool Nametags =false;//
bool Weaponrange=false; //
bool Superbullets=false; //
bool Noreload =false;//
bool Norecoil =false;//
bool ShowFPS=false; //
bool Nospread=false; //
bool Stats=false;
bool nofog=false; //
bool playerwireframe=false;
bool skeleton=false;
bool superjump=false;//
bool weaponsway=false;
bool removals=false; //




#define black 0xFF000000
#define toxic 0xFF008B00
#define light_grey 0xAA757575
#define light_white 0xFFFCFCFC
#define white 0xFFFFFFFF
//Addys
/////*#define console1    
////#define console2 */ 
#define Cnsl_Unwrapped  0x485FC0
#define RapidFire 0x37425B35
#define WeaponRange1 0x374250B9
#define WeaponRange2 0x37425439
#define SuperBullets 0x3741FA5D 
#define NameTags1 0x372FCDC9
#define NameTags2 0x372FCE4F	
#define NoReload 0x37424E34
#define NoRecoil 0x373AB1BC
#define ptc_check1 0x0046FBDB //\x72 \x0E   //OLD 
#define ptc_check2 0x0046FBE4 //\x73 \x05   /OLD 
#define GAMESTATUS 0x377F4EFC


//#define
//#define
//#define
//#define
//#define
//#define
//#define
//#define






//Includes
#define WIN32_LEAN_AND_MEAN
#define WIN32_EXTRA_LEAN



//using namespace std;
#pragma comment (lib, "d3dx9")
#pragma comment (lib, "d3d9")
#pragma once 

typedef HRESULT (WINAPI* oPresent)(LPDIRECT3DDEVICE9 pDevice, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion);
typedef HRESULT (WINAPI* oReset)(LPDIRECT3DDEVICE9 pDevice,D3DPRESENT_PARAMETERS* Parametri);

#define D3D9_Name L"d3d9.dll"
#define  Font_Name "Verdana"   ///////
#define Reset     16
#define Present   17


#define Len_size 12
#define _Menu
#define _Main
long ScreenX;
long ScreenY;

void GetScreenRes(LPDIRECT3DDEVICE9 pDevice)
{
D3DVIEWPORT9 gViewPort;
pDevice->GetViewport(&gViewPort);
ScreenX = ( long )gViewPort.Width;
ScreenY = ( long )gViewPort.Height;
}


class cDetours
{
	public:
		/*Find yourself :P*/
		static LPVOID DetourCreate ( BYTE *orig, const BYTE *det, int iPatchType);
		/*Find yourself :P*/
};




//INT GetDetourLenAuto(PBYTE &pbFuncOrig,INT minDetLen);
/*Find yourself :P*/
//}




//INT cDetours::GetDetourLenAuto(PBYTE &pbFuncOrig,INT minDetLen)
//{
/*Find yourself :P*/
//}

#define JUNK_CODE             \
    __asm{push eax}            \
    __asm{xor eax, eax}        \
    __asm{setpo al}            \
    __asm{push edx}            \
    __asm{xor edx, eax}        \
    __asm{sal edx, 2}          \
    __asm{xchg eax, edx}       \
    __asm{pop edx}             \
    __asm{or eax, ecx}         \
    __asm{pop eax}



void* cDetours::memcpy_s( void* pvAddress, const void* pvBuffer, size_t stLen )
{
/*Find yourself :P*/
}
DWORD cDetours::DetourCreateE9( DWORD  SrcVA, DWORD  DstVA, DWORD  Size )
{

/*Find yourself :P*/
}

DWORD cDetours::CreateJMP_REL( DWORD  SrcVA, DWORD  DstVA, DWORD  Size )
{
	/*Find yourself :P*/
}



extern class cHook Hook;

class cMain
{
public: 
LPD3DXFONT pFont;
LPDIRECT3DDEVICE9 pDevice;
static void __cdecl PushToConsole( char* szCommand);
static void *DetourCreate (BYTE * src, const BYTE *dst, const int len);
bool bDataCompare(const BYTE* pData, const BYTE* bMask, const char* szMask); // 
DWORD FindPattern (DWORD dwAdress, DWORD dwLen, BYTE *bMask, char *szMask);
bool HookReady();//
void DrawString (int x, int y, DWORD color, LPD3DXFONT g_pFont, const char *fmt, ...);
void Render ( LPDIRECT3DDEVICE9 pDevice);
void Hook();
};

extern class cMain Main;

struct MenuSt_t
{
int x, y ;
	
bool IsVisible, Load;
};

class cMenu
{
public:
	MenuSt_t MenuSt;
	void Render (LPDIRECT3DDEVICE9 pDevice);
		void StyleRender (LPDIRECT3DDEVICE9 pDevice);

void DrawBox ( int x, int y , int w, int h, int PX, D3DCOLOR Hintergrund, D3DCOLOR Rahmen1, D3DCOLOR Rahmen2, IDirect3DDevice9 *pDevice);
void DrawBorder( int x, int y, int w, int h, int px, D3DCOLOR Rahmen1, D3DCOLOR Rahmen2 ,IDirect3DDevice9* pDevice ) ;
void FillRGB( int x, int y, int w, int h, D3DCOLOR meinefarbe, IDirect3DDevice9* pDevice );

};
extern class cMenu Menu;
void cMenu::Render (LPDIRECT3DDEVICE9 pDevice)
{
if (!MenuSt.Load)
{
MenuSt.x = -135;
MenuSt.y = -100 ;
MenuSt.Load = true ;
}

if (GetAsyncKeyState (VK_INSERT) &1)
	MenuSt.IsVisible = !MenuSt.IsVisible;

if (MenuSt.IsVisible)
{Menu.StyleRender (pDevice);}
}
void cMenu::DrawBox( int x, int y, int w, int h, int PX, D3DCOLOR Hintergrund, D3DCOLOR Rahmen1, D3DCOLOR Rahmen2,IDirect3DDevice9* pDevice ) 
{ 
if( !pDevice )
return;
Menu.FillRGB( x, y, w, h, Hintergrund, pDevice ); 
  Menu.DrawBorder( x, y, w, h, PX,    Rahmen1, Rahmen2, pDevice ); 
}
void cMenu::DrawBorder( int x, int y, int w, int h, int px, D3DCOLOR Rahmen1, D3DCOLOR Rahmen2 ,IDirect3DDevice9* pDevice ) 
{ if( !pDevice )
return;
 
FillRGB( x, (y + h - px), w, px,      Rahmen2, pDevice ); 
 FillRGB( x, y, px, h,                Rahmen1, pDevice ); 
 FillRGB( x, y, w, px,                Rahmen1, pDevice ); 
 FillRGB( (x + w - px), y, px, h,     Rahmen2, pDevice ); 
} 

void cMenu::FillRGB( int x, int y, int w, int h, D3DCOLOR Farbe, IDirect3DDevice9* pDevice )
{
if( !pDevice )
return;

const DWORD D3D_FVF = (D3DFVF_XYZRHW | D3DFVF_DIFFUSE);
	
struct Vertex
{
float x,y,z,ht;
DWORD meinefarbe;
}

V[4] = 
{
{(float)x		,(float)(y+h)	, 0.0f, 0.0f, Farbe},
{(float)x		,(float)y		, 0.0f, 0.0f, Farbe},
{(float)(x+w)	,(float)(y+h)	, 0.0f, 0.0f, Farbe},
{(float)(x+w)	,(float)y		, 0.0f, 0.0f, Farbe}
};
pDevice->SetTexture( 0, NULL );
pDevice->SetRenderState( D3DRS_LIGHTING, TRUE);
pDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW);
pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
pDevice->SetRenderState( D3DRS_FOGENABLE, false );
pDevice->SetFVF(D3D_FVF);
pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Vertex));
}
   

#endif
Main.cpp

Code:
#include "Includes.h"

cMain Main;
cMenu Menu;
cDetours Detours;
oPresent pPresent;
oReset pReset;
LPDIRECT3DDEVICE9 g_pDevice = 0;


int BereichItem;
long FPSCount;
long FPS;



void __cdecl cMain::PushToConsole(  char* szCommand)
{
	typedef int (__cdecl* PTC_t)(char* cmd); 
    PTC_t RCC = (PTC_t)	Cnsl_Unwrapped ;
    RCC(szCommand); 
}


















void cMain::Render(LPDIRECT3DDEVICE9 pDevice){  
if (Main.pFont != NULL )

{  
Menu.Render (pDevice);
} 
else if 
(g_pDevice !=pDevice)

g_pDevice = pDevice;
try
{
if (Main.pFont != 0)
Main.pFont->Release();
} catch (...) {}
Main.pFont = 0;
D3DXCreateFontA(pDevice, 13, 0, FW_NORMAL, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 
			PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, Font_Name, &Main.pFont);
}

 
   ////////////////Menü

void cMenu::StyleRender(LPDIRECT3DDEVICE9 pDevice)

{
GetScreenRes(pDevice);
FPSCount++;

Menu.DrawBox (Menu.MenuSt.x + 3, Menu.MenuSt.y -3, 120, 250 , 3, light_grey ,toxic, toxic , pDevice);
Main.DrawString( Menu.MenuSt.x  , Menu.MenuSt.y -33 ,white, Main.pFont, "Screen Resolution %d x %d | FPS: %d  ",ScreenX,ScreenY ,FPS);
 

	
	//////////BEREICHITEMS////////////////

 if (BereichItem==1){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +2 ,toxic, Main.pFont,  "Nx-Chams   |%d",NxChams);}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +2 ,white, Main.pFont,  "Nx-Chams   |%d",NxChams);}
 if (BereichItem==2){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +15 ,toxic, Main.pFont, "Wireframe   |%d",Wireframe);}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +15 ,white, Main.pFont, "Wireframe   |%d",Wireframe);}
if (BereichItem==3){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +32 ,toxic, Main.pFont,  "Rapidfire     |%d",Rapidfire);}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +32 ,white, Main.pFont, "Rapidfire     |%d",Rapidfire);}
 if (BereichItem==4){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +49 ,toxic, Main.pFont,  "NoWpnnrange   |%d",Weaponrange);}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +49 ,white, Main.pFont,  "NoWpnnrange   |%d",Weaponrange);}
 if (BereichItem==5){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +66 ,toxic, Main.pFont, "Superbullets   |%d",Superbullets );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +66 ,white, Main.pFont, "Superbullets   |%d",Superbullets );}
if (BereichItem==6){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +83 ,toxic, Main.pFont,  "Rapidfire    |%d",Nametags );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +83 ,white, Main.pFont, "Rapidfire      |%d",Nametags );}
if (BereichItem==7){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +100 ,toxic, Main.pFont,  "NoReload     |%d",Noreload );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +100 ,white, Main.pFont, "NoReload     |%d",Noreload );}
if (BereichItem==8){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +117 ,toxic, Main.pFont,  "ShowFps     |%d",Norecoil );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +117 ,white, Main.pFont, "ShowFps     |%d",Norecoil );}
if (BereichItem==9){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +134 ,toxic, Main.pFont,  "Test     |%d",Norecoil );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +134 ,white, Main.pFont, "Test    |%d",Norecoil );}
if (BereichItem==10){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +151 ,toxic, Main.pFont,  "NoSpread     |%d",Norecoil );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +151 ,white, Main.pFont, "NoSpread     |%d",Norecoil );}
if (BereichItem==11){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +168 ,toxic, Main.pFont,  "NoFog     |%d",Norecoil );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +168 ,white, Main.pFont, "NoFog    |%d",Norecoil );}
if (BereichItem==12){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +185 ,toxic, Main.pFont,  "Superjump     |%d",Norecoil );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +185 ,white, Main.pFont, "Superjump    |%d",Norecoil );}
if (BereichItem==13){Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +202 ,toxic, Main.pFont,  "Removals    |%d",Norecoil );}
else                {Main.DrawString( Menu.MenuSt.x +10 , Menu.MenuSt.y +202 ,white, Main.pFont, "Removals    |%d",Norecoil );}


////////////////



if (BereichItem==1){
if ((GetAsyncKeyState (VK_RIGHT)))
NxChams=true;
if ((GetAsyncKeyState (VK_LEFT)))
NxChams=false; }

if (BereichItem==2){
if ((GetAsyncKeyState (VK_RIGHT)))
Wireframe=true;
if ((GetAsyncKeyState (VK_LEFT)))
Wireframe=false; }

if (BereichItem==3){
if ((GetAsyncKeyState (VK_RIGHT)))
Rapidfire=true;
if ((GetAsyncKeyState (VK_LEFT)))
Rapidfire=false; }


if (BereichItem==4){
if ((GetAsyncKeyState (VK_RIGHT)))
Weaponrange=true;
if ((GetAsyncKeyState (VK_LEFT)))
Weaponrange=false; }

if (BereichItem==5){
if ((GetAsyncKeyState (VK_RIGHT)))
Superbullets=true;
if ((GetAsyncKeyState (VK_LEFT)))
Superbullets=false; }

if (BereichItem==6){
if ((GetAsyncKeyState (VK_RIGHT)))
Rapidfire=true;
if ((GetAsyncKeyState (VK_LEFT)))
Rapidfire=false; }

if (BereichItem==7){
if ((GetAsyncKeyState (VK_RIGHT)))
Noreload=true;
if ((GetAsyncKeyState (VK_LEFT)))
Noreload=false; }

if (BereichItem==8){
if ((GetAsyncKeyState (VK_RIGHT)))
ShowFPS=true;
if ((GetAsyncKeyState (VK_LEFT)))
ShowFPS=false; }

if (BereichItem==9){
if ((GetAsyncKeyState (VK_RIGHT)))
Rapidfire=true;
if ((GetAsyncKeyState (VK_LEFT)))
Rapidfire=false; }

if (BereichItem==10){
if ((GetAsyncKeyState (VK_RIGHT)))
Nospread=true;
if ((GetAsyncKeyState (VK_LEFT)))
Nospread=false; }

if (BereichItem==11){
if ((GetAsyncKeyState (VK_RIGHT)))
nofog=true;
if ((GetAsyncKeyState (VK_LEFT)))
nofog=false; }

if (BereichItem==12){
if ((GetAsyncKeyState (VK_RIGHT)))
superjump=true;
if ((GetAsyncKeyState (VK_LEFT)))
superjump=false; }

if (BereichItem==13){
if ((GetAsyncKeyState (VK_RIGHT)))
removals=true;
if ((GetAsyncKeyState (VK_LEFT)))
removals=false; }



////////
if (GetAsyncKeyState (VK_UP)&1){
	BereichItem -- ; }
if (GetAsyncKeyState (VK_DOWN)&1){
	BereichItem ++ ;}
////
if (BereichItem <= 0){
	BereichItem = 13;}

if (BereichItem >= 14){
	BereichItem =1;}

}









HRESULT WINAPI MyPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT *pSourceRect, 
						   CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
{
if (NxChams==true){
		           //On
   cMain::PushToConsole("SkelModelStencil 1");
	}else{ if ((NxChams==true)&&(GetAsyncKeyState (VK_LEFT))) {
             //Off
    cMain::PushToConsole("SkelModelStencil 0");
	}}
if (Wireframe==true){
		           //On
   cMain::PushToConsole("WireFrame 1");
	}else{ if ((Wireframe==true)&&(GetAsyncKeyState (VK_LEFT))) {
             //Off
    cMain::PushToConsole("WireFrame 0");
	}}
	
	if (ShowFPS==true){
		           //On
   cMain::PushToConsole("ShowFps 1");
	}else{ if ((ShowFPS==true)&&(GetAsyncKeyState (VK_LEFT))) {
             //Off
    cMain::PushToConsole("ShowFps 0");
	}}
	
	if (Nospread==true){
		           //On
     cMain::PushToConsole("PerturbRotationEffect  0.000000");
	 cMain::PushToConsole("PerturbIncreaseSpeed 0.000000");
	 cMain::PushToConsole("PerturbWalkPercent 0.000000 ");
	 cMain::PushToConsole("PerturbFiringIncreaseSpeed 0.000000");
	 cMain::PushToConsole("PerturbRecoil 0.000000");
	 cMain::PushToConsole("FireMovePerturb 0.000000");
     cMain::PushToConsole("ZoomedFireMoveDuckPerturb 0.000000");
     cMain::PushToConsole("ZoomedFireMovePerturb 0.000000");
     cMain::PushToConsole("ZoomedFireDuckPerturb 0.000000");

	}else{ if ((Nospread==true)&&(GetAsyncKeyState (VK_LEFT))) {
             //Off
     cMain::PushToConsole("PerturbRotationEffect 3.000000");
	 cMain::PushToConsole("PerturbIncreaseSpeed 3.000000");
	 cMain::PushToConsole("PerturbWalkPercent 9.000000 ");
	 cMain::PushToConsole("PerturbFiringIncreaseSpeed 0.500000");
	 cMain::PushToConsole("PerturbRecoil 9.000000");
	 cMain::PushToConsole("FireMovePerturb 9.000000");
     cMain::PushToConsole("ZoomedFireMoveDuckPerturb 9.000000");
     cMain::PushToConsole("ZoomedFireMovePerturb 9.000000");
     cMain::PushToConsole("ZoomedFireDuckPerturb 9.000000");
	}}
	
	if (removals==true){
		           //On
cMain::PushToConsole ("DynamicLight 0");
cMain::PushToConsole ("EnableWeatherFX 0 ");
cMain::PushToConsole ("MuzzleLight 0 ");
cMain::PushToConsole ("SnowEnable 0 ");
cMain::PushToConsole ("CamDamage 0 ");
cMain::PushToConsole ("ModelApplySun 0" );
cMain::PushToConsole ("ClientFXDetailLevel 0" );
cMain::PushToConsole ("ModelShadow_Proj_Enable 0" );
cMain::PushToConsole ("DebrisFXLevel 0 ");
cMain::PushToConsole ("ScatterEnable 0 ");
cMain::PushToConsole ("modelshadow_proj_blurenable 0 ");
cMain::PushToConsole ("DrawAllModelShadows 0 ");
cMain::PushToConsole ("ModelShadow_Proj_MinColorComponent 0" );
cMain::PushToConsole ("ModelShadow_Proj_MaxProjDist 0 ");
	}else{ if ((removals==true)&&(GetAsyncKeyState (VK_LEFT))) {
             //Off
    cMain::PushToConsole ("DynamicLight 1");
cMain::PushToConsole ("EnableWeatherFX 1 ");
cMain::PushToConsole ("MuzzleLight 1 ");
cMain::PushToConsole ("SnowEnable 1 ");
cMain::PushToConsole ("CamDamage 1 ");
cMain::PushToConsole ("ModelApplySun 1" );
cMain::PushToConsole ("ClientFXDetailLevel 1" );
cMain::PushToConsole ("ModelShadow_Proj_Enable 1" );
cMain::PushToConsole ("DebrisFXLevel 1 ");
cMain::PushToConsole ("ScatterEnable 1 ");
cMain::PushToConsole ("modelshadow_proj_blurenable 1 ");
cMain::PushToConsole ("DrawAllModelShadows 1 ");
cMain::PushToConsole ("ModelShadow_Proj_MinColorComponent 1" );
cMain::PushToConsole ("ModelShadow_Proj_MaxProjDist 1 ");
	}}
	
		if (superjump==true){
		           //On
   cMain::PushToConsole("JumpVel 900.000000");
	}else{ if ((superjump==true)&&(GetAsyncKeyState (VK_LEFT))) {
             //Off
    cMain::PushToConsole("JumpVel 300.000000");
	}}
	
	
	
	
	
	
	
	if (Weaponrange==true){
		           //On
    memcpy( (PBYTE)WeaponRange1, (PBYTE)"\xB8\x00\x00\x00\x10\x90", 6 );
    memcpy( (PBYTE)WeaponRange2, (PBYTE)"\xB8\x00\x00\x00\x10\x90", 6 );
	}else{ if ((Weaponrange==true)&&(GetAsyncKeyState (VK_LEFT))) {
             //Off
    memcpy( (PBYTE)WeaponRange1, (PBYTE)"\x8B\x80\xC8\x02\x00\x00", 6 ); 
	memcpy( (PBYTE)WeaponRange2, (PBYTE)"\x8B\x80\xC8\x02\x00\x00", 6 );
	}}

	if (Superbullets==true){
		 //On
    memcpy( (PBYTE)SuperBullets, (PBYTE)"\x90\x90\x90", 3);
	}else{if ((Superbullets==true) &&(GetAsyncKeyState (VK_LEFT))){
            //Off
			memcpy( (PBYTE)SuperBullets, (PBYTE)"\x0F\x94\xC0", 3);
	}}

	if ((Rapidfire==true)&& (GetAsyncKeyState (VK_LBUTTON))){
		//On
memcpy((VOID *)RapidFire, (VOID *)(PBYTE)"\x90\x90", 2);

	}else{if ((Rapidfire==true)&&(GetAsyncKeyState (VK_LEFT))){
//Off
memcpy((VOID *)RapidFire, (VOID *)(PBYTE)"\x74\x3E", 2);
	}}





	if (Menu.MenuSt.y <= 35 && Menu.MenuSt.IsVisible==1 )
	{	Menu.MenuSt.y += 2; 
	Menu.MenuSt.x += 2; }
	if (Menu.MenuSt.y >= 35 && Menu.MenuSt.IsVisible==0 )
	{ Menu.MenuSt.y = -100; 
	Menu.MenuSt.x = -135;} 
	pDevice->SetTexture( NULL, NULL );
	pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, D3DZB_TRUE );
	pDevice->SetFVF( D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1 );
	pDevice->SetRenderState( D3DRS_FOGENABLE, false );
	pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
	Main.Render(pDevice);                                              //
	pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_TRUE );
    pDevice->SetTexture(0, NULL); 
	return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);

}



HRESULT WINAPI MyReset(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
{
	Main.pFont->OnLostDevice();
	HRESULT hRet = pReset(pDevice, pPresentationParameters);
	if(SUCCEEDED(hRet))
	Main.pFont->OnResetDevice();
	return pReset(pDevice, pPresentationParameters);
}


DWORD WINAPI GetFPS(LPVOID lpParam)
{
 while(true)
 {
 FPS = FPSCount;
 FPSCount=0;
 Sleep(1000);
 }
}




DWORD WINAPI dwHookThread(LPVOID)
{
while(!Main.HookReady())
Sleep(25);

Main.Hook();
return EXIT_SUCCESS;
}
//////////DLLMAIN
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == 1 )
//MessageBoxA( NULL, "Waiting for Olly... ","Dump-Helper", NULL );
CreateThread(NULL, NULL,dwHookThread, NULL, NULL, NULL); 
CreateThread(NULL, NULL,GetFPS, NULL, NULL, NULL);
 	
return TRUE;
}
//////
void cMain::DrawString(int x, int y, DWORD color, LPD3DXFONT g_pFont, const char *fmt, ...) 
{
if(!g_pFont)
return;

RECT FontPos = { x, y, x + 120, y + 16 };
char buf[1024] = {'\0'};
va_list va_alist;

va_start(va_alist, fmt);
vsprintf_s(buf, fmt, va_alist);
va_end(va_alist);

g_pFont->DrawTextA(NULL, buf, -1, &FontPos, DT_NOCLIP, color);
}

bool cMain::bDataCompare(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 cMain::FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask) 
{ 
for(DWORD i=0; i < dwLen; i++) 
if(Main.bDataCompare( (BYTE*)( dwAddress+i ),bMask,szMask) ) 
return (DWORD)(dwAddress+i); 

return 0; 
}



bool cMain::HookReady()
{
if( GetModuleHandleA( "d3d9.dll"     ) != NULL)
return true;
return false;
}

DWORD GetPointerII(int index)
{
/*Find yourself :P*/
}
DWORD * FindDevice(VOID)
{
 /*Find yourself :P*/
} 

void cMain::Hook() 
{
/*Find yourself :P*/

pReset = (oReset)/*Find yourself :P*/((DWORD)VTable[16],(DWORD)MyReset, Len_size);
pPresent = (oPresent)/*Find yourself :P*/((DWORD)VTable[17],(DWORD)MyPresent, Len_size);

	

}

ADE32.cpp

Code:
// ADE32 version 2.02c -- C edition
//Credits to Z0mbie

#define WIN32_LEAN_AND_MEAN
#define WIN32_EXTRA_LEAN

#include <windows.h>

#include "ADE32.h"

DWORD ade32_table[512] = {
/* 00 */  C_MODRM,
/* 01 */  C_MODRM,
/* 02 */  C_MODRM,
/* 03 */  C_MODRM,
/* 04 */  C_DATA1,
/* 05 */  C_DATA66,
/* 06 */  C_BAD,
/* 07 */  C_BAD,
/* 08 */  C_MODRM,
/* 09 */  C_MODRM,
/* 0A */  C_MODRM,
/* 0B */  C_MODRM,
/* 0C */  C_DATA1,
/* 0D */  C_DATA66,
/* 0E */  C_BAD,
/* 0F */  C_OPCODE2,
/* 10 */  C_MODRM+C_BAD,
/* 11 */  C_MODRM,
/* 12 */  C_MODRM+C_BAD,
/* 13 */  C_MODRM,
/* 14 */  C_DATA1+C_BAD,
/* 15 */  C_DATA66+C_BAD,
/* 16 */  C_BAD,
/* 17 */  C_BAD,
/* 18 */  C_MODRM+C_BAD,
/* 19 */  C_MODRM,
/* 1A */  C_MODRM,
/* 1B */  C_MODRM,
/* 1C */  C_DATA1+C_BAD,
/* 1D */  C_DATA66+C_BAD,
/* 1E */  C_BAD,
/* 1F */  C_BAD,
/* 20 */  C_MODRM,
/* 21 */  C_MODRM,
/* 22 */  C_MODRM,
/* 23 */  C_MODRM,
/* 24 */  C_DATA1,
/* 25 */  C_DATA66,
/* 26 */  C_SEG+C_BAD,
/* 27 */  C_BAD,
/* 28 */  C_MODRM,
/* 29 */  C_MODRM,
/* 2A */  C_MODRM,
/* 2B */  C_MODRM,
/* 2C */  C_DATA1,
/* 2D */  C_DATA66,
/* 2E */  C_SEG+C_BAD,
/* 2F */  C_BAD,
/* 30 */  C_MODRM,
/* 31 */  C_MODRM,
/* 32 */  C_MODRM,
/* 33 */  C_MODRM,
/* 34 */  C_DATA1,
/* 35 */  C_DATA66,
/* 36 */  C_SEG+C_BAD,
/* 37 */  C_BAD,
/* 38 */  C_MODRM,
/* 39 */  C_MODRM,
/* 3A */  C_MODRM,
/* 3B */  C_MODRM,
/* 3C */  C_DATA1,
/* 3D */  C_DATA66,
/* 3E */  C_SEG+C_BAD,
/* 3F */  C_BAD,
/* 40 */  0,
/* 41 */  0,
/* 42 */  0,
/* 43 */  0,
/* 44 */  C_BAD,
/* 45 */  0,
/* 46 */  0,
/* 47 */  0,
/* 48 */  0,
/* 49 */  0,
/* 4A */  0,
/* 4B */  0,
/* 4C */  C_BAD,
/* 4D */  0,
/* 4E */  0,
/* 4F */  0,
/* 50 */  0,
/* 51 */  0,
/* 52 */  0,
/* 53 */  0,
/* 54 */  0,
/* 55 */  0,
/* 56 */  0,
/* 57 */  0,
/* 58 */  0,
/* 59 */  0,
/* 5A */  0,
/* 5B */  0,
/* 5C */  C_BAD,
/* 5D */  0,
/* 5E */  0,
/* 5F */  0,
/* 60 */  C_BAD,
/* 61 */  C_BAD,
/* 62 */  C_MODRM+C_BAD,
/* 63 */  C_MODRM+C_BAD,
/* 64 */  C_SEG,
/* 65 */  C_SEG+C_BAD,
/* 66 */  C_66,
/* 67 */  C_67,
/* 68 */  C_DATA66,
/* 69 */  C_MODRM+C_DATA66,
/* 6A */  C_DATA1,
/* 6B */  C_MODRM+C_DATA1,
/* 6C */  C_BAD,
/* 6D */  C_BAD,
/* 6E */  C_BAD,
/* 6F */  C_BAD,
/* 70 */  C_DATA1+C_REL+C_BAD,
/* 71 */  C_DATA1+C_REL+C_BAD,
/* 72 */  C_DATA1+C_REL,
/* 73 */  C_DATA1+C_REL,
/* 74 */  C_DATA1+C_REL,
/* 75 */  C_DATA1+C_REL,
/* 76 */  C_DATA1+C_REL,
/* 77 */  C_DATA1+C_REL,
/* 78 */  C_DATA1+C_REL,
/* 79 */  C_DATA1+C_REL,
/* 7A */  C_DATA1+C_REL+C_BAD,
/* 7B */  C_DATA1+C_REL+C_BAD,
/* 7C */  C_DATA1+C_REL,
/* 7D */  C_DATA1+C_REL,
/* 7E */  C_DATA1+C_REL,
/* 7F */  C_DATA1+C_REL,
/* 80 */  C_MODRM+C_DATA1,
/* 81 */  C_MODRM+C_DATA66,
/* 82 */  C_MODRM+C_DATA1+C_BAD,
/* 83 */  C_MODRM+C_DATA1,
/* 84 */  C_MODRM,
/* 85 */  C_MODRM,
/* 86 */  C_MODRM,
/* 87 */  C_MODRM,
/* 88 */  C_MODRM,
/* 89 */  C_MODRM,
/* 8A */  C_MODRM,
/* 8B */  C_MODRM,
/* 8C */  C_MODRM+C_BAD,
/* 8D */  C_MODRM,
/* 8E */  C_MODRM+C_BAD,
/* 8F */  C_MODRM,
/* 90 */  0,
/* 91 */  0,
/* 92 */  0,
/* 93 */  C_BAD,
/* 94 */  C_BAD,
/* 95 */  C_BAD,
/* 96 */  C_BAD,
/* 97 */  C_BAD,
/* 98 */  C_BAD,
/* 99 */  0,
/* 9A */  C_DATA66+C_DATA2+C_BAD,
/* 9B */  0,
/* 9C */  C_BAD,
/* 9D */  C_BAD,
/* 9E */  C_BAD,
/* 9F */  C_BAD,
/* A0 */  C_ADDR67,
/* A1 */  C_ADDR67,
/* A2 */  C_ADDR67,
/* A3 */  C_ADDR67,
/* A4 */  0,
/* A5 */  0,
/* A6 */  0,
/* A7 */  0,
/* A8 */  C_DATA1,
/* A9 */  C_DATA66,
/* AA */  0,
/* AB */  0,
/* AC */  0,
/* AD */  C_BAD,
/* AE */  0,
/* AF */  C_BAD,
/* B0 */  C_DATA1,
/* B1 */  C_DATA1,
/* B2 */  C_DATA1,
/* B3 */  C_DATA1,
/* B4 */  C_DATA1,
/* B5 */  C_DATA1,
/* B6 */  C_DATA1+C_BAD,
/* B7 */  C_DATA1+C_BAD,
/* B8 */  C_DATA66,
/* B9 */  C_DATA66,
/* BA */  C_DATA66,
/* BB */  C_DATA66,
/* BC */  C_DATA66+C_BAD,
/* BD */  C_DATA66,
/* BE */  C_DATA66,
/* BF */  C_DATA66,
/* C0 */  C_MODRM+C_DATA1,
/* C1 */  C_MODRM+C_DATA1,
/* C2 */  C_DATA2+C_STOP,
/* C3 */  C_STOP,
/* C4 */  C_MODRM+C_BAD,
/* C5 */  C_MODRM+C_BAD,
/* C6 */  C_MODRM+C_DATA1,
/* C7 */  C_MODRM+C_DATA66,
/* C8 */  C_DATA2+C_DATA1,
/* C9 */  0,
/* CA */  C_DATA2+C_STOP+C_BAD,
/* CB */  C_STOP+C_BAD,
/* CC */  C_BAD,
/* CD */  C_BAD,
/* CE */  C_BAD,
/* CF */  C_STOP+C_BAD,
/* D0 */  C_MODRM,
/* D1 */  C_MODRM,
/* D2 */  C_MODRM,
/* D3 */  C_MODRM,
/* D4 */  C_DATA1+C_BAD,
/* D5 */  C_DATA1+C_BAD,
/* D6 */  C_BAD,
/* D7 */  C_BAD,
/* D8 */  C_MODRM,
/* D9 */  C_MODRM,
/* DA */  C_MODRM,
/* DB */  C_MODRM,
/* DC */  C_MODRM,
/* DD */  C_MODRM,
/* DE */  C_MODRM,
/* DF */  C_MODRM,
/* E0 */  C_DATA1+C_REL+C_BAD,
/* E1 */  C_DATA1+C_REL+C_BAD,
/* E2 */  C_DATA1+C_REL,
/* E3 */  C_DATA1+C_REL,
/* E4 */  C_DATA1+C_BAD,
/* E5 */  C_DATA1+C_BAD,
/* E6 */  C_DATA1+C_BAD,
/* E7 */  C_DATA1+C_BAD,
/* E8 */  C_DATA66+C_REL,
/* E9 */  C_DATA66+C_REL+C_STOP,
/* EA */  C_DATA66+C_DATA2+C_BAD,
/* EB */  C_DATA1+C_REL+C_STOP,
/* EC */  C_BAD,
/* ED */  C_BAD,
/* EE */  C_BAD,
/* EF */  C_BAD,
/* F0 */  C_LOCK+C_BAD,
/* F1 */  C_BAD,
/* F2 */  C_REP,
/* F3 */  C_REP,
/* F4 */  C_BAD,
/* F5 */  C_BAD,
/* F6 */  C_MODRM,
/* F7 */  C_MODRM,
/* F8 */  0,
/* F9 */  0,
/* FA */  C_BAD,
/* FB */  C_BAD,
/* FC */  0,
/* FD */  0,
/* FE */  C_MODRM,
/* FF */  C_MODRM,
/* 00 */  C_MODRM,
/* 01 */  C_MODRM,
/* 02 */  C_MODRM,
/* 03 */  C_MODRM,
/* 04 */  C_ERROR,
/* 05 */  C_ERROR,
/* 06 */  0,
/* 07 */  C_ERROR,
/* 08 */  0,
/* 09 */  0,
/* 0A */  0,
/* 0B */  0,
/* 0C */  C_ERROR,
/* 0D */  C_ERROR,
/* 0E */  C_ERROR,
/* 0F */  C_ERROR,
/* 10 */  C_ERROR,
/* 11 */  C_ERROR,
/* 12 */  C_ERROR,
/* 13 */  C_ERROR,
/* 14 */  C_ERROR,
/* 15 */  C_ERROR,
/* 16 */  C_ERROR,
/* 17 */  C_ERROR,
/* 18 */  C_ERROR,
/* 19 */  C_ERROR,
/* 1A */  C_ERROR,
/* 1B */  C_ERROR,
/* 1C */  C_ERROR,
/* 1D */  C_ERROR,
/* 1E */  C_ERROR,
/* 1F */  C_ERROR,
/* 20 */  C_ERROR,
/* 21 */  C_ERROR,
/* 22 */  C_ERROR,
/* 23 */  C_ERROR,
/* 24 */  C_ERROR,
/* 25 */  C_ERROR,
/* 26 */  C_ERROR,
/* 27 */  C_ERROR,
/* 28 */  C_ERROR,
/* 29 */  C_ERROR,
/* 2A */  C_ERROR,
/* 2B */  C_ERROR,
/* 2C */  C_ERROR,
/* 2D */  C_ERROR,
/* 2E */  C_ERROR,
/* 2F */  C_ERROR,
/* 30 */  C_ERROR,
/* 31 */  C_ERROR,
/* 32 */  C_ERROR,
/* 33 */  C_ERROR,
/* 34 */  C_ERROR,
/* 35 */  C_ERROR,
/* 36 */  C_ERROR,
/* 37 */  C_ERROR,
/* 38 */  C_ERROR,
/* 39 */  C_ERROR,
/* 3A */  C_ERROR,
/* 3B */  C_ERROR,
/* 3C */  C_ERROR,
/* 3D */  C_ERROR,
/* 3E */  C_ERROR,
/* 3F */  C_ERROR,
/* 40 */  C_ERROR,
/* 41 */  C_ERROR,
/* 42 */  C_ERROR,
/* 43 */  C_ERROR,
/* 44 */  C_ERROR,
/* 45 */  C_ERROR,
/* 46 */  C_ERROR,
/* 47 */  C_ERROR,
/* 48 */  C_ERROR,
/* 49 */  C_ERROR,
/* 4A */  C_ERROR,
/* 4B */  C_ERROR,
/* 4C */  C_ERROR,
/* 4D */  C_ERROR,
/* 4E */  C_ERROR,
/* 4F */  C_ERROR,
/* 50 */  C_ERROR,
/* 51 */  C_ERROR,
/* 52 */  C_ERROR,
/* 53 */  C_ERROR,
/* 54 */  C_ERROR,
/* 55 */  C_ERROR,
/* 56 */  C_ERROR,
/* 57 */  C_ERROR,
/* 58 */  C_ERROR,
/* 59 */  C_ERROR,
/* 5A */  C_ERROR,
/* 5B */  C_ERROR,
/* 5C */  C_ERROR,
/* 5D */  C_ERROR,
/* 5E */  C_ERROR,
/* 5F */  C_ERROR,
/* 60 */  C_ERROR,
/* 61 */  C_ERROR,
/* 62 */  C_ERROR,
/* 63 */  C_ERROR,
/* 64 */  C_ERROR,
/* 65 */  C_ERROR,
/* 66 */  C_ERROR,
/* 67 */  C_ERROR,
/* 68 */  C_ERROR,
/* 69 */  C_ERROR,
/* 6A */  C_ERROR,
/* 6B */  C_ERROR,
/* 6C */  C_ERROR,
/* 6D */  C_ERROR,
/* 6E */  C_ERROR,
/* 6F */  C_ERROR,
/* 70 */  C_ERROR,
/* 71 */  C_ERROR,
/* 72 */  C_ERROR,
/* 73 */  C_ERROR,
/* 74 */  C_ERROR,
/* 75 */  C_ERROR,
/* 76 */  C_ERROR,
/* 77 */  C_ERROR,
/* 78 */  C_ERROR,
/* 79 */  C_ERROR,
/* 7A */  C_ERROR,
/* 7B */  C_ERROR,
/* 7C */  C_ERROR,
/* 7D */  C_ERROR,
/* 7E */  C_ERROR,
/* 7F */  C_ERROR,
/* 80 */  C_DATA66+C_REL,
/* 81 */  C_DATA66+C_REL,
/* 82 */  C_DATA66+C_REL,
/* 83 */  C_DATA66+C_REL,
/* 84 */  C_DATA66+C_REL,
/* 85 */  C_DATA66+C_REL,
/* 86 */  C_DATA66+C_REL,
/* 87 */  C_DATA66+C_REL,
/* 88 */  C_DATA66+C_REL,
/* 89 */  C_DATA66+C_REL,
/* 8A */  C_DATA66+C_REL,
/* 8B */  C_DATA66+C_REL,
/* 8C */  C_DATA66+C_REL,
/* 8D */  C_DATA66+C_REL,
/* 8E */  C_DATA66+C_REL,
/* 8F */  C_DATA66+C_REL,
/* 90 */  C_MODRM,
/* 91 */  C_MODRM,
/* 92 */  C_MODRM,
/* 93 */  C_MODRM,
/* 94 */  C_MODRM,
/* 95 */  C_MODRM,
/* 96 */  C_MODRM,
/* 97 */  C_MODRM,
/* 98 */  C_MODRM,
/* 99 */  C_MODRM,
/* 9A */  C_MODRM,
/* 9B */  C_MODRM,
/* 9C */  C_MODRM,
/* 9D */  C_MODRM,
/* 9E */  C_MODRM,
/* 9F */  C_MODRM,
/* A0 */  0,
/* A1 */  0,
/* A2 */  0,
/* A3 */  C_MODRM,
/* A4 */  C_MODRM+C_DATA1,
/* A5 */  C_MODRM,
/* A6 */  C_ERROR,
/* A7 */  C_ERROR,
/* A8 */  0,
/* A9 */  0,
/* AA */  0,
/* AB */  C_MODRM,
/* AC */  C_MODRM+C_DATA1,
/* AD */  C_MODRM,
/* AE */  C_ERROR,
/* AF */  C_MODRM,
/* B0 */  C_MODRM,
/* B1 */  C_MODRM,
/* B2 */  C_MODRM,
/* B3 */  C_MODRM,
/* B4 */  C_MODRM,
/* B5 */  C_MODRM,
/* B6 */  C_MODRM,
/* B7 */  C_MODRM,
/* B8 */  C_ERROR,
/* B9 */  C_ERROR,
/* BA */  C_MODRM+C_DATA1,
/* BB */  C_MODRM,
/* BC */  C_MODRM,
/* BD */  C_MODRM,
/* BE */  C_MODRM,
/* BF */  C_MODRM,
/* C0 */  C_MODRM,
/* C1 */  C_MODRM,
/* C2 */  C_ERROR,
/* C3 */  C_ERROR,
/* C4 */  C_ERROR,
/* C5 */  C_ERROR,
/* C6 */  C_ERROR,
/* C7 */  C_ERROR,
/* C8 */  0,
/* C9 */  0,
/* CA */  0,
/* CB */  0,
/* CC */  0,
/* CD */  C_DATA1,
/* CE */  0,
/* CF */  0,
/* D0 */  C_ERROR,
/* D1 */  C_ERROR,
/* D2 */  C_ERROR,
/* D3 */  C_ERROR,
/* D4 */  C_ERROR,
/* D5 */  C_ERROR,
/* D6 */  C_ERROR,
/* D7 */  C_ERROR,
/* D8 */  C_ERROR,
/* D9 */  C_ERROR,
/* DA */  C_ERROR,
/* DB */  C_ERROR,
/* DC */  C_ERROR,
/* DD */  C_ERROR,
/* DE */  C_ERROR,
/* DF */  C_ERROR,
/* E0 */  C_ERROR,
/* E1 */  C_ERROR,
/* E2 */  C_ERROR,
/* E3 */  C_ERROR,
/* E4 */  C_ERROR,
/* E5 */  C_ERROR,
/* E6 */  C_ERROR,
/* E7 */  C_ERROR,
/* E8 */  C_ERROR,
/* E9 */  C_ERROR,
/* EA */  C_ERROR,
/* EB */  C_ERROR,
/* EC */  C_ERROR,
/* ED */  C_ERROR,
/* EE */  C_ERROR,
/* EF */  C_ERROR,
/* F0 */  C_ERROR,
/* F1 */  C_ERROR,
/* F2 */  C_ERROR,
/* F3 */  C_ERROR,
/* F4 */  C_ERROR,
/* F5 */  C_ERROR,
/* F6 */  C_ERROR,
/* F7 */  C_ERROR,
/* F8 */  C_ERROR,
/* F9 */  C_ERROR,
/* FA */  C_ERROR,
/* FB */  C_ERROR,
/* FC */  C_ERROR,
/* FD */  C_ERROR,
/* FE */  C_ERROR,
/* FF */  C_ERROR
}; // ade32_table[]


//Find yourself :P
ADE32.h

Code:
// ADE32 v2.02c by z0mbie


#ifndef __ADE32_H__
#define __ADE32_H__

#define C_ERROR		0xFFFFFFFF
#define C_ADDR1		0x00000001
#define C_ADDR2		0x00000002
#define C_ADDR4		0x00000004
#define C_LOCK		0x00000008
#define C_67		0x00000010
#define C_66		0x00000020
#define C_REP		0x00000040
#define C_SEG		0x00000080
#define C_ANYPREFIX	(C_66+C_67+C_LOCK+C_REP+C_SEG)
#define C_DATA1		0x00000100
#define C_DATA2		0x00000200
#define C_DATA4		0x00000400
#define C_SIB		0x00000800
#define C_ADDR67	0x00001000
#define C_DATA66	0x00002000
#define C_MODRM		0x00004000
#define C_BAD		0x00008000
#define C_OPCODE2	0x00010000
#define C_REL		0x00020000
#define C_STOP		0x00040000

#pragma pack(push)
#pragma pack(1)

//find out yourself
#endif // __ADE32_H__

Strings and Boxes By Haxo

I know messy Coding , but this is about 8 month's old , i just updated it for you

It is the first base i nearly coded completely alone

big thx to @kvn for teaching me ALOT C++ and reversing

Someone can bulid it and give me the files ?
and how it's work ?
i need to inject all this files ?
Please bulid this hack.. i can't wait ..

Please bulid me hack with only no recoil and no spread and nx chams please i must it !!
Posts 1–13 of 13 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?