======================================
h.main.cpp===============================
#include <Windows.h>
#include <d3d9.h>
#include <d3dx9.h>
#include <process.h>
#include <stdio.h>
#include <fstream>
#include "hXOR.h"
#include "MakeCall.h"
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
BOOL IsGameHooked ()
{
if(GetModuleHandleA(EncCShell) != NULL && GetModuleHandleA(EncClient)!= NULL)
return true;
return false;
}
bool InstantReload = true ; //False artinya Off
bool InstantChange = true ; //False artinya Off
bool NoWeaponRecoil = true ;
DWORD CShell = (DWORD) GetModuleHandleA(EncCShell);
DWORD pWeaponMgr = *(DWORD*) ( CShell + 0x104DD74 );
void HookThread ( LPVOID)
{
while (!IsGameHooked())
Sleep(250);
while ( true )
{
if (isReady == false)
{
backup(CShell,0x104DD74);
if (*(BYTE*)(CShell+0x3ABCC5))
{
MakeCall((BYTE*)(CShell+0x3ABCC5), (DWORD)bypass, 5);
isReady = true;
for(int i=0; i<999; i++)
{
DWORD WeaponHooked = *(DWORD*) ( pWeaponMgr + (4*i ) );
if (WeaponHooked)
{
if ( InstantReload ) *(float*) ( WeaponHooked + 0xC38 ) = 100;
if ( InstantChange ) *(float*) ( WeaponHooked + 0xC3C ) = 100;
for ( int y=0; y<9; y++ )
{
if ( NoWeaponRecoil )
{
*(float*) ( WeaponHooked + ( 0xEFC + (4*y))) = 0.0f;
*(float*) ( WeaponHooked + ( 0x11CC + (4*y))) = 0.0f;
*(float*) ( WeaponHooked + ( 0x1064 + (4*y))) = 0.0f;
*(float*) ( WeaponHooked + ( 0x370C + (4*y))) = 0.0f;
*(float*) ( WeaponHooked + ( 0x352C + (4*y))) = 0.0f;
*(float*) ( WeaponHooked + ( 0x53C + (4*y))) = 0.0f;
}
}
}
}
}
}
}
}
BOOL WINAPI DllMain( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls( hDll );
if( dwReason == DLL_PROCESS_ATTACH )
{
MessageBox(0, "Chibi-chiber Comunity Yuzra45", "By Yuzra45", MB_OK + MB_ICONASTERISK);
CreateThread(0,0,(LPTHREAD_START_ROUTINE)HookThrea d,0,0,0);
char strDLLName [_MAX_PATH];
GetModuleFileName(hDll, strDLLName , _MAX_PATH);
if (strstr(strDLLName,"Yuzra45.dll") <= 0) {//Tuliskan sesuai nama DLL kamu!
MessageBoxA(0, "Mohon untuk mengembalikan sesuai nama aslinya! \n \n Terima Kasih : INDO-CROSSFIRE","PERINGATAN!", MB_OK + MB_ICONSTOP );
Beep (5000,500);
}
}
return TRUE;
}
======================================
MakeCall.h===============================
bool isReady = false;
typedef struct
{
BYTE Data[0x3000];
} WeaponMgrCopy;
WeaponMgrCopy* Weapons[800];
void backup(DWORD CShell,DWORD WeaponMgr)
{
DWORD pWeaponMgr = *(DWORD*)(CShell+WeaponMgr );
for(int i=0;i<=800;i++)
{
DWORD Weapon = (*(DWORD*)(pWeaponMgr + (4*i)));
if (Weapon != NULL)
{
Weapons[i] = new WeaponMgrCopy;
memcpy(Weapons[i], (void*)(Weapon), 0x1400);
}
}
}
WeaponMgrCopy* bypass (int GunIndexNR)
{
return Weapons[GunIndexNR];
}
void MakeCall(BYTE* paddress, DWORD yourfunction, DWORD dwlen)
{
DWORD dwOldProtect, dwBkup, dwRelAddr;
VirtualProtect(paddress, dwlen, PAGE_EXECUTE_READWRITE, &dwOldProtect);
dwRelAddr = (DWORD) (yourfunction - (DWORD) paddress) - 5;
*paddress = 0xE8;
*((DWORD*) (paddress + 0x1)) = dwRelAddr;
for(DWORD x = 0x5; x < dwlen; x++) *(paddress + x) = 0x90;
VirtualProtect(paddress, dwlen, dwOldProtect, &dwBkup);
return;
}
HELP PLEASE ME PLEASE
WHY Noreload NOrecoil NoChange NOT WORK AFTER INJECT.