Small fixes

This commit is contained in:
momo5502 2022-09-18 15:11:16 +02:00
parent 2822088800
commit 855097d6a8
3 changed files with 7 additions and 9 deletions

View File

@ -441,8 +441,8 @@ namespace arxan
if (current_checksum != correct_checksum) if (current_checksum != correct_checksum)
{ {
#ifndef NDEBUG #ifndef NDEBUG
printf("Adjusting checksum (%llX): %X -> %X\n", handler_address, /*printf("Adjusting checksum (%llX): %X -> %X\n", handler_address,
current_checksum, correct_checksum); current_checksum, correct_checksum);*/
#endif #endif
} }

View File

@ -145,7 +145,8 @@ namespace console
utils::hook::set<WNDPROC>(game::s_wcd::SysInputLineWndProc, reinterpret_cast<WNDPROC>(SetWindowLongPtrA( utils::hook::set<WNDPROC>(game::s_wcd::SysInputLineWndProc, reinterpret_cast<WNDPROC>(SetWindowLongPtrA(
*game::s_wcd::hwndInputLine, -4, *game::s_wcd::hwndInputLine, -4,
reinterpret_cast<LONG_PTR>(input_line_wnd_proc)))); reinterpret_cast<LONG_PTR>(input_line_wnd_proc))));
SendMessageA(*game::s_wcd::hwndInputLine, WM_SETFONT, reinterpret_cast<WPARAM>(*game::s_wcd::hfBufferFont), 0); SendMessageA(*game::s_wcd::hwndInputLine, WM_SETFONT, reinterpret_cast<WPARAM>(*game::s_wcd::hfBufferFont),
0);
SetFocus(*game::s_wcd::hwndInputLine); SetFocus(*game::s_wcd::hwndInputLine);
game::Con_GetTextCopy(text, 0x4000); game::Con_GetTextCopy(text, 0x4000);
@ -159,6 +160,9 @@ namespace console
public: public:
void post_unpack() override 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); 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); logo = LoadImageA(self.get_handle(), MAKEINTRESOURCEA(IMAGE_LOGO), 0, 0, 0, LR_COPYFROMRESOURCE);

View File

@ -417,12 +417,6 @@ namespace demonware
return ioctlsocket(s, cmd, argp); 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; utils::hook::detour handle_auth_reply_hook;