2018-12-01 15:42:29 +01:00
|
|
|
#pragma once
|
|
|
|
|
2018-12-23 22:15:32 +01:00
|
|
|
#define BINARY_PAYLOAD_SIZE 0x0A000000
|
2018-12-27 11:07:15 +01:00
|
|
|
#define TLS_PAYLOAD_SIZE 0x2000
|
2018-12-23 22:15:32 +01:00
|
|
|
|
2018-12-23 18:25:22 +01:00
|
|
|
#pragma warning(push)
|
2019-01-26 21:37:46 +01:00
|
|
|
#pragma warning(disable: 4244)
|
2018-12-23 18:25:22 +01:00
|
|
|
#pragma warning(disable: 4458)
|
2019-01-26 21:37:46 +01:00
|
|
|
#pragma warning(disable: 6297)
|
|
|
|
#pragma warning(disable: 6385)
|
|
|
|
#pragma warning(disable: 6386)
|
|
|
|
#pragma warning(disable: 26451)
|
|
|
|
#pragma warning(disable: 26444)
|
|
|
|
#pragma warning(disable: 26451)
|
|
|
|
#pragma warning(disable: 26495)
|
|
|
|
#pragma warning(disable: 28020)
|
2018-12-23 18:25:22 +01:00
|
|
|
|
2022-12-09 15:09:37 +01:00
|
|
|
#define _CRT_SECURE_NO_WARNINGS
|
2018-12-01 15:42:29 +01:00
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
|
2022-05-12 14:14:59 +01:00
|
|
|
#include <Windows.h>
|
|
|
|
#include <MsHTML.h>
|
|
|
|
#include <MsHtmHst.h>
|
2019-01-05 11:44:45 +01:00
|
|
|
#include <ExDisp.h>
|
2018-12-26 20:21:20 +01:00
|
|
|
#include <WinSock2.h>
|
2022-05-12 14:14:59 +01:00
|
|
|
#include <WS2tcpip.h>
|
2018-12-26 20:21:20 +01:00
|
|
|
#include <corecrt_io.h>
|
|
|
|
#include <fcntl.h>
|
2019-01-09 00:02:59 +01:00
|
|
|
#include <shellapi.h>
|
2019-01-20 14:14:06 +01:00
|
|
|
#include <csetjmp>
|
2018-12-01 15:42:29 +01:00
|
|
|
|
2018-12-26 16:28:16 +01:00
|
|
|
// min and max is required by gdi, therefore NOMINMAX won't work
|
|
|
|
#ifdef max
|
|
|
|
#undef max
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef min
|
|
|
|
#undef min
|
|
|
|
#endif
|
|
|
|
|
2019-01-05 23:34:46 +01:00
|
|
|
#include <atomic>
|
2022-12-09 14:50:13 +01:00
|
|
|
#include <chrono>
|
|
|
|
#include <filesystem>
|
2022-12-12 14:59:31 +01:00
|
|
|
#include <format>
|
2022-12-09 14:50:13 +01:00
|
|
|
#include <fstream>
|
2022-12-20 15:49:56 +01:00
|
|
|
#include <functional>
|
2023-01-29 16:31:52 +00:00
|
|
|
#include <iostream>
|
2022-12-09 14:50:13 +01:00
|
|
|
#include <map>
|
2018-12-22 18:45:27 +01:00
|
|
|
#include <mutex>
|
2018-12-26 20:21:20 +01:00
|
|
|
#include <queue>
|
2018-12-27 17:00:46 +01:00
|
|
|
#include <regex>
|
2018-12-23 13:17:08 +01:00
|
|
|
#include <thread>
|
2022-12-20 15:49:56 +01:00
|
|
|
#include <unordered_map>
|
2018-12-26 20:21:20 +01:00
|
|
|
#include <utility>
|
2022-12-09 14:50:13 +01:00
|
|
|
#include <vector>
|
2018-12-23 13:17:08 +01:00
|
|
|
|
2018-12-26 16:28:16 +01:00
|
|
|
#include <zlib.h>
|
2019-11-30 23:51:13 +01:00
|
|
|
#include <zstd.h>
|
2018-12-26 16:28:16 +01:00
|
|
|
#include <diff.h>
|
|
|
|
#include <patch.h>
|
|
|
|
#include <tomcrypt.h>
|
|
|
|
|
2019-01-05 14:55:37 +01:00
|
|
|
#include <gsl/gsl>
|
|
|
|
|
2019-01-06 21:14:01 +01:00
|
|
|
#include <udis86.h>
|
|
|
|
|
2019-01-06 12:21:45 +01:00
|
|
|
#pragma comment(lib, "gdiplus.lib")
|
2018-12-27 17:00:46 +01:00
|
|
|
#pragma comment(lib, "ws2_32.lib")
|
|
|
|
|
2018-12-27 11:07:15 +01:00
|
|
|
#pragma warning(pop)
|
2022-03-10 01:12:16 +00:00
|
|
|
|
2018-12-01 15:42:29 +01:00
|
|
|
#pragma warning(disable: 4100)
|
2022-03-10 01:12:16 +00:00
|
|
|
#pragma warning(disable: 26812)
|
2018-12-01 15:42:29 +01:00
|
|
|
|
2018-12-23 18:25:22 +01:00
|
|
|
#include "resource.hpp"
|
2018-12-27 11:07:15 +01:00
|
|
|
|
|
|
|
using namespace std::literals;
|
2019-01-20 17:29:37 +01:00
|
|
|
|
2022-05-12 14:14:59 +01:00
|
|
|
extern __declspec(thread) char tls_data[TLS_PAYLOAD_SIZE];
|