Would be a-lot better if you wrap it as "Code" or "PHP"
to start off I use the bool IsGameReadyForHook
if(GetModuleHandleA( "bugtrap.dll" ) != NULL
&&(GetModuleHandleA( "dbghelp.dll" ) != NULL
&&(GetModuleHandleA( "kncfirewall.dll" ) != NULL))
} This identifies when the game is up and running and tells your dll to activate.
Then after I give my PushToConsole definition.
void __cdecl PushToConsole( const char* szCommand )
DWORD *LTClient = ( DWORD* )( 0x3718BF20 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
add esp, 4;
} This tells the program if PushToConsole("~~~"); then make the program that you injected the Dll into to do the commands that are in you PushToConsole parenthesis.
Next I make my main void where all the meat of my program goes.
} (I made with two old PTC commands.)
After I make my dwHackThread that tells you dll what to do when injected.
DWORD WINAPI dwHackThread(LPVOID)
while( !IsGameReadyForHook() )
} In this code i told it to spam the IsGameReadyForHook which indicates when the game is open and so your computer will not lagg i made a 100 milisecond wait. After i put main(); to tell them to use the main(); when it is activated and return 0; when you are finished.
Last I make the Injection function so when you inject it this is what it does.
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
if ( dwReason == DLL_PROCESS_ATTACH )
CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
MessageBoxA(0, "Hack Injection Succeded (Coded By: T7076o6o", "Succesful", 0);
} (T7076o6o is my screen or hack testing name in GC feel free to friend him IDC)