Slamming - Auto On - 13/08/2012

Posts 1–10 of 10 · Page 1 of 1
Slamming - Auto On - 13/08/2012
Auto On for studies



Code:
class.h
Code:
/*Creditos -> Black Diamond, luizimloko, mo3ad001, fatboy88, Azorbix, Gellin, Hans
Creditos Aqui ->
Nao remova os creditos adicione o seu abaixo dos meus creditos*/

#ifndef __CLASS__
#define __CLASS__

class cWeaponInfo
{
public:
	char unknown1[12];
	DWORD dwClientWeaponType;
	char unknown2[16];
	DWORD dwAlt_InstDamage;
	DWORD dwInstDamage; 
	DWORD unknown3;
	char unknown4[104];
	DWORD dwFireSnd;
	char unknown5[108];
	float fFireDelay1;
	float ffiredelay1;
	DWORD dwMaxAmmo3;
	DWORD dwMaxAmmo2;
	char unknown6[276];
	DWORD dwCrossHairA; 
	DWORD dwCrossHairR; 
	DWORD dwCrossHairG;
	DWORD dwCrossHairB; 
	BYTE TripleShotMode;
	char unknown7[3];
	DWORD dwTripleShotRoundNum;
	float fDamageRFacter;
	char unknown8[28];
	DWORD dwInfiAmmo2;
	DWORD dwInfiniteAmmo;
	DWORD dwHideWhenEmpty;
	DWORD dwIsAmmo;
	char unknown9[4];
	DWORD dwShotsPerClip;
	char unknown10[52];
	float fZoomTime;
	DWORD dwMinPerturb;
	DWORD dwMaxPerturb;
	float fDuckPerturb; 
	float fMoveDuckPerturb; 
	DWORD dwZoomedMinPerturb;
	DWORD dwZoomedMaxPerturb;  
	DWORD dwRange;
	char unknown11[12];
	DWORD VectorsPerRound; 
	char unknown12[40];
	float fPerturbIncSpeed;
	float fPerturbDecSpeed;
	char unknown13[4];
	float fZoomedPerturbIncSpeed;
	float fZoomedPerturbDecSpeed;
	char unknown14[4];
	float fBaseCamRecoilPitch;
	float fBaseCamRecoilAccelPitch;
	char unknown15[36];
	float fTripleShotMaxCamRecoilPitch;
	float fTripleShotBaseCamRecoilPitch; 
	char unknown16[8];
	DWORD dwTripleShotMinPerturb; 
	DWORD dwTripleShotMaxPerturb;
	float fTripleShotPerturbIncSpeed;
	float fTripleShotPerturbDecSpeed;
	char unknown17[112];
	DWORD dwFireRate;
	DWORD dwMoveSpeed;
	DWORD unknown18;
	char unknown19[32];
	BYTE DisableCrosshair;
	char unknown20[27];
	float fCameraSwayXFreq;
	float fCameraSwayYFreq;
	char unknown21[12];
	DWORD dwTargetCrosshairFlag;
	DWORD dwEffectRange;
	char unknown22[192];
	DWORD dwFireDelay;
};

class cWeaponMgr
{
public:
	char unknown1[5564];
	cWeaponInfo** Weapons;
	__int32 WeaponCount;
};

#endif
Code:
includes.h
Code:
/*Creditos -> Black Diamond, luizimloko, mo3ad001, fatboy88, Azorbix, Gellin, Hans
Creditos Aqui ->
Nao remova os creditos adicione o seu abaixo dos meus creditos*/

#ifndef __INCLUDES__
#define __INCLUDES__

#pragma message( "Criado por black diamond e outros não retire os créditos" )
#pragma message( "Auto on para estudos" )

#define VC_EXTRALEAN
#define WIN32_LEAN_AND_MEAN

#include <windows.h>

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

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

#include "hook.h"
#include "aimcorrection.h"
#include "class.h"

#endif
Code:
aimcorrection.cpp
Code:
/*Creditos -> Black Diamond, luizimloko, mo3ad001, fatboy88, Azorbix, Gellin, Hans
Creditos Aqui ->
Nao remova os creditos adicione o seu abaixo dos meus creditos*/

#include "aimcorrection.h"

cAim aim;

