[*] Binary protection state of nandtest
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of nandtest
; 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/nandtest @ 0x10e40 */
| #include <stdint.h>
|
; (fcn) fcn.00010e40 () | void fcn_00010e40 (int32_t arg_48h, int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_24h;
| r0 = arg1;
| r1 = arg2;
0x00010e40 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00010e44 ldr r8, [pc, 0x2f8] | r8 = *(0x11140);
0x00010e48 sub sp, sp, 0x24 |
0x00010e4c strd r0, r1, [sp, 0x10] | __asm ("strd r0, r1, [var_10h]");
0x00010e50 ldr r6, [pc, 0x2f0] | r6 = stdout;
0x00010e54 mov r1, r0 | r1 = r0;
0x00010e58 ldr r0, [pc, 0x2ec] | r0 = *(0x11148);
0x00010e5c mov sl, r2 | sl = r2;
0x00010e60 mov fp, r3 |
0x00010e64 bl 0x10698 | printf (r0, r1, r2, r3, r4, r5, r6);
0x00010e68 ldr r0, [r8] | r0 = *(0x11140);
0x00010e6c bl 0x106ec | fflush (r0);
0x00010e70 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00010e74 ldr r5, [pc, 0x2d4] | r5 = "\r%08x: erasing... ";
0x00010e78 str r3, [sp, 0x18] | var_18h = r3;
0x00010e7c ldr r3, [r6, 0xc] | r3 = *(0x11150);
0x00010e80 add r2, sp, 0x18 | r2 += var_18h;
0x00010e84 ldr r1, [pc, 0x2c8] | r1 = *(0x11150);
0x00010e88 ldr r0, [r5] | r0 = "\r%08x: erasing... ";
0x00010e8c str r3, [sp, 0x1c] | var_1ch = r3;
0x00010e90 bl 0x1068c | r0 = ioctl ("\r%08x: erasing... ", r1);
0x00010e94 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x00010e98 ldrne r0, [pc, 0x2b8] | r0 = "MEMERASE";
| }
| if (r4 == r0) {
0x00010e9c bne 0x10ee0 |
0x00010ea0 ldr r1, [sp, 0x10] | r1 = var_10h;
0x00010ea4 ldr r0, [pc, 0x2b0] | r0 = "MEMERASE";
0x00010ea8 bl 0x10698 | printf ("MEMERASE", r1);
0x00010eac ldr r0, [r8] | r0 = *(r8);
0x00010eb0 bl 0x106ec | fflush (r0);
0x00010eb4 ldrd r2, r3, [sp, 0x10] | __asm ("ldrd r2, r3, [var_10h]");
0x00010eb8 mov r1, sl | r1 = sl;
0x00010ebc strd r2, r3, [sp] | __asm ("strd r2, r3, [sp]");
0x00010ec0 ldr r2, [r6, 0xc] | r2 = *((r6 + 0xc));
0x00010ec4 ldr r0, [r5] | r0 = *(r5);
0x00010ec8 bl 0x106bc | r0 = pwrite64 ();
0x00010ecc subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 >= r0) {
0x00010ed0 bge 0x10f24 | goto label_6;
| }
0x00010ed4 mov r0, 0xa | r0 = 0xa;
0x00010ed8 bl 0x10680 | putchar (r0);
0x00010edc ldr r0, [pc, 0x27c] | r0 = "_08x:_writing...";
| }
0x00010ee0 bl 0x106c8 | perror ("_08x:_writing...");
0x00010ee4 ldr r3, [pc, 0x278] |
0x00010ee8 ldr r3, [r3] | r3 = "write";
0x00010eec cmp r3, 0 |
| if (r3 != 0) {
0x00010ef0 beq 0x10f14 |
0x00010ef4 add r4, sp, 0x20 | r4 += var_20h;
0x00010ef8 ldr r1, [r4, -0x10]! | r1 = var_10h;
0x00010efc ldr r0, [pc, 0x264] | r0 = *(0x11164);
0x00010f00 bl 0x10698 | printf (r0, r1, r2, r3, r4);
0x00010f04 mov r2, r4 | r2 = r4;
0x00010f08 ldr r1, [pc, 0x25c] | r1 = "Mark block bad at %08lx\n";
0x00010f0c ldr r0, [r5] | r0 = *(r5);
0x00010f10 bl 0x1068c | ioctl (r0, "Mark block bad at %08lx\n");
| }
| label_3:
0x00010f14 mov r4, 1 | r4 = 1;
| label_2:
0x00010f18 mov r0, r4 | r0 = r4;
0x00010f1c add sp, sp, 0x24 |
0x00010f20 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_6:
0x00010f24 ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x00010f28 cmp r3, r8 |
| if (r3 < r8) {
0x00010f2c bls 0x11134 | goto label_7;
| }
0x00010f30 mov r0, 0xa | r0 = 0xa;
0x00010f34 bl 0x10680 | putchar (r0);
0x00010f38 ldr r1, [pc, 0x230] | r1 = *(0x1116c);
0x00010f3c mov r2, r8 | r2 = r8;
| do {
0x00010f40 ldr r3, [pc, 0x22c] | r3 = "Short_write___zd_bytes_";
0x00010f44 ldr r0, [r3] | r0 = "Short_write___zd_bytes_";
0x00010f48 bl 0x10704 | fprintf ("Short_write___zd_bytes_", r1, r2, "Short_write___zd_bytes_")
| label_0:
0x00010f4c mov r0, 1 | r0 = 1;
0x00010f50 bl 0x10770 | exit (r0);
| label_1:
0x00010f54 mov r2, r6 | r2 = r6;
0x00010f58 ldr r1, [sp, 0x10] | r1 = var_10h;
0x00010f5c ldr r3, [sp, 0x48] | r3 = *(arg_48h);
0x00010f60 ldr r0, [pc, 0x210] | r0 = stderr;
0x00010f64 bl 0x10698 | printf (r0, r1, r2, r3);
0x00010f68 ldr r3, [pc, 0x1d4] | r3 = *(0x11140);
0x00010f6c ldr r0, [r3] | r0 = *(0x11140);
0x00010f70 bl 0x106ec | fflush (r0);
0x00010f74 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00010f78 ldr sb, [sp, 0x10] | sb = var_10h;
0x00010f7c str r3, [sp, 4] | var_4h = r3;
0x00010f80 ldr r3, [pc, 0x1c8] | r3 = "\r%08x: erasing... ";
0x00010f84 str sb, [sp] | *(sp) = sb;
0x00010f88 mov r1, fp | r1 = fp;
0x00010f8c ldr r0, [r3] | r0 = "\r%08x: erasing... ";
0x00010f90 ldr r2, [r7, 0xc] | r2 = *((r7 + 0xc));
0x00010f94 bl 0x10728 | pread64 ();
0x00010f98 ldr r3, [r7, 0xc] | r3 = *((r7 + 0xc));
0x00010f9c cmp r3, r0 |
0x00010fa0 mov r5, r0 | r5 = r0;
| if (r3 < r0) {
0x00010fa4 bls 0x10fcc | goto label_8;
| }
0x00010fa8 mov r0, 0xa | r0 = 0xa;
0x00010fac bl 0x10680 | putchar (r0);
0x00010fb0 cmp r5, 0 |
| if (r5 == 0) {
0x00010fb4 movne r2, r5 | r2 = r5;
| }
| if (r5 == 0) {
0x00010fb8 ldrne r1, [pc, 0x1bc] | r1 = "Short_read___zd_bytes_";
| }
0x00010fbc bne 0x10f40 |
| } while (r5 != 0);
0x00010fc0 ldr r0, [pc, 0x1b8] | r0 = "Short_read___zd_bytes_";
0x00010fc4 bl 0x106c8 | perror ("Short_read___zd_bytes_");
0x00010fc8 b 0x10f4c | goto label_0;
| label_8:
0x00010fcc ldr r3, [pc, 0x17c] | r3 = "\r%08x: erasing... ";
0x00010fd0 ldr r2, [pc, 0x1ac] | r2 = "read";
0x00010fd4 ldr r1, [pc, 0x1ac] | r1 = *(0x11184);
0x00010fd8 ldr r0, [r3] | r0 = "\r%08x: erasing... ";
0x00010fdc bl 0x1068c | r0 = ioctl ("\r%08x: erasing... ", r1);
0x00010fe0 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x00010fe4 beq 0x11008 |
0x00010fe8 mov r0, 0xa | r0 = 0xa;
0x00010fec bl 0x10680 | putchar (r0);
0x00010ff0 ldr r0, [pc, 0x194] | r0 = *(0x11188);
0x00010ff4 bl 0x106c8 | perror (r0);
0x00010ff8 ldr r3, [pc, 0x150] | r3 = "\r%08x: erasing... ";
0x00010ffc ldr r0, [r3] | r0 = "\r%08x: erasing... ";
0x00011000 bl 0x10788 | close ("\r%08x: erasing... ");
0x00011004 b 0x10f4c | goto label_0;
| }
0x00011008 ldr r3, [pc, 0x180] | r3 = "ECCGETSTATS";
0x0001100c ldr r0, [r8] | r0 = *(r8);
0x00011010 ldr r1, [r3] | r1 = "ECCGETSTATS";
0x00011014 cmp r0, r1 |
| if (r0 >= r1) {
0x00011018 bls 0x1103c |
0x0001101c mov r2, sb | r2 = sb;
0x00011020 sub r1, r0, r1 | r1 = r0 - r1;
0x00011024 ldr r0, [pc, 0x168] | r0 = *(0x11190);
0x00011028 str r3, [sp, 0xc] | var_ch = r3;
0x0001102c bl 0x10698 | printf (r0, r1, r2, r3);
0x00011030 ldr r2, [r8] | r2 = *(r8);
0x00011034 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00011038 str r2, [r3] | *(r3) = r2;
| }
0x0001103c ldr r3, [pc, 0x14c] | r3 = "ECCGETSTATS";
0x00011040 ldr r1, [r8, 4] | r1 = *((r8 + 4));
0x00011044 ldr r2, [r3, 4] | r2 = *(0x11190);
0x00011048 cmp r1, r2 |
| if (r1 >= r2) {
0x0001104c bls 0x1106c |
0x00011050 mov r1, sb | r1 = sb;
0x00011054 ldr r0, [pc, 0x13c] | r0 = "\n %d bit(s) ECC corrected at %08x\n";
0x00011058 str r3, [sp, 0xc] | var_ch = r3;
0x0001105c bl 0x10698 | printf ("\n %d bit(s) ECC corrected at %08x\n", r1, r2, r3);
0x00011060 ldr r2, [r8, 4] | r2 = *((r8 + 4));
0x00011064 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00011068 str r2, [r3, 4] | *((r3 + 4)) = r2;
| }
0x0001106c mov r1, sb | r1 = sb;
0x00011070 ldr r0, [pc, 0x124] | r0 = "ECC_failed_at__08x";
0x00011074 bl 0x10698 | printf ("ECC_failed_at__08x", r1, r2, r3);
0x00011078 ldr r3, [pc, 0xc4] | r3 = *(0x11140);
0x0001107c ldr r0, [r3] | r0 = *(0x11140);
0x00011080 bl 0x106ec | fflush (r0);
0x00011084 ldr r2, [r7, 0xc] | r2 = *((r7 + 0xc));
0x00011088 mov r1, fp | r1 = fp;
0x0001108c mov r0, sl | r0 = sl;
0x00011090 bl 0x10734 | r0 = memcmp (r0, r1, r2);
0x00011094 cmp r0, 0 |
| if (r0 != 0) {
0x00011098 beq 0x110d0 |
0x0001109c mov r0, 0xa | r0 = 0xa;
0x000110a0 bl 0x10680 | putchar (r0);
0x000110a4 ldr r3, [pc, 0xf4] | r3 = "\r%08x: checking...";
0x000110a8 ldr r1, [pc, 0xf4] | r1 = *(0x111a0);
0x000110ac ldr r2, [r3] | r2 = "\r%08x: checking...";
0x000110b0 ldr r3, [pc, 0xbc] | r3 = "Short_write___zd_bytes_";
0x000110b4 ldr sb, [pc, 0xec] | sb = "Byte 0x%x is %02x should be %02x\n";
0x000110b8 ldr r0, [r3] | r0 = "Short_write___zd_bytes_";
0x000110bc bl 0x10704 | fprintf ("Short_write___zd_bytes_", r1, "\r%08x: checking...", "\r%08x: checking...")
| label_4:
0x000110c0 ldr r3, [r7, 0xc] | r3 = *((r7 + 0xc));
0x000110c4 cmp r5, r3 |
| if (r5 <= r3) {
0x000110c8 blo 0x11110 | goto label_9;
| }
0x000110cc add r4, r4, 1 | r4++;
| }
0x000110d0 add r6, r6, 1 | r6++;
| label_5:
0x000110d4 ldr r3, [sp, 0x48] | r3 = *(arg_48h);
0x000110d8 cmp r6, r3 |
| if (r6 <= r3) {
0x000110dc ble 0x10f54 | goto label_1;
| }
0x000110e0 cmp r4, 0 |
| if (r4 == 0) {
0x000110e4 beq 0x10f18 | goto label_2;
| }
0x000110e8 ldr r3, [pc, 0xb0] |
0x000110ec ldr r0, [pc, 0x80] |
0x000110f0 ldr r3, [r3] | r3 = "\r%08x: checking...";
0x000110f4 mov r2, r4 | r2 = r4;
0x000110f8 str r3, [sp] | *(sp) = r3;
0x000110fc ldr r1, [pc, 0xa8] | r1 = "Byte 0x%x is %02x should be %02x\n";
0x00011100 ldr r3, [sp, 0x48] | r3 = *(arg_48h);
0x00011104 ldr r0, [r0] | r0 = "Short_write___zd_bytes_";
0x00011108 bl 0x10704 | fprintf ("Short_write___zd_bytes_", "Byte 0x%x is %02x should be %02x\n", r2, "\r%08x: checking...")
0x0001110c b 0x10f14 | goto label_3;
| label_9:
0x00011110 ldrb r3, [sl, r5] | r3 = *((sl + r5));
0x00011114 ldrb r2, [fp, r5] | r2 = *((fp + r5));
0x00011118 cmp r3, r2 |
| if (r3 != r2) {
0x0001111c beq 0x1112c |
0x00011120 mov r1, r5 | r1 = r5;
0x00011124 mov r0, sb | r0 = sb;
0x00011128 bl 0x10698 | printf (r0, r1);
| }
0x0001112c add r5, r5, 1 | r5++;
0x00011130 b 0x110c0 | goto label_4;
| label_7:
0x00011134 mov r7, r6 | r7 = r6;
0x00011138 ldr r8, [pc, 0x44] | r8 = "read";
0x0001113c mov r6, 1 | r6 = 1;
0x00011140 b 0x110d4 | goto label_5;
| }
; 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/nandtest @ 0x111b0 */
| #include <stdint.h>
|
; (fcn) fcn.000111b0 () | void fcn_000111b0 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| char * * endptr;
| int32_t var_10h;
| r0 = arg1;
| r1 = arg2;
0x000111b0 push {r0, r1, r2, r3, r4, r5, r6, lr} |
0x000111b4 mov r6, r1 | r6 = r1;
0x000111b8 mov r2, 0 | r2 = 0;
0x000111bc add r1, sp, 0xc | r1 += endptr;
0x000111c0 mov r4, r0 | r4 = r0;
0x000111c4 bl 0x106e0 | strtoul (r0, r1, r2);
0x000111c8 ldrb r3, [r4] | r3 = *(r4);
0x000111cc cmp r3, 0 |
0x000111d0 mov r5, r0 | r5 = r0;
| if (r3 != 0) {
0x000111d4 beq 0x111e8 |
0x000111d8 ldr r3, [sp, 0xc] | r3 = endptr;
0x000111dc ldrb r3, [r3] | r3 = *(r3);
0x000111e0 cmp r3, 0 |
| if (r3 == 0) {
0x000111e4 beq 0x1120c | goto label_0;
| }
| }
0x000111e8 ldr r0, [pc, 0x28] |
0x000111ec str r4, [sp] | *(sp) = r4;
0x000111f0 ldr r3, [pc, 0x24] | r3 = stderr;
0x000111f4 ldr r2, [pc, 0x24] | r2 = "strtoul";
0x000111f8 ldr r1, [pc, 0x24] | r1 = "nandtest";
0x000111fc ldr r0, [r0] | r0 = *(0x11214);
0x00011200 bl 0x10704 | fprintf (r0, "nandtest", "strtoul", r3, r4)
0x00011204 mov r3, 1 | r3 = 1;
0x00011208 str r3, [r6] | *(r6) = r3;
| label_0:
0x0001120c mov r0, r5 | r0 = r5;
0x00011210 add sp, sp, 0x10 |
0x00011214 pop {r4, r5, r6, pc} |
| }
; 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/nandtest @ 0x107d8 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main (char ** envp, int32_t argc, char ** argv) {
| int32_t var_0h;
| int32_t var_0h_2;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_18h;
| int32_t var_18h_2;
| int32_t var_20h;
| int32_t var_24h;
| int32_t var_2ch;
| int32_t var_30h;
| int32_t var_34h;
| int32_t var_38h;
| int32_t var_3ch;
| r0 = argc;
| r1 = argv;
0x000107d8 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000107dc ldr sl, [pc, 0x4bc] | sl = "help";
0x000107e0 mov r4, 0 | r4 = 0;
0x000107e4 sub sp, sp, 0x3c |
0x000107e8 mov r6, r0 | r6 = r0;
0x000107ec mov r0, r4 | r0 = r4;
0x000107f0 mov sb, r1 | sb = r1;
0x000107f4 str r4, [sp, 0x2c] | var_2ch = r4;
0x000107f8 bl 0x10764 | time (r0);
0x000107fc ldr r7, [pc, 0x4a0] | r7 = "help";
0x00010800 ldr r3, [pc, 0x4a0] | r3 = optarg;
0x00010804 ldr fp, [pc, 0x4a0] | fp = *(0x00010cac);
0x00010808 mov r2, 4 | r2 = 4;
0x0001080c str r2, [sp, 0x14] | var_14h = r2;
0x00010810 mvn r5, 0 | r5 = ~0;
0x00010814 mov r2, 1 | r2 = 1;
0x00010818 str r4, [sp, 8] | var_8h = r4;
0x0001081c str r2, [sp, 0x10] | var_10h = r2;
0x00010820 str r3, [sp, 0xc] | var_ch = r3;
0x00010824 str r0, [r3] | *(r3) = r0;
| do {
| label_0:
0x00010828 add r3, sp, 0x38 | r3 += var_38h;
0x0001082c mov r8, 0 | r8 = 0;
0x00010830 str r8, [r3, -8]! | *((r3 -= 8)) = r8;
0x00010834 ldr r2, [pc, 0x474] | r2 = *(0x10cac);
0x00010838 str r3, [sp] | *(sp) = r3;
0x0001083c mov r1, sb | r1 = sb;
0x00010840 mov r3, sl | r3 = sl;
0x00010844 mov r0, r6 | r0 = r6;
0x00010848 bl 0x106a4 | r0 = getopt_long ();
0x0001084c cmn r0, 1 |
0x00010850 mov r3, r0 | r3 = r0;
| if (r0 == 1) {
0x00010854 beq 0x1094c | goto label_7;
| }
0x00010858 cmp r0, 0x6c |
| if (r0 == 0x6c) {
0x0001085c beq 0x10938 | goto label_8;
| }
| if (r0 > 0x6c) {
0x00010860 bgt 0x1089c | goto label_9;
| }
0x00010864 cmp r0, 0x56 |
| if (r0 == 0x56) {
0x00010868 beq 0x10900 | goto label_10;
| }
| if (r0 > 0x56) {
0x0001086c bgt 0x10880 | goto label_11;
| }
0x00010870 cmp r0, 0x3f |
0x00010874 bne 0x10828 |
| } while (r0 != 0x3f);
| label_1:
0x00010878 mov r0, 1 | r0 = 1;
0x0001087c b 0x108fc | goto label_12;
| label_11:
0x00010880 cmp r0, 0x68 |
| if (r0 == 0x68) {
0x00010884 beq 0x108f8 | goto label_13;
| }
0x00010888 ldr r3, [sp, 8] | r3 = var_8h;
0x0001088c cmp r0, 0x6b |
| if (r0 != 0x6b) {
0x00010890 moveq r3, 1 | r3 = 1;
| }
0x00010894 str r3, [sp, 8] | var_8h = r3;
0x00010898 b 0x10828 | goto label_0;
| label_9:
0x0001089c cmp r0, 0x70 |
| if (r0 == 0x70) {
0x000108a0 beq 0x10918 | goto label_14;
| }
| if (r0 > 0x70) {
0x000108a4 bgt 0x108d4 | goto label_15;
| }
0x000108a8 cmp r0, 0x6d |
| if (r0 != 0x6d) {
0x000108ac moveq r3, 1 | r3 = 1;
| }
| if (r0 == 0x6d) {
0x000108b0 streq r3, [fp] | *(fp) = r3;
| goto label_16;
| }
| if (r0 == 0x6d) {
| label_16:
0x000108b4 beq 0x10828 | goto label_0;
| }
0x000108b8 cmp r3, 0x6f |
| if (r3 != 0x6f) {
0x000108bc bne 0x10828 | goto label_0;
| }
0x000108c0 add r1, sp, 0x2c | r1 += var_2ch;
0x000108c4 ldr r0, [r7] | r0 = *(r7);
0x000108c8 bl 0x111b0 | r0 = fcn_000111b0 (r0, r1);
0x000108cc mov r4, r0 | r4 = r0;
0x000108d0 b 0x10828 | goto label_0;
| label_15:
0x000108d4 cmp r0, 0x72 |
| if (r0 == 0x72) {
0x000108d8 beq 0x10928 | goto label_17;
| }
0x000108dc cmp r0, 0x73 |
| if (r0 != 0x73) {
0x000108e0 bne 0x10828 | goto label_0;
| }
0x000108e4 ldr r0, [r7] | r0 = *(r7);
0x000108e8 bl 0x106b0 | atol (r0);
0x000108ec ldr r3, [sp, 0xc] | r3 = var_ch;
0x000108f0 str r0, [r3] | *(r3) = r0;
0x000108f4 b 0x10828 | goto label_0;
| label_13:
0x000108f8 mov r0, r8 | r0 = r8;
| label_12:
0x000108fc bl 0x107a0 | fcn_000107a0 (r0);
| label_10:
0x00010900 ldr r2, [pc, 0x3ac] | r2 = "hkl:mo:p:r:s:V";
0x00010904 ldr r1, [pc, 0x3ac] | r1 = "2.1.0";
0x00010908 ldr r0, [pc, 0x3ac] | r0 = "nandtest";
0x0001090c bl 0x10698 | printf ("nandtest", "2.1.0", "hkl:mo:p:r:s:V");
0x00010910 mov r0, r8 | r0 = r8;
| label_2:
0x00010914 bl 0x10770 | exit (r0);
| label_14:
0x00010918 ldr r0, [r7] | r0 = *(r7);
0x0001091c bl 0x106b0 | atol (r0);
0x00010920 str r0, [sp, 0x10] | var_10h = r0;
0x00010924 b 0x10828 | goto label_0;
| label_17:
0x00010928 ldr r0, [r7] | r0 = *(r7);
0x0001092c bl 0x106b0 | atol (r0);
0x00010930 str r0, [sp, 0x14] | var_14h = r0;
0x00010934 b 0x10828 | goto label_0;
| label_8:
0x00010938 add r1, sp, 0x2c | r1 += var_2ch;
0x0001093c ldr r0, [r7] | r0 = *(r7);
0x00010940 bl 0x111b0 | r0 = fcn_000111b0 (r0, r1);
0x00010944 mov r5, r0 | r5 = r0;
0x00010948 b 0x10828 | goto label_0;
| label_7:
0x0001094c ldr r2, [pc, 0x36c] |
0x00010950 ldr r2, [r2] | r2 = "%s (mtd-utils) %s\n";
0x00010954 sub r6, r6, r2 | r6 -= r2;
0x00010958 cmp r6, 1 |
| if (r6 != 1) {
0x0001095c bne 0x10878 | goto label_1;
| }
0x00010960 ldr r1, [sp, 0x2c] | r1 = var_2ch;
0x00010964 cmp r1, 0 |
| if (r1 != 0) {
0x00010968 beq 0x10990 |
0x0001096c str r0, [sp, 8] | var_8h = r0;
0x00010970 ldr r0, [pc, 0x34c] |
0x00010974 ldr r2, [pc, 0x33c] | r2 = "2.1.0";
0x00010978 ldr r1, [pc, 0x348] | r1 = stderr;
0x0001097c ldr r0, [r0] | r0 = optind;
0x00010980 bl 0x10704 | fprintf (r0, r1, "2.1.0")
0x00010984 ldr r3, [sp, 8] | r3 = var_8h;
0x00010988 mov r0, r3 | r0 = r3;
0x0001098c b 0x10914 | goto label_2;
| }
0x00010990 ldr r0, [sb, r2, lsl 2] | offset_0 = r2 << 2;
| r0 = *((sb + offset_0));
0x00010994 mov r1, 2 | r1 = 2;
0x00010998 bl 0x10758 | open64 ();
0x0001099c ldr sb, [pc, 0x328] | sb = *(0x00010ccc);
0x000109a0 cmp r0, 0 |
0x000109a4 str r0, [sb] | *(sb) = r0;
| if (r0 >= 0) {
0x000109a8 ldrlt r0, [pc, 0x320] | r0 = "open";
| }
| if (r0 < 0) {
0x000109ac blt 0x10c4c | goto label_18;
| }
0x000109b0 ldr r7, [pc, 0x31c] | r7 = "open";
0x000109b4 ldr r1, [pc, 0x31c] | r1 = *(0x10cd4);
0x000109b8 mov r2, r7 | r2 = r7;
0x000109bc bl 0x1068c | r0 = ioctl (r0, r1);
0x000109c0 cmp r0, 0 |
| if (r0 != 0) {
0x000109c4 beq 0x109dc |
0x000109c8 ldr r0, [pc, 0x30c] | r0 = *(0x10cd8);
0x000109cc bl 0x106c8 | perror (r0);
0x000109d0 ldr r0, [sb] | r0 = *(sb);
| label_4:
0x000109d4 bl 0x10788 | close (r0);
0x000109d8 b 0x10a14 | goto label_3;
| }
0x000109dc ldr sl, [r7, 0xc] | sl = *((r7 + 0xc));
0x000109e0 cmn r5, 1 |
0x000109e4 mov r1, sl | r1 = sl;
0x000109e8 mov r0, r4 | r0 = r4;
| if (r5 != 1) {
0x000109ec ldreq r5, [r7, 8] | r5 = *((r7 + 8));
| }
0x000109f0 bl 0x112d0 | fcn_000112d0 (r0, r1);
0x000109f4 cmp r1, 0 |
| if (r1 == 0) {
0x000109f8 beq 0x10a1c | goto label_19;
| }
0x000109fc ldr r1, [pc, 0x2dc] | r1 = "MEMGETINFO";
0x00010a00 mov r3, sl | r3 = sl;
0x00010a04 mov r2, r4 | r2 = r4;
| do {
0x00010a08 ldr r0, [pc, 0x2b4] |
0x00010a0c ldr r0, [r0] | r0 = optind;
0x00010a10 bl 0x10704 | fprintf (r0, "MEMGETINFO", r2, r3)
| label_3:
0x00010a14 mov r0, 1 | r0 = 1;
0x00010a18 b 0x10914 | goto label_2;
| label_19:
0x00010a1c mov r1, sl | r1 = sl;
0x00010a20 mov r0, r5 | r0 = r5;
0x00010a24 bl 0x112d0 | fcn_000112d0 (r0, r1);
0x00010a28 cmp r1, 0 |
| if (r1 == 0) {
0x00010a2c movne r3, sl | r3 = sl;
| }
| if (r1 == 0) {
0x00010a30 movne r2, r5 | r2 = r5;
| }
| if (r1 == 0) {
0x00010a34 ldrne r1, [pc, 0x2a8] | r1 = "Length %x not multiple of erase size %x\n";
| }
0x00010a38 bne 0x10a08 |
| } while (r1 != 0);
0x00010a3c ldr r3, [r7, 8] | r3 = *((r7 + 8));
0x00010a40 add fp, r4, r5 |
0x00010a44 cmp fp, r3 |
| if (fp >= r3) {
0x00010a48 bls 0x10a6c |
0x00010a4c ldr r0, [pc, 0x270] |
0x00010a50 str r3, [sp] | *(sp) = r3;
0x00010a54 mov r2, r5 | r2 = r5;
0x00010a58 mov r3, r4 | r3 = r4;
0x00010a5c ldr r1, [pc, 0x284] | r1 = "Length %x not multiple of erase size %x\n";
0x00010a60 ldr r0, [r0] | r0 = optind;
0x00010a64 bl 0x10704 | fprintf (r0, "Length %x not multiple of erase size %x\n", r2, r3)
0x00010a68 b 0x10a14 | goto label_3;
| }
0x00010a6c lsl r5, sl, 1 | r5 = sl << 1;
0x00010a70 add r0, r5, sl | r0 = r5 + sl;
0x00010a74 bl 0x106d4 | r0 = malloc (r0);
0x00010a78 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x00010a7c moveq r2, r5 | r2 = r5;
| }
| if (r7 != r0) {
0x00010a80 ldreq r1, [pc, 0x264] | r1 = "Could not allocate %d bytes for buffer\n";
| }
| if (r7 == r0) {
0x00010a84 beq 0x10c38 | goto label_20;
| }
0x00010a88 ldr r5, [pc, 0x260] | r5 = "Could not allocate %d bytes for buffer\n";
0x00010a8c add r3, r7, sl | r3 = r7 + sl;
0x00010a90 mov r2, r5 | r2 = r5;
0x00010a94 ldr r1, [pc, 0x258] | r1 = *(0x10cf0);
0x00010a98 ldr r0, [sb] | r0 = *(sb);
0x00010a9c str r3, [sp, 0x20] | var_20h = r3;
0x00010aa0 add sl, r3, sl | sl = r3 + sl;
0x00010aa4 bl 0x1068c | r0 = ioctl (r0, r1);
0x00010aa8 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 != r0) {
0x00010aac beq 0x10ac0 |
0x00010ab0 ldr r0, [pc, 0x240] | r0 = *(0x10cf4);
0x00010ab4 bl 0x106c8 | perror (r0);
0x00010ab8 ldr r0, [sb] | r0 = *(sb);
0x00010abc b 0x109d4 | goto label_4;
| }
0x00010ac0 ldr r1, [r5] | r1 = *(r5);
0x00010ac4 ldr r0, [pc, 0x230] | r0 = "ECCGETSTATS";
0x00010ac8 bl 0x10698 | printf ("ECCGETSTATS", r1);
0x00010acc ldr r1, [r5, 4] | r1 = *((r5 + 4));
0x00010ad0 ldr r0, [pc, 0x228] | r0 = "ECC corrections: %d\n";
0x00010ad4 bl 0x10698 | printf ("ECC corrections: %d\n", r1);
0x00010ad8 ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x00010adc ldr r0, [pc, 0x220] | r0 = "ECC_failures___:__d";
0x00010ae0 bl 0x10698 | printf ("ECC_failures___:__d", r1);
0x00010ae4 ldr r1, [r5, 0xc] | r1 = *((r5 + 0xc));
0x00010ae8 ldr r0, [pc, 0x218] | r0 = "Bad blocks : %d\n";
0x00010aec bl 0x10698 | printf ("Bad blocks : %d\n", r1);
0x00010af0 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00010af4 ldr r0, [r3] | r0 = *(r3);
0x00010af8 bl 0x1074c | srand (r0);
| do {
0x00010afc ldr r3, [sp, 0x10] | r3 = var_10h;
0x00010b00 cmp r6, r3 |
| if (r6 >= r3) {
0x00010b04 blt 0x10b14 |
0x00010b08 mov r0, 0 | r0 = 0;
0x00010b0c add sp, sp, 0x3c |
0x00010b10 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x00010b14 mov r3, 0 | r3 = 0;
0x00010b18 str r3, [sp, 0x34] | var_34h = r3;
0x00010b1c mov r2, fp | r2 = fp;
0x00010b20 mov r3, 0 | r3 = 0;
0x00010b24 str r4, [sp, 0x30] | var_30h = r4;
0x00010b28 strd r2, r3, [sp, 0x18] | __asm ("strd r2, r3, [var_18h]");
| label_5:
0x00010b2c ldrd r2, r3, [sp, 0x30] | __asm ("ldrd r2, r3, [var_34h]");
0x00010b30 ldrd r0, r1, [sp, 0x18] | __asm ("ldrd r0, r1, [var_18h]");
0x00010b34 cmp r2, r0 |
0x00010b38 sbcs r3, r3, r1 | __asm ("sbcs r3, r3, r1");
| if (r2 < r0) {
0x00010b3c blt 0x10b54 | goto label_21;
| }
0x00010b40 add r6, r6, 1 | r6++;
0x00010b44 mov r1, r6 | r1 = r6;
0x00010b48 ldr r0, [pc, 0x1bc] | r0 = "BBT_blocks_____:__d";
0x00010b4c bl 0x10698 | printf ("BBT_blocks_____:__d", r1, r2, r3, r4, r5, r6);
0x00010b50 b 0x10afc |
| } while (1);
| label_21:
0x00010b54 bl 0x1071c | rand ();
0x00010b58 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00010b5c str r0, [r3] | *(r3) = r0;
0x00010b60 bl 0x1074c | srand (r0);
0x00010b64 ldr r3, [pc, 0x160] | r3 = "_s:_error_:_Try___help_for_more_information";
0x00010b68 add r2, sp, 0x30 | r2 += var_30h;
0x00010b6c ldr r1, [pc, 0x19c] | r1 = "Finished_pass__d_successfully";
0x00010b70 ldr r0, [r3] | r0 = "_s:_error_:_Try___help_for_more_information";
0x00010b74 bl 0x1068c | r0 = ioctl ("_s:_error_:_Try___help_for_more_information", "Finished_pass__d_successfully");
0x00010b78 cmp r0, 0 |
| if (r0 != 0) {
0x00010b7c moveq r2, r7 | r2 = r7;
| }
| if (r0 != 0) {
0x00010b80 ldreq r5, [pc, 0x14c] | r5 = *(0x00010cd4);
| }
| if (r0 == 0) {
0x00010b84 beq 0x10bc0 | goto label_22;
| }
0x00010b88 ldr r1, [sp, 0x30] | r1 = var_30h;
0x00010b8c ldr r0, [pc, 0x180] | r0 = *(0x10d10);
0x00010b90 bl 0x10698 | printf (r0, r1);
| label_6:
0x00010b94 ldr r3, [pc, 0x138] | r3 = "open";
0x00010b98 ldr r1, [r3, 0xc] | r1 = "MEMGETINFO";
0x00010b9c ldrd r2, r3, [sp, 0x30] | __asm ("ldrd r2, r3, [var_34h]");
0x00010ba0 adds r8, r2, r1 | r8 = r2 + r1;
0x00010ba4 adc sb, r3, 0 | __asm ("adc sb, r3, 0");
0x00010ba8 strd r8, sb, [sp, 0x30] | __asm ("strd r8, sb, [var_34h]");
0x00010bac b 0x10b2c | goto label_5;
| do {
0x00010bb0 str r2, [sp, 0x24] | var_24h = r2;
0x00010bb4 bl 0x1071c | rand ();
0x00010bb8 ldr r2, [sp, 0x24] | r2 = var_24h;
0x00010bbc strb r0, [r2], 1 | *(r2) = r0;
| r2++;
| label_22:
0x00010bc0 ldr r1, [r5, 0xc] | r1 = *((r5 + 0xc));
0x00010bc4 sub r3, r2, r7 | r3 = r2 - r7;
0x00010bc8 cmp r1, r3 |
0x00010bcc bhi 0x10bb0 |
| } while (r1 > r3);
0x00010bd0 ldr r3, [sp, 8] | r3 = var_8h;
0x00010bd4 cmp r3, 0 |
| if (r3 != 0) {
0x00010bd8 beq 0x10c54 |
0x00010bdc ldr r1, [sp, 0x30] | r1 = var_30h;
0x00010be0 ldr r0, [pc, 0x130] | r0 = "\rBad block at 0x%08x\n";
0x00010be4 bl 0x10698 | printf ("\rBad block at 0x%08x\n", r1);
0x00010be8 ldr r3, [pc, 0x12c] | r3 = "\r%08x: reading... ";
0x00010bec ldr r0, [r3] | r0 = "\r%08x: reading... ";
0x00010bf0 bl 0x106ec | fflush ("\r%08x: reading... ");
0x00010bf4 ldrd r2, r3, [sp, 0x30] | __asm ("ldrd r2, r3, [var_34h]");
0x00010bf8 mov r1, sl | r1 = sl;
0x00010bfc strd r2, r3, [sp] | __asm ("strd r2, r3, [sp]");
0x00010c00 ldr r3, [pc, 0xc4] | r3 = "_s:_error_:_Try___help_for_more_information";
0x00010c04 ldr r2, [r5, 0xc] | r2 = *((r5 + 0xc));
0x00010c08 ldr r0, [r3] | r0 = "_s:_error_:_Try___help_for_more_information";
0x00010c0c bl 0x10728 | pread64 ();
0x00010c10 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00010c14 cmp r3, r0 |
| if (r3 < r0) {
0x00010c18 bls 0x10c54 | goto label_23;
| }
0x00010c1c str r0, [sp, 8] | var_8h = r0;
0x00010c20 mov r0, 0xa | r0 = 0xa;
0x00010c24 bl 0x10680 | putchar (r0);
0x00010c28 ldr r2, [sp, 8] | r2 = var_8h;
0x00010c2c cmp r2, 0 |
| if (r2 != 0) {
0x00010c30 beq 0x10c48 |
0x00010c34 ldr r1, [pc, 0xe4] | r1 = stdout;
| label_20:
0x00010c38 ldr r3, [pc, 0x84] | r3 = optind;
0x00010c3c ldr r0, [r3] | r0 = optind;
0x00010c40 bl 0x10704 | fprintf (r0, r1, r2, r3)
0x00010c44 b 0x10a14 | goto label_3;
| }
0x00010c48 ldr r0, [pc, 0xd4] | r0 = "Short_read___zd_bytes_";
| label_18:
0x00010c4c bl 0x106c8 | perror ("Short_read___zd_bytes_");
0x00010c50 b 0x10a14 | goto label_3;
| }
| label_23:
0x00010c54 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00010c58 mov r2, r7 | r2 = r7;
0x00010c5c str r3, [sp] | *(sp) = r3;
0x00010c60 ldrd r0, r1, [sp, 0x30] | __asm ("ldrd r0, r1, [var_34h]");
0x00010c64 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00010c68 bl 0x10e40 | fcn_00010e40 (r0, r1, r2);
0x00010c6c ldr r3, [sp, 8] | r3 = var_8h;
0x00010c70 cmp r0, 0 |
| if (r0 != 0) {
0x00010c74 andeq r0, r3, 1 | r0 = r3 & 1;
| }
| if (r0 == 0) {
0x00010c78 movne r0, 0 | r0 = 0;
| }
0x00010c7c cmp r0, 0 |
| if (r0 == 0) {
0x00010c80 beq 0x10b94 | goto label_6;
| }
0x00010c84 mov r3, 1 | r3 = 1;
0x00010c88 str r3, [sp] | *(sp) = r3;
0x00010c8c mov r2, sl | r2 = sl;
0x00010c90 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00010c94 ldrd r0, r1, [sp, 0x30] | __asm ("ldrd r0, r1, [var_34h]");
0x00010c98 bl 0x10e40 | fcn_00010e40 (r0, r1, r2);
0x00010c9c b 0x10b94 | goto label_6;
| }
[*] Function fprintf used 9 times nandtest