s3c6410 irom 源代码分析

抽空分析了一下IROM booting的细节。用注释的形式加在源代码里面了,大家将就着看。S3C6410的IROM支持从SD/MMC, NAND, OneNAND多种设备启动。同时支持secure boot模式。用来为设备提供更好的安全性。

 

几个心得:

 

1. how the efuse genrate random key

   when the irom verify BL1, it will read the random key from address 0x7e00d000.

   I guess the random key is genrated by A/D on XEFFVDD pin. 

 

2. how to enable/disable secure booting.

    secure booting mode base on the random key on address 0x7e00d000.

    Ground XEFFVDD will disable the random key genrator. the data read from 0x7e00d000 is zero.

    Keep the XEFFVD open, or give XEFFVDD a random votage will enable the secure booting mode.

 

3. sd boot

    the irom will copy 8K+512Bytes from sd card to 0x0c000000-0x0c002200.

    the extra 512bytes data contain the signature for secure booting. there are two keys in the signatur.

    key1 at 0x0c002104,

    key2 at 0x0c002188,

 


    the matching algorithm in irom is:

    key = foo(key1);

    if( key == key2)

    {

        jump_to_BL1;

    }

 

 

Suggestion:

1. Be careful to use secure booting mode, because Samsung didn't open the detials.

 

源代码在这里: <转载请注明出处>
//
//  s3c6410 IROM source code.
//  dumping from s3c6410.
//  disassemble and comment by: Yujiang Zheng
//

