root/platform/sx60hs/sub/100f/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_fc065b7c_my
  5. sub_fc0660ae_my
  6. sub_fc065ca2_my

   1 #include "lolevel.h"
   2 #include "platform.h"
   3 // all of this copied and adjusted from g7x coding by reyalp
   4 extern void _LogCameraEvent(int id,const char *fmt,...);
   5 
   6 typedef struct {
   7     unsigned int address;
   8     unsigned int length;
   9 } cam_ptp_data_chunk; //camera specific structure
  10 
  11 #define MAX_CHUNKS_FOR_FWT 7 // filewritetask is prepared for this many chunks
  12                               // corresponds to filewritetask() jump table entries 0-6
  13 /*
  14  * fwt_data_struct: defined here as it's camera dependent
  15  * unneeded members are designated with unkn
  16  * file_offset, full_size, seek_flag only needs to be defined for cameras with CAM_FILEWRITETASK_SEEK/CAM_FILEWRITETASK_MULTIPASS
  17  * pdc is always required
  18  * name is not currently used
  19  */
  20 typedef struct
  21 {
  22     int unkn1; // message number
  23     int file_offset;
  24     int maybe_full_size; // TODO doesn't seem to actually be full size for jpeg, instead round number somewhat smaller
  25     int unkn2, unkn3;
  26     int unkn4;
  27     cam_ptp_data_chunk pdc[MAX_CHUNKS_FOR_FWT];
  28     int maybe_seek_flag;      // from fc06b0cc 0x50, not clear if ever used to indicate seek. 0x3 raw, 0x83 jpeg, 0x200 CacheFlush, 0x100 create dir
  29     int unkn5, unkn6;
  30     char name[32];      //from fc06b0cc offset from start 0x5c = 92 bytes = 23 words
  31 } fwt_data_struct;
  32 
  33 /*
  34 g7x observed message sequences
  35 canon raw + jpeg
  36 CR2
  37 12 full_size = 0x010dad6d (actual size), seek_flag = 0x3
  38  0 chunk 0-0x9aa00
  39  1 chunk 0x9aa00-0x010dad6d
  40  2 chunk 0-0
  41  7 close
  42 JPEG
  43 12 full_size = 32b200 (actual size = 0x35bbae), seek_flag = 0x83
  44  0 chunk 0-0x35bbae
  45  1 chunk 0-0
  46  7 close
  47 10 seek_flag = 0x200, name = A/CacheFlush
  48 
  49 single jpeg only, high detail scene
  50 12 full_size = 0x00c41400 (actual size = 0xCD0F69) seek_flag = 0x83
  51  0 0-0xcd0f69
  52  1 0-0
  53  7 close
  54 10 seek_flag = 0x200, name = A/CacheFlush
  55 
  56 continuous jpeg
  57 shot 1
  58 12 full_size = 0x369000 (actual 0x39af87) seek_flag = 0x83
  59  0 chunk 0-0x39af87
  60  1 chunk 0-0
  61  7 close
  62 shot 2
  63 12 full_size=0x00369200 (acutal 0x39b022) seek_flag = 0x83
  64  0 chunk 0-39b022
  65  1 chunk 0-0
  66  7 close
  67 10 seek_flag = 0x200, name = A/CacheFlush
  68 10 seek_flag = 0x200, name = A/CacheFlush
  69 (really twice, no obvious difference in params)
  70 
  71 canon raw only
  72 12 full_size = 0x010dce4a (actual size) seek_flag 3
  73  0 chunk 0-0x87200
  74  1 chunk 0x87200-0x010dce4a
  75  2 0-0
  76  7 close
  77 10 seek_flag = 0x200, name = A/CacheFlush
  78 
  79 new directory
  80 11 seek_flag = 0x100
  81 before m 12 for shot, after raw hook in capt_seq but before
  82 spytask calls remotecap_raw_available due to sleep loops
  83 
  84 bypassing PrepareDirectory_0 seems to cause hang on switch to play mode
  85 */
  86 
  87 #include "../../../generic/filewrite.c"
  88 
  89 void log_fwt_msg(fwt_data_struct *fwd)
  90 {
  91     int m=fwd->unkn1;
  92     _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);
  93     _LogCameraEvent(0x60,"fw %s",fwd->name);
  94     if(m >= 0 && m <=6) {
  95         _LogCameraEvent(0x60,"fw chunk adr:0x%08x l:0x%08x",fwd->pdc[m].address,fwd->pdc[m].length);
  96     }
  97     _LogCameraEvent(0x60,"fw u %08x %08x %08x %08x %08x %08x",fwd->unkn2,fwd->unkn3,fwd->unkn4,fwd->unkn5,fwd->unkn6);
  98 }
  99 
 100 void log_fwt_start(void)
 101 {
 102     _LogCameraEvent(0x60,"fw start");
 103 }
 104 /*************************************************************/
 105 // // task_FileWrite 0xfc065dc7  -s=task_FileWrite -c=43 -f=chdk
 106 void __attribute__((naked,noinline)) filewritetask() {
 107 asm volatile (
 108 "    push    {r3, r4, r5, r6, r7, lr}\n"
 109 "    ldr     r6, =0x09200001\n"
 110 "    movw    r7, #0x428\n"
 111 "    ldr     r5, =0x00024cb8\n"
 112 "    adds    r6, #0x12\n"
 113 "loc_fc065dd2:\n"
 114 "    mov     r1, sp\n"
 115 "    movs    r2, #0\n"
 116 "    ldr     r0, [r5, #0x10]\n"
 117 "    blx     sub_fc2cf348\n" // j_ReceiveMessageQueue
 118 "    cbz     r0, loc_fc065de8\n"
 119 "    movs    r0, #0\n"
 120 "    mov     r2, r7\n"
 121 "    ldr     r1, =0xfc065efc\n" //  *"dwFWrite.c"
 122 "    blx     sub_fc2cf408\n" // j_DebugAssert
 123 "loc_fc065de8:\n"
 124 "    ldr     r0, [sp]\n"
 125 "bl log_fwt_msg\n"
 126 "    ldr     r0, [sp]\n"
 127 "    ldr     r1, [r0]\n"
 128 "    cmp     r1, #0xd\n"
 129 "    bhs     loc_fc065dd2\n"
 130 "    tbb     [pc, r1]\n" // (jumptable r1 13 elements)
 131 "branchtable_fc065df4:\n"
 132 "    .byte((loc_fc065e36 - branchtable_fc065df4) / 2)\n" // (case 0)
 133 "    .byte((loc_fc065e36 - branchtable_fc065df4) / 2)\n" // (case 1)
 134 "    .byte((loc_fc065e36 - branchtable_fc065df4) / 2)\n" // (case 2)
 135 "    .byte((loc_fc065e36 - branchtable_fc065df4) / 2)\n" // (case 3)
 136 "    .byte((loc_fc065e36 - branchtable_fc065df4) / 2)\n" // (case 4)
 137 "    .byte((loc_fc065e36 - branchtable_fc065df4) / 2)\n" // (case 5)
 138 "    .byte((loc_fc065e36 - branchtable_fc065df4) / 2)\n" // (case 6)
 139 "    .byte((loc_fc065e3c - branchtable_fc065df4) / 2)\n" // (case 7)
 140 "    .byte((loc_fc065e02 - branchtable_fc065df4) / 2)\n" // (case 8)
 141 "    .byte((loc_fc065e14 - branchtable_fc065df4) / 2)\n" // (case 9)
 142 "    .byte((loc_fc065e30 - branchtable_fc065df4) / 2)\n" // (case 10)
 143 "    .byte((loc_fc065e08 - branchtable_fc065df4) / 2)\n" // (case 11)
 144 "    .byte((loc_fc065e0e - branchtable_fc065df4) / 2)\n" // (case 12)
 145 ".align 1\n"
 146 "loc_fc065e02:\n"   // case 8 - calls close, not seen in normal shooting
 147 "    bl      sub_fc065fb6\n"
 148 "    b       loc_fc065dd2\n"
 149 "loc_fc065e08:\n"   // case 11 - create dir, TODO not patched
 150 "    bl      sub_fc066002\n"
 151 "    b       loc_fc065dd2\n"
 152 "loc_fc065e0e:\n"   // case 12 - patch for open, main hook
 153 "    bl      sub_fc065b7c_my\n"
 154 "    b       loc_fc065dd2\n"
 155 "loc_fc065e14:\n"   // case 9 - not seen in normal shooting
 156 "    ldr     r1, [r0, #4]\n"
 157 "    movs    r2, #0\n"
 158 "    mov     r4, r0\n"
 159 "    ldr     r0, [r5, #4]\n"
 160 "    bl      _lseek\n" // -> fwt_lseek ?
 161 "    adds    r0, r0, #1\n"
 162 "    bne     loc_fc065dd2\n"
 163 "    movs    r0, #7\n"
 164 "    mov     r1, r4\n"
 165 "    str     r6, [r4, #0x14]\n"
 166 "    bl      sub_fc065b04\n"
 167 "    b       loc_fc065dd2\n"
 168 "loc_fc065e30:\n"   // case 10 - cache flush, patch for ignore write
 169 "    bl      sub_fc066056\n"
 170 "    b       loc_fc065dd2\n"
 171 "loc_fc065e36:\n"     // case 0-6  - write stage
 172 "    bl      sub_fc0660ae_my\n"
 173 "    b       loc_fc065dd2\n"
 174 "loc_fc065e3c:\n"  // case 7 - close stage
 175 "    bl      sub_fc065ca2_my\n"
 176 "    b       loc_fc065dd2\n"
 177 ".ltorg\n"
 178     );
 179 }
 180 // -s=0xfc065b7d-c=121 -f=chdk
 181 void __attribute__((naked,noinline)) sub_fc065b7c_my() {
 182 asm volatile (
 183 "    push.w  {r4, r5, r6, r7, r8, sb, lr}\n"
 184 "    mov     r4, r0\n"
 185 //hook placed here to avoid conditional branch a few instructions below (watch out for registers!)
 186 //"  mov   r0, r4\n"      //data block start, commented out as R0 is already holding what we need
 187 "    BL      filewrite_main_hook\n"
 188 "    mov     r0, r4\n"      //restore register(s)
 189 "    ldr     r0, [r0, #0x50]\n"
 190 "    sub     sp, #0x3c\n"
 191 "    lsls    r1, r0, #0x1f\n"
 192 "    bne     loc_fc065b8e\n"
 193 "    lsls    r0, r0, #0x1d\n"
 194 "    bpl     loc_fc065c7e\n"
 195 "loc_fc065b8e:\n"
 196 "    ldr     r7, =0x00024cb8\n"
 197 "    ldr     r0, [r7, #0x18]\n"
 198 "    cbz     r0, loc_fc065b96\n"
 199 "    blx     r0\n"
 200 "loc_fc065b96:\n"
 201 "    add.w   r0, r4, #0x5c\n"
 202 "    mov     r8, r0\n"
 203 "    bl      sub_fc33276c\n"
 204 "    movs    r1, #0\n"
 205 "    bl      sub_fc06e672\n"
 206 "    movs    r1, #0\n"
 207 "    movs    r0, #0x47\n"
 208 "    bl      sub_fc325198\n"
 209 "    ldr     r0, [r4, #0x50]\n"
 210 "    lsls    r0, r0, #0x1f\n"
 211 "    beq     loc_fc065c7e\n"
 212 "    ldr     r0, [r4, #0x10]\n"
 213 "    bl      sub_fc0cb96e\n"
 214 "    ldr     r0, [r4, #0x50]\n"
 215 "    movw    r5, #0x301\n"
 216 "    lsls    r1, r0, #0x1b\n"
 217 "    bpl     loc_fc065bc8\n"
 218 "    movs    r5, #9\n"
 219 "    b       loc_fc065bce\n"
 220 "loc_fc065bc8:\n"
 221 "    lsls    r1, r0, #0x19\n"
 222 "    bpl     loc_fc065bce\n"
 223 "    movs    r5, #1\n"
 224 "loc_fc065bce:\n"
 225 "    lsls    r0, r0, #0x1a\n"
 226 "    bmi     loc_fc065bd8\n"
 227 "    ldr     r0, [r4, #0x58]\n"
 228 "    cmp     r0, #1\n"
 229 "    bne     loc_fc065bdc\n"
 230 "loc_fc065bd8:\n"
 231 "    orr     r5, r5, #0x8000\n"
 232 "loc_fc065bdc:\n"
 233 "    movw    sb, #0x1b6\n"
 234 "    ldr     r6, [r4, #0x10]\n"
 235 "    mov     r2, sb\n"
 236 "    mov     r1, r5\n"
 237 "    mov     r0, r8\n"
 238 //"    bl      sub_fc3329e2\n" // j_Open_FW
 239 "    bl      fwt_open\n" // +
 240 "    adds    r1, r0, #1\n"
 241 "    bne     loc_fc065c2a\n"
 242 "    mov     r0, r8\n"
 243 "    bl      sub_fc332d86\n" // PrepareDirectory_0
 244 "    movs    r2, #0xf\n"
 245 "    mov     r1, r8\n"
 246 "    add     r0, sp, #4\n"
 247 "    blx     sub_fc2cf428\n"
 248 "    movs    r0, #0\n"
 249 "    strb.w  r0, [sp, #0x13]\n"
 250 "    movw    r1, #0x41ff\n"
 251 "    str     r1, [sp, #0x24]\n"
 252 "    strd    r0, r6, [sp, #0x2c]\n"
 253 "    movs    r1, #0x10\n"
 254 "    str     r6, [sp, #0x34]\n"
 255 "    add     r0, sp, #4\n"
 256 "    str     r6, [sp, #0x38]\n"
 257 "    str     r1, [sp, #0x28]\n"
 258 "    add     r1, sp, #0x24\n"
 259 "    bl      sub_fc0fb9da\n"
 260 "    mov     r2, sb\n"
 261 "    mov     r1, r5\n"
 262 "    mov     r0, r8\n"
 263 "    bl      _Open\n" // j_Open_FW
 264 "loc_fc065c2a:\n"
 265 "    mov     r5, r0\n"
 266 "    str     r0, [r7, #4]\n"
 267 "    adds    r0, r0, #1\n"
 268 "    bne     loc_fc065c56\n"
 269 "    movs    r1, #0\n"
 270 "    movs    r0, #0x48\n"
 271 "    bl      sub_fc325198\n" // "DSIC:0x48,0"
 272 "    mov     r0, r8\n"
 273 "    bl      sub_fc33276c\n"
 274 "    ldr     r1, [r7, #0x1c]\n"
 275 "    bl      sub_fc06e6d0\n"
 276 "    ldr     r1, [r7, #0x14]\n"
 277 "    cmp     r1, #0\n"
 278 "    beq     loc_fc065c9c\n"
 279 "    add     sp, #0x3c\n"
 280 "    ldr     r0, =0x09200001\n"
 281 "    pop.w   {r4, r5, r6, r7, r8, sb, lr}\n"
 282 "    bx      r1\n"
 283 "loc_fc065c56:\n"
 284 "    ldr     r0, =0x002013cc\n"
 285 "    movs    r2, #0x20\n"
 286 "    mov     r1, r8\n"
 287 "    blx     sub_fc2cf430\n" // j_dry_memcpy
 288 // TODO looks equivalent to elph130, not verified that it's required
 289 //mod start
 290 "    LDR R3, =current_write_ignored\n"
 291 "    LDR R3, [R3]\n"
 292 "    cbnz r3,loc_C\n" // jump over the next block
 293 //mod end
 294 "    ldr     r0, [r4, #0x50]\n"
 295 "    lsls    r0, r0, #0x18\n"
 296 "    bpl     loc_fc065c7e\n"
 297 "    ldr     r1, [r4, #0xc]\n"
 298 "    mov     r0, r5\n"
 299 "    bl      sub_fc332b9c\n"
 300 "    cbnz    r0, loc_fc065c7c\n"
 301 "    ldr     r0, =0x09200001\n"
 302 "    mov     r1, r4\n"
 303 "    adds    r0, #0x16\n"
 304 "    str     r0, [r4, #0x14]\n"
 305 "    movs    r0, #7\n"
 306 "    b       loc_fc065c94\n"
 307 "loc_fc065c7c:\n"
 308 "    b       loc_fc065c7e\n"
 309 "loc_fc065c7e:\n"
 310 "loc_C:\n"
 311 "    ldr     r0, [r4, #0x50]\n"
 312 "    lsls    r0, r0, #0x19\n"
 313 "    bmi     loc_fc065c88\n"
 314 "    ldr     r0, [r4, #4]\n"
 315 "    cbz     r0, loc_fc065c90\n"
 316 "loc_fc065c88:\n"
 317 "    movs    r0, #9\n"
 318 "    mov     r1, r4\n"
 319 "    bl      sub_fc065b04\n"
 320 "loc_fc065c90:\n"
 321 "    movs    r0, #0\n"
 322 "    mov     r1, r4\n"
 323 "loc_fc065c94:\n"
 324 "    add     sp, #0x3c\n"
 325 "    pop.w   {r4, r5, r6, r7, r8, sb, lr}\n"
 326 //"    bl       sub_fc065b04\n"
 327 "    ldr     pc, =0xfc065b05\n"
 328 "loc_fc065c9c:\n"
 329 "    add     sp, #0x3c\n"
 330 "    pop.w   {r4, r5, r6, r7, r8, sb, pc}\n"
 331 ".ltorg\n"
 332     );
 333 }
 334 // message 0-6 - filewrite chunks
 335 // -s=0xfc0660af -c=65 -f=chdk
 336 void __attribute__((naked,noinline)) sub_fc0660ae_my() {
 337 asm volatile (
 338 "    push.w  {r4, r5, r6, r7, r8, sb, sl, lr}\n"
 339 "    mov     r5, r0\n"
 340 "    ldr     r0, [r0]\n"
 341 "    cmp     r0, #6\n"
 342 "    bhi     loc_fc0660c6\n"
 343 "    add.w   r0, r5, r0, lsl #3\n"
 344 "    ldrd    r7, r6, [r0, #0x18]\n"
 345 "    cbnz    r6, loc_fc0660da\n"
 346 "    b       loc_fc0660d4\n"
 347 "loc_fc0660c6:\n"
 348 "    movw    r2, #0x36d\n"
 349 "    ldr     r1, =0xfc065efc\n" //  *"dwFWrite.c"
 350 "    movs    r0, #0\n"
 351 "    blx     sub_fc2cf408\n" // j_DebugAssert
 352 "loc_fc0660d4:\n"
 353 "    movs    r0, #7\n"
 354 "    mov     r1, r5\n"
 355 "    b       loc_fc06614a\n"
 356 "loc_fc0660da:\n"
 357 "    ldr.w   sl, =0x00024cb8\n"
 358 "    mov.w   sb, #0x1000000\n"
 359 "    mov     r4, r6\n"
 360 "loc_fc0660e4:\n"
 361 "    ldr     r0, [r5, #4]\n"
 362 "    cmp     r4, sb\n"
 363 "    mov     r1, sb\n"
 364 "    bhi     loc_fc0660ee\n"
 365 "    mov     r1, r4\n"
 366 "loc_fc0660ee:\n"
 367 "    lsls    r2, r0, #8\n"
 368 "    beq     loc_fc066100\n"
 369 "    bic     r0, r0, #0xff000000\n"
 370 "    rsb.w   r0, r0, #0x1000000\n"
 371 "    cmp     r1, r0\n"
 372 "    bls     loc_fc066100\n"
 373 "    mov     r1, r0\n"
 374 "loc_fc066100:\n"
 375 "    ldr.w   r0, [sl, #4]\n"
 376 "    mov     r8, r1\n"
 377 "    mov     r2, r1\n"
 378 "    mov     r1, r7\n"
 379 //"    bl      sub_fc332a8a\n" // j_Write_FW
 380 "    bl      fwt_write\n" // +
 381 "    ldr     r1, [r5, #4]\n"
 382 "    cmp     r8, r0\n"
 383 "    add     r1, r0\n"
 384 "    str     r1, [r5, #4]\n"
 385 "    beq     loc_fc06612a\n"
 386 "    adds    r0, r0, #1\n"
 387 "    bne     loc_fc066122\n"
 388 "    ldr     r0, =0x09200006\n"
 389 "    subs    r0, r0, #1\n"
 390 "    b       loc_fc066126\n"
 391 "loc_fc066122:\n"
 392 "    ldr     r0, =0x09200006\n"
 393 "    adds    r0, #0xf\n"
 394 "loc_fc066126:\n"
 395 "    str     r0, [r5, #0x14]\n"
 396 "    b       loc_fc0660d4\n"
 397 "loc_fc06612a:\n"
 398 "    subs    r4, r4, r0\n"
 399 "    cmp     r4, r6\n"
 400 "    add     r7, r0\n"
 401 "    blo     loc_fc066140\n"
 402 "    movw    r2, #0x398\n"
 403 "    ldr     r1, =0xfc065efc\n" //  *"dwFWrite.c"
 404 "    movs    r0, #0\n"
 405 "    blx     sub_fc2cf408\n" // j_DebugAssert
 406 "loc_fc066140:\n"
 407 "    cmp     r4, #0\n"
 408 "    bne     loc_fc0660e4\n"
 409 "    ldr     r0, [r5]\n"
 410 "    mov     r1, r5\n"
 411 "    adds    r0, r0, #1\n"
 412 "loc_fc06614a:\n"
 413 "    pop.w   {r4, r5, r6, r7, r8, sb, sl, lr}\n"
 414 //"    b       sub_fc065b04\n"
 415 "    ldr     pc,=0xfc065b05\n"
 416 ".ltorg\n"
 417     );
 418 }
 419 // message 7 - close
 420 // -s=0xfc065ca3 -c=124 -f=chdk
 421 void __attribute__((naked,noinline)) sub_fc065ca2_my() {
 422 asm volatile (
 423 "    push    {r4, r5, r6, lr}\n"
 424 "    mov     r4, r0\n"
 425 
 426 "    ldr     r0, [r0, #0x50]\n"
 427 "    ldr     r5, =0x00024cb8\n"
 428 "    sub     sp, #0x38\n"
 429 "    lsls    r1, r0, #0x1e\n"
 430 "    bmi     loc_fc065cb6\n"
 431 "    lsls    r0, r0, #0x1c\n"
 432 "    bpl     loc_fc065db4\n"
 433 "    b       loc_fc065cf8\n"
 434 "loc_fc065cb6:\n"
 435 "    lsls    r0, r0, #0x18\n"
 436 "    bpl     loc_fc065cd4\n"
 437 "    ldrd    r1, r0, [r4, #8]\n"
 438 "    cmp     r1, r0\n"
 439 "    beq     loc_fc065cd4\n"
 440 "    ldr     r0, [r5, #4]\n"
 441 "    bl      sub_fc332b9c\n"
 442 "    cbnz    r0, loc_fc065cd0\n"
 443 "    ldr     r0, =0x09200001\n"
 444 "    adds    r0, #0x16\n"
 445 "    str     r0, [r4, #0x14]\n"
 446 "loc_fc065cd0:\n"
 447 "    ldr     r0, [r4, #8]\n"
 448 "    str     r0, [sp, #0x28]\n"
 449 "loc_fc065cd4:\n"
 450 "    ldr     r0, [r5, #4]\n"
 451 "    adds    r1, r0, #1\n"
 452 "    beq     loc_fc065cf8\n"
 453 "    ldr     r6, =0x09200001\n"
 454 "    ldr     r1, [r4, #0x58]\n"
 455 "    adds    r6, r6, #2\n"
 456 "    cmp     r1, #1\n"
 457 "    bne     loc_fc065cea\n"
 458 //mod start
 459 "    LDR R3, =current_write_ignored\n"
 460 "    LDR R3, [R3]\n"
 461 "    cbnz R3,loc_D\n" // jump over the next block
 462 //mod end
 463 "    bl      sub_fc3329e6\n"
 464 "    b       loc_fc065cee\n"
 465 "loc_fc065cea:\n"
 466 "loc_D:\n"
 467 //"    bl      sub_fc3329e4\n" // j_Close_FW
 468 "    bl      fwt_close\n" // +
 469 "loc_fc065cee:\n"
 470 "    cbz     r0, loc_fc065cf2\n"
 471 "    str     r6, [r4, #0x14]\n"
 472 "loc_fc065cf2:\n"
 473 "    mov.w   r0, #-1\n"
 474 "    str     r0, [r5, #4]\n"
 475 "loc_fc065cf8:\n"
 476 "    add.w   r6, r4, #0x5c\n"
 477 "    ldr     r0, [r4, #0x14]\n"
 478 "    lsls    r0, r0, #0x1f\n"
 479 "    bne     loc_fc065d9c\n"
 480 "    ldr     r0, [r4, #0x50]\n"
 481 "    lsls    r1, r0, #0x1f\n"
 482 "    beq     loc_fc065d24\n"
 483 "    movw    r0, #0x81ff\n"
 484 "    str     r0, [sp, #0x20]\n"
 485 "    movs    r0, #0x20\n"
 486 "    str     r0, [sp, #0x24]\n"
 487 "    ldr     r0, [r4, #4]\n"
 488 "    str     r0, [sp, #0x28]\n"
 489 "    ldr     r0, [r4, #0x10]\n"
 490 "    str     r0, [sp, #0x2c]\n"
 491 "    ldr     r0, [r4, #0x10]\n"
 492 "    str     r0, [sp, #0x30]\n"
 493 "    ldr     r0, [r4, #0x10]\n"
 494 "    str     r0, [sp, #0x34]\n"
 495 "    b       loc_fc065d46\n"
 496 "loc_fc065d24:\n"
 497 "    lsls    r0, r0, #0x1b\n"
 498 "    bpl     loc_fc065d46\n"
 499 "    add     r1, sp, #0x20\n"
 500 "    mov     r0, r6\n"
 501 "    bl      sub_fc0fb964\n"
 502 "    cbnz    r0, loc_fc065d3e\n"
 503 "    movs    r0, #0\n"
 504 "    movw    r2, #0x3ee\n"
 505 "    ldr     r1, =0xfc065efc\n" //  *"dwFWrite.c"
 506 "    blx     sub_fc2cf408\n" // j_DebugAssert
 507 "loc_fc065d3e:\n"
 508 "    ldr     r0, [sp, #0x28]\n"
 509 "    ldr     r1, [r4, #4]\n"
 510 "    add     r0, r1\n"
 511 "    str     r0, [sp, #0x28]\n"
 512 "loc_fc065d46:\n"
 513 "    ldr     r0, [r4, #0x50]\n"
 514 "    lsls    r0, r0, #0x19\n"
 515 "    bmi     loc_fc065d54\n"
 516 "    add     r1, sp, #0x20\n"
 517 "    mov     r0, r6\n"
 518 "    bl      sub_fc0fb9da\n"
 519 "loc_fc065d54:\n"
 520 "    ldr     r0, [r4, #0x50]\n"
 521 "    lsls    r0, r0, #0x1a\n"
 522 "    bpl     loc_fc065d9c\n"
 523 "    movs    r2, #0x20\n"
 524 "    mov     r1, r6\n"
 525 "    mov     r0, sp\n"
 526 "    blx     sub_fc2cf430\n" // j_dry_memcpy
 527 "    mov     r0, sp\n"
 528 "    bl      _strlen\n"
 529 "    add     r0, sp, r0\n"
 530 "    movs    r1, #0x54\n"
 531 "    strb    r1, [r0, #-0x3]!\n"
 532 "    movs    r1, #0x4d\n"
 533 "    strb    r1, [r0, #1]\n"
 534 "    movs    r1, #0x50\n"
 535 "    strb    r1, [r0, #2]\n"
 536 "    mov     r1, sp\n"
 537 "    mov     r0, r6\n"
 538 "    bl      sub_fc0cbb46\n"
 539 "    cbnz    r0, loc_fc065d90\n"
 540 "    movs    r0, #0\n"
 541 "    movw    r2, #0x179\n"
 542 "    ldr     r1, =0xfc065efc\n" //  *"dwFWrite.c"
 543 "    blx     sub_fc2cf408\n" // j_DebugAssert
 544 "loc_fc065d90:\n"
 545 "    mov     r0, sp\n"
 546 "    bl      sub_fc0fbccc\n"
 547 "    mov     r0, r6\n"
 548 "    bl      sub_fc0fbccc\n"
 549 "loc_fc065d9c:\n"
 550 "    movs    r1, #0\n"
 551 "    movs    r0, #0x48\n"
 552 "    bl      sub_fc325198\n"
 553 "    mov     r0, r6\n"
 554 "    bl      sub_fc33276c\n"
 555 "    ldr     r1, [r5, #0x1c]\n"
 556 "    bl      sub_fc06e6d0\n"
 557 "    b       loc_fc065db8\n"
 558 "    b       loc_fc065db4\n"
 559 "loc_fc065db4:\n"
 560 "    ldr     r0, [r5, #0x1c]\n"
 561 "    blx     r0\n"
 562 "loc_fc065db8:\n"
 563 "    ldr     r1, [r5, #0x14]\n"
 564 "    cmp     r1, #0\n"
 565 "    beq     loc_fc065dc2\n"
 566 "    ldr     r0, [r4, #0x14]\n"
 567 "    blx     r1\n"
 568 "loc_fc065dc2:\n"
 569 "    add     sp, #0x38\n"
 570 "    pop     {r4, r5, r6, pc}\n"
 571 ".ltorg\n"
 572     );
 573 }
 574 

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