From 1686efcccdeb0b3a17f850551369ef13b1be0eb6 Mon Sep 17 00:00:00 2001 From: project-bo4 Date: Tue, 7 Mar 2023 04:31:21 -0800 Subject: [PATCH] quick clean up + add libtommath exports --- source/proxy-dll/component/demonware.cpp | 3 +-- source/proxy-dll/component/exception.cpp | 3 --- source/proxy-dll/component/integrity.cpp | 7 ------ source/proxy-dll/component/platform.cpp | 8 ++++--- source/proxy-dll/component/splash.cpp | 4 +--- source/proxy-dll/definitions/discovery.cpp | 1 - source/proxy-dll/definitions/t8_engine.cpp | 2 -- source/proxy-dll/main.cpp | 2 -- source/proxy-dll/std_include.cpp | 26 ++++++++++++++++++++-- source/proxy-dll/std_include.hpp | 4 +++- 10 files changed, 34 insertions(+), 26 deletions(-) diff --git a/source/proxy-dll/component/demonware.cpp b/source/proxy-dll/component/demonware.cpp index c57379a..04f890c 100644 --- a/source/proxy-dll/component/demonware.cpp +++ b/source/proxy-dll/component/demonware.cpp @@ -1,8 +1,7 @@ #include #include "loader/component_loader.hpp" #include -#include -#include "definitions\discovery.hpp" + namespace demonware { diff --git a/source/proxy-dll/component/exception.cpp b/source/proxy-dll/component/exception.cpp index c83f571..9878e3c 100644 --- a/source/proxy-dll/component/exception.cpp +++ b/source/proxy-dll/component/exception.cpp @@ -7,11 +7,8 @@ #include #include #include - #include -#define VERSION "1.0.0" - namespace exception { namespace diff --git a/source/proxy-dll/component/integrity.cpp b/source/proxy-dll/component/integrity.cpp index d76fbcf..3b6b795 100644 --- a/source/proxy-dll/component/integrity.cpp +++ b/source/proxy-dll/component/integrity.cpp @@ -9,11 +9,6 @@ namespace integrity { namespace { -#ifndef AVOID_UNNECESSARY_CHANGES - - /* PLACE_HOLDER */ - -#endif // AVOID_UNNECESSARY_CHANGES const std::vector>& get_text_sections() { static const std::vector> text = [] @@ -315,14 +310,12 @@ namespace integrity public: void pre_start() override { -#ifndef AVOID_UNNECESSARY_CHANGES disable_tls_callbacks(); create_thread_hook.create(CreateThread, create_thread_stub); auto* get_thread_context_func = utils::nt::library("kernelbase.dll").get_proc("GetThreadContext"); get_thread_context_hook.create(get_thread_context_func, get_thread_context_stub); -#endif // AVOID_UNNECESSARY_CHANGES /************************************************************************************************************* ** TODO : There is some kind of dormant defence mechanism. works so random makes it harder to investigate diff --git a/source/proxy-dll/component/platform.cpp b/source/proxy-dll/component/platform.cpp index cc53d8a..776b0f4 100644 --- a/source/proxy-dll/component/platform.cpp +++ b/source/proxy-dll/component/platform.cpp @@ -1,10 +1,7 @@ #include #include "loader/component_loader.hpp" #include "utils/hook.hpp" -#include "component/logger.hpp" #include "WinReg.hpp" -//#include "definitions/t8_engine.hpp" -#include "definitions\discovery.hpp" namespace platform { @@ -60,6 +57,11 @@ namespace platform //PC_TextChat_Print_Hook.create(0x000000000_g, PC_TextChat_Print_Stub); // Disable useless system messages passed into chat box //BattleNet_API_RequestAppTicket_Hook.create(0x000000000_g, BattleNet_API_RequestAppTicket_stub); // Implement custom encryption token } + + int priority() override + { + return 9996; + } }; } diff --git a/source/proxy-dll/component/splash.cpp b/source/proxy-dll/component/splash.cpp index 7d844d1..1be0213 100644 --- a/source/proxy-dll/component/splash.cpp +++ b/source/proxy-dll/component/splash.cpp @@ -222,6 +222,4 @@ namespace splash } } -#ifndef AVOID_UNNECESSARY_CHANGES -REGISTER_COMPONENT(splash::component) -#endif // AVOID_UNNECESSARY_CHANGES \ No newline at end of file +REGISTER_COMPONENT(splash::component) \ No newline at end of file diff --git a/source/proxy-dll/definitions/discovery.cpp b/source/proxy-dll/definitions/discovery.cpp index 858a3e2..dacbb96 100644 --- a/source/proxy-dll/definitions/discovery.cpp +++ b/source/proxy-dll/definitions/discovery.cpp @@ -3,7 +3,6 @@ #include "loader/component_loader.hpp" #include #include -#include std::unordered_map symbols_list; diff --git a/source/proxy-dll/definitions/t8_engine.cpp b/source/proxy-dll/definitions/t8_engine.cpp index 538662e..d295e16 100644 --- a/source/proxy-dll/definitions/t8_engine.cpp +++ b/source/proxy-dll/definitions/t8_engine.cpp @@ -1,8 +1,6 @@ #include #include "definitions\t8_engine.hpp" #include "loader/component_loader.hpp" -#include -#include namespace game { diff --git a/source/proxy-dll/main.cpp b/source/proxy-dll/main.cpp index 831fcfb..a549360 100644 --- a/source/proxy-dll/main.cpp +++ b/source/proxy-dll/main.cpp @@ -6,8 +6,6 @@ #include #include #include -#include "component/logger.hpp" - namespace { diff --git a/source/proxy-dll/std_include.cpp b/source/proxy-dll/std_include.cpp index fb14fa5..50c1cec 100644 --- a/source/proxy-dll/std_include.cpp +++ b/source/proxy-dll/std_include.cpp @@ -1,6 +1,30 @@ #include #include +extern "C" +{ + int s_read_arc4random(void*, size_t) + { + return -1; + } + + int s_read_getrandom(void*, size_t) + { + return -1; + } + + int s_read_urandom(void*, size_t) + { + return -1; + } + + int s_read_ltm_rng(void*, size_t) + { + return -1; + } +} + + size_t get_base() { static auto base = size_t(utils::nt::library{}.get_ptr()); @@ -8,7 +32,6 @@ size_t get_base() return base; } - size_t operator"" _b(const size_t val) { return get_base() + val; @@ -24,7 +47,6 @@ size_t reverse_b(const void* val) return reverse_b(reinterpret_cast(val)); } - size_t operator"" _g(const size_t val) { static auto base = get_base(); diff --git a/source/proxy-dll/std_include.hpp b/source/proxy-dll/std_include.hpp index 569d7a6..e44db26 100644 --- a/source/proxy-dll/std_include.hpp +++ b/source/proxy-dll/std_include.hpp @@ -93,14 +93,16 @@ #pragma comment(lib, "iphlpapi.lib") #pragma comment(lib, "Crypt32.lib") +#include + using namespace std::literals; size_t get_base(); + size_t operator"" _b(size_t val); size_t reverse_b(size_t val); size_t reverse_b(const void* val); - size_t operator"" _g(size_t val); size_t reverse_g(size_t val); size_t reverse_g(const void* val); \ No newline at end of file