Code:
// DevConsole.cpp : Defines the exported functions for the DLL application.
//
#include "stdafx.h"
#include "DevConsole.h"
char* devtitle = "DevConsole!";
void LoadConsole()
{
_asm mov tmpAdr, offset [devtitle]
DWORD adr;
ReadProcessMemory(GetCurrentProcess(), (LPVOID)tmpAdr, &adr, sizeof(int), NULL);
_asm
{
push [adr]
push 0
call GetInstance
mov ecx, eax
call Init
call RegisterCommands
}
MessageBoxA(0, "Welcome to DeveloperConsole!", "S4League", 0);
}
BOOL WINAPI D_Init(LPVOID lparam)
{
LoadConsole();
return TRUE;
}
void ConsoleInit()
{
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D_Init, NULL, NULL, NULL);
}