-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon_event.ksy
222 lines (208 loc) · 4.01 KB
/
common_event.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
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
meta:
id: common_event
endian: le
imports:
- len_str
types:
kuku:
seq:
- id: ku1
type: u1
- id: ku2_len
type: u1
- id: ku2
type: u4
repeat: expr
repeat-expr: ku2_len
- id: ku3_len
type: u1
- id: ku3
size: ku3_len
arg_special_str_data:
seq:
- id: values_len
type: u4
- id: values
type: len_str
repeat: expr
repeat-expr: values_len
arg_special_num_data:
seq:
- id: values_len
type: u4
- id: values
type: u4
repeat: expr
repeat-expr: values_len
po:
seq:
- id: color
type: u4
- id: var_names
type: len_str
repeat: expr
repeat-expr: 100
- id: check
type: u1
valid:
any-of:
- 0x90
- 0x91
- id: wm
type: wm
if: check == 0x91
wm:
seq:
- id: a
type: len_str
- id: check
type: u1
valid:
any-of:
- 0x91
- 0x92
- id: return
type: return
if: check == 0x92
return:
seq:
- id: name
type: len_str
- id: value_id
type: u4
- id: check
type: u1
valid: 0x92
hmm:
enums:
special_type:
0: no
1: db_ref
2: options
seq:
- id: arg_names_len
type: u4
- id: arg_names
type: len_str
repeat: expr
repeat-expr: arg_names_len
- id: type_len
type: u4
- id: types
type: u1
enum: special_type
repeat: expr
repeat-expr: type_len
- id: arg_special_str_data_len
type: u4
- id: arg_special_str_data
type: arg_special_str_data
repeat: expr
repeat-expr: arg_special_str_data_len
- id: arg_special_num_data_len
type: u4
- id: arg_special_num_data
type: arg_special_num_data
repeat: expr
repeat-expr: arg_special_num_data_len
- id: arg_default_len
type: u4
- id: arg_default
type: u4
repeat: expr
repeat-expr: arg_default_len
- id: check
type: u1
valid:
any-of:
- 0x8F
- 0x90
- id: po
type: po
if: check == 0x90
event:
seq:
- id: checka
type: u1
valid: 0x8E
- id: id
type: u4
- id: run_cond
type: u1
- id: c
type: u4
valid: 0x1E8480
- id: d
type: u4
valid: 0
- id: enabled_num_arg_num
type: u1
- id: enabled_str_arg_num
type: u1
- id: name
type: len_str
- id: len
type: u4
- id: ins
type: instruction
repeat: expr
repeat-expr: len
- id: note_len
type: u4
- id: unk
size: note_len
- id: note
if: note_len >= 1
type: len_str
- id: check
type: u1
valid:
any-of:
- 0x8E
- 0x8F
- 0x90
- id: hmm
type: hmm
if: check != 0x8E
instruction:
seq:
- id: u8_arg_len
type: u1
- id: u8_arg
type: u4
repeat: expr
repeat-expr: u8_arg_len
- id: indent
type: u1
- id: str_arg_len
type: u1
- id: str_arg
type: len_str
repeat: expr
repeat-expr: str_arg_len
- id: l4
type: u1
- id: l5
size: 6
if: l4 >= 1
- id: l6
type: u4
if: l4 >= 1
- id: l7
if: l6 <= 65536
type: kuku
seq:
- id: magic
contents: [0, 'W', 0, 0, 'O', 'L', 0, 'F', 'C', 0]
- id: check
type: u1
valid: 0x8f
- id: events_len
type: u4
- id: events
type: event
repeat: expr
repeat-expr: events_len
- id: footer
type: u1
valid: 0x8F