Is this code working ? can u fix that for me , im noob in c++
- Code:
// ConsoleApplication2.cpp : Defines the exported functions for the DLL application.
//
#include "stdafx.h"
// my first program in C++
#include <Windows.h>
#define WeaponMgr 0xB65E94//
#define nochange 0xBDC//
#define NoReload 0xBD8//
DWORD WINAPI hacks(LPVOID)
{
while(1)
{
DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD* m16 = (DWORD*)((*(DWORD*)(CShell + WeaponMgr )) + 25*4);
DWORD* m4_rd = (DWORD*)((*(DWORD*)(CShell + WeaponMgr )) + 266*4);
*m16 = *m4_rd;
if (CShell + WeaponMgr)
for(int i=0; i<700; i++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL)
{
for (int j=0; j<10 ; j++)
{
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + NoReload +j*4) = 100.0f;
}
}
}
}
}
bool Ready2Hook()
{
if(GetModuleHandleA("CShell.dll") != NULL
&& GetModuleHandleA("ClientFx.fxd") != NULL)
return 1;
return 0;
}
DWORD WINAPI Wait(LPVOID)
{
while(!Ready2Hook()) Sleep(100);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)hacks, NULL, NULL, NULL);
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
MessageBoxA(0, "Message contect","Tittle!", 0);
CreateThread(0,0,(LPTHREAD_START_ROUTINE)Wait,0,0, 0);
}
return 1;
}
If (CShell + WeaponMgr)
for (int i=0; i<700; i++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL)
{
for (int j=0; j<10 ; j++)
{
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + NoReload +j*4) = 100.0f;
}
}
}
for(int i=0; i<700; i++)
#define NoReload 0xBD8//