#include <windows.h>
#define WeaponStruct 0xCE54B0
#define ReloadAnimRatio 0xBE4
DWORD WINAPI Hacks ()
{
bool WallHack = true;
bool ReloadAnimRatio = true;
DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD dwWeapon = *(DWORD*) (CShell + WeaponStruct);
while(1)
{
if (wallhack)
{
memcpy((VOID*)0x6D49E4, "\x00\x00\x00\x00\x00\x00", 6);
}
else
{
memcpy((VOID*)0x6D49E4, "\x01\x01\x01\x01\x01\x01", 6);
}
if (reload)
{
if (dwWeapon)
{
for (int i=0; i<672; i++)
{
if ((*(DWORD*) ((*(DWORD*) (CShell+WeaponStruct)) + (4*i))) != NULL)
*(float*) ((*(DWORD*) ((*(DWORD*) (CShell+WeaponStruct)) + (4*i))) + NoReload) = 10;
}
}
}
}
bool Ready2Hook()
{
if(GetModuleHandleA("CShell.dll") != NULL
&& GetModuleHandleA("ClientFx.fxd") != NULL)
return 1;
return 0;
}
DWORD WINAPI Wait(LPVOID)
{
while(!Ready2Hook()) Sleep(200);
Hacks();
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if( dwReason == DLL_PROCESS_ATTACH )
{
MessageBoxA(0, "utan", "Injected", 0);
CreateThread(NULL, 0,(LPTHREAD_START_ROUTINE)Wait, NULL, 0, NULL);
}
return 1;
}