void cAim::AimCorrection( bool Correct )
{
	if( !StoreWepData )
	{	
		cWeaponMgr* WepMgr = *(cWeaponMgr**)0x37821C54 /*Weaponmgr*/;
			
		if( WepMgr )
		{
			for( int i = 0; i < WepMgr->WeaponCount; i++ )
			{ 
				cWeaponInfo* Wep = WepMgr->Weapons[i];

				if( Wep ) 
				{	
					OgAwepData[0][i] = Wep->fDuckPerturb;
					OgAwepData[1][i] = Wep->fMoveDuckPerturb;
					OgAwepData[2][i] = Wep->fPerturbIncSpeed;
					OgAwepData[3][i] = Wep->fPerturbDecSpeed;
					OgAwepData[4][i] = Wep->fCameraSwayXFreq;
					OgAwepData[5][i] = Wep->fCameraSwayYFreq;
					OgAwepData[6][i] = Wep->fZoomedPerturbIncSpeed;
					OgAwepData[7][i] = Wep->fZoomedPerturbDecSpeed; 
					OgAwepData[8][i] = Wep->fTripleShotMaxCamRecoilPitch;
					OgAwepData[9][i] = Wep->fTripleShotBaseCamRecoilPitch;
					OgAwepData[10][i] = Wep->fTripleShotPerturbIncSpeed;
					OgAwepData[11][i] = Wep->fTripleShotPerturbDecSpeed;
					OgAwepData[12][i] = Wep->fBaseCamRecoilPitch;
					OgAwepData[13][i] = Wep->fBaseCamRecoilAccelPitch;
					OgAwepData[14][i] = Wep->dwTripleShotMinPerturb;
					OgAwepData[15][i] = Wep->dwTripleShotMaxPerturb;
					OgAwepData[16][i] = Wep->dwMaxPerturb;
					OgAwepData[17][i] = Wep->dwMinPerturb;
					OgAwepData[18][i] = Wep->dwZoomedMaxPerturb;
					OgAwepData[19][i] = Wep->dwZoomedMinPerturb;
				} 
			}
		}
		StoreWepData = true;
	}

	if( Correct )
	{
		if( SetWepData )
		{
			cWeaponMgr* WepMgr = *(cWeaponMgr**)0x37821C54 /*Weaponmgr*/;

			if( WepMgr )
			{
				for( int i = 0; i < WepMgr->WeaponCount; i++ )
				{ 
					cWeaponInfo* Wep = WepMgr->Weapons[i];

					if( Wep ) 
					{	
						Wep->fDuckPerturb = 0.0f;
						Wep->fMoveDuckPerturb = 0.0f;
						Wep->fPerturbIncSpeed = 0.0f;
						Wep->fPerturbDecSpeed = 0.0f;
						Wep->fCameraSwayXFreq = 0.0f;
						Wep->fCameraSwayYFreq = 0.0f;
						Wep->fZoomedPerturbIncSpeed = 0.0f;
						Wep->fZoomedPerturbDecSpeed = 0.0f; 
						Wep->fTripleShotMaxCamRecoilPitch = 0.0f;
						Wep->fTripleShotBaseCamRecoilPitch = 0.0f;
						Wep->fTripleShotPerturbIncSpeed = 0.0f;
						Wep->fTripleShotPerturbDecSpeed = 0.0f;
						Wep->fBaseCamRecoilPitch = 0.0f;
						Wep->fBaseCamRecoilAccelPitch = 0.0f;
						Wep->dwTripleShotMinPerturb = 0.0f;
						Wep->dwTripleShotMaxPerturb = 0.0f;
						Wep->dwMaxPerturb = 0.0f;
						Wep->dwMinPerturb = 0.0f;
						Wep->dwZoomedMaxPerturb = 0.0f;
						Wep->dwZoomedMinPerturb = 0.0f;
					} 
				}
			}
			SetWepData = false;
		}
	}
	else
	{	
		if( !SetWepData )
		{
			cWeaponMgr* WepMgr = *(cWeaponMgr**)0x37821C54 /*Weaponmgr*/;

			if( WepMgr )
			{
				for( int i = 0; i < WepMgr->WeaponCount; i++ )
				{ 
					cWeaponInfo* Wep = WepMgr->Weapons[i];

					if( Wep ) 
					{	
						Wep->fDuckPerturb = OgAwepData[0][i];
						Wep->fMoveDuckPerturb = OgAwepData[1][i];
						Wep->fPerturbIncSpeed = OgAwepData[2][i];
						Wep->fPerturbDecSpeed = OgAwepData[3][i];
						Wep->fCameraSwayXFreq = OgAwepData[4][i];
						Wep->fCameraSwayYFreq = OgAwepData[5][i];
						Wep->fZoomedPerturbIncSpeed = OgAwepData[6][i];
						Wep->fZoomedPerturbDecSpeed = OgAwepData[7][i]; 
						Wep->fTripleShotMaxCamRecoilPitch = OgAwepData[8][i];
						Wep->fTripleShotBaseCamRecoilPitch = OgAwepData[9][i];
						Wep->fTripleShotPerturbIncSpeed = OgAwepData[10][i];
						Wep->fTripleShotPerturbDecSpeed = OgAwepData[11][i];
						Wep->fBaseCamRecoilPitch = OgAwepData[12][i];
						Wep->fBaseCamRecoilAccelPitch = OgAwepData[13][i];
						Wep->dwTripleShotMinPerturb = OgAwepData[14][i];
						Wep->dwTripleShotMaxPerturb = OgAwepData[15][i];
						Wep->dwMaxPerturb = OgAwepData[16][i];
						Wep->dwMinPerturb = OgAwepData[17][i];
						Wep->dwZoomedMaxPerturb = OgAwepData[18][i];
						Wep->dwZoomedMinPerturb = OgAwepData[19][i];
					} 
				}
			}
			SetWepData = true;
		}
	}
}
Code:
hook.cpp
Code:
/*Creditos -> Black Diamond, luizimloko, mo3ad001, fatboy88, Azorbix, Gellin, Hans
Creditos Aqui ->
Nao remova os creditos adicione o seu abaixo dos meus creditos*/

