From 16b4fd429ecaf259c4e2bd7307431f3c855812e8 Mon Sep 17 00:00:00 2001 From: boris Date: Tue, 1 Jan 2019 21:04:09 +1300 Subject: yep --- csgo-loader/csgo-client/Security/RuntimeSecurity.cpp | 11 ++++------- csgo-loader/csgo-client/UserExperience/UserInterface.cpp | 6 ++---- csgo-loader/csgo-client/UserExperience/UserInterface.hpp | 6 ++++-- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/csgo-loader/csgo-client/Security/RuntimeSecurity.cpp b/csgo-loader/csgo-client/Security/RuntimeSecurity.cpp index f7c1cc2..572c9b1 100644 --- a/csgo-loader/csgo-client/Security/RuntimeSecurity.cpp +++ b/csgo-loader/csgo-client/Security/RuntimeSecurity.cpp @@ -315,7 +315,7 @@ namespace Security for(size_t j{}; j < Length; ++j) { if(strstr(DriverName, BlackListedDrivers[j])) - ERROR_ASSERT(BlackListReasons[j]); + SecurityCallback(BlackListReasons[j]); } } } @@ -404,14 +404,11 @@ namespace Security if(!TriggeredCallback) { - // You can use the reason parameters to debug the security in case // something weird starts going on with it. - char Buffer[2048]; - sprintf_s(Buffer, STR("Security callback was called. Reason parameter: \"%s\"\n"), Reason); - - MessageBoxA(0, Buffer, "", MB_ICONINFORMATION | MB_OK); - + std::ofstream File("loader.err"); + File.write(Reason, strlen(Reason)); + File.close(); // The process will straight up die on Release mode. // Compile with FuckMSVC to debug this. diff --git a/csgo-loader/csgo-client/UserExperience/UserInterface.cpp b/csgo-loader/csgo-client/UserExperience/UserInterface.cpp index 24f92c4..d36fb8d 100644 --- a/csgo-loader/csgo-client/UserExperience/UserInterface.cpp +++ b/csgo-loader/csgo-client/UserExperience/UserInterface.cpp @@ -70,8 +70,6 @@ namespace UserExperience return result; } - void UserInterface::RunUiFrame() - { - g_window.on_frame(); - } + void UserInterface::RunUiFrame() { g_window.on_frame(); } + HWND UserInterface::GetWindow() { return g_window.get_hwnd(); } } \ No newline at end of file diff --git a/csgo-loader/csgo-client/UserExperience/UserInterface.hpp b/csgo-loader/csgo-client/UserExperience/UserInterface.hpp index aaa4b10..dc18b57 100644 --- a/csgo-loader/csgo-client/UserExperience/UserInterface.hpp +++ b/csgo-loader/csgo-client/UserExperience/UserInterface.hpp @@ -66,6 +66,8 @@ namespace UserExperience // Creates an UI thread, call only once. void RunUiFrame(); + + HWND GetWindow(); }; using UserInterfacePtr = std::unique_ptr; @@ -75,5 +77,5 @@ extern UserExperience::UserInterfacePtr UserInterface; // Sick macros, retard. -#define ERROR_ASSERT(Error, ...) { char Buffer[1024 * 16]; sprintf_s(Buffer, sizeof Buffer, Error, __VA_ARGS__); MessageBoxA(0, Buffer, "", MB_ICONERROR); ExitProcess(0); } -#define INFO_ASSERT(Error, ...) { char Buffer[1024 * 16]; sprintf_s(Buffer, sizeof Buffer, Error, __VA_ARGS__); MessageBoxA(0, Buffer, "", MB_OK); ExitProcess(0); } +#define ERROR_ASSERT(Error, ...) { char Buffer[1024 * 16]; sprintf_s(Buffer, sizeof Buffer, Error, __VA_ARGS__); MessageBoxA(UserInterface->GetWindow(), Buffer, "", MB_SYSTEMMODAL | MB_ICONERROR); ExitProcess(0); } +#define INFO_ASSERT(Error, ...) { char Buffer[1024 * 16]; sprintf_s(Buffer, sizeof Buffer, Error, __VA_ARGS__); MessageBoxA(UserInterface->GetWindow(), Buffer, "", MB_SYSTEMMODAL | MB_OK); ExitProcess(0); } -- cgit v1.2.3