-
Notifications
You must be signed in to change notification settings - Fork 26
/
Structs.cs
321 lines (294 loc) · 8.79 KB
/
Structs.cs
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
using System;
using System.Collections;
using System.Collections.Generic;
namespace BuildBackup
{
public struct VersionsFile
{
public VersionsEntry[] entries;
}
public struct VersionsEntry
{
public string region;
public string buildConfig;
public string cdnConfig;
public string buildId;
public string versionsName;
public string productConfig;
public string keyRing;
}
public struct CdnsFile
{
public CdnsEntry[] entries;
}
public struct CdnsEntry
{
public string name;
public string path;
public string[] hosts;
public string configPath;
}
public struct GameBlobFile
{
public string decryptionKeyName;
}
public struct BuildConfigFile
{
public string root;
public string[] download;
public string[] downloadSize;
public string[] install;
public string[] installSize;
public string[] encoding;
public string[] encodingSize;
public string[] size;
public string[] sizeSize;
public string buildName;
public string buildPlaybuildInstaller;
public string buildProduct;
public string buildUid;
public string buildBranch;
public string buildNumber;
public string buildAttributes;
public string buildComments;
public string buildCreator;
public string buildFixedHash;
public string buildReplayHash;
public string buildManifestVersion;
public string buildSignatureFile;
public string patch;
public string patchSize;
public string patchConfig;
public string[] patchIndex;
public string[] patchIndexSize;
public string partialPriority;
public string partialPrioritySize;
}
public struct CDNConfigFile
{
public string[] archives;
public string archiveGroup;
public string[] patchArchives;
public string patchArchiveGroup;
public string[] builds;
public string fileIndex;
public string fileIndexSize;
public string patchFileIndex;
public string patchFileIndexSize;
}
public struct IndexEntry
{
public short index;
public uint offset;
public uint size;
}
public struct IndexFooter
{
public byte[] tocHash;
public byte version;
public byte unk0;
public byte unk1;
public byte blockSizeKB;
public byte offsetBytes;
public byte sizeBytes;
public byte keySizeInBytes;
public byte checksumSize;
public uint numElements;
public byte[] footerChecksum;
}
public struct EncodingFile
{
public byte unk1;
public byte checksumSizeA;
public byte checksumSizeB;
public ushort sizeA;
public ushort sizeB;
public uint numEntriesA;
public uint numEntriesB;
public byte unk2;
public ulong stringBlockSize;
public string[] stringBlockEntries;
public EncodingHeaderEntry[] aHeaders;
public EncodingFileEntry[] aEntries;
public EncodingHeaderEntry[] bHeaders;
public Dictionary<string, EncodingFileDescEntry> bEntries;
public string encodingESpec;
}
public struct EncodingHeaderEntry
{
public string firstHash;
public string checksum;
}
public struct EncodingFileEntry
{
public ushort keyCount;
public uint size;
public string cKey;
public List<string> eKeys;
}
public struct EncodingFileDescEntry
{
public string key;
public uint stringIndex;
public ulong compressedSize;
}
public struct InstallFile
{
public byte hashSize;
public ushort numTags;
public uint numEntries;
public InstallTagEntry[] tags;
public InstallFileEntry[] entries;
}
public struct InstallTagEntry
{
public string name;
public ushort type;
public BitArray files;
}
public struct InstallFileEntry
{
public string name;
public byte[] contentHash;
public uint size;
public List<string> tags;
}
public struct DownloadFile
{
public byte version;
public byte hashSizeEKey;
public bool hasChecksumInEntry;
public uint numEntries;
public uint numTags;
public byte flagSize;
public DownloadEntry[] entries;
}
public struct DownloadEntry
{
public string eKey;
public ulong size;
public byte priority;
public uint checksum;
public byte flags;
}
public struct BLTEChunkInfo
{
public bool isFullChunk;
public int compSize;
public int decompSize;
public byte[] checkSum;
}
public struct RootFile
{
public MultiDictionary<ulong, RootEntry> entriesLookup;
public MultiDictionary<uint, RootEntry> entriesFDID;
}
public struct RootEntry
{
public ContentFlags contentFlags;
public LocaleFlags localeFlags;
public ulong lookup;
public uint fileDataID;
public byte[] md5;
}
public struct PatchFile
{
public byte version;
public byte fileKeySize;
public byte sizeB;
public byte patchKeySize;
public byte blockSizeBits;
public ushort blockCount;
public byte flags;
public byte[] encodingContentKey;
public byte[] encodingEncodingKey;
public uint decodedSize;
public uint encodedSize;
public byte especLength;
public string encodingSpec;
public PatchBlock[] blocks;
}
public struct PatchBlock
{
public byte[] lastFileContentKey;
public byte[] blockMD5;
public uint blockOffset;
public BlockFile[] files;
}
public struct BlockFile
{
public byte numPatches;
public byte[] targetFileContentKey;
public ulong decodedSize;
public FilePatch[] patches;
}
public struct FilePatch
{
public byte[] sourceFileEncodingKey;
public ulong decodedSize;
public byte[] patchEncodingKey;
public uint patchSize;
public byte patchIndex;
}
[Flags]
public enum LocaleFlags : uint
{
All = 0xFFFFFFFF,
None = 0,
Unk_1 = 0x1,
enUS = 0x2,
koKR = 0x4,
Unk_8 = 0x8,
frFR = 0x10,
deDE = 0x20,
zhCN = 0x40,
esES = 0x80,
zhTW = 0x100,
enGB = 0x200,
enCN = 0x400,
enTW = 0x800,
esMX = 0x1000,
ruRU = 0x2000,
ptBR = 0x4000,
itIT = 0x8000,
ptPT = 0x10000,
enSG = 0x20000000, // custom
plPL = 0x40000000, // custom
All_WoW = enUS | koKR | frFR | deDE | zhCN | esES | zhTW | enGB | esMX | ruRU | ptBR | itIT | ptPT
}
[Flags]
public enum ContentFlags : uint
{
None = 0,
F00000001 = 0x1, // unused in 9.0.5
F00000002 = 0x2, // unused in 9.0.5
F00000004 = 0x4, // unused in 9.0.5
LoadOnWindows = 0x8, // added in 7.2.0.23436
LoadOnMacOS = 0x10, // added in 7.2.0.23436
LowViolence = 0x80, // many models have this flag
DoNotLoad = 0x100, // unused in 9.0.5
F00000200 = 0x200, // unused in 9.0.5
F00000400 = 0x400, // unused in 9.0.5
UpdatePlugin = 0x800, // UpdatePlugin.dll / UpdatePlugin.dylib only
F00001000 = 0x1000, // unused in 9.0.5
F00002000 = 0x2000, // unused in 9.0.5
F00004000 = 0x4000, // unused in 9.0.5
F00008000 = 0x8000, // unused in 9.0.5
F00010000 = 0x10000, // unused in 9.0.5
F00020000 = 0x20000, // 1173911 uses in 9.0.5
F00040000 = 0x40000, // 1329023 uses in 9.0.5
F00080000 = 0x80000, // 682817 uses in 9.0.5
F00100000 = 0x100000, // 1231299 uses in 9.0.5
F00200000 = 0x200000, // 7398 uses in 9.0.5: updateplugin, .bls, .lua, .toc, .xsd
F00400000 = 0x400000, // 156302 uses in 9.0.5
F00800000 = 0x800000, // .skel & .wwf
F01000000 = 0x1000000, // unused in 9.0.5
F02000000 = 0x2000000, // 969369 uses in 9.0.5
F04000000 = 0x4000000, // 1101698 uses in 9.0.5
Encrypted = 0x8000000, // File is encrypted
NoNames = 0x10000000, // No lookup hash
UncommonRes = 0x20000000, // added in 7.0.3.21737
Bundle = 0x40000000, // unused in 9.0.5
NoCompression = 0x80000000 // sounds have this flag
}
}