#include "hook.h"

cHook hook;

unsigned int Pointer[] = { 
	0xE9 
};

void *cHook::DetourCreate( BYTE *src, const BYTE *dst )
{
	int len = 5;

	BYTE *jmp = (BYTE*)malloc( len+5 );
	DWORD dwBack;
	VirtualProtect( src, len, PAGE_EXECUTE_READWRITE, &dwBack );
	memcpy( jmp, src, len );	
	jmp += len;
	jmp[0] = Pointer[0];
	*(DWORD*)( jmp+1 ) = (DWORD)( src+len - jmp ) - 5;
	src[0] = Pointer[0];
	*(DWORD*)( src+1 ) = (DWORD)( dst - src ) - 5;
	VirtualProtect( src, len, dwBack, &dwBack );

	return( jmp-len );
}
Code:
main.cpp
Code:
/*Creditos -> Black Diamond, luizimloko, mo3ad001, fatboy88, Azorbix, Gellin, Hans
Creditos Aqui ->
Nao remova os creditos adicione o seu abaixo dos meus creditos*/

#include "main.h"

cMain main;

bool OnHack = true;

bool cMain::IsGameReady( void )
{
	if( GetModuleHandle( "d3d9.dll" ) != NULL )
		return true;

	return false;
}

bool cMain::InGame(int variable)
{
	return( (*( PBYTE )0x377F0DDC /*GameStatus*/ == 1 ) && variable );
}

void WINAPIV ConsoleCommand( const char* cmd )
{
	_asm
	{
		PUSH cmd
		MOV EAX, 0x485FC0 /*Ltclient.exe*/ 
		CALL EAX
		ADD ESP, 0x4
	}
}

typedef int( WINAPI *oPresent )( LPDIRECT3DDEVICE9 pDevice, const RECT *a, const RECT *b, HWND c, const RGNDATA *d );
oPresent pPresent;

int WINAPI gellPresent( LPDIRECT3DDEVICE9 pDevice, const RECT *a, const RECT *b, HWND c, const RGNDATA *d )
{
	_asm pushad;

	if( main.InGame( OnHack ) )
	{
		aim.AimCorrection( OnHack );

		ConsoleCommand( "SkelModelStencil 1" );
		ConsoleCommand( "FogEnable 0" );
	}

	_asm popad;

	return pPresent( pDevice, a, b, c, d );

	_asm jmp [gellPresent];
}

DWORD *cMain::FindDevice( void )
{
	DWORD hD3D9 = ( DWORD )LoadLibrary( "d3d9.dll" );

	for( DWORD i = 0, n = 0; i < 0x128000; i++ )
	{
		if( *( BYTE*)( hD3D9 + i + 0x00 ) == 0xC7 ) n++;
		if( *( BYTE*)( hD3D9 + i + 0x01 ) == 0x06 ) n++;
		if( *( BYTE*)( hD3D9 + i + 0x06 ) == 0x89 ) n++;
		if( *( BYTE*)( hD3D9 + i + 0x07 ) == 0x86 ) n++;
		if( *( BYTE*)( hD3D9 + i + 0x0C ) == 0x89 ) n++;
		if( *( BYTE*)( hD3D9 + i + 0x0D ) == 0x86 ) n++;
		
		if( n == 6 )
			return ( DWORD*)( hD3D9 + i + 2 );

		n = 0;
	}
	return NULL;
}

