How To Fix Source Code Hack Build in C++ 2015

Posts 13 of 3 · Page 1 of 1
How To Fix Source Code Hack Build in C++ 2015
How To Fix Source Code Microsoft C++ Community 2015

#include"windows.h"

#define WeaponMgr 0x000000
#define Reload 0x000000

bool NoReload = true;

void DllMain(void)
{
DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD pWeaponMgr = *(DWORD*)(CShell+WeaponMgr);
while(1)
{
for (int i=0; i<445; i++)
{
DWORD Weapon = (*(DWORD*)(pWeaponMgr + (4*i)));
if(Weapon != NULL)
{
if(NoReload)
{
*(float*)(Weapon+Reload)=(float)100;
}
}
}
}
}
/*DLL MAIN*/
BOOL APIENTRY DllMain(HMODULE hmodule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
DllMain();
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
Code:
#include <windows.h>

DWORD FindPattern( DWORD dwStart, DWORD dwLen, BYTE *pszPatt, char pszMask[] )
{
	unsigned int i = NULL;
	int iLen = strlen( pszMask ) - 1;

	for( DWORD dwRet = dwStart; dwRet < dwStart + dwLen; dwRet++ )
	{
		if( *( BYTE * ) dwRet == pszPatt[ i ] || pszMask[ i ] == '?' )
		{
			if( pszMask[ i + 1 ] == '\0' )
				return( dwRet - iLen );
			i++;
		}
		else i = NULL;
	}

	return NULL;
}

DWORD getWeaponManager( DWORD CShell )
{
	DWORD WeaponManager = FindPattern( CShell, 0x1321000, ( PBYTE ) "\x8B\x0D\x00\x00\x00\x00\x8B\x04\xB1\xD9\xE8", "xx????xxxxx" );
		
	if( WeaponManager != 0 )
	{
		WeaponManager = *( DWORD * ) ( WeaponManager + 0x02 );
		WeaponManager = *( DWORD * ) ( WeaponManager );

		return WeaponManager;
	}

	return 0;
}

DWORD WINAPI startThread( LPVOID lpParameter )
{
	while( 1 )
	{
		DWORD CShell = ( DWORD ) GetModuleHandle( "CShell.dll" );

		if( CShell != 0 )
		{
			DWORD ClientFX = ( DWORD ) GetModuleHandle( "ClientFX.fxd" );

			if( ClientFX != 0 )
			{
				if( getWeaponManager( CShell ) != 0 )
				{
					for( int i = 0; i <= 1766; i++ )
					{
						DWORD WeaponByIndex = *( DWORD * ) ( getWeaponManager( CShell ) + 4 * i );

						if( WeaponByIndex != 0 )
							*( float * ) ( WeaponByIndex + 0x1058 ) = 9.0f;
					}
				}
			}
		}

		Sleep( 100 );
	}

	return 0;
}

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					 )
{
	switch ( ul_reason_for_call )
	{
	case DLL_PROCESS_ATTACH:

		CreateThread( 0, 0, &startThread, 0, 0, 0 );

	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		break;
	}

	return TRUE;
}
#define WeaponPointer 0x000000 // (B?n t? tìm Pointer! vì có th? thay d?i)
#define NoReload 0x0000 // (Nhu Pointer, hi?u s? cung có th? b? thay d?i)

bool khongthaydan = true; // t? khongthaydan không làm cho nó cùng tên v?i các t? du?c d?nh nghia khác, vì nhu dz? s? x?y ra l?i (b?n có th? d?t t? gì cung du?c)).

DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll"); // Khi Csheell du?c s? d?ng thì nó s? hi?u nó là Cshell.
DWORD pWeaponMgr = *(DWORD*)(CShell + WeaponPointer); // Khi pWeaponMgr du?c s? d?ng , thì nó s? hi?u CShell v?i Weapon Pointer

if(khongthaydan)
{
if (pWeaponMgr)
{
for(int i=0; i<445; i++) // S? vòng c?a Vu khí khi thay d?n và 445 là s? c?a vu khí khi thay d?n
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + NoReload) =100; // Và cu?i cùng là K?t qu? 100 là k?t qu? c?a No Reload
}
}
}

------------------

#define WeaponPointer 0x000000
#define WeaponChangeDelay 0x0000

bool thaydoivk = true;

DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD pWeaponMgr = *(DWORD*)(CShell + WeaponPointer);

if(thaydoivk)
{
if (pWeaponMgr)
{
for(int i=0; i<445; i++)
{
if((*(DWORD*)((*(DWORD*)(CShell+pWeaponMgr))+(4*i) )) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+pWeaponMgr) )+(4*i))) +WeaponChangeDelay) = 100;
}
}
}
Posts 13 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?