2021-09-06 18:40:37 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#define BINARY_PAYLOAD_SIZE 0x12000000
|
2023-03-07 13:34:33 -05:00
|
|
|
#define BASE_ADDRESS 0x140000000
|
2022-08-25 22:00:20 -04:00
|
|
|
#define INJECT_HOST_AS_LIB
|
2021-09-06 18:40:37 -04:00
|
|
|
|
2023-03-07 13:34:33 -05:00
|
|
|
#define RVA(ptr) static_cast<std::uint32_t>(reinterpret_cast<std::size_t>(ptr) - BASE_ADDRESS)
|
|
|
|
|
2021-09-06 18:40:37 -04:00
|
|
|
#pragma warning(push)
|
|
|
|
#pragma warning(disable: 4100)
|
|
|
|
#pragma warning(disable: 4127)
|
|
|
|
#pragma warning(disable: 4244)
|
|
|
|
#pragma warning(disable: 4458)
|
|
|
|
#pragma warning(disable: 4702)
|
|
|
|
#pragma warning(disable: 4996)
|
|
|
|
#pragma warning(disable: 5054)
|
2022-02-17 14:22:28 -05:00
|
|
|
#pragma warning(disable: 5056)
|
2021-09-06 18:40:37 -04:00
|
|
|
#pragma warning(disable: 6011)
|
|
|
|
#pragma warning(disable: 6297)
|
|
|
|
#pragma warning(disable: 6385)
|
|
|
|
#pragma warning(disable: 6386)
|
|
|
|
#pragma warning(disable: 6387)
|
|
|
|
#pragma warning(disable: 26110)
|
|
|
|
#pragma warning(disable: 26451)
|
|
|
|
#pragma warning(disable: 26444)
|
|
|
|
#pragma warning(disable: 26451)
|
|
|
|
#pragma warning(disable: 26489)
|
|
|
|
#pragma warning(disable: 26495)
|
|
|
|
#pragma warning(disable: 26498)
|
|
|
|
#pragma warning(disable: 26812)
|
|
|
|
#pragma warning(disable: 28020)
|
|
|
|
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
|
|
|
|
#include <Windows.h>
|
|
|
|
#include <MsHTML.h>
|
|
|
|
#include <MsHtmHst.h>
|
|
|
|
#include <ExDisp.h>
|
|
|
|
#include <WinSock2.h>
|
|
|
|
#include <WS2tcpip.h>
|
|
|
|
#include <corecrt_io.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <shellapi.h>
|
|
|
|
#include <csetjmp>
|
|
|
|
#include <ShlObj.h>
|
|
|
|
#include <winternl.h>
|
|
|
|
#include <VersionHelpers.h>
|
|
|
|
#include <Psapi.h>
|
|
|
|
#include <urlmon.h>
|
|
|
|
#include <atlbase.h>
|
|
|
|
#include <iphlpapi.h>
|
|
|
|
#include <wincrypt.h>
|
|
|
|
|
|
|
|
// min and max is required by gdi, therefore NOMINMAX won't work
|
|
|
|
#ifdef max
|
|
|
|
#undef max
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef min
|
|
|
|
#undef min
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <atomic>
|
|
|
|
#include <vector>
|
|
|
|
#include <mutex>
|
|
|
|
#include <queue>
|
|
|
|
#include <regex>
|
|
|
|
#include <chrono>
|
|
|
|
#include <thread>
|
|
|
|
#include <fstream>
|
|
|
|
#include <iostream>
|
|
|
|
#include <utility>
|
|
|
|
#include <filesystem>
|
|
|
|
#include <functional>
|
|
|
|
#include <sstream>
|
|
|
|
#include <optional>
|
|
|
|
#include <unordered_set>
|
|
|
|
#include <variant>
|
|
|
|
|
|
|
|
#include <gsl/gsl>
|
|
|
|
#include <udis86.h>
|
|
|
|
#include <MinHook.h>
|
|
|
|
#include <tomcrypt.h>
|
|
|
|
|
2022-07-31 17:59:01 -04:00
|
|
|
#define RAPIDJSON_NOEXCEPT
|
|
|
|
#define RAPIDJSON_ASSERT(cond) if(cond); else throw std::runtime_error("rapidjson assert fail");
|
|
|
|
|
2021-09-06 18:40:37 -04:00
|
|
|
#include <rapidjson/document.h>
|
|
|
|
#include <rapidjson/prettywriter.h>
|
|
|
|
#include <rapidjson/stringbuffer.h>
|
|
|
|
|
2023-02-15 12:24:35 -05:00
|
|
|
#pragma warning(push)
|
|
|
|
#pragma warning(disable: 4459)
|
|
|
|
#include <json.hpp>
|
|
|
|
#pragma warning(pop)
|
|
|
|
|
2021-09-06 18:40:37 -04:00
|
|
|
#include <asmjit/core/jitruntime.h>
|
|
|
|
#include <asmjit/x86/x86assembler.h>
|
|
|
|
|
2021-12-19 11:42:37 -05:00
|
|
|
#include <d3d11.h>
|
|
|
|
#include <imgui.h>
|
2022-01-06 19:22:05 -05:00
|
|
|
#include <imgui_internal.h>
|
2021-12-19 11:42:37 -05:00
|
|
|
#include <backends/imgui_impl_dx11.h>
|
|
|
|
#include <backends/imgui_impl_win32.h>
|
|
|
|
#include <misc/cpp/imgui_stdlib.h>
|
|
|
|
|
2021-09-06 18:40:37 -04:00
|
|
|
#pragma warning(pop)
|
|
|
|
#pragma warning(disable: 4100)
|
|
|
|
|
|
|
|
#pragma comment(lib, "ntdll.lib")
|
|
|
|
#pragma comment(lib, "ws2_32.lib")
|
|
|
|
#pragma comment(lib, "urlmon.lib" )
|
|
|
|
#pragma comment(lib, "iphlpapi.lib")
|
|
|
|
#pragma comment(lib, "Crypt32.lib")
|
2021-12-19 11:42:37 -05:00
|
|
|
#pragma comment(lib, "d3d11.lib")
|
2021-09-06 18:40:37 -04:00
|
|
|
|
|
|
|
#include "resource.hpp"
|
|
|
|
|
|
|
|
using namespace std::literals;
|