Basic Address Base [Hotkey]
This is something I found while cleaning up my Visual Studio folder. I thought it might be of some use.. It might need to be updated IDK. I use a different method now. It might have a syntax error
It might not
That might keep off some C&P'ers
[php]/*Made by UnknownCoder & Helicopter12*/
#define *address* 0x00000000
#include <windows.h> //Needed Header
HANDLE Hthread; //For address
int hack1 = 0x01; //Set address to "1" (Hex)
int hack2 = 0x00; //Set to "0"
bool getkey() //This executes when called..
{
if(GetAsyncKeyState(VK_F10)&0x8000){ //If F10 is pressed...
return true; //Turn the hack on
}
return false; //If its on turn it off
}
void memhack(PVOID address, int value, int size){
DWORD d,ds;
VirtualProtect(address, size, PAGE_EXECUTE_READWRITE, &d);
memset(address, value, size);
VirtualProtect(address,size,d,&ds);
}
void freeze()
{
while(true){
memhack((PVOID)*address*,hack1,1);
Sleep(20);
}
}
bool IsGameReadyForHook(void)
{
if(GetModuleHandle("cshell.dll") != NULL)
return true;
return false;
}
void main() //The Main function
{
while (!IsGameReadyForHook()) //Only do the following when the DLL has loaded
Sleep(20);
int threadID2;
Gthread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&freeze, NULL, 0, (LPDWORD)&threadID2);
while(true){
if(getkey()){
if(hack1 == 0x01){ //If the hack is then turn it off, and vice versa
hack1 = 0x00; //Hack off
} else {
hack1 = 0x01; //Hack on
}
}
Sleep(20);
}
}
//Just leave this here, not going to waste my time explaining what it all does, just know its needed for injecting/threading
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
int threadID;
Hthread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&main, NULL, 0, (LPDWORD)&threadID);
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
} [/php]