Code:
#include <Windows.h>
#include <iostream>
void PrintToConsole(const char* text)
{
int pushText = 0x4F7300;
__asm
{
push[text];
call pushText;
add esp, 0x4;
}
}
void hooked()
{
int showConsole = 0x515CD0;
__asm call showConsole;
PrintToConsole("------------------------------ MW3 EXTERNAL CONSOLE ------------------------------\n");
PrintToConsole("Credits: BaberZz and ZeroLimit\n");
PrintToConsole("P.D: Don't close MsgBox or console will disappear\n");
MessageBoxA(NULL, "Don't Close", "#AnonSok", 0); //I don't know how to fix console's closes without this.
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)hooked, 0, 0, 0);
}
return TRUE;
}