/*Includes*/
#include <windows.h>
#include <Winuser.h>
#include <stdio.h>
#include <fstream>
#include <stdio.h>
/*Hacks*/
int nofog = 0;
int showfps = 0;
int aim = 0;
/*Don't Change This*/
int hack[50];//To Reduce Lag
/*Defines*/
#define EngLtc 0x485FA0 //Here The Address of Engine LTC
#define GameStatus 0x377B11B0 //Defining "GameStatus" - Used to check if you're in-game, in lobby, etc etc.
/*Defining SuperBullets Address*/
#define SuperBullets 0x373F9C36
/*Defining WeaponRange Addresses*/
#define WeaponRange1 0x373FF219
#define WeaponRange2 0x373FF599
/*Defining Rapid Fire Address*/
#define RapidTest 0x373FFC8E
/*Defining No Recoil Addresses*/
#define Recoil1 0x3738B890
#define Recoil2 0x374AAE09
#define Recoil3 0x3738B8A4
#define Recoil4 0x3738B8A7
void __cdecl PassCMD(const char* cCommand)//PassCMDToConsole (PTC) Function
{
void* vSetVar = (void*)EngLtc;
_asm
{
Push cCommand
call vSetVar
add esp, 4
}
}
bool Memory( void * pDest, char * szPatch, size_t sSize )//Function to modify memory address (NOP)
{
DWORD dwOrgProtect = NULL;
if ( !VirtualProtect ( pDest, sSize, PAGE_EXECUTE_READWRITE, &dwOrgProtect ))
return FALSE;
memcpy( pDest, szPatch, sSize );
VirtualProtect( pDest, sSize, dwOrgProtect, NULL );
return TRUE;
}
/*Reduce Lag*/
bool doNXChamOnce = true;
bool doOnce = true;
//Hacks Below
void Hack()
{
if(*(BYTE*)GameStatus == 1){
//PTC Hacks Below
if(GetAsyncKeyState(VK_NUMPAD1) &1) //Just C+P This and change the Key and Hack
{
if(doNXChamOnce) //NX Chams
{
PassCMD("SkelModelStencil 1");
doNXChamOnce = false;
}
}else{
PassCMD("SkelModelStencil 0");
doNXChamOnce = true;
}
if(GetAsyncKeyState(VK_NUMPAD2) &1)//No Fog
{
if (hack[6] != nofog)
PassCMD("FogEnable 0");
hack[6] = nofog;
} else {
if (hack[6] != nofog)
PassCMD("FogEnable 1");
hack[6] = nofog;
}
if(GetAsyncKeyState(VK_NUMPAD3) &1)//Show FPS
{
if (hack[8] != showfps)
PassCMD("ShowFps 1");
hack[8] = showfps;
} else {
if (hack[8] != showfps)
PassCMD("ShowFps 0");
hack[8] = showfps;
}
if(GetAsyncKeyState(VK_NUMPAD4) &1)//Aim Correction
{
if (hack[11] != aim)
PassCMD("WeaponSway 0.000000" );
PassCMD("PerturbRotationEffect 0.000000" );
PassCMD("PerturbIncreaseSpeed 0.000000" );
PassCMD("PerturbWalkPercent 0.000000" );
PassCMD("PerturbFiringIncreaseSpeed 0.000000" );
PassCMD("CamDamage 0" );
Memory((LPVOID)Recoil1, "\x90\x90\x90", 3);
Memory((LPVOID)Recoil2, "\x90\x90\x90", 3);
Memory((LPVOID)Recoil3, "\x90\x90\x90", 3);
Memory((LPVOID)Recoil4, "\x90\x90\x90", 3);
hack[11] = aim;
} else {
if (hack[11] != aim)
PassCMD("WeaponSway 1.000000" );
PassCMD("PerturbRotationEffect 3.000000" );
PassCMD("PerturbIncreaseSpeed 3.000000" );
PassCMD("PerturbWalkPercent 0.500000" );
PassCMD("PerturbFiringIncreaseSpeed 3.000000" );
PassCMD("CamDamage 1" );
PassCMD("CamDamagePitch 0");
PassCMD("CamDamageRoll 0");
PassCMD("CamDamageTime1 0");
PassCMD("CamDamageTime2 0");
PassCMD("CamDamageMinPitchVal 0");
PassCMD("CamDamageMaxPitchVal 0");
PassCMD("CamDamageMinRollVal 0");
PassCMD("CamDamageMaxRollVal 0");
PassCMD("CamDamagePitchMin 0");
PassCMD("CamDamageRollMin 0");
Memory((LPVOID)Recoil1, "\xD8\x66\x58", 3);
Memory((LPVOID)Recoil2, "\xD9\x46\x54", 3);
Memory((LPVOID)Recoil3, "\xD9\x5E\x58", 3);
Memory((LPVOID)Recoil4, "\xD9\x5E\x4C", 3);
hack[11] = aim;
}
}
//Memory Hacks Below
if(GetAsyncKeyState(VK_NUMPAD5) &1 && *(BYTE*)GameStatus == 1)//SuperBullets
{
Memory((LPVOID)SuperBullets, "\x33\xC0\x90", 3);
doOnce = false;
} else {
Memory((LPVOID)SuperBullets, "\x0F\x94\xC0", 3);
doOnce = true;
}
if (GetAsyncKeyState(VK_NUMPAD6) &1 && *(BYTE*)GameStatus == 1)//Weapon Range
{
Memory((LPVOID)WeaponRange1, "\xB8\x00\x00\x00\x10\x90", 6);
Memory((LPVOID)WeaponRange2, "\xB8\x00\x00\x00\x10\x90", 6);
doOnce = false;
}else{
Memory((LPVOID)WeaponRange1, "\x8B\x80\xC8\x02\x00\x00", 6);
Memory((LPVOID)WeaponRange2, "\x8B\x80\xC8\x02\x00\x00", 6);
doOnce = true;
}
if(GetAsyncKeyState(VK_NUMPAD7) &1 && *(BYTE*)GameStatus == 1)//Rapid Fire
{
Memory((LPVOID)RapidTest, "\x90\x90", 2);
doOnce = false;
} else {
Memory((LPVOID)RapidTest, "\x74\x3E", 2);
doOnce = true;
}
}
bool IsGameReadyForHook(void)//Checks to see if the game is ready for Hook
{
if( GetModuleHandleW( L"CShell.dll" ) != NULL )
return true;
return false;
}
DWORD WINAPI dwHackThread(LPVOID)
{
while( !IsGameReadyForHook() )
Sleep(100);
Hack();
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
MessageBoxA( NULL, "Do you hate PhoojsXProjects" , "", MB_YESNO| MB_ICONWARNING);
{
CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
}
return TRUE;
}