From c1efdf9b0875f2a39488a86cd838947a24fab9fc Mon Sep 17 00:00:00 2001 From: quou Date: Tue, 2 May 2023 21:02:04 +1000 Subject: Initial commit. --- malware.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 malware.c (limited to 'malware.c') diff --git a/malware.c b/malware.c new file mode 100644 index 0000000..6d9e981 --- /dev/null +++ b/malware.c @@ -0,0 +1,44 @@ +#if defined(plat_windows) + +/* Because Windows is made by retards and + * windows.h overlaps with some of my shit. */ + +#define WIN32_LEAN_AND_MEAN +#include + +#include +#include + +void platform_log(const char* message, ...) { + va_list args; + va_start(args, message); + vfprintf(stdout, message, args); + va_end(args); +} + +void platform_err(const char* message, ...) { + va_list args; + HANDLE console; + + console = GetStdHandle(STD_OUTPUT_HANDLE); + + va_start(args, message); + + SetConsoleTextAttribute(console, 4); + vfprintf(stderr, message, args); + SetConsoleTextAttribute(console, 7); + + va_end(args); +} + +void platform_abort(int code) { +#if defined(DEBUG) && defined(plat_x86) + __asm__("int3;"); +#else + exit(code); +#endif +} +#endif + +/* Because empty translation units aren't allowed. */ +void malware_dummy_() {} -- cgit v1.2.3-54-g00ecf