19#define VERSION_MAJOR 0
20#define VERSION_MINOR 10
21#define VERSION_PATCH 0
27#define BUILD_YEAR_CH0 (__DATE__[7])
28#define BUILD_YEAR_CH1 (__DATE__[8])
29#define BUILD_YEAR_CH2 (__DATE__[9])
30#define BUILD_YEAR_CH3 (__DATE__[10])
32#define BUILD_MONTH_IS_JAN (__DATE__[0] == 'J' && __DATE__[1] == 'a' && __DATE__[2] == 'n')
33#define BUILD_MONTH_IS_FEB (__DATE__[0] == 'F')
34#define BUILD_MONTH_IS_MAR (__DATE__[0] == 'M' && __DATE__[1] == 'a' && __DATE__[2] == 'r')
35#define BUILD_MONTH_IS_APR (__DATE__[0] == 'A' && __DATE__[1] == 'p')
36#define BUILD_MONTH_IS_MAY (__DATE__[0] == 'M' && __DATE__[1] == 'a' && __DATE__[2] == 'y')
37#define BUILD_MONTH_IS_JUN (__DATE__[0] == 'J' && __DATE__[1] == 'u' && __DATE__[2] == 'n')
38#define BUILD_MONTH_IS_JUL (__DATE__[0] == 'J' && __DATE__[1] == 'u' && __DATE__[2] == 'l')
39#define BUILD_MONTH_IS_AUG (__DATE__[0] == 'A' && __DATE__[1] == 'u')
40#define BUILD_MONTH_IS_SEP (__DATE__[0] == 'S')
41#define BUILD_MONTH_IS_OCT (__DATE__[0] == 'O')
42#define BUILD_MONTH_IS_NOV (__DATE__[0] == 'N')
43#define BUILD_MONTH_IS_DEC (__DATE__[0] == 'D')
45#define BUILD_MONTH_CH0 \
46 ((BUILD_MONTH_IS_OCT || BUILD_MONTH_IS_NOV || BUILD_MONTH_IS_DEC) ? '1' : '0')
48#define BUILD_MONTH_CH1 \
50 (BUILD_MONTH_IS_JAN) ? '1' : (BUILD_MONTH_IS_FEB) ? '2' \
51 : (BUILD_MONTH_IS_MAR) ? '3' \
52 : (BUILD_MONTH_IS_APR) ? '4' \
53 : (BUILD_MONTH_IS_MAY) ? '5' \
54 : (BUILD_MONTH_IS_JUN) ? '6' \
55 : (BUILD_MONTH_IS_JUL) ? '7' \
56 : (BUILD_MONTH_IS_AUG) ? '8' \
57 : (BUILD_MONTH_IS_SEP) ? '9' \
58 : (BUILD_MONTH_IS_OCT) ? '0' \
59 : (BUILD_MONTH_IS_NOV) ? '1' \
60 : (BUILD_MONTH_IS_DEC) ? '2' \
63#define BUILD_DAY_CH0 ((__DATE__[4] >= '0') ? (__DATE__[4]) : '0')
64#define BUILD_DAY_CH1 (__DATE__[5])
70#define BUILD_HOUR_CH0 (__TIME__[0])
71#define BUILD_HOUR_CH1 (__TIME__[1])
73#define BUILD_MIN_CH0 (__TIME__[3])
74#define BUILD_MIN_CH1 (__TIME__[4])
76#define BUILD_SEC_CH0 (__TIME__[6])
77#define BUILD_SEC_CH1 (__TIME__[7])
79#ifndef HYPERDBG_KERNEL_MODE
105# define STRINGIFY(x) #x
106# define TOSTRING(x) STRINGIFY(x)
109# define HYPERDBG_COMPLETE_VERSION "v" TOSTRING(VERSION_MAJOR) "." TOSTRING(VERSION_MINOR) "." TOSTRING(VERSION_PATCH) "\0"
163#define MaximumPacketsCapacity 1000
169#define MaximumPacketsCapacityPriority 50
174#define NORMAL_PAGE_SIZE 4096
179#define PacketChunkSize NORMAL_PAGE_SIZE
187#define UsermodeBufferSize sizeof(UINT32) + PacketChunkSize + 1
194#define MaxSerialPacketSize 20 * NORMAL_PAGE_SIZE
200#define LogBufferSize \
201 MaximumPacketsCapacity *(PacketChunkSize + sizeof(BUFFER_HEADER))
207#define LogBufferSizePriority \
208 MaximumPacketsCapacityPriority *(PacketChunkSize + sizeof(BUFFER_HEADER))
215#define DbgPrintLimitation 512
222#define DebuggerEventTagStartSeed 0x1000000
229#define DebuggerThreadDebuggingTagStartSeed 0x1000000
236#define DebuggerOutputSourceTagStartSeed 0x1
243#define DebuggerOutputSourceMaximumRemoteSourceForSingleEvent 0x5
250#define DebuggerScriptEngineMemcpyMovingBufferSize 64
260#define MAXIMUM_NUMBER_OF_INITIAL_PREALLOCATED_EPT_HOOKS 5
270#define MAXIMUM_REGULAR_INSTANT_EVENTS 20
276#define MAXIMUM_BIG_INSTANT_EVENTS 0
282#define REGULAR_INSTANT_EVENT_CONDITIONAL_BUFFER sizeof(DEBUGGER_EVENT) + 100
288#define BIG_INSTANT_EVENT_CONDITIONAL_BUFFER sizeof(DEBUGGER_EVENT) + PAGE_SIZE
294#define REGULAR_INSTANT_EVENT_ACTION_BUFFER sizeof(DEBUGGER_EVENT_ACTION) + (PAGE_SIZE * 2)
300#define BIG_INSTANT_EVENT_ACTION_BUFFER sizeof(DEBUGGER_EVENT_ACTION) + MaxSerialPacketSize
306#define REGULAR_INSTANT_EVENT_REQUESTED_SAFE_BUFFER PAGE_SIZE
312#define BIG_INSTANT_EVENT_REQUESTED_SAFE_BUFFER MaxSerialPacketSize
323#define DEFAULT_PORT "50000"
330#define COMMUNICATION_BUFFER_SIZE PacketChunkSize + 0x100
341#define TOP_LEVEL_DRIVERS_VMCALL_STARTING_NUMBER 0x00000200
348#define TOP_LEVEL_DRIVERS_VMCALL_ENDING_NUMBER TOP_LEVEL_DRIVERS_VMCALL_STARTING_NUMBER + 0x100
359#define OPERATION_MANDATORY_DEBUGGEE_BIT (1 << 31)
366#define OPERATION_LOG_INFO_MESSAGE 1U
367#define OPERATION_LOG_WARNING_MESSAGE 2U
368#define OPERATION_LOG_ERROR_MESSAGE 3U
369#define OPERATION_LOG_NON_IMMEDIATE_MESSAGE 4U
370#define OPERATION_LOG_WITH_TAG 5U
372#define OPERATION_COMMAND_FROM_DEBUGGER_CLOSE_AND_UNLOAD_VMM \
373 6U | OPERATION_MANDATORY_DEBUGGEE_BIT
374#define OPERATION_DEBUGGEE_USER_INPUT 7U | OPERATION_MANDATORY_DEBUGGEE_BIT
375#define OPERATION_DEBUGGEE_REGISTER_EVENT 8U | OPERATION_MANDATORY_DEBUGGEE_BIT
376#define OPERATION_DEBUGGEE_ADD_ACTION_TO_EVENT \
377 9 | OPERATION_MANDATORY_DEBUGGEE_BIT
378#define OPERATION_DEBUGGEE_CLEAR_EVENTS 10U | OPERATION_MANDATORY_DEBUGGEE_BIT
379#define OPERATION_DEBUGGEE_CLEAR_EVENTS_WITHOUT_NOTIFYING_DEBUGGER 11U | OPERATION_MANDATORY_DEBUGGEE_BIT
380#define OPERATION_HYPERVISOR_DRIVER_IS_SUCCESSFULLY_LOADED \
381 12U | OPERATION_MANDATORY_DEBUGGEE_BIT
382#define OPERATION_HYPERVISOR_DRIVER_END_OF_IRPS \
383 13U | OPERATION_MANDATORY_DEBUGGEE_BIT
384#define OPERATION_COMMAND_FROM_DEBUGGER_RELOAD_SYMBOL \
385 14U | OPERATION_MANDATORY_DEBUGGEE_BIT
387#define OPERATION_NOTIFICATION_FROM_USER_DEBUGGER_PAUSE \
388 15U | OPERATION_MANDATORY_DEBUGGEE_BIT
398#define MAXIMUM_BREAKPOINTS_WITHOUT_CONTINUE 100
407#define MAXIMUM_NUMBER_OF_THREAD_INFORMATION_FOR_TRAPS 200
417#define POOLTAG 0x48444247
426#define SERIAL_END_OF_BUFFER_CHARS_COUNT 0x4
432#define SERIAL_END_OF_BUFFER_CHAR_1 0x00
433#define SERIAL_END_OF_BUFFER_CHAR_2 0x80
434#define SERIAL_END_OF_BUFFER_CHAR_3 0xEE
435#define SERIAL_END_OF_BUFFER_CHAR_4 0xFF
440#define TCP_END_OF_BUFFER_CHARS_COUNT 0x4
446#define TCP_END_OF_BUFFER_CHAR_1 0x10
447#define TCP_END_OF_BUFFER_CHAR_2 0x20
448#define TCP_END_OF_BUFFER_CHAR_3 0x33
449#define TCP_END_OF_BUFFER_CHAR_4 0x44
459#define MAXIMUM_CHARACTER_FOR_OS_NAME 256
468#define MAXIMUM_INSTR_SIZE 16
473#define MAXIMUM_CALL_INSTR_SIZE 7
483#define MAXIMUM_SUPPORTED_SYMBOLS 1000
491#define MAXIMUM_GUID_AND_AGE_SIZE 60
502#define INDICATOR_OF_HYPERDBG_PACKET \
514#define MaximumSearchResults 0x1000
524#define X86_FLAGS_CF (1 << 0)
525#define X86_FLAGS_PF (1 << 2)
526#define X86_FLAGS_AF (1 << 4)
527#define X86_FLAGS_ZF (1 << 6)
528#define X86_FLAGS_SF (1 << 7)
529#define X86_FLAGS_TF (1 << 8)
530#define X86_FLAGS_IF (1 << 9)
531#define X86_FLAGS_DF (1 << 10)
532#define X86_FLAGS_OF (1 << 11)
533#define X86_FLAGS_STATUS_MASK (0xfff)
534#define X86_FLAGS_IOPL_MASK (3 << 12)
535#define X86_FLAGS_IOPL_SHIFT (12)
536#define X86_FLAGS_IOPL_SHIFT_2ND_BIT (13)
537#define X86_FLAGS_NT (1 << 14)
538#define X86_FLAGS_RF (1 << 16)
539#define X86_FLAGS_VM (1 << 17)
540#define X86_FLAGS_AC (1 << 18)
541#define X86_FLAGS_VIF (1 << 19)
542#define X86_FLAGS_VIP (1 << 20)
543#define X86_FLAGS_ID (1 << 21)
544#define X86_FLAGS_RESERVED_ONES 0x2
545#define X86_FLAGS_RESERVED 0xffc0802a
547#define X86_FLAGS_RESERVED_BITS 0xffc38028
548#define X86_FLAGS_FIXED 0x00000002
551# define LOWORD(l) ((WORD)(l))
555# define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
559# define LOBYTE(w) ((BYTE)(w))
563# define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF))
566#define MAX_TEMP_COUNT 128
568#define MAX_STACK_BUFFER_COUNT 256
570#define MAX_EXECUTION_COUNT 1000000
574#define MAX_VAR_COUNT 512
576#define MAX_FUNCTION_NAME_LENGTH 32
586#define DEBUGGER_MODIFY_EVENTS_APPLY_TO_ALL_TAG 0xffffffffffffffff
593#define DISASSEMBLY_MAXIMUM_DISTANCE_FROM_OBJECT_NAME 0xffff
599#define DEBUGGER_READ_AND_WRITE_ON_MSR_APPLY_ALL_CORES 0xffffffff
605#define DEBUGGER_DEBUGGEE_IS_RUNNING_NO_CORE 0xffffffff
611#define DEBUGGER_EVENT_APPLY_TO_ALL_CORES 0xffffffff
617#define DEBUGGER_EVENT_APPLY_TO_ALL_PROCESSES 0xffffffff
623#define DEBUGGER_EVENT_MSR_READ_OR_WRITE_ALL_MSRS 0xffffffff
629#define DEBUGGER_EVENT_EXCEPTIONS_ALL_FIRST_32_ENTRIES 0xffffffff
635#define DEBUGGER_EVENT_SYSCALL_ALL_SYSRET_OR_SYSCALLS 0xffffffff
641#define DEBUGGER_EVENT_ALL_IO_PORTS 0xffffffff
647#define DEBUGGEE_BP_APPLY_TO_ALL_CORES 0xffffffff
653#define DEBUGGEE_BP_APPLY_TO_ALL_PROCESSES 0xffffffff
659#define DEBUGGEE_BP_APPLY_TO_ALL_THREADS 0xffffffff
665#define DEBUGGEE_SHOW_ALL_REGISTERS 0xffffffff
#define BUILD_YEAR_CH3
Definition Constants.h:30
#define BUILD_YEAR_CH2
Definition Constants.h:29
#define BUILD_HOUR_CH1
Definition Constants.h:71
#define BUILD_MONTH_CH1
Definition Constants.h:48
#define BUILD_YEAR_CH1
Definition Constants.h:28
#define VERSION_MAJOR
Definition Constants.h:19
#define BUILD_MIN_CH0
Definition Constants.h:73
#define BUILD_YEAR_CH0
Definition Constants.h:27
#define BUILD_MIN_CH1
Definition Constants.h:74
#define BUILD_SEC_CH0
Definition Constants.h:76
const unsigned char BuildVersion[]
Definition Constants.h:113
#define BUILD_DAY_CH0
Definition Constants.h:63
#define VERSION_PATCH
Definition Constants.h:21
#define TOSTRING(x)
Definition Constants.h:106
const unsigned char CompleteVersion[]
Definition Constants.h:111
const unsigned char BuildDateTime[]
Definition Constants.h:81
#define BUILD_DAY_CH1
Definition Constants.h:64
#define BUILD_SEC_CH1
Definition Constants.h:77
#define HYPERDBG_COMPLETE_VERSION
Definition Constants.h:109
#define BUILD_HOUR_CH0
Definition Constants.h:70
#define VERSION_MINOR
Definition Constants.h:20
const unsigned char BuildSignature[]
Definition Constants.h:130
#define BUILD_MONTH_CH0
Definition Constants.h:45