[*] Binary protection state of nanddump
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function printf tear down of nanddump
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/sbin/nanddump @ 0x14850 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00014850 () | void fcn_00014850 (char * arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_8h_2;
| int32_t var_10h;
| int32_t var_10h_2;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_24h;
| int32_t var_28h;
| int32_t var_2ch;
| int32_t var_38h;
| int32_t var_48h;
| int32_t var_58h;
| int32_t var_58h_2;
| int32_t var_a0h;
| char * src;
| int32_t var_144h;
| r0 = arg1;
| r1 = arg2;
0x00014850 push {r4, r5, r6, r7, r8, sb, lr} |
0x00014854 sub sp, sp, 0x144 |
0x00014858 mov r2, 0 | r2 = 0;
0x0001485c mov r3, 0 | r3 = 0;
0x00014860 mov r4, r1 | r4 = r1;
0x00014864 add r1, sp, 0x38 | r1 += var_38h;
0x00014868 mov r6, r0 | r6 = r0;
0x0001486c strd r2, r3, [sp, 0x10] | __asm ("strd r2, r3, [var_10h]");
0x00014870 bl 0x10a58 | r0 = stat64 ();
0x00014874 cmp r0, 0 |
| if (r0 != 0) {
0x00014878 beq 0x148e0 |
0x0001487c bl 0x10b9c | errno_location ();
0x00014880 ldr r8, [pc, 0x450] |
0x00014884 mov r3, r6 | r3 = r6;
0x00014888 ldr r2, [pc, 0x44c] | r2 = stderr;
0x0001488c ldr r1, [pc, 0x44c] | r1 = "libmtd";
0x00014890 ldr r7, [r0] | r7 = *(r0);
0x00014894 mov r5, r0 | r5 = r0;
0x00014898 ldr r0, [r8] | r0 = *(0x14cd4);
0x0001489c bl 0x10ae8 | fprintf (r0, "libmtd", r2, r3, r4, r5)
0x000148a0 mov r0, r7 | r0 = r7;
0x000148a4 ldr r8, [r8] | r8 = *(0x14cd4);
0x000148a8 bl 0x10a4c | strerror (r0);
0x000148ac ldr r3, [pc, 0x430] | r3 = "%s: error!: cannot open \"%s\"\n";
0x000148b0 str r7, [sp] | *(sp) = r7;
0x000148b4 mov r2, 8 | r2 = 8;
0x000148b8 ldr r1, [pc, 0x428] | r1 = *(0x14ce4);
0x000148bc str r0, [sp, 4] | var_4h = r0;
0x000148c0 mov r0, r8 | r0 = r8;
0x000148c4 bl 0x10ae8 | fprintf (r0, r1, r2, "%s: error!: cannot open \"%s\"\n")
0x000148c8 ldr r3, [r5] | r3 = *(r5);
0x000148cc cmp r3, 2 |
| if (r3 != 2) {
0x000148d0 bne 0x148e0 | goto label_5;
| }
0x000148d4 ldr r1, [pc, 0x400] | r1 = stderr;
0x000148d8 ldr r0, [pc, 0x40c] | r0 = "_serror__d___s_";
0x000148dc bl 0x10a40 | printf ("_serror__d___s_", r1)
| }
| label_5:
0x000148e0 ldr r3, [sp, 0x48] | r3 = var_48h;
0x000148e4 and r3, r3, 0xf000 | r3 &= 0xf000;
0x000148e8 cmp r3, 0x2000 |
| if (r3 == 0x2000) {
0x000148ec beq 0x1491c | goto label_6;
| }
0x000148f0 bl 0x10b9c | errno_location ();
0x000148f4 mov r3, 0x16 | r3 = 0x16;
0x000148f8 ldr r2, [pc, 0x3dc] | r2 = stderr;
0x000148fc ldr r1, [pc, 0x3ec] | r1 = "_s:_MTD_subsystem_is_old_and_does_not_support_sysfs__so_MTD_character_device_nodes_have_to_exist";
0x00014900 str r3, [r0] | *(r0) = r3;
0x00014904 ldr r0, [pc, 0x3cc] |
0x00014908 mov r3, r6 | r3 = r6;
0x0001490c ldr r0, [r0] | r0 = *(0x14cd4);
0x00014910 bl 0x10ae8 | fprintf (r0, "_s:_MTD_subsystem_is_old_and_does_not_support_sysfs__so_MTD_character_device_nodes_have_to_exist", r2, r3)
| do {
| label_0:
0x00014914 mvn r5, 0 | r5 = ~0;
0x00014918 b 0x14a00 | goto label_4;
| label_6:
0x0001491c mov r2, 0x100 | r2 = 0x100;
0x00014920 mov r1, 0 | r1 = 0;
0x00014924 mov r0, r4 | r0 = r4;
0x00014928 bl 0x10b54 | memset (r0, r1, r2);
0x0001492c ldrd r8, sb, [sp, 0x58] | __asm ("ldrd r8, sb, [var_58h]");
0x00014930 mov r1, sb | r1 = sb;
0x00014934 mov r0, r8 | r0 = r8;
0x00014938 bl 0x10a70 | gnu_dev_major ();
0x0001493c mov r1, sb | r1 = sb;
0x00014940 mov r5, r0 | r5 = r0;
0x00014944 str r0, [r4, 4] | *((r4 + 4)) = r0;
0x00014948 mov r0, r8 | r0 = r8;
0x0001494c bl 0x10ab8 | gnu_dev_minor ();
0x00014950 cmp r5, 0x5a |
0x00014954 str r0, [r4, 8] | *((r4 + 8)) = r0;
| if (r5 == 0x5a) {
0x00014958 beq 0x14994 | goto label_7;
| }
0x0001495c bl 0x10b9c | errno_location ();
0x00014960 mov r3, 0x16 | r3 = 0x16;
0x00014964 ldr r2, [pc, 0x370] | r2 = stderr;
0x00014968 ldr r1, [pc, 0x384] | r1 = "%s: error!: \"%s\" is not a character device\n";
0x0001496c str r3, [r0] | *(r0) = r3;
0x00014970 mov r3, 0x5a | r3 = 0x5a;
0x00014974 str r3, [sp, 4] | var_4h = r3;
0x00014978 ldr r0, [pc, 0x358] |
0x0001497c ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00014980 str r3, [sp] | *(sp) = r3;
0x00014984 mov r3, r6 | r3 = r6;
0x00014988 ldr r0, [r0] | r0 = *(0x14cd4);
0x0001498c bl 0x10ae8 | fprintf (r0, "%s: error!: \"%s\" is not a character device\n", r2, r3)
0x00014990 b 0x14914 |
| } while (1);
| label_7:
0x00014994 add r0, r0, r0, lsr 31 | r0 += (r0 >> 31);
0x00014998 asr r0, r0, 1 | r0 >>= 1;
0x0001499c str r0, [r4] | *(r4) = r0;
0x000149a0 mov r1, 0 | r1 = 0;
0x000149a4 mov r0, r6 | r0 = r6;
0x000149a8 bl 0x10b60 | r0 = open64 ();
0x000149ac cmn r0, 1 |
0x000149b0 mov r5, r0 | r5 = r0;
| if (r0 == 1) {
0x000149b4 bne 0x14a0c |
0x000149b8 bl 0x10b9c | errno_location ();
0x000149bc ldr r7, [pc, 0x314] | r7 = *(0x14cd4);
0x000149c0 mov r3, r6 | r3 = r6;
0x000149c4 ldr r2, [pc, 0x310] | r2 = stderr;
0x000149c8 ldr r1, [pc, 0x310] | r1 = "libmtd";
0x000149cc ldr r4, [r0] | r4 = *(r0);
0x000149d0 ldr r0, [r7] | r0 = *(0x14cd4);
0x000149d4 bl 0x10ae8 | fprintf (r0, "libmtd", r2, r3, r4)
0x000149d8 mov r0, r4 | r0 = r4;
0x000149dc ldr r6, [r7] | r6 = *(0x14cd4);
0x000149e0 bl 0x10a4c | strerror (r0);
0x000149e4 str r4, [sp] | *(sp) = r4;
0x000149e8 ldr r3, [pc, 0x2f4] | r3 = "%s: error!: cannot open \"%s\"\n";
0x000149ec mov r2, 8 | r2 = 8;
0x000149f0 ldr r1, [pc, 0x2f0] | r1 = *(0x14ce4);
0x000149f4 str r0, [sp, 4] | var_4h = r0;
0x000149f8 mov r0, r6 | r0 = r6;
0x000149fc bl 0x10ae8 | fprintf (r0, r1, r2, "%s: error!: cannot open \"%s\"\n", r4)
| label_4:
0x00014a00 mov r0, r5 | r0 = r5;
0x00014a04 add sp, sp, 0x144 |
0x00014a08 pop {r4, r5, r6, r7, r8, sb, pc} |
| }
0x00014a0c add r2, sp, 0x18 | r2 += var_18h;
0x00014a10 ldr r1, [pc, 0x2e0] | r1 = "_s:_error_:___s__has_major_number__d__MTD_devices_have_major__d";
0x00014a14 bl 0x10a34 | r0 = ioctl (r0, "_s:_error_:___s__has_major_number__d__MTD_devices_have_major__d");
0x00014a18 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 == r0) {
0x00014a1c beq 0x14a70 | goto label_8;
| }
0x00014a20 bl 0x10b9c | errno_location ();
0x00014a24 ldr r6, [pc, 0x2ac] |
0x00014a28 ldr r2, [pc, 0x2ac] | r2 = stderr;
0x00014a2c ldr r1, [pc, 0x2c8] | r1 = *(0x14cf8);
0x00014a30 ldr r4, [r0] | r4 = *(r0);
0x00014a34 ldr r0, [r6] | r0 = *(0x14cd4);
0x00014a38 bl 0x10ae8 | fprintf (r0, r1, r2, r3, r4, r5, r6)
0x00014a3c mov r0, r4 | r0 = r4;
0x00014a40 ldr r6, [r6] | r6 = *(0x14cd4);
0x00014a44 bl 0x10a4c | strerror (r0);
0x00014a48 ldr r3, [pc, 0x294] | r3 = "%s: error!: cannot open \"%s\"\n";
0x00014a4c ldr r1, [pc, 0x294] | r1 = *(0x14ce4);
0x00014a50 mov r2, 8 | r2 = 8;
0x00014a54 str r4, [sp] | *(sp) = r4;
0x00014a58 str r0, [sp, 4] | var_4h = r0;
0x00014a5c mov r0, r6 | r0 = r6;
| do {
| label_1:
0x00014a60 bl 0x10ae8 | fprintf (r0, r1, r2, "%s: error!: cannot open \"%s\"\n", r4)
| label_2:
0x00014a64 mov r0, r5 | r0 = r5;
0x00014a68 bl 0x10bf0 | close (r0);
0x00014a6c b 0x14914 | goto label_0;
| label_8:
0x00014a70 add r2, sp, 0x10 | r2 += var_10h;
0x00014a74 ldr r1, [pc, 0x284] | r1 = "%s: error!: MEMGETINFO ioctl request failed\n";
0x00014a78 mov r0, r5 | r0 = r5;
0x00014a7c bl 0x10a34 | r0 = ioctl (r0, "%s: error!: MEMGETINFO ioctl request failed\n");
0x00014a80 cmn r0, 1 |
| if (r0 == 1) {
0x00014a84 ldrbne r3, [r4, 0xfc] | r3 = *((r4 + 0xfc));
| }
| if (r0 == 1) {
0x00014a88 orrne r3, r3, 2 | r3 |= 2;
| }
| if (r0 != 1) {
0x00014a8c bne 0x14ae8 | goto label_9;
| }
0x00014a90 bl 0x10b9c | r0 = errno_location ();
0x00014a94 ldr r7, [r0] | r7 = *(r0);
0x00014a98 cmp r7, 0x5f |
| if (r7 != 0x5f) {
0x00014a9c streq r8, [r0] | *(r0) = r8;
| }
| if (r7 != 0x5f) {
0x00014aa0 ldrbeq r3, [r4, 0xfc] | r3 = *((r4 + 0xfc));
| }
0x00014aa4 biceq r3, r3, 2 | __asm ("biceq r3, r3, 2");
| if (r7 == 0x5f) {
0x00014aa8 beq 0x14ae8 | goto label_9;
| }
0x00014aac ldr r4, [pc, 0x224] |
0x00014ab0 ldr r2, [pc, 0x224] | r2 = stderr;
0x00014ab4 ldr r1, [pc, 0x248] | r1 = *(0x14d00);
0x00014ab8 ldr r0, [r4] | r0 = *(0x14cd4);
0x00014abc bl 0x10ae8 | fprintf (r0, r1, r2, r3, r4)
0x00014ac0 mov r0, r7 | r0 = r7;
0x00014ac4 ldr r4, [r4] | r4 = *(0x14cd4);
0x00014ac8 bl 0x10a4c | strerror (r0);
0x00014acc str r7, [sp] | *(sp) = r7;
0x00014ad0 ldr r3, [pc, 0x20c] | r3 = "%s: error!: cannot open \"%s\"\n";
0x00014ad4 mov r2, 8 | r2 = 8;
0x00014ad8 ldr r1, [pc, 0x208] | r1 = *(0x14ce4);
0x00014adc str r0, [sp, 4] | var_4h = r0;
0x00014ae0 mov r0, r4 | r0 = r4;
0x00014ae4 b 0x14a60 |
| } while (1);
| label_9:
0x00014ae8 strb r3, [r4, 0xfc] | *((r4 + 0xfc)) = r3;
0x00014aec ldr r3, [sp, 0x28] | r3 = var_28h;
0x00014af0 ldrb r7, [sp, 0x18] | r7 = var_18h;
0x00014af4 ldr r0, [sp, 0x20] | r0 = var_20h;
0x00014af8 ldr r2, [sp, 0x24] | r2 = var_24h;
0x00014afc ldr ip, [sp, 0x2c] | ip = var_2ch;
0x00014b00 mov r1, 0 | r1 = 0;
0x00014b04 cmp r3, 0 |
0x00014b08 str r7, [r4, 0xc] | *((r4 + 0xc)) = r7;
0x00014b0c strd r0, r1, [r4, 0xd8] | __asm ("strd r0, r1, [r4, 0xd8]");
0x00014b10 str r2, [r4, 0xe4] | *((r4 + 0xe4)) = r2;
0x00014b14 str r3, [r4, 0xe8] | *((r4 + 0xe8)) = r3;
0x00014b18 str ip, [r4, 0xf0] | *((r4 + 0xf0)) = ip;
| if (r3 > 0) {
0x00014b1c bgt 0x14b40 | goto label_10;
| }
0x00014b20 str r3, [sp, 4] | var_4h = r3;
0x00014b24 str r6, [sp] | *(sp) = r6;
0x00014b28 ldr r2, [pc, 0x1ac] | r2 = stderr;
0x00014b2c ldr r3, [r4] | r3 = *(r4);
0x00014b30 ldr r1, [pc, 0x1d0] | r1 = "_s:_error_:_MEMGETBADBLOCK_ioctl_failed";
| do {
0x00014b34 ldr r0, [pc, 0x19c] |
0x00014b38 ldr r0, [r0] | r0 = *(0x14cd4);
0x00014b3c b 0x14a60 | goto label_1;
| label_10:
0x00014b40 cmp r2, r3 |
0x00014b44 cmpge r2, 0 | __asm ("cmpge r2, 0");
| if (r2 > r3) {
0x00014b48 bgt 0x14b64 | goto label_11;
| }
0x00014b4c str r2, [sp, 4] | var_4h = r2;
0x00014b50 str r6, [sp] | *(sp) = r6;
0x00014b54 ldr r2, [pc, 0x180] | r2 = stderr;
0x00014b58 ldr r3, [r4] | r3 = *(r4);
0x00014b5c ldr r1, [pc, 0x1a8] | r1 = "%s: error!: mtd%d (%s) has insane min. I/O unit size %d\n";
0x00014b60 b 0x14b34 |
| } while (1);
| label_11:
0x00014b64 orrs r3, r0, r1 | r3 = r0 | r1;
| if (r3 != r0) {
0x00014b68 beq 0x14b7c |
0x00014b6c asr r3, r2, 0x1f | r3 = r2 >> 0x1f;
0x00014b70 cmp r0, r2 |
0x00014b74 sbcs ip, r1, r3 | __asm ("sbcs ip, r1, r3");
| if (r0 >= r2) {
0x00014b78 bge 0x14ba0 | goto label_12;
| }
| }
0x00014b7c strd r0, r1, [sp, 8] | __asm ("strd r0, r1, [var_8h]");
0x00014b80 ldr r0, [pc, 0x150] |
0x00014b84 str r6, [sp] | *(sp) = r6;
0x00014b88 ldr r2, [pc, 0x14c] | r2 = stderr;
0x00014b8c ldr r3, [r4] | r3 = *(r4);
0x00014b90 ldr r1, [pc, 0x178] | r1 = "_s:_error_:_mtd_d___s__has_insane_eraseblock_size__d";
0x00014b94 ldr r0, [r0] | r0 = *(0x14cd4);
0x00014b98 bl 0x10ae8 | fprintf (r0, "_s:_error_:_mtd_d___s__has_insane_eraseblock_size__d", r2, r3, r4, r5, r6)
0x00014b9c b 0x14a64 | goto label_2;
| label_12:
0x00014ba0 bl 0x14f34 | fcn_00014f34 (r0);
0x00014ba4 str r0, [r4, 0xe0] | *((r4 + 0xe0)) = r0;
0x00014ba8 cmp r7, 8 |
| if (r7 > 8) {
| /* switch table (9 cases) at 0x14bb4 */
0x00014bac ldrls pc, [pc, r7, lsl 2] | offset_0 = r7 << 2;
| pc = *((pc + offset_0));
| }
0x00014bb0 b 0x14a64 | goto label_2;
0x00014bd8 ldr r0, [pc, 0xf8] |
0x00014bdc str r6, [sp] | *(sp) = r6;
0x00014be0 ldr r2, [pc, 0xf4] | r2 = stderr;
0x00014be4 ldr r3, [r4] | r3 = *(r4);
0x00014be8 ldr r1, [pc, 0x124] | r1 = "_s:_error_:_mtd_d___s__has_insane_size__lld";
0x00014bec ldr r0, [r0] | r0 = *(0x14cd4);
0x00014bf0 bl 0x10ae8 | fprintf (r0, "_s:_error_:_mtd_d___s__has_insane_size__lld", r2, r3, r4, r5, r6)
0x00014bf4 b 0x14a64 | goto label_2;
0x00014bf8 ldr r1, [pc, 0x118] | r1 = "%s: error!: mtd%d (%s) is removable and is not present\n";
| label_3:
0x00014bfc add r0, r4, 0x10 | r0 = r4 + 0x10;
0x00014c00 bl 0x10a28 | strcpy (r0, "%s: error!: mtd%d (%s) is removable and is not present\n");
0x00014c04 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00014c08 mov r0, r5 | r0 = r5;
0x00014c0c tst r3, 0x400 |
| if ((r3 & 0x400) == 0) {
0x00014c10 ldrbne r3, [r4, 0xfc] | r3 = *((r4 + 0xfc));
| }
| if ((r3 & 0x400) == 0) {
0x00014c14 orrne r3, r3, 1 | r3 |= 1;
| }
| if ((r3 & 0x400) == 0) {
0x00014c18 strbne r3, [r4, 0xfc] | *((r4 + 0xfc)) = r3;
| }
0x00014c1c ldr r3, [r4, 0xe8] | r3 = *((r4 + 0xe8));
0x00014c20 str r3, [r4, 0xec] | *((r4 + 0xec)) = r3;
0x00014c24 bl 0x10bf0 | close (r0);
0x00014c28 mov r0, r6 | r0 = r6;
0x00014c2c bl 0x14684 | r0 = fcn_00014684 (r0);
0x00014c30 bic r0, r0, r0, asr 31 | r0 = BIT_MASK (r0, r0);
0x00014c34 str r0, [r4, 0xf4] | *((r4 + 0xf4)) = r0;
0x00014c38 add r0, sp, 0xa0 | r0 += var_a0h;
0x00014c3c bl 0x143a8 | fcn_000143a8 (r0);
0x00014c40 subs r5, r0, 0 | r5 -= var_a0h;
| if (r5 != var_a0h) {
0x00014c44 bne 0x14914 | goto label_0;
| }
| do {
0x00014c48 add r0, sp, 0xa0 | r0 += var_a0h;
0x00014c4c bl 0x14244 | r0 = fcn_00014244 (r0);
0x00014c50 cmp r0, 0 |
| if (r0 == 0) {
0x00014c54 bne 0x14cb8 |
0x00014c58 ldr r3, [pc, 0xbc] | r3 = "ram";
0x00014c5c ldr r0, [pc, 0x74] |
0x00014c60 str r3, [sp] | *(sp) = r3;
0x00014c64 ldr r2, [pc, 0x70] | r2 = stderr;
0x00014c68 ldr r3, [r4] | r3 = *(r4);
0x00014c6c ldr r1, [pc, 0xac] | r1 = "/proc/mtd";
0x00014c70 ldr r0, [r0] | r0 = *(0x14cd4);
0x00014c74 bl 0x10ae8 | r0 = fprintf (r0, "/proc/mtd", r2, "ram")
0x00014c78 bl 0x10b9c | errno_location ();
0x00014c7c mov r3, 2 | r3 = 2;
0x00014c80 str r3, [r0] | *(r0) = r3;
0x00014c84 b 0x14914 | goto label_0;
0x00014c88 ldr r1, [pc, 0x94] | r1 = "%s: error!: mtd%d not found in \"%s\"\n";
0x00014c8c b 0x14bfc | goto label_3;
0x00014c90 ldr r1, [pc, 0x90] | r1 = *(0x14d24);
0x00014c94 b 0x14bfc | goto label_3;
0x00014c98 ldr r1, [pc, 0x8c] | r1 = *(0x14d28);
0x00014c9c b 0x14bfc | goto label_3;
0x00014ca0 ldr r1, [pc, 0x88] | r1 = "nand";
0x00014ca4 b 0x14bfc | goto label_3;
0x00014ca8 ldr r1, [pc, 0x84] | r1 = "mlc_nand";
0x00014cac b 0x14bfc | goto label_3;
0x00014cb0 ldr r1, [pc, 0x80] | r1 = "dataflash";
0x00014cb4 b 0x14bfc | goto label_3;
| }
0x00014cb8 ldr r3, [r4] | r3 = *(r4);
0x00014cbc ldr r2, [sp, 0xa0] | r2 = var_a0h;
0x00014cc0 cmp r2, r3 |
0x00014cc4 bne 0x14c48 |
| } while (r2 != r3);
0x00014cc8 add r1, sp, 0xb0 | r1 += src;
0x00014ccc add r0, r4, 0x51 | r0 = r4 + 0x51;
0x00014cd0 bl 0x10a28 | strcpy (r0, r1);
0x00014cd4 b 0x14a00 | goto label_4;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/sbin/nanddump @ 0x10cdc */
| #include <stdint.h>
|
; (fcn) main () | int32_t main (int32_t argc, char ** argv) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_8h_2;
| int32_t var_10h;
| FILE * format;
| int32_t var_18h_2;
| void * s;
| void * ptr;
| int32_t var_28h;
| int32_t var_28h_2;
| int32_t var_30h;
| int32_t var_30h_2;
| int32_t var_38h;
| int32_t var_3ch;
| int32_t var_40h;
| int32_t var_44h;
| int32_t var_48h;
| int32_t var_4ch;
| int32_t var_50h;
| int32_t var_54h;
| int32_t var_58h;
| int32_t var_5ch;
| char * var_68h;
| int32_t var_b8h;
| int32_t var_190h;
| int32_t var_0h_2;
| int32_t var_19ch;
| size_t var_1a0h;
| size_t size;
| int32_t var_1b8h;
| int32_t var_1bch;
| r0 = argc;
| r1 = argv;
0x00010cdc push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00010ce0 ldr r4, [pc, 0xb24] | r4 = *(0x11808);
0x00010ce4 ldr r5, [pc, 0xb24] | r5 = *(0x1180c);
0x00010ce8 sub sp, sp, 0x1bc |
0x00010cec mov r3, 0 | r3 = 0;
0x00010cf0 mov r6, r0 | r6 = r0;
0x00010cf4 mov sl, r1 | sl = r1;
0x00010cf8 mov sb, 1 | sb = 1;
0x00010cfc str r3, [sp, 0x68] | var_68h = r3;
| do {
| label_0:
0x00010d00 ldr r3, [pc, 0xb0c] | r3 = *(0x11810);
0x00010d04 add r8, sp, 0x1b8 | r8 += var_1b8h;
0x00010d08 mov r7, 0 | r7 = 0;
0x00010d0c str r7, [r8, -0x100]! | *((r8 -= 0x100)) = r7;
0x00010d10 add r2, r3, 0xf0 | r2 = r3 + 0xf0;
0x00010d14 str r8, [sp] | *(sp) = r8;
0x00010d18 mov r1, sl | r1 = sl;
0x00010d1c mov r0, r6 | r0 = r6;
0x00010d20 bl 0x10a64 | r0 = getopt_long ();
0x00010d24 cmn r0, 1 |
0x00010d28 mov fp, r0 |
| if (r0 == 1) {
0x00010d2c beq 0x10f78 | goto label_20;
| }
0x00010d30 cmp r0, 0x68 |
| if (r0 == 0x68) {
0x00010d34 beq 0x10f60 | goto label_21;
| }
| if (r0 > 0x68) {
0x00010d38 bgt 0x10d88 | goto label_22;
| }
0x00010d3c cmp r0, 0x56 |
| if (r0 == 0x56) {
0x00010d40 beq 0x10e90 | goto label_23;
| }
| if (r0 > 0x56) {
0x00010d44 bgt 0x10d68 | goto label_24;
| }
0x00010d48 cmp r0, r7 |
| if (r0 == r7) {
0x00010d4c beq 0x10de0 | goto label_25;
| }
0x00010d50 cmp r0, 0x3f |
0x00010d54 bne 0x10d00 |
| } while (r0 != 0x3f);
| label_1:
0x00010d58 ldr r3, [sp, 0x68] | r3 = var_68h;
0x00010d5c add r3, r3, 1 | r3++;
0x00010d60 str r3, [sp, 0x68] | var_68h = r3;
0x00010d64 b 0x10d00 | goto label_0;
| label_24:
0x00010d68 cmp r0, 0x63 |
| if (r0 == 0x63) {
0x00010d6c beq 0x10f4c | goto label_26;
| }
0x00010d70 cmp r0, 0x66 |
| if (r0 == 0x66) {
0x00010d74 beq 0x10eb4 | goto label_27;
| }
0x00010d78 cmp r0, 0x61 |
| if (r0 != 0x61) {
0x00010d7c moveq r3, 1 | r3 = 1;
| }
| if (r0 != 0x61) {
0x00010d80 strbeq r3, [r4, 0x20] | *((r4 + 0x20)) = r3;
| }
0x00010d84 b 0x10d00 | goto label_0;
| label_22:
0x00010d88 cmp r0, 0x6f |
| if (r0 == 0x6f) {
0x00010d8c beq 0x10f38 | goto label_28;
| }
| if (r0 <= 0x6f) {
0x00010d90 bgt 0x10dac |
0x00010d94 cmp r0, 0x6c |
| if (r0 == 0x6c) {
0x00010d98 beq 0x10f20 | goto label_29;
| }
0x00010d9c cmp r0, 0x6e |
| if (r0 != 0x6e) {
0x00010da0 moveq r3, 1 | r3 = 1;
| }
| if (r0 != 0x6e) {
0x00010da4 strbeq r3, [r4, 0x24] | *((r4 + 0x24)) = r3;
| }
0x00010da8 b 0x10d00 | goto label_0;
| }
0x00010dac cmp r0, 0x71 |
| if (r0 != 0x71) {
0x00010db0 moveq r3, 1 | r3 = 1;
| }
| if (r0 == 0x71) {
0x00010db4 strbeq r3, [r4, 0x23] | *((r4 + 0x23)) = r3;
| goto label_30;
| }
| if (r0 == 0x71) {
| label_30:
0x00010db8 beq 0x10d00 | goto label_0;
| }
| if (r0 < 0x71) {
0x00010dbc blt 0x10f54 | goto label_31;
| }
0x00010dc0 cmp r0, 0x73 |
| if (r0 != 0x73) {
0x00010dc4 bne 0x10d00 | goto label_0;
| }
0x00010dc8 ldr r3, [pc, 0xa48] | r3 = "version";
0x00010dcc add r1, sp, 0x68 | r1 += var_68h;
0x00010dd0 ldr r0, [r3] | r0 = "version";
0x00010dd4 bl 0x119dc | fcn_000119dc ("version", r1);
0x00010dd8 strd r0, r1, [r4, 8] | __asm ("strd r0, r1, [r4, 8]");
0x00010ddc b 0x10d00 | goto label_0;
| label_25:
0x00010de0 ldr r2, [sp, 0xb8] | r2 = var_b8h;
0x00010de4 cmp r2, 2 |
| if (r2 == 2) {
0x00010de8 beq 0x10e60 | goto label_32;
| }
0x00010dec cmp r2, 3 |
| if (r2 != 3) {
0x00010df0 moveq r3, 1 | r3 = 1;
| }
| if (r2 == 3) {
0x00010df4 strbeq r3, [r4] | *(r4) = r3;
| goto label_33;
| }
| if (r2 == 3) {
| label_33:
0x00010df8 beq 0x10d00 | goto label_0;
| }
0x00010dfc cmp r2, 1 |
| if (r2 != 1) {
0x00010e00 bne 0x10d00 | goto label_0;
| }
0x00010e04 ldr r3, [pc, 0xa0c] | r3 = "version";
0x00010e08 ldr r1, [pc, 0xa0c] | r1 = optarg;
0x00010e0c ldr r7, [r3] | r7 = "version";
0x00010e10 mov r0, r7 | r0 = r7;
0x00010e14 bl 0x10b78 | r0 = strcmp (r0, r1);
0x00010e18 cmp r0, 0 |
| if (r0 != 0) {
0x00010e1c moveq r3, 0 | r3 = 0;
| }
| if (r0 == 0) {
0x00010e20 beq 0x10e3c | goto label_34;
| }
0x00010e24 ldr r1, [pc, 0x9f4] | r1 = "padbad";
0x00010e28 mov r0, r7 | r0 = r7;
0x00010e2c bl 0x10b78 | r0 = strcmp (r0, "padbad");
0x00010e30 cmp r0, 0 |
| if (r0 != 0) {
0x00010e34 bne 0x10e44 | goto label_35;
| }
0x00010e38 mov r3, 1 | r3 = 1;
| do {
| label_34:
0x00010e3c str r3, [r5] | *(r5) = r3;
0x00010e40 b 0x10d00 | goto label_0;
| label_35:
0x00010e44 ldr r1, [pc, 0x9d8] | r1 = "dumpbad";
0x00010e48 mov r0, r7 | r0 = r7;
0x00010e4c bl 0x10b78 | r0 = strcmp (r0, "dumpbad");
0x00010e50 cmp r0, 0 |
| if (r0 != 0) {
0x00010e54 moveq r3, 2 | r3 = 2;
| }
0x00010e58 beq 0x10e3c |
| } while (r0 == 0);
0x00010e5c b 0x10d58 | goto label_1;
| label_32:
0x00010e60 cmp sb, 0 |
| if (sb == 0) {
0x00010e64 movne r2, 1 | r2 = 1;
| }
| if (sb == 0) {
0x00010e68 strbne r2, [r5, 4] | *((r5 + 4)) = r2;
| }
| if (sb != 0) {
0x00010e6c movne sb, r0 | sb = r0;
| goto label_36;
| }
| if (sb != 0) {
| label_36:
0x00010e70 bne 0x10d00 | goto label_0;
| }
| label_2:
0x00010e74 ldr r3, [pc, 0x9ac] | r3 = "skipbad";
0x00010e78 ldr r2, [pc, 0x9ac] | r2 = stderr;
0x00010e7c ldr r1, [pc, 0x9ac] | r1 = "nanddump";
0x00010e80 ldr r0, [r3] | r0 = "skipbad";
0x00010e84 bl 0x10ae8 | fprintf ("skipbad", "nanddump", r2, "skipbad")
| do {
| label_4:
0x00010e88 mvn r0, 0 | r0 = ~0;
0x00010e8c b 0x10eb0 | goto label_5;
| label_23:
0x00010e90 ldr r1, [pc, 0x994] | r1 = stderr;
0x00010e94 ldr r2, [pc, 0x998] | r2 = "_s:_error_:___oob_and___oomitoob_are_mutually_exclusive";
0x00010e98 ldr r0, [pc, 0x998] | r0 = "2.1.0";
0x00010e9c bl 0x10a40 | printf ("2.1.0", r1, "_s:_error_:___oob_and___oomitoob_are_mutually_exclusive")
0x00010ea0 ldr r1, [pc, 0x984] | r1 = stderr;
0x00010ea4 ldr r0, [pc, 0x990] | r0 = "%s (mtd-utils) %s\n";
0x00010ea8 bl 0x10a40 | printf ("%s (mtd-utils) %s\n", r1)
| label_3:
0x00010eac mov r0, r7 | r0 = r7;
| label_5:
0x00010eb0 bl 0x10ba8 | exit (r0);
| label_27:
0x00010eb4 ldr r3, [pc, 0x95c] | r3 = "version";
0x00010eb8 ldr r0, [r3] | r0 = "version";
0x00010ebc cmp r0, 0 |
| if (r0 == 0) {
0x00010ec0 beq 0x10f18 | goto label_37;
| }
0x00010ec4 bl 0x10b48 | r0 = strdup (r0);
0x00010ec8 cmp r0, 0 |
| if (r0 != 0) {
0x00010ecc bne 0x10f18 | goto label_37;
| }
0x00010ed0 bl 0x10b9c | errno_location ();
0x00010ed4 ldr r5, [pc, 0x94c] |
0x00010ed8 ldr r2, [pc, 0x94c] | r2 = stderr;
0x00010edc ldr r1, [pc, 0x95c] | r1 = "_1_s_comes_with_NO_WARRANTYto_the_extent_permitted_by_law.You_may_redistribute_copies_of__1_sunder_the_terms_of_the_GNU_General_Public_Licence.See_the_file__COPYING_for_more_information.";
0x00010ee0 ldr r4, [r0] | r4 = *(r0);
0x00010ee4 ldr r0, [r5] | r0 = "skipbad";
0x00010ee8 bl 0x10ae8 | fprintf ("skipbad", "_1_s_comes_with_NO_WARRANTYto_the_extent_permitted_by_law.You_may_redistribute_copies_of__1_sunder_the_terms_of_the_GNU_General_Public_Licence.See_the_file__COPYING_for_more_information.", r2, r3, r4, "skipbad")
0x00010eec mov r0, r4 | r0 = r4;
0x00010ef0 ldr r5, [r5] | r5 = "skipbad";
0x00010ef4 bl 0x10a4c | strerror (r0);
0x00010ef8 str r4, [sp] | *(sp) = r4;
0x00010efc ldr r3, [pc, 0x940] | r3 = "%s: error!: out of memory\n";
0x00010f00 mov r2, 0xa | r2 = 0xa;
0x00010f04 ldr r1, [pc, 0x93c] | r1 = *(0x11844);
0x00010f08 str r0, [sp, 4] | var_4h = r0;
0x00010f0c mov r0, r5 | r0 = r5;
0x00010f10 bl 0x10ae8 | fprintf (r0, r1, r2, "%s: error!: out of memory\n", r4)
0x00010f14 b 0x10e88 |
| } while (1);
| label_37:
0x00010f18 str r0, [r4, 0x10] | *((r4 + 0x10)) = r0;
0x00010f1c b 0x10d00 | goto label_0;
| label_29:
0x00010f20 ldr r3, [pc, 0x8f0] | r3 = "version";
0x00010f24 add r1, sp, 0x68 | r1 += var_68h;
0x00010f28 ldr r0, [r3] | r0 = "version";
0x00010f2c bl 0x119dc | fcn_000119dc ("version", r1);
0x00010f30 strd r0, r1, [r4, 0x18] | __asm ("strd r0, r1, [r4, 0x18]");
0x00010f34 b 0x10d00 | goto label_0;
| label_28:
0x00010f38 cmp sb, 0 |
| if (sb == 0) {
0x00010f3c beq 0x10e74 | goto label_2;
| }
0x00010f40 strb r7, [r5, 4] | *((r5 + 4)) = r7;
0x00010f44 mov sb, r7 | sb = r7;
0x00010f48 b 0x10d00 | goto label_0;
| label_26:
0x00010f4c mov r3, 1 | r3 = 1;
0x00010f50 strb r3, [r4, 0x21] | *((r4 + 0x21)) = r3;
| label_31:
0x00010f54 mov r3, 1 | r3 = 1;
0x00010f58 strb r3, [r4, 0x22] | *((r4 + 0x22)) = r3;
0x00010f5c b 0x10d00 | goto label_0;
| label_21:
0x00010f60 ldr r3, [pc, 0x8e4] | r3 = "_serror__d___s_";
0x00010f64 ldr r2, [pc, 0x8c0] | r2 = stderr;
0x00010f68 ldr r1, [pc, 0x8e0] | r1 = stdout;
0x00010f6c ldr r0, [r3] | r0 = "_serror__d___s_";
0x00010f70 bl 0x10ae8 | fprintf ("_serror__d___s_", r1, r2, "_serror__d___s_")
0x00010f74 b 0x10eac | goto label_3;
| label_20:
0x00010f78 ldr r2, [pc, 0x88c] | r2 = *(0x11808);
0x00010f7c ldrd r0, r1, [r2, 8] | __asm ("ldrd r0, r1, [r2, 8]");
0x00010f80 mov r7, r2 | r7 = r2;
0x00010f84 cmp r0, 0 |
0x00010f88 sbcs r3, r1, 0 | __asm ("sbcs r3, r1, 0");
| if (r0 >= 0) {
0x00010f8c bge 0x10fac | goto label_38;
| }
0x00010f90 strd r0, r1, [sp] | __asm ("strd r0, r1, [sp]");
0x00010f94 ldr r2, [pc, 0x890] | r2 = stderr;
0x00010f98 ldr r1, [pc, 0x8b4] | r1 = "Usage:__s__OPTIONS__MTD_deviceDumps_the_contents_of_a_nand_mtd_partition._h___________help_______________Display_this_help_and_exit_____________version____________Output_version_information_and_exit_____________bbMETHOD__________Choose_bad_block_han";
| do {
0x00010f9c ldr r0, [pc, 0x884] |
0x00010fa0 ldr r0, [r0] | r0 = "skipbad";
0x00010fa4 bl 0x10ae8 | fprintf (r0, "Usage:__s__OPTIONS__MTD_deviceDumps_the_contents_of_a_nand_mtd_partition._h___________help_______________Display_this_help_and_exit_____________version____________Output_version_information_and_exit_____________bbMETHOD__________Choose_bad_block_han", r2)
0x00010fa8 b 0x10e88 | goto label_4;
| label_38:
0x00010fac ldrd r0, r1, [r2, 0x18] | __asm ("ldrd r0, r1, [r2, 0x18]");
0x00010fb0 cmp r0, 0 |
0x00010fb4 sbcs r3, r1, 0 | __asm ("sbcs r3, r1, 0");
0x00010fb8 strdlt r0, r1, [sp] | __asm ("strdlt r0, r1, [sp]");
| if (r0 >= 0) {
0x00010fbc ldrlt r2, [pc, 0x868] | r2 = "nanddump";
| }
| if (r0 >= 0) {
0x00010fc0 ldrlt r1, [pc, 0x890] | r1 = "%s: error!: Can't specify negative length with option -l: %lld\n";
| }
0x00010fc4 blt 0x10f9c |
| } while (r0 < 0);
0x00010fc8 ldrb r1, [r2, 0x23] | r1 = *((r2 + 0x23));
0x00010fcc cmp r1, 0 |
| if (r1 == 0) {
0x00010fd0 beq 0x10ff8 | goto label_39;
| }
0x00010fd4 ldrb r2, [r2, 0x22] | r2 = *((r2 + 0x22));
0x00010fd8 cmp r2, 0 |
| if (r2 == 0) {
0x00010fdc beq 0x10ff8 | goto label_39;
| }
0x00010fe0 ldr r3, [pc, 0x840] | r3 = "skipbad";
0x00010fe4 ldr r0, [pc, 0x870] | r0 = "%s: error!: Can't specify negative length with option -l: %lld\n";
0x00010fe8 ldr r1, [r3] | r1 = "skipbad";
| do {
0x00010fec bl 0x10bcc | fputs ("%s: error!: Can't specify negative length with option -l: %lld\n", "skipbad");
| label_6:
0x00010ff0 mov r0, 1 | r0 = 1;
0x00010ff4 b 0x10eb0 | goto label_5;
| label_39:
0x00010ff8 ldrb r2, [r7, 0x20] | r2 = *((r7 + 0x20));
0x00010ffc cmp r2, 0 |
| if (r2 == 0) {
0x00011000 beq 0x1101c | goto label_40;
| }
0x00011004 ldrb r2, [r7, 0x22] | r2 = *((r7 + 0x22));
0x00011008 cmp r2, 0 |
| if (r2 == 0) {
0x0001100c ldrne r3, [pc, 0x814] | r3 = obj.stderr;
| }
| if (r2 == 0) {
0x00011010 ldrne r0, [pc, 0x848] | r0 = "The forcebinary and pretty print options are\nmutually-exclusive. Choose one or the other.\n";
| }
| if (r2 == 0) {
0x00011014 ldrne r1, [r3] | r1 = *(r3);
| }
0x00011018 bne 0x10fec |
| } while (r2 != 0);
| label_40:
0x0001101c ldr r2, [pc, 0x840] |
0x00011020 ldr r2, [r2] | r2 = "The forcebinary and pretty print options are\nmutually-exclusive. Choose one or the other.\n";
0x00011024 sub r6, r6, r2 | r6 -= r2;
0x00011028 cmp r6, 1 |
| if (r6 == 1) {
0x0001102c bne 0x1103c |
0x00011030 ldr r4, [sp, 0x68] | r4 = var_68h;
0x00011034 cmp r4, 0 |
| if (r4 == 0) {
0x00011038 beq 0x11054 | goto label_41;
| }
| }
0x0001103c ldr r3, [pc, 0x7e4] | r3 = "skipbad";
0x00011040 ldr r2, [pc, 0x7e4] | r2 = stderr;
0x00011044 ldr r1, [pc, 0x804] | r1 = stdout;
0x00011048 ldr r0, [r3] | r0 = "skipbad";
0x0001104c bl 0x10ae8 | fprintf ("skipbad", r1, r2, "skipbad")
0x00011050 b 0x10ff0 | goto label_6;
| label_41:
0x00011054 ldr r2, [sl, r2, lsl 2] | offset_0 = r2 << 2;
| r2 = *((sl + offset_0));
0x00011058 str r2, [r7, 0x28] | *((r7 + 0x28)) = r2;
0x0001105c bl 0x12a98 | r0 = fcn_00012a98 ();
0x00011060 subs r3, r0, 0 | r3 = r0 - 0;
0x00011064 str r3, [sp, 0x3c] | var_3ch = r3;
| if (r3 != r0) {
0x00011068 bne 0x1108c | goto label_42;
| }
0x0001106c ldr r2, [pc, 0x7b8] | r2 = stderr;
0x00011070 ldr r1, [pc, 0x7f0] | r1 = optind;
| do {
0x00011074 ldr r0, [pc, 0x7ac] |
0x00011078 ldr r0, [r0] | r0 = "skipbad";
0x0001107c bl 0x10ae8 | fprintf ("skipbad", r1, r2)
| label_9:
0x00011080 mov r0, fp | r0 = fp;
0x00011084 add sp, sp, 0x1bc |
0x00011088 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_42:
0x0001108c mov r1, r4 | r1 = r4;
0x00011090 ldr r0, [r7, 0x28] | r0 = *((r7 + 0x28));
0x00011094 bl 0x10b60 | r0 = open64 ();
0x00011098 cmn r0, 1 |
0x0001109c mov r5, r0 | r5 = r0;
| if (r0 == 1) {
0x000110a0 bne 0x110b0 |
0x000110a4 ldr r0, [r7, 0x28] | r0 = *((r7 + 0x28));
0x000110a8 bl 0x10a88 | perror (r0);
0x000110ac b 0x10ff0 | goto label_6;
| }
0x000110b0 mov r2, r8 | r2 = r8;
0x000110b4 ldr r1, [r7, 0x28] | r1 = *((r7 + 0x28));
0x000110b8 ldr r0, [sp, 0x3c] | r0 = var_3ch;
0x000110bc bl 0x13348 | r0 = fcn_00013348 (r0, r1);
0x000110c0 cmp r0, 0 |
| if (r0 >= 0) {
0x000110c4 ldrlt r2, [pc, 0x760] | r2 = "nanddump";
| }
| if (r0 >= 0) {
0x000110c8 ldrlt r1, [pc, 0x79c] | r1 = "%s: error!: mtd_get_dev_info failed\n";
| }
0x000110cc blt 0x11074 |
| } while (r0 < 0);
0x000110d0 ldr r4, [sp, 0x1a8] | r4 = size;
0x000110d4 lsl r4, r4, 2 | r4 <<= 2;
0x000110d8 mov r0, r4 | r0 = r4;
0x000110dc bl 0x10a94 | malloc (r0);
0x000110e0 adds r4, r4, 0 | r4 += 0;
| if (r4 == r4) {
0x000110e4 movne r4, 1 | r4 = 1;
| }
0x000110e8 cmp r0, 0 |
| if (r0 == 0) {
0x000110ec movne r4, 0 | r4 = 0;
| }
0x000110f0 cmp r4, 0 |
0x000110f4 str r0, [sp, 0x24] | ptr = r0;
0x000110f8 beq 0x11100 |
| while (r4 != 0) {
0x000110fc bl 0x10c14 | fcn_00010c14 ();
0x00011100 ldr r4, [sp, 0x1a0] | r4 = var_1a0h;
0x00011104 lsl r4, r4, 2 | r4 <<= 2;
0x00011108 mov r0, r4 | r0 = r4;
0x0001110c bl 0x10a94 | malloc (r0);
0x00011110 adds r4, r4, 0 | r4 += 0;
| if (r4 == r4) {
0x00011114 movne r4, 1 | r4 = 1;
| }
0x00011118 cmp r0, 0 |
| if (r0 == 0) {
0x0001111c movne r4, 0 | r4 = 0;
| }
0x00011120 cmp r4, 0 |
0x00011124 str r0, [sp, 0x20] | s = r0;
0x00011128 str r4, [sp, 0x38] | var_38h = r4;
0x0001112c bne 0x110fc |
| }
0x00011130 ldrb r3, [r7, 0x24] | r3 = *((r7 + 0x24));
0x00011134 cmp r3, 0 |
| if (r3 == 0) {
0x00011138 beq 0x11184 | goto label_43;
| }
0x0001113c mov r2, 3 | r2 = 3;
0x00011140 ldr r1, [pc, 0x728] | r1 = "%s: error!: mtd_get_dev_info failed\n";
0x00011144 mov r0, r5 | r0 = r5;
0x00011148 bl 0x10a34 | r0 = ioctl (r0, "%s: error!: mtd_get_dev_info failed\n");
0x0001114c cmp r0, 0 |
| if (r0 == 0) {
0x00011150 beq 0x111f8 | goto label_7;
| }
0x00011154 ldr r0, [pc, 0x718] | r0 = *(0x11870);
0x00011158 bl 0x10a88 | perror (r0);
0x0001115c ldr r4, [sp, 0x38] | r4 = var_38h;
| do {
| label_10:
0x00011160 mov r0, r5 | r0 = r5;
0x00011164 bl 0x10bf0 | close (r0);
0x00011168 mov r0, r4 | r0 = r4;
0x0001116c bl 0x10bf0 | close (r0);
0x00011170 ldr r0, [sp, 0x24] | r0 = ptr;
0x00011174 bl 0x10c08 | free (r0);
0x00011178 ldr r0, [sp, 0x20] | r0 = s;
0x0001117c bl 0x10c08 | free (r0);
0x00011180 b 0x10ff0 | goto label_6;
| label_43:
0x00011184 add r2, sp, 0x48 | r2 += var_48h;
0x00011188 ldr r1, [pc, 0x6e8] | r1 = "MTDFILEMODE";
0x0001118c mov r0, r5 | r0 = r5;
0x00011190 bl 0x10a34 | r0 = ioctl (r0, "MTDFILEMODE");
0x00011194 cmp r0, 0 |
| if (r0 != 0) {
0x00011198 bne 0x1125c | goto label_44;
| }
0x0001119c ldrb r3, [r7, 0x23] | r3 = *((r7 + 0x23));
0x000111a0 cmp r3, 0 |
0x000111a4 str r3, [sp, 0x38] | var_38h = r3;
| if (r3 == 0) {
0x000111a8 bne 0x111f8 |
0x000111ac ldr r4, [pc, 0x674] | r4 = "skipbad";
0x000111b0 ldr r2, [sp, 0x4c] | r2 = var_4ch;
0x000111b4 ldr r1, [pc, 0x6c0] | r1 = *(0x11878);
0x000111b8 ldr r0, [r4] | r0 = "skipbad";
0x000111bc bl 0x10ae8 | fprintf ("skipbad", r1, r2, r3, "skipbad")
0x000111c0 ldr r2, [sp, 0x48] | r2 = var_48h;
0x000111c4 ldr r1, [pc, 0x6b4] | r1 = "ECC_failed:__d";
0x000111c8 ldr r0, [r4] | r0 = "skipbad";
0x000111cc bl 0x10ae8 | fprintf ("skipbad", "ECC_failed:__d", r2)
0x000111d0 ldr r2, [sp, 0x50] | r2 = var_50h;
0x000111d4 ldr r1, [pc, 0x6a8] | r1 = "ECC_corrected:__d";
0x000111d8 ldr r0, [r4] | r0 = "skipbad";
0x000111dc bl 0x10ae8 | fprintf ("skipbad", "ECC_corrected:__d", r2)
0x000111e0 ldr r2, [sp, 0x54] | r2 = var_54h;
0x000111e4 ldr r1, [pc, 0x69c] | r1 = "Number of bad blocks: %d\n";
0x000111e8 ldr r0, [r4] | r0 = "skipbad";
0x000111ec bl 0x10ae8 | fprintf ("skipbad", "Number of bad blocks: %d\n", r2)
0x000111f0 mov r3, 1 | r3 = 1;
0x000111f4 str r3, [sp, 0x38] | var_38h = r3;
| }
| label_7:
0x000111f8 ldr r0, [r7, 0x10] | r0 = *((r7 + 0x10));
0x000111fc cmp r0, 0 |
| if (r0 == 0) {
0x00011200 beq 0x11268 | goto label_45;
| }
0x00011204 mov r2, 0x1a4 | r2 = 0x1a4;
0x00011208 ldr r1, [pc, 0x67c] | r1 = "Number of bbt blocks: %d\n";
0x0001120c bl 0x10b60 | r0 = open64 ();
0x00011210 cmn r0, 1 |
0x00011214 mov r4, r0 | r4 = r0;
| if (r0 != 1) {
0x00011218 ldreq r0, [r7, 0x10] | r0 = *((r7 + 0x10));
| }
| if (r0 == 1) {
0x0001121c beq 0x11590 | goto label_46;
| }
| label_8:
0x00011220 ldrb r3, [r7, 0x22] | r3 = *((r7 + 0x22));
0x00011224 cmp r3, 0 |
| if (r3 != 0) {
0x00011228 bne 0x11270 | goto label_47;
| }
0x0001122c ldrb r3, [r7, 0x20] | r3 = *((r7 + 0x20));
0x00011230 cmp r3, 0 |
| if (r3 != 0) {
0x00011234 bne 0x11270 | goto label_47;
| }
0x00011238 mov r0, r4 | r0 = r4;
0x0001123c bl 0x10aa0 | r0 = isatty (r0);
0x00011240 cmp r0, 0 |
| if (r0 == 0) {
0x00011244 beq 0x11270 | goto label_47;
| }
0x00011248 ldr r3, [pc, 0x5d8] | r3 = "skipbad";
0x0001124c ldr r0, [pc, 0x63c] | r0 = *(0x1188c);
0x00011250 ldr r1, [r3] | r1 = "skipbad";
0x00011254 bl 0x10bcc | fputs (r0, "skipbad");
0x00011258 b 0x11160 |
| } while (1);
| label_44:
0x0001125c ldr r0, [pc, 0x630] | r0 = "Not printing binary garbage to tty. Use '-a'\nor '--forcebinary' to override.\n";
0x00011260 bl 0x10a88 | perror ("Not printing binary garbage to tty. Use '-a'\nor '--forcebinary' to override.\n");
0x00011264 b 0x111f8 | goto label_7;
| label_45:
0x00011268 mov r4, 1 | r4 = 1;
0x0001126c b 0x11220 | goto label_8;
| label_47:
0x00011270 ldr r2, [sp, 0x1a0] | r2 = var_1a0h;
0x00011274 ldrd r8, sb, [r7, 8] | __asm ("ldrd r8, sb, [r7, 8]");
0x00011278 sub r3, r2, 1 | r3 = r2 - 1;
0x0001127c and r1, sb, r3, asr 31 | r1 = sb & (r3 >> 31);
0x00011280 and r0, r8, r3 | r0 = r8 & r3;
0x00011284 orrs r3, r0, r1 | r3 = r0 | r1;
0x00011288 strd r0, r1, [sp, 0x18] | __asm ("strd r0, r1, [format]");
| if (r3 == r0) {
0x0001128c ldrne r1, [pc, 0x604] | r1 = "the start address (-s parameter) is not page-aligned!\nThe pagesize of this NAND Flash is 0x%x.\n";
| }
| if (r3 != r0) {
0x00011290 bne 0x114cc | goto label_13;
| }
0x00011294 ldrb r3, [r7] | r3 = *(r7);
0x00011298 cmp r3, 0 |
| if (r3 == 0) {
0x0001129c beq 0x112c0 | goto label_48;
| }
0x000112a0 ldr r7, [pc, 0x564] | r7 = *(0x11808);
0x000112a4 ldr sl, [pc, 0x57c] | sl = obj.stderr;
0x000112a8 ldr fp, [pc, 0x5ec] | fp = "Bad block at %llx\n";
| do {
0x000112ac ldrd r2, r3, [r7, 8] | __asm ("ldrd r2, r3, [r7, 8]");
0x000112b0 ldrd r0, r1, [sp, 0x18] | __asm ("ldrd r0, r1, [format]");
0x000112b4 cmp r0, r2 |
0x000112b8 sbcs r3, r1, r3 | __asm ("sbcs r3, r1, r3");
| if (r0 >= r2) {
0x000112bc blt 0x11374 |
| label_48:
0x000112c0 ldr r7, [pc, 0x544] | r7 = *(0x11808);
0x000112c4 add r3, sp, 0x190 | r3 += var_190h;
0x000112c8 ldrd r2, r3, [r3] | __asm ("ldrd r2, r3, [r3]");
0x000112cc ldrd r0, r1, [r7, 0x18] | __asm ("ldrd r0, r1, [r7, 0x18]");
0x000112d0 strd r2, r3, [sp, 0x18] | __asm ("strd r2, r3, [format]");
0x000112d4 orrs r3, r0, r1 | r3 = r0 | r1;
| if (r3 != r0) {
0x000112d8 bne 0x11438 | goto label_49;
| }
| label_11:
0x000112dc ldrb r3, [r7, 0x23] | r3 = *((r7 + 0x23));
0x000112e0 ldr fp, [sp, 0x1a0] | fp = var_1a0h;
0x000112e4 cmp r3, 0 |
| if (r3 == 0) {
0x000112e8 bne 0x11324 |
0x000112ec ldr r3, [sp, 0x1a8] | r3 = size;
0x000112f0 ldr r8, [pc, 0x530] | r8 = "skipbad";
0x000112f4 str r3, [sp] | *(sp) = r3;
0x000112f8 ldr r2, [sp, 0x19c] | r2 = var_19ch;
0x000112fc mov r3, fp | r3 = fp;
0x00011300 ldr r1, [pc, 0x598] | r1 = "Bad block at %llx\n";
0x00011304 ldr r0, [r8] | r0 = "skipbad";
0x00011308 bl 0x10ae8 | fprintf ("skipbad", "Bad block at %llx\n", r2, r3)
0x0001130c ldrd r0, r1, [sp, 0x18] | __asm ("ldrd r0, r1, [format]");
0x00011310 ldrd r2, r3, [r7, 8] | __asm ("ldrd r2, r3, [r7, 8]");
0x00011314 strd r0, r1, [sp] | __asm ("strd r0, r1, [sp]");
0x00011318 ldr r1, [pc, 0x584] | r1 = "Block_size__d__page_size__d__OOB_size__d";
0x0001131c ldr r0, [r8] | r0 = "skipbad";
0x00011320 bl 0x10ae8 | fprintf (r0, "Block_size__d__page_size__d__OOB_size__d", r2)
| }
0x00011324 ldr r3, [pc, 0x4e0] | r3 = *(0x11808);
0x00011328 mov sl, 0 | sl = 0;
0x0001132c ldrd r8, sb, [r3, 8] | __asm ("ldrd r8, sb, [r3, 8]");
0x00011330 mov r2, 1 | r2 = 1;
0x00011334 mov r3, 0 | r3 = 0;
| label_12:
0x00011338 strd r2, r3, [sp, 0x30] | __asm ("strd r2, r3, [var_30h]");
0x0001133c ldrd r2, r3, [sp, 0x18] | __asm ("ldrd r2, r3, [format]");
0x00011340 cmp r8, r2 |
0x00011344 sbcs r3, sb, r3 | __asm ("sbcs r3, sb, r3");
| if (r8 < r2) {
0x00011348 blt 0x11458 | goto label_50;
| }
0x0001134c mov r0, r5 | r0 = r5;
0x00011350 bl 0x10bf0 | close (r0);
0x00011354 mov r0, r4 | r0 = r4;
0x00011358 bl 0x10bf0 | close (r0);
0x0001135c ldr r0, [sp, 0x24] | r0 = ptr;
0x00011360 bl 0x10c08 | free (r0);
0x00011364 ldr r0, [sp, 0x20] | r0 = s;
0x00011368 bl 0x10c08 | free (r0);
0x0001136c mov fp, 0 |
0x00011370 b 0x11080 | goto label_9;
| }
0x00011374 ldr r2, [sp, 0x19c] | r2 = var_19ch;
0x00011378 ldrd r0, r1, [sp, 0x18] | __asm ("ldrd r0, r1, [format]");
0x0001137c asr r3, r2, 0x1f | r3 = r2 >> 0x1f;
0x00011380 bl 0x14f34 | fcn_00014f34 (r0);
0x00011384 mov r1, r5 | r1 = r5;
0x00011388 mov r2, r0 | r2 = r0;
0x0001138c add r0, sp, 0xb8 | r0 += var_b8h;
0x00011390 bl 0x137d8 | r0 = fcn_000137d8 (r0, r1);
0x00011394 cmp r0, 0 |
| if (r0 < 0) {
0x00011398 bge 0x113e8 |
0x0001139c bl 0x10b9c | errno_location ();
0x000113a0 ldr r8, [pc, 0x480] | r8 = "skipbad";
0x000113a4 ldr r3, [r7, 0x28] | r3 = *((r7 + 0x28));
0x000113a8 ldr r2, [pc, 0x47c] | r2 = stderr;
0x000113ac ldr r1, [pc, 0x4f4] | r1 = "Dumping_data_starting_at_0x_08llx_and_ending_at_0x_08llx...";
0x000113b0 ldr r6, [r0] | r6 = *(r0);
0x000113b4 ldr r0, [r8] | r0 = "skipbad";
0x000113b8 bl 0x10ae8 | fprintf ("skipbad", "Dumping_data_starting_at_0x_08llx_and_ending_at_0x_08llx...", r2, r3, r4, r5, r6)
0x000113bc mov r0, r6 | r0 = r6;
0x000113c0 ldr r7, [r8] | r7 = "skipbad";
0x000113c4 bl 0x10a4c | strerror (r0);
0x000113c8 str r6, [sp] | *(sp) = r6;
0x000113cc ldr r3, [pc, 0x470] | r3 = "%s: error!: out of memory\n";
0x000113d0 mov r2, 0xa | r2 = 0xa;
0x000113d4 ldr r1, [pc, 0x46c] | r1 = *(0x11844);
0x000113d8 str r0, [sp, 4] | var_4h = r0;
0x000113dc mov r0, r7 | r0 = r7;
0x000113e0 bl 0x10ae8 | fprintf (r0, r1, r2, "%s: error!: out of memory\n", r4, r5, r6)
0x000113e4 b 0x11160 | goto label_10;
| }
0x000113e8 cmp r0, 1 |
| if (r0 == 1) {
0x000113ec bne 0x11420 |
0x000113f0 ldrb r3, [r7, 0x23] | r3 = *((r7 + 0x23));
0x000113f4 cmp r3, 0 |
| if (r3 == 0) {
0x000113f8 bne 0x1140c |
0x000113fc ldrd r2, r3, [sp, 0x18] | __asm ("ldrd r2, r3, [format]");
0x00011400 ldr r0, [sl] | r0 = *(sl);
0x00011404 mov r1, fp | r1 = fp;
0x00011408 bl 0x10ae8 | fprintf (r0, r1, r2)
| }
0x0001140c ldrd r2, r3, [r7, 8] | __asm ("ldrd r2, r3, [r7, 8]");
0x00011410 ldr r1, [sp, 0x19c] | r1 = var_19ch;
0x00011414 adds r8, r2, r1 | r8 = r2 + r1;
0x00011418 adc sb, r3, r1, asr 31 | __asm ("adc sb, r3, r1, asr 31");
0x0001141c strd r8, sb, [r7, 8] | __asm ("strd r8, sb, [r7, 8]");
| }
0x00011420 ldr r3, [sp, 0x19c] | r3 = var_19ch;
0x00011424 ldrd r0, r1, [sp, 0x18] | __asm ("ldrd r0, r1, [format]");
0x00011428 adds r0, r0, r3 | r0 += r3;
0x0001142c adc r1, r1, r3, asr 31 | __asm ("adc r1, r1, r3, asr 31");
0x00011430 strd r0, r1, [sp, 0x18] | __asm ("strd r0, r1, [format]");
0x00011434 b 0x112ac |
| } while (1);
| label_49:
0x00011438 ldrd r2, r3, [r7, 8] | __asm ("ldrd r2, r3, [r7, 8]");
0x0001143c adds r8, r2, r0 | r8 = r2 + r0;
0x00011440 adc sb, r3, r1 | __asm ("adc sb, r3, r1");
0x00011444 ldrd r2, r3, [sp, 0x18] | __asm ("ldrd r2, r3, [format]");
0x00011448 cmp r8, r2 |
0x0001144c sbcs r3, sb, r3 | __asm ("sbcs r3, sb, r3");
0x00011450 strdlt r8, sb, [sp, 0x18] | __asm ("strdlt r8, sb, [sp, 0x18]");
0x00011454 b 0x112dc | goto label_11;
| label_50:
0x00011458 ldr r3, [pc, 0x3b0] |
0x0001145c ldr r3, [r3] | r3 = *(0x1180c);
0x00011460 cmp r3, 1 |
| if (r3 == 1) {
0x00011464 beq 0x11598 | goto label_51;
| }
0x00011468 ldr ip, [sp, 0x19c] | ip = var_19ch;
0x0001146c rsb r3, ip, 0 | r3 = ip - ;
0x00011470 and r0, r8, r3 | r0 = r8 & r3;
0x00011474 and r1, sb, r3, asr 31 | r1 = sb & (r3 >> 31);
0x00011478 ldrd r2, r3, [sp, 0x30] | __asm ("ldrd r2, r3, [var_30h]");
0x0001147c strd r0, r1, [sp, 0x28] | __asm ("strd r0, r1, [var_28h]");
0x00011480 cmp r1, r3 |
0x00011484 cmpeq r0, r2 | __asm ("cmpeq r0, r2");
| if (r1 != r3) {
0x00011488 andeq r6, r6, 1 | r6 &= 1;
| }
| if (r1 == r3) {
0x0001148c movne r6, 1 | r6 = 1;
| }
0x00011490 cmp r6, 0 |
| if (r6 != 0) {
0x00011494 beq 0x114dc |
0x00011498 mov r2, ip | r2 = ip;
0x0001149c asr r3, ip, 0x1f | r3 = ip >> 0x1f;
0x000114a0 mov r0, r8 | r0 = r8;
0x000114a4 mov r1, sb | r1 = sb;
0x000114a8 bl 0x14f34 | fcn_00014f34 (r0);
0x000114ac mov r1, r5 | r1 = r5;
0x000114b0 mov r2, r0 | r2 = r0;
0x000114b4 add r0, sp, 0xb8 | r0 += var_b8h;
0x000114b8 bl 0x137d8 | fcn_000137d8 (r0, r1);
0x000114bc subs sl, r0, 0 | sl -= var_b8h;
| if (sl >= var_b8h) {
0x000114c0 bge 0x114e4 | goto label_52;
| }
0x000114c4 ldr r2, [pc, 0x360] | r2 = stderr;
0x000114c8 ldr r1, [pc, 0x3dc] | r1 = "%s: error!: %s: MTD get bad block failed\n";
| label_13:
0x000114cc ldr r3, [pc, 0x354] | r3 = "skipbad";
0x000114d0 ldr r0, [r3] | r0 = "skipbad";
0x000114d4 bl 0x10ae8 | fprintf ("skipbad", "%s: error!: %s: MTD get bad block failed\n", r2, "skipbad")
0x000114d8 b 0x11160 | goto label_10;
| }
0x000114dc ldrd r2, r3, [sp, 0x30] | __asm ("ldrd r2, r3, [var_30h]");
0x000114e0 strd r2, r3, [sp, 0x28] | __asm ("strd r2, r3, [var_28h]");
| label_52:
0x000114e4 cmp sl, 0 |
| if (sl == 0) {
0x000114e8 beq 0x115a4 | goto label_53;
| }
0x000114ec ldr r3, [pc, 0x31c] |
0x000114f0 ldr r3, [r3] | r3 = *(0x1180c);
0x000114f4 cmp r3, 2 |
| if (r3 == 2) {
0x000114f8 bne 0x11550 |
0x000114fc ldr r1, [sp, 0x19c] | r1 = var_19ch;
0x00011500 sub r3, r1, fp | r3 = r1 - fp;
0x00011504 adds r8, r8, r3 | r8 += r3;
0x00011508 adc sb, sb, r3, asr 31 | __asm ("adc sb, sb, r3, asr 31");
0x0001150c ldrd r2, r3, [sp, 0x18] | __asm ("ldrd r2, r3, [format]");
0x00011510 adds r2, r2, r1 | r2 += r1;
0x00011514 adc r3, r3, r1, asr 31 | __asm ("adc r3, r3, r1, asr 31");
0x00011518 add r1, sp, 0x190 | r1 += var_190h;
0x0001151c ldrd r0, r1, [r1] | __asm ("ldrd r0, r1, [r1]");
0x00011520 cmp r2, r0 |
0x00011524 strd r0, r1, [sp, 0x18] | __asm ("strd r0, r1, [format]");
0x00011528 sbcs r1, r3, r1 | __asm ("sbcs r1, r3, r1");
0x0001152c strdlt r2, r3, [sp, 0x18] | __asm ("strdlt r2, r3, [sp, 0x18]");
0x00011530 str sl, [sp, 0x30] | var_30h = sl;
0x00011534 mov sl, 0 | sl = 0;
| label_14:
0x00011538 adds r8, r8, fp | r8 += fp;
0x0001153c mov r6, sl | r6 = sl;
0x00011540 adc sb, sb, fp, asr 31 | __asm ("adc sb, sb, fp, asr 31");
0x00011544 ldr sl, [sp, 0x30] | sl = var_30h;
0x00011548 ldrd r2, r3, [sp, 0x28] | __asm ("ldrd r2, r3, [var_28h]");
0x0001154c b 0x11338 | goto label_12;
| }
0x00011550 mov r2, fp | r2 = fp;
0x00011554 mov r1, 0xff | r1 = 0xff;
0x00011558 ldr r0, [sp, 0x20] | r0 = s;
0x0001155c bl 0x10b54 | memset (r0, r1, r2);
0x00011560 str sl, [sp, 0x30] | var_30h = sl;
0x00011564 mov sl, 0 | sl = 0;
| do {
0x00011568 ldr r3, [sp, 0x38] | r3 = var_38h;
0x0001156c cmp r3, 0 |
| if (r3 == 0) {
0x00011570 beq 0x11650 | goto label_54;
| }
0x00011574 add r2, sp, 0x58 | r2 += var_58h;
0x00011578 ldr r1, [pc, 0x2f8] | r1 = "MTDFILEMODE";
0x0001157c mov r0, r5 | r0 = r5;
0x00011580 bl 0x10a34 | r0 = ioctl (r0, "MTDFILEMODE");
0x00011584 cmp r0, 0 |
| if (r0 == 0) {
0x00011588 beq 0x115f0 | goto label_55;
| }
0x0001158c ldr r0, [pc, 0x31c] | r0 = "%s: error!: libmtd: mtd_is_bad\n";
| label_46:
0x00011590 bl 0x10a88 | perror ("%s: error!: libmtd: mtd_is_bad\n");
0x00011594 b 0x11160 | goto label_10;
| label_51:
0x00011598 ldrd r2, r3, [sp, 0x30] | __asm ("ldrd r2, r3, [var_30h]");
0x0001159c mov sl, r6 | sl = r6;
0x000115a0 strd r2, r3, [sp, 0x28] | __asm ("strd r2, r3, [var_28h]");
| label_53:
0x000115a4 ldr r2, [sp, 0x19c] | r2 = var_19ch;
0x000115a8 mov r0, r8 | r0 = r8;
0x000115ac asr r3, r2, 0x1f | r3 = r2 >> 0x1f;
0x000115b0 mov r1, sb | r1 = sb;
0x000115b4 bl 0x14f34 | fcn_00014f34 (r0);
0x000115b8 ldr r3, [sp, 0x20] | r3 = s;
0x000115bc str fp, [sp, 4] | var_4h = fp;
0x000115c0 str r3, [sp] | *(sp) = r3;
0x000115c4 mov r1, r5 | r1 = r5;
0x000115c8 mov r3, r2 | r3 = r2;
0x000115cc mov r2, r0 | r2 = r0;
0x000115d0 add r0, sp, 0xb8 | r0 += var_b8h;
0x000115d4 bl 0x138d4 | fcn_000138d4 (r0, r1, r2, r3);
0x000115d8 subs r3, r0, 0 | r3 -= var_b8h;
0x000115dc str r3, [sp, 0x30] | var_30h = r3;
0x000115e0 beq 0x11568 |
| } while (r3 == var_b8h);
0x000115e4 ldr r2, [pc, 0x240] | r2 = stderr;
0x000115e8 ldr r1, [pc, 0x2c4] | r1 = "ioctl(ECCGETSTATS)";
0x000115ec b 0x114cc | goto label_13;
| label_55:
0x000115f0 ldr r3, [sp, 0x4c] | r3 = var_4ch;
0x000115f4 ldr r2, [sp, 0x5c] | r2 = var_5ch;
0x000115f8 cmp r3, r2 |
| if (r3 != r2) {
0x000115fc beq 0x11618 |
0x00011600 sub r2, r2, r3 | r2 -= r3;
0x00011604 ldr r3, [pc, 0x21c] | r3 = "skipbad";
0x00011608 strd r8, sb, [sp] | __asm ("strd r8, sb, [sp]");
0x0001160c ldr r1, [pc, 0x2a4] | r1 = "%s: error!: mtd_read\n";
0x00011610 ldr r0, [r3] | r0 = "skipbad";
0x00011614 bl 0x10ae8 | fprintf ("skipbad", "%s: error!: mtd_read\n", r2, "skipbad")
| }
0x00011618 ldr r3, [sp, 0x48] | r3 = var_48h;
0x0001161c ldr r2, [sp, 0x58] | r2 = var_58h;
0x00011620 cmp r3, r2 |
| if (r3 != r2) {
0x00011624 beq 0x11640 |
0x00011628 sub r2, r2, r3 | r2 -= r3;
0x0001162c ldr r3, [pc, 0x1f4] | r3 = "skipbad";
0x00011630 strd r8, sb, [sp] | __asm ("strd r8, sb, [sp]");
0x00011634 ldr r1, [pc, 0x280] | r1 = "ECC:__d_uncorrectable_bitflip_s__at_offset_0x_08llx";
0x00011638 ldr r0, [r3] | r0 = "skipbad";
0x0001163c bl 0x10ae8 | fprintf ("skipbad", "ECC:__d_uncorrectable_bitflip_s__at_offset_0x_08llx", r2, "skipbad")
| }
0x00011640 add r3, sp, 0x58 | r3 += var_58h;
0x00011644 ldm r3, {r0, r1, r2, r3} | r0 = *(r3);
| r1 = *((r3 + 4));
| r2 = *((r3 + 8));
| r3 = *((r3 + 12));
0x00011648 add ip, sp, 0x48 |
0x0001164c stm ip, {r0, r1, r2, r3} | *(ip) = r0;
| *((ip + 4)) = r1;
| *((ip + 8)) = r2;
| *((ip + 12)) = r3;
| label_54:
0x00011650 ldr r2, [pc, 0x1b4] | r2 = *(0x11808);
0x00011654 ldrb r3, [r2, 0x22] | r3 = *((r2 + 0x22));
0x00011658 cmp r3, 0 |
| if (r3 == 0) {
0x0001165c beq 0x11734 | goto label_56;
| }
0x00011660 ldr r3, [sp, 0x20] | r3 = s;
0x00011664 mov r6, r8 | r6 = r8;
0x00011668 sub r3, r3, r8 | r3 -= r8;
0x0001166c mov r7, sb | r7 = sb;
0x00011670 str r3, [sp, 0x40] | var_40h = r3;
0x00011674 str r2, [sp, 0x44] | var_44h = r2;
| label_15:
0x00011678 sub r3, r6, r8 | r3 = r6 - r8;
0x0001167c cmp fp, r3 |
| if (fp > r3) {
0x00011680 bgt 0x116e0 | goto label_57;
| }
| label_16:
0x00011684 ldr r3, [pc, 0x184] | r3 = *(0x1180c);
0x00011688 ldrb r3, [r3, 4] | r3 = *((r3 + 4));
0x0001168c cmp r3, 0 |
| if (r3 != 0) {
0x00011690 bne 0x11538 | goto label_14;
| }
0x00011694 ldr r3, [sp, 0x30] | r3 = var_30h;
0x00011698 ldr r2, [sp, 0x1a8] | r2 = size;
0x0001169c cmp r3, 0 |
| if (r3 == 0) {
0x000116a0 beq 0x11774 | goto label_58;
| }
0x000116a4 mov r1, 0xff | r1 = 0xff;
0x000116a8 ldr r0, [sp, 0x24] | r0 = ptr;
0x000116ac bl 0x10b54 | memset (r0, r1, r2);
| label_18:
0x000116b0 ldr r7, [pc, 0x154] | r7 = *(0x11808);
0x000116b4 ldrb r3, [r7, 0x22] | r3 = *((r7 + 0x22));
0x000116b8 cmp r3, 0 |
| if (r3 == 0) {
0x000116bc movne r6, 0 | r6 = 0;
| }
| if (r3 != 0) {
0x000116c0 bne 0x117fc | goto label_59;
| }
0x000116c4 ldr r2, [sp, 0x1a8] | r2 = size;
0x000116c8 ldr r1, [sp, 0x24] | r1 = ptr;
0x000116cc mov r0, r4 | r0 = r4;
0x000116d0 bl 0x11a60 | r0 = fcn_00011a60 (r0, r1);
0x000116d4 cmp r0, 0 |
| if (r0 == 0) {
0x000116d8 beq 0x11538 | goto label_14;
| }
0x000116dc b 0x11160 | goto label_10;
| label_57:
0x000116e0 ldr r3, [sp, 0x44] | r3 = var_44h;
0x000116e4 strd r6, r7, [sp, 8] | __asm ("strd r6, r7, [var_8h]");
0x000116e8 ldr r0, [sp, 0x40] | r0 = var_40h;
0x000116ec ldrb r3, [r3, 0x21] | r3 = *((r3 + 0x21));
0x000116f0 add r2, sp, 0x68 | r2 += var_68h;
0x000116f4 mov r1, 0x10 | r1 = 0x10;
0x000116f8 add r0, r0, r6 | r0 += r6;
0x000116fc str r3, [sp] | *(sp) = r3;
0x00011700 mov r3, 1 | r3 = 1;
0x00011704 bl 0x11b04 | fcn_00011b04 (r0, r1, r2, r3);
0x00011708 add r0, sp, 0x68 | r0 += var_68h;
0x0001170c bl 0x10bb4 | strlen (r0);
0x00011710 add r1, sp, 0x68 | r1 += var_68h;
0x00011714 mov r2, r0 | r2 = r0;
0x00011718 mov r0, r4 | r0 = r4;
0x0001171c bl 0x11a60 | fcn_00011a60 (r0, r1);
0x00011720 adds r6, r6, 0x10 | r6 += 0x10;
0x00011724 adc r7, r7, 0 | __asm ("adc r7, r7, 0");
0x00011728 cmp r0, 0 |
| if (r0 == 0) {
0x0001172c beq 0x11678 | goto label_15;
| }
0x00011730 b 0x11160 | goto label_10;
| label_56:
0x00011734 ldr r3, [pc, 0xd4] | r3 = *(0x1180c);
0x00011738 ldrb r3, [r3, 4] | r3 = *((r3 + 4));
0x0001173c cmp r3, 0 |
| if (r3 == 0) {
0x00011740 beq 0x1176c | goto label_60;
| }
0x00011744 ldr r3, [sp, 0x18] | r3 = format;
0x00011748 sub r2, r3, r8 | r2 = r3 - r8;
0x0001174c cmp r2, fp |
| if (r2 >= fp) {
0x00011750 bhs 0x1176c | goto label_60;
| }
| label_17:
0x00011754 ldr r1, [sp, 0x20] | r1 = s;
0x00011758 mov r0, r4 | r0 = r4;
0x0001175c bl 0x11a60 | r0 = fcn_00011a60 (r0, r1);
0x00011760 cmp r0, 0 |
| if (r0 == 0) {
0x00011764 beq 0x11684 | goto label_16;
| }
0x00011768 b 0x11160 | goto label_10;
| label_60:
0x0001176c mov r2, fp | r2 = fp;
0x00011770 b 0x11754 | goto label_17;
| label_58:
0x00011774 ldr r3, [sp, 0x24] | r3 = ptr;
0x00011778 strd r8, sb, [sp] | __asm ("strd r8, sb, [sp]");
0x0001177c ldr r0, [sp, 0x3c] | r0 = var_3ch;
0x00011780 str r3, [sp, 0x10] | var_10h = r3;
0x00011784 asr r3, r2, 0x1f | r3 = r2 >> 0x1f;
0x00011788 strd r2, r3, [sp, 8] | __asm ("strd r2, r3, [var_8h]");
0x0001178c add r1, sp, 0xb8 | r1 += var_b8h;
0x00011790 mov r2, r5 | r2 = r5;
0x00011794 bl 0x13a68 | r0 = fcn_00013a68 (r0, r1, r2);
0x00011798 cmp r0, 0 |
| if (r0 == 0) {
0x0001179c beq 0x116b0 | goto label_18;
| }
0x000117a0 ldr r2, [pc, 0x84] | r2 = stderr;
0x000117a4 ldr r1, [pc, 0x114] | r1 = "ECC: %d corrected bitflip(s) at offset 0x%08llx\n";
0x000117a8 b 0x114cc | goto label_13;
| label_19:
0x000117ac mov r2, 0 | r2 = 0;
0x000117b0 mov r3, 0 | r3 = 0;
0x000117b4 strd r2, r3, [sp, 8] | __asm ("strd r2, r3, [var_8h]");
0x000117b8 ldr r0, [sp, 0x24] | r0 = ptr;
0x000117bc ldrb r3, [r7, 0x21] | r3 = *((r7 + 0x21));
0x000117c0 add r2, sp, 0x68 | r2 += var_68h;
0x000117c4 sub r1, r1, r6 | r1 -= r6;
0x000117c8 str r3, [sp] | *(sp) = r3;
0x000117cc add r0, r0, r6 | r0 += r6;
0x000117d0 mov r3, 0 | r3 = 0;
0x000117d4 bl 0x11b04 | fcn_00011b04 (r0, r1, r2, r3);
0x000117d8 add r0, sp, 0x68 | r0 += var_68h;
0x000117dc bl 0x10bb4 | strlen (r0);
0x000117e0 add r1, sp, 0x68 | r1 += var_68h;
0x000117e4 mov r2, r0 | r2 = r0;
0x000117e8 mov r0, r4 | r0 = r4;
0x000117ec bl 0x11a60 | r0 = fcn_00011a60 (r0, r1);
0x000117f0 cmp r0, 0 |
| if (r0 != 0) {
0x000117f4 bne 0x11160 | goto label_10;
| }
0x000117f8 add r6, r6, 0x10 | r6 += 0x10;
| label_59:
0x000117fc ldr r1, [sp, 0x1a8] | r1 = size;
0x00011800 cmp r1, r6 |
| if (r1 > r6) {
0x00011804 bgt 0x117ac | goto label_19;
| }
0x00011808 b 0x11538 | goto label_14;
| }
[*] Function printf used 35 times nanddump