1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 """This file contains all the undocumented structs that were derived by
22 reversing. We try to also include references to the original reverser.
23
24 """
25
26 AMD64 = {
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 '_IMAGE_ENTRY_IN_SESSION': [None, {
49 'Link': [0, ['_LIST_ENTRY']],
50 'Address': [0x10, ['Pointer']],
51 'LastAddress': [0x18, ['Pointer']],
52 }],
53
54
55 "PARTITION_TABLE": [None, {
56 "Partitions": [8, ["Array", dict(
57 target="Pointer",
58
59 count=lambda x: x.obj_profile.get_constant_object(
60 "PartitionCount", "unsigned int"),
61
62 target_args=dict(
63 target="Array",
64 target_args=dict(
65 count=4,
66 target="FIRST_LEVEL_DIR"
67 )
68 )
69 )]],
70 }],
71
72
73 "FIRST_LEVEL_DIR": [0x24, {
74 "SizeOfSecondLevel": [0x8, ["unsigned int"]],
75
76 "Mask": [0x10, ["unsigned int"]],
77
78
79 "SecondLevel": [0x20, ["Pointer", dict(
80 target="Array",
81
82 target_args=dict(
83 count=lambda x: x.SizeOfSecondLevel,
84 target="_LIST_ENTRY"
85 )
86 )]],
87 }],
88
89 '_SERVICE_DESCRIPTOR_TABLE' : [0x40, {
90 'Descriptors' : [0x0, ['Array', dict(
91 target='_SERVICE_DESCRIPTOR_ENTRY',
92 count=2
93 )]],
94 }],
95
96
97
98
99
100 '_SERVICE_DESCRIPTOR_ENTRY' : [0x20, {
101 'KiServiceTable' : [0x0, ['Pointer', dict(
102 target="Array",
103 target_args=dict(
104 count=lambda x: x.ServiceLimit,
105 target="int",
106 )
107 )]],
108 'CounterBaseTable' : [0x8, ['Pointer']],
109 'ServiceLimit' : [0x10, ['unsigned long long']],
110 'ArgumentTable' : [0x18, ['Pointer']],
111 }],
112
113
114 "_UNLOADED_DRIVER": [0x28, {
115 "Name": [0, ["_UNICODE_STRING"]],
116 "StartAddress": [0x10, ["Pointer"]],
117 "EndAddress": [0x18, ["Pointer"]],
118 "CurrentTime": [0x20, ["WinFileTime"]],
119 }],
120 }
121
122
123 I386 = {
124 '_IMAGE_ENTRY_IN_SESSION': [None, {
125 'Link': [0x00, ['_LIST_ENTRY']],
126 'Address': [0x08, ['pointer', ['address']]],
127 'LastAddress': [0x0b, ['pointer', ['address']]],
128 }],
129
130
131 "PARTITION_TABLE": [None, {
132 "Partitions": [4, ["Array", dict(
133 target="Pointer",
134
135 count=lambda x: x.obj_profile.get_constant_object(
136 "PartitionCount", "unsigned int"),
137
138 target_args=dict(
139 target="Array",
140 target_args=dict(
141 count=4,
142 target="FIRST_LEVEL_DIR"
143 )
144 )
145 )]],
146 }],
147
148
149 "FIRST_LEVEL_DIR": [0x24, {
150 "SizeOfSecondLevel": [0x8, ["unsigned int"]],
151
152 "Mask": [0x10, ["unsigned int"]],
153
154
155 "SecondLevel": [0x20, ["Pointer", dict(
156 target="Array",
157 target_args=dict(
158 count=lambda x: x.SizeOfSecondLevel,
159 target="_LIST_ENTRY"
160 )
161 )]],
162 }],
163
164 '_SERVICE_DESCRIPTOR_TABLE' : [0x20, {
165 'Descriptors' : [0x0, ['Array', dict(
166 target='_SERVICE_DESCRIPTOR_ENTRY',
167 count=2
168 )]],
169 }],
170
171 '_SERVICE_DESCRIPTOR_ENTRY' : [0x10, {
172 'KiServiceTable' : [0x0, ['Pointer', dict(
173 target="Array",
174 target_args=dict(
175 count=lambda x: x.ServiceLimit,
176 target="unsigned int",
177 )
178 )]],
179 'CounterBaseTable' : [0x4, ['Pointer']],
180 'ServiceLimit' : [0x8, ['unsigned long']],
181 'ArgumentTable' : [0xc, ['Pointer']],
182 }],
183
184
185 "_UNLOADED_DRIVER": [24, {
186 "Name": [0, ["_UNICODE_STRING"]],
187 "StartAddress": [8, ["Pointer"]],
188 "EndAddress": [12, ["Pointer"]],
189 "CurrentTime": [16, ["WinFileTime"]],
190 }],
191 }
192
193
194
195 ENUMS = {
196 "_KOBJECTS": {
197 "0": "EventNotificationObject",
198 "1": "EventSynchronizationObject",
199 "2": "MutantObject",
200 "3": "ProcessObject",
201 "4": "QueueObject",
202 "5": "SemaphoreObject",
203 "6": "ThreadObject",
204 "7": "GateObject",
205 "8": "TimerNotificationObject",
206 "9": "TimerSynchronizationObject",
207 "10": "Spare2Object",
208 "11": "Spare3Object",
209 "12": "Spare4Object",
210 "13": "Spare5Object",
211 "14": "Spare6Object",
212 "15": "Spare7Object",
213 "16": "Spare8Object",
214 "17": "Spare9Object",
215 "18": "ApcObject",
216 "19": "DpcObject",
217 "20": "DeviceQueueObject",
218 "21": "EventPairObject",
219 "22": "InterruptObject",
220 "23": "ProfileObject",
221 "24": "ThreadedDpcObject",
222 "25": "MaximumKernelObject"
223 },
224 }
225