This function returns the needed details for making support for the casting in the script engine.
79{
82 UINT32 TempOffsetOfFieldFromTop = 0;
83 UINT32 TempSizeOfField = 0;
84
85 if (strcmp(StructName, "STUPID_STRUCT1") == 0 ||
86 strcmp(StructName, "PSTUPID_STRUCT1") == 0)
87 {
88 if (strcmp(StructName, "PSTUPID_STRUCT1") == 0)
89 {
90 IsTheStructItselfAPointer =
TRUE;
91 }
92
94 {
96 TempOffsetOfFieldFromTop = 0x0;
97 TempSizeOfField = 0x4;
99 }
101 {
103 TempOffsetOfFieldFromTop = 0x4;
104 TempSizeOfField = 0x8;
106 }
108 {
110 TempOffsetOfFieldFromTop = 0xc;
111 TempSizeOfField = 0x8;
113 }
115 {
117 TempOffsetOfFieldFromTop = 0x14;
118 TempSizeOfField = 0x8;
120 }
121 else
122 {
123
124
125
127 }
128 }
129 else if (strcmp(StructName, "STUPID_STRUCT2") == 0 ||
130 strcmp(StructName, "PSTUPID_STRUCT2") == 0)
131 {
132 if (strcmp(StructName, "PSTUPID_STRUCT2") == 0)
133 {
134 IsTheStructItselfAPointer =
TRUE;
135 }
136
138 {
140 TempOffsetOfFieldFromTop = 0x0;
141 TempSizeOfField = 0x4;
143 }
145 {
147 TempOffsetOfFieldFromTop = 0x4;
148 TempSizeOfField = 0x8;
150 }
152 {
154 TempOffsetOfFieldFromTop = 0xc;
155 TempSizeOfField = 0x8;
157 }
159 {
161 TempOffsetOfFieldFromTop = 0x14;
162 TempSizeOfField = 0x8;
164 }
166 {
168 TempOffsetOfFieldFromTop = 0x1c;
169 TempSizeOfField = 0x8;
171 }
172 else
173 {
174
175
176
178 }
179 }
180 else if (strcmp(StructName, "UNICODE_STRING") == 0 ||
181 strcmp(StructName, "PUNICODE_STRING") == 0)
182 {
183 if (strcmp(StructName, "PUNICODE_STRING") == 0)
184 {
185 IsTheStructItselfAPointer =
TRUE;
186 }
187
189 {
191 TempOffsetOfFieldFromTop = 0x0;
192 TempSizeOfField = 0x2;
194 }
196 {
198 TempOffsetOfFieldFromTop = 0x2;
199 TempSizeOfField = 0x2;
201 }
203 {
205 TempOffsetOfFieldFromTop = 0x4;
206 TempSizeOfField = 0x8;
208 }
209 else
210 {
211
212
213
215 }
216 }
217 else
218 {
219
220
221
223 }
224
225
226
227
232
234}
#define TRUE
Definition BasicTypes.h:55
_In_ const char _Out_ PBOOLEAN _Out_ PBOOLEAN IsFiledOfStructNamePointerOrNot
Definition HyperDbgSymImports.h:66
_In_ const char _Out_ PBOOLEAN IsStructNamePointerOrNot
Definition HyperDbgSymImports.h:65
_In_ const char * FiledOfStructName
Definition HyperDbgSymImports.h:64