-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathw3-mpq.ksy
83 lines (83 loc) · 1.7 KB
/
w3-mpq.ksy
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
meta:
id: w3_mpq
file-extension: w3x
endian: le
imports:
- w3id
seq:
- id: header
type: header
size: 512
types:
header:
seq:
- id: file_id
type: w3id
- id: header_size
type: u4
- id: archive_size
type: u4
- id: format_version
type: u2
- id: sector_size_shift
type: u2
- id: hash_table_offset
type: u4
- id: block_table_offset
type: u4
- id: num_hash_table_entry
type: u4
- id: num_block_table_entry
type: u4
block_table:
seq:
- id: block_table_entry
type: block_table_entry
repeat: expr
repeat-expr: _root.header.num_block_table_entry
block_table_entry:
seq:
- id: block_offset
type: u4
- id: block_size
type: u4
- id: file_size
type: u4
- id: flags
type: u4
hash_table:
seq:
- id: hash_table_entry
type: hash_table_entry
repeat: expr
repeat-expr: _root.header.num_hash_table_entry
hash_table_entry:
seq:
- id: file_path_hash_a
type: u4
- id: file_path_hash_b
type: u4
- id: language
type: u2
- id: platform
type: u2
- id: file_block_index
type: u4
file_data:
seq:
- id: abc
type: u4
instances:
hash:
pos: header.hash_table_offset
type: hash_table
process: mpq_decrypt("(hash table)", "TABLE")
size: 16 * _root.header.num_hash_table_entry
block:
pos: header.block_table_offset
type: block_table
process: mpq_decrypt("(block table)", "TABLE")
size: 16 * _root.header.num_block_table_entry
enums:
language:
0: neutral