From 855097d6a808a5d9fb16012918533a57b5a5318b Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sun, 18 Sep 2022 15:11:16 +0200 Subject: [PATCH] Small fixes --- src/client/component/arxan.cpp | 4 ++-- src/client/component/console.cpp | 6 +++++- src/client/component/demonware.cpp | 6 ------ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/client/component/arxan.cpp b/src/client/component/arxan.cpp index 9bd3d817..a700ff57 100644 --- a/src/client/component/arxan.cpp +++ b/src/client/component/arxan.cpp @@ -441,8 +441,8 @@ namespace arxan if (current_checksum != correct_checksum) { #ifndef NDEBUG - printf("Adjusting checksum (%llX): %X -> %X\n", handler_address, - current_checksum, correct_checksum); + /*printf("Adjusting checksum (%llX): %X -> %X\n", handler_address, + current_checksum, correct_checksum);*/ #endif } diff --git a/src/client/component/console.cpp b/src/client/component/console.cpp index 429f8695..236a2483 100644 --- a/src/client/component/console.cpp +++ b/src/client/component/console.cpp @@ -145,7 +145,8 @@ namespace console utils::hook::set(game::s_wcd::SysInputLineWndProc, reinterpret_cast(SetWindowLongPtrA( *game::s_wcd::hwndInputLine, -4, reinterpret_cast(input_line_wnd_proc)))); - SendMessageA(*game::s_wcd::hwndInputLine, WM_SETFONT, reinterpret_cast(*game::s_wcd::hfBufferFont), 0); + SendMessageA(*game::s_wcd::hwndInputLine, WM_SETFONT, reinterpret_cast(*game::s_wcd::hfBufferFont), + 0); SetFocus(*game::s_wcd::hwndInputLine); game::Con_GetTextCopy(text, 0x4000); @@ -159,6 +160,9 @@ namespace console public: void post_unpack() override { + //utils::hook::jump(0x1423337F0_g, print_message); + //utils::hook::jump(0x142333660_g, print_message); + const auto self = utils::nt::library::get_by_address(sys_create_console_stub); logo = LoadImageA(self.get_handle(), MAKEINTRESOURCEA(IMAGE_LOGO), 0, 0, 0, LR_COPYFROMRESOURCE); diff --git a/src/client/component/demonware.cpp b/src/client/component/demonware.cpp index 4f95fd3b..07c92626 100644 --- a/src/client/component/demonware.cpp +++ b/src/client/component/demonware.cpp @@ -417,12 +417,6 @@ namespace demonware return ioctlsocket(s, cmd, argp); } - - BOOL internet_get_connected_state_stub(LPDWORD, DWORD) - { - // Allow offline play - return TRUE; - } } utils::hook::detour handle_auth_reply_hook;