From f1a6393e000f1b6e73fb00c60bb738074563ea0a Mon Sep 17 00:00:00 2001 From: _xeroxz Date: Tue, 9 Mar 2021 21:36:02 -0800 Subject: [PATCH] added console example/macros you need to define --- Examples/DemoDll/Theodosius.h | 3 +++ Examples/DemoDll/main.cpp | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/Examples/DemoDll/Theodosius.h b/Examples/DemoDll/Theodosius.h index 9a91c72..17c3f42 100644 --- a/Examples/DemoDll/Theodosius.h +++ b/Examples/DemoDll/Theodosius.h @@ -1,6 +1,9 @@ #pragma once #define WINUSERAPI +#define _KERNEL32_ +#define _ACRTIMP #include +#include #define ObfuscateRoutine __declspec(code_seg(".theo"), noinline) #define MutateRoutine __declspec(code_seg(".theo1"), noinline) diff --git a/Examples/DemoDll/main.cpp b/Examples/DemoDll/main.cpp index 1a26e0d..a1f579e 100644 --- a/Examples/DemoDll/main.cpp +++ b/Examples/DemoDll/main.cpp @@ -3,6 +3,13 @@ ObfuscateRoutine extern "C" int ModuleEntry() { + AllocConsole(); + freopen("conin$", "r", stdin); + freopen("conout$", "w", stdout); + freopen("conout$", "w", stderr); + printf("hello world\n"); + getchar(); + MessageBoxA(0, "Demo", "Hello From Obfuscated Routine!", 0); UsermodeMutateDemo(); UsermodeNoObfuscation();