void cMain::Hook( void ) 
{
	DWORD * VtablePtr = main.FindDevice();
	DWORD * devicePtr = ***( DWORD****)VtablePtr;
	DWORD * VTable;
	*( DWORD*)&VTable = *( DWORD*)VtablePtr;

	pPresent = ( oPresent )hook.DetourCreate(( PBYTE)VTable[17], ( PBYTE) &gellPresent );
}

DWORD WINAPI dwMain( LPVOID lpArg )
{
	while( !cMain::IsGameReady() )
		Sleep( 25 );

	main.Hook();

	return EXIT_SUCCESS;
}

BOOL WINAPI DllMain( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	if( dwReason == DLL_PROCESS_ATTACH )
	{
		CreateThread( NULL, NULL, dwMain, NULL, NULL, NULL );
	}

	return TRUE;
}
Code:
aimcorrection.h
Code:
/*Creditos -> Black Diamond, luizimloko, mo3ad001, fatboy88, Azorbix, Gellin, Hans
Creditos Aqui ->
Nao remova os creditos adicione o seu abaixo dos meus creditos*/

#ifndef __AIM__
#define __AIM__

#pragma once

#include "includes.h"

class cAim
{
	public:
		cAim( void )
		{
			SetWepData = true;
			StoreWepData = false;
		}

		bool SetWepData, StoreWepData;

		void AimCorrection( bool Correct );

	private:
		float OgAwepData[20][500];
};

extern cAim aim;

#endif
Code:
hook.h
Code:
/*Creditos -> Black Diamond, luizimloko, mo3ad001, fatboy88, Azorbix, Gellin, Hans
Creditos Aqui ->
Nao remova os creditos adicione o seu abaixo dos meus creditos*/

#ifndef __HOOK__
#define __HOOK__

#pragma once

#include "includes.h"

class cHook
{
	public:
		static void *DetourCreate( BYTE *src, const BYTE *dst );
};

extern class cHook hook;

#endif
Code:
main.h
Code:
/*Creditos -> Black Diamond, luizimloko, mo3ad001, fatboy88, Azorbix, Gellin, Hans
Creditos Aqui ->
Nao remova os creditos adicione o seu abaixo dos meus creditos*/

#ifndef __MAIN__
#define __MAIN__

#pragma once

#include "includes.h"

class cMain
{
	public:
		static bool IsGameReady( void );

		bool InGame(int variable);

		DWORD *FindDevice( void );
		void Hook( void );
};

extern cMain main;

#endif
Virus Scan:

Virus Total

Virus Jotti

Credits

@Black Diamond
@luizimloko
@mo3ad001
@fatboy88
@azorbix
@gellin
@Hans

Approves:

@BACKD00R
@Drake
@Liz
@Polo
@.REZ
Slamming - Auto On_mpgh.net.rar2.6 MB · 50 downloads Scanning…
/ Approved
Não tem muito segredo
obrigado mais uma base que irei estudar.
tentarei ajustar algumas funções para por na nubz.
obrigado
Interessante essa função, vou ver se adiciono no menu rs
Quote Originally Posted by iMelo~* View Post
Interessante essa função, vou ver se adiciono no menu rs
Só tem 3 funções aí, sendo que 2 delas você já tem, e a outra é Aim Correction..
1 pergunta . . .
quantas funções tem isso? só o chams? poderia me manda um print com o hack aberto .. e se puder também falar todas as funções q tem nessa base ficarei grato ^^ ;S
Quote Originally Posted by rogerback View Post
1 pergunta . . .
quantas funções tem isso? só o chams? poderia me manda um print com o hack aberto .. e se puder também falar todas as funções q tem nessa base ficarei grato ^^ ;S
Baixe a base...
E vá estudando a estrutura do código !
Você com certeza vai saber que funções tem.
Quote Originally Posted by rogerback View Post
1 pergunta . . .
quantas funções tem isso? só o chams? poderia me manda um print com o hack aberto .. e se puder também falar todas as funções q tem nessa base ficarei grato ^^ ;S
Tem três funções, que são: Aim Correction, No Fog e Chams ( Nx Chams ).
Posts 1–10 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?