forked from exotikcheat/Kernel_VADInjector
-
Notifications
You must be signed in to change notification settings - Fork 13
/
vad.h
154 lines (136 loc) · 5.78 KB
/
vad.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#pragma once
#include <Windows.h>
typedef struct _RTL_BALANCED_NODE {
union {
struct _RTL_BALANCED_NODE* Children[2];
struct {
struct _RTL_BALANCED_NODE* Left;
struct _RTL_BALANCED_NODE* Right;
} DUMMYSTRUCTNAME;
} DUMMYUNIONNAME;
#define RTL_BALANCED_NODE_RESERVED_PARENT_MASK 3
union {
UCHAR Red : 1;
UCHAR Balance : 2;
ULONG_PTR ParentValue;
} DUMMYUNIONNAME2;
} RTL_BALANCED_NODE, * PRTL_BALANCED_NODE;
typedef struct _MM_AVL_NODE // Size=24
{
struct _MM_AVL_NODE* LeftChild; // Size=8 Offset=0
struct _MM_AVL_NODE* RightChild; // Size=8 Offset=8
union ___unnamed1666 // Size=8
{
struct
{
__int64 Balance : 2; // Size=8 Offset=0 BitOffset=0 BitCount=2
};
struct _MM_AVL_NODE* Parent; // Size=8 Offset=0
} u1;
} MM_AVL_NODE, * PMM_AVL_NODE, * PMMADDRESS_NODE;
typedef struct _RTL_AVL_TREE // Size=8
{
PMM_AVL_NODE BalancedRoot;
void* NodeHint;
unsigned __int64 NumberGenericTableElements;
} RTL_AVL_TREE, * PRTL_AVL_TREE, MM_AVL_TABLE, * PMM_AVL_TABLE;
union _EX_PUSH_LOCK // Size=8
{
struct
{
unsigned __int64 Locked : 1; // Size=8 Offset=0 BitOffset=0 BitCount=1
unsigned __int64 Waiting : 1; // Size=8 Offset=0 BitOffset=1 BitCount=1
unsigned __int64 Waking : 1; // Size=8 Offset=0 BitOffset=2 BitCount=1
unsigned __int64 MultipleShared : 1; // Size=8 Offset=0 BitOffset=3 BitCount=1
unsigned __int64 Shared : 60; // Size=8 Offset=0 BitOffset=4 BitCount=60
};
unsigned __int64 Value; // Size=8 Offset=0
void* Ptr; // Size=8 Offset=0
};
typedef struct _MMVAD_FLAGS {
ULONG Lock : 1; //0x0
ULONG LockContended : 1; //0x0
ULONG DeleteInProgress : 1; //0x0
ULONG NoChange : 1; //0x0
ULONG VadType : 3; //0x0
ULONG Protection : 5; //0x0
ULONG PreferredNode : 6; //0x0
ULONG PageSize : 2; //0x0
ULONG PrivateMemory : 1; //0x0
} MMVAD_FLAGS, * PMMVAD_FLAGS;
struct _MMVAD_FLAGS1 // Size=4
{
unsigned long CommitCharge : 31; // Size=4 Offset=0 BitOffset=0 BitCount=31
unsigned long MemCommit : 1; // Size=4 Offset=0 BitOffset=31 BitCount=1
};
struct _MMVAD_FLAGS2 // Size=4
{
unsigned long FileOffset : 24; // Size=4 Offset=0 BitOffset=0 BitCount=24
unsigned long Large : 1; // Size=4 Offset=0 BitOffset=24 BitCount=1
unsigned long TrimBehind : 1; // Size=4 Offset=0 BitOffset=25 BitCount=1
unsigned long Inherit : 1; // Size=4 Offset=0 BitOffset=26 BitCount=1
unsigned long CopyOnWrite : 1; // Size=4 Offset=0 BitOffset=27 BitCount=1
unsigned long NoValidationNeeded : 1; // Size=4 Offset=0 BitOffset=28 BitCount=1
unsigned long Spare : 3; // Size=4 Offset=0 BitOffset=29 BitCount=3
};
struct _MI_VAD_SEQUENTIAL_INFO // Size=8
{
unsigned __int64 Length : 12; // Size=8 Offset=0 BitOffset=0 BitCount=12
unsigned __int64 Vpn : 52; // Size=8 Offset=0 BitOffset=12 BitCount=52
};
union ___unnamed1951 // Size=4
{
unsigned long LongFlags; // Size=4 Offset=0
struct _MMVAD_FLAGS VadFlags; // Size=4 Offset=0
};
union ___unnamed1952 // Size=4
{
unsigned long LongFlags1; // Size=4 Offset=0
struct _MMVAD_FLAGS1 VadFlags1; // Size=4 Offset=0
};
union ___unnamed2047 // Size=4
{
unsigned long LongFlags2; // Size=4 Offset=0
struct _MMVAD_FLAGS2 VadFlags2; // Size=4 Offset=0
};
union ___unnamed2048 // Size=8
{
struct _MI_VAD_SEQUENTIAL_INFO SequentialVa; // Size=8 Offset=0
struct _MMEXTEND_INFO* ExtendedInfo; // Size=8 Offset=0
};
typedef struct _MMVAD_SHORT
{
union
{
struct
{
struct _MMVAD_SHORT* NextVad; //0x0
VOID* ExtraCreateInfo; //0x8
};
struct _RTL_BALANCED_NODE VadNode; //0x0
};
ULONG StartingVpn; //0x18
ULONG EndingVpn; //0x1c
UCHAR StartingVpnHigh; //0x20
UCHAR EndingVpnHigh; //0x21
UCHAR CommitChargeHigh; //0x22
UCHAR SpareNT64VadUChar; //0x23
LONG ReferenceCount; //0x24
union _EX_PUSH_LOCK PushLock; //0x28
union ___unnamed1951 u; // Size=4 Offset=48
union ___unnamed1952 u1; // Size=4 Offset=52 //0x34
struct _MI_VAD_EVENT_BLOCK* EventList; //0x38
} MMVAD_SHORT, * PMMVAD_SHORT;
typedef struct _MMVAD // Size=128
{
struct _MMVAD_SHORT Core; // Size=64 Offset=0
union ___unnamed2047 u2; // Size=4 Offset=64
unsigned long pad0; // Size=4 Offset=68
struct _SUBSECTION* Subsection; // Size=8 Offset=72
struct _MMPTE* FirstPrototypePte; // Size=8 Offset=80
struct _MMPTE* LastContiguousPte; // Size=8 Offset=88
struct _LIST_ENTRY ViewLinks; // Size=16 Offset=96
struct _EPROCESS* VadsProcess; // Size=8 Offset=112
union ___unnamed2048 u4; // Size=8 Offset=120
struct _FILE_OBJECT* FileObject; // Size=8 Offset=128
} MMVAD, * PMMVAD;