From 4097ed37d50533b2259051658e29046969ddfab6 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Mon, 30 May 2022 19:06:59 +0200 Subject: [PATCH] Small fixes --- src/client/component/arxan.cpp | 3 +++ src/client/component/console.cpp | 1 - src/client/main.cpp | 13 +++++++------ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/client/component/arxan.cpp b/src/client/component/arxan.cpp index 4f91ba92..f1cf40cd 100644 --- a/src/client/component/arxan.cpp +++ b/src/client/component/arxan.cpp @@ -60,6 +60,9 @@ namespace arxan L"HxD", L"cheatengine", L"Cheat Engine", + L"x96dbg", + L"x32dbg", + L"x64dbg", }; if (!string.Buffer || !string.Length) diff --git a/src/client/component/console.cpp b/src/client/component/console.cpp index 97904ccc..1847465d 100644 --- a/src/client/component/console.cpp +++ b/src/client/component/console.cpp @@ -20,7 +20,6 @@ namespace console public: void post_unpack() override { - this->terminate_runner_ = false; this->console_runner_ = utils::thread::create_named_thread("Console IO", [this] diff --git a/src/client/main.cpp b/src/client/main.cpp index ef43dc33..07bae723 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -101,6 +101,7 @@ namespace { public: patch() = default; + patch(void* source, void* target) : source_(source) { @@ -138,7 +139,7 @@ namespace } private: - void* source_{ nullptr }; + void* source_{nullptr}; uint8_t data_[15]{}; }; @@ -154,7 +155,7 @@ namespace { const utils::nt::library game{}; const auto& entry = game.get_optional_header()->DataDirectory[IMAGE_DIRECTORY_ENTRY_TLS]; - if(!entry.VirtualAddress || !entry.Size) + if (!entry.VirtualAddress || !entry.Size) { return {}; } @@ -163,7 +164,7 @@ namespace auto* callback = reinterpret_cast(tls_dir->AddressOfCallBacks); std::vector addresses{}; - while(callback && *callback) + while (callback && *callback) { addresses.emplace_back(*callback); ++callback; @@ -174,7 +175,7 @@ namespace int patch_main() { - if(!run()) + if (!run()) { return 1; } @@ -185,14 +186,14 @@ namespace void nullsub() { - } void patch_entry_point() { initialization_hooks.emplace_back(get_entry_point(), patch_main); - for(auto* tls_callback : get_tls_callbacks()) { + for (auto* tls_callback : get_tls_callbacks()) + { initialization_hooks.emplace_back(tls_callback, nullsub); } }