root/platform/sx710hs/sub/101a/filewrite.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. log_fwt_msg
  2. log_fwt_start
  3. filewritetask
  4. sub_fc3f7a14_my
  5. sub_fc3f7fa2_my
  6. sub_fc3f7b46_my

   1 #include "lolevel.h"
   2 #include "platform.h"
   3 // debug
   4 //#define FILEWRITE_DEBUG_LOG 1
   5 extern void _LogCameraEvent(int id,const char *fmt,...);
   6 
   7 typedef struct {
   8     unsigned int address;
   9     unsigned int length;
  10 } cam_ptp_data_chunk; //camera specific structure
  11 
  12 #define MAX_CHUNKS_FOR_JPEG 7 // filewritetask is prepared for this many chunks
  13                               // corresponds to filewritetask() jump table entries 0-6
  14 /*
  15  * fwt_data_struct: defined here as it's camera dependent
  16  * unneeded members are designated with unkn
  17  * file_offset, full_size, seek_flag only needs to be defined for cameras with CAM_FILEWRITETASK_SEEK/CAM_FILEWRITETASK_MULTIPASS
  18  * pdc is always required
  19  * name is not currently used
  20  */
  21 typedef struct
  22 {
  23     int unkn1; // message number
  24     int file_offset;
  25     int maybe_full_size; // TODO doesn't seem to actually be full size for jpeg, instead round number somewhat smaller
  26     int unkn2, unkn3;
  27     int unkn4;
  28     cam_ptp_data_chunk pdc[MAX_CHUNKS_FOR_JPEG];
  29     int maybe_seek_flag;      // 0x2083 jpeg, 0x100 create dir, 0x200 CacheFlush
  30     int unkn5, unkn6;
  31     char name[32];
  32 } fwt_data_struct;
  33 
  34 /*
  35 sx710 observed message sequences
  36 JPEG
  37 12 maybe_full_size = 0x0058181d (=actual size), seek_flag = 0x2083
  38  0 chunk 0-0x0058181d
  39  1 chunk 0-0
  40  7 close
  41 
  42 new directory
  43 11 seek_flag = 0x100
  44 before m 12 for shot, after raw hook in capt_seq
  45 
  46 playback switch
  47 10 A/CacheFlush seek_flag 0x200
  48 */
  49 
  50 #include "../../../generic/filewrite.c"
  51 
  52 #ifdef FILEWRITE_DEBUG_LOG
  53 void log_fwt_msg(fwt_data_struct *fwd)
  54 {
  55     int m=fwd->unkn1;
  56     _LogCameraEvent(0x60,"fw m:%d o:0x%08x fs:0x%08x sf:0x%x",m,fwd->file_offset,fwd->maybe_full_size,fwd->maybe_seek_flag);
  57     _LogCameraEvent(0x60,"fw %s",fwd->name);
  58     if(m >= 0 && m <=6) {
  59         _LogCameraEvent(0x60,"fw chunk adr:0x%08x l:0x%08x",fwd->pdc[m].address,fwd->pdc[m].length);
  60     }
  61     _LogCameraEvent(0x60,"fw u %08x %08x %08x %08x %08x %08x",fwd->unkn2,fwd->unkn3,fwd->unkn4,fwd->unkn5,fwd->unkn6);
  62 }
  63 
  64 void log_fwt_start(void)
  65 {
  66     _LogCameraEvent(0x60,"fw start");
  67 }
  68 #endif
  69 
  70 /*************************************************************/
  71 // task_FileWrite 0xfc3f7c99 -s=task_FileWrite -c=43 -f=chdk
  72 void __attribute__((naked,noinline)) filewritetask() {
  73 asm volatile (
  74 "    push    {r3, r4, r5, r6, r7, lr}\n"
  75 #ifdef FILEWRITE_DEBUG_LOG
  76 "bl log_fwt_start\n"
  77 #endif
  78 "    ldr     r6, =0x09200001\n"
  79 "    movw    r7, #0x477\n"
  80 "    ldr     r5, =0x0002008c\n"
  81 "    adds    r6, #0x12\n"
  82 "loc_fc3f7ca4:\n"
  83 "    mov     r1, sp\n"
  84 "    movs    r2, #0\n"
  85 "    ldr     r0, [r5, #0x14]\n"
  86 "    blx     sub_fc2c7ca8\n" // j_ReceiveMessageQueue
  87 "    cbz     r0, loc_fc3f7cba\n"
  88 "    movs    r0, #0\n"
  89 "    mov     r2, r7\n"
  90 "    ldr     r1, =0xfc3f7d64\n" //  *"dwFWrite.c"
  91 "    blx     sub_fc2c7de8\n" // j_DebugAssert
  92 "loc_fc3f7cba:\n"
  93 #ifdef FILEWRITE_DEBUG_LOG
  94 "ldr     r0, [sp]\n"
  95 "bl log_fwt_msg\n"
  96 #endif
  97 "    ldr     r0, [sp]\n"
  98 "    ldr     r1, [r0]\n"
  99 "    cmp     r1, #0xd\n"
 100 "    bhs     loc_fc3f7ca4\n"
 101 "    tbb     [pc, r1]\n" // (jumptable r1 13 elements)
 102 "branchtable_fc3f7cc6:\n"
 103 "    .byte((loc_fc3f7d08 - branchtable_fc3f7cc6) / 2)\n" // (case 0)
 104 "    .byte((loc_fc3f7d08 - branchtable_fc3f7cc6) / 2)\n" // (case 1)
 105 "    .byte((loc_fc3f7d08 - branchtable_fc3f7cc6) / 2)\n" // (case 2)
 106 "    .byte((loc_fc3f7d08 - branchtable_fc3f7cc6) / 2)\n" // (case 3)
 107 "    .byte((loc_fc3f7d08 - branchtable_fc3f7cc6) / 2)\n" // (case 4)
 108 "    .byte((loc_fc3f7d08 - branchtable_fc3f7cc6) / 2)\n" // (case 5)
 109 "    .byte((loc_fc3f7d08 - branchtable_fc3f7cc6) / 2)\n" // (case 6)
 110 "    .byte((loc_fc3f7d0e - branchtable_fc3f7cc6) / 2)\n" // (case 7)
 111 "    .byte((loc_fc3f7cd4 - branchtable_fc3f7cc6) / 2)\n" // (case 8)
 112 "    .byte((loc_fc3f7ce6 - branchtable_fc3f7cc6) / 2)\n" // (case 9)
 113 "    .byte((loc_fc3f7d02 - branchtable_fc3f7cc6) / 2)\n" // (case 10)
 114 "    .byte((loc_fc3f7cda - branchtable_fc3f7cc6) / 2)\n" // (case 11)
 115 "    .byte((loc_fc3f7ce0 - branchtable_fc3f7cc6) / 2)\n" // (case 12)
 116 ".align 1\n"
 117 "loc_fc3f7cd4:\n"   // case 8 - calls close, not seen in normal shooting (g7x)
 118 
 119 "    bl      sub_fc3f7e86\n"
 120 "    b       loc_fc3f7ca4\n"
 121 "loc_fc3f7cda:\n"   // case 11 - create dir, TODO not patched
 122 "    bl      sub_fc3f7ed2\n"
 123 "    b       loc_fc3f7ca4\n"
 124 "loc_fc3f7ce0:\n"  // case 12 - patch for open, main hook
 125 "    bl      sub_fc3f7a14_my\n"
 126 "    b       loc_fc3f7ca4\n"
 127 "loc_fc3f7ce6:\n"   // case 9 - not seen in normal shooting (g7x)
 128 "    ldr     r1, [r0, #4]\n"
 129 "    movs    r2, #0\n"
 130 "    mov     r4, r0\n"
 131 "    ldr     r0, [r5, #8]\n"
 132 "    bl      _lseek\n"
 133 "    adds    r0, r0, #1\n"
 134 "    bne     loc_fc3f7ca4\n"
 135 "    movs    r0, #7\n"
 136 "    mov     r1, r4\n"
 137 "    str     r6, [r4, #0x14]\n"
 138 "    bl      sub_fc3f799a\n"
 139 "    b       loc_fc3f7ca4\n"
 140 "loc_fc3f7d02:\n"    // case 10 - cache flush
 141 "    bl      sub_fc3f7f30\n"
 142 "    b       loc_fc3f7ca4\n"
 143 "loc_fc3f7d08:\n"    // case 0-6  - write stage
 144 "    bl      sub_fc3f7fa2_my\n"
 145 "    b       loc_fc3f7ca4\n"
 146 "loc_fc3f7d0e:\n"   // case 7 - close stage
 147 "    bl      sub_fc3f7b46_my\n"
 148 "    b       loc_fc3f7ca4\n"
 149 ".ltorg\n"
 150     );
 151 }
 152 
 153 
 154 // -f=chdk -s=0xfc3f7a15 -c=126
 155 void __attribute__((naked,noinline)) sub_fc3f7a14_my() {
 156 asm volatile (
 157 "    push.w  {r4, r5, r6, r7, r8, sb, lr}\n"
 158 "    mov     r4, r0\n"
 159 //hook placed here to avoid conditional branch a few instructions below (watch out for registers!)
 160 //"  mov   r0, r4\n"      //data block start, commented out as R0 is already holding what we need
 161 "    bl filewrite_main_hook\n"
 162 "    mov     r0, r4\n"      //restore register(s)
 163 "    ldr     r0, [r0, #0x50]\n"
 164 "    sub     sp, #0x3c\n"
 165 "    lsls    r1, r0, #0x1f\n"
 166 "    bne     loc_fc3f7a26\n"
 167 "    lsls    r0, r0, #0x1d\n"
 168 "    bpl     loc_fc3f7b22\n"
 169 "loc_fc3f7a26:\n"
 170 "    ldr     r7, =0x0002008c\n"
 171 "    ldr     r0, [r7, #0x1c]\n"
 172 "    cbz     r0, loc_fc3f7a2e\n"
 173 "    blx     r0\n"
 174 "loc_fc3f7a2e:\n"
 175 "    add.w   r0, r4, #0x5c\n"
 176 "    mov     r8, r0\n"
 177 "    bl      sub_fc317004\n"
 178 "    movs    r1, #0\n"
 179 "    bl      sub_fc0710aa\n"
 180 "    movs    r1, #0\n"
 181 "    movs    r0, #0x47\n"
 182 "    bl      sub_fc305b58\n"
 183 "    ldr     r0, [r4, #0x50]\n"
 184 "    lsls    r0, r0, #0x1f\n"
 185 "    beq     loc_fc3f7b22\n"
 186 "    ldr     r0, [r4, #0x10]\n"
 187 "    bl      sub_fc16fd22\n"
 188 "    ldr     r0, [r4, #0x50]\n"
 189 "    movw    r5, #0x301\n"
 190 "    lsls    r1, r0, #0x1b\n"
 191 "    bpl     loc_fc3f7a60\n"
 192 "    movs    r5, #9\n"
 193 "    b       loc_fc3f7a66\n"
 194 "loc_fc3f7a60:\n"
 195 "    lsls    r1, r0, #0x19\n"
 196 "    bpl     loc_fc3f7a66\n"
 197 "    movs    r5, #1\n"
 198 "loc_fc3f7a66:\n"
 199 "    lsls    r0, r0, #0x1a\n"
 200 "    bmi     loc_fc3f7a70\n"
 201 "    ldr     r0, [r4, #0x58]\n"
 202 "    cmp     r0, #1\n"
 203 "    bne     loc_fc3f7a74\n"
 204 "loc_fc3f7a70:\n"
 205 "    orr     r5, r5, #0x8000\n"
 206 "loc_fc3f7a74:\n"
 207 "    movw    sb, #0x1b6\n"
 208 "    ldr     r6, [r4, #0x10]\n"
 209 "    mov     r2, sb\n"
 210 "    mov     r1, r5\n"
 211 "    mov     r0, r8\n"
 212 //"    bl      sub_fc31727a\n" // j_Open_FW
 213 "    bl      fwt_open\n" // +
 214 "    adds    r1, r0, #1\n"
 215 "    bne     loc_fc3f7ac2\n"
 216 "    mov     r0, r8\n"
 217 "    bl      sub_fc31761e\n" // PrepareDirectory_0
 218 "    movs    r2, #0xf\n"
 219 "    mov     r1, r8\n"
 220 "    add     r0, sp, #4\n"
 221 "    blx     sub_fc2c7d88\n"
 222 "    movs    r0, #0\n"
 223 "    strb.w  r0, [sp, #0x13]\n"
 224 "    movw    r1, #0x41ff\n"
 225 "    str     r1, [sp, #0x24]\n"
 226 "    strd    r0, r6, [sp, #0x2c]\n"
 227 "    movs    r1, #0x10\n"
 228 "    str     r6, [sp, #0x34]\n"
 229 "    add     r0, sp, #4\n"
 230 "    str     r6, [sp, #0x38]\n"
 231 "    str     r1, [sp, #0x28]\n"
 232 "    add     r1, sp, #0x24\n"
 233 "    bl      sub_fc1702ca\n"
 234 "    mov     r2, sb\n"
 235 "    mov     r1, r5\n"
 236 "    mov     r0, r8\n"
 237 "    bl      _Open\n" // j_Open_FW
 238 "loc_fc3f7ac2:\n"
 239 "    mov     r5, r0\n"
 240 "    str     r0, [r7, #8]\n"
 241 "    adds    r0, r0, #1\n"
 242 "    bne     loc_fc3f7afa\n"
 243 "    movs    r1, #0\n"
 244 "    movs    r0, #0x48\n"
 245 "    bl      sub_fc305b58\n"
 246 "    mov     r0, r8\n"
 247 "    bl      sub_fc317004\n"
 248 "    ldr     r1, [r7, #0x20]\n"
 249 "    bl      sub_fc071108\n"
 250 "    ldr     r0, [r7, #0x18]\n"
 251 "    cmp     r0, #0\n"
 252 "    beq     loc_fc3f7b40\n"
 253 "    ldr     r5, =0x09200001\n"
 254 "    mov     r0, r4\n"
 255 "    mov     r1, r5\n"
 256 "    bl      sub_fc3f7960\n"
 257 "    ldr     r1, [r7, #0x18]\n"
 258 "    add     sp, #0x3c\n"
 259 "    mov     r0, r5\n"
 260 "    pop.w   {r4, r5, r6, r7, r8, sb, lr}\n"
 261 "    bx      r1\n"
 262 "loc_fc3f7afa:\n"
 263 "    ldr     r0, =0x001c7acc\n"
 264 "    movs    r2, #0x20\n"
 265 "    mov     r1, r8\n"
 266 "    blx     sub_fc2c7d80\n" // j_dry_memcpy
 267 // TODO looks equivalent to elph130, not verified that it's required
 268 //mod start
 269 "    LDR R3, =current_write_ignored\n"
 270 "    LDR R3, [R3]\n"
 271 "    cbnz r3,loc_C\n" // jump over the next block
 272 //mod end
 273 "    ldr     r0, [r4, #0x50]\n"
 274 "    lsls    r0, r0, #0x18\n"
 275 "    bpl     loc_fc3f7b22\n"
 276 "    ldr     r1, [r4, #0xc]\n"
 277 "    mov     r0, r5\n"
 278 "    bl      sub_fc317434\n"
 279 "    cbnz    r0, loc_fc3f7b20\n"
 280 "    ldr     r0, =0x09200001\n"
 281 "    mov     r1, r4\n"
 282 "    adds    r0, #0x16\n"
 283 "    str     r0, [r4, #0x14]\n"
 284 "    movs    r0, #7\n"
 285 "    b       loc_fc3f7b38\n"
 286 "loc_fc3f7b20:\n"
 287 "    b       loc_fc3f7b22\n"
 288 "loc_fc3f7b22:\n"
 289 "loc_C:\n"
 290 "    ldr     r0, [r4, #0x50]\n"
 291 "    lsls    r0, r0, #0x19\n"
 292 "    bmi     loc_fc3f7b2c\n"
 293 "    ldr     r0, [r4, #4]\n"
 294 "    cbz     r0, loc_fc3f7b34\n"
 295 "loc_fc3f7b2c:\n"
 296 "    movs    r0, #9\n"
 297 "    mov     r1, r4\n"
 298 "    bl      sub_fc3f799a\n"
 299 "loc_fc3f7b34:\n"
 300 "    movs    r0, #0\n"
 301 "    mov     r1, r4\n"
 302 "loc_fc3f7b38:\n"
 303 "    add     sp, #0x3c\n"
 304 "    pop.w   {r4, r5, r6, r7, r8, sb, lr}\n"
 305 //"    b       loc_fc3f799a\n"
 306 "    ldr     pc,=0xfc3f799b\n" // avoid stub
 307 "loc_fc3f7b40:\n"
 308 "    add     sp, #0x3c\n"
 309 "    pop.w   {r4, r5, r6, r7, r8, sb, pc}\n"
 310 ".ltorg\n"
 311     );
 312 }
 313 
 314 
 315 // message 0-6 - filewrite chunks
 316 // -f=chdk -s=0xfc3f7fa3 -c=65
 317 void __attribute__((naked,noinline)) sub_fc3f7fa2_my() {
 318 asm volatile (
 319 "    push.w  {r4, r5, r6, r7, r8, sb, sl, lr}\n"
 320 "    mov     r5, r0\n"
 321 "    ldr     r0, [r0]\n"
 322 "    cmp     r0, #6\n"
 323 "    bhi     loc_fc3f7fba\n"
 324 "    add.w   r0, r5, r0, lsl #3\n"
 325 "    ldrd    r7, r6, [r0, #0x18]\n"
 326 "    cbnz    r6, loc_fc3f7fce\n"
 327 "    b       loc_fc3f7fc8\n"
 328 "loc_fc3f7fba:\n"
 329 "    movw    r2, #0x3b4\n"
 330 "    ldr     r1, =0xfc3f7d64\n" //  *"dwFWrite.c"
 331 "    movs    r0, #0\n"
 332 "    blx     sub_fc2c7de8\n" // j_DebugAssert
 333 "loc_fc3f7fc8:\n"
 334 "    movs    r0, #7\n"
 335 "    mov     r1, r5\n"
 336 "    b       loc_fc3f803e\n"
 337 "loc_fc3f7fce:\n"
 338 "    ldr.w   sl, =0x0002008c\n"
 339 "    mov.w   sb, #0x1000000\n"
 340 "    mov     r4, r6\n"
 341 "loc_fc3f7fd8:\n"
 342 "    ldr     r0, [r5, #4]\n"
 343 "    cmp     r4, sb\n"
 344 "    mov     r1, sb\n"
 345 "    bhi     loc_fc3f7fe2\n"
 346 "    mov     r1, r4\n"
 347 "loc_fc3f7fe2:\n"
 348 "    lsls    r2, r0, #8\n"
 349 "    beq     loc_fc3f7ff4\n"
 350 "    bic     r0, r0, #0xff000000\n"
 351 "    rsb.w   r0, r0, #0x1000000\n"
 352 "    cmp     r1, r0\n"
 353 "    bls     loc_fc3f7ff4\n"
 354 "    mov     r1, r0\n"
 355 "loc_fc3f7ff4:\n"
 356 "    ldr.w   r0, [sl, #8]\n"
 357 "    mov     r8, r1\n"
 358 "    mov     r2, r1\n"
 359 "    mov     r1, r7\n"
 360 //"    bl      sub_fc317322\n" // j_Write_FW
 361 "    bl      fwt_write\n" // +
 362 "    ldr     r1, [r5, #4]\n"
 363 "    cmp     r8, r0\n"
 364 "    add     r1, r0\n"
 365 "    str     r1, [r5, #4]\n"
 366 "    beq     loc_fc3f801e\n"
 367 "    adds    r0, r0, #1\n"
 368 "    bne     loc_fc3f8016\n"
 369 "    ldr     r0, =0x09200006\n"
 370 "    subs    r0, r0, #1\n"
 371 "    b       loc_fc3f801a\n"
 372 "loc_fc3f8016:\n"
 373 "    ldr     r0, =0x09200006\n"
 374 "    adds    r0, #0xf\n"
 375 "loc_fc3f801a:\n"
 376 "    str     r0, [r5, #0x14]\n"
 377 "    b       loc_fc3f7fc8\n"
 378 "loc_fc3f801e:\n"
 379 "    subs    r4, r4, r0\n"
 380 "    cmp     r4, r6\n"
 381 "    add     r7, r0\n"
 382 "    blo     loc_fc3f8034\n"
 383 "    movw    r2, #0x3de\n"
 384 "    ldr     r1, =0xfc3f7d64\n" //  *"dwFWrite.c"
 385 "    movs    r0, #0\n"
 386 "    blx     sub_fc2c7de8\n" // j_DebugAssert
 387 "loc_fc3f8034:\n"
 388 "    cmp     r4, #0\n"
 389 "    bne     loc_fc3f7fd8\n"
 390 "    ldr     r0, [r5]\n"
 391 "    mov     r1, r5\n"
 392 "    adds    r0, r0, #1\n"
 393 "loc_fc3f803e:\n"
 394 "    pop.w   {r4, r5, r6, r7, r8, sb, sl, lr}\n"
 395 //"    b       loc_fc3f799a\n"
 396 "    ldr     pc,=0xfc3f799b\n"
 397 ".ltorg\n"
 398     );
 399 }
 400 
 401 // message 7 - close
 402 // -f=chdk -s=0xfc3f7b47 -c=145
 403 void __attribute__((naked,noinline)) sub_fc3f7b46_my() {
 404 asm volatile (
 405 "    push    {r4, r5, r6, r7, lr}\n"
 406 "    mov     r4, r0\n"
 407 "    ldr     r0, [r0, #0x50]\n"
 408 "    ldr     r5, =0x0002008c\n"
 409 "    sub     sp, #0x3c\n"
 410 "    add.w   r7, r4, #0x5c\n"
 411 "    lsls    r1, r0, #0x1e\n"
 412 "    bmi     loc_fc3f7b5e\n"
 413 "    lsls    r0, r0, #0x1c\n"
 414 "    bpl     loc_fc3f7c5a\n"
 415 "    b       loc_fc3f7bb2\n"
 416 "loc_fc3f7b5e:\n"
 417 "    lsls    r0, r0, #0x18\n"
 418 "    bpl     loc_fc3f7b8e\n"
 419 "    ldrd    r1, r0, [r4, #8]\n"
 420 "    cmp     r1, r0\n"
 421 "    beq     loc_fc3f7b8e\n"
 422 "    ldr     r0, [r5, #8]\n"
 423 "    bl      sub_fc317434\n"
 424 "    cbnz    r0, loc_fc3f7b7a\n"
 425 "    ldr     r0, =0x09200001\n"
 426 "    adds    r0, #0x16\n"
 427 "    str     r0, [r4, #0x14]\n"
 428 "    b       loc_fc3f7b8e\n"
 429 "loc_fc3f7b7a:\n"
 430 "    ldr     r0, [r4, #8]\n"
 431 "    add     r1, sp, #0x24\n"
 432 "    str     r0, [r4, #4]\n"
 433 "    mov     r0, r7\n"
 434 "    bl      sub_fc170254\n"
 435 "    cmp     r0, #1\n"
 436 "    bne     loc_fc3f7b8e\n"
 437 "    ldr     r0, [r4, #4]\n"
 438 "    str     r0, [sp, #0x2c]\n"
 439 "loc_fc3f7b8e:\n"
 440 "    ldr     r0, [r5, #8]\n"
 441 "    adds    r1, r0, #1\n"
 442 "    beq     loc_fc3f7bb2\n"
 443 "    ldr     r6, =0x09200001\n"
 444 "    ldr     r1, [r4, #0x58]\n"
 445 "    adds    r6, r6, #2\n"
 446 "    cmp     r1, #1\n"
 447 "    bne     loc_fc3f7ba4\n"
 448 //mod start
 449 "    LDR R3, =current_write_ignored\n"
 450 "    LDR R3, [R3]\n"
 451 "    cbnz R3,loc_D\n" // jump over the next block
 452 //mod end
 453 "    bl      sub_fc31727e\n"
 454 "    b       loc_fc3f7ba8\n"
 455 "loc_fc3f7ba4:\n"
 456 "loc_D:\n"
 457 //"    bl      sub_fc31727c\n" // j_Close_FW
 458 "    bl      fwt_close\n" // +
 459 "loc_fc3f7ba8:\n"
 460 "    cbz     r0, loc_fc3f7bac\n"
 461 "    str     r6, [r4, #0x14]\n"
 462 "loc_fc3f7bac:\n"
 463 "    mov.w   r0, #-1\n"
 464 "    str     r0, [r5, #8]\n"
 465 "loc_fc3f7bb2:\n"
 466 "    ldr     r0, [r4, #0x14]\n"
 467 "    lsls    r0, r0, #0x1f\n"
 468 "    bne     loc_fc3f7c66\n"
 469 "    ldr     r0, [r4, #0x50]\n"
 470 "    lsls    r1, r0, #0x1f\n"
 471 "    beq     loc_fc3f7bda\n"
 472 "    movw    r0, #0x81ff\n"
 473 "    str     r0, [sp, #0x24]\n"
 474 "    movs    r0, #0x20\n"
 475 "    str     r0, [sp, #0x28]\n"
 476 "    ldr     r0, [r4, #4]\n"
 477 "    str     r0, [sp, #0x2c]\n"
 478 "    ldr     r0, [r4, #0x10]\n"
 479 "    str     r0, [sp, #0x30]\n"
 480 "    ldr     r0, [r4, #0x10]\n"
 481 "    str     r0, [sp, #0x34]\n"
 482 "    ldr     r0, [r4, #0x10]\n"
 483 "    str     r0, [sp, #0x38]\n"
 484 "    b       loc_fc3f7bfc\n"
 485 "loc_fc3f7bda:\n"
 486 "    lsls    r0, r0, #0x1b\n"
 487 "    bpl     loc_fc3f7c02\n"
 488 "    add     r1, sp, #0x24\n"
 489 "    mov     r0, r7\n"
 490 "    bl      sub_fc170254\n"
 491 "    cbnz    r0, loc_fc3f7bf4\n"
 492 "    movs    r0, #0\n"
 493 "    movw    r2, #0x43a\n"
 494 "    ldr     r1, =0xfc3f7d64\n" //  *"dwFWrite.c"
 495 "    blx     sub_fc2c7de8\n" // j_DebugAssert
 496 "loc_fc3f7bf4:\n"
 497 "    ldr     r0, [sp, #0x2c]\n"
 498 "    ldr     r1, [r4, #4]\n"
 499 "    add     r0, r1\n"
 500 "    str     r0, [sp, #0x2c]\n"
 501 "loc_fc3f7bfc:\n"
 502 "    ldr     r0, [r4, #0x50]\n"
 503 "    lsls    r0, r0, #0x1f\n"
 504 "    bne     loc_fc3f7c0c\n"
 505 "loc_fc3f7c02:\n"
 506 "    ldr     r0, [r4, #0x50]\n"
 507 "    lsls    r1, r0, #0x1e\n"
 508 "    bmi     loc_fc3f7c0c\n"
 509 "    lsls    r0, r0, #0x1b\n"
 510 "    bpl     loc_fc3f7c66\n"
 511 "loc_fc3f7c0c:\n"
 512 "    add     r1, sp, #0x24\n"
 513 "    mov     r0, r7\n"
 514 "    bl      sub_fc1702ca\n"
 515 "    ldr     r0, [r4, #0x50]\n"
 516 "    lsls    r1, r0, #0x1e\n"
 517 "    bpl     loc_fc3f7c66\n"
 518 "    lsls    r0, r0, #0x1a\n"
 519 "    bpl     loc_fc3f7c66\n"
 520 "    movs    r2, #0x20\n"
 521 "    mov     r1, r7\n"
 522 "    add     r0, sp, #4\n"
 523 "    blx     sub_fc2c7d80\n" // j_dry_memcpy
 524 "    add     r0, sp, #4\n"
 525 "    bl      _strlen\n"
 526 "    add     r2, sp, #4\n"
 527 "    add     r0, r2\n"
 528 "    movs    r1, #0x54\n"
 529 "    strb    r1, [r0, #-0x3]!\n"
 530 "    movs    r1, #0x4d\n"
 531 "    strb    r1, [r0, #1]\n"
 532 "    movs    r1, #0x50\n"
 533 "    strb    r1, [r0, #2]\n"
 534 "    add     r1, sp, #4\n"
 535 "    mov     r0, r7\n"
 536 "    bl      sub_fc16fefa\n"
 537 "    cbnz    r0, loc_fc3f7c56\n"
 538 "    movs    r0, #0\n"
 539 "    movw    r2, #0x1bd\n"
 540 "    ldr     r1, =0xfc3f7d64\n" //  *"dwFWrite.c"
 541 "    blx     sub_fc2c7de8\n" // j_DebugAssert
 542 "loc_fc3f7c56:\n"
 543 "    add     r0, sp, #4\n"
 544 "    b       loc_fc3f7c5c\n"
 545 "loc_fc3f7c5a:\n"
 546 "    b       loc_fc3f7c7c\n"
 547 "loc_fc3f7c5c:\n"
 548 "    bl      sub_fc1705bc\n"
 549 "    mov     r0, r7\n"
 550 "    bl      sub_fc1705bc\n"
 551 "loc_fc3f7c66:\n"
 552 "    movs    r1, #0\n"
 553 "    movs    r0, #0x48\n"
 554 "    bl      sub_fc305b58\n"
 555 "    mov     r0, r7\n"
 556 "    bl      sub_fc317004\n"
 557 "    ldr     r1, [r5, #0x20]\n"
 558 "    bl      sub_fc071108\n"
 559 "    b       loc_fc3f7c80\n"
 560 "loc_fc3f7c7c:\n"
 561 "    ldr     r0, [r5, #0x20]\n"
 562 "    blx     r0\n"
 563 "loc_fc3f7c80:\n"
 564 "    ldr     r0, [r5, #0x18]\n"
 565 "    cmp     r0, #0\n"
 566 "    beq     loc_fc3f7c94\n"
 567 "    ldr     r1, [r4, #0x14]\n"
 568 "    mov     r0, r4\n"
 569 "    bl      sub_fc3f7960\n"
 570 "    ldr     r1, [r5, #0x18]\n"
 571 "    ldr     r0, [r4, #0x14]\n"
 572 "    blx     r1\n"
 573 "loc_fc3f7c94:\n"
 574 "    add     sp, #0x3c\n"
 575 "    pop     {r4, r5, r6, r7, pc}\n"
 576 ".ltorg\n"
 577     );
 578 }

/* [<][>][^][v][top][bottom][index][help] */