someone help me how to fix this
is this code still working ?
Client28_3 is ok but still get error Client28_4
Code:
DWORD pWeaponMgr = *(DWORD*)(CShell + WeaponMgr);
if (isReady == false)
{
CreateBackup(CShell, WeaponMgr);
if (*(BYTE*)(CShell + Bypass28_3))
{
MakeCall((BYTE*)(CShell + Bypass28_3), (DWORD)bypass, 5);
isReady = true;
}
}
DWORD Client28_3 = DWORD(CShell + Bypass28_3 + 0x17);
if (Client28_3 != NULL)
memcpy((void*)(Client28_3), "\xE9\xE3\x01\x00\x00\x90", 6);
Code:
typedef struct _WEAPON
{
unsigned char Data[0x4000];
} WEAPON, *PWEAPON;
bool isReady = false;
PWEAPON pOldWeapons[1000];
void CreateBackup(DWORD dwCShell, DWORD dwWeaponMgr)
{
DWORD ClientFx = (DWORD)GetModuleHandleA(eCShell);
if (!ClientFx)
return;
DWORD pWeaponMgr = *(DWORD*)(dwCShell + dwWeaponMgr);
if (pWeaponMgr)
{
for (int i = 0; i < 1000; i++)
{
DWORD dwWeapon = *(DWORD*)(pWeaponMgr + (4 * i));
if (dwWeapon)
{
pOldWeapons[i] = new WEAPON;
memcpy(pOldWeapons[i], (void*)(dwWeapon), sizeof(WEAPON));
}
}
}
}
PWEAPON bypass(int index)
{
return pOldWeapons[index];
}
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;
}