#include <windows.h> #include <iostream> //LoginCheck, Make a header file called "LoginCheck.h" #include "LoginCheck.h"
void HackMain (void)
{
while(1)
{
//code here
}
Sleep(200);
}
DWORD WINAPI Runner (LPVOID)
{
HackMain(); //your hackthread
return 1; //return true
}
BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
}
if (GetModuleHandleA("CShell.dll") && GetModuleHandleA("ClientFx.Fxd") && !LogIn)
{
DisableThreadLibraryCalls(hDll);
LogIn = true; Sleep(200); //LoginCheck true
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Runner, NULL, NULL, NULL); //CreateThread start Runner
}
return TRUE;
}
bool LogIn = false; //Important "false"

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
// DllMain is an optional function for you to declare.
// It serves as the entry point for any DLL
{
DisableThreadLibraryCalls(hDll);
// Make a call to DisableThreadLibraryCalls with the hModule variable
// as its argument; Doing this is an optimization trick to prevent
// needless thread attach/detach messages from triggering further calls
// to our DllMain function.
if ( dwReason == DLL_PROCESS_ATTACH )
{
//When this dll is injected into the process. this is what the dll is supposed to do.
// Null, in C Plus Plus, nothing. It is defined as 0
CreateThread(NULL, NULL, Lesson, NULL, NULL, NULL);
//It creates the thread called "Lesson" which is defined a few lines up. DWORD WINAPI Lesson (LPVOID)
}
return TRUE;
// Although the return value doesn't actually matter. You return the value TRUE or FALSE indicatinng success or failure.
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread(NULL, NULL, Lesson, NULL, NULL, NULL);
}
return TRUE;
}
BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
}
if (GetModuleHandleA("CShell.dll") && GetModuleHandleA("ClientFx.Fxd") && !LogIn)
{
DisableThreadLibraryCalls(hDll);
LogIn = true; Sleep(200); //LoginCheck true
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Runner, NULL, NULL, NULL); //CreateThread start Runner
}
return TRUE;
}

BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
//
}
if (GetModuleHandleA("CShell.dll") && GetModuleHandleA("ClientFx.Fxd") && !attached)
{
DisableThreadLibraryCalls(hDll);
attached = true;
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)hack, NULL, NULL, NULL);
}
return TRUE;
}
DWORD WINAPI Lesson (LPVOID)
// This is just a dummy function that will be the code activate the main thread
{
Main();
//Call the thread called Main
return 1;
//Finish of the thread.
}
DWORD WINAPI Lesson (LPVOID)
{
Main();
return 1;
}
