[*] Binary protection state of ubimkvol
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of ubimkvol
; 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/ubimkvol @ 0x114c4 */
| #include <stdint.h>
|
; (fcn) fcn.000114c4 () | void fcn_000114c4 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| char * * endptr;
| int32_t var_10h;
| r0 = arg1;
| r1 = arg2;
0x000114c4 push {r0, r1, r2, r3, r4, r5, r6, lr} |
0x000114c8 mov r6, r1 | r6 = r1;
0x000114cc mov r2, 0 | r2 = 0;
0x000114d0 add r1, sp, 0xc | r1 += endptr;
0x000114d4 mov r4, r0 | r4 = r0;
0x000114d8 bl 0x10a34 | strtoul (r0, r1, r2);
0x000114dc ldrb r3, [r4] | r3 = *(r4);
0x000114e0 cmp r3, 0 |
0x000114e4 mov r5, r0 | r5 = r0;
| if (r3 != 0) {
0x000114e8 beq 0x114fc |
0x000114ec ldr r3, [sp, 0xc] | r3 = endptr;
0x000114f0 ldrb r3, [r3] | r3 = *(r3);
0x000114f4 cmp r3, 0 |
| if (r3 == 0) {
0x000114f8 beq 0x11520 | goto label_0;
| }
| }
0x000114fc ldr r0, [pc, 0x28] |
0x00011500 str r4, [sp] | *(sp) = r4;
0x00011504 ldr r3, [pc, 0x24] | r3 = stderr;
0x00011508 ldr r2, [pc, 0x24] | r2 = "strtoul";
0x0001150c ldr r1, [pc, 0x24] | r1 = "ubimkvol";
0x00011510 ldr r0, [r0] | r0 = *(0x11528);
0x00011514 bl 0x10a64 | fprintf (r0, "ubimkvol", "strtoul", r3, r4)
0x00011518 mov r3, 1 | r3 = 1;
0x0001151c str r3, [r6] | *(r6) = r3;
| label_0:
0x00011520 mov r0, r5 | r0 = r5;
0x00011524 add sp, sp, 0x10 |
0x00011528 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/ubimkvol @ 0x11540 */
| #include <stdint.h>
|
; (fcn) fcn.00011540 () | void fcn_00011540 (int32_t arg1) {
| char * * endptr;
| int32_t var_ch;
| r0 = arg1;
0x00011540 push {r0, r1, r2, r4, r5, r6, r7, lr} |
0x00011544 mov r2, 0 | r2 = 0;
0x00011548 add r1, sp, 4 | r1 += endptr;
0x0001154c mov r7, r0 | r7 = r0;
0x00011550 bl 0x10ac4 | strtoull (r0, r1, r2);
0x00011554 ldr r6, [sp, 4] | r6 = endptr;
0x00011558 sub r3, r6, r7 | r3 = r6 - r7;
0x0001155c clz r3, r3 | r3 &= r3;
0x00011560 lsr r3, r3, 5 | r3 >>= 5;
0x00011564 orrs r3, r3, r1, lsr 31 | r3 |= (r1 >> 31);
| if (r3 == r3) {
0x00011568 movne r2, r7 | r2 = r7;
| }
| if (r3 == r3) {
0x0001156c ldrne r1, [pc, 0xc0] | r1 = "incorrect amount of bytes: \"%s\"\n";
| }
| if (r3 != r3) {
0x00011570 bne 0x115e8 | goto label_1;
| }
0x00011574 ldrb r3, [r6] | r3 = *(r6);
0x00011578 mov r4, r0 | r4 = r0;
0x0001157c cmp r3, 0 |
0x00011580 mov r5, r1 | r5 = r1;
| if (r3 == 0) {
0x00011584 beq 0x115fc | goto label_2;
| }
0x00011588 mov r3, r6 | r3 = r6;
| do {
0x0001158c mov r7, r3 | r7 = r3;
0x00011590 ldrb r2, [r3], 1 | r2 = *(r3);
| r3++;
0x00011594 cmp r2, 9 |
0x00011598 cmpne r2, 0x20 | __asm ("cmpne r2, 0x20");
0x0001159c beq 0x1158c |
| } while (r2 == 9);
0x000115a0 ldr r1, [pc, 0x90] | r1 = "incorrect amount of bytes: \"%s\"\n";
0x000115a4 mov r0, r7 | r0 = r7;
0x000115a8 bl 0x10b0c | r0 = strcmp (r0, "incorrect amount of bytes: \"%s\"\n");
0x000115ac cmp r0, 0 |
| if (r0 == 0) {
0x000115b0 beq 0x1160c | goto label_3;
| }
0x000115b4 ldr r1, [pc, 0x80] | r1 = "KiB";
0x000115b8 mov r0, r7 | r0 = r7;
0x000115bc bl 0x10b0c | r0 = strcmp (r0, "KiB");
0x000115c0 cmp r0, 0 |
| if (r0 == 0) {
0x000115c4 beq 0x1162c | goto label_4;
| }
0x000115c8 ldr r1, [pc, 0x70] | r1 = "MiB";
0x000115cc mov r0, r7 | r0 = r7;
0x000115d0 bl 0x10b0c | r0 = strcmp (r0, "MiB");
0x000115d4 cmp r0, 0 |
| if (r0 != 0) {
0x000115d8 moveq r3, 0x40000000 | r3 = 0x40000000;
| }
| if (r0 == 0) {
0x000115dc beq 0x11610 | goto label_0;
| }
0x000115e0 ldr r1, [pc, 0x5c] | r1 = "GiB";
0x000115e4 mov r2, r6 | r2 = r6;
| label_1:
0x000115e8 ldr r3, [pc, 0x58] | r3 = "bad_size_specifier:___s____should_be_KiB__MiB_or_GiB";
0x000115ec mvn r4, 0 | r4 = ~0;
0x000115f0 ldr r0, [r3] | r0 = "bad_size_specifier:___s____should_be_KiB__MiB_or_GiB";
0x000115f4 bl 0x10a64 | fprintf ("bad_size_specifier:___s____should_be_KiB__MiB_or_GiB", "GiB", r2, "bad_size_specifier:___s____should_be_KiB__MiB_or_GiB", r4)
0x000115f8 mvn r5, 0 | r5 = ~0;
| do {
| label_2:
0x000115fc mov r0, r4 | r0 = r4;
0x00011600 mov r1, r5 | r1 = r5;
0x00011604 add sp, sp, 0xc |
0x00011608 pop {r4, r5, r6, r7, pc} |
| label_3:
0x0001160c mov r3, 0x400 | r3 = 0x400;
| label_0:
0x00011610 asr r1, r3, 0x1f | r1 = r3 >> 0x1f;
0x00011614 mul ip, r4, r1 |
0x00011618 mov r1, r4 | r1 = r4;
0x0001161c mla r2, r3, r5, ip | __asm ("mla r2, r3, r5, ip");
0x00011620 umull r4, r5, r1, r3 | r4:r5 = r1 * r3;
0x00011624 add r5, r2, r5 | r5 = r2 + r5;
0x00011628 b 0x115fc |
| } while (1);
| label_4:
0x0001162c mov r3, 0x100000 | r3 = 0x100000;
0x00011630 b 0x11610 | goto label_0;
| }
; 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/ubimkvol @ 0x11804 */
| #include <stdint.h>
|
; (fcn) fcn.00011804 () | void fcn_00011804 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| char * buf;
| char * s;
| int32_t var_4ch;
| r0 = arg1;
| r1 = arg2;
0x00011804 push {r4, r5, r6, r7, lr} |
0x00011808 mov r6, r1 | r6 = r1;
0x0001180c sub sp, sp, 0x4c |
0x00011810 mov r1, 0 | r1 = 0;
0x00011814 mov r5, r0 | r5 = r0;
0x00011818 bl 0x10af4 | r0 = open64 ();
0x0001181c cmn r0, 1 |
0x00011820 mov r4, r0 | r4 = r0;
| if (r0 == 1) {
0x00011824 beq 0x11980 | goto label_2;
| }
0x00011828 mov r2, 0x32 | r2 = 0x32;
0x0001182c add r1, sp, 0x14 | r1 += buf;
0x00011830 bl 0x10a7c | r0 = read (r0, r1, r2);
0x00011834 cmn r0, 1 |
| if (r0 != 1) {
0x00011838 bne 0x11890 | goto label_3;
| }
0x0001183c bl 0x10b24 | errno_location ();
0x00011840 ldr r7, [pc, 0x144] | r7 = *(0x11988);
0x00011844 mov r3, r5 | r3 = r5;
0x00011848 ldr r2, [pc, 0x140] | r2 = stderr;
0x0001184c ldr r1, [pc, 0x140] | r1 = "libubi";
0x00011850 ldr r6, [r0] | r6 = *(r0);
0x00011854 ldr r0, [r7] | r0 = *(0x11988);
0x00011858 bl 0x10a64 | fprintf (r0, "libubi", r2, r3, r4, r5, r6)
0x0001185c mov r0, r6 | r0 = r6;
0x00011860 ldr r5, [r7] | r5 = *(0x11988);
0x00011864 bl 0x109d4 | strerror (r0);
0x00011868 str r6, [sp] | *(sp) = r6;
0x0001186c ldr r3, [pc, 0x124] | r3 = "%s: error!: cannot read \"%s\"\n";
0x00011870 mov r2, 8 | r2 = 8;
0x00011874 ldr r1, [pc, 0x120] | r1 = *(0x11998);
0x00011878 str r0, [sp, 4] | var_4h = r0;
0x0001187c mov r0, r5 | r0 = r5;
0x00011880 bl 0x10a64 | fprintf (r0, r1, r2, "%s: error!: cannot read \"%s\"\n", r4, r5, r6)
| do {
0x00011884 mov r0, r4 | r0 = r4;
0x00011888 bl 0x10b6c | close (r0);
0x0001188c b 0x1197c | goto label_4;
| label_3:
0x00011890 cmp r0, 0x32 |
| if (r0 != 0x32) {
0x00011894 bne 0x118c0 | goto label_5;
| }
0x00011898 ldr r2, [pc, 0xf0] | r2 = stderr;
0x0001189c ldr r1, [pc, 0xfc] | r1 = "_serror__d___s_";
0x000118a0 mov r3, r5 | r3 = r5;
| label_0:
0x000118a4 ldr r0, [pc, 0xe0] |
0x000118a8 ldr r0, [r0] | r0 = *(0x11988);
0x000118ac bl 0x10a64 | r0 = fprintf (r0, "_serror__d___s_", r2, r3)
| label_1:
0x000118b0 bl 0x10b24 | errno_location ();
0x000118b4 mov r3, 0x16 | r3 = 0x16;
0x000118b8 str r3, [r0] | *(r0) = r3;
0x000118bc b 0x11884 |
| } while (1);
| label_5:
0x000118c0 add r3, sp, 0x48 | r3 += s;
0x000118c4 add r0, r3, r0 | r0 = r3 + r0;
0x000118c8 mov r3, 0 | r3 = 0;
0x000118cc strb r3, [r0, -0x34] | buf = r3;
0x000118d0 mov r2, r6 | r2 = r6;
0x000118d4 ldr r1, [pc, 0xc8] | r1 = "%s: error!: contents of \"%s\" is too long\n";
0x000118d8 add r0, sp, 0x14 | r0 += buf;
0x000118dc bl 0x10aac | r0 = sscanf (r0, "%s: error!: contents of \"%s\" is too long\n", r2);
0x000118e0 cmp r0, 1 |
| if (r0 == 1) {
0x000118e4 movne r3, r5 | r3 = r5;
| }
| if (r0 == 1) {
0x000118e8 ldrne r2, [pc, 0xa0] | r2 = "libubi";
| }
| if (r0 != 1) {
0x000118ec ldrne r1, [pc, 0xb4] | r1 = "%s: error!: cannot read integer from \"%s\"\n\n";
| goto label_6;
| }
| if (r0 != 1) {
| label_6:
0x000118f0 bne 0x118a4 | goto label_0;
| }
0x000118f4 ldrd r2, r3, [r6] | __asm ("ldrd r2, r3, [r6]");
0x000118f8 cmp r2, 0 |
0x000118fc sbcs r1, r3, 0 | __asm ("sbcs r1, r3, 0");
| if (r2 < 0) {
0x00011900 bge 0x11924 |
0x00011904 strd r2, r3, [sp] | __asm ("strd r2, r3, [sp]");
0x00011908 ldr r3, [pc, 0x7c] | r3 = *(0x11988);
0x0001190c str r5, [sp, 8] | var_8h = r5;
0x00011910 ldr r2, [pc, 0x78] | r2 = stderr;
0x00011914 ldr r1, [pc, 0x90] | r1 = "%s: error!: cannot read integer from \"%s\"\n\n";
0x00011918 ldr r0, [r3] | r0 = *(0x11988);
0x0001191c bl 0x10a64 | fprintf (r0, "%s: error!: cannot read integer from \"%s\"\n\n", r2, r3, r4, r5)
0x00011920 b 0x118b0 | goto label_1;
| }
0x00011924 mov r0, r4 | r0 = r4;
0x00011928 bl 0x10b6c | r0 = close (r0);
0x0001192c subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x00011930 beq 0x11980 |
0x00011934 bl 0x10b24 | errno_location ();
0x00011938 ldr r6, [pc, 0x4c] | r6 = *(0x11988);
0x0001193c mov r3, r5 | r3 = r5;
0x00011940 ldr r2, [pc, 0x48] | r2 = stderr;
0x00011944 ldr r1, [pc, 0x64] | r1 = "%s: error!: negative value %lld in \"%s\"\n";
0x00011948 ldr r4, [r0] | r4 = *(r0);
0x0001194c ldr r0, [r6] | r0 = *(0x11988);
0x00011950 bl 0x10a64 | fprintf (r0, "%s: error!: negative value %lld in \"%s\"\n", r2, r3, r4, r5, r6)
0x00011954 mov r0, r4 | r0 = r4;
0x00011958 ldr r5, [r6] | r5 = *(0x11988);
0x0001195c bl 0x109d4 | strerror (r0);
0x00011960 str r4, [sp] | *(sp) = r4;
0x00011964 ldr r3, [pc, 0x2c] | r3 = "%s: error!: cannot read \"%s\"\n";
0x00011968 mov r2, 8 | r2 = 8;
0x0001196c ldr r1, [pc, 0x28] | r1 = *(0x11998);
0x00011970 str r0, [sp, 4] | var_4h = r0;
0x00011974 mov r0, r5 | r0 = r5;
0x00011978 bl 0x10a64 | fprintf (r0, r1, r2, "%s: error!: cannot read \"%s\"\n", r4)
| label_4:
0x0001197c mvn r4, 0 | r4 = ~0;
| }
| label_2:
0x00011980 mov r0, r4 | r0 = r4;
0x00011984 add sp, sp, 0x4c |
0x00011988 pop {r4, r5, r6, r7, 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/ubimkvol @ 0x119b4 */
| #include <stdint.h>
|
; (fcn) fcn.000119b4 () | void fcn_000119b4 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_0h_2;
| int32_t var_8h;
| int32_t var_10h;
| int32_t var_10h_2;
| int32_t var_1ch;
| r0 = arg1;
| r1 = arg2;
0x000119b4 push {r4, r5, lr} |
0x000119b8 sub sp, sp, 0x1c |
0x000119bc mov r4, r1 | r4 = r1;
0x000119c0 add r1, sp, 0x10 | r1 += var_10h;
0x000119c4 mov r5, r0 | r5 = r0;
0x000119c8 bl 0x11804 | r0 = fcn_00011804 (r0, r1);
0x000119cc cmp r0, 0 |
| if (r0 == 0) {
0x000119d0 bne 0x11a10 |
0x000119d4 ldrd r2, r3, [sp, 0x10] | __asm ("ldrd r2, r3, [var_10h]");
0x000119d8 cmp r2, 0x80000000 |
0x000119dc sbcs r1, r3, 0 | __asm ("sbcs r1, r3, 0");
| if (r2 >= 0x80000000) {
0x000119e0 strlt r2, [r4] | *(r4) = r2;
| }
| if (r2 < 0x80000000) {
0x000119e4 blt 0x11a14 | goto label_0;
| }
0x000119e8 strd r2, r3, [sp] | __asm ("strd r2, r3, [sp]");
0x000119ec ldr r3, [pc, 0x28] | r3 = *(0x11a18);
0x000119f0 str r5, [sp, 8] | var_8h = r5;
0x000119f4 ldr r2, [pc, 0x24] | r2 = stderr;
0x000119f8 ldr r0, [r3] | r0 = *(0x11a18);
0x000119fc ldr r1, [pc, 0x20] | r1 = "libubi";
0x00011a00 bl 0x10a64 | r0 = fprintf (r0, "libubi", r2, r3, r4, r5)
0x00011a04 bl 0x10b24 | errno_location ();
0x00011a08 mov r3, 0x16 | r3 = 0x16;
0x00011a0c str r3, [r0] | *(r0) = r3;
| }
0x00011a10 mvn r0, 0 | r0 = ~0;
| label_0:
0x00011a14 add sp, sp, 0x1c |
0x00011a18 pop {r4, r5, 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/ubimkvol @ 0x11ac0 */
| #include <stdint.h>
|
; (fcn) fcn.00011ac0 () | void fcn_00011ac0 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| void * buf;
| int32_t var_10h;
| r0 = arg1;
| r1 = arg2;
0x00011ac0 push {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr} |
0x00011ac4 mov r8, r1 | r8 = r1;
0x00011ac8 mov r1, 0 | r1 = 0;
0x00011acc mov r5, r0 | r5 = r0;
0x00011ad0 mov r7, r2 | r7 = r2;
0x00011ad4 bl 0x10af4 | r0 = open64 ();
0x00011ad8 cmn r0, 1 |
0x00011adc mov r4, r0 | r4 = r0;
| if (r0 == 1) {
0x00011ae0 beq 0x11c28 | goto label_2;
| }
0x00011ae4 mov r2, r7 | r2 = r7;
0x00011ae8 mov r1, r8 | r1 = r8;
0x00011aec bl 0x10a7c | r0 = read (r0, r1, r2);
0x00011af0 cmn r0, 1 |
0x00011af4 mov r6, r0 | r6 = r0;
| if (r0 != 1) {
0x00011af8 bne 0x11b50 | goto label_3;
| }
| label_0:
0x00011afc bl 0x10b24 | errno_location ();
0x00011b00 ldr r7, [pc, 0x12c] | r7 = *(0x11c30);
0x00011b04 mov r3, r5 | r3 = r5;
0x00011b08 ldr r2, [pc, 0x128] | r2 = stderr;
0x00011b0c ldr r1, [pc, 0x128] | r1 = "libubi";
0x00011b10 ldr r6, [r0] | r6 = *(r0);
0x00011b14 ldr r0, [r7] | r0 = *(0x11c30);
0x00011b18 bl 0x10a64 | fprintf (r0, "libubi", r2, r3, r4, r5, r6)
0x00011b1c mov r0, r6 | r0 = r6;
0x00011b20 ldr r5, [r7] | r5 = *(0x11c30);
0x00011b24 bl 0x109d4 | strerror (r0);
0x00011b28 str r6, [sp] | *(sp) = r6;
0x00011b2c ldr r3, [pc, 0x10c] | r3 = "%s: error!: cannot read \"%s\"\n";
0x00011b30 mov r2, 8 | r2 = 8;
0x00011b34 ldr r1, [pc, 0x108] | r1 = *(0x11c40);
0x00011b38 str r0, [sp, 4] | var_4h = r0;
0x00011b3c mov r0, r5 | r0 = r5;
0x00011b40 bl 0x10a64 | fprintf (r0, r1, r2, "%s: error!: cannot read \"%s\"\n", r4, r5, r6)
| do {
0x00011b44 mov r0, r4 | r0 = r4;
0x00011b48 bl 0x10b6c | close (r0);
0x00011b4c b 0x11c24 | goto label_4;
| label_3:
0x00011b50 cmp r7, r0 |
| if (r7 != r0) {
0x00011b54 bne 0x11b80 | goto label_5;
| }
0x00011b58 ldr r0, [pc, 0xd4] |
0x00011b5c mov r3, r5 | r3 = r5;
0x00011b60 ldr r2, [pc, 0xd0] | r2 = stderr;
0x00011b64 ldr r1, [pc, 0xdc] | r1 = "_serror__d___s_";
0x00011b68 ldr r0, [r0] | r0 = *(0x11c30);
0x00011b6c bl 0x10a64 | r0 = fprintf (r0, "_serror__d___s_", r2, r3)
| label_1:
0x00011b70 bl 0x10b24 | errno_location ();
0x00011b74 mov r3, 0x16 | r3 = 0x16;
0x00011b78 str r3, [r0] | *(r0) = r3;
0x00011b7c b 0x11b44 |
| } while (1);
| label_5:
0x00011b80 mov r3, 0 | r3 = 0;
0x00011b84 strb r3, [r8, r0] | *((r8 + r0)) = r3;
0x00011b88 mov r2, 1 | r2 = 1;
0x00011b8c add r1, sp, 0xc | r1 += buf;
0x00011b90 mov r0, r4 | r0 = r4;
0x00011b94 bl 0x10a7c | r0 = read (r0, r1, r2);
0x00011b98 cmp r0, 1 |
| if (r0 == 1) {
0x00011b9c beq 0x11afc | goto label_0;
| }
0x00011ba0 cmp r0, 0 |
| if (r0 != 0) {
0x00011ba4 beq 0x11bc8 |
0x00011ba8 ldr r0, [pc, 0x84] |
0x00011bac str r7, [sp] | *(sp) = r7;
0x00011bb0 mov r3, r5 | r3 = r5;
0x00011bb4 ldr r2, [pc, 0x7c] | r2 = stderr;
0x00011bb8 ldr r1, [pc, 0x8c] | r1 = "%s: error!: contents of \"%s\" is too long\n";
0x00011bbc ldr r0, [r0] | r0 = *(0x11c30);
0x00011bc0 bl 0x10a64 | fprintf (r0, "%s: error!: contents of \"%s\" is too long\n", r2, r3)
0x00011bc4 b 0x11b70 | goto label_1;
| }
0x00011bc8 mov r0, r4 | r0 = r4;
0x00011bcc bl 0x10b6c | r0 = close (r0);
0x00011bd0 cmp r0, 0 |
| if (r0 != 0) {
0x00011bd4 moveq r4, r6 | r4 = r6;
| }
| if (r0 != 0) {
0x00011bd8 beq 0x11c28 |
0x00011bdc bl 0x10b24 | errno_location ();
0x00011be0 ldr r6, [pc, 0x4c] | r6 = *(0x11c30);
0x00011be4 mov r3, r5 | r3 = r5;
0x00011be8 ldr r2, [pc, 0x48] | r2 = stderr;
0x00011bec ldr r1, [pc, 0x5c] | r1 = "_s:_error_:_file___s__contains_too_much_data_____d_bytes_";
0x00011bf0 ldr r4, [r0] | r4 = *(r0);
0x00011bf4 ldr r0, [r6] | r0 = *(0x11c30);
0x00011bf8 bl 0x10a64 | fprintf (r0, "_s:_error_:_file___s__contains_too_much_data_____d_bytes_", r2, r3, r4, r5, r6)
0x00011bfc mov r0, r4 | r0 = r4;
0x00011c00 ldr r5, [r6] | r5 = *(0x11c30);
0x00011c04 bl 0x109d4 | strerror (r0);
0x00011c08 str r4, [sp] | *(sp) = r4;
0x00011c0c ldr r3, [pc, 0x2c] | r3 = "%s: error!: cannot read \"%s\"\n";
0x00011c10 mov r2, 8 | r2 = 8;
0x00011c14 ldr r1, [pc, 0x28] | r1 = *(0x11c40);
0x00011c18 str r0, [sp, 4] | var_4h = r0;
0x00011c1c mov r0, r5 | r0 = r5;
0x00011c20 bl 0x10a64 | fprintf (r0, r1, r2, "%s: error!: cannot read \"%s\"\n", r4)
| label_4:
0x00011c24 mvn r4, 0 | r4 = ~0;
| }
| label_2:
0x00011c28 mov r0, r4 | r0 = r4;
0x00011c2c add sp, sp, 0x10 |
0x00011c30 pop {r4, r5, r6, r7, r8, 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/ubimkvol @ 0x11c54 */
| #include <stdint.h>
|
; (fcn) fcn.00011c54 () | void fcn_00011c54 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| r0 = arg1;
| r1 = arg2;
0x00011c54 push {r0, r1, r4, r5, r6, r7, r8, sb, sl, lr} |
0x00011c58 mov r7, r1 | r7 = r1;
0x00011c5c mov sl, r0 | sl = r0;
0x00011c60 bl 0x10b3c | r0 = strlen (r0);
0x00011c64 mov r4, r0 | r4 = r0;
0x00011c68 mov sb, r0 | sb = r0;
0x00011c6c mov r0, r7 | r0 = r7;
0x00011c70 bl 0x10b3c | r0 = strlen (r0);
0x00011c74 add r6, r4, r0 | r6 = r4 + r0;
0x00011c78 add r6, r6, 2 | r6 += 2;
0x00011c7c mov r8, r0 | r8 = r0;
0x00011c80 mov r0, r6 | r0 = r6;
0x00011c84 bl 0x10a28 | r0 = malloc (r0);
0x00011c88 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x00011c8c bne 0x11ce4 | goto label_0;
| }
0x00011c90 bl 0x10b24 | errno_location ();
0x00011c94 ldr r7, [pc, 0x80] | r7 = *(0x11d18);
0x00011c98 mov r3, r6 | r3 = r6;
0x00011c9c ldr r2, [pc, 0x7c] | r2 = stderr;
0x00011ca0 ldr r1, [pc, 0x7c] | r1 = "libubi";
0x00011ca4 ldr r4, [r0] | r4 = *(r0);
0x00011ca8 ldr r0, [r7] | r0 = *(0x11d18);
0x00011cac bl 0x10a64 | fprintf (r0, "libubi", r2, r3, r4)
0x00011cb0 mov r0, r4 | r0 = r4;
0x00011cb4 ldr r6, [r7] | r6 = *(0x11d18);
0x00011cb8 bl 0x109d4 | strerror (r0);
0x00011cbc str r4, [sp] | *(sp) = r4;
0x00011cc0 ldr r3, [pc, 0x60] | r3 = "%s: error!: cannot allocate %d bytes\n";
0x00011cc4 mov r2, 8 | r2 = 8;
0x00011cc8 ldr r1, [pc, 0x5c] | r1 = *(0x11d28);
0x00011ccc str r0, [sp, 4] | var_4h = r0;
0x00011cd0 mov r0, r6 | r0 = r6;
0x00011cd4 bl 0x10a64 | fprintf (r0, r1, r2, "%s: error!: cannot allocate %d bytes\n", r4)
| do {
0x00011cd8 mov r0, r5 | r0 = r5;
0x00011cdc add sp, sp, 8 |
0x00011ce0 pop {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_0:
0x00011ce4 mov r2, r4 | r2 = r4;
0x00011ce8 mov r1, sl | r1 = sl;
0x00011cec bl 0x10a10 | memcpy (r0, r1, r2);
0x00011cf0 add r3, r5, r4 | r3 = r5 + r4;
0x00011cf4 ldrb r3, [r3, -1] | r3 = *((r3 - 1));
0x00011cf8 add r2, r8, 1 | r2 = r8 + 1;
0x00011cfc cmp r3, 0x2f |
| if (r3 == 0x2f) {
0x00011d00 addne r4, r4, 1 | r4++;
| }
| if (r3 == 0x2f) {
0x00011d04 movne r3, 0x2f | r3 = 0x2f;
| }
| if (r3 == 0x2f) {
0x00011d08 strbne r3, [r5, sb] | *((r5 + sb)) = r3;
| }
0x00011d0c mov r1, r7 | r1 = r7;
0x00011d10 add r0, r5, r4 | r0 = r5 + r4;
0x00011d14 bl 0x10a10 | memcpy (r0, r1, r2);
0x00011d18 b 0x11cd8 |
| } while (1);
| }
; 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/ubimkvol @ 0x11d30 */
| #include <stdint.h>
|
; (fcn) fcn.00011d30 () | void fcn_00011d30 (int32_t arg1) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_18h;
| int32_t var_28h;
| int32_t var_28h_2;
| int32_t var_74h;
| r0 = arg1;
0x00011d30 push {r4, r5, r6, r7, lr} |
0x00011d34 sub sp, sp, 0x74 |
0x00011d38 add r1, sp, 8 | r1 += var_8h;
0x00011d3c mov r5, r0 | r5 = r0;
0x00011d40 bl 0x109e0 | r0 = stat64 ();
0x00011d44 cmp r0, 0 |
| if (r0 >= 0) {
0x00011d48 bge 0x11da0 | goto label_2;
| }
0x00011d4c bl 0x10b24 | errno_location ();
0x00011d50 ldr r6, [pc, 0xc8] | r6 = *(0x11e1c);
0x00011d54 ldr r2, [pc, 0xc8] | r2 = stderr;
0x00011d58 ldr r1, [pc, 0xc8] | r1 = "libubi";
0x00011d5c mov r3, r5 | r3 = r5;
0x00011d60 ldr r4, [r0] | r4 = *(r0);
| do {
| label_1:
0x00011d64 ldr r0, [r6] | r0 = *(r6);
0x00011d68 bl 0x10a64 | fprintf (r0, "libubi", r2, r3, r4, r5, r6)
0x00011d6c mov r0, r4 | r0 = r4;
0x00011d70 ldr r5, [r6] | r5 = *(r6);
0x00011d74 bl 0x109d4 | strerror (r0);
0x00011d78 str r4, [sp] | *(sp) = r4;
0x00011d7c ldr r3, [pc, 0xa8] | r3 = "%s: error!: cannot stat \"%s\"\n";
0x00011d80 mov r2, 8 | r2 = 8;
0x00011d84 ldr r1, [pc, 0xa4] | r1 = *(0x11e2c);
0x00011d88 str r0, [sp, 4] | var_4h = r0;
0x00011d8c mov r0, r5 | r0 = r5;
0x00011d90 bl 0x10a64 | fprintf (r0, r1, r2, "%s: error!: cannot stat \"%s\"\n", r4)
0x00011d94 mvn r0, 0 | r0 = ~0;
| label_0:
0x00011d98 add sp, sp, 0x74 |
0x00011d9c pop {r4, r5, r6, r7, pc} |
| label_2:
0x00011da0 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00011da4 and r3, r3, 0xf000 | r3 &= 0xf000;
0x00011da8 cmp r3, 0x2000 |
| if (r3 == 0x2000) {
0x00011dac beq 0x11dd0 | goto label_3;
| }
0x00011db0 bl 0x10b24 | errno_location ();
0x00011db4 mov r4, 0x16 | r4 = 0x16;
0x00011db8 ldr r6, [pc, 0x60] | r6 = *(0x11e1c);
0x00011dbc mov r3, r5 | r3 = r5;
0x00011dc0 ldr r2, [pc, 0x5c] | r2 = stderr;
0x00011dc4 ldr r1, [pc, 0x68] | r1 = "_serror__d___s_";
0x00011dc8 str r4, [r0] | *(r0) = r4;
0x00011dcc b 0x11d64 |
| } while (1);
| label_3:
0x00011dd0 ldrd r6, r7, [sp, 0x28] | __asm ("ldrd r6, r7, [var_28h]");
0x00011dd4 mov r1, r7 | r1 = r7;
0x00011dd8 mov r0, r6 | r0 = r6;
0x00011ddc bl 0x10a04 | gnu_dev_major ();
0x00011de0 mov r1, r7 | r1 = r7;
0x00011de4 mov r4, r0 | r4 = r0;
0x00011de8 mov r0, r6 | r0 = r6;
0x00011dec bl 0x10a40 | gnu_dev_minor ();
0x00011df0 cmp r4, 0x5a |
| if (r4 != 0x5a) {
0x00011df4 addeq r0, r0, r0, lsr 31 | r0 += (r0 >> 31);
| }
0x00011df8 asreq r0, r0, 1 | __asm ("asreq r0, r0, 1");
| if (r4 == 0x5a) {
0x00011dfc beq 0x11d98 | goto label_0;
| }
0x00011e00 bl 0x10b24 | errno_location ();
0x00011e04 mov r4, 0x16 | r4 = 0x16;
0x00011e08 ldr r6, [pc, 0x10] | r6 = *(0x11e1c);
0x00011e0c mov r3, r5 | r3 = r5;
0x00011e10 ldr r2, [pc, 0xc] | r2 = stderr;
0x00011e14 ldr r1, [pc, 0x1c] | r1 = "%s: error!: \"%s\" is not a character device\n";
0x00011e18 str r4, [r0] | *(r0) = r4;
0x00011e1c b 0x11d64 | goto label_1;
| }
; 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/ubimkvol @ 0x11e3c */
| #include <stdint.h>
|
; (fcn) fcn.00011e3c () | void fcn_00011e3c (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| char * s;
| int32_t var_40h;
| r0 = arg1;
| r1 = arg2;
0x00011e3c push {r4, r5, r6, lr} |
0x00011e40 sub sp, sp, 0x40 |
0x00011e44 mov r4, r1 | r4 = r1;
0x00011e48 mov r5, r2 | r5 = r2;
0x00011e4c add r1, sp, 0xc | r1 += s;
0x00011e50 mov r2, 0x32 | r2 = 0x32;
0x00011e54 mov r6, r0 | r6 = r0;
0x00011e58 bl 0x11ac0 | r0 = fcn_00011ac0 (r0, r1);
0x00011e5c cmp r0, 0 |
| if (r0 < 0) {
0x00011e60 blt 0x11ea8 | goto label_1;
| }
0x00011e64 mov r3, r5 | r3 = r5;
0x00011e68 mov r2, r4 | r2 = r4;
0x00011e6c ldr r1, [pc, 0x8c] | r1 = *(0x11efc);
0x00011e70 add r0, sp, 0xc | r0 += s;
0x00011e74 bl 0x10aac | r0 = sscanf (r0, r1, r2);
0x00011e78 cmp r0, 2 |
| if (r0 == 2) {
0x00011e7c beq 0x11eb0 | goto label_2;
| }
0x00011e80 bl 0x10b24 | errno_location ();
0x00011e84 mov r3, 0x16 | r3 = 0x16;
0x00011e88 ldr r2, [pc, 0x74] | r2 = "_d:_d";
0x00011e8c ldr r1, [pc, 0x74] | r1 = "libubi";
0x00011e90 str r3, [r0] | *(r0) = r3;
0x00011e94 ldr r0, [pc, 0x70] |
0x00011e98 mov r3, r6 | r3 = r6;
0x00011e9c ldr r0, [r0] | r0 = "%s: error!: \"%s\" does not have major:minor format\n";
0x00011ea0 bl 0x10a64 | fprintf ("%s: error!: \"%s\" does not have major:minor format\n", "libubi", "_d:_d", r3)
| label_0:
0x00011ea4 mvn r0, 0 | r0 = ~0;
| do {
| label_1:
0x00011ea8 add sp, sp, 0x40 |
0x00011eac pop {r4, r5, r6, pc} |
| label_2:
0x00011eb0 ldr r3, [r4] | r3 = *(r4);
0x00011eb4 cmp r3, 0 |
| if (r3 < 0) {
0x00011eb8 blt 0x11ecc | goto label_3;
| }
0x00011ebc ldr r3, [r5] | r3 = *(r5);
0x00011ec0 cmp r3, 0 |
| if (r3 < 0) {
0x00011ec4 movge r0, 0 | r0 = 0;
| }
0x00011ec8 bge 0x11ea8 |
| } while (r3 >= 0);
| label_3:
0x00011ecc bl 0x10b24 | errno_location ();
0x00011ed0 mov r3, 0x16 | r3 = 0x16;
0x00011ed4 ldr r2, [pc, 0x28] | r2 = "_d:_d";
0x00011ed8 ldr r1, [pc, 0x30] | r1 = stderr;
0x00011edc str r3, [r0] | *(r0) = r3;
0x00011ee0 ldr r0, [pc, 0x24] |
0x00011ee4 ldr r3, [r5] | r3 = *(r5);
0x00011ee8 str r6, [sp, 4] | var_4h = r6;
0x00011eec str r3, [sp] | *(sp) = r3;
0x00011ef0 ldr r3, [r4] | r3 = *(r4);
0x00011ef4 ldr r0, [r0] | r0 = "%s: error!: \"%s\" does not have major:minor format\n";
0x00011ef8 bl 0x10a64 | fprintf ("%s: error!: \"%s\" does not have major:minor format\n", r1, "_d:_d", r3, r4, r5, r6)
0x00011efc b 0x11ea4 | goto label_0;
| }
; 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/ubimkvol @ 0x11f68 */
| #include <stdint.h>
|
; (fcn) fcn.00011f68 () | void fcn_00011f68 (int32_t arg1) {
| int32_t var_0h;
| int32_t var_4h;
| r0 = arg1;
0x00011f68 push {r0, r1, r4, r5, r6, lr} |
0x00011f6c ldr r5, [pc, 0x50] |
0x00011f70 mov r6, r0 | r6 = r0;
0x00011f74 bl 0x10b24 | errno_location ();
0x00011f78 mov r3, r6 | r3 = r6;
0x00011f7c ldr r2, [pc, 0x44] | r2 = stderr;
0x00011f80 ldr r1, [pc, 0x44] | r1 = "libubi";
0x00011f84 ldr r4, [r0] | r4 = *(r0);
0x00011f88 ldr r0, [r5] | r0 = *(0x11fc0);
0x00011f8c bl 0x10a64 | fprintf (r0, "libubi", r2, r3, r4)
0x00011f90 mov r0, r4 | r0 = r4;
0x00011f94 ldr r5, [r5] | r5 = *(0x11fc0);
0x00011f98 bl 0x109d4 | strerror (r0);
0x00011f9c str r4, [sp] | *(sp) = r4;
0x00011fa0 ldr r3, [pc, 0x28] | r3 = "%s: error!: cannot open \"%s\"\n";
0x00011fa4 mov r2, 8 | r2 = 8;
0x00011fa8 ldr r1, [pc, 0x24] | r1 = *(0x11fd0);
0x00011fac str r0, [sp, 4] | var_4h = r0;
0x00011fb0 mov r0, r5 | r0 = r5;
0x00011fb4 bl 0x10a64 | fprintf (r0, r1, r2, "%s: error!: cannot open \"%s\"\n", r4)
0x00011fb8 mvn r0, 0 | r0 = ~0;
0x00011fbc add sp, sp, 8 |
0x00011fc0 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/ubimkvol @ 0x120fc */
| #include <stdint.h>
|
; (fcn) fcn.000120fc () | void fcn_000120fc () {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_ch;
| int32_t var_10h;
0x000120fc push {r0, r1, r2, r3, r4, r5, r6, lr} |
0x00012100 mov r1, 0x68 | r1 = 0x68;
0x00012104 mov r0, 1 | r0 = 1;
0x00012108 bl 0x10a58 | r0 = calloc (r0, r1);
0x0001210c subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x00012110 beq 0x12180 | goto label_1;
| }
0x00012114 ldr r1, [pc, 0x2fc] | r1 = *(0x12414);
0x00012118 ldr r0, [pc, 0x2fc] | r0 = "class/misc/ubi_ctrl/";
0x0001211c bl 0x11c54 | r0 = fcn_00011c54 ("class/misc/ubi_ctrl/", r1);
0x00012120 cmp r0, 0 |
0x00012124 str r0, [r4, 4] | *((r4 + 4)) = r0;
| if (r0 == 0) {
0x00012128 beq 0x12174 | goto label_0;
| }
0x0001212c ldr r1, [pc, 0x2ec] | r1 = "_sys";
0x00012130 bl 0x11c54 | r0 = fcn_00011c54 (r0, "_sys");
0x00012134 cmp r0, 0 |
0x00012138 str r0, [r4, 8] | *((r4 + 8)) = r0;
| if (r0 == 0) {
0x0001213c beq 0x12174 | goto label_0;
| }
0x00012140 ldr r1, [pc, 0x2dc] | r1 = *(0x12420);
0x00012144 ldr r0, [pc, 0x2d0] | r0 = "class/misc/ubi_ctrl/";
0x00012148 bl 0x11c54 | r0 = fcn_00011c54 ("class/misc/ubi_ctrl/", r1);
0x0001214c cmp r0, 0 |
0x00012150 str r0, [r4, 0xc] | *((r4 + 0xc)) = r0;
| if (r0 == 0) {
0x00012154 beq 0x12174 | goto label_0;
| }
0x00012158 mov r1, 0 | r1 = 0;
0x0001215c bl 0x10af4 | r0 = open64 ();
0x00012160 cmn r0, 1 |
| if (r0 != 1) {
0x00012164 bne 0x1218c | goto label_2;
| }
0x00012168 bl 0x10b24 | errno_location ();
0x0001216c mov r3, 0 | r3 = 0;
0x00012170 str r3, [r0] | *(r0) = r3;
| do {
| label_0:
0x00012174 mov r0, r4 | r0 = r4;
0x00012178 bl 0x12028 | fcn_00012028 (r0);
0x0001217c mov r4, 0 | r4 = 0;
| label_1:
0x00012180 mov r0, r4 | r0 = r4;
0x00012184 add sp, sp, 0x10 |
0x00012188 pop {r4, r5, r6, pc} |
| label_2:
0x0001218c bl 0x10b6c | r0 = close (r0);
0x00012190 cmp r0, 0 |
| if (r0 == 0) {
0x00012194 beq 0x121e4 | goto label_3;
| }
0x00012198 bl 0x10b24 | errno_location ();
0x0001219c ldr r6, [pc, 0x284] |
0x000121a0 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x000121a4 ldr r2, [pc, 0x280] | r2 = stderr;
0x000121a8 ldr r1, [pc, 0x280] | r1 = "libubi";
0x000121ac ldr r5, [r0] | r5 = *(r0);
0x000121b0 ldr r0, [r6] | r0 = "class/ubi";
0x000121b4 bl 0x10a64 | fprintf ("class/ubi", "libubi", r2, r3, r4, r5, "class/ubi")
0x000121b8 mov r0, r5 | r0 = r5;
0x000121bc ldr r6, [r6] | r6 = "class/ubi";
0x000121c0 bl 0x109d4 | strerror (r0);
0x000121c4 str r5, [sp] | *(sp) = r5;
0x000121c8 ldr r3, [pc, 0x264] | r3 = "_s:_error_:_close_failed_on___s_";
0x000121cc mov r2, 8 | r2 = 8;
0x000121d0 ldr r1, [pc, 0x260] | r1 = *(0x12434);
0x000121d4 str r0, [sp, 4] | var_4h = r0;
0x000121d8 mov r0, r6 | r0 = r6;
0x000121dc bl 0x10a64 | fprintf (r0, r1, r2, "_s:_error_:_close_failed_on___s_", r4, r5)
0x000121e0 b 0x12174 |
| } while (1);
| label_3:
0x000121e4 ldr r1, [pc, 0x250] | r1 = "_serror__d___s_";
0x000121e8 ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x000121ec bl 0x11c54 | r0 = fcn_00011c54 (r0, "_serror__d___s_");
0x000121f0 cmp r0, 0 |
0x000121f4 str r0, [r4, 0x10] | *((r4 + 0x10)) = r0;
| if (r0 == 0) {
0x000121f8 beq 0x12174 | goto label_0;
| }
0x000121fc ldr r1, [pc, 0x23c] | r1 = "ubi%d";
0x00012200 ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x00012204 bl 0x11c54 | r0 = fcn_00011c54 (r0, "ubi%d");
0x00012208 cmp r0, 0 |
0x0001220c str r0, [r4, 0x14] | *((r4 + 0x14)) = r0;
| if (r0 == 0) {
0x00012210 beq 0x12174 | goto label_0;
| }
0x00012214 ldr r1, [pc, 0x204] | r1 = "_sys";
0x00012218 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x0001221c bl 0x11c54 | r0 = fcn_00011c54 (r0, "_sys");
0x00012220 cmp r0, 0 |
0x00012224 str r0, [r4, 0x18] | *((r4 + 0x18)) = r0;
| if (r0 == 0) {
0x00012228 beq 0x12174 | goto label_0;
| }
0x0001222c ldr r1, [pc, 0x210] | r1 = "version";
0x00012230 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x00012234 bl 0x11c54 | r0 = fcn_00011c54 (r0, "version");
0x00012238 cmp r0, 0 |
0x0001223c str r0, [r4, 0x1c] | *((r4 + 0x1c)) = r0;
| if (r0 == 0) {
0x00012240 beq 0x12174 | goto label_0;
| }
0x00012244 ldr r1, [pc, 0x1fc] | r1 = "avail_eraseblocks";
0x00012248 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x0001224c bl 0x11c54 | r0 = fcn_00011c54 (r0, "avail_eraseblocks");
0x00012250 cmp r0, 0 |
0x00012254 str r0, [r4, 0x20] | *((r4 + 0x20)) = r0;
| if (r0 == 0) {
0x00012258 beq 0x12174 | goto label_0;
| }
0x0001225c ldr r1, [pc, 0x1e8] | r1 = "total_eraseblocks";
0x00012260 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x00012264 bl 0x11c54 | r0 = fcn_00011c54 (r0, "total_eraseblocks");
0x00012268 cmp r0, 0 |
0x0001226c str r0, [r4, 0x24] | *((r4 + 0x24)) = r0;
| if (r0 == 0) {
0x00012270 beq 0x12174 | goto label_0;
| }
0x00012274 ldr r1, [pc, 0x1d4] | r1 = "bad_peb_count";
0x00012278 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x0001227c bl 0x11c54 | r0 = fcn_00011c54 (r0, "bad_peb_count");
0x00012280 cmp r0, 0 |
0x00012284 str r0, [r4, 0x28] | *((r4 + 0x28)) = r0;
| if (r0 == 0) {
0x00012288 beq 0x12174 | goto label_0;
| }
0x0001228c ldr r1, [pc, 0x1c0] | r1 = "eraseblock_size";
0x00012290 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x00012294 bl 0x11c54 | r0 = fcn_00011c54 (r0, "eraseblock_size");
0x00012298 cmp r0, 0 |
0x0001229c str r0, [r4, 0x2c] | *((r4 + 0x2c)) = r0;
| if (r0 == 0) {
0x000122a0 beq 0x12174 | goto label_0;
| }
0x000122a4 ldr r1, [pc, 0x1ac] | r1 = "max_ec";
0x000122a8 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x000122ac bl 0x11c54 | r0 = fcn_00011c54 (r0, "max_ec");
0x000122b0 cmp r0, 0 |
0x000122b4 str r0, [r4, 0x30] | *((r4 + 0x30)) = r0;
| if (r0 == 0) {
0x000122b8 beq 0x12174 | goto label_0;
| }
0x000122bc ldr r1, [pc, 0x198] | r1 = "reserved_for_bad";
0x000122c0 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x000122c4 bl 0x11c54 | r0 = fcn_00011c54 (r0, "reserved_for_bad");
0x000122c8 cmp r0, 0 |
0x000122cc str r0, [r4, 0x34] | *((r4 + 0x34)) = r0;
| if (r0 == 0) {
0x000122d0 beq 0x12174 | goto label_0;
| }
0x000122d4 ldr r1, [pc, 0x184] | r1 = "max_vol_count";
0x000122d8 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x000122dc bl 0x11c54 | r0 = fcn_00011c54 (r0, "max_vol_count");
0x000122e0 cmp r0, 0 |
0x000122e4 str r0, [r4, 0x38] | *((r4 + 0x38)) = r0;
| if (r0 == 0) {
0x000122e8 beq 0x12174 | goto label_0;
| }
0x000122ec ldr r1, [pc, 0x170] | r1 = "min_io_size";
0x000122f0 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x000122f4 bl 0x11c54 | r0 = fcn_00011c54 (r0, "min_io_size");
0x000122f8 cmp r0, 0 |
0x000122fc str r0, [r4, 0x3c] | *((r4 + 0x3c)) = r0;
| if (r0 == 0) {
0x00012300 beq 0x12174 | goto label_0;
| }
0x00012304 ldr r1, [pc, 0x15c] | r1 = "mtd_num";
0x00012308 ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x0001230c bl 0x11c54 | r0 = fcn_00011c54 (r0, "mtd_num");
0x00012310 cmp r0, 0 |
0x00012314 str r0, [r4, 0x40] | *((r4 + 0x40)) = r0;
| if (r0 == 0) {
0x00012318 beq 0x12174 | goto label_0;
| }
0x0001231c ldr r1, [pc, 0x148] | r1 = "ubi%d_%d";
0x00012320 bl 0x11c54 | r0 = fcn_00011c54 (r0, "ubi%d_%d");
0x00012324 cmp r0, 0 |
0x00012328 str r0, [r4, 0x44] | *((r4 + 0x44)) = r0;
| if (r0 == 0) {
0x0001232c beq 0x12174 | goto label_0;
| }
0x00012330 ldr r1, [pc, 0xe8] | r1 = "_sys";
0x00012334 ldr r0, [r4, 0x40] | r0 = *((r4 + 0x40));
0x00012338 bl 0x11c54 | r0 = fcn_00011c54 (r0, "_sys");
0x0001233c cmp r0, 0 |
0x00012340 str r0, [r4, 0x48] | *((r4 + 0x48)) = r0;
| if (r0 == 0) {
0x00012344 beq 0x12174 | goto label_0;
| }
0x00012348 ldr r1, [pc, 0x120] | r1 = "type";
0x0001234c ldr r0, [r4, 0x40] | r0 = *((r4 + 0x40));
0x00012350 bl 0x11c54 | r0 = fcn_00011c54 (r0, "type");
0x00012354 cmp r0, 0 |
0x00012358 str r0, [r4, 0x4c] | *((r4 + 0x4c)) = r0;
| if (r0 == 0) {
0x0001235c beq 0x12174 | goto label_0;
| }
0x00012360 ldr r1, [pc, 0x10c] | r1 = "alignment";
0x00012364 ldr r0, [r4, 0x40] | r0 = *((r4 + 0x40));
0x00012368 bl 0x11c54 | r0 = fcn_00011c54 (r0, "alignment");
0x0001236c cmp r0, 0 |
0x00012370 str r0, [r4, 0x50] | *((r4 + 0x50)) = r0;
| if (r0 == 0) {
0x00012374 beq 0x12174 | goto label_0;
| }
0x00012378 ldr r1, [pc, 0xf8] | r1 = "data_bytes";
0x0001237c ldr r0, [r4, 0x40] | r0 = *((r4 + 0x40));
0x00012380 bl 0x11c54 | r0 = fcn_00011c54 (r0, "data_bytes");
0x00012384 cmp r0, 0 |
0x00012388 str r0, [r4, 0x54] | *((r4 + 0x54)) = r0;
| if (r0 == 0) {
0x0001238c beq 0x12174 | goto label_0;
| }
0x00012390 ldr r1, [pc, 0xe4] | r1 = "reserved_ebs";
0x00012394 ldr r0, [r4, 0x40] | r0 = *((r4 + 0x40));
0x00012398 bl 0x11c54 | r0 = fcn_00011c54 (r0, "reserved_ebs");
0x0001239c cmp r0, 0 |
0x000123a0 str r0, [r4, 0x58] | *((r4 + 0x58)) = r0;
| if (r0 == 0) {
0x000123a4 beq 0x12174 | goto label_0;
| }
0x000123a8 ldr r1, [pc, 0xd0] | r1 = "usable_eb_size";
0x000123ac ldr r0, [r4, 0x40] | r0 = *((r4 + 0x40));
0x000123b0 bl 0x11c54 | r0 = fcn_00011c54 (r0, "usable_eb_size");
0x000123b4 cmp r0, 0 |
0x000123b8 str r0, [r4, 0x5c] | *((r4 + 0x5c)) = r0;
| if (r0 == 0) {
0x000123bc beq 0x12174 | goto label_0;
| }
0x000123c0 ldr r1, [pc, 0xbc] | r1 = "corrupted";
0x000123c4 ldr r0, [r4, 0x40] | r0 = *((r4 + 0x40));
0x000123c8 bl 0x11c54 | r0 = fcn_00011c54 (r0, "corrupted");
0x000123cc cmp r0, 0 |
0x000123d0 str r0, [r4, 0x60] | *((r4 + 0x60)) = r0;
| if (r0 == 0) {
0x000123d4 beq 0x12174 | goto label_0;
| }
0x000123d8 add r1, sp, 0xc | r1 += var_ch;
0x000123dc ldr r0, [r4, 0x14] | r0 = *((r4 + 0x14));
0x000123e0 bl 0x119b4 | r0 = fcn_000119b4 (r0, r1);
0x000123e4 cmp r0, 0 |
| if (r0 != 0) {
0x000123e8 bne 0x12174 | goto label_0;
| }
0x000123ec ldr r3, [sp, 0xc] | r3 = var_ch;
0x000123f0 cmp r3, 1 |
| if (r3 == 1) {
0x000123f4 beq 0x12180 | goto label_1;
| }
0x000123f8 ldr r0, [pc, 0x28] |
0x000123fc str r3, [sp] | *(sp) = r3;
0x00012400 ldr r2, [pc, 0x24] | r2 = stderr;
0x00012404 mov r3, 1 | r3 = 1;
0x00012408 ldr r1, [pc, 0x78] | r1 = "name";
0x0001240c ldr r0, [r0] | r0 = "class/ubi";
0x00012410 bl 0x10a64 | fprintf ("class/ubi", "name", r2, r3)
0x00012414 b 0x12174 | goto label_0;
| }
; 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/ubimkvol @ 0x125b8 */
| #include <stdint.h>
|
; (fcn) fcn.000125b8 () | void fcn_000125b8 (int32_t arg1, void * s) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_110h;
| r0 = arg1;
| r1 = s;
0x000125b8 push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x000125bc mov r4, r1 | r4 = r1;
0x000125c0 sub sp, sp, 0x110 |
0x000125c4 mov r5, r0 | r5 = r0;
0x000125c8 mov r2, 0x18 | r2 = 0x18;
0x000125cc mov r1, 0 | r1 = 0;
0x000125d0 mov r0, r4 | r0 = r4;
0x000125d4 bl 0x10adc | memset (r0, r1, r2);
0x000125d8 add r2, r4, 0x14 | r2 = r4 + 0x14;
0x000125dc add r1, r4, 0x10 | r1 = r4 + 0x10;
0x000125e0 ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x000125e4 bl 0x11e3c | r0 = fcn_00011e3c (r0, r1);
0x000125e8 cmp r0, 0 |
| if (r0 == 0) {
0x000125ec mvnne r3, 0 | r3 = ~0;
| }
| if (r0 == 0) {
0x000125f0 strne r3, [r4, 0x14] | *((r4 + 0x14)) = r3;
| }
| if (r0 == 0) {
0x000125f4 strne r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
| }
0x000125f8 ldr r0, [r5, 0xc] | r0 = *((r5 + 0xc));
0x000125fc bl 0x10b00 | r0 = opendir ();
0x00012600 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 == r0) {
0x00012604 beq 0x12764 | goto label_2;
| }
0x00012608 mvn r3, 0x80000000 | r3 = ~0x80000000;
0x0001260c str r3, [r4, 4] | *((r4 + 4)) = r3;
0x00012610 bl 0x10b24 | errno_location ();
0x00012614 ldr sl, [pc, 0x17c] | sl = "ubi%d%s";
0x00012618 mov sb, 0 | sb = 0;
0x0001261c mov r7, r0 | r7 = r0;
| do {
| label_0:
0x00012620 str sb, [r7] | *(r7) = sb;
0x00012624 mov r0, r8 | r0 = r8;
0x00012628 bl 0x10aa0 | r0 = readdir64 ();
0x0001262c cmp r0, 0 |
| if (r0 == 0) {
0x00012630 beq 0x126c0 | goto label_3;
| }
0x00012634 add r6, r0, 0x13 | r6 = r0 + 0x13;
0x00012638 mov r0, r6 | r0 = r6;
0x0001263c bl 0x10b3c | r0 = strlen (r0);
0x00012640 cmp r0, 0xfe |
| if (r0 >= 0xfe) {
0x00012644 bls 0x12678 |
0x00012648 ldr r0, [pc, 0x14c] |
0x0001264c str r6, [sp] | *(sp) = r6;
0x00012650 ldr r2, [pc, 0x148] | r2 = stderr;
0x00012654 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00012658 ldr r1, [pc, 0x144] | r1 = "libubi";
0x0001265c ldr r0, [r0] | r0 = "ubi%d%s";
0x00012660 bl 0x10a64 | fprintf ("ubi%d%s", "libubi", r2, r3, r4, r5, r6)
0x00012664 mov r3, 0x16 | r3 = 0x16;
0x00012668 str r3, [r7] | *(r7) = r3;
| label_1:
0x0001266c mov r0, r8 | r0 = r8;
0x00012670 bl 0x10b54 | closedir ();
0x00012674 b 0x12764 | goto label_2;
| }
0x00012678 add r3, sp, 0x10 | r3 += var_10h;
0x0001267c add r2, sp, 0xc | r2 += var_ch;
0x00012680 mov r1, sl | r1 = sl;
0x00012684 mov r0, r6 | r0 = r6;
0x00012688 bl 0x10aac | r0 = sscanf (r0, r1, r2);
0x0001268c cmp r0, 1 |
0x00012690 bne 0x12620 |
| } while (r0 != 1);
0x00012694 ldr r3, [r4] | r3 = *(r4);
0x00012698 ldr r2, [r4, 8] | r2 = *((r4 + 8));
0x0001269c add r3, r3, 1 | r3++;
0x000126a0 str r3, [r4] | *(r4) = r3;
0x000126a4 ldr r3, [sp, 0xc] | r3 = var_ch;
0x000126a8 cmp r2, r3 |
0x000126ac ldr r2, [r4, 4] | r2 = *((r4 + 4));
| if (r2 >= r3) {
0x000126b0 strlt r3, [r4, 8] | *((r4 + 8)) = r3;
| }
0x000126b4 cmp r3, r2 |
| if (r3 >= r2) {
0x000126b8 strlt r3, [r4, 4] | *((r4 + 4)) = r3;
| }
0x000126bc b 0x12620 | goto label_0;
| label_3:
0x000126c0 ldr r6, [r7] | r6 = *(r7);
0x000126c4 cmp r6, 0 |
| if (r6 != 0) {
0x000126c8 beq 0x12710 |
0x000126cc ldr r4, [pc, 0xc8] |
0x000126d0 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x000126d4 ldr r2, [pc, 0xc4] | r2 = stderr;
0x000126d8 ldr r1, [pc, 0xc8] | r1 = "_s:_error_:_invalid_entry_in__s:___s_";
0x000126dc ldr r0, [r4] | r0 = "ubi%d%s";
0x000126e0 bl 0x10a64 | fprintf ("ubi%d%s", "_s:_error_:_invalid_entry_in__s:___s_", r2, r3, "ubi%d%s")
0x000126e4 mov r0, r6 | r0 = r6;
0x000126e8 ldr r4, [r4] | r4 = "ubi%d%s";
0x000126ec bl 0x109d4 | strerror (r0);
0x000126f0 str r6, [sp] | *(sp) = r6;
0x000126f4 ldr r3, [pc, 0xb0] | r3 = "%s: error!: readdir failed on \"%s\"\n";
0x000126f8 mov r2, 8 | r2 = 8;
0x000126fc ldr r1, [pc, 0xac] | r1 = *(0x127ac);
0x00012700 str r0, [sp, 4] | var_4h = r0;
0x00012704 mov r0, r4 | r0 = r4;
0x00012708 bl 0x10a64 | fprintf (r0, r1, r2, "%s: error!: readdir failed on \"%s\"\n", r4, r5, r6)
0x0001270c b 0x1266c | goto label_1;
| }
0x00012710 mov r0, r8 | r0 = r8;
0x00012714 bl 0x10b54 | r0 = closedir ();
0x00012718 cmp r0, 0 |
| if (r0 != 0) {
0x0001271c beq 0x1276c |
0x00012720 ldr r6, [pc, 0x74] | r6 = "ubi%d%s";
0x00012724 ldr r4, [r7] | r4 = *(r7);
0x00012728 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x0001272c ldr r2, [pc, 0x6c] | r2 = stderr;
0x00012730 ldr r1, [pc, 0x7c] | r1 = "_serror__d___s_";
0x00012734 ldr r0, [r6] | r0 = "ubi%d%s";
0x00012738 bl 0x10a64 | fprintf ("ubi%d%s", "_serror__d___s_", r2, r3, r4, r5, "ubi%d%s")
0x0001273c mov r0, r4 | r0 = r4;
0x00012740 ldr r5, [r6] | r5 = "ubi%d%s";
0x00012744 bl 0x109d4 | strerror (r0);
0x00012748 str r4, [sp] | *(sp) = r4;
0x0001274c ldr r3, [pc, 0x58] | r3 = "%s: error!: readdir failed on \"%s\"\n";
0x00012750 mov r2, 8 | r2 = 8;
0x00012754 ldr r1, [pc, 0x54] | r1 = *(0x127ac);
0x00012758 str r0, [sp, 4] | var_4h = r0;
0x0001275c mov r0, r5 | r0 = r5;
0x00012760 bl 0x10a64 | fprintf (r0, r1, r2, "%s: error!: readdir failed on \"%s\"\n", r4)
| label_2:
0x00012764 mvn r0, 0 | r0 = ~0;
0x00012768 b 0x12790 |
| } else {
0x0001276c ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00012770 add r1, r4, 0xc | r1 = r4 + 0xc;
0x00012774 cmn r3, 0x80000001 |
| if (r3 != 0x80000001) {
0x00012778 streq r0, [r4, 4] | *((r4 + 4)) = r0;
| }
0x0001277c ldr r0, [r5, 0x14] | r0 = *((r5 + 0x14));
0x00012780 bl 0x119b4 | r0 = fcn_000119b4 (r0, r1);
0x00012784 adds r0, r0, 0 | r0 += 0;
| if (r0 == r0) {
0x00012788 movne r0, 1 | r0 = 1;
| }
0x0001278c rsb r0, r0, 0 | r0 -= ;
| }
0x00012790 add sp, sp, 0x110 |
0x00012794 pop {r4, r5, r6, r7, r8, sb, sl, 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/ubimkvol @ 0x128e8 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.000128e8 () | void fcn_000128e8 (int32_t arg2, char * s) {
| int32_t var_b4h;
| int32_t var_ach;
| int32_t var_a8h;
| int32_t var_a4h;
| int32_t var_a0h;
| int32_t var_9ch;
| int32_t var_8ch;
| int32_t var_7ch;
| int32_t var_6ch;
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_sp_b4h;
| int32_t var_sp_6ch;
| int32_t var_20h_2;
| int32_t var_20h;
| r1 = arg2;
| r0 = s;
0x000128e8 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000128ec add fp, sp, 0x20 |
0x000128f0 sub sp, sp, 0x9c |
0x000128f4 mov r6, r0 | r6 = r0;
0x000128f8 ldr r0, [r0, 0x40] | r0 = *((r0 + 0x40));
0x000128fc mov r5, r1 | r5 = r1;
0x00012900 bl 0x10b3c | strlen (r0);
0x00012904 sub r1, fp, 0x8c | r1 -= var_8ch;
0x00012908 add r0, r0, 0x6b | r0 += 0x6b;
0x0001290c bic r0, r0, 7 | r0 = BIT_MASK (r0, 7);
0x00012910 sub sp, sp, r0 |
0x00012914 mov r0, r5 | r0 = r5;
0x00012918 bl 0x109e0 | r0 = stat64 ();
0x0001291c cmp r0, 0 |
| if (r0 == 0) {
0x00012920 beq 0x12978 | goto label_5;
| }
0x00012924 bl 0x10b24 | errno_location ();
0x00012928 ldr r6, [pc, 0x1e8] | r6 = *(0x12b14);
0x0001292c mov r3, r5 | r3 = r5;
0x00012930 ldr r2, [pc, 0x1e4] | r2 = stderr;
0x00012934 ldr r1, [pc, 0x1e4] | r1 = "libubi";
0x00012938 ldr r4, [r0] | r4 = *(r0);
0x0001293c ldr r0, [r6] | r0 = *(0x12b14);
0x00012940 bl 0x10a64 | fprintf (r0, "libubi", r2, r3, r4, r5, r6)
0x00012944 mov r0, r4 | r0 = r4;
0x00012948 ldr r5, [r6] | r5 = *(0x12b14);
0x0001294c bl 0x109d4 | strerror (r0);
0x00012950 str r4, [sp] | *(sp) = r4;
0x00012954 ldr r3, [pc, 0x1c8] | r3 = "_s:_error_:_cannot_get_information_about___s_";
0x00012958 mov r2, 8 | r2 = 8;
0x0001295c ldr r1, [pc, 0x1c4] | r1 = *(0x12b24);
0x00012960 str r0, [sp, 4] | var_4h = r0;
0x00012964 mov r0, r5 | r0 = r5;
0x00012968 bl 0x10a64 | fprintf (r0, r1, r2, "_s:_error_:_cannot_get_information_about___s_", r4)
| do {
| label_0:
0x0001296c mvn r0, 0 | r0 = ~0;
| label_4:
0x00012970 sub sp, fp, 0x20 |
0x00012974 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x00012978 ldr r3, [fp, -0x7c] | r3 = var_7ch;
0x0001297c and r3, r3, 0xf000 | r3 &= 0xf000;
0x00012980 cmp r3, 0x2000 |
| if (r3 == 0x2000) {
0x00012984 beq 0x129b0 | goto label_6;
| }
0x00012988 ldr r0, [pc, 0x188] |
0x0001298c mov r3, r5 | r3 = r5;
0x00012990 ldr r2, [pc, 0x184] | r2 = stderr;
0x00012994 ldr r1, [pc, 0x190] | r1 = "_serror__d___s_";
0x00012998 ldr r0, [r0] | r0 = *(0x12b14);
0x0001299c bl 0x10a64 | r0 = fprintf (r0, "_serror__d___s_", r2, r3)
0x000129a0 bl 0x10b24 | errno_location ();
0x000129a4 mov r3, 0x16 | r3 = 0x16;
| label_1:
0x000129a8 str r3, [r0] | *(r0) = r3;
0x000129ac b 0x1296c |
| } while (1);
| label_6:
0x000129b0 ldrd r2, r3, [fp, -0x6c] | __asm ("ldrd r2, r3, [var_6ch]");
0x000129b4 mov r1, r3 | r1 = r3;
0x000129b8 mov r0, r2 | r0 = r2;
0x000129bc strd r2, r3, [fp, -0xb4] | __asm ("strd r2, r3, [var_b4h]");
0x000129c0 bl 0x10a04 | gnu_dev_major ();
0x000129c4 ldrd r2, r3, [fp, -0xb4] | __asm ("ldrd r2, r3, [var_b4h]");
0x000129c8 mov r1, r3 | r1 = r3;
0x000129cc mov sb, r0 | sb = r0;
0x000129d0 mov r0, r2 | r0 = r2;
0x000129d4 bl 0x10a40 | gnu_dev_minor ();
0x000129d8 sub r1, fp, 0xa4 | r1 -= var_a4h;
0x000129dc mov r7, r0 | r7 = r0;
0x000129e0 mov r0, r6 | r0 = r6;
0x000129e4 bl 0x125b8 | r0 = fcn_000125b8 (r0, r1);
0x000129e8 cmp r0, 0 |
| if (r0 != 0) {
0x000129ec addeq r8, sp, 8 | r8 += var_b4h;
| }
| if (r0 != 0) {
0x000129f0 ldreq r4, [fp, -0xa0] | r4 = var_a0h;
| }
| if (r0 == 0) {
0x000129f4 addeq sl, r6, 0x18 | sl = r6 + 0x18;
| goto label_7;
| }
| if (r0 != 0) {
| label_7:
0x000129f8 bne 0x1296c | goto label_0;
| }
| do {
0x000129fc ldr r3, [fp, -0x9c] | r3 = var_9ch;
0x00012a00 cmp r4, r3 |
| if (r4 > r3) {
0x00012a04 bgt 0x12a7c | goto label_8;
| }
0x00012a08 sub r3, fp, 0xa8 | r3 -= var_a8h;
0x00012a0c sub r2, fp, 0xac | r2 -= var_ach;
0x00012a10 mov r1, r4 | r1 = r4;
0x00012a14 mov r0, sl | r0 = sl;
0x00012a18 bl 0x11f14 | r0 = fcn_00011f14 (r0, r1);
0x00012a1c cmp r0, 0 |
| if (r0 == 0) {
0x00012a20 beq 0x12a70 | goto label_9;
| }
0x00012a24 bl 0x10b24 | r0 = errno_location ();
0x00012a28 ldr r3, [r0] | r3 = *(r0);
0x00012a2c cmp r3, 2 |
| if (r3 != 2) {
0x00012a30 bne 0x12a3c | goto label_10;
| }
| label_2:
0x00012a34 add r4, r4, 1 | r4++;
0x00012a38 b 0x129fc |
| } while (1);
| label_10:
0x00012a3c cmp r3, 0 |
| if (r3 != 0) {
0x00012a40 bne 0x1296c | goto label_0;
| }
| label_3:
0x00012a44 ldr r0, [pc, 0xcc] |
0x00012a48 mov r3, r5 | r3 = r5;
0x00012a4c str r7, [sp, 4] | var_4h = r7;
0x00012a50 str sb, [sp] | *(sp) = sb;
0x00012a54 ldr r2, [pc, 0xc0] | r2 = stderr;
0x00012a58 ldr r1, [pc, 0xd0] | r1 = "%s: error!: \"%s\" is not a character device\n";
0x00012a5c ldr r0, [r0] | r0 = *(0x12b14);
0x00012a60 bl 0x10a64 | r0 = fprintf (r0, "%s: error!: \"%s\" is not a character device\n", r2, r3)
0x00012a64 bl 0x10b24 | errno_location ();
0x00012a68 mov r3, 0x13 | r3 = 0x13;
0x00012a6c b 0x129a8 | goto label_1;
| label_9:
0x00012a70 ldr r3, [fp, -0xac] | r3 = var_ach;
0x00012a74 cmp r3, sb |
| if (r3 != sb) {
0x00012a78 bne 0x12a34 | goto label_2;
| }
| label_8:
0x00012a7c ldr r3, [fp, -0x9c] | r3 = var_9ch;
0x00012a80 cmp r4, r3 |
| if (r4 > r3) {
0x00012a84 bgt 0x12a44 | goto label_3;
| }
0x00012a88 cmp r7, 0 |
| if (r7 == 0) {
0x00012a8c moveq r0, 1 | r0 = 1;
| goto label_11;
| }
| if (r7 == 0) {
| label_11:
0x00012a90 beq 0x12970 | goto label_4;
| }
0x00012a94 sub r3, r7, 1 | r3 = r7 - 1;
0x00012a98 mov r2, r4 | r2 = r4;
0x00012a9c ldr r1, [r6, 0x40] | r1 = *((r6 + 0x40));
0x00012aa0 mov r0, r8 | r0 = r8;
0x00012aa4 bl 0x10b18 | sprintf (r0, r1, r2);
0x00012aa8 mov r1, 0 | r1 = 0;
0x00012aac mov r0, r8 | r0 = r8;
0x00012ab0 bl 0x10af4 | r0 = open64 ();
0x00012ab4 cmn r0, 1 |
| if (r0 == 1) {
0x00012ab8 beq 0x12a44 | goto label_3;
| }
0x00012abc bl 0x10b6c | r0 = close (r0);
0x00012ac0 cmp r0, 0 |
| if (r0 != 0) {
0x00012ac4 beq 0x12b10 |
0x00012ac8 bl 0x10b24 | errno_location ();
0x00012acc ldr r5, [pc, 0x44] |
0x00012ad0 mov r3, r8 | r3 = r8;
0x00012ad4 ldr r2, [pc, 0x40] | r2 = stderr;
0x00012ad8 ldr r1, [pc, 0x54] | r1 = "%s: error!: \"%s\" has major:minor %d:%d, but this does not correspond to any existing UBI device or volume\n";
0x00012adc ldr r4, [r0] | r4 = *(r0);
0x00012ae0 ldr r0, [r5] | r0 = *(0x12b14);
0x00012ae4 bl 0x10a64 | fprintf (r0, "%s: error!: \"%s\" has major:minor %d:%d, but this does not correspond to any existing UBI device or volume\n", r2, r3, r4, r5)
0x00012ae8 mov r0, r4 | r0 = r4;
0x00012aec ldr r5, [r5] | r5 = *(0x12b14);
0x00012af0 bl 0x109d4 | strerror (r0);
0x00012af4 str r4, [sp] | *(sp) = r4;
0x00012af8 ldr r3, [pc, 0x24] | r3 = "_s:_error_:_cannot_get_information_about___s_";
0x00012afc mov r2, 8 | r2 = 8;
0x00012b00 ldr r1, [pc, 0x20] | r1 = *(0x12b24);
0x00012b04 str r0, [sp, 4] | var_4h = r0;
0x00012b08 mov r0, r5 | r0 = r5;
0x00012b0c bl 0x10a64 | fprintf (r0, r1, r2, "_s:_error_:_cannot_get_information_about___s_", r4)
| }
0x00012b10 mov r0, 2 | r0 = 2;
0x00012b14 b 0x12970 | 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/ubimkvol @ 0x12b38 */
| #include <stdint.h>
|
; (fcn) fcn.00012b38 () | void fcn_00012b38 (int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_10h_2;
| int32_t var_18h;
| int32_t var_19h;
| void * s;
| char * dest;
| int32_t var_a4h;
| r1 = arg2;
0x00012b38 push {r4, r5, r6, r7, lr} |
0x00012b3c sub sp, sp, 0xa4 |
0x00012b40 mov r5, r2 | r5 = r2;
0x00012b44 mov r7, r1 | r7 = r1;
0x00012b48 mov r2, 0x86 | r2 = 0x86;
0x00012b4c mov r1, 0 | r1 = 0;
0x00012b50 add r0, sp, 0x1a | r0 += s;
0x00012b54 bl 0x10adc | memset (r0, r1, r2);
0x00012b58 ldr r3, [r5] | r3 = *(r5);
0x00012b5c ldr r6, [r5, 0x14] | r6 = *((r5 + 0x14));
0x00012b60 str r3, [sp, 8] | var_8h = r3;
0x00012b64 ldr r3, [r5, 4] | r3 = *((r5 + 4));
0x00012b68 mov r0, r6 | r0 = r6;
0x00012b6c str r3, [sp, 0xc] | var_ch = r3;
0x00012b70 ldrd r2, r3, [r5, 8] | __asm ("ldrd r2, r3, [r5, 8]");
0x00012b74 strd r2, r3, [sp, 0x10] | __asm ("strd r2, r3, [var_10h]");
0x00012b78 ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x00012b7c strb r3, [sp, 0x18] | var_18h = r3;
0x00012b80 ldrb r3, [r5, 0x18] | r3 = *((r5 + 0x18));
0x00012b84 strb r3, [sp, 0x19] | var_19h = r3;
0x00012b88 bl 0x10b3c | r0 = strlen (r0);
0x00012b8c cmp r0, 0x7f |
| if (r0 > 0x7f) {
0x00012b90 bhi 0x12c38 | goto label_1;
| }
0x00012b94 mov r4, r0 | r4 = r0;
0x00012b98 mov r2, 0x80 | r2 = 0x80;
0x00012b9c mov r1, r6 | r1 = r6;
0x00012ba0 add r0, sp, 0x20 | r0 += dest;
0x00012ba4 bl 0x10a94 | strncpy (r0, r1, r2);
0x00012ba8 mov r1, 0 | r1 = 0;
0x00012bac mov r0, r7 | r0 = r7;
0x00012bb0 strh r4, [sp, 0x1a] | s = r4;
0x00012bb4 bl 0x10af4 | r0 = open64 ();
0x00012bb8 cmn r0, 1 |
0x00012bbc mov r4, r0 | r4 = r0;
| if (r0 != 1) {
0x00012bc0 bne 0x12c18 | goto label_2;
| }
0x00012bc4 bl 0x10b24 | errno_location ();
0x00012bc8 ldr r6, [pc, 0x84] |
0x00012bcc mov r3, r7 | r3 = r7;
0x00012bd0 ldr r2, [pc, 0x80] | r2 = stderr;
0x00012bd4 ldr r1, [pc, 0x80] | r1 = "libubi";
0x00012bd8 ldr r5, [r0] | r5 = *(r0);
0x00012bdc ldr r0, [r6] | r0 = *(0x12c50);
0x00012be0 bl 0x10a64 | fprintf (r0, "libubi", r2, r3, r4, r5, r6)
0x00012be4 mov r0, r5 | r0 = r5;
0x00012be8 ldr r6, [r6] | r6 = *(0x12c50);
0x00012bec bl 0x109d4 | strerror (r0);
0x00012bf0 str r5, [sp] | *(sp) = r5;
0x00012bf4 ldr r3, [pc, 0x64] | r3 = "%s: error!: cannot open \"%s\"\n";
0x00012bf8 mov r2, 8 | r2 = 8;
0x00012bfc ldr r1, [pc, 0x60] | r1 = *(0x12c60);
0x00012c00 str r0, [sp, 4] | var_4h = r0;
0x00012c04 mov r0, r6 | r0 = r6;
0x00012c08 bl 0x10a64 | fprintf (r0, r1, r2, "%s: error!: cannot open \"%s\"\n", r4, r5)
| do {
| label_0:
0x00012c0c mov r0, r4 | r0 = r4;
0x00012c10 add sp, sp, 0xa4 |
0x00012c14 pop {r4, r5, r6, r7, pc} |
| label_2:
0x00012c18 add r2, sp, 8 | r2 += var_8h;
0x00012c1c ldr r1, [pc, 0x44] | r1 = "_serror__d___s_";
0x00012c20 bl 0x109bc | r0 = ioctl (r0, "_serror__d___s_");
0x00012c24 mov r6, r0 | r6 = r0;
0x00012c28 cmn r6, 1 |
0x00012c2c mov r0, r4 | r0 = r4;
| if (r6 != 1) {
0x00012c30 bne 0x12c40 | goto label_3;
| }
0x00012c34 bl 0x10b6c | close (r0);
| label_1:
0x00012c38 mvn r4, 0 | r4 = ~0;
0x00012c3c b 0x12c0c |
| } while (1);
| label_3:
0x00012c40 bl 0x10b6c | close (r0);
0x00012c44 ldr r3, [sp, 8] | r3 = var_8h;
0x00012c48 mov r4, 0 | r4 = 0;
0x00012c4c str r3, [r5] | *(r5) = r3;
0x00012c50 b 0x12c0c | goto label_0;
| }
; 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/ubimkvol @ 0x12f44 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00012f44 () | void fcn_00012f44 (int32_t arg1, int32_t arg2) {
| int32_t var_128h;
| int32_t var_124h;
| int32_t var_0h;
| int32_t var_4h;
| char * s;
| int32_t var_20h_2;
| int32_t var_20h;
| r0 = arg1;
| r1 = arg2;
0x00012f44 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00012f48 add sl, r2, 4 | sl = r2 + 4;
0x00012f4c add fp, sp, 0x20 |
0x00012f50 sub sp, sp, 0x114 |
0x00012f54 mov r6, r1 | r6 = r1;
0x00012f58 mov r5, r0 | r5 = r0;
0x00012f5c mov r4, r2 | r4 = r2;
0x00012f60 mov r1, 0 | r1 = 0;
0x00012f64 mov r2, 0x54 | r2 = 0x54;
0x00012f68 mov r0, sl | r0 = sl;
0x00012f6c bl 0x10adc | memset (r0, r1, r2);
0x00012f70 str r6, [r4] | *(r4) = r6;
0x00012f74 mov r1, r6 | r1 = r6;
0x00012f78 mov r0, r5 | r0 = r5;
0x00012f7c bl 0x12ef0 | r0 = fcn_00012ef0 (r0, r1);
0x00012f80 cmp r0, 0 |
0x00012f84 bne 0x12f90 |
| while (r8 == r0) {
| label_0:
0x00012f88 mvn r0, 0 | r0 = ~0;
0x00012f8c b 0x13254 | goto label_3;
0x00012f90 ldr r0, [r5, 0xc] | r0 = *((r5 + 0xc));
0x00012f94 bl 0x10b00 | r0 = opendir ();
0x00012f98 subs r8, r0, 0 | r8 = r0 - 0;
0x00012f9c beq 0x12f88 |
| }
0x00012fa0 mvn r3, 0x80000000 | r3 = ~0x80000000;
0x00012fa4 str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
0x00012fa8 bl 0x10b24 | r0 = errno_location ();
0x00012fac mov sb, r0 | sb = r0;
| do {
| label_1:
0x00012fb0 mov r3, 0 | r3 = 0;
0x00012fb4 str r3, [sb] | *(sb) = r3;
0x00012fb8 mov r0, r8 | r0 = r8;
0x00012fbc bl 0x10aa0 | r0 = readdir64 ();
0x00012fc0 cmp r0, 0 |
| if (r0 == 0) {
0x00012fc4 beq 0x13060 | goto label_4;
| }
0x00012fc8 add r7, r0, 0x13 | r7 = r0 + 0x13;
0x00012fcc mov r0, r7 | r0 = r7;
0x00012fd0 bl 0x10b3c | r0 = strlen (r0);
0x00012fd4 cmp r0, 0xfe |
| if (r0 >= 0xfe) {
0x00012fd8 bls 0x13004 |
0x00012fdc ldr r0, [pc, 0x278] |
0x00012fe0 str r7, [sp] | *(sp) = r7;
0x00012fe4 ldr r2, [pc, 0x274] | r2 = stderr;
0x00012fe8 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00012fec ldr r1, [pc, 0x270] | r1 = "libubi";
0x00012ff0 ldr r0, [r0] | r0 = *(0x13258);
0x00012ff4 bl 0x10a64 | fprintf (r0, "libubi", r2, r3)
| label_2:
0x00012ff8 mov r0, r8 | r0 = r8;
0x00012ffc bl 0x10b54 | closedir ();
0x00013000 b 0x12f88 | goto label_0;
| }
0x00013004 sub r3, fp, 0x124 | r3 -= var_124h;
0x00013008 str r3, [sp] | *(sp) = r3;
0x0001300c sub r2, fp, 0x128 | r2 -= var_128h;
0x00013010 sub r3, fp, 0x12c | r3 -= s;
0x00013014 ldr r1, [pc, 0x24c] | r1 = "_s:_error_:_invalid_entry_in__s:___s_";
0x00013018 mov r0, r7 | r0 = r7;
0x0001301c bl 0x10aac | r0 = sscanf (r0, "_s:_error_:_invalid_entry_in__s:___s_", r2);
0x00013020 cmp r0, 2 |
0x00013024 bne 0x12fb0 |
| } while (r0 != 2);
0x00013028 ldr r3, [fp, -0x128] | r3 = var_128h;
0x0001302c cmp r3, r6 |
| if (r3 != r6) {
0x00013030 bne 0x12fb0 | goto label_1;
| }
0x00013034 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00013038 ldr r2, [r4, 0x10] | r2 = *((r4 + 0x10));
0x0001303c add r3, r3, 1 | r3++;
0x00013040 str r3, [r4, 8] | *((r4 + 8)) = r3;
0x00013044 ldr r3, [fp, -0x12c] | r3 = s;
0x00013048 cmp r2, r3 |
0x0001304c ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
| if (r2 >= r3) {
0x00013050 strlt r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
| }
0x00013054 cmp r3, r2 |
| if (r3 >= r2) {
0x00013058 strlt r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
| }
0x0001305c b 0x12fb0 | goto label_1;
| label_4:
0x00013060 ldr r7, [sb] | r7 = *(sb);
0x00013064 cmp r7, 0 |
| if (r7 != 0) {
0x00013068 beq 0x130b0 |
0x0001306c ldr r4, [pc, 0x1e8] |
0x00013070 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00013074 ldr r2, [pc, 0x1e4] | r2 = stderr;
0x00013078 ldr r1, [pc, 0x1ec] | r1 = "ubi_d__d_s";
0x0001307c ldr r0, [r4] | r0 = *(0x13258);
0x00013080 bl 0x10a64 | fprintf (r0, "ubi_d__d_s", r2, r3, r4)
0x00013084 mov r0, r7 | r0 = r7;
0x00013088 ldr r4, [r4] | r4 = *(0x13258);
0x0001308c bl 0x109d4 | strerror (r0);
0x00013090 str r7, [sp] | *(sp) = r7;
0x00013094 ldr r3, [pc, 0x1d4] | r3 = "%s: error!: readdir failed on \"%s\"\n";
0x00013098 mov r2, 8 | r2 = 8;
0x0001309c ldr r1, [pc, 0x1d0] | r1 = *(0x13270);
0x000130a0 str r0, [sp, 4] | var_4h = r0;
0x000130a4 mov r0, r4 | r0 = r4;
0x000130a8 bl 0x10a64 | fprintf (r0, r1, r2, "%s: error!: readdir failed on \"%s\"\n")
0x000130ac b 0x12ff8 | goto label_2;
| }
0x000130b0 mov r0, r8 | r0 = r8;
0x000130b4 bl 0x10b54 | r0 = closedir ();
0x000130b8 cmp r0, 0 |
| if (r0 != 0) {
0x000130bc beq 0x13108 |
0x000130c0 ldr r6, [pc, 0x194] | r6 = *(0x13258);
0x000130c4 ldr r4, [sb] | r4 = *(sb);
0x000130c8 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x000130cc ldr r2, [pc, 0x18c] | r2 = stderr;
0x000130d0 ldr r1, [pc, 0x1a0] | r1 = "_serror__d___s_";
0x000130d4 ldr r0, [r6] | r0 = *(0x13258);
0x000130d8 bl 0x10a64 | fprintf (r0, "_serror__d___s_", r2, r3, r4, r5, r6)
0x000130dc mov r0, r4 | r0 = r4;
0x000130e0 ldr r5, [r6] | r5 = *(0x13258);
0x000130e4 bl 0x109d4 | strerror (r0);
0x000130e8 str r4, [sp] | *(sp) = r4;
0x000130ec ldr r3, [pc, 0x17c] | r3 = "%s: error!: readdir failed on \"%s\"\n";
0x000130f0 mov r2, 8 | r2 = 8;
0x000130f4 ldr r1, [pc, 0x178] | r1 = *(0x13270);
0x000130f8 str r0, [sp, 4] | var_4h = r0;
0x000130fc mov r0, r5 | r0 = r5;
0x00013100 bl 0x10a64 | fprintf (r0, r1, r2, "%s: error!: readdir failed on \"%s\"\n", r4)
0x00013104 b 0x12f88 | goto label_0;
| }
0x00013108 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0001310c add r2, r4, 0x14 | r2 = r4 + 0x14;
0x00013110 cmn r3, 0x80000001 |
| if (r3 != 0x80000001) {
0x00013114 streq r0, [r4, 0xc] | *((r4 + 0xc)) = r0;
| }
0x00013118 add r3, r4, 0x18 | r3 = r4 + 0x18;
0x0001311c mov r1, r6 | r1 = r6;
0x00013120 add r0, r5, 0x18 | r0 = r5 + 0x18;
0x00013124 bl 0x11f14 | r0 = fcn_00011f14 (r0, r1);
0x00013128 cmp r0, 0 |
| if (r0 != 0) {
0x0001312c bne 0x12f88 | goto label_0;
| }
0x00013130 mov r2, sl | r2 = sl;
0x00013134 mov r1, r6 | r1 = r6;
0x00013138 ldr r0, [r5, 0x3c] | r0 = *((r5 + 0x3c));
0x0001313c bl 0x11a28 | r0 = fcn_00011a28 (r0, r1);
0x00013140 cmp r0, 0 |
| if (r0 != 0) {
0x00013144 bne 0x12f88 | goto label_0;
| }
0x00013148 add r2, r4, 0x20 | r2 = r4 + 0x20;
0x0001314c mov r1, r6 | r1 = r6;
0x00013150 ldr r0, [r5, 0x1c] | r0 = *((r5 + 0x1c));
0x00013154 bl 0x11a28 | r0 = fcn_00011a28 (r0, r1);
0x00013158 cmp r0, 0 |
| if (r0 != 0) {
0x0001315c bne 0x12f88 | goto label_0;
| }
0x00013160 add r2, r4, 0x1c | r2 = r4 + 0x1c;
0x00013164 mov r1, r6 | r1 = r6;
0x00013168 ldr r0, [r5, 0x20] | r0 = *((r5 + 0x20));
0x0001316c bl 0x11a28 | r0 = fcn_00011a28 (r0, r1);
0x00013170 cmp r0, 0 |
| if (r0 != 0) {
0x00013174 bne 0x12f88 | goto label_0;
| }
0x00013178 add r2, r4, 0x38 | r2 = r4 + 0x38;
0x0001317c mov r1, r6 | r1 = r6;
0x00013180 ldr r0, [r5, 0x24] | r0 = *((r5 + 0x24));
0x00013184 bl 0x11a28 | r0 = fcn_00011a28 (r0, r1);
0x00013188 cmp r0, 0 |
| if (r0 != 0) {
0x0001318c bne 0x12f88 | goto label_0;
| }
0x00013190 add r2, r4, 0x3c | r2 = r4 + 0x3c;
0x00013194 mov r1, r6 | r1 = r6;
0x00013198 ldr r0, [r5, 0x28] | r0 = *((r5 + 0x28));
0x0001319c bl 0x11a28 | r0 = fcn_00011a28 (r0, r1);
0x000131a0 cmp r0, 0 |
| if (r0 != 0) {
0x000131a4 bne 0x12f88 | goto label_0;
| }
0x000131a8 add r2, r4, 0x48 | r2 = r4 + 0x48;
0x000131ac mov r1, r6 | r1 = r6;
0x000131b0 ldr r0, [r5, 0x30] | r0 = *((r5 + 0x30));
0x000131b4 bl 0x11a28 | r0 = fcn_00011a28 (r0, r1);
0x000131b8 cmp r0, 0 |
| if (r0 != 0) {
0x000131bc bne 0x12f88 | goto label_0;
| }
0x000131c0 ldr r8, [r5, 0x2c] | r8 = *((r5 + 0x2c));
0x000131c4 mov sb, sp | sb = sp;
0x000131c8 mov r0, r8 | r0 = r8;
0x000131cc bl 0x10b3c | strlen (r0);
0x000131d0 mov r2, r6 | r2 = r6;
0x000131d4 mov r1, r8 | r1 = r8;
0x000131d8 add r0, r0, 0x39 | r0 += 0x39;
0x000131dc bic r0, r0, 7 | r0 = BIT_MASK (r0, 7);
0x000131e0 sub sp, sp, r0 |
0x000131e4 add r7, sp, 8 | r7 += s;
0x000131e8 mov r0, r7 | r0 = r7;
0x000131ec bl 0x10b18 | sprintf (r0, r1, r2);
0x000131f0 add r1, r4, 0x40 | r1 = r4 + 0x40;
0x000131f4 mov r0, r7 | r0 = r7;
0x000131f8 bl 0x11804 | fcn_00011804 (r0, r1);
0x000131fc mov sp, sb |
0x00013200 cmp r0, 0 |
| if (r0 != 0) {
0x00013204 bne 0x12f88 | goto label_0;
| }
0x00013208 add r2, r4, 0x4c | r2 = r4 + 0x4c;
0x0001320c mov r1, r6 | r1 = r6;
0x00013210 ldr r0, [r5, 0x34] | r0 = *((r5 + 0x34));
0x00013214 bl 0x11a28 | r0 = fcn_00011a28 (r0, r1);
0x00013218 cmp r0, 0 |
| if (r0 != 0) {
0x0001321c bne 0x12f88 | goto label_0;
| }
0x00013220 add r2, r4, 0x50 | r2 = r4 + 0x50;
0x00013224 mov r1, r6 | r1 = r6;
0x00013228 ldr r0, [r5, 0x38] | r0 = *((r5 + 0x38));
0x0001322c bl 0x11a28 | r0 = fcn_00011a28 (r0, r1);
0x00013230 cmp r0, 0 |
| if (r0 != 0) {
0x00013234 bne 0x12f88 | goto label_0;
| }
0x00013238 ldr r3, [r4, 0x3c] | r3 = *((r4 + 0x3c));
0x0001323c ldr r2, [r4, 0x20] | r2 = *((r4 + 0x20));
0x00013240 smull r6, r7, r2, r3 | r6:r7 = r2 * r3;
0x00013244 ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x00013248 strd r6, r7, [r4, 0x30] | __asm ("strd r6, r7, [r4, 0x30]");
0x0001324c smull r6, r7, r2, r3 | r6:r7 = r2 * r3;
0x00013250 strd r6, r7, [r4, 0x28] | __asm ("strd r6, r7, [r4, 0x28]");
| label_3:
0x00013254 sub sp, fp, 0x20 |
0x00013258 pop {r4, r5, r6, r7, r8, sb, sl, fp, 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/ubimkvol @ 0x1327c */
| #include <stdint.h>
|
; (fcn) fcn.0001327c () | void fcn_0001327c (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_18h;
| int32_t var_28h;
| int32_t var_38h;
| int32_t var_48h;
| int32_t var_48h_2;
| int32_t var_90h;
| r0 = arg1;
| r1 = arg2;
0x0001327c push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00013280 sub sp, sp, 0x90 |
0x00013284 mov r6, r0 | r6 = r0;
0x00013288 mov r4, r1 | r4 = r1;
0x0001328c mov r7, r2 | r7 = r2;
0x00013290 bl 0x128e8 | r0 = fcn_000128e8 (r0, r1);
0x00013294 cmp r0, 1 |
| if (r0 == 1) {
0x00013298 beq 0x132b8 | goto label_2;
| }
0x0001329c cmp r0, 2 |
| if (r0 != 2) {
0x000132a0 bne 0x132b0 | goto label_0;
| }
0x000132a4 bl 0x10b24 | errno_location ();
0x000132a8 mov r3, 0x13 | r3 = 0x13;
0x000132ac str r3, [r0] | *(r0) = r3;
| do {
| label_0:
0x000132b0 mvn r0, 0 | r0 = ~0;
0x000132b4 b 0x13444 | goto label_3;
| label_2:
0x000132b8 add r1, sp, 0x28 | r1 += var_28h;
0x000132bc mov r0, r4 | r0 = r4;
0x000132c0 bl 0x109e0 | r0 = stat64 ();
0x000132c4 cmp r0, 0 |
| if (r0 == 0) {
0x000132c8 beq 0x13318 | goto label_4;
| }
0x000132cc bl 0x10b24 | errno_location ();
0x000132d0 ldr r6, [pc, 0x174] | r6 = *(0x13448);
0x000132d4 mov r3, r4 | r3 = r4;
0x000132d8 ldr r2, [pc, 0x170] | r2 = stderr;
0x000132dc ldr r1, [pc, 0x170] | r1 = "libubi";
0x000132e0 ldr r5, [r0] | r5 = *(r0);
0x000132e4 ldr r0, [r6] | r0 = *(0x13448);
0x000132e8 bl 0x10a64 | fprintf (r0, "libubi", r2, r3, r4, r5, r6)
0x000132ec mov r0, r5 | r0 = r5;
0x000132f0 ldr r4, [r6] | r4 = *(0x13448);
0x000132f4 bl 0x109d4 | strerror (r0);
0x000132f8 str r5, [sp] | *(sp) = r5;
0x000132fc ldr r3, [pc, 0x154] | r3 = "_s:_error_:_cannot_get_information_about___s_";
0x00013300 mov r2, 8 | r2 = 8;
0x00013304 ldr r1, [pc, 0x150] | r1 = *(0x13458);
0x00013308 str r0, [sp, 4] | var_4h = r0;
0x0001330c mov r0, r4 | r0 = r4;
0x00013310 bl 0x10a64 | fprintf (r0, r1, r2, "_s:_error_:_cannot_get_information_about___s_", r4, r5)
0x00013314 b 0x132b0 |
| } while (1);
| label_4:
0x00013318 ldr r3, [sp, 0x38] | r3 = var_38h;
0x0001331c and r3, r3, 0xf000 | r3 &= 0xf000;
0x00013320 cmp r3, 0x2000 |
| if (r3 == 0x2000) {
0x00013324 beq 0x13350 | goto label_5;
| }
0x00013328 bl 0x10b24 | errno_location ();
0x0001332c ldr r2, [pc, 0x11c] | r2 = stderr;
0x00013330 ldr r1, [pc, 0x128] | r1 = "_serror__d___s_";
0x00013334 mov r3, 0x16 | r3 = 0x16;
0x00013338 str r3, [r0] | *(r0) = r3;
0x0001333c mov r3, r4 | r3 = r4;
| do {
0x00013340 ldr r0, [pc, 0x104] |
0x00013344 ldr r0, [r0] | r0 = *(0x13448);
0x00013348 bl 0x10a64 | fprintf (r0, "_serror__d___s_", r2, r3)
0x0001334c b 0x132b0 | goto label_0;
| label_5:
0x00013350 ldrd r8, sb, [sp, 0x48] | __asm ("ldrd r8, sb, [var_48h]");
0x00013354 mov r1, sb | r1 = sb;
0x00013358 mov r0, r8 | r0 = r8;
0x0001335c bl 0x10a04 | gnu_dev_major ();
0x00013360 mov r1, sb | r1 = sb;
0x00013364 mov sl, r0 | sl = r0;
0x00013368 mov r0, r8 | r0 = r8;
0x0001336c bl 0x10a40 | r0 = gnu_dev_minor ();
0x00013370 cmp r0, 0 |
| if (r0 == 0) {
0x00013374 beq 0x13394 | goto label_6;
| }
0x00013378 bl 0x10b24 | errno_location ();
0x0001337c mov r3, 0x16 | r3 = 0x16;
0x00013380 ldr r2, [pc, 0xc8] | r2 = stderr;
0x00013384 ldr r1, [pc, 0xd8] | r1 = "%s: error!: \"%s\" is not a character device\n";
0x00013388 str r3, [r0] | *(r0) = r3;
0x0001338c mov r3, r4 | r3 = r4;
0x00013390 b 0x13340 |
| } while (1);
| label_6:
0x00013394 add r1, sp, 0x10 | r1 += var_10h;
0x00013398 mov r0, r6 | r0 = r6;
0x0001339c bl 0x125b8 | r0 = fcn_000125b8 (r0, r1);
0x000133a0 cmp r0, 0 |
| if (r0 != 0) {
0x000133a4 bne 0x132b0 | goto label_0;
| }
0x000133a8 bl 0x10b24 | errno_location ();
0x000133ac ldr r4, [sp, 0x14] | r4 = var_14h;
0x000133b0 add r8, r6, 0x18 | r8 = r6 + 0x18;
0x000133b4 mov r5, r0 | r5 = r0;
| label_1:
0x000133b8 ldr r3, [sp, 0x18] | r3 = var_18h;
0x000133bc cmp r4, r3 |
| if (r4 <= r3) {
0x000133c0 movgt r3, 0x13 | r3 = 0x13;
| }
| if (r4 > r3) {
0x000133c4 bgt 0x13428 | goto label_7;
| }
0x000133c8 add r3, sp, 0xc | r3 += var_ch;
0x000133cc add r2, sp, 8 | r2 += var_8h;
0x000133d0 mov r1, r4 | r1 = r4;
0x000133d4 mov r0, r8 | r0 = r8;
0x000133d8 bl 0x11f14 | r0 = fcn_00011f14 (r0, r1);
0x000133dc cmp r0, 0 |
| if (r0 == 0) {
0x000133e0 beq 0x133f8 | goto label_8;
| }
0x000133e4 ldr r3, [r5] | r3 = *(r5);
0x000133e8 cmp r3, 2 |
| if (r3 != 2) {
0x000133ec bne 0x132b0 | goto label_0;
| }
| do {
0x000133f0 add r4, r4, 1 | r4++;
0x000133f4 b 0x133b8 | goto label_1;
| label_8:
0x000133f8 ldr r3, [sp, 8] | r3 = var_8h;
0x000133fc cmp sl, r3 |
0x00013400 bne 0x133f0 |
| } while (sl != r3);
0x00013404 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00013408 cmp r3, 0 |
| if (r3 != 0) {
0x0001340c beq 0x13430 |
0x00013410 ldr r0, [pc, 0x34] |
0x00013414 ldr r2, [pc, 0x34] | r2 = stderr;
0x00013418 ldr r1, [pc, 0x48] | r1 = "%s: error!: \"%s\" is not an UBI character device\n";
0x0001341c ldr r0, [r0] | r0 = *(0x13448);
0x00013420 bl 0x10a64 | fprintf (r0, "%s: error!: \"%s\" is not an UBI character device\n", r2)
0x00013424 mov r3, 0x16 | r3 = 0x16;
| label_7:
0x00013428 str r3, [r5] | *(r5) = r3;
0x0001342c b 0x132b0 | goto label_0;
| }
0x00013430 str r3, [r5] | *(r5) = r3;
0x00013434 mov r2, r7 | r2 = r7;
0x00013438 mov r1, r4 | r1 = r4;
0x0001343c mov r0, r6 | r0 = r6;
0x00013440 bl 0x12f44 | fcn_00012f44 (r0, r1);
| label_3:
0x00013444 add sp, sp, 0x90 |
0x00013448 pop {r4, r5, r6, r7, r8, sb, sl, 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/ubimkvol @ 0x1346c */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0001346c () | void fcn_0001346c (int32_t arg1, int32_t arg2) {
| char * s1;
| int32_t var_0h;
| int32_t var_20h_2;
| int32_t var_20h;
| r0 = arg1;
| r1 = arg2;
0x0001346c push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00013470 add sb, r3, 8 | sb = r3 + 8;
0x00013474 add fp, sp, 0x20 |
0x00013478 sub sp, sp, 0x3c |
0x0001347c mov r5, r1 | r5 = r1;
0x00013480 mov r6, r2 | r6 = r2;
0x00013484 mov r1, 0 | r1 = 0;
0x00013488 mov r2, 0xb0 | r2 = 0xb0;
0x0001348c mov r7, r0 | r7 = r0;
0x00013490 mov r0, sb | r0 = sb;
0x00013494 mov r4, r3 | r4 = r3;
0x00013498 bl 0x10adc | memset (r0, r1, r2);
0x0001349c ldr sl, [r7, 0x48] | sl = *((r7 + 0x48));
0x000134a0 stm r4, {r5, r6} | *(r4) = r5;
| *((r4 + 4)) = r6;
0x000134a4 mov r0, sl | r0 = sl;
0x000134a8 bl 0x10b3c | strlen (r0);
0x000134ac mov r8, sp | r8 = sp;
0x000134b0 mov r3, r6 | r3 = r6;
0x000134b4 mov r2, r5 | r2 = r5;
0x000134b8 mov r1, sl | r1 = sl;
0x000134bc add r0, r0, 0x6b | r0 += 0x6b;
0x000134c0 bic r0, r0, 7 | r0 = BIT_MASK (r0, 7);
0x000134c4 sub sp, sp, r0 |
0x000134c8 mov r0, sp | r0 = sp;
0x000134cc bl 0x10b18 | sprintf (r0, r1, r2);
0x000134d0 mov r0, sp | r0 = sp;
0x000134d4 add r2, r4, 0xc | r2 = r4 + 0xc;
0x000134d8 mov r1, sb | r1 = sb;
0x000134dc bl 0x11e3c | fcn_00011e3c (r0, r1);
0x000134e0 mov sp, r8 |
0x000134e4 cmp r0, 0 |
0x000134e8 beq 0x134fc |
| while (r8 < r0) {
| label_0:
0x000134ec mvn r8, 0 | r8 = ~0;
| label_1:
0x000134f0 mov r0, r8 | r0 = r8;
0x000134f4 sub sp, fp, 0x20 |
0x000134f8 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x000134fc ldr sb, [r7, 0x44] | sb = *((r7 + 0x44));
0x00013500 mov r0, sb | r0 = sb;
0x00013504 bl 0x10b3c | strlen (r0);
0x00013508 mov r3, r6 | r3 = r6;
0x0001350c mov r2, r5 | r2 = r5;
0x00013510 mov r1, sb | r1 = sb;
0x00013514 add r0, r0, 0x6b | r0 += 0x6b;
0x00013518 bic r0, r0, 7 | r0 = BIT_MASK (r0, 7);
0x0001351c sub sp, sp, r0 |
0x00013520 mov r0, sp | r0 = sp;
0x00013524 bl 0x10b18 | sprintf (r0, r1, r2);
0x00013528 mov r0, sp | r0 = sp;
0x0001352c mov r2, 0x32 | r2 = 0x32;
0x00013530 sub r1, fp, 0x58 | r1 -= s1;
0x00013534 bl 0x11ac0 | fcn_00011ac0 (r0, r1);
0x00013538 mov sp, r8 |
0x0001353c subs r8, r0, 0 | r8 = r0 - 0;
0x00013540 blt 0x134ec |
| }
0x00013544 mov r2, r8 | r2 = r8;
0x00013548 ldr r1, [pc, 0x174] | r1 = *(0x136c0);
0x0001354c sub r0, fp, 0x58 | r0 -= s1;
0x00013550 bl 0x10a88 | r0 = strncmp (r0, r1, r2);
0x00013554 cmp r0, 0 |
| if (r0 != 0) {
0x00013558 moveq r3, 4 | r3 = 4;
| }
| if (r0 != 0) {
0x0001355c beq 0x1357c |
0x00013560 mov r2, r8 | r2 = r8;
0x00013564 ldr r1, [pc, 0x15c] | r1 = "static";
0x00013568 sub r0, fp, 0x58 | r0 -= s1;
0x0001356c bl 0x10a88 | r0 = strncmp (r0, "static", r2);
0x00013570 cmp r0, 0 |
| if (r0 != 0) {
0x00013574 bne 0x1369c | goto label_2;
| }
0x00013578 mov r3, 3 | r3 = 3;
| }
0x0001357c str r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
0x00013580 mov r2, r6 | r2 = r6;
0x00013584 add r3, r4, 0x14 | r3 = r4 + 0x14;
0x00013588 mov r1, r5 | r1 = r5;
0x0001358c ldr r0, [r7, 0x4c] | r0 = *((r7 + 0x4c));
0x00013590 bl 0x11a70 | r0 = fcn_00011a70 (r0, r1);
0x00013594 cmp r0, 0 |
| if (r0 != 0) {
0x00013598 bne 0x134ec | goto label_0;
| }
0x0001359c ldr r8, [r7, 0x50] | r8 = *((r7 + 0x50));
0x000135a0 mov sb, sp | sb = sp;
0x000135a4 mov r0, r8 | r0 = r8;
0x000135a8 bl 0x10b3c | strlen (r0);
0x000135ac mov r3, r6 | r3 = r6;
0x000135b0 mov r2, r5 | r2 = r5;
0x000135b4 mov r1, r8 | r1 = r8;
0x000135b8 add r0, r0, 0x6b | r0 += 0x6b;
0x000135bc bic r0, r0, 7 | r0 = BIT_MASK (r0, 7);
0x000135c0 sub sp, sp, r0 |
0x000135c4 mov r0, sp | r0 = sp;
0x000135c8 bl 0x10b18 | sprintf (r0, r1, r2);
0x000135cc mov r0, sp | r0 = sp;
0x000135d0 add r1, r4, 0x18 | r1 = r4 + 0x18;
0x000135d4 bl 0x11804 | fcn_00011804 (r0, r1);
0x000135d8 mov sp, sb |
0x000135dc cmp r0, 0 |
| if (r0 != 0) {
0x000135e0 bne 0x134ec | goto label_0;
| }
0x000135e4 add r3, r4, 0x28 | r3 = r4 + 0x28;
0x000135e8 mov r2, r6 | r2 = r6;
0x000135ec mov r1, r5 | r1 = r5;
0x000135f0 ldr r0, [r7, 0x54] | r0 = *((r7 + 0x54));
0x000135f4 bl 0x11a70 | r0 = fcn_00011a70 (r0, r1);
0x000135f8 cmp r0, 0 |
| if (r0 != 0) {
0x000135fc bne 0x134ec | goto label_0;
| }
0x00013600 add r3, r4, 0x2c | r3 = r4 + 0x2c;
0x00013604 mov r2, r6 | r2 = r6;
0x00013608 mov r1, r5 | r1 = r5;
0x0001360c ldr r0, [r7, 0x58] | r0 = *((r7 + 0x58));
0x00013610 bl 0x11a70 | r0 = fcn_00011a70 (r0, r1);
0x00013614 cmp r0, 0 |
| if (r0 != 0) {
0x00013618 bne 0x134ec | goto label_0;
| }
0x0001361c add r3, r4, 0x30 | r3 = r4 + 0x30;
0x00013620 mov r2, r6 | r2 = r6;
0x00013624 mov r1, r5 | r1 = r5;
0x00013628 ldr r0, [r7, 0x5c] | r0 = *((r7 + 0x5c));
0x0001362c bl 0x11a70 | r0 = fcn_00011a70 (r0, r1);
0x00013630 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x00013634 bne 0x134ec | goto label_0;
| }
0x00013638 ldr r1, [r4, 0x28] | r1 = *((r4 + 0x28));
0x0001363c ldr r0, [r4, 0x2c] | r0 = *((r4 + 0x2c));
0x00013640 ldr r7, [r7, 0x60] | r7 = *((r7 + 0x60));
0x00013644 smull r2, r3, r0, r1 | r2:r3 = r0 * r1;
0x00013648 mov r0, r7 | r0 = r7;
0x0001364c strd r2, r3, [r4, 0x20] | __asm ("strd r2, r3, [r4, 0x20]");
0x00013650 bl 0x10b3c | strlen (r0);
0x00013654 mov r3, r6 | r3 = r6;
0x00013658 mov r2, r5 | r2 = r5;
0x0001365c mov r1, r7 | r1 = r7;
0x00013660 add r0, r0, 0x6b | r0 += 0x6b;
0x00013664 bic r0, r0, 7 | r0 = BIT_MASK (r0, 7);
0x00013668 sub sp, sp, r0 |
0x0001366c mov r0, sp | r0 = sp;
0x00013670 bl 0x10b18 | sprintf (r0, r1, r2);
0x00013674 mov r0, sp | r0 = sp;
0x00013678 mov r2, 0x81 | r2 = 0x81;
0x0001367c add r1, r4, 0x34 | r1 = r4 + 0x34;
0x00013680 bl 0x11ac0 | fcn_00011ac0 (r0, r1);
0x00013684 mov sp, sb |
0x00013688 cmp r0, 0 |
| if (r0 < 0) {
0x0001368c blt 0x134ec | goto label_0;
| }
0x00013690 add r4, r4, r0 | r4 += r0;
0x00013694 strb r8, [r4, 0x33] | *((r4 + 0x33)) = r8;
0x00013698 b 0x134f0 | goto label_1;
| label_2:
0x0001369c ldr r0, [pc, 0x28] |
0x000136a0 sub r3, fp, 0x58 | r3 -= s1;
0x000136a4 ldr r2, [pc, 0x24] | r2 = stderr;
0x000136a8 ldr r1, [pc, 0x24] | r1 = "libubi";
0x000136ac ldr r0, [r0] | r0 = "dynamic";
0x000136b0 bl 0x10a64 | r0 = fprintf ("dynamic", "libubi", r2, r3)
0x000136b4 bl 0x10b24 | errno_location ();
0x000136b8 mov r3, 0x16 | r3 = 0x16;
0x000136bc str r3, [r0] | *(r0) = r3;
0x000136c0 b 0x134ec | goto label_0;
| }
; 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/ubimkvol @ 0x10b90 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main (int32_t argc, char ** argv) {
| int32_t var_0h;
| int32_t var_4h;
| void * s;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_10h_2;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_28h;
| int32_t var_58h;
| int32_t var_58h_2;
| int32_t var_64h;
| char * * endptr;
| int32_t var_84h;
| int32_t var_94h;
| int32_t var_a0h;
| int32_t var_a0h_2;
| int32_t var_a8h;
| int32_t var_ach;
| int32_t var_b4h;
| int32_t var_138h;
| r0 = argc;
| r1 = argv;
| /* [10] -r-x section size 13208 named .text */
0x00010b90 push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00010b94 ldr r8, [pc, 0x758] | r8 = *(0x112f0);
0x00010b98 sub sp, sp, 0x138 |
0x00010b9c mov r6, r0 | r6 = r0;
0x00010ba0 mov r7, r1 | r7 = r1;
0x00010ba4 mov r2, 0x20 | r2 = 0x20;
0x00010ba8 mov r1, 0 | r1 = 0;
0x00010bac add r0, sp, 8 | r0 += s;
0x00010bb0 bl 0x10adc | memset (r0, r1, r2);
0x00010bb4 ldr r4, [pc, 0x73c] | r4 = "alignment";
| label_1:
0x00010bb8 mov sb, 0 | sb = 0;
0x00010bbc str sb, [sp] | *(sp) = sb;
0x00010bc0 mov r3, r8 | r3 = r8;
0x00010bc4 ldr r2, [pc, 0x730] | r2 = optarg;
0x00010bc8 mov r1, r7 | r1 = r7;
0x00010bcc mov r0, r6 | r0 = r6;
0x00010bd0 str sb, [sp, 0x28] | var_28h = sb;
0x00010bd4 bl 0x109ec | r0 = getopt_long ();
0x00010bd8 cmn r0, 1 |
0x00010bdc mov r5, r0 | r5 = r0;
| if (r0 == 1) {
0x00010be0 beq 0x10eb4 | goto label_9;
| }
0x00010be4 cmp r0, 0x61 |
| if (r0 == 0x61) {
0x00010be8 beq 0x10dec | goto label_10;
| }
| if (r0 > 0x61) {
0x00010bec bgt 0x10c44 | goto label_11;
| }
0x00010bf0 cmp r0, 0x4e |
| if (r0 == 0x4e) {
0x00010bf4 beq 0x10e30 | goto label_12;
| }
| if (r0 > 0x4e) {
0x00010bf8 bgt 0x10c20 | goto label_13;
| }
0x00010bfc cmp r0, 0x3a |
| if (r0 == 0x3a) {
0x00010c00 beq 0x10e9c | goto label_14;
| }
0x00010c04 cmp r0, 0x3f |
| if (r0 == 0x3f) {
0x00010c08 beq 0x10e68 | goto label_15;
| }
| do {
| label_0:
0x00010c0c ldr r3, [pc, 0x6ec] | r3 = "a:n:N:s:S:t:h_Vmk";
0x00010c10 ldr r0, [pc, 0x6ec] | r0 = stderr;
0x00010c14 ldr r1, [r3] | r1 = "a:n:N:s:S:t:h_Vmk";
0x00010c18 bl 0x10b48 | fputs (r0, "a:n:N:s:S:t:h_Vmk");
0x00010c1c b 0x10d20 | goto label_3;
| label_13:
0x00010c20 cmp r0, 0x53 |
| if (r0 == 0x53) {
0x00010c24 beq 0x10d5c | goto label_16;
| }
0x00010c28 cmp r0, 0x56 |
0x00010c2c bne 0x10c0c |
| } while (r0 != 0x56);
0x00010c30 ldr r2, [pc, 0x6d0] | r2 = "Use -h for help\n";
0x00010c34 ldr r1, [pc, 0x6d0] | r1 = "_.1.0";
0x00010c38 ldr r0, [pc, 0x6d0] | r0 = "ubimkvol";
0x00010c3c bl 0x109c8 | printf ("ubimkvol", "_.1.0", "Use -h for help\n");
0x00010c40 b 0x10e60 | goto label_17;
| label_11:
0x00010c44 cmp r0, 0x6d |
| if (r0 == 0x6d) {
0x00010c48 beq 0x10e8c | goto label_18;
| }
| if (r0 > 0x6d) {
0x00010c4c bgt 0x10c70 | goto label_19;
| }
0x00010c50 cmp r0, 0x68 |
| if (r0 == 0x68) {
0x00010c54 beq 0x10e40 | goto label_20;
| }
0x00010c58 cmp r0, 0x6b |
| if (r0 != 0x6b) {
0x00010c5c bne 0x10c0c | goto label_0;
| }
0x00010c60 ldr r3, [pc, 0x6ac] | r3 = "_s__mtd_utils___s";
0x00010c64 mov r2, 1 | r2 = 1;
0x00010c68 str r2, [r3, 0x24] | *((r3 + 0x24)) = r2;
0x00010c6c b 0x10bb8 | goto label_1;
| label_19:
0x00010c70 cmp r0, 0x73 |
| if (r0 == 0x73) {
0x00010c74 beq 0x10d30 | goto label_21;
| }
0x00010c78 cmp r0, 0x74 |
| if (r0 == 0x74) {
0x00010c7c beq 0x10cc4 | goto label_22;
| }
0x00010c80 cmp r0, 0x6e |
| if (r0 != 0x6e) {
0x00010c84 bne 0x10c0c | goto label_0;
| }
0x00010c88 add r1, sp, 0x28 | r1 += var_28h;
0x00010c8c ldr r0, [r4] | r0 = *(r4);
0x00010c90 bl 0x114c4 | fcn_000114c4 (r0, r1);
0x00010c94 ldr r3, [pc, 0x678] | r3 = "_s__mtd_utils___s";
0x00010c98 str r0, [r3] | *(r3) = r0;
0x00010c9c ldr r3, [sp, 0x28] | r3 = var_28h;
0x00010ca0 cmp r3, 0 |
| if (r3 != 0) {
0x00010ca4 lsreq r0, r0, 0x1f | r0 >>= 0x1f;
| }
| if (r3 == 0) {
0x00010ca8 movne r0, 1 | r0 = 1;
| }
0x00010cac cmp r0, 0 |
| if (r0 == 0) {
0x00010cb0 beq 0x10bb8 | goto label_1;
| }
0x00010cb4 ldr r3, [r4] | r3 = *(r4);
0x00010cb8 ldr r2, [pc, 0x64c] | r2 = "_.1.0";
0x00010cbc ldr r1, [pc, 0x654] | r1 = *(0x11314);
0x00010cc0 b 0x10d14 | goto label_2;
| label_22:
0x00010cc4 ldr r5, [r4] | r5 = *(r4);
0x00010cc8 ldr r1, [pc, 0x64c] | r1 = "_s:_error_:_bad_volume_ID:___s_";
0x00010ccc mov r0, r5 | r0 = r5;
0x00010cd0 bl 0x10b0c | r0 = strcmp (r0, "_s:_error_:_bad_volume_ID:___s_");
0x00010cd4 cmp r0, 0 |
| if (r0 != 0) {
0x00010cd8 ldreq r3, [pc, 0x634] | r3 = *(0x00011314);
| }
| if (r0 != 0) {
0x00010cdc moveq r2, 3 | r2 = 3;
| }
| if (r0 != 0) {
0x00010ce0 beq 0x10d00 |
0x00010ce4 ldr r1, [pc, 0x634] | r1 = "dynamic";
0x00010ce8 mov r0, r5 | r0 = r5;
0x00010cec bl 0x10b0c | r0 = strcmp (r0, "dynamic");
0x00010cf0 cmp r0, 0 |
| if (r0 != 0) {
0x00010cf4 bne 0x10d08 | goto label_23;
| }
0x00010cf8 ldr r3, [pc, 0x614] | r3 = "_s__mtd_utils___s";
0x00010cfc mov r2, 4 | r2 = 4;
| }
0x00010d00 str r2, [r3, 4] | *((r3 + 4)) = r2;
0x00010d04 b 0x10bb8 | goto label_1;
| label_23:
0x00010d08 ldr r2, [pc, 0x5fc] | r2 = "_.1.0";
0x00010d0c ldr r1, [pc, 0x610] | r1 = "static";
0x00010d10 mov r3, r5 | r3 = r5;
| label_2:
0x00010d14 ldr r0, [pc, 0x5e4] |
0x00010d18 ldr r0, [r0] | r0 = "a:n:N:s:S:t:h_Vmk";
0x00010d1c bl 0x10a64 | fprintf ("a:n:N:s:S:t:h_Vmk", "static", "_.1.0", r3)
| label_3:
0x00010d20 mvn r5, 0 | r5 = ~0;
| label_4:
0x00010d24 mov r0, r5 | r0 = r5;
0x00010d28 add sp, sp, 0x138 |
0x00010d2c pop {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_21:
0x00010d30 ldr r0, [r4] | r0 = *(r4);
0x00010d34 bl 0x11540 | fcn_00011540 (r0);
0x00010d38 ldr r3, [pc, 0x5d4] | r3 = "_s__mtd_utils___s";
0x00010d3c cmp r0, 1 |
0x00010d40 strd r0, r1, [r3, 8] | __asm ("strd r0, r1, [r3, 8]");
0x00010d44 sbcs r3, r1, 0 | __asm ("sbcs r3, r1, 0");
| if (r0 >= 1) {
0x00010d48 bge 0x10bb8 | goto label_1;
| }
0x00010d4c ldr r3, [r4] | r3 = *(r4);
0x00010d50 ldr r2, [pc, 0x5b4] | r2 = "_.1.0";
0x00010d54 ldr r1, [pc, 0x5cc] | r1 = "_s:_error_:_bad_volume_type:___s_";
0x00010d58 b 0x10d14 | goto label_2;
| label_16:
0x00010d5c ldr sl, [r4] | sl = *(r4);
0x00010d60 mov r2, sb | r2 = sb;
0x00010d64 add r1, sp, 0x80 | r1 += endptr;
0x00010d68 mov r0, sl | r0 = sl;
0x00010d6c bl 0x10ac4 | strtoull (r0, r1, r2);
0x00010d70 ldrb r3, [sl] | r3 = *(sl);
0x00010d74 cmp r3, 0 |
0x00010d78 mov r5, r0 | r5 = r0;
| if (r3 != 0) {
0x00010d7c beq 0x10d90 |
0x00010d80 ldr r3, [sp, 0x80] | r3 = endptr;
0x00010d84 ldrb r3, [r3] | r3 = *(r3);
0x00010d88 cmp r3, 0 |
| if (r3 == 0) {
0x00010d8c beq 0x10db4 | goto label_24;
| }
| }
0x00010d90 ldr r0, [pc, 0x568] |
0x00010d94 str sl, [sp] | *(sp) = sl;
0x00010d98 ldr r3, [pc, 0x58c] | r3 = "%s: error!: bad volume size: \"%s\"\n";
0x00010d9c ldr r2, [pc, 0x568] | r2 = "_.1.0";
0x00010da0 ldr r1, [pc, 0x588] | r1 = "strtoull";
0x00010da4 ldr r0, [r0] | r0 = "a:n:N:s:S:t:h_Vmk";
0x00010da8 bl 0x10a64 | fprintf ("a:n:N:s:S:t:h_Vmk", "strtoull", "_.1.0", "%s: error!: bad volume size: \"%s\"\n")
0x00010dac mov r3, 1 | r3 = 1;
0x00010db0 str r3, [sp, 0x28] | var_28h = r3;
| label_24:
0x00010db4 ldr r3, [pc, 0x558] | r3 = "_s__mtd_utils___s";
0x00010db8 cmp r5, 0 |
0x00010dbc str r5, [r3, 0x10] | *((r3 + 0x10)) = r5;
0x00010dc0 ldr r3, [sp, 0x28] | r3 = var_28h;
| if (r5 <= 0) {
0x00010dc4 movgt r5, 0 | r5 = 0;
| }
| if (r5 > 0) {
0x00010dc8 movle r5, 1 | r5 = 1;
| }
0x00010dcc cmp r3, 0 |
| if (r3 == 0) {
0x00010dd0 movne r5, 1 | r5 = 1;
| }
0x00010dd4 cmp r5, 0 |
| if (r5 == 0) {
0x00010dd8 beq 0x10bb8 | goto label_1;
| }
0x00010ddc ldr r3, [r4] | r3 = *(r4);
0x00010de0 ldr r2, [pc, 0x524] | r2 = "_.1.0";
0x00010de4 ldr r1, [pc, 0x548] | r1 = "_s:_error_:__s:_unable_to_parse_the_number__s";
0x00010de8 b 0x10d14 | goto label_2;
| label_10:
0x00010dec add r1, sp, 0x28 | r1 += var_28h;
0x00010df0 ldr r0, [r4] | r0 = *(r4);
0x00010df4 bl 0x114c4 | fcn_000114c4 (r0, r1);
0x00010df8 ldr r3, [pc, 0x514] | r3 = "_s__mtd_utils___s";
0x00010dfc str r0, [r3, 0x14] | *((r3 + 0x14)) = r0;
0x00010e00 ldr r3, [sp, 0x28] | r3 = var_28h;
0x00010e04 cmp r0, 0 |
| if (r0 <= 0) {
0x00010e08 movgt r0, 0 | r0 = 0;
| }
| if (r0 > 0) {
0x00010e0c movle r0, 1 | r0 = 1;
| }
0x00010e10 cmp r3, 0 |
| if (r3 == 0) {
0x00010e14 movne r0, 1 | r0 = 1;
| }
0x00010e18 cmp r0, 0 |
| if (r0 == 0) {
0x00010e1c beq 0x10bb8 | goto label_1;
| }
0x00010e20 ldr r3, [r4] | r3 = *(r4);
0x00010e24 ldr r2, [pc, 0x4e0] | r2 = "_.1.0";
0x00010e28 ldr r1, [pc, 0x508] | r1 = "%s: error!: bad LEB count: \"%s\"\n";
0x00010e2c b 0x10d14 | goto label_2;
| label_12:
0x00010e30 ldr r2, [r4] | r2 = *(r4);
0x00010e34 ldr r3, [pc, 0x4d8] | r3 = "_s__mtd_utils___s";
0x00010e38 str r2, [r3, 0x18] | *((r3 + 0x18)) = r2;
0x00010e3c b 0x10bb8 | goto label_1;
| label_20:
0x00010e40 ldr r1, [pc, 0x4f4] | r1 = "_s:_error_:_bad_volume_alignment:___s_";
0x00010e44 ldr r0, [pc, 0x4f4] | r0 = "ubimkvol_version_2.1.0___a_tool_to_create_UBI_volumes.";
0x00010e48 bl 0x109c8 | printf ("ubimkvol_version_2.1.0___a_tool_to_create_UBI_volumes.", "_s:_error_:_bad_volume_alignment:___s_");
0x00010e4c ldr r1, [pc, 0x4f0] | r1 = "%s\n\n";
0x00010e50 ldr r0, [pc, 0x4e8] | r0 = "ubimkvol_version_2.1.0___a_tool_to_create_UBI_volumes.";
0x00010e54 bl 0x109c8 | printf ("ubimkvol_version_2.1.0___a_tool_to_create_UBI_volumes.", "%s\n\n");
0x00010e58 ldr r0, [pc, 0x4e8] | r0 = "Usage: ubimkvol <UBI device node file name> [-h] [-a <alignment>] [-n <volume ID>] [-N <name>]\n\t\t\t[-s <bytes>] [-S <LEBs>] [-t <static|dynamic>] [-V] [-m] [-k]\n\t\t\t[--alignment=<alignment>][--vol_id=<volume ID>] [--name=<name>]\n\t\t\t[--size=<bytes>] [--lebs=<LEBs>] [--type=<static|dynamic>] [--help]\n\t\t\t[--version] [--maxavsize] [--skipcheck]\n\nExample: ubimkvol /dev/ubi0 -s 20MiB -N config_data - create a 20 Megabytes volume\n named \"config_data\" on UBI device /dev/ubi0.";
0x00010e5c bl 0x10a1c | puts ("Usage: ubimkvol <UBI device node file name> [-h] [-a <alignment>] [-n <volume ID>] [-N <name>]\n\t\t\t[-s <bytes>] [-S <LEBs>] [-t <static|dynamic>] [-V] [-m] [-k]\n\t\t\t[--alignment=<alignment>][--vol_id=<volume ID>] [--name=<name>]\n\t\t\t[--size=<bytes>] [--lebs=<LEBs>] [--type=<static|dynamic>] [--help]\n\t\t\t[--version] [--maxavsize] [--skipcheck]\n\nExample: ubimkvol /dev/ubi0 -s 20MiB -N config_data - create a 20 Megabytes volume\n named \"config_data\" on UBI device /dev/ubi0.");
| label_17:
0x00010e60 mov r0, sb | r0 = sb;
0x00010e64 bl 0x10b30 | exit (r0);
| label_15:
0x00010e68 ldr r1, [pc, 0x4cc] | r1 = "_s:_error_:_bad_volume_alignment:___s_";
0x00010e6c ldr r0, [pc, 0x4cc] | r0 = "ubimkvol_version_2.1.0___a_tool_to_create_UBI_volumes.";
0x00010e70 bl 0x109c8 | printf ("ubimkvol_version_2.1.0___a_tool_to_create_UBI_volumes.", "_s:_error_:_bad_volume_alignment:___s_");
0x00010e74 ldr r1, [pc, 0x4c8] | r1 = "%s\n\n";
0x00010e78 ldr r0, [pc, 0x4c0] | r0 = "ubimkvol_version_2.1.0___a_tool_to_create_UBI_volumes.";
0x00010e7c bl 0x109c8 | printf ("ubimkvol_version_2.1.0___a_tool_to_create_UBI_volumes.", "%s\n\n");
0x00010e80 ldr r0, [pc, 0x4c0] | r0 = "Usage: ubimkvol <UBI device node file name> [-h] [-a <alignment>] [-n <volume ID>] [-N <name>]\n\t\t\t[-s <bytes>] [-S <LEBs>] [-t <static|dynamic>] [-V] [-m] [-k]\n\t\t\t[--alignment=<alignment>][--vol_id=<volume ID>] [--name=<name>]\n\t\t\t[--size=<bytes>] [--lebs=<LEBs>] [--type=<static|dynamic>] [--help]\n\t\t\t[--version] [--maxavsize] [--skipcheck]\n\nExample: ubimkvol /dev/ubi0 -s 20MiB -N config_data - create a 20 Megabytes volume\n named \"config_data\" on UBI device /dev/ubi0.";
0x00010e84 bl 0x10a1c | puts ("Usage: ubimkvol <UBI device node file name> [-h] [-a <alignment>] [-n <volume ID>] [-N <name>]\n\t\t\t[-s <bytes>] [-S <LEBs>] [-t <static|dynamic>] [-V] [-m] [-k]\n\t\t\t[--alignment=<alignment>][--vol_id=<volume ID>] [--name=<name>]\n\t\t\t[--size=<bytes>] [--lebs=<LEBs>] [--type=<static|dynamic>] [--help]\n\t\t\t[--version] [--maxavsize] [--skipcheck]\n\nExample: ubimkvol /dev/ubi0 -s 20MiB -N config_data - create a 20 Megabytes volume\n named \"config_data\" on UBI device /dev/ubi0.");
0x00010e88 b 0x10d20 | goto label_3;
| label_18:
0x00010e8c ldr r3, [pc, 0x480] | r3 = "_s__mtd_utils___s";
0x00010e90 mov r2, 1 | r2 = 1;
0x00010e94 str r2, [r3, 0x20] | *((r3 + 0x20)) = r2;
0x00010e98 b 0x10bb8 | goto label_1;
| label_14:
0x00010e9c ldr r3, [pc, 0x45c] | r3 = "a:n:N:s:S:t:h_Vmk";
0x00010ea0 ldr r2, [pc, 0x464] | r2 = "_.1.0";
0x00010ea4 ldr r1, [pc, 0x4a0] | r1 = "_a____alignment_alignment____volume_alignment__default_is_1__n____vol_id_volume_ID_______UBI_volume_ID__if_not_specified__the_volume_ID______________________________will_be_assigned_automatically_N____name_name______________volume_name_s____size_b";
0x00010ea8 ldr r0, [r3] | r0 = "a:n:N:s:S:t:h_Vmk";
0x00010eac bl 0x10a64 | fprintf ("a:n:N:s:S:t:h_Vmk", "_a____alignment_alignment____volume_alignment__default_is_1__n____vol_id_volume_ID_______UBI_volume_ID__if_not_specified__the_volume_ID______________________________will_be_assigned_automatically_N____name_name______________volume_name_s____size_b", "_.1.0", "a:n:N:s:S:t:h_Vmk")
0x00010eb0 b 0x10d20 | goto label_3;
| label_9:
0x00010eb4 ldr r3, [pc, 0x494] |
0x00010eb8 ldr r3, [r3] | r3 = "%s: error!: parameter is missing\n";
0x00010ebc cmp r6, r3 |
| if (r6 != r3) {
0x00010ec0 bne 0x10edc | goto label_25;
| }
0x00010ec4 ldr r2, [pc, 0x440] | r2 = "_.1.0";
0x00010ec8 ldr r1, [pc, 0x484] | r1 = optind;
| do {
| label_5:
0x00010ecc ldr r3, [pc, 0x42c] | r3 = "a:n:N:s:S:t:h_Vmk";
0x00010ed0 ldr r0, [r3] | r0 = "a:n:N:s:S:t:h_Vmk";
| label_6:
0x00010ed4 bl 0x10a64 | fprintf ("a:n:N:s:S:t:h_Vmk", r1, "_.1.0", "a:n:N:s:S:t:h_Vmk")
0x00010ed8 b 0x10d24 | goto label_4;
| label_25:
0x00010edc sub r6, r6, 1 | r6--;
0x00010ee0 cmp r3, r6 |
| if (r3 == r6) {
0x00010ee4 ldrne r2, [pc, 0x420] | r2 = "ubimkvol";
| }
| if (r3 == r6) {
0x00010ee8 ldrne r1, [pc, 0x468] | r1 = "%s: error!: more then one UBI device specified (use -h for help)\n";
| }
0x00010eec bne 0x10ecc |
| } while (r3 != r6);
0x00010ef0 ldr r1, [pc, 0x41c] | r1 = "_s__mtd_utils___s";
0x00010ef4 ldr r3, [r7, r3, lsl 2] | offset_0 = r3 << 2;
| r3 = *((r7 + offset_0));
0x00010ef8 mvn r7, 0 | r7 = ~0;
0x00010efc str r3, [r1, 0x1c] | *((r1 + 0x1c)) = r3;
0x00010f00 ldrd r2, r3, [r1, 8] | __asm ("ldrd r2, r3, [r1, 8]");
0x00010f04 ldr r0, [r1, 0x20] | r0 = "_s:_error_:__s:_unable_to_parse_the_number__s";
0x00010f08 mvn r6, 0 | r6 = ~0;
0x00010f0c cmp r3, r7 |
0x00010f10 cmpeq r2, r6 | __asm ("cmpeq r2, r6");
0x00010f14 mov r4, r1 | r4 = r1;
| if (r3 == r7) {
0x00010f18 bne 0x10f3c |
0x00010f1c cmp r0, 0 |
| if (r0 != 0) {
0x00010f20 bne 0x10f50 | goto label_26;
| }
0x00010f24 ldr r1, [r1, 0x10] | r1 = *((r1 + 0x10));
0x00010f28 cmn r1, 1 |
| if (r1 != 1) {
0x00010f2c bne 0x10f50 | goto label_26;
| }
0x00010f30 ldr r2, [pc, 0x3d4] | r2 = "_.1.0";
0x00010f34 ldr r1, [pc, 0x420] | r1 = "%s: error!: more then one UBI device specified (use -h for help)\n";
0x00010f38 b 0x10ecc | goto label_5;
| }
0x00010f3c cmp r0, 0 |
| if (r0 != 0) {
0x00010f40 bne 0x10f6c | goto label_27;
| }
0x00010f44 ldr r1, [r1, 0x10] | r1 = *((r1 + 0x10));
0x00010f48 cmn r1, 1 |
| if (r1 != 1) {
0x00010f4c bne 0x10f6c | goto label_27;
| }
| label_26:
0x00010f50 ldr r1, [r4, 0x10] | r1 = *((r4 + 0x10));
0x00010f54 cmn r1, 1 |
| if (r1 == 1) {
0x00010f58 beq 0x10f78 | goto label_28;
| }
0x00010f5c and r2, r2, r3 | r2 &= r3;
0x00010f60 cmn r2, 1 |
0x00010f64 cmpeq r0, 0 | __asm ("cmpeq r0, 0");
| if (r2 == 1) {
0x00010f68 beq 0x10f94 | goto label_29;
| }
| do {
| label_27:
0x00010f6c ldr r2, [pc, 0x398] | r2 = "_.1.0";
0x00010f70 ldr r1, [pc, 0x3e8] | r1 = "%s: error!: volume size was not specified (use -h for help)\n";
0x00010f74 b 0x10ecc | goto label_5;
| label_28:
0x00010f78 cmp r0, 0 |
| if (r0 == 0) {
0x00010f7c beq 0x10f94 | goto label_29;
| }
0x00010f80 mvn r1, 0 | r1 = ~0;
0x00010f84 mvn r0, 0 | r0 = ~0;
0x00010f88 cmp r3, r1 |
0x00010f8c cmpeq r2, r0 | __asm ("cmpeq r2, r0");
0x00010f90 bne 0x10f6c |
| } while (r3 != r1);
| label_29:
0x00010f94 ldr r0, [r4, 0x18] | r0 = *((r4 + 0x18));
0x00010f98 cmp r0, 0 |
| if (r0 != 0) {
0x00010f9c ldreq r2, [pc, 0x368] | r2 = "ubimkvol";
| }
| if (r0 == 0) {
0x00010fa0 ldreq r1, [pc, 0x3bc] | r1 = "_s:_error_:_volume_name_was_not_specified__use__h_for_help_";
| goto label_30;
| }
| if (r0 == 0) {
| label_30:
0x00010fa4 beq 0x10ecc | goto label_5;
| }
0x00010fa8 bl 0x10b3c | r0 = strlen (r0);
0x00010fac cmp r0, 0x7f |
0x00010fb0 mov r3, r0 | r3 = r0;
| if (r0 >= 0x7f) {
0x00010fb4 bls 0x10fd8 |
0x00010fb8 ldr r0, [pc, 0x340] |
0x00010fbc mov r2, 0x7f | r2 = 0x7f;
0x00010fc0 str r2, [sp] | *(sp) = r2;
0x00010fc4 ldr r1, [pc, 0x39c] | r1 = "_s:_error_:_volume_name_was_not_specified__use__h_for_help_";
0x00010fc8 ldr r2, [pc, 0x33c] | r2 = "_.1.0";
0x00010fcc ldr r0, [r0] | r0 = "a:n:N:s:S:t:h_Vmk";
0x00010fd0 bl 0x10a64 | fprintf ("a:n:N:s:S:t:h_Vmk", "_s:_error_:_volume_name_was_not_specified__use__h_for_help_", r2)
0x00010fd4 b 0x10d24 | goto label_4;
| }
0x00010fd8 ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
0x00010fdc cmp r3, 0 |
| if (r3 == 0) {
0x00010fe0 beq 0x10ff8 | goto label_31;
| }
0x00010fe4 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00010fe8 cmp r3, 4 |
| if (r3 == 4) {
0x00010fec ldrne r2, [pc, 0x318] | r2 = "ubimkvol";
| }
| if (r3 != 4) {
0x00010ff0 ldrne r1, [pc, 0x374] | r1 = "_s:_error_:_skipcheck_is_only_valid_for_static_volumes";
| goto label_32;
| }
| if (r3 != 4) {
| label_32:
0x00010ff4 bne 0x10ecc | goto label_5;
| }
| label_31:
0x00010ff8 bl 0x120fc | r0 = fcn_000120fc ();
0x00010ffc subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 != r0) {
0x00011000 bne 0x11058 | goto label_33;
| }
0x00011004 bl 0x10b24 | errno_location ();
0x00011008 ldr r6, [pc, 0x2f0] | r6 = "a:n:N:s:S:t:h_Vmk";
0x0001100c ldr r2, [pc, 0x2f8] | r2 = "_.1.0";
0x00011010 ldr r4, [r0] | r4 = *(r0);
0x00011014 ldr r0, [r6] | r0 = "a:n:N:s:S:t:h_Vmk";
0x00011018 cmp r4, 0 |
| if (r4 == 0) {
0x0001101c ldreq r1, [pc, 0x34c] | r1 = "%s: error!: UBI is not present in the system\n";
| goto label_34;
| }
| if (r4 == 0) {
| label_34:
0x00011020 beq 0x10ed4 | goto label_6;
| }
0x00011024 ldr r1, [pc, 0x348] | r1 = "%s: error!: UBI is not present in the system\n";
0x00011028 bl 0x10a64 | fprintf (r0, "%s: error!: UBI is not present in the system\n")
0x0001102c mov r0, r4 | r0 = r4;
0x00011030 ldr r6, [r6] | r6 = *(r6);
0x00011034 bl 0x109d4 | strerror (r0);
0x00011038 str r4, [sp] | *(sp) = r4;
0x0001103c ldr r3, [pc, 0x334] | r3 = "_s:_error_:_cannot_open_libubi";
0x00011040 mov r2, 0xa | r2 = 0xa;
0x00011044 ldr r1, [pc, 0x330] | r1 = *(0x11378);
0x00011048 str r0, [sp, 4] | var_4h = r0;
0x0001104c mov r0, r6 | r0 = r6;
0x00011050 bl 0x10a64 | fprintf (r0, r1, r2, "_s:_error_:_cannot_open_libubi", r4)
0x00011054 b 0x10d24 | goto label_4;
| label_33:
0x00011058 ldr r1, [r4, 0x1c] | r1 = *((r4 + 0x1c));
0x0001105c bl 0x128e8 | r0 = fcn_000128e8 (r0, r1);
0x00011060 cmp r0, 2 |
| if (r0 != 2) {
0x00011064 bne 0x1108c | goto label_35;
| }
0x00011068 ldr r0, [pc, 0x290] |
0x0001106c ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x00011070 ldr r2, [pc, 0x294] | r2 = "_.1.0";
0x00011074 ldr r1, [pc, 0x304] | r1 = "_serror__d___s_";
0x00011078 ldr r0, [r0] | r0 = "a:n:N:s:S:t:h_Vmk";
| do {
0x0001107c bl 0x10a64 | fprintf ("a:n:N:s:S:t:h_Vmk", "_serror__d___s_", "_.1.0", r3)
| label_7:
0x00011080 mov r0, r6 | r0 = r6;
0x00011084 bl 0x12028 | fcn_00012028 (r0);
0x00011088 b 0x10d24 | goto label_4;
| label_35:
0x0001108c cmp r0, 0 |
0x00011090 ldr r7, [r4, 0x1c] | r7 = *((r4 + 0x1c));
| if (r0 >= 0) {
0x00011094 bge 0x110ec | goto label_36;
| }
0x00011098 bl 0x10b24 | errno_location ();
0x0001109c ldr r8, [pc, 0x25c] | r8 = "a:n:N:s:S:t:h_Vmk";
0x000110a0 mov r3, r7 | r3 = r7;
0x000110a4 ldr r2, [pc, 0x260] | r2 = "_.1.0";
0x000110a8 ldr r4, [r0] | r4 = *(r0);
0x000110ac ldr r0, [r8] | r0 = "a:n:N:s:S:t:h_Vmk";
0x000110b0 cmp r4, 0x13 |
| if (r4 != 0x13) {
0x000110b4 ldreq r1, [pc, 0x2c8] | r1 = "%s: error!: \"%s\" is not an UBI device node\n";
| }
0x000110b8 beq 0x1107c |
| } while (r4 == 0x13);
0x000110bc ldr r1, [pc, 0x2c4] | r1 = "%s: error!: \"%s\" is not an UBI device node\n";
0x000110c0 bl 0x10a64 | fprintf (r0, "%s: error!: \"%s\" is not an UBI device node\n")
0x000110c4 ldr r7, [r8] | r7 = *(r8);
| do {
0x000110c8 mov r0, r4 | r0 = r4;
0x000110cc bl 0x109d4 | strerror (r0);
0x000110d0 str r4, [sp] | *(sp) = r4;
0x000110d4 ldr r3, [pc, 0x29c] | r3 = "_s:_error_:_cannot_open_libubi";
0x000110d8 mov r2, 0xa | r2 = 0xa;
0x000110dc ldr r1, [pc, 0x298] | r1 = *(0x11378);
0x000110e0 str r0, [sp, 4] | var_4h = r0;
0x000110e4 mov r0, r7 | r0 = r7;
0x000110e8 b 0x11148 | goto label_37;
| label_36:
0x000110ec add r2, sp, 0x28 | r2 += var_28h;
0x000110f0 mov r1, r7 | r1 = r7;
0x000110f4 mov r0, r6 | r0 = r6;
0x000110f8 bl 0x1327c | r0 = fcn_0001327c (r0, r1);
0x000110fc cmp r0, 0 |
| if (r0 != 0) {
0x00011100 beq 0x11150 |
0x00011104 bl 0x10b24 | errno_location ();
0x00011108 ldr r8, [pc, 0x1f0] | r8 = "a:n:N:s:S:t:h_Vmk";
0x0001110c ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x00011110 ldr r2, [pc, 0x1f4] | r2 = "_.1.0";
0x00011114 ldr r1, [pc, 0x270] | r1 = "_s:_error_:_error_while_probing___s_";
0x00011118 ldr r7, [r0] | r7 = *(r0);
0x0001111c ldr r0, [r8] | r0 = "a:n:N:s:S:t:h_Vmk";
0x00011120 bl 0x10a64 | fprintf ("a:n:N:s:S:t:h_Vmk", "_s:_error_:_error_while_probing___s_", "_.1.0", r3)
0x00011124 mov r0, r7 | r0 = r7;
0x00011128 ldr r4, [r8] | r4 = "a:n:N:s:S:t:h_Vmk";
0x0001112c bl 0x109d4 | strerror (r0);
0x00011130 ldr r3, [pc, 0x240] | r3 = "_s:_error_:_cannot_open_libubi";
0x00011134 ldr r1, [pc, 0x240] | r1 = *(0x11378);
0x00011138 mov r2, 0xa | r2 = 0xa;
0x0001113c str r7, [sp] | *(sp) = r7;
0x00011140 str r0, [sp, 4] | var_4h = r0;
0x00011144 mov r0, r4 | r0 = r4;
| label_37:
0x00011148 bl 0x10a64 | fprintf (r0, r1, r2, "_s:_error_:_cannot_open_libubi")
0x0001114c b 0x11080 | goto label_7;
| }
0x00011150 ldrd r2, r3, [sp, 0x58] | __asm ("ldrd r2, r3, [var_58h]");
0x00011154 orrs r1, r2, r3 | r1 = r2 | r3;
| if (r1 == r2) {
0x00011158 bne 0x11174 |
0x0001115c ldr r3, [pc, 0x19c] | r3 = "a:n:N:s:S:t:h_Vmk";
0x00011160 ldr r2, [pc, 0x1a4] | r2 = "_.1.0";
0x00011164 ldr r1, [pc, 0x224] | r1 = "_s:_error_:_cannot_get_information_about_UBI_device___s_";
0x00011168 ldr r0, [r3] | r0 = "a:n:N:s:S:t:h_Vmk";
0x0001116c bl 0x10a64 | fprintf ("a:n:N:s:S:t:h_Vmk", "_s:_error_:_cannot_get_information_about_UBI_device___s_", "_.1.0", "a:n:N:s:S:t:h_Vmk")
0x00011170 b 0x11080 | goto label_7;
| }
0x00011174 ldr r1, [r4, 0x20] | r1 = *((r4 + 0x20));
0x00011178 cmp r1, 0 |
| if (r1 != 0) {
0x0001117c beq 0x1118c |
0x00011180 ldr r0, [pc, 0x20c] | r0 = "_s:_error_:_UBI_device_does_not_have_free_logical_eraseblocks";
0x00011184 strd r2, r3, [r4, 8] | __asm ("strd r2, r3, [r4, 8]");
0x00011188 bl 0x109c8 | printf ("_s:_error_:_UBI_device_does_not_have_free_logical_eraseblocks", r1, r2);
| }
0x0001118c ldr r7, [r4, 0x10] | r7 = *((r4 + 0x10));
0x00011190 ldr sl, [r4, 0x14] | sl = *((r4 + 0x14));
0x00011194 cmn r7, 1 |
| if (r7 != 1) {
0x00011198 beq 0x111e0 |
0x0001119c ldr r0, [sp, 0x64] | r0 = var_64h;
0x000111a0 mov r1, sl | r1 = sl;
0x000111a4 mov r8, r0 | r8 = r0;
0x000111a8 asr sb, r0, 0x1f | sb = r0 >> 0x1f;
0x000111ac bl 0x13c8c | fcn_00013c8c (r0, r1);
0x000111b0 subs r2, r8, r1 | r2 = r8 - r1;
0x000111b4 sbc r3, sb, r1, asr 31 | __asm ("sbc r3, sb, r1, asr 31");
0x000111b8 mov r8, r2 | r8 = r2;
0x000111bc mov sb, r3 | sb = r3;
0x000111c0 mov r0, r8 | r0 = r8;
0x000111c4 asr r3, r7, 0x1f | r3 = r7 >> 0x1f;
0x000111c8 mul r0, r3, r0 | r0 = r3 * r0;
0x000111cc mov r1, sb | r1 = sb;
0x000111d0 umull r2, r3, r8, r7 | r2:r3 = r8 * r7;
0x000111d4 mla r1, r7, r1, r0 | __asm ("mla r1, r7, r1, r0");
0x000111d8 add r3, r1, r3 | r3 = r1 + r3;
0x000111dc strd r2, r3, [r4, 8] | __asm ("strd r2, r3, [r4, 8]");
| }
0x000111e0 ldr r3, [r4] | r3 = *(r4);
0x000111e4 ldr r1, [r4, 0x1c] | r1 = *((r4 + 0x1c));
0x000111e8 str r3, [sp, 8] | s = r3;
0x000111ec ldrd r2, r3, [r4, 8] | __asm ("ldrd r2, r3, [r4, 8]");
0x000111f0 mov r0, r6 | r0 = r6;
0x000111f4 strd r2, r3, [sp, 0x10] | __asm ("strd r2, r3, [var_10h]");
0x000111f8 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x000111fc add r2, sp, 8 | r2 += s;
0x00011200 str r3, [sp, 0x18] | var_18h = r3;
0x00011204 ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x00011208 str sl, [sp, 0xc] | var_ch = sl;
0x0001120c str r3, [sp, 0x1c] | var_1ch = r3;
0x00011210 ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
0x00011214 cmp r3, 0 |
| if (r3 == 0) {
0x00011218 ldrbne r3, [sp, 0x20] | r3 = var_20h;
| }
| if (r3 == 0) {
0x0001121c orrne r3, r3, 1 | r3 |= 1;
| }
| if (r3 == 0) {
0x00011220 strbne r3, [sp, 0x20] | var_20h = r3;
| }
0x00011224 bl 0x12b38 | r0 = fcn_00012b38 (r0);
0x00011228 cmp r0, 0 |
| if (r0 >= 0) {
0x0001122c bge 0x11254 | goto label_38;
| }
0x00011230 bl 0x10b24 | errno_location ();
0x00011234 ldr r7, [pc, 0xc4] | r7 = "a:n:N:s:S:t:h_Vmk";
0x00011238 ldr r2, [pc, 0xcc] | r2 = "_.1.0";
0x0001123c ldr r1, [pc, 0x154] | r1 = "Set volume size to %lld\n";
0x00011240 ldr r4, [r0] | r4 = *(r0);
| label_8:
0x00011244 ldr r0, [r7] | r0 = *(r7);
0x00011248 bl 0x10a64 | fprintf (r0, "Set volume size to %lld\n", "_.1.0", r3, r4)
0x0001124c ldr r7, [r7] | r7 = *(r7);
0x00011250 b 0x110c8 |
| } while (1);
| label_38:
0x00011254 ldr r2, [sp, 8] | r2 = s;
0x00011258 add r3, sp, 0x80 | r3 += endptr;
0x0001125c ldr r1, [sp, 0x28] | r1 = var_28h;
0x00011260 mov r0, r6 | r0 = r6;
0x00011264 str r2, [r4] | *(r4) = r2;
0x00011268 bl 0x1346c | r0 = fcn_0001346c (r0, r1);
0x0001126c subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x00011270 beq 0x1128c |
0x00011274 bl 0x10b24 | errno_location ();
0x00011278 ldr r7, [pc, 0x80] | r7 = "a:n:N:s:S:t:h_Vmk";
0x0001127c ldr r2, [pc, 0x88] | r2 = "_.1.0";
0x00011280 ldr r1, [pc, 0x114] | r1 = "_s:_error_:_cannot_UBI_create_volume";
0x00011284 ldr r4, [r0] | r4 = *(r0);
0x00011288 b 0x11244 | goto label_8;
| }
0x0001128c ldr r2, [sp, 0xa8] | r2 = var_a8h;
0x00011290 ldr r1, [sp, 0x84] | r1 = var_84h;
0x00011294 ldr r0, [pc, 0x104] | r0 = "_s:_error_:_cannot_get_information_about_newly_created_UBI_volume";
0x00011298 bl 0x109c8 | printf ("_s:_error_:_cannot_get_information_about_newly_created_UBI_volume", r1, r2);
0x0001129c ldrd r0, r1, [sp, 0xa0] | __asm ("ldrd r0, r1, [var_a0h]");
0x000112a0 mov r2, r4 | r2 = r4;
0x000112a4 bl 0x1164c | fcn_0001164c (r0, r1);
0x000112a8 ldr r0, [pc, 0xf4] | r0 = "Volume ID %d, size %d LEBs (";
0x000112ac bl 0x109c8 | printf ("Volume ID %d, size %d LEBs (");
0x000112b0 ldr r0, [sp, 0xac] | r0 = var_ach;
0x000112b4 mov r2, 1 | r2 = 1;
0x000112b8 asr r1, r0, 0x1f | r1 = r0 >> 0x1f;
0x000112bc bl 0x1164c | fcn_0001164c (r0, r1);
0x000112c0 ldr ip, [sp, 0x18] | ip = var_18h;
0x000112c4 ldr r0, [pc, 0x50] | r0 = "_s:_error_:_bad_volume_ID:___s_";
0x000112c8 cmp ip, 3 |
0x000112cc ldr r1, [pc, 0x4c] | r1 = "dynamic";
0x000112d0 ldr r3, [sp, 0x94] | r3 = var_94h;
| if (ip != 3) {
0x000112d4 moveq r1, r0 | r1 = r0;
| }
0x000112d8 add r2, sp, 0xb4 | r2 += var_b4h;
0x000112dc ldr r0, [pc, 0xc4] | r0 = "___LEB_size_";
0x000112e0 bl 0x109c8 | printf ("_s:_error_:_bad_volume_ID:___s_", "dynamic", r2, r3);
0x000112e4 mov r0, r6 | r0 = r6;
0x000112e8 bl 0x12028 | fcn_00012028 (r0);
0x000112ec mov r5, r4 | r5 = r4;
0x000112f0 b 0x10d24 | goto label_4;
| }
[*] Function fprintf used 63 times ubimkvol