-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDyingLightGame.c
2071 lines (1819 loc) · 55.6 KB
/
DyingLightGame.c
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
typedef unsigned char undefined;
typedef unsigned long long GUID;
typedef unsigned int ImageBaseOffset32;
typedef unsigned char bool;
typedef unsigned char byte;
typedef unsigned int dword;
typedef long long longlong;
typedef unsigned long long qword;
typedef unsigned char uchar;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef unsigned long long ulonglong;
typedef unsigned char undefined1;
typedef unsigned short undefined2;
typedef unsigned int undefined4;
typedef unsigned long long undefined8;
typedef unsigned short ushort;
typedef short wchar_t;
typedef unsigned short word;
typedef unsigned short wchar16;
typedef union IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryUnion IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryUnion, *PIMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryUnion;
typedef struct IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryStruct IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryStruct, *PIMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryStruct;
struct IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryStruct {
dword OffsetToDirectory;
dword DataIsDirectory;
};
union IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryUnion {
dword OffsetToData;
struct IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryStruct IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryStruct;
};
typedef ulonglong __uint64;
typedef struct type_info type_info, *Ptype_info;
struct type_info { // PlaceHolder Class Structure
};
typedef struct IGame IGame, *PIGame;
struct IGame { // PlaceHolder Class Structure
};
typedef struct tagMSG tagMSG, *PtagMSG;
typedef struct tagMSG MSG;
typedef struct HWND__ HWND__, *PHWND__;
typedef struct HWND__ * HWND;
typedef uint UINT;
typedef ulonglong UINT_PTR;
typedef UINT_PTR WPARAM;
typedef longlong LONG_PTR;
typedef LONG_PTR LPARAM;
typedef ulong DWORD;
typedef struct tagPOINT tagPOINT, *PtagPOINT;
typedef struct tagPOINT POINT;
typedef long LONG;
struct tagPOINT {
LONG x;
LONG y;
};
struct tagMSG {
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
};
struct HWND__ {
int unused;
};
typedef struct tagMSG * LPMSG;
// WARNING! conflicting data type names: /guiddef.h/GUID - /GUID
typedef struct _GUID _GUID, *P_GUID;
struct _GUID {
ulong Data1;
ushort Data2;
ushort Data3;
uchar Data4[8];
};
typedef struct Settings Settings, *PSettings;
struct Settings { // PlaceHolder Class Structure
};
typedef struct _SECURITY_ATTRIBUTES _SECURITY_ATTRIBUTES, *P_SECURITY_ATTRIBUTES;
typedef void * LPVOID;
typedef int BOOL;
struct _SECURITY_ATTRIBUTES {
DWORD nLength;
LPVOID lpSecurityDescriptor;
BOOL bInheritHandle;
};
typedef struct tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, *PtagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
typedef void * PVOID;
typedef ulong ULONG;
struct tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA {
PVOID lpInformation;
PVOID lpSectionBase;
ULONG ulSectionLength;
PVOID lpSectionGlobalDataBase;
ULONG ulSectionGlobalDataLength;
};
typedef struct tagACTCTX_SECTION_KEYED_DATA tagACTCTX_SECTION_KEYED_DATA, *PtagACTCTX_SECTION_KEYED_DATA;
typedef void * HANDLE;
typedef struct tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
struct tagACTCTX_SECTION_KEYED_DATA {
ULONG cbSize;
ULONG ulDataFormatVersion;
PVOID lpData;
ULONG ulLength;
PVOID lpSectionGlobalData;
ULONG ulSectionGlobalDataLength;
PVOID lpSectionBase;
ULONG ulSectionTotalLength;
HANDLE hActCtx;
ULONG ulAssemblyRosterIndex;
ULONG ulFlags;
ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA AssemblyMetadata;
};
typedef struct _STARTUPINFOW _STARTUPINFOW, *P_STARTUPINFOW;
typedef wchar_t WCHAR;
typedef WCHAR * LPWSTR;
typedef ushort WORD;
typedef uchar BYTE;
typedef BYTE * LPBYTE;
struct _STARTUPINFOW {
DWORD cb;
LPWSTR lpReserved;
LPWSTR lpDesktop;
LPWSTR lpTitle;
DWORD dwX;
DWORD dwY;
DWORD dwXSize;
DWORD dwYSize;
DWORD dwXCountChars;
DWORD dwYCountChars;
DWORD dwFillAttribute;
DWORD dwFlags;
WORD wShowWindow;
WORD cbReserved2;
LPBYTE lpReserved2;
HANDLE hStdInput;
HANDLE hStdOutput;
HANDLE hStdError;
};
typedef struct tagACTCTXW tagACTCTXW, *PtagACTCTXW;
typedef struct tagACTCTXW ACTCTXW;
typedef WCHAR * LPCWSTR;
typedef ushort USHORT;
typedef WORD LANGID;
typedef struct HINSTANCE__ HINSTANCE__, *PHINSTANCE__;
typedef struct HINSTANCE__ * HINSTANCE;
typedef HINSTANCE HMODULE;
struct HINSTANCE__ {
int unused;
};
struct tagACTCTXW {
ULONG cbSize;
DWORD dwFlags;
LPCWSTR lpSource;
USHORT wProcessorArchitecture;
LANGID wLangId;
LPCWSTR lpAssemblyDirectory;
LPCWSTR lpResourceName;
LPCWSTR lpApplicationName;
HMODULE hModule;
};
typedef struct _STARTUPINFOW * LPSTARTUPINFOW;
typedef struct _RTL_CRITICAL_SECTION _RTL_CRITICAL_SECTION, *P_RTL_CRITICAL_SECTION;
typedef struct _RTL_CRITICAL_SECTION * PRTL_CRITICAL_SECTION;
typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION;
typedef struct _RTL_CRITICAL_SECTION_DEBUG _RTL_CRITICAL_SECTION_DEBUG, *P_RTL_CRITICAL_SECTION_DEBUG;
typedef struct _RTL_CRITICAL_SECTION_DEBUG * PRTL_CRITICAL_SECTION_DEBUG;
typedef ulonglong ULONG_PTR;
typedef struct _LIST_ENTRY _LIST_ENTRY, *P_LIST_ENTRY;
typedef struct _LIST_ENTRY LIST_ENTRY;
struct _RTL_CRITICAL_SECTION {
PRTL_CRITICAL_SECTION_DEBUG DebugInfo;
LONG LockCount;
LONG RecursionCount;
HANDLE OwningThread;
HANDLE LockSemaphore;
ULONG_PTR SpinCount;
};
struct _LIST_ENTRY {
struct _LIST_ENTRY * Flink;
struct _LIST_ENTRY * Blink;
};
struct _RTL_CRITICAL_SECTION_DEBUG {
WORD Type;
WORD CreatorBackTraceIndex;
struct _RTL_CRITICAL_SECTION * CriticalSection;
LIST_ENTRY ProcessLocksList;
DWORD EntryCount;
DWORD ContentionCount;
DWORD Flags;
WORD CreatorBackTraceIndexHigh;
WORD SpareWORD;
};
typedef ACTCTXW * PCACTCTXW;
typedef struct tagACTCTX_SECTION_KEYED_DATA * PACTCTX_SECTION_KEYED_DATA;
typedef struct _EXCEPTION_POINTERS _EXCEPTION_POINTERS, *P_EXCEPTION_POINTERS;
typedef LONG (* PTOP_LEVEL_EXCEPTION_FILTER)(struct _EXCEPTION_POINTERS *);
typedef struct _EXCEPTION_RECORD _EXCEPTION_RECORD, *P_EXCEPTION_RECORD;
typedef struct _EXCEPTION_RECORD EXCEPTION_RECORD;
typedef EXCEPTION_RECORD * PEXCEPTION_RECORD;
typedef struct _CONTEXT _CONTEXT, *P_CONTEXT;
typedef struct _CONTEXT * PCONTEXT;
typedef ulonglong DWORD64;
typedef union _union_52 _union_52, *P_union_52;
typedef struct _M128A _M128A, *P_M128A;
typedef struct _M128A M128A;
typedef struct _XSAVE_FORMAT _XSAVE_FORMAT, *P_XSAVE_FORMAT;
typedef struct _XSAVE_FORMAT XSAVE_FORMAT;
typedef XSAVE_FORMAT XMM_SAVE_AREA32;
typedef struct _struct_53 _struct_53, *P_struct_53;
typedef ulonglong ULONGLONG;
typedef longlong LONGLONG;
struct _M128A {
ULONGLONG Low;
LONGLONG High;
};
struct _XSAVE_FORMAT {
WORD ControlWord;
WORD StatusWord;
BYTE TagWord;
BYTE Reserved1;
WORD ErrorOpcode;
DWORD ErrorOffset;
WORD ErrorSelector;
WORD Reserved2;
DWORD DataOffset;
WORD DataSelector;
WORD Reserved3;
DWORD MxCsr;
DWORD MxCsr_Mask;
M128A FloatRegisters[8];
M128A XmmRegisters[16];
BYTE Reserved4[96];
};
struct _struct_53 {
M128A Header[2];
M128A Legacy[8];
M128A Xmm0;
M128A Xmm1;
M128A Xmm2;
M128A Xmm3;
M128A Xmm4;
M128A Xmm5;
M128A Xmm6;
M128A Xmm7;
M128A Xmm8;
M128A Xmm9;
M128A Xmm10;
M128A Xmm11;
M128A Xmm12;
M128A Xmm13;
M128A Xmm14;
M128A Xmm15;
};
union _union_52 {
XMM_SAVE_AREA32 FltSave;
struct _struct_53 s;
};
struct _CONTEXT {
DWORD64 P1Home;
DWORD64 P2Home;
DWORD64 P3Home;
DWORD64 P4Home;
DWORD64 P5Home;
DWORD64 P6Home;
DWORD ContextFlags;
DWORD MxCsr;
WORD SegCs;
WORD SegDs;
WORD SegEs;
WORD SegFs;
WORD SegGs;
WORD SegSs;
DWORD EFlags;
DWORD64 Dr0;
DWORD64 Dr1;
DWORD64 Dr2;
DWORD64 Dr3;
DWORD64 Dr6;
DWORD64 Dr7;
DWORD64 Rax;
DWORD64 Rcx;
DWORD64 Rdx;
DWORD64 Rbx;
DWORD64 Rsp;
DWORD64 Rbp;
DWORD64 Rsi;
DWORD64 Rdi;
DWORD64 R8;
DWORD64 R9;
DWORD64 R10;
DWORD64 R11;
DWORD64 R12;
DWORD64 R13;
DWORD64 R14;
DWORD64 R15;
DWORD64 Rip;
union _union_52 u;
M128A VectorRegister[26];
DWORD64 VectorControl;
DWORD64 DebugControl;
DWORD64 LastBranchToRip;
DWORD64 LastBranchFromRip;
DWORD64 LastExceptionToRip;
DWORD64 LastExceptionFromRip;
};
struct _EXCEPTION_RECORD {
DWORD ExceptionCode;
DWORD ExceptionFlags;
struct _EXCEPTION_RECORD * ExceptionRecord;
PVOID ExceptionAddress;
DWORD NumberParameters;
ULONG_PTR ExceptionInformation[15];
};
struct _EXCEPTION_POINTERS {
PEXCEPTION_RECORD ExceptionRecord;
PCONTEXT ContextRecord;
};
typedef struct _SECURITY_ATTRIBUTES * LPSECURITY_ATTRIBUTES;
typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION _SYSTEM_LOGICAL_PROCESSOR_INFORMATION, *P_SYSTEM_LOGICAL_PROCESSOR_INFORMATION;
typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION * PSYSTEM_LOGICAL_PROCESSOR_INFORMATION;
typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP {
RelationGroup=4,
RelationNumaNode=1,
RelationCache=2,
RelationProcessorPackage=3,
RelationProcessorCore=0,
RelationAll=65535
} _LOGICAL_PROCESSOR_RELATIONSHIP;
typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP LOGICAL_PROCESSOR_RELATIONSHIP;
typedef union _union_158 _union_158, *P_union_158;
typedef struct _struct_159 _struct_159, *P_struct_159;
typedef struct _struct_160 _struct_160, *P_struct_160;
typedef struct _CACHE_DESCRIPTOR _CACHE_DESCRIPTOR, *P_CACHE_DESCRIPTOR;
typedef struct _CACHE_DESCRIPTOR CACHE_DESCRIPTOR;
typedef enum _PROCESSOR_CACHE_TYPE {
CacheTrace=3,
CacheInstruction=1,
CacheData=2,
CacheUnified=0
} _PROCESSOR_CACHE_TYPE;
typedef enum _PROCESSOR_CACHE_TYPE PROCESSOR_CACHE_TYPE;
struct _struct_159 {
BYTE Flags;
};
struct _struct_160 {
DWORD NodeNumber;
};
struct _CACHE_DESCRIPTOR {
BYTE Level;
BYTE Associativity;
WORD LineSize;
DWORD Size;
PROCESSOR_CACHE_TYPE Type;
};
union _union_158 {
struct _struct_159 ProcessorCore;
struct _struct_160 NumaNode;
CACHE_DESCRIPTOR Cache;
ULONGLONG Reserved[2];
};
struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION {
ULONG_PTR ProcessorMask;
LOGICAL_PROCESSOR_RELATIONSHIP Relationship;
union _union_158 u;
};
typedef union _ULARGE_INTEGER _ULARGE_INTEGER, *P_ULARGE_INTEGER;
typedef union _ULARGE_INTEGER ULARGE_INTEGER;
typedef struct _struct_22 _struct_22, *P_struct_22;
typedef struct _struct_23 _struct_23, *P_struct_23;
struct _struct_23 {
DWORD LowPart;
DWORD HighPart;
};
struct _struct_22 {
DWORD LowPart;
DWORD HighPart;
};
union _ULARGE_INTEGER {
struct _struct_22 s;
struct _struct_23 u;
ULONGLONG QuadPart;
};
typedef char CHAR;
typedef union _LARGE_INTEGER _LARGE_INTEGER, *P_LARGE_INTEGER;
typedef struct _struct_19 _struct_19, *P_struct_19;
typedef struct _struct_20 _struct_20, *P_struct_20;
struct _struct_20 {
DWORD LowPart;
LONG HighPart;
};
struct _struct_19 {
DWORD LowPart;
LONG HighPart;
};
union _LARGE_INTEGER {
struct _struct_19 s;
struct _struct_20 u;
LONGLONG QuadPart;
};
typedef union _LARGE_INTEGER LARGE_INTEGER;
typedef CHAR * LPCSTR;
typedef ULARGE_INTEGER * PULARGE_INTEGER;
typedef struct _OSVERSIONINFOA _OSVERSIONINFOA, *P_OSVERSIONINFOA;
struct _OSVERSIONINFOA {
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
CHAR szCSDVersion[128];
};
typedef CHAR * LPSTR;
typedef struct _OSVERSIONINFOA * LPOSVERSIONINFOA;
typedef DWORD ACCESS_MASK;
typedef struct IMAGE_DOS_HEADER IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;
struct IMAGE_DOS_HEADER {
char e_magic[2]; // Magic number
word e_cblp; // Bytes of last page
word e_cp; // Pages in file
word e_crlc; // Relocations
word e_cparhdr; // Size of header in paragraphs
word e_minalloc; // Minimum extra paragraphs needed
word e_maxalloc; // Maximum extra paragraphs needed
word e_ss; // Initial (relative) SS value
word e_sp; // Initial SP value
word e_csum; // Checksum
word e_ip; // Initial IP value
word e_cs; // Initial (relative) CS value
word e_lfarlc; // File address of relocation table
word e_ovno; // Overlay number
word e_res[4][4]; // Reserved words
word e_oemid; // OEM identifier (for e_oeminfo)
word e_oeminfo; // OEM information; e_oemid specific
word e_res2[10][10]; // Reserved words
dword e_lfanew; // File address of new exe header
byte e_program[192]; // Actual DOS program
};
typedef struct tm tm, *Ptm;
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
};
typedef longlong INT_PTR;
typedef ULONG_PTR DWORD_PTR;
typedef ULONG_PTR SIZE_T;
typedef ULONG_PTR * PDWORD_PTR;
typedef struct file file, *Pfile;
struct file { // PlaceHolder Class Structure
};
typedef struct DotNetPdbInfo DotNetPdbInfo, *PDotNetPdbInfo;
struct DotNetPdbInfo {
char signature[4];
GUID guid;
dword age;
char pdbname[146];
};
typedef struct _FILETIME _FILETIME, *P_FILETIME;
typedef struct _FILETIME * LPFILETIME;
struct _FILETIME {
DWORD dwLowDateTime;
DWORD dwHighDateTime;
};
typedef INT_PTR (* FARPROC)(void);
typedef struct HKEY__ HKEY__, *PHKEY__;
struct HKEY__ {
int unused;
};
typedef HANDLE * LPHANDLE;
typedef DWORD * LPDWORD;
typedef struct HKEY__ * HKEY;
typedef HKEY * PHKEY;
typedef LONG_PTR LRESULT;
typedef DWORD * PDWORD;
typedef void * HGDIOBJ;
typedef union IMAGE_RESOURCE_DIRECTORY_ENTRY IMAGE_RESOURCE_DIRECTORY_ENTRY, *PIMAGE_RESOURCE_DIRECTORY_ENTRY;
typedef union IMAGE_RESOURCE_DIRECTORY_ENTRY_NameUnion IMAGE_RESOURCE_DIRECTORY_ENTRY_NameUnion, *PIMAGE_RESOURCE_DIRECTORY_ENTRY_NameUnion;
typedef struct IMAGE_RESOURCE_DIRECTORY_ENTRY_NameStruct IMAGE_RESOURCE_DIRECTORY_ENTRY_NameStruct, *PIMAGE_RESOURCE_DIRECTORY_ENTRY_NameStruct;
struct IMAGE_RESOURCE_DIRECTORY_ENTRY_NameStruct {
dword NameOffset;
dword NameIsString;
};
union IMAGE_RESOURCE_DIRECTORY_ENTRY_NameUnion {
struct IMAGE_RESOURCE_DIRECTORY_ENTRY_NameStruct IMAGE_RESOURCE_DIRECTORY_ENTRY_NameStruct;
dword Name;
word Id;
};
union IMAGE_RESOURCE_DIRECTORY_ENTRY {
union IMAGE_RESOURCE_DIRECTORY_ENTRY_NameUnion NameUnion;
union IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryUnion DirectoryUnion;
};
typedef struct IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER64, *PIMAGE_OPTIONAL_HEADER64;
typedef struct IMAGE_DATA_DIRECTORY IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY;
struct IMAGE_DATA_DIRECTORY {
ImageBaseOffset32 VirtualAddress;
dword Size;
};
struct IMAGE_OPTIONAL_HEADER64 {
word Magic;
byte MajorLinkerVersion;
byte MinorLinkerVersion;
dword SizeOfCode;
dword SizeOfInitializedData;
dword SizeOfUninitializedData;
ImageBaseOffset32 AddressOfEntryPoint;
ImageBaseOffset32 BaseOfCode;
pointer64 ImageBase;
dword SectionAlignment;
dword FileAlignment;
word MajorOperatingSystemVersion;
word MinorOperatingSystemVersion;
word MajorImageVersion;
word MinorImageVersion;
word MajorSubsystemVersion;
word MinorSubsystemVersion;
dword Win32VersionValue;
dword SizeOfImage;
dword SizeOfHeaders;
dword CheckSum;
word Subsystem;
word DllCharacteristics;
qword SizeOfStackReserve;
qword SizeOfStackCommit;
qword SizeOfHeapReserve;
qword SizeOfHeapCommit;
dword LoaderFlags;
dword NumberOfRvaAndSizes;
struct IMAGE_DATA_DIRECTORY DataDirectory[16];
};
typedef struct StringTable StringTable, *PStringTable;
struct StringTable {
word wLength;
word wValueLength;
word wType;
};
typedef struct IMAGE_SECTION_HEADER IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER;
typedef union Misc Misc, *PMisc;
typedef enum SectionFlags {
IMAGE_SCN_ALIGN_2BYTES=2097152,
IMAGE_SCN_ALIGN_128BYTES=8388608,
IMAGE_SCN_LNK_INFO=512,
IMAGE_SCN_ALIGN_4096BYTES=13631488,
IMAGE_SCN_MEM_READ=1073741824,
IMAGE_SCN_ALIGN_8BYTES=4194304,
IMAGE_SCN_ALIGN_64BYTES=7340032,
IMAGE_SCN_ALIGN_256BYTES=9437184,
IMAGE_SCN_MEM_WRITE=2147483648,
IMAGE_SCN_LNK_COMDAT=4096,
IMAGE_SCN_MEM_16BIT=131072,
IMAGE_SCN_ALIGN_8192BYTES=14680064,
IMAGE_SCN_MEM_PURGEABLE=131072,
IMAGE_SCN_GPREL=32768,
IMAGE_SCN_MEM_EXECUTE=536870912,
IMAGE_SCN_ALIGN_4BYTES=3145728,
IMAGE_SCN_LNK_OTHER=256,
IMAGE_SCN_MEM_PRELOAD=524288,
IMAGE_SCN_ALIGN_1BYTES=1048576,
IMAGE_SCN_MEM_NOT_PAGED=134217728,
IMAGE_SCN_ALIGN_1024BYTES=11534336,
IMAGE_SCN_RESERVED_0001=16,
IMAGE_SCN_MEM_LOCKED=262144,
IMAGE_SCN_ALIGN_512BYTES=10485760,
IMAGE_SCN_CNT_INITIALIZED_DATA=64,
IMAGE_SCN_ALIGN_32BYTES=6291456,
IMAGE_SCN_MEM_DISCARDABLE=33554432,
IMAGE_SCN_CNT_UNINITIALIZED_DATA=128,
IMAGE_SCN_ALIGN_2048BYTES=12582912,
IMAGE_SCN_MEM_SHARED=268435456,
IMAGE_SCN_CNT_CODE=32,
IMAGE_SCN_LNK_REMOVE=2048,
IMAGE_SCN_ALIGN_16BYTES=5242880,
IMAGE_SCN_TYPE_NO_PAD=8,
IMAGE_SCN_LNK_NRELOC_OVFL=16777216,
IMAGE_SCN_RESERVED_0040=1024,
IMAGE_SCN_MEM_NOT_CACHED=67108864
} SectionFlags;
union Misc {
dword PhysicalAddress;
dword VirtualSize;
};
struct IMAGE_SECTION_HEADER {
char Name[8];
union Misc Misc;
ImageBaseOffset32 VirtualAddress;
dword SizeOfRawData;
dword PointerToRawData;
dword PointerToRelocations;
dword PointerToLinenumbers;
word NumberOfRelocations;
word NumberOfLinenumbers;
enum SectionFlags Characteristics;
};
typedef struct IMAGE_NT_HEADERS64 IMAGE_NT_HEADERS64, *PIMAGE_NT_HEADERS64;
typedef struct IMAGE_FILE_HEADER IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;
struct IMAGE_FILE_HEADER {
word Machine; // 34404
word NumberOfSections;
dword TimeDateStamp;
dword PointerToSymbolTable;
dword NumberOfSymbols;
word SizeOfOptionalHeader;
word Characteristics;
};
struct IMAGE_NT_HEADERS64 {
char Signature[4];
struct IMAGE_FILE_HEADER FileHeader;
struct IMAGE_OPTIONAL_HEADER64 OptionalHeader;
};
typedef struct Var Var, *PVar;
struct Var {
word wLength;
word wValueLength;
word wType;
};
typedef struct VS_VERSION_INFO VS_VERSION_INFO, *PVS_VERSION_INFO;
struct VS_VERSION_INFO {
word StructLength;
word ValueLength;
word StructType;
wchar16 Info[16];
byte Padding[2];
dword Signature;
word StructVersion[2];
word FileVersion[4];
word ProductVersion[4];
dword FileFlagsMask[2];
dword FileFlags;
dword FileOS;
dword FileType;
dword FileSubtype;
dword FileTimestamp;
};
typedef struct IMAGE_RESOURCE_DATA_ENTRY IMAGE_RESOURCE_DATA_ENTRY, *PIMAGE_RESOURCE_DATA_ENTRY;
struct IMAGE_RESOURCE_DATA_ENTRY {
dword OffsetToData;
dword Size;
dword CodePage;
dword Reserved;
};
typedef struct VarFileInfo VarFileInfo, *PVarFileInfo;
struct VarFileInfo {
word wLength;
word wValueLength;
word wType;
};
typedef struct IMAGE_RESOURCE_DIRECTORY IMAGE_RESOURCE_DIRECTORY, *PIMAGE_RESOURCE_DIRECTORY;
struct IMAGE_RESOURCE_DIRECTORY {
dword Characteristics;
dword TimeDateStamp;
word MajorVersion;
word MinorVersion;
word NumberOfNamedEntries;
word NumberOfIdEntries;
};
typedef struct IMAGE_DEBUG_DIRECTORY IMAGE_DEBUG_DIRECTORY, *PIMAGE_DEBUG_DIRECTORY;
struct IMAGE_DEBUG_DIRECTORY {
dword Characteristics;
dword TimeDateStamp;
word MajorVersion;
word MinorVersion;
dword Type;
dword SizeOfData;
dword AddressOfRawData;
dword PointerToRawData;
};
typedef struct StringInfo StringInfo, *PStringInfo;
struct StringInfo {
word wLength;
word wValueLength;
word wType;
};
typedef struct StringFileInfo StringFileInfo, *PStringFileInfo;
struct StringFileInfo {
word wLength;
word wValueLength;
word wType;
};
typedef struct _iobuf _iobuf, *P_iobuf;
struct _iobuf {
char * _ptr;
int _cnt;
char * _base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char * _tmpfname;
};
typedef struct _iobuf FILE;
typedef LONG LSTATUS;
typedef ACCESS_MASK REGSAM;
typedef char * va_list;
typedef struct AssetManager AssetManager, *PAssetManager;
struct AssetManager { // PlaceHolder Structure
};
typedef struct IProgressIndicator IProgressIndicator, *PIProgressIndicator;
struct IProgressIndicator { // PlaceHolder Structure
};
typedef struct SDL SDL, *PSDL;
struct SDL { // PlaceHolder Structure
};
typedef struct HICON__ HICON__, *PHICON__;
struct HICON__ { // PlaceHolder Structure
};
typedef enum TYPE {
} TYPE;
typedef enum ENUM {
} ENUM;
typedef struct IMountHelper IMountHelper, *PIMountHelper;
struct IMountHelper { // PlaceHolder Structure
};
typedef struct string_base<char> string_base<char>, *Pstring_base<char>;
struct string_base<char> { // PlaceHolder Structure
};
typedef enum FLAGS {
} FLAGS;
typedef int (* _onexit_t)(void);
typedef ulonglong size_t;
typedef int errno_t;
typedef size_t rsize_t;
// WARNING: Restarted to delay deadcode elimination for space: stack
undefined8 entry(void)
{
undefined8 in_RAX;
undefined in_DL;
undefined in_R8B;
undefined in_R9B;
undefined8 uStack16;
code *pcStack8;
pcStack8 = FUN_1400f1315;
uStack16 = in_RAX;
FUN_1400f13c0((byte *)entry,in_DL,in_R8B,in_R9B,&stack0xffffffffffffff80);
return uStack16;
}
// WARNING: Restarted to delay deadcode elimination for space: stack
undefined8 FUN_1400f1315(void)
{
undefined8 in_RAX;
undefined in_DL;
undefined in_R8B;
undefined in_R9B;
longlong in_stack_00000000;
undefined8 uStack8;
uStack8 = in_RAX;
FUN_1400f13c0((byte *)(in_stack_00000000 + -5),in_DL,in_R8B,in_R9B,&stack0xffffffffffffff88);
return uStack8;
}
// WARNING: Type propagation algorithm not settling
// WARNING: Could not reconcile some variable overlaps
byte * FUN_1400f13c0(byte *param_1,undefined param_2,undefined param_3,undefined param_4,