HyperDbg Debugger
Loading...
Searching...
No Matches
pch.h
Go to the documentation of this file.
1
12#pragma once
13
14//
15// Environment headers
16//
18
19//
20// Windows SDK headers
21//
22#define WIN32_LEAN_AND_MEAN
23
24//
25// IA32-doc has structures for the entire intel SDM.
26//
27
28#define USE_LIB_IA32
29#if defined(USE_LIB_IA32)
30# pragma warning(push, 0)
31// # pragma warning(disable : 4201) // suppress nameless struct/union warning
32# include <ia32-doc/out/ia32.h>
33# pragma warning(pop)
34typedef RFLAGS * PRFLAGS;
35#endif // USE_LIB_IA32
36
37//
38// Native API header files for the Process Hacker project.
39//
40// #define USE__NATIVE_PHNT_HEADERS
41#define USE_NATIVE_SDK_HEADERS
42#define _AMD64_
43
44#if defined(USE__NATIVE_PHNT_HEADERS)
45
46//
47// Dirty fix: the "PCWCHAR" in undefined in "ntrtl.h" so I deifined it here.
48//
49typedef const wchar_t *LPCWCHAR, *PCWCHAR;
50
51# define PHNT_MODE PHNT_MODE_USER
52# define PHNT_VERSION PHNT_WIN11 // Windows 11
53# define PHNT_PATCH_FOR_HYPERDBG TRUE
54
55# include <phnt/phnt_windows.h>
56# include <phnt/phnt.h>
57
58#elif defined(USE_NATIVE_SDK_HEADERS)
59
60# include <winternl.h>
61# include <Windows.h>
62# include <winioctl.h>
64
65#endif
66
67#include <winsock2.h>
68#include <ws2tcpip.h>
69#include <strsafe.h>
70#include <shlobj.h>
71#include <tchar.h>
72#include <tlhelp32.h>
73#include <shlwapi.h>
74#include <VersionHelpers.h>
75#include <tchar.h>
76#include <psapi.h>
77#include <time.h>
78#include <conio.h>
79#include <intrin.h>
80#include <inttypes.h>
81#include <stdio.h>
82#include <stdlib.h>
83
84//
85// STL headers
86//
87#include <algorithm>
88#include <string>
89#include <vector>
90#include <array>
91#include <bitset>
92#include <iomanip>
93#include <iostream>
94#include <iterator>
95#include <sstream>
96#include <fstream>
97#include <map>
98#include <numeric>
99#include <list>
100#include <locale>
101#include <memory>
102#include <cctype>
103#include <cstring>
104#include <unordered_set>
105
106//
107// Scope definitions
108//
109#define SCRIPT_ENGINE_USER_MODE
110#define HYPERDBG_USER_MODE
111#define HYPERDBG_LIBHYPERDBG
112
113//
114// Zydis Debug Disable Flag
115//
116#ifndef NDEBUG
117# define NDEBUG
118#endif // !NDEBUG
119
120//
121// Keystone
122//
123#include "keystone\keystone.h"
124
125//
126// HyperDbg defined headers
127//
128#include "Configuration.h"
129#include "Definition.h"
130#include "SDK/HyperDbgSdk.h"
131
132//
133// Script-engine
134//
136
137//
138// Imports/Exports
139//
142
143//
144// General
145//
146#include "header/libhyperdbg.h"
147#include "header/export.h"
148#include "header/inipp.h"
149#include "header/commands.h"
150#include "header/common.h"
151#include "header/symbol.h"
152#include "header/debugger.h"
153#include "header/script-engine.h"
154#include "header/help.h"
155#include "header/install.h"
156#include "header/list.h"
157#include "header/tests.h"
158#include "header/transparency.h"
159#include "header/communication.h"
160#include "header/namedpipe.h"
161#include "header/forwarding.h"
162#include "header/kd.h"
163#include "header/pe-parser.h"
164#include "header/ud.h"
165#include "header/objects.h"
166#include "header/rev-ctrl.h"
167#include "header/assembler.h"
168#include <regex>
169//
170// hwdbg
171//
173
174//
175// Libraries
176//
177
178#ifdef ENV_WINDOWS
179
180# pragma comment(lib, "ntdll.lib")
181
182//
183// For path combine
184//
185# pragma comment(lib, "Shlwapi.lib")
186
187//
188// Need to link with Ws2_32.lib, Mswsock.lib, and Advapi32.lib
189// for tcpclient.cpp and tcpserver.cpp
190//
191# pragma comment(lib, "Ws2_32.lib")
192# pragma comment(lib, "Mswsock.lib")
193# pragma comment(lib, "AdvApi32.lib")
194
195//
196// For GetModuleFileNameExA on script-engine for user-mode
197// Kernel32.lib is not needed, but seems that it's the library
198// for Windows 7
199//
200# pragma comment(lib, "Psapi.lib")
201# pragma comment(lib, "Kernel32.lib")
202
203#endif // ENV_WINDOWS
Global configuration that applies on compile time.
Header files for global definitions.
Headers relating exported functions from controller interface.
Headers relating exported functions from script engine.
Headers for exported script engine headers.
Windows specific headers.
Headers for turning assembly codes into bytes.
The hyperdbg command interpreter and driver connector.
headers for controller of the reversing machine's module
Headers for event source forwarding.
help of commands header
Headers for the interpreter of hwdbg packets and requests.
Main interface to connect applications to driver headers.
header for HyperDbg's general functions for reading and converting and etc
General debugger functions.
routines for remote kernel debugging
headers for test functions
headers for user-mode debugging routines
Named pipe communication headers.
General script-engine functions and wrappers.
RFLAGS * PRFLAGS
Definition pch.h:34
headers for libhyperdbg
The list working functions headers.
Header for routines related to objects.
Header for Portable Executable parser.
headers for controller of the reversing machine's module
Symbol related functions header.
headers for test functions
The running environment of HyperDbg.