From d4ca18258c3ada42eaecfc3532450788a010b023 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Tue, 9 Mar 2021 18:01:43 +0100 Subject: [PATCH] Prepare umbrella emulation --- src/client/component/demonware.cpp | 7 +++++++ .../game/demonware/servers/umbrella_server.cpp | 11 +++++++++++ .../game/demonware/servers/umbrella_server.hpp | 14 ++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 src/client/game/demonware/servers/umbrella_server.cpp create mode 100644 src/client/game/demonware/servers/umbrella_server.hpp diff --git a/src/client/component/demonware.cpp b/src/client/component/demonware.cpp index 85be630..6f66e26 100644 --- a/src/client/component/demonware.cpp +++ b/src/client/component/demonware.cpp @@ -8,6 +8,7 @@ #include "game/demonware/servers/lobby_server.hpp" #include "game/demonware/servers/auth3_server.hpp" #include "game/demonware/servers/stun_server.hpp" +#include "game/demonware/servers/umbrella_server.hpp" #include "game/demonware/server_registry.hpp" #define TCP_BLOCKING true @@ -366,6 +367,7 @@ namespace demonware tcp_servers.create("aw-pc-auth3.prod.demonware.net"); tcp_servers.create("aw-pc-lobby.prod.demonware.net"); + tcp_servers.create("prod.umbrella.demonware.net"); } void post_load() override @@ -406,6 +408,11 @@ namespace demonware utils::hook::set(0x140698B69, 0xAF); // CURLOPT_SSL_VERIFYHOST utils::hook::set(0x14088D0E8, 0x0); // HTTPS -> HTTP + // HTTPS -> HTTP + utils::hook::inject(0x14003852E, "http://prod.umbrella.demonware.net/v1.0/"); + utils::hook::inject(0x14003884F, "http://prod.umbrella.demonware.net/v1.0/"); + utils::hook::inject(0x140038A07, "http://prod.umbrella.demonware.net/v1.0/"); + utils::hook::set(0x140437CC0, 0xC3); // SV_SendMatchData } diff --git a/src/client/game/demonware/servers/umbrella_server.cpp b/src/client/game/demonware/servers/umbrella_server.cpp new file mode 100644 index 0000000..cadce9d --- /dev/null +++ b/src/client/game/demonware/servers/umbrella_server.cpp @@ -0,0 +1,11 @@ +#include + +#include "umbrella_server.hpp" + +namespace demonware +{ + void umbrella_server::handle(const std::string& packet) + { + // TODO: + } +} diff --git a/src/client/game/demonware/servers/umbrella_server.hpp b/src/client/game/demonware/servers/umbrella_server.hpp new file mode 100644 index 0000000..6507270 --- /dev/null +++ b/src/client/game/demonware/servers/umbrella_server.hpp @@ -0,0 +1,14 @@ +#pragma once +#include "tcp_server.hpp" + +namespace demonware +{ + class umbrella_server : public tcp_server + { + public: + using tcp_server::tcp_server; + + private: + void handle(const std::string& packet) override; + }; +}