Ive been seeing alot of bases lately that are very nice but not noob freindly at all.. soo to make a more noob freindly hack i am going to show you a few organization tips!
Heres a Origanal hotkey base thanks to Blood and Lauwy.
Code:
#include <windows.h>
#include <iostream>
using namespace std;
void __cdecl PushToConsole(char* szVal )
{
DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
if( dwCShell != NULL )
{
DWORD *LTClient = ( DWORD* )( (dwCShell + 0x299D40) );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F8 );
_asm
{
push szVal;
call CONoff;
add esp, 4;
}
}
}
BOOL WINAPI Main (LPVOID)
{
bool boxes = true;
bool nosky = false;
bool worldframe = false;
bool playerframe = false;
bool nogun = false;
bool Skeleton = false;
bool FogEnable = false;
bool CursorCenter = false;
while(1)
{
__asm pushad;
if(GetAsyncKeyState(VK_NUMPAD1)&1)
{
boxes = !boxes;
}
if(GetAsyncKeyState(VK_NUMPAD2)&1)
{
nosky = !nosky;
}
if(GetAsyncKeyState(VK_NUMPAD3)&1)
{
worldframe = !worldframe;
}
if(GetAsyncKeyState(VK_NUMPAD4)&1)
{
playerframe = !playerframe;
}
if(GetAsyncKeyState(VK_NUMPAD5)&1)
{
nogun = !nogun;
}
if(GetAsyncKeyState(VK_NUMPAD6)&1)
{
Skeleton = !Skeleton;
}
if(GetAsyncKeyState(VK_NUMPAD7)&1)
{
FogEnable = !FogEnable;
}
if(GetAsyncKeyState(VK_NUMPAD8)&1)
{
CursorCenter = !CursorCenter;
}
if (CursorCenter)
PushToConsole("CursorCenter 1");
else
PushToConsole("CursorCenter 0");
if (FogEnable)
PushToConsole("FogEnable 1");
else
PushToConsole("FogEnable 0");
if (Skeleton) {
PushToConsole("ModelDebug_DrawSkeleton 1");
}
else {
PushToConsole("ModelDebug_DrawSkeleton 0");
}
if (boxes)
PushToConsole("ModelDebug_DrawBoxes 1");
else
PushToConsole("ModelDebug_DrawBoxes 0");
if (nosky)
PushToConsole("DrawSky 0");
else
PushToConsole("DrawSky 1");
if (worldframe)
PushToConsole("WireFrame 1");
else
PushToConsole("WireFrame 0");
if (playerframe)
PushToConsole("WireFrameModels 1");
else
PushToConsole("WireFrameModels 0");
if (nogun)
PushToConsole("DrawGuns 0");
else
PushToConsole("DrawGuns 1");
__asm popad;
Sleep(100);
}
}
bool Ready(void)
{
if( GetModuleHandleA("CShell.dll")!= NULL)
return true;
return false;
}
DWORD WINAPI dwMainThread(LPVOID)
{
while (!Ready())
Sleep(200);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Main, NULL, NULL, NULL);
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
MessageBoxA(0, "Coded By lauwy", "Injected", 0);
CreateThread(NULL, NULL, dwMainThread, NULL, NULL, NULL);
}
return TRUE;
}
Now here is My Broken Down Version of Their base/hack
Here we see their Included Files:
Code:
#include <windows.h>
#include <iostream>
Namespaces allows us to group a set of global classes, objects and/or functions under a name. If you specify using namespace std then you don't have to put std:: throughout your code. ( wich is helpful in most cases! )
Code:
using namespace std;
This is where we call our PushToConsole or PTC Commands
Code:
void __cdecl PushToConsole(char* szVal )
{
DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
if( dwCShell != NULL )
{
DWORD *LTClient = ( DWORD* )( (dwCShell + 0x299D40) );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F8 );
_asm
{
push szVal;
call CONoff;
add esp, 4;
}
}
}
This is where we set are Bool Statements for our loop ( remember loops dont work unless the boolean returns a value!
Code:
BOOL WINAPI Main (LPVOID)
{
bool boxes = true;
bool nosky = false;
bool worldframe = false;
bool playerframe = false;
bool nogun = false;
bool Skeleton = false;
bool FogEnable = false;
bool CursorCenter = false;
while(1)
This is where we Put all our hacks in our case PTC and get our hotkeys for the hacks.
Code:
{
__asm pushad;
if(GetAsyncKeyState(VK_NUMPAD1)&1)
{
boxes = !boxes;
}
if(GetAsyncKeyState(VK_NUMPAD2)&1)
{
nosky = !nosky;
}
if(GetAsyncKeyState(VK_NUMPAD3)&1)
{
worldframe = !worldframe;
}
if(GetAsyncKeyState(VK_NUMPAD4)&1)
{
playerframe = !playerframe;
}
if(GetAsyncKeyState(VK_NUMPAD5)&1)
{
nogun = !nogun;
}
if(GetAsyncKeyState(VK_NUMPAD6)&1)
{
Skeleton = !Skeleton;
}
if(GetAsyncKeyState(VK_NUMPAD7)&1)
{
FogEnable = !FogEnable;
}
if(GetAsyncKeyState(VK_NUMPAD8)&1)
{
CursorCenter = !CursorCenter;
}
if (CursorCenter)
PushToConsole("CursorCenter 1");
else
PushToConsole("CursorCenter 0");
if (FogEnable)
PushToConsole("FogEnable 1");
else
PushToConsole("FogEnable 0");
if (Skeleton) {
PushToConsole("ModelDebug_DrawSkeleton 1");
}
else {
PushToConsole("ModelDebug_DrawSkeleton 0");
}
if (boxes)
PushToConsole("ModelDebug_DrawBoxes 1");
else
PushToConsole("ModelDebug_DrawBoxes 0");
if (nosky)
PushToConsole("DrawSky 0");
else
PushToConsole("DrawSky 1");
if (worldframe)
PushToConsole("WireFrame 1");
else
PushToConsole("WireFrame 0");
if (playerframe)
PushToConsole("WireFrameModels 1");
else
PushToConsole("WireFrameModels 0");
if (nogun)
PushToConsole("DrawGuns 0");
else
PushToConsole("DrawGuns 1");
__asm popad;
Sleep(100);//So we dont Overload our PC
}
}
If this parameter is NULL, GetModuleHandle returns a handle to the file used to create the calling process ( in our case we return cshell.dll )
Code:
bool Ready(void)
{
if( GetModuleHandleA("CShell.dll")!= NULL)
return true;
return false;
}
Here we begin our create Thread function
Code:
DWORD WINAPI dwMainThread(LPVOID)
{
while (!Ready())
Sleep(200);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Main, NULL, NULL, NULL);
return 0;
}
Here we disableThreadLibraryCalls also we print our message box on the users screen.
Code:
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
MessageBoxA(0, "Coded By lauwy", "Injected", 0);
CreateThread(NULL, NULL, dwMainThread, NULL, NULL, NULL);
}
return TRUE;
}
Btw i did not go into the for loop as i dont really like loops that much
Here is our new organized Code!
Code:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Include~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
#include <windows.h>
#include <iostream>
using namespace std;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~PTC call~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
void __cdecl PushToConsole(char* szVal )
{
DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
if( dwCShell != NULL )
{
DWORD *LTClient = ( DWORD* )( (dwCShell + 0x299D40) );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F8 );
_asm
{
push szVal;
call CONoff;
add esp, 4;
}
}
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Bool Statments~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
BOOL WINAPI Main (LPVOID)
{
bool boxes = true;
bool nosky = false;
bool worldframe = false;
bool playerframe = false;
bool nogun = false;
bool Skeleton = false;
bool FogEnable = false;
bool CursorCenter = false;
while(1)
{
__asm pushad;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Hotkeys~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
if(GetAsyncKeyState(VK_NUMPAD1)&1)
{
boxes = !boxes;
}
if(GetAsyncKeyState(VK_NUMPAD2)&1)
{
nosky = !nosky;
}
if(GetAsyncKeyState(VK_NUMPAD3)&1)
{
worldframe = !worldframe;
}
if(GetAsyncKeyState(VK_NUMPAD4)&1)
{
playerframe = !playerframe;
}
if(GetAsyncKeyState(VK_NUMPAD5)&1)
{
nogun = !nogun;
}
if(GetAsyncKeyState(VK_NUMPAD6)&1)
{
Skeleton = !Skeleton;
}
if(GetAsyncKeyState(VK_NUMPAD7)&1)
{
FogEnable = !FogEnable;
}
if(GetAsyncKeyState(VK_NUMPAD8)&1)
{
CursorCenter = !CursorCenter;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Hacks/PTC~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
if (CursorCenter)
PushToConsole("CursorCenter 1");
else
PushToConsole("CursorCenter 0");
if (FogEnable)
PushToConsole("FogEnable 1");
else
PushToConsole("FogEnable 0");
if (Skeleton) {
PushToConsole("ModelDebug_DrawSkeleton 1");
}
else {
PushToConsole("ModelDebug_DrawSkeleton 0");
}
if (boxes)
PushToConsole("ModelDebug_DrawBoxes 1");
else
PushToConsole("ModelDebug_DrawBoxes 0");
if (nosky)
PushToConsole("DrawSky 0");
else
PushToConsole("DrawSky 1");
if (worldframe)
PushToConsole("WireFrame 1");
else
PushToConsole("WireFrame 0");
if (playerframe)
PushToConsole("WireFrameModels 1");
else
PushToConsole("WireFrameModels 0");
if (nogun)
PushToConsole("DrawGuns 0");
else
PushToConsole("DrawGuns 1");
__asm popad;
Sleep(100);
}
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Callbacks~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
bool Ready(void)
{
if( GetModuleHandleA("CShell.dll")!= NULL)
return true;
return false;
}
DWORD WINAPI dwMainThread(LPVOID)
{
while (!Ready())
Sleep(200);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Main, NULL, NULL, NULL);
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
MessageBoxA(0, "Coded By lauwy", "Injected", 0);// edit this with your name!
CreateThread(NULL, NULL, dwMainThread, NULL, NULL, NULL);
}
return TRUE;
}
Credits to me for writing tutorial and Organizing
Blood and Lauwy for source code
Hope i helped!