reset_vector: 0x0: ea00002b b 0xb4 0x4: ea000006 b 0x24 0x8: ea00000b b 0x3c 0xc: ea000010 b 0x54 0x10: ea000015 b 0x6c 0x14: eafffffe b 0x14 0x18: ea000019 b 0x84 0x1c: ea00001e b 0x9c 0x20: eafffffe b 0x20 0x24: e24dd004 sub sp, sp, #4 ; 0x4 0x28: e92d0001 push {r0} 0x2c: e59f02ac ldr r0, [pc, #684] ; 0x2e0 0x30: e5900000 ldr r0, [r0] 0x34: e58d0004 str r0, [sp, #4] 0x38: e8bd8001 pop {r0, pc} 0x3c: e24dd004 sub sp, sp, #4 ; 0x4 0x40: e92d0001 push {r0} 0x44: e59f0298 ldr r0, [pc, #664] ; 0x2e4 0x48: e5900000 ldr r0, [r0] 0x4c: e58d0004 str r0, [sp, #4] 0x50: e8bd8001 pop {r0, pc} 0x54: e24dd004 sub sp, sp, #4 ; 0x4 0x58: e92d0001 push {r0} 0x5c: e59f0284 ldr r0, [pc, #644] ; 0x2e8 0x60: e5900000 ldr r0, [r0] 0x64: e58d0004 str r0, [sp, #4] 0x68: e8bd8001 pop {r0, pc} 0x6c: e24dd004 sub sp, sp, #4 ; 0x4 0x70: e92d0001 push {r0} 0x74: e59f0270 ldr r0, [pc, #624] ; 0x2ec 0x78: e5900000 ldr r0, [r0] 0x7c: e58d0004 str r0, [sp, #4] 0x80: e8bd8001 pop {r0, pc} 0x84: e24dd004 sub sp, sp, #4 ; 0x4 0x88: e92d0001 push {r0} 0x8c: e59f025c ldr r0, [pc, #604] ; 0x2f0 0x90: e5900000 ldr r0, [r0] 0x94: e58d0004 str r0, [sp, #4] 0x98: e8bd8001 pop {r0, pc} 0x9c: e24dd004 sub sp, sp, #4 ; 0x4 0xa0: e92d0001 push {r0} 0xa4: e59f0248 ldr r0, [pc, #584] ; 0x2f4 0xa8: e5900000 ldr r0, [r0] 0xac: e58d0004 str r0, [sp, #4] 0xb0: e8bd8001 pop {r0, pc} irom_entry: // // Write Peripheral Port Memory Remap Register // 0xb4: e59f023c ldr r0, [pc, #572] ; 0x2f8 0xb8: ee0f0f92 mcr 15, 0, r0, c15, c2, {4} // // Trun off watchdog // 0xbc: e59f0238 ldr r0, [pc, #568] ; 0x2fc 0xc0: e3a01000 mov r1, #0 ; 0x0 0xc4: e5801000 str r1, [r0] // // TCM init // 0xc8: e3a00000 mov r0, #0 ; 0x0 0xcc: ee191f12 mrc 15, 0, r1, c9, c2, {0} 0xd0: e3c11001 bic r1, r1, #1 ; 0x1 0xd4: e1811000 orr r1, r1, r0 0xd8: ee091f12 mcr 15, 0, r1, c9, c2, {0} 0xdc: e59f021c ldr r0, [pc, #540] ; 0x300 0xe0: ee191f11 mrc 15, 0, r1, c9, c1, {0} 0xe4: e59f2218 ldr r2, [pc, #536] ; 0x304 0xe8: e1c11002 bic r1, r1, r2 0xec: e59f3214 ldr r3, [pc, #532] ; 0x308 0xf0: e1c00003 bic r0, r0, r3 0xf4: e1811000 orr r1, r1, r0 0xf8: ee091f11 mcr 15, 0, r1, c9, c1, {0} 0xfc: ee190f11 mrc 15, 0, r0, c9, c1, {0} 0x100: e3800001 orr r0, r0, #1 ; 0x1 0x104: ee090f11 mcr 15, 0, r0, c9, c1, {0} 0x108: e3a00001 mov r0, #1 ; 0x1 0x10c: ee191f12 mrc 15, 0, r1, c9, c2, {0} 0x110: e3c11001 bic r1, r1, #1 ; 0x1 0x114: e1811000 orr r1, r1, r0 0x118: ee091f12 mcr 15, 0, r1, c9, c2, {0} 0x11c: e59f01e8 ldr r0, [pc, #488] ; 0x30c 0x120: ee191f11 mrc 15, 0, r1, c9, c1, {0} 0x124: e59f21d8 ldr r2, [pc, #472] ; 0x304 0x128: e1c11002 bic r1, r1, r2 0x12c: e59f31d4 ldr r3, [pc, #468] ; 0x308 0x130: e1c00003 bic r0, r0, r3 0x134: e1811000 orr r1, r1, r0 0x138: ee091f11 mcr 15, 0, r1, c9, c1, {0} 0x13c: ee190f11 mrc 15, 0, r0, c9, c1, {0} 0x140: e3800001 orr r0, r0, #1 ; 0x1 0x144: ee090f11 mcr 15, 0, r0, c9, c1, {0} 0x148: eb000424 bl copy_function_table_init // // SVC mode // 0x14c: e321f0d3 msr CPSR_c, #211 ; 0xd3 // // sp = 0c005ffc // 0x150: e59fd1b8 ldr sp, [pc, #440] ; 0x310 check_if_wakeup_from_sleep: 0x154: e59f01b8 ldr r0, [pc, #440] ; 0x314 0x158: e5900000 ldr r0, [r0] 0x15c: e3a01003 mov r1, #3 ; 0x3 0x160: e00102a0 and r0, r1, r0, lsr #5 0x164: e3500002 cmp r0, #2 ; 0x2 0x168: 0a0010eb beq jump_to_stepingldr0 // // set GPN13,14,15 as input // 0x16c: e59f01a4 ldr r0, [pc, #420] ; 0x318 0x170: e5901000 ldr r1, [r0] 0x174: e3c1133f bic r1, r1, #-67108864 ; 0xfc000000 0x178: e5801000 str r1, [r0] // // disable GPN13,14,15 pull up/down // 0x17c: e5901008 ldr r1, [r0, #8] 0x180: e3c1133f bic r1, r1, #-67108864 ; 0xfc000000 0x184: e5801008 str r1, [r0, #8] // // APLL_CLOCK = 0x00001770 // MPLL_CLOCK = 0x00001770 // EPLL_CLOCK = 0x00001770 // 0x188: e59f118c ldr r1, [pc, #396] ; 0x31c 0x18c: e59f018c ldr r0, [pc, #396] ; 0x320 0x190: e5801000 str r1, [r0] 0x194: e5801004 str r1, [r0, #4] 0x198: e59f117c ldr r1, [pc, #380] ; 0x31c 0x19c: e5801008 str r1, [r0, #8] // // CLK_DIV0 = (CLK_DIV0 & ~0x0003ffff) | 0x00007110 // 0x1a0: e5901020 ldr r1, [r0, #32] 0x1a4: e3c11803 bic r1, r1, #196608 ; 0x30000 0x1a8: e3c11cff bic r1, r1, #65280 ; 0xff00 0x1ac: e3c110ff bic r1, r1, #255 ; 0xff 0x1b0: e59f216c ldr r2, [pc, #364] ; 0x324 0x1b4: e1811002 orr r1, r1, r2 0x1b8: e5801020 str r1, [r0, #32] // // APLL_CON = 0x80dc0302 // 0x1bc: e59f1164 ldr r1, [pc, #356] ; 0x328 0x1c0: e580100c str r1, [r0, #12] // // MPLL_CON = 0x80dc0303 // 0x1c4: e59f1160 ldr r1, [pc, #352] ; 0x32c 0x1c8: e5801010 str r1, [r0, #16] // // EPLL_CON0 = 0x803c0204 // 0x1cc: e59f115c ldr r1, [pc, #348] ; 0x330 0x1d0: e5801014 str r1, [r0, #20] // // EPLL_CON1 = 0 // 0x1d4: e3a01000 mov r1, #0 ; 0x0 0x1d8: e5801018 str r1, [r0, #24] // // CLK_SRC = CLK_SRC | 0x7 // 0x1dc: e590101c ldr r1, [r0, #28] 0x1e0: e3811007 orr r1, r1, #7 ; 0x7 0x1e4: e580101c str r1, [r0, #28] // // enable i-cache // 0x1e8: ee110f10 mrc 15, 0, r0, c1, c0, {0} 0x1ec: e3800a01 orr r0, r0, #4096 ; 0x1000 0x1f0: ee010f10 mcr 15, 0, r0, c1, c0, {0} // // init global variable // copy data from address 0x477c-xx to 0x0c003000-0x0c003050 // 0x1f4: e59f0138 ldr r0, [pc, #312] ; 0x334 0x1f8: e59f1138 ldr r1, [pc, #312] ; 0x338 0x1fc: e59f3138 ldr r3, [pc, #312] ; 0x33c 0x200: e1500001 cmp r0, r1 0x204: 0a000003 beq 0x218 0x208: e1510003 cmp r1, r3 0x20c: 34902004 ldrcc r2, [r0], #4 0x210: 34812004 strcc r2, [r1], #4 0x214: 3afffffb bcc 0x208 // // clear bss. // zero 0x0c003050-0x0c0030a0 // 0x218: e59f1120 ldr r1, [pc, #288] ; 0x340 0x21c: e3a02000 mov r2, #0 ; 0x0 0x220: e1530001 cmp r3, r1 0x224: 34832004 strcc r2, [r3], #4 0x228: 3afffffc bcc 0x220 boot_mode_dispatch: // // IF GPN15,14,13 == 000, call load_BL1_from_sdmmc(0) // IF GPN15,14,13 == 111, call load_BL1_from_sdmmc(1) // 0x22c: e59f00e4 ldr r0, [pc, #228] ; 0x318 0x230: e5901004 ldr r1, [r0, #4] 0x234: e3a02007 mov r2, #7 ; 0x7 0x238: e00216a1 and r1, r2, r1, lsr #13 0x23c: e3510000 cmp r1, #0 ; 0x0 0x240: 03a00000 moveq r0, #0 ; 0x0 0x244: 0a000006 beq load_BL1_from_sdmmc 0x248: e3510007 cmp r1, #7 ; 0x7 0x24c: 03a00001 moveq r0, #1 ; 0x1 0x250: 0a000003 beq load_BL1_from_sdmmc // // IF GPN15,14,13 == 001, call load_BL1_from_onenand(1) // 0x254: e3510001 cmp r1, #1 ; 0x1 0x258: 0a000003 beq load_BL1_from_onenand 0x25c: eb0007a7 bl load_BL1_from_nand 0x260: ea000007 b check_sleep_wakeup load_BL1_from_sdmmc: 0x264: eb000727 bl sd_load 0x268: ea000005 b check_sleep_wakeup load_BL1_from_onenand: 0x26c: e59f00d0 ldr r0, [pc, #208] ; 0x344 0x270: e5901000 ldr r1, [r0] 0x274: e3110a01 tst r1, #4096 ; 0x1000 0x278: 0afffffb beq 0x26c 0x27c: e3a00000 mov r0, #0 ; 0x0 0x280: eb00024f bl 0xbc4 check_sleep_wakeup: 0x284: e59f00bc ldr r0, [pc, #188] ; 0x348 0x288: e5900000 ldr r0, [r0] 0x28c: e3100008 tst r0, #8 ; 0x8 0x290: 1a0010a3 bne jump_to_stepingldr1 call_verify_BL1: 0x294: eb000411 bl verify_BL1 0x298: e3500000 cmp r0, #0 ; 0x0 0x29c: 1affff84 bne 0xb4 stepingldr2: 0x2a0: ea0010a1 b jump_to_stepingldr2 dead_loop: 0x2a4: eafffffe b 0x2a4 mem_copy_2048_s: 0x2a8: e92d5e0f push {r0, r1, r2, r3, r9, sl, fp, ip, lr} 0x2ac: e3a03080 mov r3, #128 ; 0x80 copy_loop0: 0x2b0: e8911e00 ldm r1, {r9, sl, fp, ip} 0x2b4: e8a21e00 stmia r2!, {r9, sl, fp, ip} 0x2b8: e2533001 subs r3, r3, #1 ; 0x1 0x2bc: 1afffffb bne copy_loop0 0x2c0: e8bd9e0f pop {r0, r1, r2, r3, r9, sl, fp, ip, pc} mem_copy_2048_f: 0x2c4: e92d5fef push {r0, r1, r2, r3, r5, r6, r7, r8, r9, sl, fp, ip, lr} 0x2c8: e3a03040 mov r3, #64 ; 0x40 copy_loop1: 0x2cc: e8911fe0 ldm r1, {r5, r6, r7, r8, r9, sl, fp, ip} 0x2d0: e8a21fe0 stmia r2!, {r5, r6, r7, r8, r9, sl, fp, ip} 0x2d4: e2533001 subs r3, r3, #1 ; 0x1 0x2d8: 1afffffb bne copy_loop1 0x2dc: e8bd9fef pop {r0, r1, r2, r3, r5, r6, r7, r8, r9, sl, fp, ip, pc} 0x2e0: 0c001fe4 stceq 15, c1, [r0], {228} 0x2e4: 0c001fe8 stceq 15, c1, [r0], {232} 0x2e8: 0c001fec stceq 15, c1, [r0], {236} 0x2ec: 0c001ff0 stceq 15, c1, [r0], {240} 0x2f0: 0c001ff8 stceq 15, c1, [r0], {248} 0x2f4: 0c001ffc stceq 15, c1, [r0], {252} 0x2f8: 70000013 andvc r0, r0, r3, lsl r0 0x2fc: 7e004000 cdpvc 0, 0, c4, c0, c0, {0} 0x300: 0c002000 stceq 0, c2, [r0], {0} 0x304: fffff000 undefined instruction 0xfffff000 0x308: 00000fff strdeq r0, [r0], -pc 0x30c: 0c004000 stceq 0, c4, [r0], {0} 0x310: 0c005ffc stceq 15, c5, [r0], {252} 0x314: 7e00f804 cdpvc 8, 0, c15, c0, c4, {0} 0x318: 7f008830 svcvc 0x00008830 0x31c: 00001770 andeq r1, r0, r0, ror r7 0x320: 7e00f000 cdpvc 0, 0, c15, c0, c0, {0} 0x324: 00007110 andeq r7, r0, r0, lsl r1 0x328: 80dc0302 sbcshi r0, ip, r2, lsl #6 0x32c: 80dc0303 sbcshi r0, ip, r3, lsl #6 0x330: 803c0204 eorshi r0, ip, r4, lsl #4 0x334: 0000477c andeq r4, r0, ip, ror r7 0x338: 0c003000 stceq 0, c3, [r0], {0} 0x33c: 0c003050 stceq 0, c3, [r0], {80} 0x340: 0c0030a0 stceq 0, c3, [r0], {160} 0x344: 70100030 andsvc r0, r0, r0, lsr r0 0x348: 7e00f904 cdpvc 9, 0, c15, c0, c4, {0} 0x34c: e3a03001 mov r3, #1 ; 0x1 0x350: e3a02000 mov r2, #0 ; 0x0 0x354: e1520001 cmp r2, r1 0x358: 32822001 addcc r2, r2, #1 ; 0x1 0x35c: 30030390 mulcc r3, r0, r3 0x360: 3afffffb bcc 0x354 0x364: e1a00003 mov r0, r3 0x368: e12fff1e bx lr 0x36c: e59fc8ac ldr ip, [pc, #2220] ; 0xc20 0x370: e52de004 push {lr} ; (str lr, [sp, #-4]!) 0x374: e79c2100 ldr r2, [ip, r0, lsl #2] 0x378: e5923000 ldr r3, [r2] 0x37c: e1a0e001 mov lr, r1 0x380: e35e0005 cmp lr, #5 ; 0x5 0x384: e3c33c8e bic r3, r3, #36352 ; 0x8e00 0x388: e3c33002 bic r3, r3, #2 ; 0x2 0x38c: e3a01010 mov r1, #16 ; 0x10 0x390: 908ff10e addls pc, pc, lr, lsl #2 0x394: ea000017 b 0x3f8 0x398: ea000016 b 0x3f8 0x39c: ea000003 b 0x3b0 0x3a0: ea000004 b 0x3b8 0x3a4: ea000006 b 0x3c4 0x3a8: ea00000b b 0x3dc 0x3ac: ea00000c b 0x3e4 0x3b0: e3833902 orr r3, r3, #32768 ; 0x8000 0x3b4: ea00000b b 0x3e8 0x3b8: e3831c82 orr r1, r3, #33280 ; 0x8200 0x3bc: e3a03004 mov r3, #4 ; 0x4 0x3c0: ea000001 b 0x3cc 0x3c4: e3831b21 orr r1, r3, #33792 ; 0x8400 0x3c8: e3a03008 mov r3, #8 ; 0x8 0x3cc: e5823010 str r3, [r2, #16] 0x3d0: e79c0100 ldr r0, [ip, r0, lsl #2] 0x3d4: e5801000 str r1, [r0] 0x3d8: e49df004 pop {pc} ; (ldr pc, [sp], #4) 0x3dc: e3833c86 orr r3, r3, #34304 ; 0x8600 0x3e0: ea000000 b 0x3e8 0x3e4: e3833b22 orr r3, r3, #34816 ; 0x8800 0x3e8: e5821010 str r1, [r2, #16] 0x3ec: e79c0100 ldr r0, [ip, r0, lsl #2] 0x3f0: e5803000 str r3, [r0] 0x3f4: e49df004 pop {pc} ; (ldr pc, [sp], #4) 0x3f8: e3a01000 mov r1, #0 ; 0x0 0x3fc: eafffff9 b 0x3e8 0x400: e59f2818 ldr r2, [pc, #2072] ; 0xc20 0x404: e7920100 ldr r0, [r2, r0, lsl #2] 0x408: e5902000 ldr r2, [r0] 0x40c: e3c22a07 bic r2, r2, #28672 ; 0x7000 0x410: e1821601 orr r1, r2, r1, lsl #12 0x414: e5801000 str r1, [r0] 0x418: e12fff1e bx lr 0x41c: e59f27fc ldr r2, [pc, #2044] ; 0xc20 0x420: e7922100 ldr r2, [r2, r0, lsl #2] 0x424: e5920000 ldr r0, [r2] 0x428: e3100020 tst r0, #32 ; 0x20 0x42c: 03c000e0 biceq r0, r0, #224 ; 0xe0 0x430: 01800281 orreq r0, r0, r1, lsl #5 0x434: 038000c0 orreq r0, r0, #192 ; 0xc0 0x438: 05820000 streq r0, [r2] 0x43c: e12fff1e bx lr 0x440: e59f27d8 ldr r2, [pc, #2008] ; 0xc20 0x444: e7922100 ldr r2, [r2, r0, lsl #2] 0x448: e5920000 ldr r0, [r2] 0x44c: e3510000 cmp r1, #0 ; 0x0 0x450: 1a000003 bne 0x464 0x454: e3100c01 tst r0, #256 ; 0x100 0x458: 012fff1e bxeq lr 0x45c: e3c00c01 bic r0, r0, #256 ; 0x100 0x460: ea000003 b 0x474 0x464: e3510001 cmp r1, #1 ; 0x1 0x468: 03100c01 tsteq r0, #256 ; 0x100 0x46c: 112fff1e bxne lr 0x470: e3800c01 orr r0, r0, #256 ; 0x100 0x474: e5820000 str r0, [r2] 0x478: e12fff1e bx lr 0x47c: e59f279c ldr r2, [pc, #1948] ; 0xc20 0x480: e2011001 and r1, r1, #1 ; 0x1 0x484: e7920100 ldr r0, [r2, r0, lsl #2] 0x488: e58011a0 str r1, [r0, #416] 0x48c: e12fff1e bx lr 0x490: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 0x494: e59f2784 ldr r2, [pc, #1924] ; 0xc20 0x498: e7921100 ldr r1, [r2, r0, lsl #2] 0x49c: e5913080 ldr r3, [r1, #128] 0x4a0: e20330f0 and r3, r3, #240 ; 0xf0 0x4a4: e1a0a223 lsr sl, r3, #4 0x4a8: e5913080 ldr r3, [r1, #128] 0x4ac: e59fb770 ldr fp, [pc, #1904] ; 0xc24 0x4b0: e2033008 and r3, r3, #8 ; 0x8 0x4b4: e2825018 add r5, r2, #24 ; 0x18 0x4b8: e080c100 add ip, r0, r0, lsl #2 0x4bc: e35a0005 cmp sl, #5 ; 0x5 0x4c0: e2456008 sub r6, r5, #8 ; 0x8 0x4c4: e1a0e1a3 lsr lr, r3, #3 0x4c8: e3a0300c mov r3, #12 ; 0xc 0x4cc: e2467008 sub r7, r6, #8 ; 0x8 0x4d0: e3a0403f mov r4, #63 ; 0x3f 0x4d4: e3a08000 mov r8, #0 ; 0x0 0x4d8: e3a09006 mov r9, #6 ; 0x6 0x4dc: e08bc18c add ip, fp, ip, lsl #3 0x4e0: 908ff10a addls pc, pc, sl, lsl #2 0x4e4: ea00001d b 0x560 0x4e8: ea000004 b 0x500 0x4ec: ea000014 b 0x544 0x4f0: ea00002e b 0x5b0 0x4f4: ea00003e b 0x5f4 0x4f8: ea000054 b 0x650 0x4fc: ea000069 b 0x6a8 0x500: e3a0e008 mov lr, #8 ; 0x8 0x504: e581e0d0 str lr, [r1, #208] 0x508: e7921100 ldr r1, [r2, r0, lsl #2] 0x50c: e58190e0 str r9, [r1, #224] 0x510: e792e100 ldr lr, [r2, r0, lsl #2] 0x514: e3a01001 mov r1, #1 ; 0x1 0x518: e58e10f0 str r1, [lr, #240] 0x51c: e7921100 ldr r1, [r2, r0, lsl #2] 0x520: e5818160 str r8, [r1, #352] 0x524: e7873100 str r3, [r7, r0, lsl #2] 0x528: e3a010ff mov r1, #255 ; 0xff 0x52c: e7869100 str r9, [r6, r0, lsl #2] 0x530: e7851100 str r1, [r5, r0, lsl #2] 0x534: e59f16ec ldr r1, [pc, #1772] ; 0xc28 0x538: e7814100 str r4, [r1, r0, lsl #2] 0x53c: e3a01c01 mov r1, #256 ; 0x100 0x540: ea000005 b 0x55c 0x544: e3a0e009 mov lr, #9 ; 0x9 0x548: e581e0d0 str lr, [r1, #208] 0x54c: e7921100 ldr r1, [r2, r0, lsl #2] 0x550: e58190e0 str r9, [r1, #224] 0x554: e3a01001 mov r1, #1 ; 0x1 0x558: ea000019 b 0x5c4 0x55c: e58c101c str r1, [ip, #28] 0x560: e3500000 cmp r0, #0 ; 0x0 0x564: 1a00000b bne 0x598 0x568: e59f36bc ldr r3, [pc, #1724] ; 0xc2c 0x56c: e3a01202 mov r1, #536870912 ; 0x20000000 0x570: e5831000 str r1, [r3] 0x574: e2833008 add r3, r3, #8 ; 0x8 0x578: e3a01421 mov r1, #553648128 ; 0x21000000 0x57c: e5831000 str r1, [r3] 0x580: e2833008 add r3, r3, #8 ; 0x8 0x584: e3a01422 mov r1, #570425344 ; 0x22000000 0x588: e5831000 str r1, [r3] 0x58c: e2833008 add r3, r3, #8 ; 0x8 0x590: e3a01423 mov r1, #587202560 ; 0x23000000 0x594: e5831000 str r1, [r3] 0x598: e7920100 ldr r0, [r2, r0, lsl #2] 0x59c: e59010e0 ldr r1, [r0, #224] 0x5a0: e3a00002 mov r0, #2 ; 0x2 0x5a4: ebffff68 bl 0x34c 0x5a8: e58c0020 str r0, [ip, #32] 0x5ac: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0x5b0: e3a0e009 mov lr, #9 ; 0x9 0x5b4: e581e0d0 str lr, [r1, #208] 0x5b8: e7921100 ldr r1, [r2, r0, lsl #2] 0x5bc: e58190e0 str r9, [r1, #224] 0x5c0: e3a01002 mov r1, #2 ; 0x2 0x5c4: e792e100 ldr lr, [r2, r0, lsl #2] 0x5c8: e58e10f0 str r1, [lr, #240] 0x5cc: e7921100 ldr r1, [r2, r0, lsl #2] 0x5d0: e5818160 str r8, [r1, #352] 0x5d4: e59f1654 ldr r1, [pc, #1620] ; 0xc30 0x5d8: e7873100 str r3, [r7, r0, lsl #2] 0x5dc: e7869100 str r9, [r6, r0, lsl #2] 0x5e0: e7851100 str r1, [r5, r0, lsl #2] 0x5e4: e59f163c ldr r1, [pc, #1596] ; 0xc28 0x5e8: e7814100 str r4, [r1, r0, lsl #2] 0x5ec: e3a01c02 mov r1, #512 ; 0x200 0x5f0: eaffffd9 b 0x55c 0x5f4: e58190e0 str r9, [r1, #224] 0x5f8: e792a100 ldr sl, [r2, r0, lsl #2] 0x5fc: e3a01002 mov r1, #2 ; 0x2 0x600: e58a10f0 str r1, [sl, #240] 0x604: e35e0000 cmp lr, #0 ; 0x0 0x608: 17921100 ldrne r1, [r2, r0, lsl #2] 0x60c: 13a0e009 movne lr, #9 ; 0x9 0x610: 03a0100a moveq r1, #10 ; 0xa 0x614: 1581e0d0 strne lr, [r1, #208] 0x618: e792e100 ldr lr, [r2, r0, lsl #2] 0x61c: 13a01001 movne r1, #1 ; 0x1 0x620: 058e10d0 streq r1, [lr, #208] 0x624: 07921100 ldreq r1, [r2, r0, lsl #2] 0x628: 05818160 streq r8, [r1, #352] 0x62c: 158e1160 strne r1, [lr, #352] 0x630: e59f15fc ldr r1, [pc, #1532] ; 0xc34 0x634: e7873100 str r3, [r7, r0, lsl #2] 0x638: e7869100 str r9, [r6, r0, lsl #2] 0x63c: e7851100 str r1, [r5, r0, lsl #2] 0x640: e59f15e0 ldr r1, [pc, #1504] ; 0xc28 0x644: e7814100 str r4, [r1, r0, lsl #2] 0x648: e3a01b01 mov r1, #1024 ; 0x400 0x64c: eaffffc2 b 0x55c 0x650: e58190e0 str r9, [r1, #224] 0x654: e792a100 ldr sl, [r2, r0, lsl #2] 0x658: e3a01002 mov r1, #2 ; 0x2 0x65c: e58a10f0 str r1, [sl, #240] 0x660: e35e0000 cmp lr, #0 ; 0x0 0x664: e792e100 ldr lr, [r2, r0, lsl #2] 0x668: 03a0100b moveq r1, #11 ; 0xb 0x66c: 13a0100a movne r1, #10 ; 0xa 0x670: e58e10d0 str r1, [lr, #208] 0x674: 07921100 ldreq r1, [r2, r0, lsl #2] 0x678: 05818160 streq r8, [r1, #352] 0x67c: 1792e100 ldrne lr, [r2, r0, lsl #2] 0x680: 13a01001 movne r1, #1 ; 0x1 0x684: 158e1160 strne r1, [lr, #352] 0x688: e59f15a8 ldr r1, [pc, #1448] ; 0xc38 0x68c: e7873100 str r3, [r7, r0, lsl #2] 0x690: e7869100 str r9, [r6, r0, lsl #2] 0x694: e7851100 str r1, [r5, r0, lsl #2] 0x698: e59f1588 ldr r1, [pc, #1416] ; 0xc28 0x69c: e7814100 str r4, [r1, r0, lsl #2] 0x6a0: e3a01b02 mov r1, #2048 ; 0x800 0x6a4: eaffffac b 0x55c 0x6a8: e58190e0 str r9, [r1, #224] 0x6ac: e792a100 ldr sl, [r2, r0, lsl #2] 0x6b0: e3a01002 mov r1, #2 ; 0x2 0x6b4: e58a10f0 str r1, [sl, #240] 0x6b8: e35e0000 cmp lr, #0 ; 0x0 0x6bc: 07921100 ldreq r1, [r2, r0, lsl #2] 0x6c0: 058130d0 streq r3, [r1, #208] 0x6c4: 07921100 ldreq r1, [r2, r0, lsl #2] 0x6c8: 05818160 streq r8, [r1, #352] 0x6cc: 1792e100 ldrne lr, [r2, r0, lsl #2] 0x6d0: 13a0100b movne r1, #11 ; 0xb 0x6d4: 158e10d0 strne r1, [lr, #208] 0x6d8: 1792e100 ldrne lr, [r2, r0, lsl #2] 0x6dc: 13a01001 movne r1, #1 ; 0x1 0x6e0: 158e1160 strne r1, [lr, #352] 0x6e4: e59f1550 ldr r1, [pc, #1360] ; 0xc3c 0x6e8: e7873100 str r3, [r7, r0, lsl #2] 0x6ec: e7869100 str r9, [r6, r0, lsl #2] 0x6f0: e7851100 str r1, [r5, r0, lsl #2] 0x6f4: e59f152c ldr r1, [pc, #1324] ; 0xc28 0x6f8: e7814100 str r4, [r1, r0, lsl #2] 0x6fc: e3a01a01 mov r1, #4096 ; 0x1000 0x700: eaffff95 b 0x55c 0x704: e59f1514 ldr r1, [pc, #1300] ; 0xc20 0x708: e7911100 ldr r1, [r1, r0, lsl #2] 0x70c: e5913070 ldr r3, [r1, #112] 0x710: e59f250c ldr r2, [pc, #1292] ; 0xc24 0x714: e0800100 add r0, r0, r0, lsl #2 0x718: e7823180 str r3, [r2, r0, lsl #3] 0x71c: e5913080 ldr r3, [r1, #128] 0x720: e0820180 add r0, r2, r0, lsl #3 0x724: e5803004 str r3, [r0, #4] 0x728: e5912090 ldr r2, [r1, #144] 0x72c: e5802008 str r2, [r0, #8] 0x730: e59120a0 ldr r2, [r1, #160] 0x734: e580200c str r2, [r0, #12] 0x738: e59120b0 ldr r2, [r1, #176] 0x73c: e5802010 str r2, [r0, #16] 0x740: e59120c0 ldr r2, [r1, #192] 0x744: e5802014 str r2, [r0, #20] 0x748: e59111f0 ldr r1, [r1, #496] 0x74c: e5801018 str r1, [r0, #24] 0x750: e12fff1e bx lr 0x754: e59f24c4 ldr r2, [pc, #1220] ; 0xc20 0x758: e3a01007 mov r1, #7 ; 0x7 0x75c: e7920100 ldr r0, [r2, r0, lsl #2] 0x760: e58011c0 str r1, [r0, #448] 0x764: e12fff1e bx lr 0x768: e92d4030 push {r4, r5, lr} 0x76c: e1b04000 movs r4, r0 0x770: 13a00000 movne r0, #0 ; 0x0 0x774: 18bd8030 popne {r4, r5, pc} 0x778: e3a01007 mov r1, #7 ; 0x7 0x77c: e59f549c ldr r5, [pc, #1180] ; 0xc20 0x780: e59f04b8 ldr r0, [pc, #1208] ; 0xc40 0x784: e5850000 str r0, [r5] 0x788: e58011c0 str r1, [r0, #448] 0x78c: e1a00004 mov r0, r4 0x790: ebffffdb bl 0x704 0x794: e1a00004 mov r0, r4 0x798: ebffff3c bl 0x490 0x79c: e5951000 ldr r1, [r5] 0x7a0: e3a00001 mov r0, #1 ; 0x1 0x7a4: e58101a0 str r0, [r1, #416] 0x7a8: e3a01000 mov r1, #0 ; 0x0 0x7ac: e1a00004 mov r0, r4 0x7b0: ebffff22 bl 0x440 0x7b4: e3a01001 mov r1, #1 ; 0x1 0x7b8: e1a00004 mov r0, r4 0x7bc: ebffff16 bl 0x41c 0x7c0: e3a01004 mov r1, #4 ; 0x4 0x7c4: e1a00004 mov r0, r4 0x7c8: ebffff0c bl 0x400 0x7cc: e3a01004 mov r1, #4 ; 0x4 0x7d0: e1a00004 mov r0, r4 0x7d4: ebfffee4 bl 0x36c 0x7d8: e3a00001 mov r0, #1 ; 0x1 0x7dc: e8bd8030 pop {r4, r5, pc} 0x7e0: e59f245c ldr r2, [pc, #1116] ; 0xc44 0x7e4: e5920020 ldr r0, [r2, #32] 0x7e8: e3c00803 bic r0, r0, #196608 ; 0x30000 0x7ec: e1800801 orr r0, r0, r1, lsl #16 0x7f0: e5820020 str r0, [r2, #32] 0x7f4: e12fff1e bx lr 0x7f8: e59f1420 ldr r1, [pc, #1056] ; 0xc20 0x7fc: e7910100 ldr r0, [r1, r0, lsl #2] 0x800: e5900000 ldr r0, [r0] 0x804: e12fff1e bx lr 0x808: e59f1410 ldr r1, [pc, #1040] ; 0xc20 0x80c: e7910100 ldr r0, [r1, r0, lsl #2] 0x810: e5900010 ldr r0, [r0, #16] 0x814: e12fff1e bx lr 0x818: e59f2400 ldr r2, [pc, #1024] ; 0xc20 0x81c: e7920100 ldr r0, [r2, r0, lsl #2] 0x820: e5801050 str r1, [r0, #80] 0x824: e12fff1e bx lr 0x828: e59f13f0 ldr r1, [pc, #1008] ; 0xc20 0x82c: e7910100 ldr r0, [r1, r0, lsl #2] 0x830: e5900030 ldr r0, [r0, #48] 0x834: e1a00900 lsl r0, r0, #18 0x838: e1a00920 lsr r0, r0, #18 0x83c: e12fff1e bx lr 0x840: e59fc400 ldr ip, [pc, #1024] ; 0xc48 0x844: e79cc100 ldr ip, [ip, r0, lsl #2] 0x848: e00c1001 and r1, ip, r1 0x84c: e59fc3f8 ldr ip, [pc, #1016] ; 0xc4c 0x850: e79cc100 ldr ip, [ip, r0, lsl #2] 0x854: e1a01c11 lsl r1, r1, ip 0x858: e59fc3f0 ldr ip, [pc, #1008] ; 0xc50 0x85c: e79cc100 ldr ip, [ip, r0, lsl #2] 0x860: e081100c add r1, r1, ip 0x864: e59fc3bc ldr ip, [pc, #956] ; 0xc28 0x868: e79cc100 ldr ip, [ip, r0, lsl #2] 0x86c: e00c2002 and r2, ip, r2 0x870: e59fc3dc ldr ip, [pc, #988] ; 0xc54 0x874: e79c0100 ldr r0, [ip, r0, lsl #2] 0x878: e1a00012 lsl r0, r2, r0 0x87c: e7910000 ldr r0, [r1, r0] 0x880: e5830000 str r0, [r3] 0x884: e12fff1e bx lr 0x888: e92d41f0 push {r4, r5, r6, r7, r8, lr} 0x88c: e3a04000 mov r4, #0 ; 0x0 0x890: e1a06000 mov r6, r0 0x894: e1a05003 mov r5, r3 0x898: e1a08002 mov r8, r2 0x89c: e1a07001 mov r7, r1 0x8a0: e1a03005 mov r3, r5 0x8a4: e1a02008 mov r2, r8 0x8a8: e1a01007 mov r1, r7 0x8ac: e1a00006 mov r0, r6 0x8b0: ebffffe2 bl 0x840 0x8b4: e2844001 add r4, r4, #1 ; 0x1 0x8b8: e3540c02 cmp r4, #512 ; 0x200 0x8bc: e2855004 add r5, r5, #4 ; 0x4 0x8c0: 3afffff6 bcc 0x8a0 0x8c4: e1a00006 mov r0, r6 0x8c8: ebffffd6 bl 0x828 0x8cc: e3100b02 tst r0, #2048 ; 0x800 0x8d0: 0afffffb beq 0x8c4 0x8d4: ea000001 b 0x8e0 0x8d8: e1a00006 mov r0, r6 0x8dc: ebffffd1 bl 0x828 0x8e0: e3100080 tst r0, #128 ; 0x80 0x8e4: 0afffffb beq 0x8d8 0x8e8: ea000001 b 0x8f4 0x8ec: e1a00006 mov r0, r6 0x8f0: ebffffcc bl 0x828 0x8f4: e3100010 tst r0, #16 ; 0x10 0x8f8: 0afffffb beq 0x8ec 0x8fc: e59f031c ldr r0, [pc, #796] ; 0xc20 0x900: e3a01b01 mov r1, #1024 ; 0x400 0x904: e7902106 ldr r2, [r0, r6, lsl #2] 0x908: e5821050 str r1, [r2, #80] 0x90c: e7902106 ldr r2, [r0, r6, lsl #2] 0x910: e3a01080 mov r1, #128 ; 0x80 0x914: e5821050 str r1, [r2, #80] 0x918: e7900106 ldr r0, [r0, r6, lsl #2] 0x91c: e3a01010 mov r1, #16 ; 0x10 0x920: e5801050 str r1, [r0, #80] 0x924: e3a00001 mov r0, #1 ; 0x1 0x928: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 0x92c: e92d4010 push {r4, lr} 0x930: e1a04000 mov r4, r0 0x934: e59f030c ldr r0, [pc, #780] ; 0xc48 0x938: e7900104 ldr r0, [r0, r4, lsl #2] 0x93c: e0000001 and r0, r0, r1 0x940: e59f1304 ldr r1, [pc, #772] ; 0xc4c 0x944: e7911104 ldr r1, [r1, r4, lsl #2] 0x948: e1a00110 lsl r0, r0, r1 0x94c: e59f12fc ldr r1, [pc, #764] ; 0xc50 0x950: e7911104 ldr r1, [r1, r4, lsl #2] 0x954: e0800001 add r0, r0, r1 0x958: e59f12c8 ldr r1, [pc, #712] ; 0xc28 0x95c: e7911104 ldr r1, [r1, r4, lsl #2] 0x960: e0011002 and r1, r1, r2 0x964: e59f22e8 ldr r2, [pc, #744] ; 0xc54 0x968: e7922104 ldr r2, [r2, r4, lsl #2] 0x96c: e0801211 add r1, r0, r1, lsl r2 0x970: e59f02c8 ldr r0, [pc, #712] ; 0xc40 0x974: e1a02003 mov r2, r3 0x978: ebfffe4a bl 0x2a8 0x97c: e1a00004 mov r0, r4 0x980: ebffffa8 bl 0x828 0x984: e3100b02 tst r0, #2048 ; 0x800 0x988: 0afffffb beq 0x97c 0x98c: ea000001 b 0x998 0x990: e1a00004 mov r0, r4 0x994: ebffffa3 bl 0x828 0x998: e3100080 tst r0, #128 ; 0x80 0x99c: 0afffffb beq 0x990 0x9a0: ea000001 b 0x9ac 0x9a4: e1a00004 mov r0, r4 0x9a8: ebffff9e bl 0x828 0x9ac: e3100010 tst r0, #16 ; 0x10 0x9b0: 0afffffb beq 0x9a4 0x9b4: e59f0264 ldr r0, [pc, #612] ; 0xc20 0x9b8: e3a01b01 mov r1, #1024 ; 0x400 0x9bc: e7902104 ldr r2, [r0, r4, lsl #2] 0x9c0: e5821050 str r1, [r2, #80] 0x9c4: e7902104 ldr r2, [r0, r4, lsl #2] 0x9c8: e3a01080 mov r1, #128 ; 0x80 0x9cc: e5821050 str r1, [r2, #80] 0x9d0: e7900104 ldr r0, [r0, r4, lsl #2] 0x9d4: e3a01010 mov r1, #16 ; 0x10 0x9d8: e5801050 str r1, [r0, #80] 0x9dc: e3a00001 mov r0, #1 ; 0x1 0x9e0: e8bd8010 pop {r4, pc} 0x9e4: e92d4010 push {r4, lr} 0x9e8: e1a04000 mov r4, r0 0x9ec: e59f0254 ldr r0, [pc, #596] ; 0xc48 0x9f0: e7900104 ldr r0, [r0, r4, lsl #2] 0x9f4: e0000001 and r0, r0, r1 0x9f8: e59f124c ldr r1, [pc, #588] ; 0xc4c 0x9fc: e7911104 ldr r1, [r1, r4, lsl #2] 0xa00: e1a00110 lsl r0, r0, r1 0xa04: e59f1244 ldr r1, [pc, #580] ; 0xc50 0xa08: e7911104 ldr r1, [r1, r4, lsl #2] 0xa0c: e0800001 add r0, r0, r1 0xa10: e59f1210 ldr r1, [pc, #528] ; 0xc28 0xa14: e7911104 ldr r1, [r1, r4, lsl #2] 0xa18: e0011002 and r1, r1, r2 0xa1c: e59f2230 ldr r2, [pc, #560] ; 0xc54 0xa20: e7922104 ldr r2, [r2, r4, lsl #2] 0xa24: e0801211 add r1, r0, r1, lsl r2 0xa28: e59f0210 ldr r0, [pc, #528] ; 0xc40 0xa2c: e1a02003 mov r2, r3 0xa30: ebfffe23 bl 0x2c4 0xa34: e1a00004 mov r0, r4 0xa38: ebffff7a bl 0x828 0xa3c: e3100b02 tst r0, #2048 ; 0x800 0xa40: 0afffffb beq 0xa34 0xa44: ea000001 b 0xa50 0xa48: e1a00004 mov r0, r4 0xa4c: ebffff75 bl 0x828 0xa50: e3100080 tst r0, #128 ; 0x80 0xa54: 0afffffb beq 0xa48 0xa58: ea000001 b 0xa64 0xa5c: e1a00004 mov r0, r4 0xa60: ebffff70 bl 0x828 0xa64: e3100010 tst r0, #16 ; 0x10 0xa68: 0afffffb beq 0xa5c 0xa6c: e59f01ac ldr r0, [pc, #428] ; 0xc20 0xa70: e3a01b01 mov r1, #1024 ; 0x400 0xa74: e7902104 ldr r2, [r0, r4, lsl #2] 0xa78: e5821050 str r1, [r2, #80] 0xa7c: e7902104 ldr r2, [r0, r4, lsl #2] 0xa80: e3a01080 mov r1, #128 ; 0x80 0xa84: e5821050 str r1, [r2, #80] 0xa88: e7900104 ldr r0, [r0, r4, lsl #2] 0xa8c: e3a01010 mov r1, #16 ; 0x10 0xa90: e5801050 str r1, [r0, #80] 0xa94: e3a00001 mov r0, #1 ; 0x1 0xa98: e8bd8010 pop {r4, pc} 0xa9c: e59f3188 ldr r3, [pc, #392] ; 0xc2c 0xaa0: e7930100 ldr r0, [r3, r0, lsl #2] 0xaa4: e59f31ac ldr r3, [pc, #428] ; 0xc58 0xaa8: e0011003 and r1, r1, r3 0xaac: e7802001 str r2, [r0, r1] 0xab0: e12fff1e bx lr 0xab4: e59f3170 ldr r3, [pc, #368] ; 0xc2c 0xab8: e7930100 ldr r0, [r3, r0, lsl #2] 0xabc: e59f3194 ldr r3, [pc, #404] ; 0xc58 0xac0: e0011003 and r1, r1, r3 0xac4: e7900001 ldr r0, [r0, r1] 0xac8: e5820000 str r0, [r2] 0xacc: e12fff1e bx lr 0xad0: e59fc170 ldr ip, [pc, #368] ; 0xc48 0xad4: e79cc100 ldr ip, [ip, r0, lsl #2] 0xad8: e00c1001 and r1, ip, r1 0xadc: e59fc168 ldr ip, [pc, #360] ; 0xc4c 0xae0: e79cc100 ldr ip, [ip, r0, lsl #2] 0xae4: e1a01c11 lsl r1, r1, ip 0xae8: e59fc160 ldr ip, [pc, #352] ; 0xc50 0xaec: e79cc100 ldr ip, [ip, r0, lsl #2] 0xaf0: e081100c add r1, r1, ip 0xaf4: e59fc12c ldr ip, [pc, #300] ; 0xc28 0xaf8: e79cc100 ldr ip, [ip, r0, lsl #2] 0xafc: e00c2002 and r2, ip, r2 0xb00: e59fc14c ldr ip, [pc, #332] ; 0xc54 0xb04: e79c0100 ldr r0, [ip, r0, lsl #2] 0xb08: e1a00012 lsl r0, r2, r0 0xb0c: e7813000 str r3, [r1, r0] 0xb10: e12fff1e bx lr 0xb14: e59fc12c ldr ip, [pc, #300] ; 0xc48 0xb18: e79cc100 ldr ip, [ip, r0, lsl #2] 0xb1c: e00c1001 and r1, ip, r1 0xb20: e59fc124 ldr ip, [pc, #292] ; 0xc4c 0xb24: e79cc100 ldr ip, [ip, r0, lsl #2] 0xb28: e1a01c11 lsl r1, r1, ip 0xb2c: e59fc128 ldr ip, [pc, #296] ; 0xc5c 0xb30: e79cc100 ldr ip, [ip, r0, lsl #2] 0xb34: e081100c add r1, r1, ip 0xb38: e59fc0e8 ldr ip, [pc, #232] ; 0xc28 0xb3c: e79cc100 ldr ip, [ip, r0, lsl #2] 0xb40: e00c2002 and r2, ip, r2 0xb44: e59fc108 ldr ip, [pc, #264] ; 0xc54 0xb48: e79c0100 ldr r0, [ip, r0, lsl #2] 0xb4c: e1a00012 lsl r0, r2, r0 0xb50: e7813000 str r3, [r1, r0] 0xb54: e12fff1e bx lr 0xb58: e59fc0e8 ldr ip, [pc, #232] ; 0xc48 0xb5c: e79cc100 ldr ip, [ip, r0, lsl #2] 0xb60: e00c1001 and r1, ip, r1 0xb64: e59fc0e0 ldr ip, [pc, #224] ; 0xc4c 0xb68: e79cc100 ldr ip, [ip, r0, lsl #2] 0xb6c: e1a01c11 lsl r1, r1, ip 0xb70: e59fc0e4 ldr ip, [pc, #228] ; 0xc5c 0xb74: e79cc100 ldr ip, [ip, r0, lsl #2] 0xb78: e081100c add r1, r1, ip 0xb7c: e59fc0a4 ldr ip, [pc, #164] ; 0xc28 0xb80: e79cc100 ldr ip, [ip, r0, lsl #2] 0xb84: e00c2002 and r2, ip, r2 0xb88: e59fc0c4 ldr ip, [pc, #196] ; 0xc54 0xb8c: e79c0100 ldr r0, [ip, r0, lsl #2] 0xb90: e1a00012 lsl r0, r2, r0 0xb94: e7910000 ldr r0, [r1, r0] 0xb98: e5830000 str r0, [r3] 0xb9c: e12fff1e bx lr 0xba0: e59f30b8 ldr r3, [pc, #184] ; 0xc60 0xba4: e7930100 ldr r0, [r3, r0, lsl #2] 0xba8: e7802001 str r2, [r0, r1] 0xbac: e12fff1e bx lr 0xbb0: e59f30a8 ldr r3, [pc, #168] ; 0xc60 0xbb4: e7930100 ldr r0, [r3, r0, lsl #2] 0xbb8: e7900001 ldr r0, [r0, r1] 0xbbc: e5820000 str r0, [r2] 0xbc0: e12fff1e bx lr 0xbc4: e92d4070 push {r4, r5, r6, lr} 0xbc8: e1a06000 mov r6, r0 0xbcc: e3a05303 mov r5, #201326592 ; 0xc000000 0xbd0: ebfffee4 bl 0x768 0xbd4: e3a04000 mov r4, #0 ; 0x0 0xbd8: e20420ff and r2, r4, #255 ; 0xff 0xbdc: e1a03005 mov r3, r5 0xbe0: e3a01000 mov r1, #0 ; 0x0 0xbe4: e1a00006 mov r0, r6 0xbe8: ebffff4f bl 0x92c 0xbec: e2844001 add r4, r4, #1 ; 0x1 0xbf0: e3540004 cmp r4, #4 ; 0x4 0xbf4: e2855b02 add r5, r5, #2048 ; 0x800 0xbf8: 3afffff6 bcc 0xbd8 0xbfc: eb0001ac bl read_secure_key 0xc00: e3500001 cmp r0, #1 ; 0x1 0xc04: 11a00006 movne r0, r6 0xc08: 18bd4070 popne {r4, r5, r6, lr} 0xc0c: 13a02004 movne r2, #4 ; 0x4 0xc10: 159f304c ldrne r3, [pc, #76] ; 0xc64 0xc14: 13a01000 movne r1, #0 ; 0x0 0xc18: 1affff43 bne 0x92c 0xc1c: e8bd8070 pop {r4, r5, r6, pc} 0xc20: 0c003020 stceq 0, c3, [r0], {32} 0xc24: 0c003050 stceq 0, c3, [r0], {80} 0xc28: 0c003040 stceq 0, c3, [r0], {64} 0xc2c: 0c003000 stceq 0, c3, [r0], {0} 0xc30: 000001ff strdeq r0, [r0], -pc 0xc34: 000003ff strdeq r0, [r0], -pc 0xc38: 000007ff strdeq r0, [r0], -pc 0xc3c: 00000fff strdeq r0, [r0], -pc 0xc40: 70100000 andsvc r0, r0, r0 0xc44: 7e00f000 cdpvc 0, 0, c15, c0, c0, {0} 0xc48: 0c003038 stceq 0, c3, [r0], {56} 0xc4c: 0c003028 stceq 0, c3, [r0], {40} 0xc50: 0c003008 stceq 0, c3, [r0], {8} 0xc54: 0c003030 stceq 0, c3, [r0], {48} 0xc58: 0001fffe strdeq pc, [r1], -lr 0xc5c: 0c003010 stceq 0, c3, [r0], {16} 0xc60: 0c003018 stceq 0, c3, [r0], {24} 0xc64: 0c002000 stceq 0, c2, [r0], {0} 0xc68: e59f055c ldr r0, [pc, #1372] ; 0x11cc 0xc6c: e5901004 ldr r1, [r0, #4] 0xc70: e3c11002 bic r1, r1, #2 ; 0x2 0xc74: e5801004 str r1, [r0, #4] 0xc78: e5901028 ldr r1, [r0, #40] 0xc7c: e3811010 orr r1, r1, #16 ; 0x10 0xc80: e5801028 str r1, [r0, #40] 0xc84: e3a010ff mov r1, #255 ; 0xff 0xc88: e5801008 str r1, [r0, #8] 0xc8c: e5901028 ldr r1, [r0, #40] 0xc90: e3110010 tst r1, #16 ; 0x10 0xc94: 0afffffc beq 0xc8c 0xc98: e5901004 ldr r1, [r0, #4] 0xc9c: e3811002 orr r1, r1, #2 ; 0x2 0xca0: e5801004 str r1, [r0, #4] 0xca4: e12fff1e bx lr 0xca8: e59f051c ldr r0, [pc, #1308] ; 0x11cc 0xcac: e59f151c ldr r1, [pc, #1308] ; 0x11d0 0xcb0: e5801000 str r1, [r0] 0xcb4: e3a010f7 mov r1, #247 ; 0xf7 0xcb8: e5801004 str r1, [r0, #4] 0xcbc: e12fff1e bx lr 0xcc0: e59f0504 ldr r0, [pc, #1284] ; 0x11cc 0xcc4: e59f1508 ldr r1, [pc, #1288] ; 0x11d4 0xcc8: e5801000 str r1, [r0] 0xccc: e3a01007 mov r1, #7 ; 0x7 0xcd0: e5801004 str r1, [r0, #4] 0xcd4: e12fff1e bx lr 0xcd8: e59f14ec ldr r1, [pc, #1260] ; 0x11cc 0xcdc: e92d4030 push {r4, r5, lr} 0xce0: e24dd030 sub sp, sp, #48 ; 0x30 0xce4: e5912044 ldr r2, [r1, #68] 0xce8: e1a02182 lsl r2, r2, #3 0xcec: e1a03e22 lsr r3, r2, #28 0xcf0: e5912044 ldr r2, [r1, #68] 0xcf4: e1a02b02 lsl r2, r2, #22 0xcf8: e1a02b22 lsr r2, r2, #22 0xcfc: e58d2010 str r2, [sp, #16] 0xd00: e5912044 ldr r2, [r1, #68] 0xd04: e3e0cb7f mvn ip, #130048 ; 0x1fc00 0xd08: e00c27a2 and r2, ip, r2, lsr #15 0xd0c: e58d2014 str r2, [sp, #20] 0xd10: e5912048 ldr r2, [r1, #72] 0xd14: e0022b2c and r2, r2, ip, lsr #22 0xd18: e58d2018 str r2, [sp, #24] 0xd1c: e5912048 ldr r2, [r1, #72] 0xd20: e1a02582 lsl r2, r2, #11 0xd24: e1a02b22 lsr r2, r2, #22 0xd28: e58d201c str r2, [sp, #28] 0xd2c: e5912048 ldr r2, [r1, #72] 0xd30: e1a02b22 lsr r2, r2, #22 0xd34: e58d2020 str r2, [sp, #32] 0xd38: e591204c ldr r2, [r1, #76] 0xd3c: e0022b2c and r2, r2, ip, lsr #22 0xd40: e58d2024 str r2, [sp, #36] 0xd44: e591204c ldr r2, [r1, #76] 0xd48: e1a02582 lsl r2, r2, #11 0xd4c: e1a02b22 lsr r2, r2, #22 0xd50: e58d2028 str r2, [sp, #40] 0xd54: e591204c ldr r2, [r1, #76] 0xd58: e1a02b22 lsr r2, r2, #22 0xd5c: e58d202c str r2, [sp, #44] 0xd60: e5912060 ldr r2, [r1, #96] 0xd64: e5cd2001 strb r2, [sp, #1] 0xd68: e5912060 ldr r2, [r1, #96] 0xd6c: e1a02422 lsr r2, r2, #8 0xd70: e5cd2002 strb r2, [sp, #2] 0xd74: e5912060 ldr r2, [r1, #96] 0xd78: e1a02822 lsr r2, r2, #16 0xd7c: e5cd2003 strb r2, [sp, #3] 0xd80: e5912060 ldr r2, [r1, #96] 0xd84: e1a02c22 lsr r2, r2, #24 0xd88: e5cd2004 strb r2, [sp, #4] 0xd8c: e5912064 ldr r2, [r1, #100] 0xd90: e5cd2005 strb r2, [sp, #5] 0xd94: e5912064 ldr r2, [r1, #100] 0xd98: e1a02422 lsr r2, r2, #8 0xd9c: e5cd2006 strb r2, [sp, #6] 0xda0: e5912064 ldr r2, [r1, #100] 0xda4: e1a02822 lsr r2, r2, #16 0xda8: e5cd2007 strb r2, [sp, #7] 0xdac: e5911064 ldr r1, [r1, #100] 0xdb0: e1a01c21 lsr r1, r1, #24 0xdb4: e3530000 cmp r3, #0 ; 0x0 0xdb8: e5cd1008 strb r1, [sp, #8] 0xdbc: 0a00000f beq 0xe00 0xdc0: e3530009 cmp r3, #9 ; 0x9 0xdc4: 03a00001 moveq r0, #1 ; 0x1 0xdc8: 0a00000d beq 0xe04 0xdcc: e3a01001 mov r1, #1 ; 0x1 0xdd0: e28d400c add r4, sp, #12 ; 0xc 0xdd4: e1a0c00d mov ip, sp 0xdd8: ea000006 b 0xdf8 0xddc: e7942101 ldr r2, [r4, r1, lsl #2] 0xde0: e3520c02 cmp r2, #512 ; 0x200 0xde4: 37d0e002 ldrbcc lr, [r0, r2] 0xde8: 37dc5001 ldrbcc r5, [ip, r1] 0xdec: e2811001 add r1, r1, #1 ; 0x1 0xdf0: 302ee005 eorcc lr, lr, r5 0xdf4: 37c0e002 strbcc lr, [r0, r2] 0xdf8: e1510003 cmp r1, r3 0xdfc: 9afffff6 bls 0xddc 0xe00: e3a00000 mov r0, #0 ; 0x0 0xe04: e28dd030 add sp, sp, #48 ; 0x30 0xe08: e8bd8030 pop {r4, r5, pc} 0xe0c: e201101f and r1, r1, #31 ; 0x1f 0xe10: e0811280 add r1, r1, r0, lsl #5 0xe14: e59f03bc ldr r0, [pc, #956] ; 0x11d8 0xe18: e92d4030 push {r4, r5, lr} 0xe1c: e1a03002 mov r3, r2 0xe20: e3a0ec02 mov lr, #512 ; 0x200 0xe24: e590c830 ldr ip, [r0, #2096] 0xe28: e3ccc33f bic ip, ip, #-67108864 ; 0xfc000000 0xe2c: e580c830 str ip, [r0, #2096] 0xe30: e5900834 ldr r0, [r0, #2100] 0xe34: e1a00800 lsl r0, r0, #16 0xe38: e1a00ea0 lsr r0, r0, #29 0xe3c: e3500002 cmp r0, #2 ; 0x2 0xe40: e59f0384 ldr r0, [pc, #900] ; 0x11cc 0xe44: 13a0c004 movne ip, #4 ; 0x4 0xe48: 03a0c003 moveq ip, #3 ; 0x3 0xe4c: e5904000 ldr r4, [r0] 0xe50: e59f5384 ldr r5, [pc, #900] ; 0x11dc 0xe54: e3c44506 bic r4, r4, #25165824 ; 0x1800000 0xe58: e1844005 orr r4, r4, r5 0xe5c: e5804000 str r4, [r0] 0xe60: e5904004 ldr r4, [r0, #4] 0xe64: e3c44701 bic r4, r4, #262144 ; 0x40000 0xe68: e3844041 orr r4, r4, #65 ; 0x41 0xe6c: e5804004 str r4, [r0, #4] 0xe70: e5904004 ldr r4, [r0, #4] 0xe74: e3c44c0e bic r4, r4, #3584 ; 0xe00 0xe78: e5804004 str r4, [r0, #4] 0xe7c: e5904028 ldr r4, [r0, #40] 0xe80: e38440f0 orr r4, r4, #240 ; 0xf0 0xe84: e5804028 str r4, [r0, #40] 0xe88: e5904004 ldr r4, [r0, #4] 0xe8c: e3844080 orr r4, r4, #128 ; 0x80 0xe90: e5804004 str r4, [r0, #4] 0xe94: e5904004 ldr r4, [r0, #4] 0xe98: e3c44002 bic r4, r4, #2 ; 0x2 0xe9c: e5804004 str r4, [r0, #4] 0xea0: e5904028 ldr r4, [r0, #40] 0xea4: e3844010 orr r4, r4, #16 ; 0x10 0xea8: e5804028 str r4, [r0, #40] 0xeac: e3a04000 mov r4, #0 ; 0x0 0xeb0: e5804008 str r4, [r0, #8] 0xeb4: e580400c str r4, [r0, #12] 0xeb8: e20140ff and r4, r1, #255 ; 0xff 0xebc: e580400c str r4, [r0, #12] 0xec0: e1a04801 lsl r4, r1, #16 0xec4: e1a04c24 lsr r4, r4, #24 0xec8: e580400c str r4, [r0, #12] 0xecc: e35c0004 cmp ip, #4 ; 0x4 0xed0: 01a01401 lsleq r1, r1, #8 0xed4: 01a01c21 lsreq r1, r1, #24 0xed8: 0580100c streq r1, [r0, #12] 0xedc: e5901028 ldr r1, [r0, #40] 0xee0: e3110010 tst r1, #16 ; 0x10 0xee4: 0afffffc beq 0xedc 0xee8: e1a0c000 mov ip, r0 0xeec: e5900028 ldr r0, [r0, #40] 0xef0: e3800010 orr r0, r0, #16 ; 0x10 0xef4: e58c0028 str r0, [ip, #40] 0xef8: e59c0004 ldr r0, [ip, #4] 0xefc: e3c00080 bic r0, r0, #128 ; 0x80 0xf00: e58c0004 str r0, [ip, #4] 0xf04: e59c0004 ldr r0, [ip, #4] 0xf08: e3800030 orr r0, r0, #48 ; 0x30 0xf0c: e58c0004 str r0, [ip, #4] 0xf10: e3a00000 mov r0, #0 ; 0x0 0xf14: e150000e cmp r0, lr 0xf18: 35dc1010 ldrbcc r1, [ip, #16] 0xf1c: 32800001 addcc r0, r0, #1 ; 0x1 0xf20: 34c31001 strbcc r1, [r3], #1 0xf24: 3afffffa bcc 0xf14 0xf28: e3a00000 mov r0, #0 ; 0x0 0xf2c: e5dc1010 ldrb r1, [ip, #16] 0xf30: e2800001 add r0, r0, #1 ; 0x1 0xf34: e350000d cmp r0, #13 ; 0xd 0xf38: bafffffb blt 0xf2c 0xf3c: e59c0004 ldr r0, [ip, #4] 0xf40: e3800080 orr r0, r0, #128 ; 0x80 0xf44: e58c0004 str r0, [ip, #4] 0xf48: e1a0000c mov r0, ip 0xf4c: e5901028 ldr r1, [r0, #40] 0xf50: e3110040 tst r1, #64 ; 0x40 0xf54: 0afffffc beq 0xf4c 0xf58: e5901028 ldr r1, [r0, #40] 0xf5c: e3811040 orr r1, r1, #64 ; 0x40 0xf60: e5801028 str r1, [r0, #40] 0xf64: e5901004 ldr r1, [r0, #4] 0xf68: e3811002 orr r1, r1, #2 ; 0x2 0xf6c: e5801004 str r1, [r0, #4] 0xf70: e5901044 ldr r1, [r0, #68] 0xf74: e3110102 tst r1, #-2147483648 ; 0x80000000 0xf78: 1afffffc bne 0xf70 0xf7c: e8bd4030 pop {r4, r5, lr} 0xf80: e1a00002 mov r0, r2 0xf84: eaffff53 b 0xcd8 0xf88: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 0xf8c: e20110ff and r1, r1, #255 ; 0xff 0xf90: e1a05002 mov r5, r2 0xf94: e0816300 add r6, r1, r0, lsl #6 0xf98: e24dd020 sub sp, sp, #32 ; 0x20 0xf9c: e59f2234 ldr r2, [pc, #564] ; 0x11d8 0xfa0: e3a09000 mov r9, #0 ; 0x0 0xfa4: e5923830 ldr r3, [r2, #2096] 0xfa8: e3c3333f bic r3, r3, #-67108864 ; 0xfc000000 0xfac: e5823830 str r3, [r2, #2096] 0xfb0: e5922834 ldr r2, [r2, #2100] 0xfb4: e1a02802 lsl r2, r2, #16 0xfb8: e1a02ea2 lsr r2, r2, #29 0xfbc: e3520004 cmp r2, #4 ; 0x4 0xfc0: 03a08004 moveq r8, #4 ; 0x4 0xfc4: 0a000007 beq 0xfe8 0xfc8: e3520005 cmp r2, #5 ; 0x5 0xfcc: 0a000004 beq 0xfe4 0xfd0: e3520006 cmp r2, #6 ; 0x6 0xfd4: 03a08005 moveq r8, #5 ; 0x5 0xfd8: 03a07a01 moveq r7, #4096 ; 0x1000 0xfdc: 00816380 addeq r6, r1, r0, lsl #7 0xfe0: 0a000001 beq 0xfec 0xfe4: e3a08005 mov r8, #5 ; 0x5 0xfe8: e3a07b02 mov r7, #2048 ; 0x800 0xfec: e59f11d8 ldr r1, [pc, #472] ; 0x11cc 0xff0: e5910000 ldr r0, [r1] 0xff4: e59f21e0 ldr r2, [pc, #480] ; 0x11dc 0xff8: e3c00506 bic r0, r0, #25165824 ; 0x1800000 0xffc: e1800002 orr r0, r0, r2 0x1000: e5810000 str r0, [r1] 0x1004: e5910004 ldr r0, [r1, #4] 0x1008: e3c00701 bic r0, r0, #262144 ; 0x40000 0x100c: e3800041 orr r0, r0, #65 ; 0x41 0x1010: e5810004 str r0, [r1, #4] 0x1014: e5910028 ldr r0, [r1, #40] 0x1018: e38000f0 orr r0, r0, #240 ; 0xf0 0x101c: e5810028 str r0, [r1, #40] 0x1020: e5910004 ldr r0, [r1, #4] 0x1024: e1a0a4a7 lsr sl, r7, #9 0x1028: e3800080 orr r0, r0, #128 ; 0x80 0x102c: e5810004 str r0, [r1, #4] 0x1030: e5910004 ldr r0, [r1, #4] 0x1034: e3c00002 bic r0, r0, #2 ; 0x2 0x1038: e5810004 str r0, [r1, #4] 0x103c: e5910028 ldr r0, [r1, #40] 0x1040: e3800010 orr r0, r0, #16 ; 0x10 0x1044: e5810028 str r0, [r1, #40] 0x1048: e3a04000 mov r4, #0 ; 0x0 0x104c: e3a0b005 mov fp, #5 ; 0x5 0x1050: ea000054 b 0x11a8 0x1054: e59f1170 ldr r1, [pc, #368] ; 0x11cc 0x1058: e5910004 ldr r0, [r1, #4] 0x105c: e3800080 orr r0, r0, #128 ; 0x80 0x1060: e5810004 str r0, [r1, #4] 0x1064: e5910028 ldr r0, [r1, #40] 0x1068: e3800010 orr r0, r0, #16 ; 0x10 0x106c: e5810028 str r0, [r1, #40] 0x1070: e3540000 cmp r4, #0 ; 0x0 0x1074: 1a000015 bne 0x10d0 0x1078: e3a00000 mov r0, #0 ; 0x0 0x107c: e5810008 str r0, [r1, #8] 0x1080: e581000c str r0, [r1, #12] 0x1084: e581000c str r0, [r1, #12] 0x1088: e20600ff and r0, r6, #255 ; 0xff 0x108c: e581000c str r0, [r1, #12] 0x1090: e1a00806 lsl r0, r6, #16 0x1094: e1a00c20 lsr r0, r0, #24 0x1098: e581000c str r0, [r1, #12] 0x109c: e3580005 cmp r8, #5 ; 0x5 0x10a0: 01a00406 lsleq r0, r6, #8 0x10a4: 01a00c20 lsreq r0, r0, #24 0x10a8: 0581000c streq r0, [r1, #12] 0x10ac: e3a00030 mov r0, #48 ; 0x30 0x10b0: e5810008 str r0, [r1, #8] 0x10b4: e5910028 ldr r0, [r1, #40] 0x10b8: e3100010 tst r0, #16 ; 0x10 0x10bc: 0afffffc beq 0x10b4 0x10c0: e5910028 ldr r0, [r1, #40] 0x10c4: e3800010 orr r0, r0, #16 ; 0x10 0x10c8: e5810028 str r0, [r1, #40] 0x10cc: ea000008 b 0x10f4 0x10d0: e581b008 str fp, [r1, #8] 0x10d4: e3a02000 mov r2, #0 ; 0x0 0x10d8: e1a00484 lsl r0, r4, #9 0x10dc: e581200c str r2, [r1, #12] 0x10e0: e1a00800 lsl r0, r0, #16 0x10e4: e1a00c20 lsr r0, r0, #24 0x10e8: e581000c str r0, [r1, #12] 0x10ec: e3a000e0 mov r0, #224 ; 0xe0 0x10f0: e5810008 str r0, [r1, #8] 0x10f4: e5910004 ldr r0, [r1, #4] 0x10f8: e3c00080 bic r0, r0, #128 ; 0x80 0x10fc: e5810004 str r0, [r1, #4] 0x1100: e5910004 ldr r0, [r1, #4] 0x1104: e3800030 orr r0, r0, #48 ; 0x30 0x1108: e5810004 str r0, [r1, #4] 0x110c: e3a00000 mov r0, #0 ; 0x0 0x1110: e1a02001 mov r2, r1 0x1114: e5d21010 ldrb r1, [r2, #16] 0x1118: e2800001 add r0, r0, #1 ; 0x1 0x111c: e3500c02 cmp r0, #512 ; 0x200 0x1120: e4c51001 strb r1, [r5], #1 0x1124: bafffffa blt 0x1114 0x1128: e582b008 str fp, [r2, #8] 0x112c: e3a0000d mov r0, #13 ; 0xd 0x1130: e0207094 mla r0, r4, r0, r7 0x1134: e20010ff and r1, r0, #255 ; 0xff 0x1138: e582100c str r1, [r2, #12] 0x113c: e1a00800 lsl r0, r0, #16 0x1140: e1a00c20 lsr r0, r0, #24 0x1144: e582000c str r0, [r2, #12] 0x1148: e3a000e0 mov r0, #224 ; 0xe0 0x114c: e5820008 str r0, [r2, #8] 0x1150: e3a00000 mov r0, #0 ; 0x0 0x1154: e5d21010 ldrb r1, [r2, #16] 0x1158: e2800001 add r0, r0, #1 ; 0x1 0x115c: e350000d cmp r0, #13 ; 0xd 0x1160: bafffffb blt 0x1154 0x1164: e5920004 ldr r0, [r2, #4] 0x1168: e3800080 orr r0, r0, #128 ; 0x80 0x116c: e5820004 str r0, [r2, #4] 0x1170: e5920028 ldr r0, [r2, #40] 0x1174: e3100040 tst r0, #64 ; 0x40 0x1178: 0afffffc beq 0x1170 0x117c: e5920028 ldr r0, [r2, #40] 0x1180: e3800040 orr r0, r0, #64 ; 0x40 0x1184: e5820028 str r0, [r2, #40] 0x1188: e5920044 ldr r0, [r2, #68] 0x118c: e3100102 tst r0, #-2147483648 ; 0x80000000 0x1190: 1afffffc bne 0x1188 0x1194: e2450c02 sub r0, r5, #512 ; 0x200 0x1198: ebfffece bl 0xcd8 0x119c: e78d0104 str r0, [sp, r4, lsl #2] 0x11a0: e2844001 add r4, r4, #1 ; 0x1 0x11a4: e0809009 add r9, r0, r9 0x11a8: e154000a cmp r4, sl 0x11ac: 3affffa8 bcc 0x1054 0x11b0: e59f0014 ldr r0, [pc, #20] ; 0x11cc 0x11b4: e5901004 ldr r1, [r0, #4] 0x11b8: e3811002 orr r1, r1, #2 ; 0x2 0x11bc: e5801004 str r1, [r0, #4] 0x11c0: e28dd020 add sp, sp, #32 ; 0x20 0x11c4: e1a00009 mov r0, r9 0x11c8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0x11cc: 70200000 eorvc r0, r0, r0 0x11d0: 0100777c tsteq r0, ip, ror r7 0x11d4: 00007776 andeq r7, r0, r6, ror r7 0x11d8: 7f008000 svcvc 0x00008000 0x11dc: 00807770 addeq r7, r0, r0, ror r7 copy_function_table_init: 0x11e0: e59f0180 ldr r0, [pc, #384] ; 0x1368 0x11e4: e59f1178 ldr r1, [pc, #376] ; 0x1364 0x11e8: e5801000 str r1, [r0] 0x11ec: e59f1178 ldr r1, [pc, #376] ; 0x136c 0x11f0: e5801004 str r1, [r0, #4] 0x11f4: e59f1174 ldr r1, [pc, #372] ; 0x1370 0x11f8: e5801008 str r1, [r0, #8] 0x11fc: e59f1170 ldr r1, [pc, #368] ; 0x1374 0x1200: e580100c str r1, [r0, #12] 0x1204: e59f116c ldr r1, [pc, #364] ; 0x1378 0x1208: e5801010 str r1, [r0, #16] 0x120c: e59f1168 ldr r1, [pc, #360] ; 0x137c 0x1210: e5801014 str r1, [r0, #20] 0x1214: e12fff1e bx lr // // void sd_boot_failed(int channel) // sd_boot_failed: 0x1218: e59f1160 ldr r1, [pc, #352] ; 0x1380 0x121c: e5912830 ldr r2, [r1, #2096] 0x1220: e3c22103 bic r2, r2, #-1073741824 ; 0xc0000000 0x1224: e3822101 orr r2, r2, #1073741824 ; 0x40000000 0x1228: e5812830 str r2, [r1, #2096] 0x122c: e3500001 cmp r0, #1 ; 0x1 0x1230: 1a00000e bne 0x1270 0x1234: e5910834 ldr r0, [r1, #2100] 0x1238: e3800902 orr r0, r0, #32768 ; 0x8000 0x123c: e5810834 str r0, [r1, #2100] 0x1240: e3a00000 mov r0, #0 ; 0x0 0x1244: e2800001 add r0, r0, #1 ; 0x1 0x1248: e3500fe1 cmp r0, #900 ; 0x384 0x124c: bafffffc blt 0x1244 0x1250: e5910834 ldr r0, [r1, #2100] 0x1254: e3c00902 bic r0, r0, #32768 ; 0x8000 0x1258: e5810834 str r0, [r1, #2100] 0x125c: e3a00000 mov r0, #0 ; 0x0 0x1260: e2800001 add r0, r0, #1 ; 0x1 0x1264: e3500064 cmp r0, #100 ; 0x64 0x1268: bafffffc blt 0x1260 0x126c: e12fff1e bx lr 0x1270: e3500000 cmp r0, #0 ; 0x0 0x1274: 112fff1e bxne lr 0x1278: e5910834 ldr r0, [r1, #2100] 0x127c: e3800902 orr r0, r0, #32768 ; 0x8000 0x1280: e5810834 str r0, [r1, #2100] 0x1284: e3a00000 mov r0, #0 ; 0x0 0x1288: e2800001 add r0, r0, #1 ; 0x1 0x128c: e3500064 cmp r0, #100 ; 0x64 0x1290: bafffffc blt 0x1288 0x1294: e5910834 ldr r0, [r1, #2100] 0x1298: e3c00902 bic r0, r0, #32768 ; 0x8000 0x129c: e5810834 str r0, [r1, #2100] 0x12a0: e3a00000 mov r0, #0 ; 0x0 0x12a4: e2800001 add r0, r0, #1 ; 0x1 0x12a8: e3500fe1 cmp r0, #900 ; 0x384 0x12ac: bafffffc blt 0x12a4 0x12b0: e12fff1e bx lr // // if efuse is disabled by pull down xfeevdd. // is_random_key_disabled will return 1. // otherwise return 2 // is_random_key_disabled: 0x12b4: e59f00c8 ldr r0, [pc, #200] ; 0x1384 0x12b8: e5901000 ldr r1, [r0] 0x12bc: e5902004 ldr r2, [r0, #4] 0x12c0: e1811002 orr r1, r1, r2 0x12c4: e5902008 ldr r2, [r0, #8] 0x12c8: e590000c ldr r0, [r0, #12] 0x12cc: e1811002 orr r1, r1, r2 0x12d0: e1910000 orrs r0, r1, r0 0x12d4: 03a00001 moveq r0, #1 ; 0x1 0x12d8: 13a00002 movne r0, #2 ; 0x2 0x12dc: e12fff1e bx lr verify_BL1: 0x12e0: e92d4038 push {r3, r4, r5, lr} 0x12e4: ebfffff2 bl is_random_key_disabled 0x12e8: e3500001 cmp r0, #1 ; 0x1 0x12ec: 0a00001a beq 0x135c 0x12f0: e59f4090 ldr r4, [pc, #144] ; 0x1388 0x12f4: e5940ff4 ldr r0, [r4, #4084] 0x12f8: e59f108c ldr r1, [pc, #140] ; 0x138c 0x12fc: e3c0000f bic r0, r0, #15 ; 0xf 0x1300: e1500001 cmp r0, r1 0x1304: 11810ec1 orrne r0, r1, r1, asr #29 0x1308: 15840ff4 strne r0, [r4, #4084] 0x130c: e3a03a02 mov r3, #8192 ; 0x2000 0x1310: e58d3000 str r3, [sp] 0x1314: e3a03303 mov r3, #201326592 ; 0xc000000 0x1318: e59f0064 ldr r0, [pc, #100] ; 0x1384 0x131c: e2832a02 add r2, r3, #8192 ; 0x2000 0x1320: e3a01010 mov r1, #16 ; 0x10 0x1324: eb000470 bl verify_signature 0x1328: e3500000 cmp r0, #0 ; 0x0 0x132c: 0a00000a beq 0x135c 0x1330: e5940ff4 ldr r0, [r4, #4084] 0x1334: e2800001 add r0, r0, #1 ; 0x1 0x1338: e5840ff4 str r0, [r4, #4084] 0x133c: e5940ff4 ldr r0, [r4, #4084] 0x1340: e59f1048 ldr r1, [pc, #72] ; 0x1390 0x1344: e1500001 cmp r0, r1 0x1348: 33a00001 movcc r0, #1 ; 0x1 0x134c: 3a000003 bcc 0x1360 0x1350: e3a00000 mov r0, #0 ; 0x0 0x1354: ebffffaf bl sd_boot_failed 0x1358: eafffffc b 0x1350 0x135c: e3a00000 mov r0, #0 ; 0x0 0x1360: e8bd8038 pop {r3, r4, r5, pc} 0x1364: 00000e0c andeq r0, r0, ip, lsl #28 0x1368: 0c004000 stceq 0, c4, [r0], {0} 0x136c: 00000f88 andeq r0, r0, r8, lsl #31 0x1370: 00001e14 andeq r1, r0, r4, lsl lr 0x1374: 00000888 andeq r0, r0, r8, lsl #17 0x1378: 0000092c andeq r0, r0, ip, lsr #18 0x137c: 000009e4 andeq r0, r0, r4, ror #19 0x1380: 7f008000 svcvc 0x00008000 0x1384: 7e00d000 cdpvc 0, 0, c13, c0, c0, {0} 0x1388: 0c003000 stceq 0, c3, [r0], {0} 0x138c: 3c6400e0 stclcc 0, c0, [r4], #-896 0x1390: 3c6400e4 stclcc 0, c0, [r4], #-912 // // // sd_issue_command(int cmd, arg1, arg2, arg3) // // sd_issue_command: 0x1394: e52de004 push {lr} ; (str lr, [sp, #-4]!) 0x1398: e59fecf4 ldr lr, [pc, #3316] ; 0x2094 0x139c: e59ecfec ldr ip, [lr, #4076] 0x13a0: e59cc024 ldr ip, [ip, #36] 0x13a4: e31c0001 tst ip, #1 ; 0x1 0x13a8: 1afffffb bne 0x139c 0x13ac: e353001b cmp r3, #27 ; 0x1b 0x13b0: 1a000003 bne 0x13c4 0x13b4: e59ecfec ldr ip, [lr, #4076] 0x13b8: e59cc024 ldr ip, [ip, #36] 0x13bc: e31c0002 tst ip, #2 ; 0x2 0x13c0: 1afffffb bne 0x13b4 0x13c4: e1833400 orr r3, r3, r0, lsl #8 0x13c8: e3520003 cmp r2, #3 ; 0x3 0x13cc: e3c338ff bic r3, r3, #16711680 ; 0xff0000 0x13d0: 03833020 orreq r3, r3, #32 ; 0x20 0x13d4: e350000c cmp r0, #12 ; 0xc 0x13d8: e59e0fec ldr r0, [lr, #4076] 0x13dc: 038330c0 orreq r3, r3, #192 ; 0xc0 0x13e0: e5801008 str r1, [r0, #8] 0x13e4: e59e0fec ldr r0, [lr, #4076] 0x13e8: e1c030be strh r3, [r0, #14] 0x13ec: e1a0200e mov r2, lr 0x13f0: e5920fec ldr r0, [r2, #4076] 0x13f4: e1d003b0 ldrh r0, [r0, #48] 0x13f8: e3100001 tst r0, #1 ; 0x1 0x13fc: 0afffffb beq 0x13f0 0x1400: e3a00001 mov r0, #1 ; 0x1 0x1404: e5921fec ldr r1, [r2, #4076] 0x1408: e1c103b0 strh r0, [r1, #48] 0x140c: e5921fec ldr r1, [r2, #4076] 0x1410: e1d113b0 ldrh r1, [r1, #48] 0x1414: e3110001 tst r1, #1 ; 0x1 0x1418: 1afffff9 bne 0x1404 0x141c: e5920fec ldr r0, [r2, #4076] 0x1420: e1d003b0 ldrh r0, [r0, #48] 0x1424: e3100902 tst r0, #32768 ; 0x8000 0x1428: 03a00001 moveq r0, #1 ; 0x1 0x142c: 13a00000 movne r0, #0 ; 0x0 0x1430: e49df004 pop {pc} ; (ldr pc, [sp], #4) 0x1434: e59f0c58 ldr r0, [pc, #3160] ; 0x2094 0x1438: e5901fec ldr r1, [r0, #4076] 0x143c: e1d113b0 ldrh r1, [r1, #48] 0x1440: e3110902 tst r1, #32768 ; 0x8000 0x1444: 012fff1e bxeq lr 0x1448: e5901fec ldr r1, [r0, #4076] 0x144c: e1d113b0 ldrh r1, [r1, #48] 0x1450: e5902fec ldr r2, [r0, #4076] 0x1454: e1c213b0 strh r1, [r2, #48] 0x1458: e5901fec ldr r1, [r0, #4076] 0x145c: e1d113b2 ldrh r1, [r1, #50] 0x1460: e5902fec ldr r2, [r0, #4076] 0x1464: e1c213b2 strh r1, [r2, #50] 0x1468: eafffff2 b 0x1438 0x146c: e92d40f0 push {r4, r5, r6, r7, lr} 0x1470: e59f5c1c ldr r5, [pc, #3100] ; 0x2094 0x1474: e59f4c1c ldr r4, [pc, #3100] ; 0x2098 0x1478: e3a03002 mov r3, #2 ; 0x2 0x147c: e3a02001 mov r2, #1 ; 0x1 0x1480: e1a01004 mov r1, r4 0x1484: e3a00001 mov r0, #1 ; 0x1 0x1488: ebffffc1 bl 0x1394 0x148c: e5950fec ldr r0, [r5, #4076] 0x1490: e5900010 ldr r0, [r0, #16] 0x1494: e5950fec ldr r0, [r5, #4076] 0x1498: e5900010 ldr r0, [r0, #16] 0x149c: e3100102 tst r0, #-2147483648 ; 0x80000000 0x14a0: 0afffff4 beq 0x1478 0x14a4: e5950fec ldr r0, [r5, #4076] 0x14a8: e5900010 ldr r0, [r0, #16] 0x14ac: e3100101 tst r0, #1073741824 ; 0x40000000 0x14b0: e3a06002 mov r6, #2 ; 0x2 0x14b4: 05856ff8 streq r6, [r5, #4088] 0x14b8: 13a00003 movne r0, #3 ; 0x3 0x14bc: 15850ff8 strne r0, [r5, #4088] 0x14c0: ebffffdb bl 0x1434 0x14c4: e3a03009 mov r3, #9 ; 0x9 0x14c8: e3a02001 mov r2, #1 ; 0x1 0x14cc: e3a01000 mov r1, #0 ; 0x0 0x14d0: e3a00002 mov r0, #2 ; 0x2 0x14d4: ebffffae bl 0x1394 0x14d8: e3500000 cmp r0, #0 ; 0x0 0x14dc: 0a00007c beq 0x16d4 0x14e0: e5950ff8 ldr r0, [r5, #4088] 0x14e4: e3800801 orr r0, r0, #65536 ; 0x10000 0x14e8: e5850ff8 str r0, [r5, #4088] 0x14ec: e3a0301a mov r3, #26 ; 0x1a 0x14f0: e3a02002 mov r2, #2 ; 0x2 0x14f4: e3a01801 mov r1, #65536 ; 0x10000 0x14f8: e3a00003 mov r0, #3 ; 0x3 0x14fc: ebffffa4 bl 0x1394 0x1500: e3500000 cmp r0, #0 ; 0x0 0x1504: 0a000072 beq 0x16d4 0x1508: e3a03009 mov r3, #9 ; 0x9 0x150c: e3a02002 mov r2, #2 ; 0x2 0x1510: e3a01801 mov r1, #65536 ; 0x10000 0x1514: e3a00009 mov r0, #9 ; 0x9 0x1518: ebffff9d bl 0x1394 0x151c: e3500000 cmp r0, #0 ; 0x0 0x1520: 0a00006b beq 0x16d4 0x1524: e5950fec ldr r0, [r5, #4076] 0x1528: e5900018 ldr r0, [r0, #24] 0x152c: e5951fec ldr r1, [r5, #4076] 0x1530: e1a00a00 lsl r0, r0, #20 0x1534: e1a00e20 lsr r0, r0, #28 0x1538: e5911018 ldr r1, [r1, #24] 0x153c: e5952fec ldr r2, [r5, #4076] 0x1540: e1a01f01 lsl r1, r1, #30 0x1544: e1a01a21 lsr r1, r1, #20 0x1548: e5922014 ldr r2, [r2, #20] 0x154c: e1811b22 orr r1, r1, r2, lsr #22 0x1550: e5952fec ldr r2, [r5, #4076] 0x1554: e5922014 ldr r2, [r2, #20] 0x1558: e2400009 sub r0, r0, #9 ; 0x9 0x155c: e1a02b02 lsl r2, r2, #22 0x1560: e2811001 add r1, r1, #1 ; 0x1 0x1564: e1a00011 lsl r0, r1, r0 0x1568: e1a02ea2 lsr r2, r2, #29 0x156c: e2821002 add r1, r2, #2 ; 0x2 0x1570: e3a02002 mov r2, #2 ; 0x2 0x1574: e1a04110 lsl r4, r0, r1 0x1578: e3a01801 mov r1, #65536 ; 0x10000 0x157c: e3a00007 mov r0, #7 ; 0x7 0x1580: e3a0301b mov r3, #27 ; 0x1b 0x1584: ebffff82 bl 0x1394 0x1588: e3500000 cmp r0, #0 ; 0x0 0x158c: 0a000050 beq 0x16d4 0x1590: e5950fec ldr r0, [r5, #4076] 0x1594: e1f012bc ldrh r1, [r0, #44]! 0x1598: e3c11004 bic r1, r1, #4 ; 0x4 0x159c: e1c010b0 strh r1, [r0] 0x15a0: e5950fec ldr r0, [r5, #4076] 0x15a4: e1d002bc ldrh r0, [r0, #44] 0x15a8: e5951fec ldr r1, [r5, #4076] 0x15ac: e3c00cff bic r0, r0, #65280 ; 0xff00 0x15b0: e3800c01 orr r0, r0, #256 ; 0x100 0x15b4: e3800001 orr r0, r0, #1 ; 0x1 0x15b8: e1c102bc strh r0, [r1, #44] 0x15bc: e5950fec ldr r0, [r5, #4076] 0x15c0: e1d002bc ldrh r0, [r0, #44] 0x15c4: e3100002 tst r0, #2 ; 0x2 0x15c8: 0afffffb beq 0x15bc 0x15cc: e5950fec ldr r0, [r5, #4076] 0x15d0: e1f012bc ldrh r1, [r0, #44]! 0x15d4: e3811004 orr r1, r1, #4 ; 0x4 0x15d8: e1c010b0 strh r1, [r0] 0x15dc: e5950fec ldr r0, [r5, #4076] 0x15e0: e1d002bc ldrh r0, [r0, #44] 0x15e4: e3100008 tst r0, #8 ; 0x8 0x15e8: 0afffffb beq 0x15dc 0x15ec: e59f1aa8 ldr r1, [pc, #2728] ; 0x209c 0x15f0: e3a0301b mov r3, #27 ; 0x1b 0x15f4: e3a02002 mov r2, #2 ; 0x2 0x15f8: e3a00006 mov r0, #6 ; 0x6 0x15fc: ebffff64 bl 0x1394 0x1600: e3500000 cmp r0, #0 ; 0x0 0x1604: 0a000032 beq 0x16d4 0x1608: e59f1a90 ldr r1, [pc, #2704] ; 0x20a0 0x160c: e3a0301b mov r3, #27 ; 0x1b 0x1610: e3a02002 mov r2, #2 ; 0x2 0x1614: e3a00006 mov r0, #6 ; 0x6 0x1618: ebffff5d bl 0x1394 0x161c: e3500000 cmp r0, #0 ; 0x0 0x1620: 0a00002b beq 0x16d4 0x1624: e5950fec ldr r0, [r5, #4076] 0x1628: e5f01028 ldrb r1, [r0, #40]! 0x162c: e3c11022 bic r1, r1, #34 ; 0x22 0x1630: e5c01000 strb r1, [r0] 0x1634: e5950fec ldr r0, [r5, #4076] 0x1638: e5f01028 ldrb r1, [r0, #40]! 0x163c: e3811002 orr r1, r1, #2 ; 0x2 0x1640: e5c01000 strb r1, [r0] 0x1644: e3a07004 mov r7, #4 ; 0x4 0x1648: e3a0301a mov r3, #26 ; 0x1a 0x164c: e3a02002 mov r2, #2 ; 0x2 0x1650: e3a01801 mov r1, #65536 ; 0x10000 0x1654: e3a0000d mov r0, #13 ; 0xd 0x1658: ebffff4d bl 0x1394 0x165c: e3500000 cmp r0, #0 ; 0x0 0x1660: 0a00001b beq 0x16d4 0x1664: e5950fec ldr r0, [r5, #4076] 0x1668: e5900010 ldr r0, [r0, #16] 0x166c: e1a00980 lsl r0, r0, #19 0x1670: e1570e20 cmp r7, r0, lsr #28 0x1674: 1afffff3 bne 0x1648 0x1678: e3a0301a mov r3, #26 ; 0x1a 0x167c: e3a02002 mov r2, #2 ; 0x2 0x1680: e3a01c02 mov r1, #512 ; 0x200 0x1684: e3a00010 mov r0, #16 ; 0x10 0x1688: ebffff41 bl 0x1394 0x168c: e3500000 cmp r0, #0 ; 0x0 0x1690: 0a00000f beq 0x16d4 0x1694: e5951fec ldr r1, [r5, #4076] 0x1698: e3a00c72 mov r0, #29184 ; 0x7200 0x169c: e1c100b4 strh r0, [r1, #4] 0x16a0: e5951fec ldr r1, [r5, #4076] 0x16a4: e3a00001 mov r0, #1 ; 0x1 0x16a8: e1c100b6 strh r0, [r1, #6] 0x16ac: e5951fec ldr r1, [r5, #4076] 0x16b0: e3a00010 mov r0, #16 ; 0x10 0x16b4: e1c100bc strh r0, [r1, #12] 0x16b8: e3a0301a mov r3, #26 ; 0x1a 0x16bc: e3a02003 mov r2, #3 ; 0x3 0x16c0: e3a01000 mov r1, #0 ; 0x0 0x16c4: e3a00008 mov r0, #8 ; 0x8 0x16c8: ebffff31 bl 0x1394 0x16cc: e3500000 cmp r0, #0 ; 0x0 0x16d0: 1a000001 bne 0x16dc 0x16d4: e3a00000 mov r0, #0 ; 0x0 0x16d8: e8bd80f0 pop {r4, r5, r6, r7, pc} 0x16dc: e1a02005 mov r2, r5 0x16e0: e5920fec ldr r0, [r2, #4076] 0x16e4: e1d003b0 ldrh r0, [r0, #48] 0x16e8: e3100020 tst r0, #32 ; 0x20 0x16ec: 0afffffb beq 0x16e0 0x16f0: e3a00020 mov r0, #32 ; 0x20 0x16f4: e5921fec ldr r1, [r2, #4076] 0x16f8: e1c103b0 strh r0, [r1, #48] 0x16fc: e5921fec ldr r1, [r2, #4076] 0x1700: e1d113b0 ldrh r1, [r1, #48] 0x1704: e3110020 tst r1, #32 ; 0x20 0x1708: 1afffff9 bne 0x16f4 0x170c: e3a00000 mov r0, #0 ; 0x0 0x1710: e5921fec ldr r1, [r2, #4076] 0x1714: e5911020 ldr r1, [r1, #32] 0x1718: e3500035 cmp r0, #53 ; 0x35 0x171c: 1a000001 bne 0x1728 0x1720: e3510000 cmp r1, #0 ; 0x0 0x1724: 11a04001 movne r4, r1 0x1728: e2800001 add r0, r0, #1 ; 0x1 0x172c: e3500080 cmp r0, #128 ; 0x80 0x1730: 3afffff6 bcc 0x1710 0x1734: e5920fec ldr r0, [r2, #4076] 0x1738: e1d003b0 ldrh r0, [r0, #48] 0x173c: e3100002 tst r0, #2 ; 0x2 0x1740: 0afffffb beq 0x1734 0x1744: e5920fec ldr r0, [r2, #4076] 0x1748: e1c063b0 strh r6, [r0, #48] 0x174c: e5920fec ldr r0, [r2, #4076] 0x1750: e1d003b0 ldrh r0, [r0, #48] 0x1754: e3100002 tst r0, #2 ; 0x2 0x1758: 1afffff9 bne 0x1744 0x175c: e1a00004 mov r0, r4 0x1760: e8bd80f0 pop {r4, r5, r6, r7, pc} 0x1764: e92d4070 push {r4, r5, r6, lr} 0x1768: e59f4924 ldr r4, [pc, #2340] ; 0x2094 0x176c: e59f5924 ldr r5, [pc, #2340] ; 0x2098 0x1770: e3a0301a mov r3, #26 ; 0x1a 0x1774: e3a02002 mov r2, #2 ; 0x2 0x1778: e3a01000 mov r1, #0 ; 0x0 0x177c: e3a00037 mov r0, #55 ; 0x37 0x1780: ebffff03 bl 0x1394 0x1784: e3a03002 mov r3, #2 ; 0x2 0x1788: e3a02001 mov r2, #1 ; 0x1 0x178c: e1a01005 mov r1, r5 0x1790: e3a00029 mov r0, #41 ; 0x29 0x1794: ebfffefe bl 0x1394 0x1798: e5940fec ldr r0, [r4, #4076] 0x179c: e5900010 ldr r0, [r0, #16] 0x17a0: e5940fec ldr r0, [r4, #4076] 0x17a4: e5900010 ldr r0, [r0, #16] 0x17a8: e3100102 tst r0, #-2147483648 ; 0x80000000 0x17ac: 0affffef beq 0x1770 0x17b0: e5940fec ldr r0, [r4, #4076] 0x17b4: e5900010 ldr r0, [r0, #16] 0x17b8: e3100101 tst r0, #1073741824 ; 0x40000000 0x17bc: e3a06004 mov r6, #4 ; 0x4 0x17c0: 05846ff8 streq r6, [r4, #4088] 0x17c4: 13a00005 movne r0, #5 ; 0x5 0x17c8: 15840ff8 strne r0, [r4, #4088] 0x17cc: ebffff18 bl 0x1434 0x17d0: e3a03009 mov r3, #9 ; 0x9 0x17d4: e3a02001 mov r2, #1 ; 0x1 0x17d8: e3a01000 mov r1, #0 ; 0x0 0x17dc: e3a00002 mov r0, #2 ; 0x2 0x17e0: ebfffeeb bl 0x1394 0x17e4: e3500000 cmp r0, #0 ; 0x0 0x17e8: 0a000082 beq 0x19f8 0x17ec: e3a0301a mov r3, #26 ; 0x1a 0x17f0: e3a02002 mov r2, #2 ; 0x2 0x17f4: e3a01000 mov r1, #0 ; 0x0 0x17f8: e3a00003 mov r0, #3 ; 0x3 0x17fc: ebfffee4 bl 0x1394 0x1800: e3500000 cmp r0, #0 ; 0x0 0x1804: 0a00007b beq 0x19f8 0x1808: e5940ff8 ldr r0, [r4, #4088] 0x180c: e5941fec ldr r1, [r4, #4076] 0x1810: e5911010 ldr r1, [r1, #16] 0x1814: e1a01821 lsr r1, r1, #16 0x1818: e1a01801 lsl r1, r1, #16 0x181c: e1800001 orr r0, r0, r1 0x1820: e5840ff8 str r0, [r4, #4088] 0x1824: e5940ff8 ldr r0, [r4, #4088] 0x1828: e1a01820 lsr r1, r0, #16 0x182c: e3a00009 mov r0, #9 ; 0x9 0x1830: e3a03009 mov r3, #9 ; 0x9 0x1834: e3a02002 mov r2, #2 ; 0x2 0x1838: e1a01801 lsl r1, r1, #16 0x183c: ebfffed4 bl 0x1394 0x1840: e3500000 cmp r0, #0 ; 0x0 0x1844: 0a00006b beq 0x19f8 0x1848: e5940fec ldr r0, [r4, #4076] 0x184c: e1a05004 mov r5, r4 0x1850: e590001c ldr r0, [r0, #28] 0x1854: e2000503 and r0, r0, #12582912 ; 0xc00000 0x1858: e3500501 cmp r0, #4194304 ; 0x400000 0x185c: e5950fec ldr r0, [r5, #4076] 0x1860: 05900014 ldreq r0, [r0, #20] 0x1864: 03e01503 mvneq r1, #12582912 ; 0xc00000 0x1868: 00010420 andeq r0, r1, r0, lsr #8 0x186c: 01a04500 lsleq r4, r0, #10 0x1870: 0a000012 beq 0x18c0 0x1874: e5900018 ldr r0, [r0, #24] 0x1878: e5951fec ldr r1, [r5, #4076] 0x187c: e1a00a00 lsl r0, r0, #20 0x1880: e1a00e20 lsr r0, r0, #28 0x1884: e5911018 ldr r1, [r1, #24] 0x1888: e5952fec ldr r2, [r5, #4076] 0x188c: e1a01f01 lsl r1, r1, #30 0x1890: e1a01a21 lsr r1, r1, #20 0x1894: e5922014 ldr r2, [r2, #20] 0x1898: e1811b22 orr r1, r1, r2, lsr #22 0x189c: e5952fec ldr r2, [r5, #4076] 0x18a0: e5922014 ldr r2, [r2, #20] 0x18a4: e2400009 sub r0, r0, #9 ; 0x9 0x18a8: e1a02b02 lsl r2, r2, #22 0x18ac: e2811001 add r1, r1, #1 ; 0x1 0x18b0: e1a00011 lsl r0, r1, r0 0x18b4: e1a02ea2 lsr r2, r2, #29 0x18b8: e2821002 add r1, r2, #2 ; 0x2 0x18bc: e1a04110 lsl r4, r0, r1 0x18c0: e5950ff8 ldr r0, [r5, #4088] 0x18c4: e1a01820 lsr r1, r0, #16 0x18c8: e3a00007 mov r0, #7 ; 0x7 0x18cc: e3a0301b mov r3, #27 ; 0x1b 0x18d0: e3a02002 mov r2, #2 ; 0x2 0x18d4: e1a01801 lsl r1, r1, #16 0x18d8: ebfffead bl 0x1394 0x18dc: e3500000 cmp r0, #0 ; 0x0 0x18e0: 0a000044 beq 0x19f8 0x18e4: e5950fec ldr r0, [r5, #4076] 0x18e8: e1f012bc ldrh r1, [r0, #44]! 0x18ec: e3c11004 bic r1, r1, #4 ; 0x4 0x18f0: e1c010b0 strh r1, [r0] 0x18f4: e5950fec ldr r0, [r5, #4076] 0x18f8: e1d002bc ldrh r0, [r0, #44] 0x18fc: e5951fec ldr r1, [r5, #4076] 0x1900: e3c00cff bic r0, r0, #65280 ; 0xff00 0x1904: e3800c01 orr r0, r0, #256 ; 0x100 0x1908: e3800001 orr r0, r0, #1 ; 0x1 0x190c: e1c102bc strh r0, [r1, #44] 0x1910: e5950fec ldr r0, [r5, #4076] 0x1914: e1d002bc ldrh r0, [r0, #44] 0x1918: e3100002 tst r0, #2 ; 0x2 0x191c: 0afffffb beq 0x1910 0x1920: e5950fec ldr r0, [r5, #4076] 0x1924: e1f012bc ldrh r1, [r0, #44]! 0x1928: e3811004 orr r1, r1, #4 ; 0x4 0x192c: e1c010b0 strh r1, [r0] 0x1930: e5950fec ldr r0, [r5, #4076] 0x1934: e1d002bc ldrh r0, [r0, #44] 0x1938: e3100008 tst r0, #8 ; 0x8 0x193c: 0afffffb beq 0x1930 0x1940: e5950ff8 ldr r0, [r5, #4088] 0x1944: e1a01820 lsr r1, r0, #16 0x1948: e3a00037 mov r0, #55 ; 0x37 0x194c: e3a0301a mov r3, #26 ; 0x1a 0x1950: e3a02002 mov r2, #2 ; 0x2 0x1954: e1a01801 lsl r1, r1, #16 0x1958: ebfffe8d bl 0x1394 0x195c: e3500000 cmp r0, #0 ; 0x0 0x1960: 0a000024 beq 0x19f8 0x1964: e3a0301a mov r3, #26 ; 0x1a 0x1968: e3a02002 mov r2, #2 ; 0x2 0x196c: e3a01002 mov r1, #2 ; 0x2 0x1970: e3a00006 mov r0, #6 ; 0x6 0x1974: ebfffe86 bl 0x1394 0x1978: e3500000 cmp r0, #0 ; 0x0 0x197c: 0a00001d beq 0x19f8 0x1980: e5950fec ldr r0, [r5, #4076] 0x1984: e5f01028 ldrb r1, [r0, #40]! 0x1988: e3c11022 bic r1, r1, #34 ; 0x22 0x198c: e5c01000 strb r1, [r0] 0x1990: e5950fec ldr r0, [r5, #4076] 0x1994: e5f01028 ldrb r1, [r0, #40]! 0x1998: e3811002 orr r1, r1, #2 ; 0x2 0x199c: e5c01000 strb r1, [r0] 0x19a0: e5950ff8 ldr r0, [r5, #4088] 0x19a4: e1a01820 lsr r1, r0, #16 0x19a8: e3a0000d mov r0, #13 ; 0xd 0x19ac: e3a0301a mov r3, #26 ; 0x1a 0x19b0: e3a02002 mov r2, #2 ; 0x2 0x19b4: e1a01801 lsl r1, r1, #16 0x19b8: ebfffe75 bl 0x1394 0x19bc: e3500000 cmp r0, #0 ; 0x0 0x19c0: 0afffff6 beq 0x19a0 0x19c4: e5950fec ldr r0, [r5, #4076] 0x19c8: e5900010 ldr r0, [r0, #16] 0x19cc: e1a00980 lsl r0, r0, #19 0x19d0: e1560e20 cmp r6, r0, lsr #28 0x19d4: 1afffff1 bne 0x19a0 0x19d8: e3a0301a mov r3, #26 ; 0x1a 0x19dc: e3a02002 mov r2, #2 ; 0x2 0x19e0: e3a01c02 mov r1, #512 ; 0x200 0x19e4: e3a00010 mov r0, #16 ; 0x10 0x19e8: ebfffe69 bl 0x1394 0x19ec: e3500000 cmp r0, #0 ; 0x0 0x19f0: 11a00004 movne r0, r4 0x19f4: 18bd8070 popne {r4, r5, r6, pc} 0x19f8: e3a00000 mov r0, #0 ; 0x0 0x19fc: e8bd8070 pop {r4, r5, r6, pc} 0x1a00: e59f169c ldr r1, [pc, #1692] ; 0x20a4 0x1a04: e3500000 cmp r0, #0 ; 0x0 0x1a08: 059f3698 ldreq r3, [pc, #1688] ; 0x20a8 0x1a0c: e92d4010 push {r4, lr} 0x1a10: e3a04033 mov r4, #51 ; 0x33 0x1a14: e3a02000 mov r2, #0 ; 0x0 0x1a18: 058130c0 streq r3, [r1, #192] 0x1a1c: 058120c8 streq r2, [r1, #200] 0x1a20: 0a00000d beq 0x1a5c 0x1a24: e3500001 cmp r0, #1 ; 0x1 0x1a28: 059f367c ldreq r3, [pc, #1660] ; 0x20ac 0x1a2c: 058130e0 streq r3, [r1, #224] 0x1a30: 058120e4 streq r2, [r1, #228] 0x1a34: 0a000007 beq 0x1a58 0x1a38: e3500002 cmp r0, #2 ; 0x2 0x1a3c: 1a000006 bne 0x1a5c 0x1a40: e59f3668 ldr r3, [pc, #1640] ; 0x20b0 0x1a44: e5813040 str r3, [r1, #64] 0x1a48: e5812048 str r2, [r1, #72] 0x1a4c: e3a03433 mov r3, #855638016 ; 0x33000000 0x1a50: e58130e0 str r3, [r1, #224] 0x1a54: e58140e4 str r4, [r1, #228] 0x1a58: e58120ec str r2, [r1, #236] 0x1a5c: e59f3630 ldr r3, [pc, #1584] ; 0x2094 0x1a60: e3a0c003 mov ip, #3 ; 0x3 0x1a64: e593efec ldr lr, [r3, #4076] 0x1a68: e5cec02f strb ip, [lr, #47] 0x1a6c: e3a0c000 mov ip, #0 ; 0x0 0x1a70: e28cc001 add ip, ip, #1 ; 0x1 0x1a74: e35c0064 cmp ip, #100 ; 0x64 0x1a78: bafffffc blt 0x1a70 0x1a7c: e3500002 cmp r0, #2 ; 0x2 0x1a80: 15931fec ldrne r1, [r3, #4076] 0x1a84: 13a00803 movne r0, #196608 ; 0x30000 0x1a88: 1581008c strne r0, [r1, #140] 0x1a8c: 059101a0 ldreq r0, [r1, #416] 0x1a90: 03c00703 biceq r0, r0, #786432 ; 0xc0000 0x1a94: 058101a0 streq r0, [r1, #416] 0x1a98: 059101a0 ldreq r0, [r1, #416] 0x1a9c: 03800702 orreq r0, r0, #524288 ; 0x80000 0x1aa0: 058101a0 streq r0, [r1, #416] 0x1aa4: e5930fec ldr r0, [r3, #4076] 0x1aa8: e1f012bc ldrh r1, [r0, #44]! 0x1aac: e3c11004 bic r1, r1, #4 ; 0x4 0x1ab0: e1c010b0 strh r1, [r0] 0x1ab4: e5931fec ldr r1, [r3, #4076] 0x1ab8: e3a00e12 mov r0, #288 ; 0x120 0x1abc: e5810080 str r0, [r1, #128] 0x1ac0: e5930fec ldr r0, [r3, #4076] 0x1ac4: e5802084 str r2, [r0, #132] 0x1ac8: e5930fec ldr r0, [r3, #4076] 0x1acc: e1d002bc ldrh r0, [r0, #44] 0x1ad0: e5931fec ldr r1, [r3, #4076] 0x1ad4: e3c00cff bic r0, r0, #65280 ; 0xff00 0x1ad8: e3800901 orr r0, r0, #16384 ; 0x4000 0x1adc: e3800001 orr r0, r0, #1 ; 0x1 0x1ae0: e1c102bc strh r0, [r1, #44] 0x1ae4: e5930fec ldr r0, [r3, #4076] 0x1ae8: e1d002bc ldrh r0, [r0, #44] 0x1aec: e3100002 tst r0, #2 ; 0x2 0x1af0: 0afffffb beq 0x1ae4 0x1af4: e5930fec ldr r0, [r3, #4076] 0x1af8: e1f012bc ldrh r1, [r0, #44]! 0x1afc: e3811004 orr r1, r1, #4 ; 0x4 0x1b00: e1c010b0 strh r1, [r0] 0x1b04: e1a00003 mov r0, r3 0x1b08: e5901fec ldr r1, [r0, #4076] 0x1b0c: e1d112bc ldrh r1, [r1, #44] 0x1b10: e3110008 tst r1, #8 ; 0x8 0x1b14: 0afffffb beq 0x1b08 0x1b18: e5903fec ldr r3, [r0, #4076] 0x1b1c: e3a0100e mov r1, #14 ; 0xe 0x1b20: e5c3102e strb r1, [r3, #46] 0x1b24: e5901fec ldr r1, [r0, #4076] 0x1b28: e5f13028 ldrb r3, [r1, #40]! 0x1b2c: e3c33004 bic r3, r3, #4 ; 0x4 0x1b30: e5c13000 strb r3, [r1] 0x1b34: e5901fec ldr r1, [r0, #4076] 0x1b38: e1d113b0 ldrh r1, [r1, #48] 0x1b3c: e3110902 tst r1, #32768 ; 0x8000 0x1b40: e5901fec ldr r1, [r0, #4076] 0x1b44: 0a000007 beq 0x1b68 0x1b48: e1d113b0 ldrh r1, [r1, #48] 0x1b4c: e5903fec ldr r3, [r0, #4076] 0x1b50: e1c313b0 strh r1, [r3, #48] 0x1b54: e5901fec ldr r1, [r0, #4076] 0x1b58: e1d113b2 ldrh r1, [r1, #50] 0x1b5c: e5903fec ldr r3, [r0, #4076] 0x1b60: e1c313b2 strh r1, [r3, #50] 0x1b64: eafffff2 b 0x1b34 0x1b68: e1c143b4 strh r4, [r1, #52] 0x1b6c: e5903fec ldr r3, [r0, #4076] 0x1b70: e3a010ff mov r1, #255 ; 0xff 0x1b74: e1c313b6 strh r1, [r3, #54] 0x1b78: e5901fec ldr r1, [r0, #4076] 0x1b7c: e1c123b8 strh r2, [r1, #56] 0x1b80: e5900fec ldr r0, [r0, #4076] 0x1b84: e1c023ba strh r2, [r0, #58] 0x1b88: e3a03000 mov r3, #0 ; 0x0 0x1b8c: e3a02000 mov r2, #0 ; 0x0 0x1b90: e3a01000 mov r1, #0 ; 0x0 0x1b94: e3a00000 mov r0, #0 ; 0x0 0x1b98: ebfffdfd bl 0x1394 0x1b9c: e3500000 cmp r0, #0 ; 0x0 0x1ba0: 08bd8010 popeq {r4, pc} 0x1ba4: e3a0301a mov r3, #26 ; 0x1a 0x1ba8: e2831e19 add r1, r3, #400 ; 0x190 0x1bac: e3a02001 mov r2, #1 ; 0x1 0x1bb0: e3a00008 mov r0, #8 ; 0x8 0x1bb4: ebfffdf6 bl 0x1394 0x1bb8: e3500001 cmp r0, #1 ; 0x1 0x1bbc: 1a000001 bne 0x1bc8 0x1bc0: e8bd4010 pop {r4, lr} 0x1bc4: eafffee6 b 0x1764 0x1bc8: ebfffe19 bl 0x1434 0x1bcc: e3a0301a mov r3, #26 ; 0x1a 0x1bd0: e3a02002 mov r2, #2 ; 0x2 0x1bd4: e3a01000 mov r1, #0 ; 0x0 0x1bd8: e3a00037 mov r0, #55 ; 0x37 0x1bdc: ebfffdec bl 0x1394 0x1be0: e3500001 cmp r0, #1 ; 0x1 0x1be4: 18bd4010 popne {r4, lr} 0x1be8: 1afffe1f bne 0x146c 0x1bec: e59f14a4 ldr r1, [pc, #1188] ; 0x2098 0x1bf0: e3a03002 mov r3, #2 ; 0x2 0x1bf4: e3a02001 mov r2, #1 ; 0x1 0x1bf8: e3a00029 mov r0, #41 ; 0x29 0x1bfc: ebfffde4 bl 0x1394 0x1c00: eaffffee b 0x1bc0 // // void sd_copy_internal1(int start_sector, int num_of_sector, char* buffer) // sd_copy_internal1: 0x1c04: e92d41f0 push {r4, r5, r6, r7, r8, lr} 0x1c08: e3510002 cmp r1, #2 ; 0x2 0x1c0c: e1a05001 mov r5, r1 0x1c10: e1a08002 mov r8, r2 0x1c14: e1a07000 mov r7, r0 0x1c18: 3a000023 bcc 0x1cac 0x1c1c: e59f4470 ldr r4, [pc, #1136] ; 0x2094 0x1c20: e3a06004 mov r6, #4 ; 0x4 0x1c24: e5940ff8 ldr r0, [r4, #4088] 0x1c28: e1a01820 lsr r1, r0, #16 0x1c2c: e3a0000d mov r0, #13 ; 0xd 0x1c30: e3a0301a mov r3, #26 ; 0x1a 0x1c34: e3a02002 mov r2, #2 ; 0x2 0x1c38: e1a01801 lsl r1, r1, #16 0x1c3c: ebfffdd4 bl 0x1394 0x1c40: e3500000 cmp r0, #0 ; 0x0 0x1c44: 0afffff6 beq 0x1c24 0x1c48: e5940fec ldr r0, [r4, #4076] 0x1c4c: e5900010 ldr r0, [r0, #16] 0x1c50: e1a00980 lsl r0, r0, #19 0x1c54: e1560e20 cmp r6, r0, lsr #28 0x1c58: 1afffff1 bne 0x1c24 0x1c5c: e5941fec ldr r1, [r4, #4076] 0x1c60: e3a00c72 mov r0, #29184 ; 0x7200 0x1c64: e1c100b4 strh r0, [r1, #4] 0x1c68: e5940fec ldr r0, [r4, #4076] 0x1c6c: e1c050b6 strh r5, [r0, #6] 0x1c70: e5940fec ldr r0, [r4, #4076] 0x1c74: e5808000 str r8, [r0] 0x1c78: e5941fec ldr r1, [r4, #4076] 0x1c7c: e3a00037 mov r0, #55 ; 0x37 0x1c80: e1c100bc strh r0, [r1, #12] 0x1c84: e5940ff8 ldr r0, [r4, #4088] 0x1c88: e3100001 tst r0, #1 ; 0x1 0x1c8c: 01a01487 lsleq r1, r7, #9 0x1c90: 11a01007 movne r1, r7 0x1c94: e3a00012 mov r0, #18 ; 0x12 0x1c98: e3a0301a mov r3, #26 ; 0x1a 0x1c9c: e3a02003 mov r2, #3 ; 0x3 0x1ca0: ebfffdbb bl 0x1394 0x1ca4: e3500000 cmp r0, #0 ; 0x0 0x1ca8: 1a000001 bne 0x1cb4 0x1cac: e3a00000 mov r0, #0 ; 0x0 0x1cb0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 0x1cb4: e1a02004 mov r2, r4 0x1cb8: e5920fec ldr r0, [r2, #4076] 0x1cbc: e1d003b0 ldrh r0, [r0, #48] 0x1cc0: e3100002 tst r0, #2 ; 0x2 0x1cc4: 0afffffb beq 0x1cb8 0x1cc8: e3a00002 mov r0, #2 ; 0x2 0x1ccc: e5921fec ldr r1, [r2, #4076] 0x1cd0: e1c103b0 strh r0, [r1, #48] 0x1cd4: e5921fec ldr r1, [r2, #4076] 0x1cd8: e1d113b0 ldrh r1, [r1, #48] 0x1cdc: e3110002 tst r1, #2 ; 0x2 0x1ce0: 1afffff9 bne 0x1ccc 0x1ce4: e5920fec ldr r0, [r2, #4076] 0x1ce8: e1d003b0 ldrh r0, [r0, #48] 0x1cec: e5921fec ldr r1, [r2, #4076] 0x1cf0: e1c103b0 strh r0, [r1, #48] 0x1cf4: e5920fec ldr r0, [r2, #4076] 0x1cf8: e1d003b2 ldrh r0, [r0, #50] 0x1cfc: e5921fec ldr r1, [r2, #4076] 0x1d00: e1c103b2 strh r0, [r1, #50] 0x1d04: e3a00001 mov r0, #1 ; 0x1 0x1d08: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} // // void sd_copy_internal2(int start_sector, int num_of_sector, char* buffer) // sd_copy_internal2: 0x1d0c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 0x1d10: e3510002 cmp r1, #2 ; 0x2 0x1d14: e1a05001 mov r5, r1 0x1d18: e1a08002 mov r8, r2 0x1d1c: e1a07000 mov r7, r0 0x1d20: 3a000023 bcc 0x1db4 0x1d24: e59f4368 ldr r4, [pc, #872] ; 0x2094 0x1d28: e3a06004 mov r6, #4 ; 0x4 0x1d2c: e5940ff8 ldr r0, [r4, #4088] 0x1d30: e1a01820 lsr r1, r0, #16 0x1d34: e3a0000d mov r0, #13 ; 0xd 0x1d38: e3a0301a mov r3, #26 ; 0x1a 0x1d3c: e3a02002 mov r2, #2 ; 0x2 0x1d40: e1a01801 lsl r1, r1, #16 0x1d44: ebfffd92 bl 0x1394 0x1d48: e3500000 cmp r0, #0 ; 0x0 0x1d4c: 0afffff6 beq 0x1d2c 0x1d50: e5940fec ldr r0, [r4, #4076] 0x1d54: e5900010 ldr r0, [r0, #16] 0x1d58: e1a00980 lsl r0, r0, #19 0x1d5c: e1560e20 cmp r6, r0, lsr #28 0x1d60: 1afffff1 bne 0x1d2c 0x1d64: e5941fec ldr r1, [r4, #4076] 0x1d68: e3a00c72 mov r0, #29184 ; 0x7200 0x1d6c: e1c100b4 strh r0, [r1, #4] 0x1d70: e5940fec ldr r0, [r4, #4076] 0x1d74: e1c050b6 strh r5, [r0, #6] 0x1d78: e5940fec ldr r0, [r4, #4076] 0x1d7c: e5808000 str r8, [r0] 0x1d80: e5941fec ldr r1, [r4, #4076] 0x1d84: e3a00037 mov r0, #55 ; 0x37 0x1d88: e1c100bc strh r0, [r1, #12] 0x1d8c: e5940ff8 ldr r0, [r4, #4088] 0x1d90: e3100001 tst r0, #1 ; 0x1 0x1d94: 01a01487 lsleq r1, r7, #9 0x1d98: 11a01007 movne r1, r7 0x1d9c: e3a00012 mov r0, #18 ; 0x12 0x1da0: e3a0301a mov r3, #26 ; 0x1a 0x1da4: e3a02003 mov r2, #3 ; 0x3 0x1da8: ebfffd79 bl 0x1394 0x1dac: e3500000 cmp r0, #0 ; 0x0 0x1db0: 1a000001 bne 0x1dbc 0x1db4: e3a00000 mov r0, #0 ; 0x0 0x1db8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 0x1dbc: e1a02004 mov r2, r4 0x1dc0: e5920fec ldr r0, [r2, #4076] 0x1dc4: e1d003b0 ldrh r0, [r0, #48] 0x1dc8: e3100002 tst r0, #2 ; 0x2 0x1dcc: 0afffffb beq 0x1dc0 0x1dd0: e3a00002 mov r0, #2 ; 0x2 0x1dd4: e5921fec ldr r1, [r2, #4076] 0x1dd8: e1c103b0 strh r0, [r1, #48] 0x1ddc: e5921fec ldr r1, [r2, #4076] 0x1de0: e1d113b0 ldrh r1, [r1, #48] 0x1de4: e3110002 tst r1, #2 ; 0x2 0x1de8: 1afffff9 bne 0x1dd4 0x1dec: e5920fec ldr r0, [r2, #4076] 0x1df0: e1d003b0 ldrh r0, [r0, #48] 0x1df4: e5921fec ldr r1, [r2, #4076] 0x1df8: e1c103b0 strh r0, [r1, #48] 0x1dfc: e5920fec ldr r0, [r2, #4076] 0x1e00: e1d003b2 ldrh r0, [r0, #50] 0x1e04: e5921fec ldr r1, [r2, #4076] 0x1e08: e1c103b2 strh r0, [r1, #50] 0x1e0c: e3a00001 mov r0, #1 ; 0x1 0x1e10: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} // // void sd_copy(int channel, int start_sector, int num_of_sector, char* buffer) // sd_copy: 0x1e14: e92d41f0 push {r4, r5, r6, r7, r8, lr} 0x1e18: e1a04000 mov r4, r0 0x1e1c: e1a06001 mov r6, r1 0x1e20: e59d0018 ldr r0, [sp, #24] 0x1e24: e1a08003 mov r8, r3 0x1e28: e1a07002 mov r7, r2 0x1e2c: e3500001 cmp r0, #1 ; 0x1 0x1e30: 1a000003 bne 0x1e44 0x1e34: e1a00004 mov r0, r4 0x1e38: ebfffef0 bl 0x1a00 0x1e3c: e3500000 cmp r0, #0 ; 0x0 0x1e40: 0afffffb beq 0x1e34 0x1e44: e59f1248 ldr r1, [pc, #584] ; 0x2094 0x1e48: e5910fec ldr r0, [r1, #4076] 0x1e4c: e1f022bc ldrh r2, [r0, #44]! 0x1e50: e3c22004 bic r2, r2, #4 ; 0x4 0x1e54: e1c020b0 strh r2, [r0] 0x1e58: e5910fec ldr r0, [r1, #4076] 0x1e5c: e1d002bc ldrh r0, [r0, #44] 0x1e60: e5912fec ldr r2, [r1, #4076] 0x1e64: e3c00cff bic r0, r0, #65280 ; 0xff00 0x1e68: e3800c01 orr r0, r0, #256 ; 0x100 0x1e6c: e3800001 orr r0, r0, #1 ; 0x1 0x1e70: e1c202bc strh r0, [r2, #44] 0x1e74: e5910fec ldr r0, [r1, #4076] 0x1e78: e1d002bc ldrh r0, [r0, #44] 0x1e7c: e3100002 tst r0, #2 ; 0x2 0x1e80: 0afffffb beq 0x1e74 0x1e84: e5910fec ldr r0, [r1, #4076] 0x1e88: e1a04001 mov r4, r1 0x1e8c: e1f012bc ldrh r1, [r0, #44]! 0x1e90: e3811004 orr r1, r1, #4 ; 0x4 0x1e94: e1c010b0 strh r1, [r0] 0x1e98: e5940fec ldr r0, [r4, #4076] 0x1e9c: e1d002bc ldrh r0, [r0, #44] 0x1ea0: e3100008 tst r0, #8 ; 0x8 0x1ea4: 0afffffb beq 0x1e98 0x1ea8: e3a05004 mov r5, #4 ; 0x4 0x1eac: e5940ff8 ldr r0, [r4, #4088] 0x1eb0: e1a01820 lsr r1, r0, #16 0x1eb4: e3a0000d mov r0, #13 ; 0xd 0x1eb8: e3a0301a mov r3, #26 ; 0x1a 0x1ebc: e3a02002 mov r2, #2 ; 0x2 0x1ec0: e1a01801 lsl r1, r1, #16 0x1ec4: ebfffd32 bl 0x1394 0x1ec8: e3500000 cmp r0, #0 ; 0x0 0x1ecc: 0afffff6 beq 0x1eac 0x1ed0: e5940fec ldr r0, [r4, #4076] 0x1ed4: e5900010 ldr r0, [r0, #16] 0x1ed8: e1a00980 lsl r0, r0, #19 0x1edc: e1550e20 cmp r5, r0, lsr #28 0x1ee0: 1afffff1 bne 0x1eac 0x1ee4: e5940ff8 ldr r0, [r4, #4088] 0x1ee8: e3100002 tst r0, #2 ; 0x2 0x1eec: e1a00006 mov r0, r6 0x1ef0: e1a02008 mov r2, r8 0x1ef4: e1a01007 mov r1, r7 0x1ef8: 08bd41f0 popeq {r4, r5, r6, r7, r8, lr} 0x1efc: 0affff82 beq sd_copy_internal2 0x1f00: 18bd41f0 popne {r4, r5, r6, r7, r8, lr} 0x1f04: 1affff3e bne sd_copy_internal1 // // void sd_load(int channel) // channel: 0, 1, 2 // sd_load: 0x1f08: e92d41f0 push {r4, r5, r6, r7, r8, lr} 0x1f0c: e1b07000 movs r7, r0 0x1f10: 059f019c ldreq r0, [pc, #412] ; 0x20b4 0x1f14: e59f6178 ldr r6, [pc, #376] ; 0x2094 0x1f18: 0a000002 beq 0x1f28 0x1f1c: e59f0194 ldr r0, [pc, #404] ; 0x20b8 0x1f20: e3570001 cmp r7, #1 ; 0x1 0x1f24: 1a000001 bne 0x1f30 0x1f28: e5860fec str r0, [r6, #4076] 0x1f2c: ea000002 b restart_sd_load 0x1f30: e3570002 cmp r7, #2 ; 0x2 0x1f34: 059f0180 ldreq r0, [pc, #384] ; 0x20bc 0x1f38: eafffffa b 0x1f28 restart_sd_load: 0x1f3c: e1a00007 mov r0, r7 0x1f40: ebfffeae bl 0x1a00 0x1f44: e1b04000 movs r4, r0 0x1f48: 0afffffb beq restart_sd_load 0x1f4c: e3a05004 mov r5, #4 ; 0x4 0x1f50: e5960ff8 ldr r0, [r6, #4088] 0x1f54: e1a01820 lsr r1, r0, #16 0x1f58: e3a0000d mov r0, #13 ; 0xd 0x1f5c: e3a0301a mov r3, #26 ; 0x1a 0x1f60: e3a02002 mov r2, #2 ; 0x2 0x1f64: e1a01801 lsl r1, r1, #16 0x1f68: ebfffd09 bl 0x1394 0x1f6c: e3500000 cmp r0, #0 ; 0x0 0x1f70: 0afffff6 beq 0x1f50 0x1f74: e5960fec ldr r0, [r6, #4076] 0x1f78: e5900010 ldr r0, [r0, #16] 0x1f7c: e1a00980 lsl r0, r0, #19 0x1f80: e1550e20 cmp r5, r0, lsr #28 0x1f84: 1afffff1 bne 0x1f50 0x1f88: e5960ff8 ldr r0, [r6, #4088] 0x1f8c: e3100002 tst r0, #2 ; 0x2 0x1f90: e2440012 sub r0, r4, #18 ; 0x12 0x1f94: e3a02303 mov r2, #201326592 ; 0xc000000 0x1f98: e3a01010 mov r1, #16 ; 0x10 0x1f9c: 0a000001 beq 0x1fa8 0x1fa0: ebffff17 bl sd_copy_internal1 0x1fa4: ea000000 b 0x1fac copy_stepdir_fromsd: 0x1fa8: ebffff57 bl sd_copy_internal2 0x1fac: e3500000 cmp r0, #0 ; 0x0 0x1fb0: 0affffe1 beq restart_sd_load 0x1fb4: ebfffcbe bl read_secure_key 0x1fb8: e3500001 cmp r0, #1 ; 0x1 0x1fbc: 0a000032 beq 0x208c 0x1fc0: e5961fec ldr r1, [r6, #4076] 0x1fc4: e3a00c72 mov r0, #29184 ; 0x7200 0x1fc8: e1c100b4 strh r0, [r1, #4] 0x1fcc: e5961fec ldr r1, [r6, #4076] 0x1fd0: e3a00001 mov r0, #1 ; 0x1 0x1fd4: e1c100b6 strh r0, [r1, #6] 0x1fd8: e5961fec ldr r1, [r6, #4076] 0x1fdc: e3a00012 mov r0, #18 ; 0x12 0x1fe0: e1c100bc strh r0, [r1, #12] 0x1fe4: e59f50d4 ldr r5, [pc, #212] ; 0x20c0 0x1fe8: e5960ff8 ldr r0, [r6, #4088] 0x1fec: e3100001 tst r0, #1 ; 0x1 0x1ff0: 02440002 subeq r0, r4, #2 ; 0x2 0x1ff4: 12441002 subne r1, r4, #2 ; 0x2 0x1ff8: 01a01480 lsleq r1, r0, #9 0x1ffc: e3a00011 mov r0, #17 ; 0x11 0x2000: e3a0301a mov r3, #26 ; 0x1a 0x2004: e3a02003 mov r2, #3 ; 0x3 0x2008: ebfffce1 bl 0x1394 0x200c: e3500000 cmp r0, #0 ; 0x0 0x2010: 0affffc9 beq restart_sd_load 0x2014: e1a02006 mov r2, r6 wait0: 0x2018: e5920fec ldr r0, [r2, #4076] 0x201c: e1d003b0 ldrh r0, [r0, #48] 0x2020: e3100020 tst r0, #32 ; 0x20 0x2024: 0afffffb beq 0x2018 0x2028: e3a00020 mov r0, #32 ; 0x20 wait1: 0x202c: e5921fec ldr r1, [r2, #4076] 0x2030: e1c103b0 strh r0, [r1, #48] 0x2034: e5921fec ldr r1, [r2, #4076] 0x2038: e1d113b0 ldrh r1, [r1, #48] 0x203c: e3110020 tst r1, #32 ; 0x20 0x2040: 1afffff9 bne wait1 copy_signature: 0x2044: e3a00080 mov r0, #128 ; 0x80 0x2048: e5921fec ldr r1, [r2, #4076] 0x204c: e5911020 ldr r1, [r1, #32] 0x2050: e2400001 sub r0, r0, #1 ; 0x1 0x2054: e3500000 cmp r0, #0 ; 0x0 0x2058: e4851004 str r1, [r5], #4 0x205c: cafffff9 bgt 0x2048 wait_transfer_complete: 0x2060: e5920fec ldr r0, [r2, #4076] 0x2064: e1d003b0 ldrh r0, [r0, #48] 0x2068: e3100002 tst r0, #2 ; 0x2 0x206c: 0afffffb beq wait_transfer_complete 0x2070: e3a00002 mov r0, #2 ; 0x2 wait2: 0x2074: e5921fec ldr r1, [r2, #4076] 0x2078: e1c103b0 strh r0, [r1, #48] 0x207c: e5921fec ldr r1, [r2, #4076] 0x2080: e1d113b0 ldrh r1, [r1, #48] 0x2084: e3110002 tst r1, #2 ; 0x2 0x2088: 1afffff9 bne wait2 0x208c: e5864ffc str r4, [r6, #4092] 0x2090: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 0x2094: 0c003000 stceq 0, c3, [r0], {0} 0x2098: 40ff8000 rscsmi r8, pc, r0 0x209c: 03b90000 undefined instruction 0x03b90000 0x20a0: 03b70100 undefined instruction 0x03b70100 0x20a4: 7f008000 svcvc 0x00008000 0x20a8: 02222222 eoreq r2, r2, #536870914 ; 0x20000002 0x20ac: 00222222 eoreq r2, r2, r2, lsr #4 0x20b0: 11330000 teqne r3, r0 0x20b4: 7c200000 stcvc 0, c0, [r0] 0x20b8: 7c300000 ldcvc 0, c0, [r0] 0x20bc: 7c400000 marvc acc0, r0, r0 0x20c0: 0c002000 stceq 0, c2, [r0], {0} 0x20c4: e59f21e0 ldr r2, [pc, #480] ; 0x22ac 0x20c8: e92d4010 push {r4, lr} 0x20cc: e5920ff0 ldr r0, [r2, #4080] 0x20d0: e59f11d8 ldr r1, [pc, #472] ; 0x22b0 0x20d4: e1500001 cmp r0, r1 0x20d8: 15920ff0 ldrne r0, [r2, #4080] 0x20dc: 12800001 addne r0, r0, #1 ; 0x1 0x20e0: 15820ff0 strne r0, [r2, #4080] 0x20e4: 159f01c8 ldrne r0, [pc, #456] ; 0x22b4 0x20e8: 15900000 ldrne r0, [r0] 0x20ec: 18bd4010 popne {r4, lr} 0x20f0: 112fff10 bxne r0 0x20f4: e3a00001 mov r0, #1 ; 0x1 0x20f8: ebfffc46 bl sd_boot_failed 0x20fc: eafffffc b 0x20f4 load_BL1_from_nand: 0x2100: e59f01b0 ldr r0, [pc, #432] ; 0x22b8 0x2104: e92d4070 push {r4, r5, r6, lr} 0x2108: e5901830 ldr r1, [r0, #2096] 0x210c: e3c1133f bic r1, r1, #-67108864 ; 0xfc000000 0x2110: e5801830 str r1, [r0, #2096] 0x2114: e5900834 ldr r0, [r0, #2100] 0x2118: e59f318c ldr r3, [pc, #396] ; 0x22ac 0x211c: e1a00800 lsl r0, r0, #16 0x2120: e1a00ea0 lsr r0, r0, #29 0x2124: e5931ff0 ldr r1, [r3, #4080] 0x2128: e59f218c ldr r2, [pc, #396] ; 0x22bc 0x212c: e3c1100f bic r1, r1, #15 ; 0xf 0x2130: e1510002 cmp r1, r2 0x2134: 11821ec2 orrne r1, r2, r2, asr #29 0x2138: 15831ff0 strne r1, [r3, #4080] 0x213c: e3500002 cmp r0, #2 ; 0x2 0x2140: 13500003 cmpne r0, #3 ; 0x3 0x2144: 03a04c02 moveq r4, #512 ; 0x200 0x2148: 03a00000 moveq r0, #0 ; 0x0 0x214c: 0a000004 beq 0x2164 0x2150: e3500004 cmp r0, #4 ; 0x4 0x2154: 13500005 cmpne r0, #5 ; 0x5 0x2158: 03a04b02 moveq r4, #2048 ; 0x800 0x215c: 13a04a01 movne r4, #4096 ; 0x1000 0x2160: e3a00001 mov r0, #1 ; 0x1 0x2164: e59f5148 ldr r5, [pc, #328] ; 0x22b4 0x2168: e3a01303 mov r1, #201326592 ; 0xc000000 0x216c: e3500000 cmp r0, #0 ; 0x0 0x2170: e2816a02 add r6, r1, #8192 ; 0x2000 0x2174: e5851004 str r1, [r5, #4] 0x2178: 1a000016 bne 0x21d8 0x217c: ebfffacf bl 0xcc0 0x2180: e3a04000 mov r4, #0 ; 0x0 0x2184: e5952004 ldr r2, [r5, #4] 0x2188: e1a01004 mov r1, r4 0x218c: e3a00000 mov r0, #0 ; 0x0 0x2190: ebfffb1d bl 0xe0c 0x2194: e3500000 cmp r0, #0 ; 0x0 0x2198: 1bffffc9 blne 0x20c4 0x219c: e5950004 ldr r0, [r5, #4] 0x21a0: e2844001 add r4, r4, #1 ; 0x1 0x21a4: e3540010 cmp r4, #16 ; 0x10 0x21a8: e2800c02 add r0, r0, #512 ; 0x200 0x21ac: e5850004 str r0, [r5, #4] 0x21b0: bafffff3 blt 0x2184 0x21b4: ebfffc3e bl read_secure_key 0x21b8: e3500001 cmp r0, #1 ; 0x1 0x21bc: 08bd8070 popeq {r4, r5, r6, pc} 0x21c0: e3a00000 mov r0, #0 ; 0x0 0x21c4: e1a01004 mov r1, r4 0x21c8: e1a02006 mov r2, r6 0x21cc: e5856004 str r6, [r5, #4] 0x21d0: ebfffb0d bl 0xe0c 0x21d4: ea000018 b 0x223c 0x21d8: e3500001 cmp r0, #1 ; 0x1 0x21dc: 18bd8070 popne {r4, r5, r6, pc} 0x21e0: ebfffab6 bl 0xcc0 0x21e4: e3540a01 cmp r4, #4096 ; 0x1000 0x21e8: 1a000017 bne 0x224c 0x21ec: e3a04000 mov r4, #0 ; 0x0 0x21f0: e5952004 ldr r2, [r5, #4] 0x21f4: e1a01004 mov r1, r4 0x21f8: e3a00000 mov r0, #0 ; 0x0 0x21fc: ebfffb61 bl 0xf88 0x2200: e3500000 cmp r0, #0 ; 0x0 0x2204: 1bffffae blne 0x20c4 0x2208: e5950004 ldr r0, [r5, #4] 0x220c: e2844001 add r4, r4, #1 ; 0x1 0x2210: e3540002 cmp r4, #2 ; 0x2 0x2214: e2800a01 add r0, r0, #4096 ; 0x1000 0x2218: e5850004 str r0, [r5, #4] 0x221c: bafffff3 blt 0x21f0 0x2220: ebfffc23 bl read_secure_key 0x2224: e3500001 cmp r0, #1 ; 0x1 0x2228: 08bd8070 popeq {r4, r5, r6, pc} 0x222c: e3a01002 mov r1, #2 ; 0x2 0x2230: e1a02006 mov r2, r6 0x2234: e5856004 str r6, [r5, #4] 0x2238: ea000018 b 0x22a0 0x223c: e3500000 cmp r0, #0 ; 0x0 0x2240: 18bd4070 popne {r4, r5, r6, lr} 0x2244: 1affff9e bne 0x20c4 0x2248: e8bd8070 pop {r4, r5, r6, pc} 0x224c: e3540b02 cmp r4, #2048 ; 0x800 0x2250: 18bd8070 popne {r4, r5, r6, pc} 0x2254: e3a04000 mov r4, #0 ; 0x0 0x2258: e5952004 ldr r2, [r5, #4] 0x225c: e1a01004 mov r1, r4 0x2260: e3a00000 mov r0, #0 ; 0x0 0x2264: ebfffb47 bl 0xf88 0x2268: e3500000 cmp r0, #0 ; 0x0 0x226c: 1bffff94 blne 0x20c4 0x2270: e5950004 ldr r0, [r5, #4] 0x2274: e2844001 add r4, r4, #1 ; 0x1 0x2278: e3540004 cmp r4, #4 ; 0x4 0x227c: e2800b02 add r0, r0, #2048 ; 0x800 0x2280: e5850004 str r0, [r5, #4] 0x2284: bafffff3 blt 0x2258 0x2288: ebfffc09 bl read_secure_key 0x228c: e3500001 cmp r0, #1 ; 0x1 0x2290: 08bd8070 popeq {r4, r5, r6, pc} 0x2294: e3a01004 mov r1, #4 ; 0x4 0x2298: e1a02006 mov r2, r6 0x229c: e5856004 str r6, [r5, #4] 0x22a0: e3a00000 mov r0, #0 ; 0x0 0x22a4: ebfffb37 bl 0xf88 0x22a8: eaffffe3 b 0x223c 0x22ac: 0c003000 stceq 0, c3, [r0], {0} 0x22b0: 3c6400e4 stclcc 0, c0, [r4], #-912 0x22b4: 0c003048 stceq 0, c3, [r0], {72} 0x22b8: 7f008000 svcvc 0x00008000 0x22bc: 3c6400e0 stclcc 0, c0, [r4], #-896 0x22c0: e92d40fe push {r1, r2, r3, r4, r5, r6, r7, lr} 0x22c4: e2801080 add r1, r0, #128 ; 0x80 0x22c8: e1a05003 mov r5, r3 0x22cc: e58d2008 str r2, [sp, #8] 0x22d0: e1cd62d0 ldrd r6, [sp, #32] 0x22d4: e88d0022 stm sp, {r1, r5} 0x22d8: e1a01000 mov r1, r0 0x22dc: e1a04002 mov r4, r2 0x22e0: e1a02006 mov r2, r6 0x22e4: e3a00020 mov r0, #32 ; 0x20 0x22e8: e3a03001 mov r3, #1 ; 0x1 0x22ec: eb0002b6 bl 0x2dcc 0x22f0: e3500000 cmp r0, #0 ; 0x0 0x22f4: 0a000008 beq 0x231c 0x22f8: e1a02007 mov r2, r7 0x22fc: e3a01000 mov r1, #0 ; 0x0 0x2300: e1a00006 mov r0, r6 0x2304: eb000289 bl 0x2d30 0x2308: e1a02005 mov r2, r5 0x230c: e3a01000 mov r1, #0 ; 0x0 0x2310: e1a00004 mov r0, r4 0x2314: eb000285 bl 0x2d30 0x2318: e3e00003 mvn r0, #3 ; 0x3 0x231c: e8bd80fe pop {r1, r2, r3, r4, r5, r6, r7, pc} 0x2320: e59f12a8 ldr r1, [pc, #680] ; 0x25d0 0x2324: e5801000 str r1, [r0] 0x2328: e59f12a4 ldr r1, [pc, #676] ; 0x25d4 0x232c: e5801004 str r1, [r0, #4] 0x2330: e59f12a0 ldr r1, [pc, #672] ; 0x25d8 0x2334: e5801008 str r1, [r0, #8] 0x2338: e59f129c ldr r1, [pc, #668] ; 0x25dc 0x233c: e580100c str r1, [r0, #12] 0x2340: e59f1298 ldr r1, [pc, #664] ; 0x25e0 0x2344: e5801010 str r1, [r0, #16] 0x2348: e59f1294 ldr r1, [pc, #660] ; 0x25e4 0x234c: e5801014 str r1, [r0, #20] 0x2350: e59f1290 ldr r1, [pc, #656] ; 0x25e8 0x2354: e5801018 str r1, [r0, #24] 0x2358: e24f10a0 sub r1, pc, #160 ; 0xa0 0x235c: e580101c str r1, [r0, #28] 0x2360: e59f1284 ldr r1, [pc, #644] ; 0x25ec 0x2364: e5801020 str r1, [r0, #32] 0x2368: e59f1280 ldr r1, [pc, #640] ; 0x25f0 0x236c: e5801024 str r1, [r0, #36] 0x2370: e59f127c ldr r1, [pc, #636] ; 0x25f4 0x2374: e5801028 str r1, [r0, #40] 0x2378: e12fff1e bx lr // // should return 0 for sd boot. // // // R0=0x7E00D000 // R1=0x10 // R2=0x0C002104 // // int verify_key(char* internal_random_key, int key_length, char* BL1_signature) // verify_key: 0x237c: e92d4010 push {r4, lr} 0x2380: e1a04002 mov r4, r2 0x2384: e1a02000 mov r2, r0 0x2388: e24dd0a8 sub sp, sp, #168 ; 0xa8 0x238c: e1a03001 mov r3, r1 0x2390: e2841084 add r1, r4, #132 ; 0x84 0x2394: e28d0014 add r0, sp, #20 ; 0x14 0x2398: eb000281 bl genrate_key 0x239c: e3a02084 mov r2, #132 ; 0x84 0x23a0: e3a01000 mov r1, #0 ; 0x0 0x23a4: e28d0024 add r0, sp, #36 ; 0x24 0x23a8: eb000260 bl 0x2d30 0x23ac: e3a02010 mov r2, #16 ; 0x10 0x23b0: e28d1014 add r1, sp, #20 ; 0x14 0x23b4: e28d0024 add r0, sp, #36 ; 0x24 0x23b8: eb0001a3 bl 0x2a4c 0x23bc: e3500000 cmp r0, #0 ; 0x0 0x23c0: 13e00001 mvnne r0, #1 ; 0x1 0x23c4: 1a00001c bne retrun_243c 0x23c8: e28d0024 add r0, sp, #36 ; 0x24 0x23cc: eb0001e0 bl 0x2b54 0x23d0: e3500000 cmp r0, #0 ; 0x0 0x23d4: 13e00002 mvnne r0, #2 ; 0x2 0x23d8: 1a000017 bne retrun_243c 0x23dc: e3a02084 mov r2, #132 ; 0x84 0x23e0: e1a01004 mov r1, r4 0x23e4: e28d0024 add r0, sp, #36 ; 0x24 0x23e8: eb0001e4 bl 0x2b80 0x23ec: e3500000 cmp r0, #0 ; 0x0 0x23f0: 13e00003 mvnne r0, #3 ; 0x3 0x23f4: 1a000010 bne retrun_243c 0x23f8: e1a0100d mov r1, sp 0x23fc: e28d0024 add r0, sp, #36 ; 0x24 0x2400: eb0001e2 bl genrate_final_key 0x2404: e3500000 cmp r0, #0 ; 0x0 0x2408: 13e00004 mvnne r0, #4 ; 0x4 0x240c: 1a00000a bne retrun_243c 0x2410: e3a02014 mov r2, #20 ; 0x14 0x2414: e2841084 add r1, r4, #132 ; 0x84 0x2418: e1a0000d mov r0, sp 0x241c: eb0001f3 bl compare_key 0x2420: e3500000 cmp r0, #0 ; 0x0 0x2424: 0a000004 beq retrun_243c 0x2428: e3a02098 mov r2, #152 ; 0x98 0x242c: e3a01000 mov r1, #0 ; 0x0 0x2430: e1a00004 mov r0, r4 0x2434: eb00023d bl 0x2d30 0x2438: e3e00005 mvn r0, #5 ; 0x5 retrun_243c: 0x243c: e28dd0a8 add sp, sp, #168 ; 0xa8 0x2440: e8bd8010 pop {r4, pc} 0x2444: e92d41f0 push {r4, r5, r6, r7, r8, lr} 0x2448: e24dd080 sub sp, sp, #128 ; 0x80 0x244c: e1a04000 mov r4, r0 0x2450: e1a06002 mov r6, r2 0x2454: e59d8098 ldr r8, [sp, #152] 0x2458: e3a0205c mov r2, #92 ; 0x5c 0x245c: e28d0024 add r0, sp, #36 ; 0x24 0x2460: e3a01000 mov r1, #0 ; 0x0 0x2464: e3a05014 mov r5, #20 ; 0x14 0x2468: e1a07003 mov r7, r3 0x246c: eb00022f bl 0x2d30 0x2470: e28d0024 add r0, sp, #36 ; 0x24 0x2474: eb0000da bl 0x27e4 0x2478: e3500000 cmp r0, #0 ; 0x0 0x247c: 13e00001 mvnne r0, #1 ; 0x1 0x2480: 1a000017 bne 0x24e4 0x2484: e1a02007 mov r2, r7 0x2488: e1a01006 mov r1, r6 0x248c: e28d0024 add r0, sp, #36 ; 0x24 0x2490: eb0000e5 bl 0x282c 0x2494: e3500000 cmp r0, #0 ; 0x0 0x2498: 13e00002 mvnne r0, #2 ; 0x2 0x249c: 1a000010 bne 0x24e4 0x24a0: e28d1010 add r1, sp, #16 ; 0x10 0x24a4: e28d0024 add r0, sp, #36 ; 0x24 0x24a8: eb000113 bl 0x28fc 0x24ac: e3500000 cmp r0, #0 ; 0x0 0x24b0: 13e00003 mvnne r0, #3 ; 0x3 0x24b4: 1a00000a bne 0x24e4 0x24b8: e28d3010 add r3, sp, #16 ; 0x10 0x24bc: e58d3008 str r3, [sp, #8] 0x24c0: e2841080 add r1, r4, #128 ; 0x80 0x24c4: e88d0022 stm sp, {r1, r5} 0x24c8: e1a01004 mov r1, r4 0x24cc: e3a03001 mov r3, #1 ; 0x1 0x24d0: e1a02008 mov r2, r8 0x24d4: e3a00020 mov r0, #32 ; 0x20 0x24d8: eb00023b bl 0x2dcc 0x24dc: e3500000 cmp r0, #0 ; 0x0 0x24e0: 13e00004 mvnne r0, #4 ; 0x4 0x24e4: e28dd080 add sp, sp, #128 ; 0x80 0x24e8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} // // R0=0x7E00D000 // R1=0x10 // R2=0x0C002000 // R3=0x0C000000 // // int verify_signature(char* key, int key_length, char* BL1_signature, char* BL1_data) // // BL1_signature and BL1_data is copied from SD card. // verify_signature: 0x24ec: e92d41f0 push {r4, r5, r6, r7, r8, lr} 0x24f0: e24dd078 sub sp, sp, #120 ; 0x78 0x24f4: e1a0c000 mov ip, r0 0x24f8: e59d7090 ldr r7, [sp, #144] 0x24fc: e2820f67 add r0, r2, #412 ; 0x19c 0x2500: e1a04002 mov r4, r2 0x2504: e1a06003 mov r6, r3 0x2508: e3a05014 mov r5, #20 ; 0x14 0x250c: e1a08001 mov r8, r1 0x2510: ebffff82 bl 0x2320 ;write data to 0x0c00219c-0x0c0021c8 0x2514: e2842f41 add r2, r4, #260 ; 0x104 0x2518: e1a01008 mov r1, r8 0x251c: e1a0000c mov r0, ip 0x2520: ebffff95 bl verify_key 0x2524: e3500000 cmp r0, #0 ; 0x0 0x2528: 1a000015 bne return_2584 0x252c: e3a0205c mov r2, #92 ; 0x5c 0x2530: e3a01000 mov r1, #0 ; 0x0 0x2534: e28d001c add r0, sp, #28 ; 0x1c 0x2538: eb0001fc bl 0x2d30 0x253c: e28d001c add r0, sp, #28 ; 0x1c 0x2540: eb0000a7 bl 0x27e4 0x2544: e3500000 cmp r0, #0 ; 0x0 0x2548: 13e00001 mvnne r0, #1 ; 0x1 0x254c: 1a00000c bne return_2584 0x2550: e1a02007 mov r2, r7 0x2554: e1a01006 mov r1, r6 0x2558: e28d001c add r0, sp, #28 ; 0x1c 0x255c: eb0000b2 bl 0x282c 0x2560: e3500000 cmp r0, #0 ; 0x0 0x2564: 1a000005 bne 0x2580 0x2568: e3a02084 mov r2, #132 ; 0x84 0x256c: e1a01004 mov r1, r4 0x2570: e28d001c add r0, sp, #28 ; 0x1c 0x2574: eb0000ac bl 0x282c 0x2578: e3500000 cmp r0, #0 ; 0x0 0x257c: 0a000002 beq 0x258c 0x2580: e3e00002 mvn r0, #2 ; 0x2 return_2584: 0x2584: e28dd078 add sp, sp, #120 ; 0x78 0x2588: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 0x258c: e28d1008 add r1, sp, #8 ; 0x8 0x2590: e28d001c add r0, sp, #28 ; 0x1c 0x2594: eb0000d8 bl 0x28fc 0x2598: e3500000 cmp r0, #0 ; 0x0 0x259c: 13e00003 mvnne r0, #3 ; 0x3 0x25a0: 1afffff7 bne return_2584 0x25a4: e3a03080 mov r3, #128 ; 0x80 0x25a8: e2842084 add r2, r4, #132 ; 0x84 0x25ac: e1cd20f0 strd r2, [sp] 0x25b0: e1a03005 mov r3, r5 0x25b4: e28d2008 add r2, sp, #8 ; 0x8 0x25b8: e3a01084 mov r1, #132 ; 0x84 0x25bc: e2840f41 add r0, r4, #260 ; 0x104 0x25c0: ebffff3e bl 0x22c0 0x25c4: e3500000 cmp r0, #0 ; 0x0 0x25c8: 13e00004 mvnne r0, #4 ; 0x4 0x25cc: eaffffec b return_2584 0x25d0: 00002bf0 strdeq r2, [r0], -r0 0x25d4: 00002c38 andeq r2, r0, r8, lsr ip 0x25d8: 00002d30 andeq r2, r0, r0, lsr sp 0x25dc: 00002da4 andeq r2, r0, r4, lsr #27 0x25e0: 000027e4 andeq r2, r0, r4, ror #15 0x25e4: 0000282c andeq r2, r0, ip, lsr #16 0x25e8: 000028fc strdeq r2, [r0], -ip 0x25ec: 00002624 andeq r2, r0, r4, lsr #12 0x25f0: 00002644 andeq r2, r0, r4, asr #12 0x25f4: 000026f4 strdeq r2, [r0], -r4 0x25f8: e59f21d4 ldr r2, [pc, #468] ; 0x27d4 0x25fc: e5921030 ldr r1, [r2, #48] 0x2600: e3110010 tst r1, #16 ; 0x10 0x2604: 0afffffc beq 0x25fc 0x2608: e3a01000 mov r1, #0 ; 0x0 0x260c: e7903101 ldr r3, [r0, r1, lsl #2] 0x2610: e5823004 str r3, [r2, #4] 0x2614: e2811001 add r1, r1, #1 ; 0x1 0x2618: e3510010 cmp r1, #16 ; 0x10 0x261c: 3afffffa bcc 0x260c 0x2620: e12fff1e bx lr 0x2624: e3a01000 mov r1, #0 ; 0x0 0x2628: e5801044 str r1, [r0, #68] 0x262c: e5801040 str r1, [r0, #64] 0x2630: e59f019c ldr r0, [pc, #412] ; 0x27d4 0x2634: e5801000 str r1, [r0] 0x2638: e3a01009 mov r1, #9 ; 0x9 0x263c: e5801000 str r1, [r0] 0x2640: e12fff1e bx lr 0x2644: e92d41f0 push {r4, r5, r6, r7, r8, lr} 0x2648: e1b04002 movs r4, r2 0x264c: e1a05000 mov r5, r0 0x2650: e5900044 ldr r0, [r0, #68] 0x2654: e1a06001 mov r6, r1 0x2658: 13a01001 movne r1, #1 ; 0x1 0x265c: 15851040 strne r1, [r5, #64] 0x2660: e0801004 add r1, r0, r4 0x2664: e3510040 cmp r1, #64 ; 0x40 0x2668: e2607040 rsb r7, r0, #64 ; 0x40 0x266c: 9a000017 bls 0x26d0 0x2670: e0800005 add r0, r0, r5 0x2674: e1a02007 mov r2, r7 0x2678: e1a01006 mov r1, r6 0x267c: eb00016d bl 0x2c38 0x2680: e1a00005 mov r0, r5 0x2684: ebffffdb bl 0x25f8 0x2688: e3a00000 mov r0, #0 ; 0x0 0x268c: e0866007 add r6, r6, r7 0x2690: e0444007 sub r4, r4, r7 0x2694: e5850044 str r0, [r5, #68] 0x2698: ea00000a b 0x26c8 0x269c: e3160003 tst r6, #3 ; 0x3 0x26a0: 01a00006 moveq r0, r6 0x26a4: 0a000004 beq 0x26bc 0x26a8: e3a02040 mov r2, #64 ; 0x40 0x26ac: e1a01006 mov r1, r6 0x26b0: e1a00005 mov r0, r5 0x26b4: eb00015f bl 0x2c38 0x26b8: e1a00005 mov r0, r5 0x26bc: ebffffcd bl 0x25f8 0x26c0: e2866040 add r6, r6, #64 ; 0x40 0x26c4: e2444040 sub r4, r4, #64 ; 0x40 0x26c8: e3540040 cmp r4, #64 ; 0x40 0x26cc: 8afffff2 bhi 0x269c 0x26d0: e5950044 ldr r0, [r5, #68] 0x26d4: e1a02004 mov r2, r4 0x26d8: e1a01006 mov r1, r6 0x26dc: e0800005 add r0, r0, r5 0x26e0: eb000154 bl 0x2c38 0x26e4: e5950044 ldr r0, [r5, #68] 0x26e8: e0800004 add r0, r0, r4 0x26ec: e5850044 str r0, [r5, #68] 0x26f0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 0x26f4: e92d4030 push {r4, r5, lr} 0x26f8: e24dd014 sub sp, sp, #20 ; 0x14 0x26fc: e1a04000 mov r4, r0 0x2700: e1a05001 mov r5, r1 0x2704: e59f10cc ldr r1, [pc, #204] ; 0x27d8 0x2708: e1a0000d mov r0, sp 0x270c: e3a02014 mov r2, #20 ; 0x14 0x2710: eb000689 bl 0x413c 0x2714: e5940040 ldr r0, [r4, #64] 0x2718: e3500000 cmp r0, #0 ; 0x0 0x271c: 1a000008 bne 0x2744 0x2720: e3a00000 mov r0, #0 ; 0x0 0x2724: e1a0200d mov r2, sp 0x2728: e7921100 ldr r1, [r2, r0, lsl #2] 0x272c: e7851100 str r1, [r5, r0, lsl #2] 0x2730: e2800001 add r0, r0, #1 ; 0x1 0x2734: e3500005 cmp r0, #5 ; 0x5 0x2738: 3afffffa bcc 0x2728 0x273c: e28dd014 add sp, sp, #20 ; 0x14 0x2740: e8bd8030 pop {r4, r5, pc} 0x2744: e59f1088 ldr r1, [pc, #136] ; 0x27d4 0x2748: e5910030 ldr r0, [r1, #48] 0x274c: e3100010 tst r0, #16 ; 0x10 0x2750: 0afffffc beq 0x2748 0x2754: e3a00000 mov r0, #0 ; 0x0 0x2758: e5942044 ldr r2, [r4, #68] 0x275c: e3520004 cmp r2, #4 ; 0x4 0x2760: 87942000 ldrhi r2, [r4, r0] 0x2764: 85812004 strhi r2, [r1, #4] 0x2768: 85942044 ldrhi r2, [r4, #68] 0x276c: 82800004 addhi r0, r0, #4 ; 0x4 0x2770: 82422004 subhi r2, r2, #4 ; 0x4 0x2774: 85842044 strhi r2, [r4, #68] 0x2778: 8afffff6 bhi 0x2758 0x277c: e5942044 ldr r2, [r4, #68] 0x2780: e59f3054 ldr r3, [pc, #84] ; 0x27dc 0x2784: e2022003 and r2, r2, #3 ; 0x3 0x2788: e7932102 ldr r2, [r3, r2, lsl #2] 0x278c: e5812000 str r2, [r1] 0x2790: e7940000 ldr r0, [r4, r0] 0x2794: e5810004 str r0, [r1, #4] 0x2798: e5910030 ldr r0, [r1, #48] 0x279c: e3100001 tst r0, #1 ; 0x1 0x27a0: 0afffffc beq 0x2798 0x27a4: e59f0034 ldr r0, [pc, #52] ; 0x27e0 0x27a8: e5901034 ldr r1, [r0, #52] 0x27ac: e5851000 str r1, [r5] 0x27b0: e5901038 ldr r1, [r0, #56] 0x27b4: e5851004 str r1, [r5, #4] 0x27b8: e590103c ldr r1, [r0, #60] 0x27bc: e5851008 str r1, [r5, #8] 0x27c0: e5901040 ldr r1, [r0, #64] 0x27c4: e585100c str r1, [r5, #12] 0x27c8: e5900044 ldr r0, [r0, #68] 0x27cc: e5850010 str r0, [r5, #16] 0x27d0: eaffffd9 b 0x273c 0x27d4: 7d300000 ldcvc 0, c0, [r0] 0x27d8: 0000461c andeq r4, r0, ip, lsl r6 0x27dc: 0000460c andeq r4, r0, ip, lsl #12 0x27e0: 7d700000 ldclvc 0, c0, [r0] 0x27e4: e59f1244 ldr r1, [pc, #580] ; 0x2a30 0x27e8: e3500000 cmp r0, #0 ; 0x0 0x27ec: 0a00000c beq 0x2824 0x27f0: e59f123c ldr r1, [pc, #572] ; 0x2a34 0x27f4: e5801000 str r1, [r0] 0x27f8: e59f1238 ldr r1, [pc, #568] ; 0x2a38 0x27fc: e5801004 str r1, [r0, #4] 0x2800: e59f1234 ldr r1, [pc, #564] ; 0x2a3c 0x2804: e5801008 str r1, [r0, #8] 0x2808: e59f1230 ldr r1, [pc, #560] ; 0x2a40 0x280c: e580100c str r1, [r0, #12] 0x2810: e59f122c ldr r1, [pc, #556] ; 0x2a44 0x2814: e5801010 str r1, [r0, #16] 0x2818: e3a01000 mov r1, #0 ; 0x0 0x281c: e5801018 str r1, [r0, #24] 0x2820: e5801014 str r1, [r0, #20] 0x2824: e1a00001 mov r0, r1 0x2828: e12fff1e bx lr // //r0=0x0c004ed0 //r1=0x0c002104 // 0x282c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 0x2830: e1b04000 movs r4, r0 0x2834: e1a06001 mov r6, r1 0x2838: e59f01f0 ldr r0, [pc, #496] ; 0x2a30 0x283c: 13560000 cmpne r6, #0 ; 0x0 0x2840: e1a05002 mov r5, r2 0x2844: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} 0x2848: e5940014 ldr r0, [r4, #20] 0x284c: e200703f and r7, r0, #63 ; 0x3f 0x2850: e0800005 add r0, r0, r5 0x2854: e1500005 cmp r0, r5 0x2858: e5840014 str r0, [r4, #20] 0x285c: 35940018 ldrcc r0, [r4, #24] 0x2860: e2678040 rsb r8, r7, #64 ; 0x40 0x2864: 32800001 addcc r0, r0, #1 ; 0x1 0x2868: 35840018 strcc r0, [r4, #24] 0x286c: e1550008 cmp r5, r8 0x2870: 3a00001a bcc 0x28e0 0x2874: e0840007 add r0, r4, r7 0x2878: e280001c add r0, r0, #28 ; 0x1c 0x287c: e1a02008 mov r2, r8 0x2880: e1a01006 mov r1, r6 0x2884: eb0000eb bl 0x2c38 0x2888: e1a01004 mov r1, r4 0x288c: e284001c add r0, r4, #28 ; 0x1c 0x2890: eb000191 bl 0x2edc 0x2894: e0866008 add r6, r6, r8 0x2898: e0455008 sub r5, r5, r8 0x289c: e3a07000 mov r7, #0 ; 0x0 0x28a0: ea00000c b 0x28d8 0x28a4: e3160003 tst r6, #3 ; 0x3 0x28a8: 01a01004 moveq r1, r4 0x28ac: 01a00006 moveq r0, r6 0x28b0: 0a000005 beq 0x28cc 0x28b4: e3a02040 mov r2, #64 ; 0x40 0x28b8: e1a01006 mov r1, r6 0x28bc: e284001c add r0, r4, #28 ; 0x1c 0x28c0: eb0000dc bl 0x2c38 0x28c4: e1a01004 mov r1, r4 0x28c8: e284001c add r0, r4, #28 ; 0x1c 0x28cc: eb000182 bl 0x2edc 0x28d0: e2866040 add r6, r6, #64 ; 0x40 0x28d4: e2455040 sub r5, r5, #64 ; 0x40 0x28d8: e3550040 cmp r5, #64 ; 0x40 0x28dc: 2afffff0 bcs 0x28a4 0x28e0: e0840007 add r0, r4, r7 0x28e4: e280001c add r0, r0, #28 ; 0x1c 0x28e8: e1a02005 mov r2, r5 0x28ec: e1a01006 mov r1, r6 0x28f0: eb0000d0 bl 0x2c38 0x28f4: e3a00000 mov r0, #0 ; 0x0 0x28f8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 0x28fc: e92d41f0 push {r4, r5, r6, r7, r8, lr} 0x2900: e1b04000 movs r4, r0 0x2904: e1a05001 mov r5, r1 0x2908: e59f0120 ldr r0, [pc, #288] ; 0x2a30 0x290c: 13550000 cmpne r5, #0 ; 0x0 0x2910: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} 0x2914: e3a02080 mov r2, #128 ; 0x80 0x2918: e5940014 ldr r0, [r4, #20] 0x291c: e200103f and r1, r0, #63 ; 0x3f 0x2920: e2810001 add r0, r1, #1 ; 0x1 0x2924: e0811004 add r1, r1, r4 0x2928: e3500038 cmp r0, #56 ; 0x38 0x292c: e5c1201c strb r2, [r1, #28] 0x2930: 9a000008 bls 0x2958 0x2934: e2602040 rsb r2, r0, #64 ; 0x40 0x2938: e0840000 add r0, r4, r0 0x293c: e280001c add r0, r0, #28 ; 0x1c 0x2940: e3a01000 mov r1, #0 ; 0x0 0x2944: eb0000f9 bl 0x2d30 0x2948: e1a01004 mov r1, r4 0x294c: e284001c add r0, r4, #28 ; 0x1c 0x2950: eb000161 bl 0x2edc 0x2954: e3a00000 mov r0, #0 ; 0x0 0x2958: e2601040 rsb r1, r0, #64 ; 0x40 0x295c: e2412008 sub r2, r1, #8 ; 0x8 0x2960: e0840000 add r0, r4, r0 0x2964: e280001c add r0, r0, #28 ; 0x1c 0x2968: e3a01000 mov r1, #0 ; 0x0 0x296c: eb0000ef bl 0x2d30 0x2970: e5940018 ldr r0, [r4, #24] 0x2974: e59f60cc ldr r6, [pc, #204] ; 0x2a48 0x2978: e1a01180 lsl r1, r0, #3 0x297c: e5940014 ldr r0, [r4, #20] 0x2980: e1a07406 lsl r7, r6, #8 0x2984: e0811ea0 add r1, r1, r0, lsr #29 0x2988: e1a00180 lsl r0, r0, #3 0x298c: e0062c61 and r2, r6, r1, ror #24 0x2990: e1c401f4 strd r0, [r4, #20] 0x2994: e0071461 and r1, r7, r1, ror #8 0x2998: e1821001 orr r1, r2, r1 0x299c: e5841054 str r1, [r4, #84] 0x29a0: e0061c60 and r1, r6, r0, ror #24 0x29a4: e0070460 and r0, r7, r0, ror #8 0x29a8: e1810000 orr r0, r1, r0 0x29ac: e5840058 str r0, [r4, #88] 0x29b0: e284001c add r0, r4, #28 ; 0x1c 0x29b4: e1a01004 mov r1, r4 0x29b8: eb000147 bl 0x2edc 0x29bc: e3a00000 mov r0, #0 ; 0x0 0x29c0: e3c01003 bic r1, r0, #3 ; 0x3 0x29c4: e7942001 ldr r2, [r4, r1] 0x29c8: e1a02c22 lsr r2, r2, #24 0x29cc: e7c52000 strb r2, [r5, r0] 0x29d0: e7942001 ldr r2, [r4, r1] 0x29d4: e1a03822 lsr r3, r2, #16 0x29d8: e0852000 add r2, r5, r0 0x29dc: e2800004 add r0, r0, #4 ; 0x4 0x29e0: e5c23001 strb r3, [r2, #1] 0x29e4: e7943001 ldr r3, [r4, r1] 0x29e8: e3500014 cmp r0, #20 ; 0x14 0x29ec: e1a03423 lsr r3, r3, #8 0x29f0: e5c23002 strb r3, [r2, #2] 0x29f4: e7941001 ldr r1, [r4, r1] 0x29f8: e5c21003 strb r1, [r2, #3] 0x29fc: 3affffef bcc 0x29c0 0x2a00: e3a00000 mov r0, #0 ; 0x0 0x2a04: e3c01003 bic r1, r0, #3 ; 0x3 0x2a08: e7941001 ldr r1, [r4, r1] 0x2a0c: e0062c61 and r2, r6, r1, ror #24 0x2a10: e0071461 and r1, r7, r1, ror #8 0x2a14: e1821001 orr r1, r2, r1 0x2a18: e7851000 str r1, [r5, r0] 0x2a1c: e2800004 add r0, r0, #4 ; 0x4 0x2a20: e3500014 cmp r0, #20 ; 0x14 0x2a24: 3afffff6 bcc 0x2a04 0x2a28: e3a00000 mov r0, #0 ; 0x0 0x2a2c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 0x2a30: ffff0010 undefined instruction 0xffff0010 0x2a34: 67452301 strbvs r2, [r5, -r1, lsl #6] 0x2a38: efcdab89 svc 0x00cdab89 0x2a3c: 98badcfe ldmls sl!, {r1, r2, r3, r4, r5, r6, r7, sl, fp, ip, lr, pc} 0x2a40: 10325476 eorsne r5, r2, r6, ror r4 0x2a44: c3d2e1f0 bicsgt lr, r2, #60 ; 0x3c 0x2a48: 00ff00ff ldrshteq r0, [pc, #15] ; 0x2a5f // // R0=0xC0005ED0 // R1=0xC0005EC0 // R2=0x10 // 0x2a4c: e92d40f0 push {r4, r5, r6, r7, lr} 0x2a50: e24dd044 sub sp, sp, #68 ; 0x44 0x2a54: e3520040 cmp r2, #64 ; 0x40 0x2a58: e28d5004 add r5, sp, #4 ; 0x4 0x2a5c: e1a04002 mov r4, r2 0x2a60: e1a06000 mov r6, r0 0x2a64: e1a07001 mov r7, r1 0x2a68: 8a000007 bhi 0x2a8c 0x2a6c: e1a02004 mov r2, r4 0x2a70: e1a01007 mov r1, r7 0x2a74: e28d0004 add r0, sp, #4 ; 0x4 0x2a78: eb00006e bl 0x2c38 0x2a7c: e2642040 rsb r2, r4, #64 ; 0x40 0x2a80: e0850004 add r0, r5, r4 0x2a84: e3a01000 mov r1, #0 ; 0x0 0x2a88: ea00000b b 0x2abc 0x2a8c: e1a00006 mov r0, r6 0x2a90: ebffff53 bl 0x27e4 0x2a94: e1a02004 mov r2, r4 0x2a98: e1a01007 mov r1, r7 0x2a9c: e1a00006 mov r0, r6 0x2aa0: ebffff61 bl 0x282c 0x2aa4: e28d1004 add r1, sp, #4 ; 0x4 0x2aa8: e1a00006 mov r0, r6 0x2aac: ebffff92 bl 0x28fc 0x2ab0: e3a0202c mov r2, #44 ; 0x2c 0x2ab4: e3a01000 mov r1, #0 ; 0x0 0x2ab8: e2850014 add r0, r5, #20 ; 0x14 0x2abc: eb00009b bl 0x2d30 0x2ac0: e3a00000 mov r0, #0 ; 0x0 0x2ac4: e7d51000 ldrb r1, [r5, r0] 0x2ac8: e2211036 eor r1, r1, #54 ; 0x36 0x2acc: e7c51000 strb r1, [r5, r0] 0x2ad0: e2800001 add r0, r0, #1 ; 0x1 0x2ad4: e3500040 cmp r0, #64 ; 0x40 0x2ad8: 3afffff9 bcc 0x2ac4 0x2adc: e1a00006 mov r0, r6 0x2ae0: ebffff3f bl 0x27e4 0x2ae4: e3a02040 mov r2, #64 ; 0x40 0x2ae8: e28d1004 add r1, sp, #4 ; 0x4 0x2aec: e1a00006 mov r0, r6 0x2af0: ebffff4d bl 0x282c 0x2af4: e3a02014 mov r2, #20 ; 0x14 0x2af8: e1a01006 mov r1, r6 0x2afc: e286005c add r0, r6, #92 ; 0x5c 0x2b00: eb00004c bl 0x2c38 0x2b04: e3a00000 mov r0, #0 ; 0x0 0x2b08: e7d52000 ldrb r2, [r5, r0] 0x2b0c: e222206a eor r2, r2, #106 ; 0x6a 0x2b10: e7c52000 strb r2, [r5, r0] 0x2b14: e2800001 add r0, r0, #1 ; 0x1 0x2b18: e3500040 cmp r0, #64 ; 0x40 0x2b1c: 3afffff9 bcc 0x2b08 0x2b20: e1a00006 mov r0, r6 0x2b24: ebffff2e bl 0x27e4 0x2b28: e3a02040 mov r2, #64 ; 0x40 0x2b2c: e28d1004 add r1, sp, #4 ; 0x4 0x2b30: e1a00006 mov r0, r6 0x2b34: ebffff3c bl 0x282c 0x2b38: e3a02014 mov r2, #20 ; 0x14 0x2b3c: e1a01006 mov r1, r6 0x2b40: e2860070 add r0, r6, #112 ; 0x70 0x2b44: eb00003b bl 0x2c38 0x2b48: e28dd044 add sp, sp, #68 ; 0x44 0x2b4c: e3a00000 mov r0, #0 ; 0x0 0x2b50: e8bd80f0 pop {r4, r5, r6, r7, pc} 0x2b54: e92d4010 push {r4, lr} 0x2b58: e1a04000 mov r4, r0 0x2b5c: e3a02014 mov r2, #20 ; 0x14 0x2b60: e280105c add r1, r0, #92 ; 0x5c 0x2b64: eb000033 bl 0x2c38 0x2b68: e3a00000 mov r0, #0 ; 0x0 0x2b6c: e5840018 str r0, [r4, #24] 0x2b70: e3a00040 mov r0, #64 ; 0x40 0x2b74: e5840014 str r0, [r4, #20] 0x2b78: e3a00000 mov r0, #0 ; 0x0 0x2b7c: e8bd8010 pop {r4, pc} 0x2b80: e92d4010 push {r4, lr} 0x2b84: ebffff28 bl 0x282c 0x2b88: e3a00000 mov r0, #0 ; 0x0 0x2b8c: e8bd8010 pop {r4, pc} // // int genrate_final_key(char* input_data, char* output_key); // // genrate_final_key: 0x2b90: e92d4030 push {r4, r5, lr} 0x2b94: e24dd014 sub sp, sp, #20 ; 0x14 0x2b98: e1a05001 mov r5, r1 0x2b9c: e1a0100d mov r1, sp 0x2ba0: e1a04000 mov r4, r0 0x2ba4: ebffff54 bl 0x28fc 0x2ba8: e3a02014 mov r2, #20 ; 0x14 0x2bac: e2841070 add r1, r4, #112 ; 0x70 0x2bb0: e1a00004 mov r0, r4 0x2bb4: eb00001f bl 0x2c38 0x2bb8: e3a00000 mov r0, #0 ; 0x0 0x2bbc: e5840018 str r0, [r4, #24] 0x2bc0: e3a00040 mov r0, #64 ; 0x40 0x2bc4: e5840014 str r0, [r4, #20] 0x2bc8: e1a00004 mov r0, r4 0x2bcc: e3a02014 mov r2, #20 ; 0x14 0x2bd0: e1a0100d mov r1, sp 0x2bd4: ebffff14 bl 0x282c 0x2bd8: e1a01005 mov r1, r5 0x2bdc: e1a00004 mov r0, r4 0x2be0: ebffff45 bl 0x28fc 0x2be4: e28dd014 add sp, sp, #20 ; 0x14 0x2be8: e3a00000 mov r0, #0 ; 0x0 0x2bec: e8bd8030 pop {r4, r5, pc} // // R0 = 0x0C005EAC (Stack) // R1 = 0x0C002188 (READ From SD) // R2 = 0x14 // compare_key: 0x2bf0: e3a03000 mov r3, #0 ; 0x0 0x2bf4: e52de004 push {lr} ; (str lr, [sp, #-4]!) 0x2bf8: ea00000a b 0x2c28 loopa: 0x2bfc: e7d0c003 ldrb ip, [r0, r3] 0x2c00: e7d1e003 ldrb lr, [r1, r3] 0x2c04: e15c000e cmp ip, lr 0x2c08: 0a000005 beq 0x2c24 0x2c0c: e7d00003 ldrb r0, [r0, r3] 0x2c10: e7d11003 ldrb r1, [r1, r3] 0x2c14: e1500001 cmp r0, r1 0x2c18: 23e00000 mvncs r0, #0 ; 0x0 0x2c1c: 33a00001 movcc r0, #1 ; 0x1 0x2c20: e49df004 pop {pc} ; (ldr pc, [sp], #4) 0x2c24: e2833001 add r3, r3, #1 ; 0x1 0x2c28: e1530002 cmp r3, r2 0x2c2c: 3afffff2 bcc loopa 0x2c30: e3a00000 mov r0, #0 ; 0x0 0x2c34: e49df004 pop {pc} ; (ldr pc, [sp], #4) 0x2c38: e1500001 cmp r0, r1 0x2c3c: e3a03000 mov r3, #0 ; 0x0 0x2c40: 012fff1e bxeq lr 0x2c44: e040c001 sub ip, r0, r1 0x2c48: e15c0002 cmp ip, r2 0x2c4c: 2a000007 bcs 0x2c70 0x2c50: e2422001 sub r2, r2, #1 ; 0x1 0x2c54: ea000002 b 0x2c64 0x2c58: e7d13002 ldrb r3, [r1, r2] 0x2c5c: e7c03002 strb r3, [r0, r2] 0x2c60: eafffffa b 0x2c50 0x2c64: e3720001 cmn r2, #1 ; 0x1 0x2c68: 1afffffa bne 0x2c58 0x2c6c: e12fff1e bx lr 0x2c70: e041c000 sub ip, r1, r0 0x2c74: e15c0002 cmp ip, r2 0x2c78: 2a000005 bcs 0x2c94 0x2c7c: e1530002 cmp r3, r2 0x2c80: 37d1c003 ldrbcc ip, [r1, r3] 0x2c84: 37c0c003 strbcc ip, [r0, r3] 0x2c88: 32833001 addcc r3, r3, #1 ; 0x1 0x2c8c: 3afffffa bcc 0x2c7c 0x2c90: e12fff1e bx lr 0x2c94: e020c001 eor ip, r0, r1 0x2c98: e31c0003 tst ip, #3 ; 0x3 0x2c9c: 0a000005 beq 0x2cb8 0x2ca0: e1530002 cmp r3, r2 0x2ca4: 37d1c003 ldrbcc ip, [r1, r3] 0x2ca8: 37c0c003 strbcc ip, [r0, r3] 0x2cac: 32833001 addcc r3, r3, #1 ; 0x1 0x2cb0: 3afffffa bcc 0x2ca0 0x2cb4: e12fff1e bx lr 0x2cb8: e200c003 and ip, r0, #3 ; 0x3 0x2cbc: e35c0001 cmp ip, #1 ; 0x1 0x2cc0: 05d13000 ldrbeq r3, [r1] 0x2cc4: 05c03000 strbeq r3, [r0] 0x2cc8: 03a03001 moveq r3, #1 ; 0x1 0x2ccc: 0a000004 beq 0x2ce4 0x2cd0: e35c0002 cmp ip, #2 ; 0x2 0x2cd4: 0a000002 beq 0x2ce4 0x2cd8: e35c0003 cmp ip, #3 ; 0x3 0x2cdc: 1a000006 bne 0x2cfc 0x2ce0: ea000002 b 0x2cf0 0x2ce4: e7d1c003 ldrb ip, [r1, r3] 0x2ce8: e7c0c003 strb ip, [r0, r3] 0x2cec: e2833001 add r3, r3, #1 ; 0x1 0x2cf0: e7d1c003 ldrb ip, [r1, r3] 0x2cf4: e7c0c003 strb ip, [r0, r3] 0x2cf8: e2833001 add r3, r3, #1 ; 0x1 0x2cfc: e283c004 add ip, r3, #4 ; 0x4 0x2d00: e15c0002 cmp ip, r2 0x2d04: 9791c003 ldrls ip, [r1, r3] 0x2d08: 9780c003 strls ip, [r0, r3] 0x2d0c: 92833004 addls r3, r3, #4 ; 0x4 0x2d10: 9afffff9 bls 0x2cfc 0x2d14: ea000002 b 0x2d24 0x2d18: e7d1c003 ldrb ip, [r1, r3] 0x2d1c: e7c0c003 strb ip, [r0, r3] 0x2d20: e2833001 add r3, r3, #1 ; 0x1 0x2d24: e1530002 cmp r3, r2 0x2d28: 3afffffa bcc 0x2d18 0x2d2c: e12fff1e bx lr 0x2d30: e52de004 push {lr} ; (str lr, [sp, #-4]!) 0x2d34: e200e003 and lr, r0, #3 ; 0x3 0x2d38: e35e0001 cmp lr, #1 ; 0x1 0x2d3c: e3a03000 mov r3, #0 ; 0x0 0x2d40: e021c401 eor ip, r1, r1, lsl #8 0x2d44: e02cc80c eor ip, ip, ip, lsl #16 0x2d48: 03a03001 moveq r3, #1 ; 0x1 0x2d4c: 05c01000 strbeq r1, [r0] 0x2d50: 0a000004 beq 0x2d68 0x2d54: e35e0002 cmp lr, #2 ; 0x2 0x2d58: 0a000002 beq 0x2d68 0x2d5c: e35e0003 cmp lr, #3 ; 0x3 0x2d60: 1a000004 bne 0x2d78 0x2d64: ea000001 b 0x2d70 0x2d68: e7c01003 strb r1, [r0, r3] 0x2d6c: e2833001 add r3, r3, #1 ; 0x1 0x2d70: e7c01003 strb r1, [r0, r3] 0x2d74: e2833001 add r3, r3, #1 ; 0x1 0x2d78: e283e004 add lr, r3, #4 ; 0x4 0x2d7c: e15e0002 cmp lr, r2 0x2d80: 9780c003 strls ip, [r0, r3] 0x2d84: 92833004 addls r3, r3, #4 ; 0x4 0x2d88: 9afffffa bls 0x2d78 0x2d8c: ea000001 b 0x2d98 0x2d90: e7c01003 strb r1, [r0, r3] 0x2d94: e2833001 add r3, r3, #1 ; 0x1 0x2d98: e1530002 cmp r3, r2 0x2d9c: 3afffffb bcc 0x2d90 0x2da0: e49df004 pop {pc} ; (ldr pc, [sp], #4) // // void genrate_key(out char* key, char* signature, char* internal_random_key, int key_length) // // for(i=0;i

 

你可能感兴趣的:(s3c6410 irom 源代码分析)