1 /*
2 * PROJECT: apphelp_apitest
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Common data / functions for apphelp_apitest
5 * COPYRIGHT: Copyright 2015-2018 Mark Jansen (mark.jansen@reactos.org)
6 */
7
8 #include <exdisp.h>
9 #include <winbase.h>
10 #include "wine/test.h"
11
12
13 static IMAGE_DOS_HEADER dos_header =
14 {
15 IMAGE_DOS_SIGNATURE, /* e_magic */
16 144, /* e_cblp */
17 3, /* e_cp */
18 0, /* e_crlc */
19 4, /* e_cparhdr */
20 0, /* e_minalloc */
21 65535, /* e_maxalloc */
22 0, /* e_ss */
23 184, /* e_sp */
24 0, /* e_csum */
25 0, /* e_ip */
26 0, /* e_cs */
27 64, /* e_lfarlc */
28 0, /* e_ovno */
29 { 0 }, /* e_res[4] */
30 0, /* e_oemid */
31 0, /* e_oeminfo */
32 { 0 }, /* e_res2[10] */
33 0x80 /* e_lfanew */
34 };
35
36 static IMAGE_NT_HEADERS32 nt_header =
37 {
38 IMAGE_NT_SIGNATURE, /* Signature */
39 {
40 IMAGE_FILE_MACHINE_I386, /* Machine */
41 2, /* NumberOfSections */
42 0x12345, /* TimeDateStamp */
43 0, /* PointerToSymbolTable */
44 0, /* NumberOfSymbols */
45 sizeof(IMAGE_OPTIONAL_HEADER), /* SizeOfOptionalHeader */
46 IMAGE_FILE_RELOCS_STRIPPED | IMAGE_FILE_EXECUTABLE_IMAGE | IMAGE_FILE_LINE_NUMS_STRIPPED | IMAGE_FILE_32BIT_MACHINE /* Characteristics */
47 },
48 {
49 IMAGE_NT_OPTIONAL_HDR_MAGIC, /* Magic */
50 6, /* MajorLinkerVersion */
51 3, /* MinorLinkerVersion */
52 0, /* SizeOfCode */
53 0, /* SizeOfInitializedData */
54 0, /* SizeOfUninitializedData */
55 0x1000, /* AddressOfEntryPoint */
56 0x1000, /* BaseOfCode */
57 0, /* BaseOfData */
58 0x400000, /* ImageBase */
59 0x1000, /* SectionAlignment */
60 0x200, /* FileAlignment */
61 4, /* MajorOperatingSystemVersion */
62 1, /* MinorOperatingSystemVersion */
63 4, /* MajorImageVersion */
64 2, /* MinorImageVersion */
65 4, /* MajorSubsystemVersion */
66 3, /* MinorSubsystemVersion */
67 0, /* Win32VersionValue */
68 0x3000, /* SizeOfImage */
69 0x200, /* SizeOfHeaders */
70 0xBAAD, /* CheckSum: This checksum is not the correct checksum, intentionally! */
71 IMAGE_SUBSYSTEM_WINDOWS_CUI, /* Subsystem */
72 0, /* DllCharacteristics */
73 0x100000, /* SizeOfStackReserve */
74 0x1000, /* SizeOfStackCommit */
75 0x100000, /* SizeOfHeapReserve */
76 0x1000, /* SizeOfHeapCommit */
77 0, /* LoaderFlags */
78 0x10, /* NumberOfRvaAndSizes */
79 {
80 /* IMAGE_DIRECTORY_ENTRY_EXPORT */
81 {
82 0x2370, /* VirtualAddress */
83 76, /* Size */
84 },
85 { 0 },
86 /* IMAGE_DIRECTORY_ENTRY_RESOURCE */
87 {
88 0x2000, /* VirtualAddress */
89 868, /* Size */
90 },
91 } /* DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] */
92 }
93 };
94
95 static IMAGE_SECTION_HEADER section_headers[] =
96 {
97 {
98 { '.','t','e','x','t',0 }, /* Name */
99 { 24 }, /* VirtualSize */
100 0x1000, /* VirtualAddress */
101 0x200, /* SizeOfRawData */
102 0x200, /* PointerToRawData */
103 0, /* PointerToRelocations */
104 0, /* PointerToLinenumbers */
105 0, /* NumberOfRelocations */
106 0, /* NumberOfLinenumbers */
107 IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_MEM_READ /* Characteristics */
108 },
109 {
110 { '.','r','s','r','c',0 }, /* Name */
111 { 880 }, /* VirtualSize */
112 0x2000, /* VirtualAddress */
113 0x400, /* SizeOfRawData */
114 0x400, /* PointerToRawData */
115 0, /* PointerToRelocations */
116 0, /* PointerToLinenumbers */
117 0, /* NumberOfRelocations */
118 0, /* NumberOfLinenumbers */
119 IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ /* Characteristics */
120 }
121 };
122
123 static const unsigned char text_section[] =
124 {
125 0x33, 0xc0, /* xor eax, eax */
126 0xc3 /* ret */
127 };
128
129
130 /* taken from fusionpriv.h */
131 typedef struct
132 {
133 WORD wLength;
134 WORD wValueLength;
135 WORD wType;
136 WCHAR szKey[17];
137 VS_FIXEDFILEINFO Value;
138 } VS_VERSIONINFO;
139
140 typedef struct
141 {
142 WORD wLength;
143 WORD wValueLength;
144 WORD wType;
145 WCHAR szKey[15];
146 } STRINGFILEINFO;
147
148 typedef struct
149 {
150 WORD wLength;
151 WORD wValueLength;
152 WORD wType;
153 WCHAR szKey[9];
154 } STRINGTABLE;
155
156 typedef struct
157 {
158 WORD wLength;
159 WORD wValueLength;
160 WORD wType;
161 } STRINGHDR;
162
163 typedef struct
164 {
165 WORD wLength;
166 WORD wValueLength;
167 WORD wType;
168 WCHAR szKey[13];
169 } VARFILEINFO;
170
171 typedef struct
172 {
173 WORD wLength;
174 WORD wValueLength;
175 WORD wType;
176 WCHAR szKey[13];
177 DWORD Value;
178 } VAR;
179
180 typedef struct rsrc_section_t
181 {
182 IMAGE_RESOURCE_DIRECTORY header;
183 IMAGE_RESOURCE_DIRECTORY_ENTRY file_info_id;
184 IMAGE_RESOURCE_DIRECTORY file_info_header;
185 IMAGE_RESOURCE_DIRECTORY_ENTRY version_info_id;
186 IMAGE_RESOURCE_DIRECTORY version_info_header;
187 IMAGE_RESOURCE_DIRECTORY_ENTRY version_lang_id;
188 IMAGE_RESOURCE_DATA_ENTRY version_data_entry;
189
190 VS_VERSIONINFO version_info;
191 STRINGFILEINFO string_file_info;
192 STRINGTABLE string_table;
193
194 STRINGHDR FileVersion_hdr;
195 WCHAR FileVersion_key[13];
196 WCHAR FileVersion_val[8];
197
198 STRINGHDR ProductVersion_hdr;
199 WCHAR ProductVersion_key[15];
200 WCHAR ProductVersion_val[8];
201
202 STRINGHDR CompanyName_hdr;
203 WCHAR CompanyName_key[13];
204 WCHAR CompanyName_val[12];
205
206 STRINGHDR FileDescription_hdr;
207 WCHAR FileDescription_key[17];
208 WCHAR FileDescription_val[16];
209
210 STRINGHDR InternalName_hdr;
211 WCHAR InternalName_key[13];
212 WCHAR InternalName_val[14];
213
214 STRINGHDR LegalCopyright_hdr;
215 WCHAR LegalCopyright_key[15];
216 WCHAR LegalCopyright_val[16];
217
218 STRINGHDR LegalTrademarks_hdr;
219 WCHAR LegalTrademarks_key[17];
220 WCHAR LegalTrademarks_val[16];
221
222 STRINGHDR OriginalFilename_hdr;
223 WCHAR OriginalFilename_key[17];
224 WCHAR OriginalFilename_val[18];
225
226 STRINGHDR Productname_hdr;
227 WCHAR Productname_key[13];
228 WCHAR Productname_val[12];
229
230 VARFILEINFO file_info;
231 VAR translation;
232 } rsrc_section_t;
233
234 #define RT_VERSION_DW 16
235 static const rsrc_section_t rsrc_section =
236 {
237 /* header */
238 {
239 0, /* Characteristics */
240 0x55FE8E21, /* TimeDateStamp, 20/09/2015 10:44:49 */
241 0, /* MajorVersion */
242 0, /* MinorVersion */
243 0, /* NumberOfNamedEntries */
244 1, /* NumberOfIdEntries */
245 },
246 /* file_info_id */
247 {
248 {{
249 RT_VERSION_DW, /* NameOffset:31 */
250 0 /* NameIsString:1 */
251 }},
252 {
253 0x80000018 /* OffsetToData */
254 }
255 },
256 /* file_info_header */
257 {
258 0, /* Characteristics */
259 0x55FE8E21, /* TimeDateStamp, 20/09/2015 10:44:49 */
260 0, /* MajorVersion */
261 0, /* MinorVersion */
262 0, /* NumberOfNamedEntries */
263 1, /* NumberOfIdEntries */
264 },
265 /* version_info_id */
266 {
267 {{
268 VS_VERSION_INFO, /* NameOffset:31 */
269 0 /* NameIsString:1 */
270 }},
271 {
272 0x80000030 /* OffsetToData */
273 },
274 },
275 /* version_info_header */
276 {
277 0, /* Characteristics */
278 0x55FE8E21, /* TimeDateStamp, 20/09/2015 10:44:49 */
279 0, /* MajorVersion */
280 0, /* MinorVersion */
281 0, /* NumberOfNamedEntries */
282 1, /* NumberOfIdEntries */
283 },
284 /* version_lang_id */
285 {
286 {{
287 1033, /* NameOffset:31 */
288 0 /* NameIsString:1 */
289 }},
290 {
291 0x48 /* OffsetToDirectory */
292 }
293 },
294 /* version_data_entry */
295 {
296 0x2058, /* OffsetToData */
297 0x30C, /* Size */
298 0, /* CodePage */
299 0, /* Reserved */
300 },
301
302 /* version_info */
303 {
304 0x30C, /* wLength */
305 0x34, /* wValueLength */
306 0, /* wType: Binary */
307 { 'V','S','_','V','E','R','S','I','O','N','_','I','N','F','O','\0','\0' }, /* szKey[17] */
308 /* Value */
309 {
310 0xFEEF04BD, /* dwSignature */
311 0x10000, /* dwStrucVersion */
312 0x10000, /* dwFileVersionMS */
313 0, /* dwFileVersionLS */
314 0x10000, /* dwProductVersionMS */
315 1, /* dwProductVersionLS */
316 0, /* dwFileFlagsMask */
317 0, /* dwFileFlags */
318 VOS__WINDOWS32, /* dwFileOS */
319 VFT_APP, /* dwFileType */
320 0, /* dwFileSubtype */
321 0x01d1a019, /* dwFileDateMS */
322 0xac754c50 /* dwFileDateLS */
323 },
324 },
325
326 /* string_file_info */
327 {
328 0x26C, /* wLength */
329 0, /* wValueLength */
330 1, /* wType: Text */
331 { 'S','t','r','i','n','g','F','i','l','e','I','n','f','o','\0' } /* szKey[15] */
332 },
333 /* string_table */
334 {
335 0x248, /* wLength */
336 0, /* wValueLength */
337 1, /* wType: Text */
338 { 'F','F','F','F','0','0','0','0','\0' } /* szKey[9] */
339 },
340
341 /* FileVersion */
342 {
343 48, /* wLength */
344 8, /* wValueLength */
345 1, /* wType: Text */
346 },
347 { 'F','i','l','e','V','e','r','s','i','o','n','\0' },
348 { '1','.','0','.','0','.','0','\0' },
349
350 /* ProductVersion */
351 {
352 52, /* wLength */
353 8, /* wValueLength */
354 1, /* wType: Text */
355 },
356 { 'P','r','o','d','u','c','t','V','e','r','s','i','o','n','\0' },
357 { '1','.','0','.','0','.','1','\0' },
358
359 /* CompanyName */
360 {
361 56, /* wLength */
362 12, /* wValueLength */
363 1, /* wType: Text */
364 },
365 { 'C','o','m','p','a','n','y','N','a','m','e','\0' },
366 { 'C','o','m','p','a','n','y','N','a','m','e','\0' },
367
368 /* FileDescription */
369 {
370 72, /* wLength */
371 16, /* wValueLength */
372 1, /* wType: Text */
373 },
374 { 'F','i','l','e','D','e','s','c','r','i','p','t','i','o','n','\0' },
375 { 'F','i','l','e','D','e','s','c','r','i','p','t','i','o','n','\0' },
376
377 /* InternalName */
378 {
379 58, /* wLength */
380 13, /* wValueLength */
381 1, /* wType: Text */
382 },
383 { 'I','n','t','e','r','n','a','l','N','a','m','e','\0' },
384 { 'I','n','t','e','r','n','a','l','N','a','m','e','\0' },
385
386 /* LegalCopyright */
387 {
388 66, /* wLength */
389 15, /* wValueLength */
390 1, /* wType: Text */
391 },
392 { 'L','e','g','a','l','C','o','p','y','r','i','g','h','t','\0' },
393 { 'L','e','g','a','l','C','o','p','y','r','i','g','h','t','\0' },
394
395 /* LegalTrademarks */
396 {
397 72, /* wLength */
398 16, /* wValueLength */
399 1, /* wType: Text */
400 },
401 { 'L','e','g','a','l','T','r','a','d','e','m','a','r','k','s','\0' },
402 { 'L','e','g','a','l','T','r','a','d','e','m','a','r','k','s','\0' },
403
404 /* OriginalFilename */
405 {
406 74, /* wLength */
407 17, /* wValueLength */
408 1, /* wType: Text */
409 },
410 { 'O','r','i','g','i','n','a','l','F','i','l','e','n','a','m','e','\0' },
411 { 'O','r','i','g','i','n','a','l','F','i','l','e','n','a','m','e','\0' },
412
413 /* ProductName */
414 {
415 56, /* wLength */
416 12, /* wValueLength */
417 1, /* wType: Text */
418 },
419 { 'P','r','o','d','u','c','t','N','a','m','e','\0' },
420 { 'P','r','o','d','u','c','t','N','a','m','e','\0' },
421
422
423 /* file_info */
424 {
425 0x44, /* wLength */
426 0, /* wValueLength */
427 1, /* wType: Text */
428 { 'V','a','r','F','i','l','e','I','n','f','o','\0' } /* szKey[13] */
429 },
430
431 /* translation */
432 {
433 0x24, /* wLength */
434 4, /* wValueLength */
435 0, /* wType: Binary */
436 { 'T','r','a','n','s','l','a','t','i','o','n','\0' }, /* szKey[13] */
437 0xffff /* Value */
438 }
439 };
440
441 typedef struct export_section_t
442 {
443 IMAGE_EXPORT_DIRECTORY desc;
444 char binary_name[10];
445 } export_section_t;
446
447 /* This export section is not complete, but the Name RVA is only taken into account */
448 static export_section_t export_dir =
449 {
450 {
451 0, /* Characteristics */
452 0, /* TimeDateStamp */
453 0, /* MajorVersion */
454 0, /* MinorVersion */
455 0x2398, /* Name (RVA) */
456 1, /* Base */
457 0, /* NumberOfFunctions */
458 0, /* NumberOfNames */
459 0, /* AddressOfFunctions (RVA) */
460 0, /* AddressOfNames (RVA) */
461 0, /* AddressOfNameOrdinals (RVA) */
462 },
463 { 'T','e','S','t','2','.','e','x','e',0 }, /* binary_name */
464 };
465
466
test_create_exe_imp(const WCHAR * name,int skip_rsrc_exports)467 void test_create_exe_imp(const WCHAR* name, int skip_rsrc_exports)
468 {
469 HANDLE file;
470 char *buf, *cur;
471 DWORD size = 0x800;
472
473 buf = malloc(size);
474 winetest_ok(buf != NULL, "malloc failed\n");
475 if (buf == NULL)
476 {
477 return;
478 }
479
480 file = CreateFileW(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
481 winetest_ok(file != INVALID_HANDLE_VALUE, "can't create file\n");
482 if (file == INVALID_HANDLE_VALUE)
483 {
484 free(buf);
485 return;
486 }
487
488 memset(buf, 0, size);
489 cur = memcpy(buf, &dos_header, sizeof(dos_header));
490 cur += dos_header.e_lfanew;
491
492 memcpy(cur, &nt_header, sizeof(nt_header));
493 if (skip_rsrc_exports)
494 {
495 ((IMAGE_NT_HEADERS32*)cur)->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress = 0;
496 ((IMAGE_NT_HEADERS32*)cur)->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress = 0;
497 }
498 cur += sizeof(nt_header);
499 memcpy(cur, section_headers, sizeof(section_headers));
500
501 /* write code section: */
502 cur = buf + section_headers[0].PointerToRawData;
503 memcpy(cur, text_section, sizeof(text_section));
504
505 if (!skip_rsrc_exports)
506 {
507 /* write resource section: */
508 cur = buf + section_headers[1].PointerToRawData;
509 memcpy(cur, &rsrc_section, sizeof(rsrc_section));
510
511 /* write minimal export directory: */
512 cur += 0x370;
513 memcpy(cur, &export_dir, sizeof(export_dir));
514 }
515
516 WriteFile(file, buf, size, &size, NULL);
517 free(buf);
518 CloseHandle(file);
519 }
520
521
522 /* Almost everything in this filetype is ignored, only e_lfanew, ne_restab and ne_nrestab are relevant */
test_create_ne_imp(const WCHAR * name,int skip_names)523 void test_create_ne_imp(const WCHAR* name, int skip_names)
524 {
525 HANDLE file;
526 DWORD size;
527 IMAGE_DOS_HEADER MZ_hdr = { IMAGE_DOS_SIGNATURE, 0 };
528 IMAGE_OS2_HEADER NE_hdr = { IMAGE_OS2_SIGNATURE, 0 };
529 static const BYTE NE_names[] =
530 {
531 /* Show that the length is used, not the nullterm*/
532 11,'T','E','S','T','M','O','D','.','h','X','x','x',0,0,0,
533 20,'M','O','D',' ','D','E','S','C','R','I','P','T','I','O','N',' ','H','E','R','E',0,0,0
534 };
535
536 file = CreateFileW(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
537 winetest_ok(file != INVALID_HANDLE_VALUE, "can't create file\n");
538 if(file == INVALID_HANDLE_VALUE)
539 return;
540
541 MZ_hdr.e_lfanew = sizeof(MZ_hdr);
542 if (!skip_names)
543 {
544 NE_hdr.ne_restab = sizeof(NE_hdr); /* First entry (pascal string + ordinal) = module name */
545 NE_hdr.ne_nrestab = sizeof(MZ_hdr) + sizeof(NE_hdr) + 16; /* First entry (pascal string + ordinal) = module description */
546 }
547
548 WriteFile(file, &MZ_hdr, sizeof(MZ_hdr), &size, NULL);
549 WriteFile(file, &NE_hdr, sizeof(NE_hdr), &size, NULL);
550 WriteFile(file, NE_names, sizeof(NE_names), &size, NULL);
551
552 CloseHandle(file);
553 }
554
test_create_file_imp(const WCHAR * name,const char * contents,size_t len)555 void test_create_file_imp(const WCHAR* name, const char* contents, size_t len)
556 {
557 HANDLE file = CreateFileW(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
558 winetest_ok(file != INVALID_HANDLE_VALUE, "can't create file\n");
559 if (file != INVALID_HANDLE_VALUE)
560 {
561 if (contents && len)
562 {
563 DWORD size;
564 WriteFile(file, contents, (DWORD)len, &size, NULL);
565 }
566 CloseHandle(file);
567 }
568 }
569
570 static unsigned char win10Header[8] = {
571 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
572 };
573 static unsigned char rawData[2356] = {
574 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x73, 0x64, 0x62, 0x66,
575 0x02, 0x78, 0x3E, 0x01, 0x00, 0x00, 0x03, 0x78, 0x44, 0x00, 0x00, 0x00,
576 0x02, 0x38, 0x07, 0x70, 0x03, 0x38, 0x01, 0x60, 0x16, 0x40, 0x01, 0x00,
577 0x00, 0x00, 0x01, 0x98, 0x30, 0x00, 0x00, 0x00, 0x4C, 0x4C, 0x41, 0x5F,
578 0x54, 0x53, 0x45, 0x54, 0xC6, 0x01, 0x00, 0x00, 0x53, 0x49, 0x44, 0x5F,
579 0x54, 0x53, 0x45, 0x54, 0x56, 0x02, 0x00, 0x00, 0x57, 0x45, 0x4E, 0x5F,
580 0x54, 0x53, 0x45, 0x54, 0xEC, 0x02, 0x00, 0x00, 0x4B, 0x32, 0x57, 0x5F,
581 0x54, 0x53, 0x45, 0x54, 0x7C, 0x03, 0x00, 0x00, 0x03, 0x78, 0x0E, 0x00,
582 0x00, 0x00, 0x02, 0x38, 0x07, 0x70, 0x03, 0x38, 0x0B, 0x60, 0x01, 0x98,
583 0x00, 0x00, 0x00, 0x00, 0x03, 0x78, 0x0E, 0x00, 0x00, 0x00, 0x02, 0x38,
584 0x07, 0x70, 0x03, 0x38, 0x20, 0x60, 0x01, 0x98, 0x00, 0x00, 0x00, 0x00,
585 0x03, 0x78, 0x0E, 0x00, 0x00, 0x00, 0x02, 0x38, 0x04, 0x70, 0x03, 0x38,
586 0x01, 0x60, 0x01, 0x98, 0x00, 0x00, 0x00, 0x00, 0x03, 0x78, 0x26, 0x00,
587 0x00, 0x00, 0x02, 0x38, 0x0D, 0x70, 0x03, 0x38, 0x15, 0x40, 0x01, 0x98,
588 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
589 0x74, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
590 0x50, 0x04, 0x00, 0x00, 0x03, 0x78, 0x14, 0x00, 0x00, 0x00, 0x02, 0x38,
591 0x10, 0x70, 0x03, 0x38, 0x01, 0x60, 0x16, 0x40, 0x01, 0x00, 0x00, 0x00,
592 0x01, 0x98, 0x00, 0x00, 0x00, 0x00, 0x03, 0x78, 0x0E, 0x00, 0x00, 0x00,
593 0x02, 0x38, 0x12, 0x70, 0x03, 0x38, 0x06, 0x90, 0x01, 0x98, 0x00, 0x00,
594 0x00, 0x00, 0x03, 0x78, 0x14, 0x00, 0x00, 0x00, 0x02, 0x38, 0x12, 0x70,
595 0x03, 0x38, 0x04, 0x90, 0x16, 0x40, 0x01, 0x00, 0x00, 0x00, 0x01, 0x98,
596 0x00, 0x00, 0x00, 0x00, 0x03, 0x78, 0x3E, 0x00, 0x00, 0x00, 0x02, 0x38,
597 0x07, 0x70, 0x03, 0x38, 0x04, 0x90, 0x01, 0x98, 0x30, 0x00, 0x00, 0x00,
598 0xED, 0xB4, 0x89, 0x50, 0xB1, 0xA4, 0x82, 0xA7, 0xEC, 0x02, 0x00, 0x00,
599 0x85, 0x2B, 0x88, 0x40, 0x97, 0x76, 0xA6, 0xC4, 0xC6, 0x01, 0x00, 0x00,
600 0x77, 0x7A, 0xBF, 0x48, 0x78, 0xB1, 0x69, 0xD2, 0x56, 0x02, 0x00, 0x00,
601 0xD0, 0x15, 0xE6, 0xCB, 0xE8, 0x90, 0x68, 0xFE, 0x7C, 0x03, 0x00, 0x00,
602 0x01, 0x70, 0x42, 0x03, 0x00, 0x00, 0x01, 0x50, 0x3E, 0xD6, 0xC0, 0x02,
603 0x1A, 0xB9, 0xD1, 0x01, 0x22, 0x60, 0x06, 0x00, 0x00, 0x00, 0x01, 0x60,
604 0x1C, 0x00, 0x00, 0x00, 0x23, 0x40, 0x01, 0x00, 0x00, 0x00, 0x07, 0x90,
605 0x10, 0x00, 0x00, 0x00, 0xB0, 0x0E, 0x9B, 0xE3, 0xDB, 0x55, 0x0B, 0x45,
606 0x9B, 0xD4, 0xD2, 0x0C, 0x94, 0x84, 0x26, 0x0F, 0x02, 0x70, 0x00, 0x00,
607 0x00, 0x00, 0x0B, 0x70, 0x32, 0x00, 0x00, 0x00, 0x01, 0x60, 0x3E, 0x00,
608 0x00, 0x00, 0x09, 0x70, 0x26, 0x00, 0x00, 0x00, 0x01, 0x60, 0x5C, 0x00,
609 0x00, 0x00, 0x08, 0x60, 0x82, 0x00, 0x00, 0x00, 0x03, 0x70, 0x06, 0x00,
610 0x00, 0x00, 0x03, 0x60, 0xA0, 0x00, 0x00, 0x00, 0x03, 0x70, 0x08, 0x00,
611 0x00, 0x00, 0x01, 0x10, 0x03, 0x60, 0xBE, 0x00, 0x00, 0x00, 0x07, 0x70,
612 0x8A, 0x00, 0x00, 0x00, 0x01, 0x60, 0xDC, 0x00, 0x00, 0x00, 0x06, 0x60,
613 0x00, 0x01, 0x00, 0x00, 0x05, 0x60, 0x2C, 0x01, 0x00, 0x00, 0x04, 0x90,
614 0x10, 0x00, 0x00, 0x00, 0x3F, 0xC9, 0x50, 0x4E, 0x63, 0xB8, 0xFA, 0x4D,
615 0xBA, 0xE2, 0xD8, 0x0E, 0xF4, 0xCE, 0x5C, 0x89, 0x0D, 0x70, 0x24, 0x00,
616 0x00, 0x00, 0x17, 0x40, 0x01, 0x00, 0x00, 0x00, 0x10, 0x40, 0x01, 0x00,
617 0x00, 0x00, 0x15, 0x40, 0x01, 0x00, 0x00, 0x00, 0x24, 0x40, 0x72, 0x00,
618 0x6F, 0x00, 0x25, 0x40, 0x67, 0x00, 0x72, 0x00, 0x26, 0x40, 0x00, 0x00,
619 0x00, 0x00, 0x08, 0x70, 0x32, 0x00, 0x00, 0x00, 0x01, 0x60, 0x5C, 0x01,
620 0x00, 0x00, 0x09, 0x60, 0x66, 0x01, 0x00, 0x00, 0x10, 0x60, 0x84, 0x01,
621 0x00, 0x00, 0x11, 0x60, 0xA2, 0x01, 0x00, 0x00, 0x13, 0x60, 0xB8, 0x01,
622 0x00, 0x00, 0x06, 0x50, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
623 0x0D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x70,
624 0x90, 0x00, 0x00, 0x00, 0x01, 0x60, 0xCE, 0x01, 0x00, 0x00, 0x06, 0x60,
625 0xF8, 0x01, 0x00, 0x00, 0x05, 0x60, 0x2A, 0x02, 0x00, 0x00, 0x04, 0x90,
626 0x10, 0x00, 0x00, 0x00, 0xE1, 0x20, 0x67, 0x15, 0x98, 0xEF, 0x04, 0x4D,
627 0x96, 0x5A, 0xD8, 0x5D, 0xE0, 0x5E, 0x6D, 0x9F, 0x0D, 0x70, 0x24, 0x00,
628 0x00, 0x00, 0x17, 0x40, 0x01, 0x00, 0x00, 0x00, 0x10, 0x40, 0x02, 0x00,
629 0x00, 0x00, 0x15, 0x40, 0x02, 0x00, 0x00, 0x00, 0x24, 0x40, 0x20, 0x00,
630 0x32, 0x00, 0x25, 0x40, 0x2E, 0x00, 0x38, 0x00, 0x26, 0x40, 0x00, 0x00,
631 0x00, 0x00, 0x08, 0x70, 0x38, 0x00, 0x00, 0x00, 0x01, 0x60, 0x5C, 0x01,
632 0x00, 0x00, 0x09, 0x60, 0x66, 0x01, 0x00, 0x00, 0x10, 0x60, 0x84, 0x01,
633 0x00, 0x00, 0x11, 0x60, 0xA2, 0x01, 0x00, 0x00, 0x02, 0x50, 0x00, 0x00,
634 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x50, 0x01, 0x00, 0x00, 0x00,
635 0x00, 0x00, 0x01, 0x00, 0x0B, 0x40, 0xAD, 0xBA, 0x00, 0x00, 0x13, 0x60,
636 0xB8, 0x01, 0x00, 0x00, 0x07, 0x70, 0x8A, 0x00, 0x00, 0x00, 0x01, 0x60,
637 0x60, 0x02, 0x00, 0x00, 0x06, 0x60, 0x80, 0x02, 0x00, 0x00, 0x05, 0x60,
638 0x9E, 0x02, 0x00, 0x00, 0x04, 0x90, 0x10, 0x00, 0x00, 0x00, 0x69, 0xEF,
639 0x70, 0xCE, 0x1D, 0xA2, 0x8B, 0x40, 0x84, 0x5B, 0xF9, 0x9E, 0xAC, 0x06,
640 0x09, 0xE7, 0x08, 0x70, 0x32, 0x00, 0x00, 0x00, 0x01, 0x60, 0x5C, 0x01,
641 0x00, 0x00, 0x09, 0x60, 0x66, 0x01, 0x00, 0x00, 0x10, 0x60, 0x84, 0x01,
642 0x00, 0x00, 0x11, 0x60, 0xA2, 0x01, 0x00, 0x00, 0x02, 0x50, 0x00, 0x00,
643 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x50, 0x01, 0x00, 0x00, 0x00,
644 0x00, 0x00, 0x01, 0x00, 0x13, 0x60, 0xB8, 0x01, 0x00, 0x00, 0x08, 0x70,
645 0x12, 0x00, 0x00, 0x00, 0x01, 0x60, 0xC0, 0x02, 0x00, 0x00, 0x01, 0x40,
646 0x04, 0x00, 0x00, 0x00, 0x03, 0x40, 0xB0, 0xB0, 0xB0, 0xB0, 0x0B, 0x70,
647 0x0C, 0x00, 0x00, 0x00, 0x01, 0x60, 0x3E, 0x00, 0x00, 0x00, 0x1A, 0x40,
648 0x8E, 0x01, 0x00, 0x00, 0x07, 0x70, 0xCE, 0x00, 0x00, 0x00, 0x01, 0x60,
649 0xEC, 0x02, 0x00, 0x00, 0x06, 0x60, 0x0E, 0x03, 0x00, 0x00, 0x05, 0x60,
650 0x26, 0x03, 0x00, 0x00, 0x04, 0x90, 0x10, 0x00, 0x00, 0x00, 0x44, 0xD1,
651 0xEA, 0xB4, 0x40, 0xF6, 0x4B, 0x4E, 0x94, 0xC4, 0x0C, 0x7F, 0xA8, 0x66,
652 0x23, 0xB0, 0x08, 0x70, 0x94, 0x00, 0x00, 0x00, 0x01, 0x60, 0x5C, 0x01,
653 0x00, 0x00, 0x01, 0x40, 0x00, 0x08, 0x00, 0x00, 0x03, 0x40, 0x29, 0xD6,
654 0x8B, 0x17, 0x09, 0x60, 0x66, 0x01, 0x00, 0x00, 0x10, 0x60, 0x84, 0x01,
655 0x00, 0x00, 0x11, 0x60, 0xA2, 0x01, 0x00, 0x00, 0x12, 0x60, 0x42, 0x03,
656 0x00, 0x00, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
657 0x03, 0x50, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x40,
658 0x03, 0x00, 0x00, 0x00, 0x09, 0x40, 0x04, 0x00, 0x00, 0x00, 0x0A, 0x40,
659 0x01, 0x00, 0x00, 0x00, 0x0B, 0x40, 0xAD, 0xBA, 0x00, 0x00, 0x1C, 0x40,
660 0x02, 0x00, 0x04, 0x00, 0x13, 0x60, 0xB8, 0x01, 0x00, 0x00, 0x14, 0x60,
661 0x68, 0x03, 0x00, 0x00, 0x15, 0x60, 0x90, 0x03, 0x00, 0x00, 0x16, 0x60,
662 0xB0, 0x03, 0x00, 0x00, 0x06, 0x50, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
663 0x01, 0x00, 0x0D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
664 0x1D, 0x40, 0x45, 0x23, 0x01, 0x00, 0x1E, 0x40, 0x45, 0x23, 0x01, 0x00,
665 0x0B, 0x70, 0x06, 0x00, 0x00, 0x00, 0x01, 0x60, 0xD4, 0x03, 0x00, 0x00,
666 0x0D, 0x70, 0x1E, 0x00, 0x00, 0x00, 0x15, 0x40, 0x02, 0x00, 0x00, 0x00,
667 0x0E, 0x70, 0x06, 0x00, 0x00, 0x00, 0x19, 0x60, 0xEC, 0x03, 0x00, 0x00,
668 0x1B, 0x60, 0xF8, 0x01, 0x00, 0x00, 0x18, 0x60, 0x2A, 0x04, 0x00, 0x00,
669 0x0D, 0x70, 0x1E, 0x00, 0x00, 0x00, 0x15, 0x40, 0x01, 0x00, 0x00, 0x00,
670 0x0E, 0x70, 0x06, 0x00, 0x00, 0x00, 0x19, 0x60, 0x4A, 0x04, 0x00, 0x00,
671 0x1B, 0x60, 0x00, 0x01, 0x00, 0x00, 0x18, 0x60, 0x82, 0x04, 0x00, 0x00,
672 0x01, 0x78, 0x96, 0x04, 0x00, 0x00, 0x01, 0x88, 0x10, 0x00, 0x00, 0x00,
673 0x32, 0x00, 0x2E, 0x00, 0x31, 0x00, 0x2E, 0x00, 0x30, 0x00, 0x2E, 0x00,
674 0x33, 0x00, 0x00, 0x00, 0x01, 0x88, 0x1C, 0x00, 0x00, 0x00, 0x61, 0x00,
675 0x70, 0x00, 0x70, 0x00, 0x68, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x70, 0x00,
676 0x5F, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x31, 0x00,
677 0x00, 0x00, 0x01, 0x88, 0x18, 0x00, 0x00, 0x00, 0x54, 0x00, 0x65, 0x00,
678 0x73, 0x00, 0x74, 0x00, 0x4E, 0x00, 0x65, 0x00, 0x77, 0x00, 0x4D, 0x00,
679 0x6F, 0x00, 0x64, 0x00, 0x65, 0x00, 0x00, 0x00, 0x01, 0x88, 0x20, 0x00,
680 0x00, 0x00, 0x56, 0x00, 0x69, 0x00, 0x72, 0x00, 0x74, 0x00, 0x75, 0x00,
681 0x61, 0x00, 0x6C, 0x00, 0x52, 0x00, 0x65, 0x00, 0x67, 0x00, 0x69, 0x00,
682 0x73, 0x00, 0x74, 0x00, 0x72, 0x00, 0x79, 0x00, 0x00, 0x00, 0x01, 0x88,
683 0x18, 0x00, 0x00, 0x00, 0x54, 0x00, 0x68, 0x00, 0x65, 0x00, 0x6D, 0x00,
684 0x65, 0x00, 0x41, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x76, 0x00,
685 0x65, 0x00, 0x00, 0x00, 0x01, 0x88, 0x18, 0x00, 0x00, 0x00, 0x65, 0x00,
686 0x78, 0x00, 0x63, 0x00, 0x6C, 0x00, 0x75, 0x00, 0x64, 0x00, 0x65, 0x00,
687 0x2E, 0x00, 0x64, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x01, 0x88,
688 0x18, 0x00, 0x00, 0x00, 0x69, 0x00, 0x6E, 0x00, 0x63, 0x00, 0x6C, 0x00,
689 0x75, 0x00, 0x64, 0x00, 0x65, 0x00, 0x2E, 0x00, 0x64, 0x00, 0x6C, 0x00,
690 0x6C, 0x00, 0x00, 0x00, 0x01, 0x88, 0x1E, 0x00, 0x00, 0x00, 0x74, 0x00,
691 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x5F, 0x00, 0x61, 0x00, 0x6C, 0x00,
692 0x6C, 0x00, 0x6F, 0x00, 0x77, 0x00, 0x2E, 0x00, 0x65, 0x00, 0x78, 0x00,
693 0x65, 0x00, 0x00, 0x00, 0x01, 0x88, 0x26, 0x00, 0x00, 0x00, 0x61, 0x00,
694 0x70, 0x00, 0x70, 0x00, 0x68, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x70, 0x00,
695 0x5F, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x5F, 0x00,
696 0x61, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x6F, 0x00, 0x77, 0x00, 0x00, 0x00,
697 0x01, 0x88, 0x2A, 0x00, 0x00, 0x00, 0x61, 0x00, 0x70, 0x00, 0x70, 0x00,
698 0x68, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x70, 0x00, 0x5F, 0x00, 0x76, 0x00,
699 0x65, 0x00, 0x6E, 0x00, 0x64, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x5F, 0x00,
700 0x61, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x6F, 0x00, 0x77, 0x00, 0x00, 0x00,
701 0x01, 0x88, 0x04, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x01, 0x88,
702 0x18, 0x00, 0x00, 0x00, 0x43, 0x00, 0x6F, 0x00, 0x6D, 0x00, 0x70, 0x00,
703 0x61, 0x00, 0x6E, 0x00, 0x79, 0x00, 0x4E, 0x00, 0x61, 0x00, 0x6D, 0x00,
704 0x65, 0x00, 0x00, 0x00, 0x01, 0x88, 0x18, 0x00, 0x00, 0x00, 0x50, 0x00,
705 0x72, 0x00, 0x6F, 0x00, 0x64, 0x00, 0x75, 0x00, 0x63, 0x00, 0x74, 0x00,
706 0x4E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x01, 0x88,
707 0x10, 0x00, 0x00, 0x00, 0x31, 0x00, 0x2E, 0x00, 0x30, 0x00, 0x2E, 0x00,
708 0x30, 0x00, 0x2E, 0x00, 0x31, 0x00, 0x00, 0x00, 0x01, 0x88, 0x10, 0x00,
709 0x00, 0x00, 0x31, 0x00, 0x2E, 0x00, 0x30, 0x00, 0x2E, 0x00, 0x30, 0x00,
710 0x2E, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x88, 0x24, 0x00, 0x00, 0x00,
711 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x5F, 0x00, 0x64, 0x00,
712 0x69, 0x00, 0x73, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x6F, 0x00,
713 0x77, 0x00, 0x2E, 0x00, 0x65, 0x00, 0x78, 0x00, 0x65, 0x00, 0x00, 0x00,
714 0x01, 0x88, 0x2C, 0x00, 0x00, 0x00, 0x61, 0x00, 0x70, 0x00, 0x70, 0x00,
715 0x68, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x70, 0x00, 0x5F, 0x00, 0x6E, 0x00,
716 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x5F, 0x00, 0x64, 0x00, 0x69, 0x00,
717 0x73, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x6F, 0x00, 0x77, 0x00,
718 0x00, 0x00, 0x01, 0x88, 0x30, 0x00, 0x00, 0x00, 0x61, 0x00, 0x70, 0x00,
719 0x70, 0x00, 0x68, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x70, 0x00, 0x5F, 0x00,
720 0x76, 0x00, 0x65, 0x00, 0x6E, 0x00, 0x64, 0x00, 0x6F, 0x00, 0x72, 0x00,
721 0x5F, 0x00, 0x64, 0x00, 0x69, 0x00, 0x73, 0x00, 0x61, 0x00, 0x6C, 0x00,
722 0x6C, 0x00, 0x6F, 0x00, 0x77, 0x00, 0x00, 0x00, 0x01, 0x88, 0x1A, 0x00,
723 0x00, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x5F, 0x00,
724 0x6E, 0x00, 0x65, 0x00, 0x77, 0x00, 0x2E, 0x00, 0x65, 0x00, 0x78, 0x00,
725 0x65, 0x00, 0x00, 0x00, 0x01, 0x88, 0x18, 0x00, 0x00, 0x00, 0x66, 0x00,
726 0x69, 0x00, 0x78, 0x00, 0x6E, 0x00, 0x65, 0x00, 0x77, 0x00, 0x5F, 0x00,
727 0x6E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x01, 0x88,
728 0x1C, 0x00, 0x00, 0x00, 0x66, 0x00, 0x69, 0x00, 0x78, 0x00, 0x6E, 0x00,
729 0x65, 0x00, 0x77, 0x00, 0x5F, 0x00, 0x76, 0x00, 0x65, 0x00, 0x6E, 0x00,
730 0x64, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x00, 0x00, 0x01, 0x88, 0x26, 0x00,
731 0x00, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x5F, 0x00,
732 0x63, 0x00, 0x68, 0x00, 0x65, 0x00, 0x63, 0x00, 0x6B, 0x00, 0x66, 0x00,
733 0x69, 0x00, 0x6C, 0x00, 0x65, 0x00, 0x2E, 0x00, 0x74, 0x00, 0x78, 0x00,
734 0x74, 0x00, 0x00, 0x00, 0x01, 0x88, 0x1C, 0x00, 0x00, 0x00, 0x74, 0x00,
735 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x5F, 0x00, 0x77, 0x00, 0x32, 0x00,
736 0x6B, 0x00, 0x33, 0x00, 0x2E, 0x00, 0x65, 0x00, 0x78, 0x00, 0x65, 0x00,
737 0x00, 0x00, 0x01, 0x88, 0x12, 0x00, 0x00, 0x00, 0x66, 0x00, 0x69, 0x00,
738 0x78, 0x00, 0x5F, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00,
739 0x00, 0x00, 0x01, 0x88, 0x16, 0x00, 0x00, 0x00, 0x66, 0x00, 0x69, 0x00,
740 0x78, 0x00, 0x5F, 0x00, 0x76, 0x00, 0x65, 0x00, 0x6E, 0x00, 0x64, 0x00,
741 0x6F, 0x00, 0x72, 0x00, 0x00, 0x00, 0x01, 0x88, 0x20, 0x00, 0x00, 0x00,
742 0x46, 0x00, 0x69, 0x00, 0x6C, 0x00, 0x65, 0x00, 0x44, 0x00, 0x65, 0x00,
743 0x73, 0x00, 0x63, 0x00, 0x72, 0x00, 0x69, 0x00, 0x70, 0x00, 0x74, 0x00,
744 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00, 0x00, 0x00, 0x01, 0x88, 0x22, 0x00,
745 0x00, 0x00, 0x4F, 0x00, 0x72, 0x00, 0x69, 0x00, 0x67, 0x00, 0x69, 0x00,
746 0x6E, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x46, 0x00, 0x69, 0x00, 0x6C, 0x00,
747 0x65, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00,
748 0x01, 0x88, 0x1A, 0x00, 0x00, 0x00, 0x49, 0x00, 0x6E, 0x00, 0x74, 0x00,
749 0x65, 0x00, 0x72, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x4E, 0x00,
750 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x01, 0x88, 0x1E, 0x00,
751 0x00, 0x00, 0x4C, 0x00, 0x65, 0x00, 0x67, 0x00, 0x61, 0x00, 0x6C, 0x00,
752 0x43, 0x00, 0x6F, 0x00, 0x70, 0x00, 0x79, 0x00, 0x72, 0x00, 0x69, 0x00,
753 0x67, 0x00, 0x68, 0x00, 0x74, 0x00, 0x00, 0x00, 0x01, 0x88, 0x12, 0x00,
754 0x00, 0x00, 0x57, 0x00, 0x69, 0x00, 0x6E, 0x00, 0x53, 0x00, 0x72, 0x00,
755 0x76, 0x00, 0x30, 0x00, 0x33, 0x00, 0x00, 0x00, 0x01, 0x88, 0x38, 0x00,
756 0x00, 0x00, 0x68, 0x00, 0x74, 0x00, 0x74, 0x00, 0x70, 0x00, 0x3A, 0x00,
757 0x2F, 0x00, 0x2F, 0x00, 0x72, 0x00, 0x65, 0x00, 0x61, 0x00, 0x63, 0x00,
758 0x74, 0x00, 0x6F, 0x00, 0x73, 0x00, 0x2E, 0x00, 0x6F, 0x00, 0x72, 0x00,
759 0x67, 0x00, 0x2F, 0x00, 0x64, 0x00, 0x69, 0x00, 0x73, 0x00, 0x61, 0x00,
760 0x6C, 0x00, 0x6C, 0x00, 0x6F, 0x00, 0x77, 0x00, 0x00, 0x00, 0x01, 0x88,
761 0x1A, 0x00, 0x00, 0x00, 0x4E, 0x00, 0x6F, 0x00, 0x74, 0x00, 0x20, 0x00,
762 0x61, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x6F, 0x00, 0x77, 0x00, 0x65, 0x00,
763 0x64, 0x00, 0x21, 0x00, 0x00, 0x00, 0x01, 0x88, 0x32, 0x00, 0x00, 0x00,
764 0x68, 0x00, 0x74, 0x00, 0x74, 0x00, 0x70, 0x00, 0x3A, 0x00, 0x2F, 0x00,
765 0x2F, 0x00, 0x72, 0x00, 0x65, 0x00, 0x61, 0x00, 0x63, 0x00, 0x74, 0x00,
766 0x6F, 0x00, 0x73, 0x00, 0x2E, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x67, 0x00,
767 0x2F, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x6F, 0x00, 0x77, 0x00,
768 0x00, 0x00, 0x01, 0x88, 0x14, 0x00, 0x00, 0x00, 0x41, 0x00, 0x6C, 0x00,
769 0x6C, 0x00, 0x6F, 0x00, 0x77, 0x00, 0x20, 0x00, 0x69, 0x00, 0x74, 0x00,
770 0x21, 0x00, 0x00, 0x00
771 };
772
test_get_db_size()773 DWORD test_get_db_size()
774 {
775 return sizeof(rawData);
776 }
777
test_create_db_imp(const WCHAR * name,int win10)778 void test_create_db_imp(const WCHAR* name, int win10)
779 {
780 HANDLE file = CreateFileW(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
781 winetest_ok(file != INVALID_HANDLE_VALUE, "can't create file '%s'\n", wine_dbgstr_w(name));
782 if (file != INVALID_HANDLE_VALUE)
783 {
784 DWORD size;
785 WriteFile(file, rawData, sizeof(rawData), &size, NULL);
786 if (win10)
787 {
788 SetFilePointer(file, 0, NULL, FILE_BEGIN);
789 WriteFile(file, win10Header, sizeof(win10Header), &size, NULL);
790 }
791 CloseHandle(file);
792 }
793 }
794
795 DWORD g_WinVersion;
get_host_winver(void)796 DWORD get_host_winver(void)
797 {
798 if (!g_WinVersion)
799 {
800 RTL_OSVERSIONINFOEXW rtlinfo = {0};
801 void (__stdcall* pRtlGetVersion)(RTL_OSVERSIONINFOEXW*);
802 pRtlGetVersion = (void (__stdcall*)(RTL_OSVERSIONINFOEXW*))GetProcAddress(GetModuleHandleA("ntdll"), "RtlGetVersion");
803
804 rtlinfo.dwOSVersionInfoSize = sizeof(rtlinfo);
805 pRtlGetVersion(&rtlinfo);
806 g_WinVersion = (rtlinfo.dwMajorVersion << 8) | rtlinfo.dwMinorVersion;
807 }
808 return g_WinVersion;
809 }
810
get_module_version(HMODULE mod)811 DWORD get_module_version(HMODULE mod)
812 {
813 DWORD dwVersion = 0;
814 HRSRC hResInfo = FindResource(mod, MAKEINTRESOURCE(VS_VERSION_INFO), RT_VERSION);
815 DWORD dwSize = SizeofResource(mod, hResInfo);
816 if (hResInfo && dwSize)
817 {
818 VS_FIXEDFILEINFO *lpFfi;
819 UINT uLen;
820
821 HGLOBAL hResData = LoadResource(mod, hResInfo);
822 LPVOID pRes = LockResource(hResData);
823 HLOCAL pResCopy = LocalAlloc(LMEM_FIXED, dwSize);
824
825 CopyMemory(pResCopy, pRes, dwSize);
826 FreeResource(hResData);
827
828 if (VerQueryValueW(pResCopy, L"\\", (LPVOID*)&lpFfi, &uLen))
829 {
830 dwVersion = (HIWORD(lpFfi->dwProductVersionMS) << 8) | LOWORD(lpFfi->dwProductVersionMS);
831 if (!dwVersion)
832 dwVersion = (HIWORD(lpFfi->dwFileVersionMS) << 8) | LOWORD(lpFfi->dwFileVersionMS);
833 }
834
835 LocalFree(pResCopy);
836 }
837
838 return dwVersion;
839 }
840
silence_debug_output(void)841 void silence_debug_output(void)
842 {
843 if (GetEnvironmentVariableA("SHIM_DEBUG_LEVEL", NULL, 0) == ERROR_ENVVAR_NOT_FOUND)
844 SetEnvironmentVariableA("SHIM_DEBUG_LEVEL", "0");
845 if (GetEnvironmentVariableA("SHIMENG_DEBUG_LEVEL", NULL, 0) == ERROR_ENVVAR_NOT_FOUND)
846 SetEnvironmentVariableA("SHIMENG_DEBUG_LEVEL", "0");
847 }
848
849