This source file includes following definitions.
- log_capt_seq
- log_capt_seq2
- log_capt_seq_override
- captseq_raw_addr_init_my
- clear_current_raw_addr
- capt_seq_task
- sub_fc07b6ba_my
- sub_fc07b4ee_my
- log_nr_call
- log_remote_hook
- log_rh
- sub_fc083ab0_my
- exp_drv_task
- sub_fc283626_my
- sub_fc3a0c38_my
1 #include "lolevel.h"
2 #include "platform.h"
3 #include "core.h"
4
5
6
7 extern void _LogCameraEvent(int id,const char *fmt,...);
8
9 #define USE_STUBS_NRFLAG 1
10 #define NR_AUTO (-1)
11
12 #ifdef CAPTSEQ_DEBUG_LOG
13
14
15 extern char *hook_raw_image_addr(void);
16
17 void log_capt_seq(int m)
18 {
19 _LogCameraEvent(0x60,"cs m:%d rb:0x%08x i:%04d",
20 m,
21 hook_raw_image_addr(),
22 get_exposure_counter());
23 }
24 void log_capt_seq2(int m)
25 {
26 _LogCameraEvent(0x60,"cs end m:%d rb:0x%08x i:%04d",
27 m,
28 hook_raw_image_addr(),
29 get_exposure_counter());
30 }
31 void log_capt_seq_override(void)
32 {
33 _LogCameraEvent(0x60,"cs override rb:0x%08x i:%04d",
34 hook_raw_image_addr(),
35 get_exposure_counter());
36 }
37 #endif
38
39 #include "../../../generic/capt_seq.c"
40
41
42
43 extern int _captseq_raw_addr_init(int raw_index, char **ptr);
44 char *current_raw_addr;
45
46 void captseq_raw_addr_init_my(int raw_index,char **ptr) {
47 _captseq_raw_addr_init(raw_index,ptr);
48 current_raw_addr=*(ptr + 0x5c/4);
49 #ifdef CAPTSEQ_DEBUG_LOG
50 _LogCameraEvent(0x60,"rawinit i:0x%x p:0x%x v:0x%x",raw_index,ptr,current_raw_addr);
51 #endif
52 }
53
54 void clear_current_raw_addr(void) {
55 current_raw_addr=NULL;
56 }
57
58
59
60 void __attribute__((naked,noinline)) capt_seq_task() {
61 asm volatile (
62 " push {r3, r4, r5, r6, r7, lr}\n"
63 " ldr r4, =0x00039e5c\n"
64 " movs r6, #0\n"
65 " ldr r5, =0x0000ba40\n"
66 "loc_fc0646ba:\n"
67 " movs r2, #0\n"
68 " mov r1, sp\n"
69 " ldr r0, [r5, #8]\n"
70 " blx sub_fc2c7ca8\n"
71 " lsls r0, r0, #0x1f\n"
72 " beq loc_fc0646dc\n"
73 " movw r2, #0x44e\n"
74 " ldr r1, =0xfc064364\n"
75 " movs r0, #0\n"
76 " blx sub_fc2c7de8\n"
77 " blx sub_fc2c7d00\n"
78 " pop {r3, r4, r5, r6, r7, pc}\n"
79 "loc_fc0646dc:\n"
80 " ldr r0, [sp]\n"
81 " ldr r0, [r0]\n"
82 " cmp r0, #1\n"
83 " beq loc_fc0646f4\n"
84 " cmp r0, #0x29\n"
85 " beq loc_fc0646f4\n"
86 " cmp r0, #0x1e\n"
87 " beq loc_fc0646f4\n"
88 " cmp r0, #0x21\n"
89 " beq loc_fc0646f4\n"
90 " bl sub_fc080fbc\n"
91 "loc_fc0646f4:\n"
92 #ifdef CAPTSEQ_DEBUG_LOG
93
94 "ldr r0, [sp]\n"
95 "ldr r0, [r0]\n"
96 "bl log_capt_seq\n"
97 #endif
98 " ldr r0, [sp]\n"
99 " ldr r1, [r0]\n"
100 " cmp r1, #0x2b\n"
101 " bhs loc_fc0647b6\n"
102 " tbb [pc, r1]\n"
103 "branchtable_fc064700:\n"
104 " .byte((loc_fc06472c - branchtable_fc064700) / 2)\n"
105 " .byte((loc_fc064742 - branchtable_fc064700) / 2)\n"
106 " .byte((loc_fc06474a - branchtable_fc064700) / 2)\n"
107 " .byte((loc_fc064758 - branchtable_fc064700) / 2)\n"
108 " .byte((loc_fc064752 - branchtable_fc064700) / 2)\n"
109 " .byte((loc_fc064762 - branchtable_fc064700) / 2)\n"
110 " .byte((loc_fc064768 - branchtable_fc064700) / 2)\n"
111 " .byte((loc_fc06476e - branchtable_fc064700) / 2)\n"
112 " .byte((loc_fc064776 - branchtable_fc064700) / 2)\n"
113 " .byte((loc_fc0647a8 - branchtable_fc064700) / 2)\n"
114 " .byte((loc_fc064780 - branchtable_fc064700) / 2)\n"
115 " .byte((loc_fc064788 - branchtable_fc064700) / 2)\n"
116 " .byte((loc_fc06478e - branchtable_fc064700) / 2)\n"
117 " .byte((loc_fc064796 - branchtable_fc064700) / 2)\n"
118 " .byte((loc_fc06479c - branchtable_fc064700) / 2)\n"
119 " .byte((loc_fc0647a2 - branchtable_fc064700) / 2)\n"
120 " .byte((loc_fc0647b0 - branchtable_fc064700) / 2)\n"
121 " .byte((loc_fc0647c4 - branchtable_fc064700) / 2)\n"
122 " .byte((loc_fc0647ca - branchtable_fc064700) / 2)\n"
123 " .byte((loc_fc0647d0 - branchtable_fc064700) / 2)\n"
124 " .byte((loc_fc0647d6 - branchtable_fc064700) / 2)\n"
125 " .byte((loc_fc0647dc - branchtable_fc064700) / 2)\n"
126 " .byte((loc_fc0647e0 - branchtable_fc064700) / 2)\n"
127 " .byte((loc_fc0647e6 - branchtable_fc064700) / 2)\n"
128 " .byte((loc_fc0647ec - branchtable_fc064700) / 2)\n"
129 " .byte((loc_fc0647f2 - branchtable_fc064700) / 2)\n"
130 " .byte((loc_fc0647f8 - branchtable_fc064700) / 2)\n"
131 " .byte((loc_fc0647fe - branchtable_fc064700) / 2)\n"
132 " .byte((loc_fc064806 - branchtable_fc064700) / 2)\n"
133 " .byte((loc_fc06480c - branchtable_fc064700) / 2)\n"
134 " .byte((loc_fc064810 - branchtable_fc064700) / 2)\n"
135 " .byte((loc_fc064818 - branchtable_fc064700) / 2)\n"
136 " .byte((loc_fc06481e - branchtable_fc064700) / 2)\n"
137 " .byte((loc_fc064824 - branchtable_fc064700) / 2)\n"
138 " .byte((loc_fc06482a - branchtable_fc064700) / 2)\n"
139 " .byte((loc_fc064830 - branchtable_fc064700) / 2)\n"
140 " .byte((loc_fc064836 - branchtable_fc064700) / 2)\n"
141 " .byte((loc_fc06483c - branchtable_fc064700) / 2)\n"
142 " .byte((loc_fc064844 - branchtable_fc064700) / 2)\n"
143 " .byte((loc_fc06484a - branchtable_fc064700) / 2)\n"
144 " .byte((loc_fc06486e - branchtable_fc064700) / 2)\n"
145 " .byte((loc_fc064874 - branchtable_fc064700) / 2)\n"
146 " .byte((loc_fc06488e - branchtable_fc064700) / 2)\n"
147 ".align 1\n"
148 "loc_fc06472c:\n"
149 " ldr r0, [r0, #0xc]\n"
150 " bl sub_fc073cbc\n"
151 #ifdef CAPTSEQ_DEBUG_LOG
152 "bl log_capt_seq_override\n"
153 #endif
154 " BL clear_current_raw_addr\n"
155 " BL shooting_expo_param_override\n"
156 " bl sub_fc079112\n"
157 " ldr r0, [r4, #0x28]\n"
158 " cmp r0, #0\n"
159 " beq loc_fc064740\n"
160 " bl sub_fc07b6ba_my\n"
161 "loc_fc064740:\n"
162 " b loc_fc06488e\n"
163 "loc_fc064742:\n"
164 " ldr r0, [r0, #0x10]\n"
165 " bl sub_fc07b4ee_my\n"
166 " b loc_fc06488e\n"
167 "loc_fc06474a:\n"
168 " movs r0, #1\n"
169 " bl sub_fc073f74\n"
170 " b loc_fc06488e\n"
171 "loc_fc064752:\n"
172 " bl sub_fc073a32\n"
173 " b loc_fc06475e\n"
174 "loc_fc064758:\n"
175 " ldr r0, [r0, #0xc]\n"
176 " bl sub_fc073ca4\n"
177 "loc_fc06475e:\n"
178 " str r6, [r4, #0x28]\n"
179 " b loc_fc06488e\n"
180 "loc_fc064762:\n"
181 " bl sub_fc073caa\n"
182 " b loc_fc06488e\n"
183 "loc_fc064768:\n"
184 " bl sub_fc073e9a\n"
185 " b loc_fc06477a\n"
186 "loc_fc06476e:\n"
187 " ldr r0, [r0, #0x10]\n"
188 " bl sub_fc07b766\n"
189 " b loc_fc06488e\n"
190 "loc_fc064776:\n"
191 " bl sub_fc073efc\n"
192 "loc_fc06477a:\n"
193 " bl sub_fc079112\n"
194 " b loc_fc06488e\n"
195 "loc_fc064780:\n"
196 " ldr r0, [r4, #0x54]\n"
197 " bl sub_fc06f596\n"
198 " b loc_fc06488e\n"
199 "loc_fc064788:\n"
200 " bl sub_fc06f806\n"
201 " b loc_fc06488e\n"
202 "loc_fc06478e:\n"
203 " ldr r0, [r0, #0xc]\n"
204 " bl sub_fc06f852\n"
205 " b loc_fc06488e\n"
206 "loc_fc064796:\n"
207 " bl sub_fc06f986\n"
208 " b loc_fc06488e\n"
209 "loc_fc06479c:\n"
210 " bl sub_fc06fd52\n"
211 " b loc_fc06488e\n"
212 "loc_fc0647a2:\n"
213 " bl sub_fc06fde8\n"
214 " b loc_fc06488e\n"
215 "loc_fc0647a8:\n"
216 " ldr r0, [r0, #0xc]\n"
217 " bl sub_fc073ca4\n"
218 " b loc_fc06488e\n"
219 "loc_fc0647b0:\n"
220 " bl sub_fc071190\n"
221 " b loc_fc06488e\n"
222 "loc_fc0647b6:\n"
223 " b loc_fc064880\n"
224 ".ltorg\n"
225
226
227
228
229 "loc_fc0647c4:\n"
230 " bl sub_fc071338\n"
231 " b loc_fc06488e\n"
232 "loc_fc0647ca:\n"
233 " bl sub_fc0713b0\n"
234 " b loc_fc06488e\n"
235 "loc_fc0647d0:\n"
236 " bl sub_fc07144c\n"
237 " b loc_fc06488e\n"
238 "loc_fc0647d6:\n"
239 " bl sub_fc0714ee\n"
240 " b loc_fc06488e\n"
241 "loc_fc0647dc:\n"
242 " movs r0, #0\n"
243 " b loc_fc064800\n"
244 "loc_fc0647e0:\n"
245 " bl sub_fc071808\n"
246 " b loc_fc06488e\n"
247 "loc_fc0647e6:\n"
248 " bl sub_fc071868\n"
249 " b loc_fc06488e\n"
250 "loc_fc0647ec:\n"
251 " bl sub_fc07186c\n"
252 " b loc_fc06488e\n"
253 "loc_fc0647f2:\n"
254 " bl sub_fc07187c\n"
255 " b loc_fc06488e\n"
256 "loc_fc0647f8:\n"
257 " bl sub_fc0718f4\n"
258 " b loc_fc06488e\n"
259 "loc_fc0647fe:\n"
260 " movs r0, #1\n"
261 "loc_fc064800:\n"
262 " bl sub_fc0716e8\n"
263 " b loc_fc06488e\n"
264 "loc_fc064806:\n"
265 " bl sub_fc074056\n"
266 " b loc_fc06488e\n"
267 "loc_fc06480c:\n"
268 " movs r0, #0\n"
269 " b loc_fc064812\n"
270 "loc_fc064810:\n"
271 " ldr r0, [r0, #0xc]\n"
272 "loc_fc064812:\n"
273 " bl sub_fc0740b6\n"
274 " b loc_fc06488e\n"
275 "loc_fc064818:\n"
276 " bl sub_fc071614\n"
277 " b loc_fc06488e\n"
278 "loc_fc06481e:\n"
279 " bl sub_fc07167a\n"
280 " b loc_fc06488e\n"
281 "loc_fc064824:\n"
282 " bl sub_fc07bf10\n"
283 " b loc_fc06488e\n"
284 "loc_fc06482a:\n"
285 " bl sub_fc079a30\n"
286 " b loc_fc06488e\n"
287 "loc_fc064830:\n"
288 " bl sub_fc29d326\n"
289 " b loc_fc06488e\n"
290 "loc_fc064836:\n"
291 " bl sub_fc29d3e0\n"
292 " b loc_fc06488e\n"
293 "loc_fc06483c:\n"
294 " ldr r0, [r0, #0xc]\n"
295 " bl sub_fc0719d0\n"
296 " b loc_fc06488e\n"
297 "loc_fc064844:\n"
298 " bl sub_fc071a38\n"
299 " b loc_fc06488e\n"
300 "loc_fc06484a:\n"
301 " bl sub_fc0748be\n"
302 " ldrh.w r0, [r4, #0x1a4]\n"
303 " cmp r0, #4\n"
304 " beq loc_fc064860\n"
305 " ldrh r0, [r4]\n"
306 " sub.w r1, r0, #0x4200\n"
307 " subs r1, #0x36\n"
308 " bne loc_fc06488e\n"
309 "loc_fc064860:\n"
310 " bl sub_fc29d3e0\n"
311 " bl sub_fc29d8f6\n"
312 " bl sub_fc29d73e\n"
313 " b loc_fc06488e\n"
314 "loc_fc06486e:\n"
315 " movs r2, #0\n"
316 " movs r1, #0x11\n"
317 " b loc_fc064878\n"
318 "loc_fc064874:\n"
319 " movs r2, #0\n"
320 " movs r1, #0x10\n"
321 "loc_fc064878:\n"
322 " movs r0, #0\n"
323 " bl sub_fc079cf0\n"
324 " b loc_fc06488e\n"
325 "loc_fc064880:\n"
326 " movw r2, #0x57e\n"
327 " ldr r1, =0xfc064364\n"
328 " movs r0, #0\n"
329 " blx sub_fc2c7de8\n"
330 "loc_fc06488e:\n"
331
332 #ifdef CAPTSEQ_DEBUG_LOG
333 "ldr r0, [sp]\n"
334 "ldr r0, [r0]\n"
335 "bl log_capt_seq2\n"
336 #endif
337 " ldr r0, [sp]\n"
338 " ldr r1, [r0, #4]\n"
339 " ldr r0, [r5, #4]\n"
340 " blx sub_fc2c7cd0\n"
341 " ldr r7, [sp]\n"
342 " ldr r0, [r7, #8]\n"
343 " cbnz r0, loc_fc0648ac\n"
344 " movw r2, #0x12b\n"
345 " ldr r1, =0xfc064364\n"
346 " movs r0, #0\n"
347 " blx sub_fc2c7de8\n"
348 "loc_fc0648ac:\n"
349 " str r6, [r7, #8]\n"
350 " b loc_fc0646ba\n"
351 ".ltorg\n"
352 );
353 }
354
355
356 void __attribute__((naked,noinline)) sub_fc07b6ba_my() {
357 asm volatile (
358 " push {r3, r4, r5, r6, r7, lr}\n"
359 " bl sub_fc07fa84\n"
360 " mov r4, r0\n"
361 " movs r0, #0xc\n"
362 " bl sub_fc29dbfc\n"
363 " ldr r6, =0x00014684\n"
364 " lsls r0, r0, #0x1f\n"
365 " mov.w r5, #1\n"
366 " bne loc_fc07b758\n"
367 " movs r2, #2\n"
368 " mov r1, sp\n"
369 " movw r0, #0x110\n"
370 " bl _GetPropertyCase\n"
371 " lsls r0, r0, #0x1f\n"
372 " beq loc_fc07b6ee\n"
373 " movs r0, #0\n"
374 " movw r2, #0x17d\n"
375 " ldr r1, =0xfc07b838\n"
376 " blx sub_fc2c7de8\n"
377 "loc_fc07b6ee:\n"
378 " ldrsh.w r0, [sp]\n"
379 " bl sub_fc0b2f18\n"
380 " bl sub_fc0b2d2e\n"
381 " cmp r0, #1\n"
382 " bls loc_fc07b75c\n"
383 " movs r0, #0\n"
384 " bl sub_fc0b2de6\n"
385 " bl sub_fc0a8f60\n"
386 " bl sub_fc073cb0\n"
387 " bl sub_fc082184\n"
388 " mov r1, r4\n"
389
390 "bl captseq_raw_addr_init_my\n"
391 " movs r2, #4\n"
392 " movw r0, #0x116\n"
393 " add.w r1, r4, #0x58\n"
394 " bl _SetPropertyCase\n"
395 " movs r2, #4\n"
396 " movs r0, #0x30\n"
397 " add.w r1, r4, #0x5c\n"
398 " bl _SetPropertyCase\n"
399 " movs r2, #4\n"
400 " movs r0, #0x44\n"
401 " add.w r1, r4, #8\n"
402 " bl _SetPropertyCase\n"
403 " bl sub_fc080b66\n"
404 " mvn r1, #0x1000\n"
405 " blx sub_fc2c7dd0\n"
406 " mov r0, r4\n"
407 " bl sub_fc07b29a\n"
408 " mov r0, r4\n"
409 " bl sub_fc083ab0_my\n"
410 " lsls r0, r0, #0x1f\n"
411 " beq loc_fc07b75a\n"
412 "loc_fc07b758:\n"
413 " str r5, [r6]\n"
414 "loc_fc07b75a:\n"
415 " pop {r3, r4, r5, r6, r7, pc}\n"
416 "loc_fc07b75c:\n"
417 " bl sub_fc079a26\n"
418 " bl sub_fc29dc34\n"
419 " pop {r3, r4, r5, r6, r7, pc}\n"
420 ".ltorg\n"
421 );
422 }
423
424
425 void __attribute__((naked,noinline)) sub_fc07b4ee_my() {
426 asm volatile (
427 " push {r2, r3, r4, r5, r6, lr}\n"
428 " ldr r6, =0x00039e5c\n"
429 " mov r4, r0\n"
430 " movs r5, #0\n"
431 " ldr r0, [r6, #0x28]\n"
432 " cbz r0, loc_fc07b516\n"
433 " ldr r0, =0x00014684\n"
434 " ldr r0, [r0]\n"
435 " cbz r0, loc_fc07b502\n"
436 " movs r5, #0x1d\n"
437 "loc_fc07b502:\n"
438 " mov r2, r4\n"
439 " movs r1, #2\n"
440 " mov r0, r5\n"
441 " bl sub_fc079cf0\n"
442 " mov r1, r5\n"
443 " mov r0, r4\n"
444 " bl sub_fc080e1a\n"
445 " b loc_fc07b6b4\n"
446 "loc_fc07b516:\n"
447 " bl sub_fc082184\n"
448 " mov r1, r4\n"
449
450 "bl captseq_raw_addr_init_my\n"
451 " movs r2, #4\n"
452 " movw r0, #0x116\n"
453 " add.w r1, r4, #0x58\n"
454 " bl _SetPropertyCase\n"
455 " movs r2, #4\n"
456 " movs r0, #0x30\n"
457 " add.w r1, r4, #0x5c\n"
458 " bl _SetPropertyCase\n"
459 " ldr.w r0, [r6, #0x10c]\n"
460 " cbnz r0, loc_fc07b550\n"
461 " ldrh.w r0, [r6, #0x1a2]\n"
462 " cmp r0, #3\n"
463 " beq loc_fc07b556\n"
464 " ldr r0, [r4, #8]\n"
465 " cmp r0, #1\n"
466 " bhi loc_fc07b566\n"
467 " b loc_fc07b556\n"
468 "loc_fc07b550:\n"
469 " ldr r0, [r4, #0xc]\n"
470 " cmp r0, #1\n"
471 " bne loc_fc07b566\n"
472 "loc_fc07b556:\n"
473 " movs r0, #0xc\n"
474 " bl sub_fc29dbfc\n"
475 " lsls r0, r0, #0x1f\n"
476 " beq loc_fc07b566\n"
477 " bl sub_fc079a26\n"
478 " movs r5, #1\n"
479 "loc_fc07b566:\n"
480 " lsls r0, r5, #0x1f\n"
481 " bne loc_fc07b668\n"
482 " ldr.w r0, [r6, #0xec]\n"
483 " cbz r0, loc_fc07b58a\n"
484 " ldrh.w r0, [r6, #0x1a2]\n"
485 " cmp r0, #3\n"
486 " beq loc_fc07b57e\n"
487 " ldr r0, [r4, #8]\n"
488 " cmp r0, #1\n"
489 " bhi loc_fc07b5ca\n"
490 "loc_fc07b57e:\n"
491 " ldr.w r0, [r6, #0x10c]\n"
492 " cbz r0, loc_fc07b58a\n"
493 " ldr r0, [r4, #0xc]\n"
494 " cmp r0, #1\n"
495 " bhi loc_fc07b5ca\n"
496 "loc_fc07b58a:\n"
497 " movs r2, #2\n"
498 " movw r0, #0x110\n"
499 " add r1, sp, #4\n"
500 " bl _GetPropertyCase\n"
501 " lsls r0, r0, #0x1f\n"
502 " beq loc_fc07b5a4\n"
503 " movs r2, #0xcd\n"
504 " movs r0, #0\n"
505 " ldr r1, =0xfc07b838\n"
506 " blx sub_fc2c7de8\n"
507 "loc_fc07b5a4:\n"
508 " ldrsh.w r0, [sp, #4]\n"
509 " bl sub_fc0b2f18\n"
510 " bl sub_fc0b2d2e\n"
511 " cmp r0, #1\n"
512 " bls loc_fc07b5bc\n"
513 " movs r0, #0\n"
514 " bl sub_fc0b2de6\n"
515 " b loc_fc07b5ca\n"
516 "loc_fc07b5bc:\n"
517 " bl sub_fc079a26\n"
518 " bl sub_fc29dc34\n"
519 " movs r5, #1\n"
520 " lsls r0, r5, #0x1f\n"
521 " bne loc_fc07b6a2\n"
522 "loc_fc07b5ca:\n"
523 " mov r0, r4\n"
524 " bl sub_fc07bf5a\n"
525 " mov r5, r0\n"
526 " lsls r0, r0, #0x1f\n"
527 " bne loc_fc07b6a2\n"
528 " bl sub_fc080b66\n"
529 " mvn r1, #0x1000\n"
530 " blx sub_fc2c7dd0\n"
531 " mov r0, r4\n"
532 " bl sub_fc07d3c6\n"
533 " mov r5, r0\n"
534 " lsls r0, r0, #0x1f\n"
535 " bne loc_fc07b6a2\n"
536 " bl sub_fc0a8f60\n"
537 " bl sub_fc073cb0\n"
538 " mov r0, r4\n"
539 " bl sub_fc07b29a\n"
540 " ldr.w r0, [r6, #0x130]\n"
541 " cbnz r0, loc_fc07b610\n"
542 " ldrh.w r0, [r6, #0x1a2]\n"
543 " cmp r0, #3\n"
544 " beq loc_fc07b610\n"
545 " ldr r0, [r4, #8]\n"
546 " cmp r0, #1\n"
547 " bhi loc_fc07b616\n"
548 "loc_fc07b610:\n"
549 " movs r0, #2\n"
550 " bl sub_fc074942\n"
551 "loc_fc07b616:\n"
552 " ldr.w r0, [r6, #0xa8]\n"
553 " cmp r0, #0\n"
554 " beq loc_fc07b68c\n"
555 " ldrh.w r0, [r6, #0x1a2]\n"
556 " movw r5, #0x1000\n"
557 " cmp r0, #3\n"
558 " beq loc_fc07b646\n"
559 " ldr r0, [r4, #8]\n"
560 " cmp r0, #1\n"
561 " bls loc_fc07b646\n"
562 " bl sub_fc080b66\n"
563 " movw r3, #0x119\n"
564 " movw r2, #0x3a98\n"
565 " mov r1, r5\n"
566 " str r3, [sp]\n"
567 " ldr r3, =0xfc07b838\n"
568 " bl sub_fc29ddac\n"
569 "loc_fc07b646:\n"
570 " movs r2, #4\n"
571 " movw r0, #0x188\n"
572 " add r1, sp, #4\n"
573 " bl _GetPropertyCase\n"
574 " lsls r0, r0, #0x1f\n"
575 " beq loc_fc07b662\n"
576 " movs r0, #0\n"
577 " movw r2, #0x11d\n"
578 " ldr r1, =0xfc07b838\n"
579 " blx sub_fc2c7de8\n"
580 "loc_fc07b662:\n"
581 " ldr r0, [sp, #4]\n"
582 " cbnz r0, loc_fc07b676\n"
583 " b loc_fc07b66a\n"
584 "loc_fc07b668:\n"
585 " b loc_fc07b6a2\n"
586 "loc_fc07b66a:\n"
587 " bl sub_fc080b66\n"
588 " mov r1, r5\n"
589 " blx sub_fc2c7cd0\n"
590 " b loc_fc07b68c\n"
591 "loc_fc07b676:\n"
592 " bl sub_fc080b66\n"
593 " mov r1, r5\n"
594 " blx sub_fc2c7dd0\n"
595 " ldr r2, =0xfc07b4dd\n"
596 " mov r3, r5\n"
597 " ldr r0, [sp, #4]\n"
598 " mov r1, r2\n"
599 " bl sub_fc326f00\n"
600 "loc_fc07b68c:\n"
601 " ldr.w r0, [r6, #0xb4]\n"
602 " cmp r0, #0\n"
603 " mov r0, r4\n"
604 " beq loc_fc07b69c\n"
605 " bl sub_fc083f42\n"
606 " b loc_fc07b6b4\n"
607 "loc_fc07b69c:\n"
608 " bl sub_fc083ab0_my\n"
609 " b loc_fc07b6b4\n"
610 "loc_fc07b6a2:\n"
611 " movs r1, #2\n"
612 " mov r2, r4\n"
613 " mov r0, r5\n"
614 " bl sub_fc079cf0\n"
615 " mov r1, r5\n"
616 " mov r0, r4\n"
617 " bl sub_fc080f50\n"
618 "loc_fc07b6b4:\n"
619 " movs r0, #0\n"
620 " str r0, [r6, #0x28]\n"
621 " pop {r2, r3, r4, r5, r6, pc}\n"
622 ".ltorg\n"
623 );
624 }
625
626 #ifdef CAPTSEQ_DEBUG_LOG
627 void log_nr_call(void) {
628 _LogCameraEvent(0x60,"nr hook %d",_nrflag);
629 }
630 void log_remote_hook(void) {
631 _LogCameraEvent(0x60,"remote hook");
632 }
633 void log_rh(void) {
634 _LogCameraEvent(0x60,"raw hook rb:0x%08x rbc:0x%08x",hook_raw_image_addr(),current_raw_addr);
635 }
636 #endif
637
638
639 void __attribute__((naked,noinline)) sub_fc083ab0_my() {
640 asm volatile (
641 " push.w {r1, r2, r3, r4, r5, r6, r7, r8, sb, lr}\n"
642 " ldr r7, =0x00039e5c\n"
643 " mov r4, r0\n"
644 " ldr.w r0, [r7, #0x16c]\n"
645 " cbz r0, loc_fc083acc\n"
646 " ldrh.w r0, [r7, #0x1a2]\n"
647 " cmp r0, #3\n"
648 " beq loc_fc083acc\n"
649 " ldr r0, [r4, #8]\n"
650 " cmp r0, #1\n"
651 " bhi loc_fc083ad6\n"
652 "loc_fc083acc:\n"
653 " mov r0, r4\n"
654 " bl sub_fc07b230\n"
655 " bl sub_fc07bc88\n"
656 "loc_fc083ad6:\n"
657 " ldr.w r0, [r7, #0xa4]\n"
658 " cbnz r0, loc_fc083af2\n"
659 " ldrh.w r0, [r7, #0x1a2]\n"
660 " cmp r0, #3\n"
661 " beq loc_fc083aea\n"
662 " ldr r0, [r4, #8]\n"
663 " cmp r0, #1\n"
664 " bhi loc_fc083af2\n"
665 "loc_fc083aea:\n"
666 " bl sub_fc0740a6\n"
667 " bl sub_fc07b86a\n"
668 "loc_fc083af2:\n"
669 " movs r2, #4\n"
670 " movw r0, #0x137\n"
671 " add r1, sp, #8\n"
672 " bl _GetPropertyCase\n"
673 " lsls r0, r0, #0x1f\n"
674 " beq loc_fc083b0e\n"
675 " movs r0, #0\n"
676 " movw r2, #0x150\n"
677 " ldr r1, =0xfc083e94\n"
678 " blx sub_fc2c7de8\n"
679 "loc_fc083b0e:\n"
680 " ldr r0, [sp, #8]\n"
681 " ubfx r0, r0, #8, #8\n"
682 " cmp r0, #6\n"
683 " bne loc_fc083b1e\n"
684 " ldr r0, =0xfc083a79\n"
685 " movs r1, #0\n"
686 " b loc_fc083b22\n"
687 "loc_fc083b1e:\n"
688 " ldr r0, =0xfc07ae63\n"
689 " mov r1, r4\n"
690 "loc_fc083b22:\n"
691 " bl sub_fc0b8fc8\n"
692 " movs r2, #2\n"
693 " movw r0, #0x112\n"
694 " add r1, sp, #4\n"
695 " bl _GetPropertyCase\n"
696 " lsls r0, r0, #0x1f\n"
697 " beq loc_fc083b42\n"
698 " movs r0, #0\n"
699 " movw r2, #0x159\n"
700 " ldr r1, =0xfc083e94\n"
701 " blx sub_fc2c7de8\n"
702 "loc_fc083b42:\n"
703 " ldr.w r0, [r7, #0x18c]\n"
704 " cbz r0, loc_fc083b4c\n"
705 " bl sub_fc07b168\n"
706 "loc_fc083b4c:\n"
707 " movs r0, #0\n"
708 " bl sub_fc0743b6\n"
709 "bl capt_seq_hook_set_nr\n"
710 #ifdef CAPTSEQ_DEBUG_LOG
711 "bl log_nr_call\n"
712 #endif
713 " mov r0, r4\n"
714 " bl sub_fc07b360\n"
715 " ldr r1, =0x000219e4\n"
716 " movs r2, #4\n"
717 " movs r0, #0x90\n"
718 " bl _GetPropertyCase\n"
719 " lsls r0, r0, #0x1f\n"
720 " beq loc_fc083b72\n"
721 " movs r0, #0\n"
722 " movw r2, #0x16e\n"
723 " ldr r1, =0xfc083e94\n"
724 " blx sub_fc2c7de8\n"
725 "loc_fc083b72:\n"
726 " bl sub_fc074470\n"
727 " bl sub_fc07b3f2\n"
728 " movs r1, #0\n"
729 " mov r0, r4\n"
730 " bl sub_fc083a7a\n"
731 " mov r6, r0\n"
732 " BL wait_until_remote_button_is_released\n"
733 #ifdef CAPTSEQ_DEBUG_LOG
734 "bl log_remote_hook\n"
735 #endif
736 " ldr r0, [sp, #8]\n"
737 " ubfx r0, r0, #8, #8\n"
738 " cmp r0, #6\n"
739 " bne loc_fc083b92\n"
740 " ldr r2, =0xfc07b137\n"
741 " b loc_fc083b94\n"
742 "loc_fc083b92:\n"
743 " ldr r2, =0xfc07b14d\n"
744 "loc_fc083b94:\n"
745 " ldrh r0, [r4, #0x18]\n"
746 " ldr r5, =0x000219e4\n"
747 " cbz r0, loc_fc083ba2\n"
748 " cmp r0, #1\n"
749 " beq loc_fc083bb8\n"
750 " cmp r0, #4\n"
751 " bne loc_fc083c1e\n"
752 "loc_fc083ba2:\n"
753 " str r6, [sp]\n"
754 " mov r3, r2\n"
755 " ldr r1, [r4, #0x5c]\n"
756 " mov r0, r4\n"
757 " ldr r2, [r5]\n"
758 " bl sub_fc07ac8e\n"
759 " mov r5, r0\n"
760 " bl sub_fc13400e\n"
761 " b loc_fc083c2c\n"
762 "loc_fc083bb8:\n"
763 " str r6, [sp]\n"
764 " mov r3, r2\n"
765 " ldr r1, [r4, #0x5c]\n"
766 " mov r8, r5\n"
767 " ldr r2, [r5]\n"
768 " mov r0, r4\n"
769 " bl sub_fc07acf8\n"
770 " movs r2, #1\n"
771 " mov r5, r0\n"
772 " movs r1, #0\n"
773 " movs r0, #0x45\n"
774 " bl sub_fc268cac\n"
775 " lsls r0, r5, #0x1f\n"
776 " bne loc_fc083c2c\n"
777 " ldr.w r0, [r7, #0x100]\n"
778 " cbz r0, loc_fc083bee\n"
779 " ldr r1, [r4, #8]\n"
780 " ldr r2, =0x001d7f7c\n"
781 " ldr r0, [r4, #0x5c]\n"
782 " add.w r1, r2, r1, lsl #2\n"
783 " str r0, [r1, #-0x4]\n"
784 " b loc_fc083c18\n"
785 "loc_fc083bee:\n"
786 " ldr r0, =0xfc083a79\n"
787 " movs r1, #0\n"
788 " bl sub_fc0b8fc8\n"
789 " movs r1, #1\n"
790 " mov r0, r4\n"
791 " bl sub_fc083a7a\n"
792 " mov r6, r0\n"
793 " ldr.w r0, [r8]\n"
794 " mov r5, r8\n"
795 " bl sub_fc07b1d2\n"
796 " ldr r1, [r4, #0x5c]\n"
797 " mov r3, r6\n"
798 " ldr r2, [r5]\n"
799 " mov r0, r4\n"
800 " bl sub_fc07ad70\n"
801 " mov r5, r0\n"
802 "loc_fc083c18:\n"
803 " bl sub_fc07ac38\n"
804 " b loc_fc083c2c\n"
805 "loc_fc083c1e:\n"
806 " movs r0, #0\n"
807 " movw r2, #0x1a7\n"
808 " ldr r1, =0xfc083e94\n"
809 " blx sub_fc2c7de8\n"
810 " movs r5, #0x1d\n"
811 "loc_fc083c2c:\n"
812 " bl sub_fc07b3f6\n"
813 " ldr.w r8, =0xfc083a79\n"
814 " lsls r0, r5, #0x1f\n"
815 " bne loc_fc083c88\n"
816 " ldr.w r0, [r7, #0x108]\n"
817 " cbnz r0, loc_fc083c54\n"
818 " mov r0, r4\n"
819 " bl sub_fc08107a\n"
820 " lsls r0, r0, #0x1f\n"
821 " beq loc_fc083c54\n"
822 " movs r0, #0\n"
823 " movw r2, #0x1cd\n"
824 " ldr r1, =0xfc083e94\n"
825 " blx sub_fc2c7de8\n"
826 "loc_fc083c54:\n"
827 #ifdef CAPTSEQ_DEBUG_LOG
828 "bl log_rh\n"
829 #endif
830 " BL capt_seq_hook_raw_here\n"
831 " BL clear_current_raw_addr\n"
832 " mov r0, r4\n"
833 " bl sub_fc07b3e2\n"
834 " mov r0, r4\n"
835 " bl sub_fc07b3b6\n"
836 " cmp r6, r8\n"
837 " beq loc_fc083c88\n"
838 " bl sub_fc080b66\n"
839 " movs r1, #4\n"
840 " movw sb, #0x1da\n"
841 " ldr r3, =0xfc083e94\n"
842 " movw r2, #0x3a98\n"
843 " str.w sb, [sp]\n"
844 " bl sub_fc29ddac\n"
845 " cbz r0, loc_fc083c88\n"
846 " movs r0, #0\n"
847 " mov r2, sb\n"
848 " ldr r1, =0xfc083e94\n"
849 " blx sub_fc2c7de8\n"
850 "loc_fc083c88:\n"
851 " ldr.w r0, [r7, #0x18c]\n"
852 " cbz r0, loc_fc083c98\n"
853 " movs r2, #1\n"
854 " movs r1, #0\n"
855 " movs r0, #0x46\n"
856 " bl sub_fc268cac\n"
857 "loc_fc083c98:\n"
858 " movs r1, #2\n"
859 " mov r2, r4\n"
860 " mov r0, r5\n"
861 " bl sub_fc079cf0\n"
862 " ldr r0, [r7, #0x28]\n"
863 " cmp r0, #0\n"
864 " mov r0, r8\n"
865 " beq loc_fc083cbe\n"
866 " cmp r6, r0\n"
867 " beq loc_fc083cb2\n"
868 " movs r1, #1\n"
869 " b loc_fc083cb4\n"
870 "loc_fc083cb2:\n"
871 " movs r1, #0\n"
872 "loc_fc083cb4:\n"
873 " mov r2, r5\n"
874 " mov r0, r4\n"
875 " bl sub_fc080dd8\n"
876 " b loc_fc083cd0\n"
877 "loc_fc083cbe:\n"
878 " cmp r6, r0\n"
879 " beq loc_fc083cc6\n"
880 " movs r1, #1\n"
881 " b loc_fc083cc8\n"
882 "loc_fc083cc6:\n"
883 " movs r1, #0\n"
884 "loc_fc083cc8:\n"
885 " mov r2, r5\n"
886 " mov r0, r4\n"
887 " bl sub_fc080d92\n"
888 "loc_fc083cd0:\n"
889 " mov r0, r5\n"
890 " pop.w {r1, r2, r3, r4, r5, r6, r7, r8, sb, pc}\n"
891 ".ltorg\n"
892 );
893 }
894
895
896
897
898
899 void __attribute__((naked,noinline)) exp_drv_task() {
900 asm volatile (
901 " push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr}\n"
902 " sub sp, #0x2c\n"
903 " ldr.w sb, =0x0000d7a4\n"
904 " ldr.w sl, =0xfffff400\n"
905 " movs r0, #0\n"
906 " ldr r6, =0x0005c174\n"
907 " add.w r8, sp, #0x1c\n"
908 " movw fp, #0xbb8\n"
909 " str r0, [sp, #0xc]\n"
910 "loc_fc28655e:\n"
911 " ldr.w r0, [sb, #0x20]\n"
912 " movs r2, #0\n"
913 " add r1, sp, #0x28\n"
914 " mov r4, sb\n"
915 " blx sub_fc2c7ca8\n"
916 " ldr r0, [sp, #0xc]\n"
917 " cmp r0, #1\n"
918 " bne loc_fc286596\n"
919 " ldr r0, [sp, #0x28]\n"
920 " ldr r0, [r0]\n"
921 " cmp r0, #0x15\n"
922 "loc_fc286578:\n"
923 " beq loc_fc286678\n"
924 " cmp r0, #0x16\n"
925 " beq loc_fc286578\n"
926 " cmp r0, #0x17\n"
927 " beq loc_fc286578\n"
928 " cmp r0, #0x18\n"
929 " beq loc_fc286578\n"
930 " cmp r0, #0x19\n"
931 " beq loc_fc286688\n"
932 " cmp r0, #0x30\n"
933 " beq loc_fc286632\n"
934 " movs r0, #0\n"
935 " add r1, sp, #0xc\n"
936 " bl sub_fc2864fe\n"
937 "loc_fc286596:\n"
938 " ldr r0, [sp, #0x28]\n"
939 " ldr r1, [r0]\n"
940 " cmp r1, #0x38\n"
941 " bne loc_fc2865b4\n"
942 " bl sub_fc287450\n"
943 " ldr.w r0, [sb, #0x1c]\n"
944 " movs r1, #1\n"
945 " blx sub_fc2c7cd0\n"
946 " blx sub_fc2c7d00\n"
947 " add sp, #0x2c\n"
948
949 " pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc}\n"
950 "loc_fc2865b4:\n"
951 " cmp r1, #0x37\n"
952 " bne loc_fc2865c6\n"
953 " add.w r0, r0, #0xac\n"
954 " ldrd r2, r1, [r0]\n"
955 " mov r0, r1\n"
956 " blx r2\n"
957 " b loc_fc2869da\n"
958 "loc_fc2865c6:\n"
959 " cmp r1, #0x2e\n"
960 " bne loc_fc2865fc\n"
961 " ldr r0, [r4, #0x1c]\n"
962 " movs r1, #0x80\n"
963 " blx sub_fc2c7dd0\n"
964 " ldr r0, =0xfc282365\n"
965 " movs r1, #0x80\n"
966 " bl sub_fc0d727a\n"
967 " ldr r0, [r4, #0x1c]\n"
968 " movs r1, #0x80\n"
969 " mov r2, fp\n"
970 " blx sub_fc2c7cd8\n"
971 " lsls r0, r0, #0x1f\n"
972 " beq loc_fc2865ee\n"
973 " movw r2, #0x199e\n"
974 " b loc_fc28667e\n"
975 "loc_fc2865ee:\n"
976 " ldr r1, [sp, #0x28]\n"
977 " add.w r1, r1, #0xac\n"
978 " ldrd r1, r0, [r1]\n"
979 " blx r1\n"
980 " b loc_fc2869da\n"
981 "loc_fc2865fc:\n"
982 " cmp r1, #0x2f\n"
983 " bne loc_fc28662e\n"
984 " add r1, sp, #0xc\n"
985 " bl sub_fc2864fe\n"
986 " movw r5, #0x100\n"
987 " ldr r0, [r4, #0x1c]\n"
988 " mov r1, r5\n"
989 " blx sub_fc2c7dd0\n"
990 " ldr r0, =0xfc28236f\n"
991 " mov r1, r5\n"
992 " bl sub_fc0d7c18\n"
993 " ldr r0, [r4, #0x1c]\n"
994 " mov r2, fp\n"
995 " mov r1, r5\n"
996 " blx sub_fc2c7cd8\n"
997 " lsls r0, r0, #0x1f\n"
998 " beq loc_fc2865ee\n"
999 " movw r2, #0x19a8\n"
1000 " b loc_fc28667e\n"
1001 "loc_fc28662e:\n"
1002 " cmp r1, #0x30\n"
1003 " bne loc_fc28663c\n"
1004 "loc_fc286632:\n"
1005 " ldr r0, [sp, #0x28]\n"
1006 " add r1, sp, #0xc\n"
1007 " bl sub_fc2864fe\n"
1008 " b loc_fc2865ee\n"
1009 "loc_fc28663c:\n"
1010 " cmp r1, #0x35\n"
1011 " bne loc_fc28664e\n"
1012 " bl sub_fc3a0e7c\n"
1013 " bl sub_fc130f3c\n"
1014 " bl sub_fc130c1e\n"
1015 " b loc_fc2865ee\n"
1016 "loc_fc28664e:\n"
1017 " cmp r1, #0x36\n"
1018 " bne loc_fc286688\n"
1019 " ldr r0, [r4, #0x1c]\n"
1020 " movs r1, #4\n"
1021 " blx sub_fc2c7dd0\n"
1022 " ldr r1, =0xfc282383\n"
1023 " movs r2, #4\n"
1024 " mov r0, sl\n"
1025 " bl sub_fc2874a2\n"
1026 " bl sub_fc3a0bde\n"
1027 " ldr r0, [r4, #0x1c]\n"
1028 " movs r1, #4\n"
1029 " mov r2, fp\n"
1030 " blx sub_fc2c7dd8\n"
1031 " lsls r0, r0, #0x1f\n"
1032 " beq loc_fc2865ee\n"
1033 " b loc_fc28667a\n"
1034 "loc_fc286678:\n"
1035 " b loc_fc286688\n"
1036 "loc_fc28667a:\n"
1037 " movw r2, #0x1a84\n"
1038 "loc_fc28667e:\n"
1039 " ldr r1, =0xfc282b88\n"
1040 " movs r0, #0\n"
1041 " blx sub_fc2c7de8\n"
1042 " b loc_fc2865ee\n"
1043 "loc_fc286688:\n"
1044 " ldr r0, [sp, #0x28]\n"
1045 " movs r5, #1\n"
1046 " ldr r1, [r0]\n"
1047 " cmp r1, #0x13\n"
1048 " beq loc_fc286696\n"
1049 " cmp r1, #0x14\n"
1050 " bne loc_fc2866d4\n"
1051 "loc_fc286696:\n"
1052 " ldr.w r1, [r0, #0x94]\n"
1053 " mov r4, r8\n"
1054 " add.w r1, r1, r1, lsl #1\n"
1055 " add.w r1, r0, r1, lsl #2\n"
1056 " subs r1, #8\n"
1057 " ldm r1!, {r2, r3, r7}\n"
1058 " stm r4!, {r2, r3, r7}\n"
1059 " bl sub_fc284e02\n"
1060 " ldr r0, [sp, #0x28]\n"
1061 " add.w r0, r0, #0x94\n"
1062 " ldrd r3, r2, [r0, #0x18]\n"
1063 " ldr r1, [r0]\n"
1064 " sub.w r0, r0, #0x90\n"
1065 " blx r3\n"
1066 " ldr r0, [sp, #0x28]\n"
1067 " bl sub_fc2876ba\n"
1068 " ldr r0, [sp, #0x28]\n"
1069 " add.w r0, r0, #0x94\n"
1070 " ldr r1, [r0]\n"
1071 " ldrd r3, r2, [r0, #0x20]\n"
1072 " b loc_fc286900\n"
1073 "loc_fc2866d4:\n"
1074 " cmp r1, #0x15\n"
1075 " beq loc_fc2866e8\n"
1076 " cmp r1, #0x16\n"
1077 " beq loc_fc2866e8\n"
1078 " cmp r1, #0x17\n"
1079 " beq loc_fc2866e8\n"
1080 " cmp r1, #0x18\n"
1081 " beq loc_fc2866e8\n"
1082 " cmp r1, #0x19\n"
1083 " bne loc_fc28675a\n"
1084 "loc_fc2866e8:\n"
1085 " add r3, sp, #0xc\n"
1086 " mov r2, sp\n"
1087 " add r1, sp, #0x1c\n"
1088 " bl sub_fc284fd2\n"
1089 " cmp r0, #1\n"
1090 " mov r4, r0\n"
1091 " beq loc_fc2866fc\n"
1092 " cmp r4, #5\n"
1093 " bne loc_fc286712\n"
1094 "loc_fc2866fc:\n"
1095 " ldr r0, [sp, #0x28]\n"
1096 " mov r2, r4\n"
1097 " add.w r0, r0, #0x94\n"
1098 " ldrd r7, r3, [r0, #0x18]\n"
1099 " ldr r1, [r0]\n"
1100 " sub.w r0, r0, #0x90\n"
1101 " blx r7\n"
1102 " b loc_fc286738\n"
1103 "loc_fc286712:\n"
1104 " cmp r4, #2\n"
1105 " beq loc_fc28671a\n"
1106 " cmp r4, #6\n"
1107 " bne loc_fc286744\n"
1108 "loc_fc28671a:\n"
1109 " ldr r0, [sp, #0x28]\n"
1110 " mov r2, r4\n"
1111 " add.w r0, r0, #0x94\n"
1112 " ldrd r7, r3, [r0, #0x18]\n"
1113 " ldr r1, [r0]\n"
1114 " sub.w r0, r0, #0x90\n"
1115 " blx r7\n"
1116 " ldr r0, [sp, #0x28]\n"
1117 " add r1, sp, #0x1c\n"
1118 " mov r2, sp\n"
1119 " bl sub_fc28628c\n"
1120 "loc_fc286738:\n"
1121 " ldr r2, [sp, #0xc]\n"
1122 " mov r1, r4\n"
1123 " ldr r0, [sp, #0x28]\n"
1124 " bl sub_fc2864ae\n"
1125 " b loc_fc286906\n"
1126 "loc_fc286744:\n"
1127 " ldr r0, [sp, #0x28]\n"
1128 " mov r2, r4\n"
1129 " add.w r0, r0, #0x94\n"
1130 " ldrd r7, r3, [r0, #0x18]\n"
1131 " ldr r1, [r0]\n"
1132 " sub.w r0, r0, #0x90\n"
1133 " blx r7\n"
1134 " b loc_fc286906\n"
1135 "loc_fc28675a:\n"
1136 " cmp r1, #0x2a\n"
1137 " beq loc_fc286762\n"
1138 " cmp r1, #0x2b\n"
1139 " bne loc_fc286794\n"
1140 "loc_fc286762:\n"
1141 " ldr.w r1, [r0, #0x94]\n"
1142 " mov r4, r8\n"
1143 " add.w r1, r1, r1, lsl #1\n"
1144 " add.w r1, r0, r1, lsl #2\n"
1145 " subs r1, #8\n"
1146 " ldm r1!, {r2, r3, r7}\n"
1147 " stm r4!, {r2, r3, r7}\n"
1148 " bl sub_fc283f36\n"
1149 " ldr r0, [sp, #0x28]\n"
1150 " add.w r0, r0, #0x94\n"
1151 " ldrd r3, r2, [r0, #0x18]\n"
1152 " ldr r1, [r0]\n"
1153 " sub.w r0, r0, #0x90\n"
1154 " blx r3\n"
1155 " ldr r0, [sp, #0x28]\n"
1156 " bl sub_fc284320\n"
1157 " b loc_fc286906\n"
1158 "loc_fc286794:\n"
1159 " adds r1, r0, #4\n"
1160 " mov r4, r8\n"
1161 " ldm r1!, {r2, r3, r7}\n"
1162 " stm r4!, {r2, r3, r7}\n"
1163 " ldr r1, [r0]\n"
1164 " cmp r1, #0x2e\n"
1165 " bhs loc_fc2867d8\n"
1166 " tbb [pc, r1]\n"
1167 "branchtable_fc2867a6:\n"
1168 " .byte((loc_fc2867d4 - branchtable_fc2867a6) / 2)\n"
1169 " .byte((loc_fc2867d4 - branchtable_fc2867a6) / 2)\n"
1170 " .byte((loc_fc2867da - branchtable_fc2867a6) / 2)\n"
1171 " .byte((loc_fc2867e0 - branchtable_fc2867a6) / 2)\n"
1172 " .byte((loc_fc2867e0 - branchtable_fc2867a6) / 2)\n"
1173 " .byte((loc_fc2867e0 - branchtable_fc2867a6) / 2)\n"
1174 " .byte((loc_fc2867d4 - branchtable_fc2867a6) / 2)\n"
1175 " .byte((loc_fc2867da - branchtable_fc2867a6) / 2)\n"
1176 " .byte((loc_fc2867e0 - branchtable_fc2867a6) / 2)\n"
1177 " .byte((loc_fc2867e0 - branchtable_fc2867a6) / 2)\n"
1178 " .byte((loc_fc28681c - branchtable_fc2867a6) / 2)\n"
1179 " .byte((loc_fc28681c - branchtable_fc2867a6) / 2)\n"
1180 " .byte((loc_fc28681c - branchtable_fc2867a6) / 2)\n"
1181 " .byte((loc_fc2868e4 - branchtable_fc2867a6) / 2)\n"
1182 " .byte((loc_fc2868ea - branchtable_fc2867a6) / 2)\n"
1183 " .byte((loc_fc2868ea - branchtable_fc2867a6) / 2)\n"
1184 " .byte((loc_fc2868ea - branchtable_fc2867a6) / 2)\n"
1185 " .byte((loc_fc2868ea - branchtable_fc2867a6) / 2)\n"
1186 " .byte((loc_fc2868f0 - branchtable_fc2867a6) / 2)\n"
1187 " .byte((loc_fc2868f4 - branchtable_fc2867a6) / 2)\n"
1188 " .byte((loc_fc2868f4 - branchtable_fc2867a6) / 2)\n"
1189 " .byte((loc_fc2868f4 - branchtable_fc2867a6) / 2)\n"
1190 " .byte((loc_fc2868f4 - branchtable_fc2867a6) / 2)\n"
1191 " .byte((loc_fc2868f4 - branchtable_fc2867a6) / 2)\n"
1192 " .byte((loc_fc2868f4 - branchtable_fc2867a6) / 2)\n"
1193 " .byte((loc_fc2868f4 - branchtable_fc2867a6) / 2)\n"
1194 " .byte((loc_fc2867e6 - branchtable_fc2867a6) / 2)\n"
1195 " .byte((loc_fc2867ec - branchtable_fc2867a6) / 2)\n"
1196 " .byte((loc_fc2867ec - branchtable_fc2867a6) / 2)\n"
1197 " .byte((loc_fc2867ec - branchtable_fc2867a6) / 2)\n"
1198 " .byte((loc_fc286824 - branchtable_fc2867a6) / 2)\n"
1199 " .byte((loc_fc286824 - branchtable_fc2867a6) / 2)\n"
1200 " .byte((loc_fc286824 - branchtable_fc2867a6) / 2)\n"
1201 " .byte((loc_fc286824 - branchtable_fc2867a6) / 2)\n"
1202 " .byte((loc_fc28682a - branchtable_fc2867a6) / 2)\n"
1203 " .byte((loc_fc286854 - branchtable_fc2867a6) / 2)\n"
1204 " .byte((loc_fc2868f4 - branchtable_fc2867a6) / 2)\n"
1205 " .byte((loc_fc2868f4 - branchtable_fc2867a6) / 2)\n"
1206 " .byte((loc_fc28687e - branchtable_fc2867a6) / 2)\n"
1207 " .byte((loc_fc2868a8 - branchtable_fc2867a6) / 2)\n"
1208 " .byte((loc_fc2868d2 - branchtable_fc2867a6) / 2)\n"
1209 " .byte((loc_fc2868d2 - branchtable_fc2867a6) / 2)\n"
1210 " .byte((loc_fc2868f4 - branchtable_fc2867a6) / 2)\n"
1211 " .byte((loc_fc2868f4 - branchtable_fc2867a6) / 2)\n"
1212 " .byte((loc_fc2868d8 - branchtable_fc2867a6) / 2)\n"
1213 " .byte((loc_fc2868de - branchtable_fc2867a6) / 2)\n"
1214 ".align 1\n"
1215 "loc_fc2867d4:\n"
1216 " bl sub_fc282924\n"
1217 "loc_fc2867d8:\n"
1218 " b loc_fc2868f4\n"
1219 "loc_fc2867da:\n"
1220 " bl sub_fc282bae\n"
1221 " b loc_fc2868f4\n"
1222 "loc_fc2867e0:\n"
1223 " bl sub_fc282da8\n"
1224 " b loc_fc2868f4\n"
1225 "loc_fc2867e6:\n"
1226 " bl sub_fc283048\n"
1227 " b loc_fc2868f4\n"
1228 "loc_fc2867ec:\n"
1229 " bl sub_fc2831f8\n"
1230 " b loc_fc2868f4\n"
1231
1232 ".ltorg\n"
1233 "loc_fc28681c:\n"
1234 " bl sub_fc283626_my\n"
1235 " movs r5, #0\n"
1236 " b loc_fc2868f4\n"
1237 "loc_fc286824:\n"
1238 " bl sub_fc283720\n"
1239 " b loc_fc2868f4\n"
1240 "loc_fc28682a:\n"
1241 " ldrh r1, [r0, #4]\n"
1242 " strh.w r1, [sp, #0x1c]\n"
1243 " ldrh r1, [r6, #2]\n"
1244 " strh.w r1, [sp, #0x1e]\n"
1245 " ldrh r1, [r6, #4]\n"
1246 " strh.w r1, [sp, #0x20]\n"
1247 " ldrh r1, [r6, #6]\n"
1248 " strh.w r1, [sp, #0x22]\n"
1249 " ldrh r1, [r0, #0xc]\n"
1250 " strh.w r1, [sp, #0x24]\n"
1251 " ldrh r1, [r6, #0xa]\n"
1252 " strh.w r1, [sp, #0x26]\n"
1253 " bl sub_fc283c82\n"
1254 " b loc_fc2868f4\n"
1255 "loc_fc286854:\n"
1256 " ldrh r1, [r0, #4]\n"
1257 " strh.w r1, [sp, #0x1c]\n"
1258 " ldrh r1, [r6, #2]\n"
1259 " strh.w r1, [sp, #0x1e]\n"
1260 " ldrh r1, [r6, #4]\n"
1261 " strh.w r1, [sp, #0x20]\n"
1262 " ldrh r1, [r6, #6]\n"
1263 " strh.w r1, [sp, #0x22]\n"
1264 " ldrh r1, [r6, #8]\n"
1265 " strh.w r1, [sp, #0x24]\n"
1266 " ldrh r1, [r6, #0xa]\n"
1267 " strh.w r1, [sp, #0x26]\n"
1268 " bl sub_fc28750e\n"
1269 " b loc_fc2868f4\n"
1270 "loc_fc28687e:\n"
1271 " ldrh r1, [r6]\n"
1272 " strh.w r1, [sp, #0x1c]\n"
1273 " ldrh r1, [r0, #6]\n"
1274 " strh.w r1, [sp, #0x1e]\n"
1275 " ldrh r1, [r6, #4]\n"
1276 " strh.w r1, [sp, #0x20]\n"
1277 " ldrh r1, [r6, #6]\n"
1278 " strh.w r1, [sp, #0x22]\n"
1279 " ldrh r1, [r6, #8]\n"
1280 " strh.w r1, [sp, #0x24]\n"
1281 " ldrh r1, [r6, #0xa]\n"
1282 " strh.w r1, [sp, #0x26]\n"
1283 " bl sub_fc287594\n"
1284 " b loc_fc2868f4\n"
1285 "loc_fc2868a8:\n"
1286 " ldrh r1, [r6]\n"
1287 " strh.w r1, [sp, #0x1c]\n"
1288 " ldrh r1, [r6, #2]\n"
1289 " strh.w r1, [sp, #0x1e]\n"
1290 " ldrh r1, [r6, #4]\n"
1291 " strh.w r1, [sp, #0x20]\n"
1292 " ldrh r1, [r6, #6]\n"
1293 " strh.w r1, [sp, #0x22]\n"
1294 " ldrh r1, [r0, #0xc]\n"
1295 " strh.w r1, [sp, #0x24]\n"
1296 " ldrh r1, [r6, #0xa]\n"
1297 " strh.w r1, [sp, #0x26]\n"
1298 " bl sub_fc28764c\n"
1299 " b loc_fc2868f4\n"
1300 "loc_fc2868d2:\n"
1301 " bl sub_fc283d60\n"
1302 " b loc_fc2868f4\n"
1303 "loc_fc2868d8:\n"
1304 " bl sub_fc2843e8\n"
1305 " b loc_fc2868f4\n"
1306 "loc_fc2868de:\n"
1307 " bl sub_fc2847c8\n"
1308 " b loc_fc2868f4\n"
1309 "loc_fc2868e4:\n"
1310 " bl sub_fc2849dc\n"
1311 " b loc_fc2868f4\n"
1312 "loc_fc2868ea:\n"
1313 " bl sub_fc284b2e\n"
1314 " b loc_fc2868f4\n"
1315 "loc_fc2868f0:\n"
1316 " bl sub_fc284c4a\n"
1317 "loc_fc2868f4:\n"
1318 " ldr r0, [sp, #0x28]\n"
1319 " add.w r0, r0, #0x94\n"
1320 " ldrd r3, r2, [r0, #0x18]\n"
1321 " ldr r1, [r0]\n"
1322 "loc_fc286900:\n"
1323 " sub.w r0, r0, #0x90\n"
1324 " blx r3\n"
1325 "loc_fc286906:\n"
1326 " ldr r0, [sp, #0x28]\n"
1327 " ldr r0, [r0]\n"
1328 " cmp r0, #0x11\n"
1329 " beq loc_fc28692a\n"
1330 " bgt loc_fc28691e\n"
1331 " cmp r0, #1\n"
1332 " beq loc_fc28692a\n"
1333 " cmp r0, #4\n"
1334 " beq loc_fc28692a\n"
1335 " cmp r0, #0xf\n"
1336 " bne loc_fc286958\n"
1337 " b loc_fc28692a\n"
1338 "loc_fc28691e:\n"
1339 " cmp r0, #0x14\n"
1340 " beq loc_fc28692a\n"
1341 " cmp r0, #0x19\n"
1342 " beq loc_fc28692a\n"
1343 " cmp r0, #0x1c\n"
1344 " bne loc_fc286958\n"
1345 "loc_fc28692a:\n"
1346 " ldrsh.w r1, [r6]\n"
1347 " mov r2, sl\n"
1348 " cmp r1, sl\n"
1349 " beq loc_fc28693c\n"
1350 " ldrsh.w r0, [r6, #8]\n"
1351 " cmp r0, r2\n"
1352 " bne loc_fc286950\n"
1353 "loc_fc28693c:\n"
1354 " add r0, sp, #0x10\n"
1355 " bl sub_fc3160f2\n"
1356 " ldrh.w r0, [sp, #0x10]\n"
1357 " strh.w r0, [sp, #0x1c]\n"
1358 " ldrh.w r0, [sp, #0x18]\n"
1359 " b loc_fc286954\n"
1360 "loc_fc286950:\n"
1361 " strh.w r1, [sp, #0x1c]\n"
1362 "loc_fc286954:\n"
1363 " strh.w r0, [sp, #0x24]\n"
1364 "loc_fc286958:\n"
1365 " cmp r5, #1\n"
1366 " ldr r0, [sp, #0x28]\n"
1367 " bne loc_fc286990\n"
1368 " movs r2, #0xc\n"
1369 " ldr.w r1, [r0, #0x94]\n"
1370 " add.w r1, r1, r1, lsl #1\n"
1371 " add.w r4, r0, r1, lsl #2\n"
1372 " ldr r0, =0x0005c174\n"
1373 " subs r4, #8\n"
1374 " add r1, sp, #0x1c\n"
1375 " blx sub_fc2c7d88\n"
1376 " ldr r0, =0x0005c174\n"
1377 " movs r2, #0xc\n"
1378 " add r1, sp, #0x1c\n"
1379 " adds r0, #0xc\n"
1380 " blx sub_fc2c7d88\n"
1381 " ldr r0, =0x0005c174\n"
1382 " movs r2, #0xc\n"
1383 " mov r1, r4\n"
1384 " adds r0, #0x18\n"
1385 " blx sub_fc2c7d88\n"
1386 " b loc_fc2869da\n"
1387 "loc_fc286990:\n"
1388 " ldr r0, [r0]\n"
1389 " mov.w r3, #1\n"
1390 " cmp r0, #0xc\n"
1391 " bne loc_fc2869ba\n"
1392 " movs r2, #0\n"
1393 " mov r1, r3\n"
1394 " strd r2, r3, [sp]\n"
1395 " movs r0, #0\n"
1396 " mov r2, r3\n"
1397 " bl sub_fc28277c\n"
1398 " movs r3, #1\n"
1399 " movs r2, #0\n"
1400 " mov r1, r3\n"
1401 " movs r0, #0\n"
1402 " strd r2, r3, [sp]\n"
1403 " mov r2, r3\n"
1404 " b loc_fc2869d6\n"
1405 "loc_fc2869ba:\n"
1406 " movs r2, #1\n"
1407 " strd r2, r3, [sp]\n"
1408 " mov r3, r2\n"
1409 " mov r1, r2\n"
1410 " mov r0, r2\n"
1411 " bl sub_fc28277c\n"
1412 " movs r3, #1\n"
1413 " str r3, [sp]\n"
1414 " mov r2, r3\n"
1415 " mov r1, r3\n"
1416 " mov r0, r3\n"
1417 " str r3, [sp, #4]\n"
1418 "loc_fc2869d6:\n"
1419 " bl sub_fc2828a2\n"
1420 "loc_fc2869da:\n"
1421 " ldr r0, [sp, #0x28]\n"
1422 " bl sub_fc287450\n"
1423 " b loc_fc28655e\n"
1424 ".ltorg\n"
1425 );
1426 }
1427
1428
1429 void __attribute__((naked,noinline)) sub_fc283626_my() {
1430 asm volatile (
1431 " push.w {r4, r5, r6, r7, r8, lr}\n"
1432 " ldr r7, =0x0000d7a4\n"
1433 " movs r1, #0x3e\n"
1434 " mov r4, r0\n"
1435 " ldr r0, [r7, #0x1c]\n"
1436 " blx sub_fc2c7dd0\n"
1437 " movs r2, #0\n"
1438 " ldrsh.w r0, [r4, #4]\n"
1439 " movs r3, #1\n"
1440 " mov r1, r2\n"
1441 " bl sub_fc2823c4\n"
1442 " mov r6, r0\n"
1443 " ldrsh.w r0, [r4, #6]\n"
1444 " bl sub_fc282562\n"
1445 " ldrsh.w r0, [r4, #8]\n"
1446 " bl sub_fc2825a6\n"
1447 " ldrsh.w r0, [r4, #0xa]\n"
1448 " bl sub_fc2825ea\n"
1449 " ldrsh.w r0, [r4, #0xc]\n"
1450 " movs r1, #0\n"
1451 " bl sub_fc28262e\n"
1452 " mov r5, r0\n"
1453 " ldr r0, [r4]\n"
1454 " ldr.w r8, =0x0005c18c\n"
1455 " cmp r0, #0xc\n"
1456 " bne loc_fc28367a\n"
1457 " movs r6, #0\n"
1458 " mov r5, r6\n"
1459 " b loc_fc283692\n"
1460 "loc_fc28367a:\n"
1461 " cmp r6, #1\n"
1462 " bne loc_fc283692\n"
1463 " ldrsh.w r0, [r4, #4]\n"
1464 " movs r2, #2\n"
1465 " ldr r1, =0xfc28235b\n"
1466 " bl sub_fc0d748a\n"
1467 " strh r0, [r4, #4]\n"
1468 " movs r0, #0\n"
1469 " str r0, [r7, #0x28]\n"
1470 " b loc_fc283698\n"
1471 "loc_fc283692:\n"
1472 " ldrh.w r0, [r8]\n"
1473 " strh r0, [r4, #4]\n"
1474 "loc_fc283698:\n"
1475 " cmp r5, #1\n"
1476 " bne loc_fc2836aa\n"
1477 " ldrsh.w r0, [r4, #0xc]\n"
1478 " movs r2, #0x20\n"
1479 " ldr r1, =0xfc2823af\n"
1480 " bl sub_fc2874e4\n"
1481 " b loc_fc2836ae\n"
1482 "loc_fc2836aa:\n"
1483 " ldrh.w r0, [r8, #8]\n"
1484 "loc_fc2836ae:\n"
1485 " strh r0, [r4, #0xc]\n"
1486 " ldrsh.w r0, [r4, #6]\n"
1487 " bl sub_fc3a0c38_my\n"
1488 " ldr pc, =0xfc2836b9\n"
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528 ".ltorg\n"
1529 );
1530 }
1531
1532 void __attribute__((naked,noinline)) sub_fc3a0c38_my() {
1533 asm volatile (
1534 " push {r4, r5, r6, lr}\n"
1535 " ldr r5, =0x0000d218\n"
1536 " mov r4, r0\n"
1537 " ldr r0, [r5, #4]\n"
1538 " cmp r0, #1\n"
1539 " beq loc_fc3a0c50\n"
1540 " movs r0, #0\n"
1541 " movw r2, #0x16b\n"
1542 " ldr r1, =0xfc3a0c98\n"
1543 " blx sub_fc2c7de8\n"
1544 "loc_fc3a0c50:\n"
1545 " ldr r0, =0xfffff400\n"
1546 " cmp r4, r0\n"
1547 " bne loc_fc3a0c5a\n"
1548 " ldrsh.w r4, [r5, #2]\n"
1549 "loc_fc3a0c5a:\n"
1550 " strh r4, [r5, #2]\n"
1551 " cmp r4, r0\n"
1552 " bne loc_fc3a0c6c\n"
1553 " movs r0, #0\n"
1554 " movw r2, #0x171\n"
1555 " ldr r1, =0xfc3a0c98\n"
1556 " blx sub_fc2c7de8\n"
1557 "loc_fc3a0c6c:\n"
1558 " mov r0, r4\n"
1559
1560 " bl apex2us\n"
1561
1562
1563
1564 " bl sub_fc14a830\n"
1565 " lsls r0, r0, #0x1f\n"
1566 " beq loc_fc3a0c92\n"
1567 " pop.w {r4, r5, r6, lr}\n"
1568 " movs r0, #0\n"
1569 " movw r2, #0x176\n"
1570 " ldr r1, =0xfc3a0c98\n"
1571
1572 " blx sub_fc2c7de8\n"
1573 "loc_fc3a0c92:\n"
1574 " pop {r4, r5, r6, pc}\n"
1575 ".ltorg\n"
1576 );
1577 }