[*] Binary protection state of libblkid.so.1.1.0
Partial RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function printf tear down of libblkid.so.1.1.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/lib/libblkid.so.1.1.0 @ 0x14b3c */
| #include <stdint.h>
|
; (fcn) fcn.00014b3c () | void fcn_00014b3c (char * s) {
| int32_t var_0h;
| int32_t var_ch;
| r0 = s;
0x00014b3c push {r0, r1, r2, lr} |
0x00014b40 cmp r0, 0 |
| if (r0 == 0) {
0x00014b44 beq 0x14b8c | goto label_0;
| }
0x00014b48 ldr r3, [r0, 0xf4] | r3 = *((r0 + 0xf4));
0x00014b4c cmp r3, 0 |
| if (r3 == 0) {
0x00014b50 beq 0x14b8c | goto label_0;
| }
0x00014b54 ldrsb r2, [r3, 0x18] | r2 = *((r3 + 0x18));
0x00014b58 cmp r2, 0 |
| if (r2 == 0) {
0x00014b5c beq 0x14b8c | goto label_0;
| }
0x00014b60 ldr r2, [r0, 0x48] | r2 = *((r0 + 0x48));
0x00014b64 add r3, r3, 0x18 | r3 += 0x18;
0x00014b68 str r2, [sp] | *(sp) = r2;
0x00014b6c ldr r2, [pc, 0x20] | r2 = *(0x14b90);
0x00014b70 mov r1, 0x25 | r1 = 0x25;
0x00014b74 add r2, pc, r2 | r2 = pc + r2;
0x00014b78 add r0, r0, 0x4c | r0 += 0x4c;
0x00014b7c bl 0x5830 | snprintf (r0, r1, r2, r3)
0x00014b80 mov r0, 0 | r0 = 0;
| do {
0x00014b84 add sp, sp, 0xc |
0x00014b88 pop {pc} |
| label_0:
0x00014b8c mvn r0, 0 | r0 = ~0;
0x00014b90 b 0x14b84 |
| } 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/lib/libblkid.so.1.1.0 @ 0x22908 */
| #include <stdint.h>
|
; (fcn) fcn.00022908 () | void fcn_00022908 (int32_t arg1) {
| int32_t var_0h;
| char * var_ch;
| char * s;
| int32_t var_200h;
| r0 = arg1;
| label_2:
0x0002281c cmp r1, 0 |
0x00022820 push {r4, r5, r6, r7, lr} |
0x00022824 sub sp, sp, 0x204 |
0x00022828 bne 0x2283c |
| while (r2 == 0) {
| label_0:
0x0002282c mov r4, 0 | r4 = 0;
| label_1:
0x00022830 mov r0, r4 | r0 = r4;
0x00022834 add sp, sp, 0x204 |
0x00022838 pop {r4, r5, r6, r7, pc} |
0x0002283c ldrsb r2, [r1] | r2 = *(r1);
0x00022840 cmp r2, 0 |
0x00022844 beq 0x2282c |
| }
0x00022848 cmp r0, 0 |
0x0002284c mov r3, r0 | r3 = r0;
| if (r0 != 0) {
0x00022850 ldreq r3, [pc, 0xa0] | r3 = *((pc + 0xa0));
| }
| if (r0 != 0) {
0x00022854 addeq r3, pc, r3 | r3 = pc + r3;
| }
0x00022858 ldr r2, [pc, 0x9c] | r2 = *(0x228f8);
0x0002285c add r5, sp, 0x100 | r5 += s;
0x00022860 str r1, [sp] | *(sp) = r1;
0x00022864 add r2, pc, r2 | r2 = pc + r2;
0x00022868 mov r1, 0x100 | r1 = 0x100;
0x0002286c mov r0, r5 | r0 = r5;
0x00022870 bl 0x5830 | snprintf (r0, r1, r2, r3)
0x00022874 ldr r1, [pc, 0x84] | r1 = *(0x228fc);
0x00022878 mov r0, r5 | r0 = r5;
0x0002287c add r1, pc, r1 | r1 = pc + r1;
0x00022880 bl 0x6238 | r0 = fopen64 ();
0x00022884 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 == r0) {
0x00022888 beq 0x2282c | goto label_0;
| }
0x0002288c add r6, sp, 0xc | r6 += var_ch;
0x00022890 mov r2, r7 | r2 = r7;
0x00022894 mov r1, 0xf4 | r1 = 0xf4;
0x00022898 mov r0, r6 | r0 = r6;
0x0002289c bl 0x5920 | r0 = fgets (r0, r1, r2);
0x000228a0 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x000228a4 beq 0x228ec |
0x000228a8 mov r0, r6 | r0 = r6;
0x000228ac bl 0x6118 | strlen (r0);
0x000228b0 mov r4, 0 | r4 = 0;
0x000228b4 cmp r0, 1 |
| if (r0 < 1) {
0x000228b8 bls 0x228ec | goto label_3;
| }
0x000228bc ldr r2, [pc, 0x40] | r2 = *(0x22900);
0x000228c0 add r3, sp, 0x200 | r3 += var_200h;
0x000228c4 add r0, r3, r0 | r0 = r3 + r0;
0x000228c8 strb r4, [r0, -0x1f5] | *((r0 - 0x1f5)) = r4;
0x000228cc mov r3, r6 | r3 = r6;
0x000228d0 add r2, pc, r2 | r2 = pc + r2;
0x000228d4 mov r1, 0x100 | r1 = 0x100;
0x000228d8 mov r0, r5 | r0 = r5;
0x000228dc bl 0x5830 | snprintf (r0, r1, r2, r3)
0x000228e0 mov r0, r5 | r0 = r5;
0x000228e4 bl 0x5e48 | r0 = strdup (r0);
0x000228e8 mov r4, r0 | r4 = r0;
| }
| label_3:
0x000228ec mov r0, r7 | r0 = r7;
0x000228f0 bl 0x5e90 | fclose (r0);
0x000228f4 b 0x22830 | goto label_1;
0x00022908 mov r1, r0 | r1 = r0;
0x0002290c mov r0, 0 | r0 = 0;
0x00022910 b 0x2281c | goto label_2;
| }
; 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/lib/libblkid.so.1.1.0 @ 0x2a884 */
| #include <stdint.h>
|
; (fcn) fcn.0002a884 () | void fcn_0002a884 (int32_t arg_20h, int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| r0 = arg1;
| r1 = arg2;
0x0002a884 push {r0, r1, r4, r5, r6, r7, r8, lr} |
0x0002a888 ldr r4, [sp, 0x20] | r4 = *(arg_20h);
0x0002a88c tst r2, 1 |
0x0002a890 mov r6, r0 | r6 = r0;
0x0002a894 mov r8, r1 | r8 = r1;
0x0002a898 mov r7, r2 | r7 = r2;
0x0002a89c mov r5, r3 | r5 = r3;
| if ((r2 & 1) == 0) {
0x0002a8a0 beq 0x2a900 | goto label_4;
| }
0x0002a8a4 ldr r2, [r0, 0xc] | r2 = *((r0 + 0xc));
0x0002a8a8 ldr r3, [r0, 0x14] | r3 = *((r0 + 0x14));
0x0002a8ac str r2, [sp, 4] | var_4h = r2;
0x0002a8b0 ldr r2, [r0, 0x10] | r2 = *((r0 + 0x10));
0x0002a8b4 add r3, r3, 0x760 | r3 += 0x760;
0x0002a8b8 add r2, r2, 1 | r2++;
0x0002a8bc str r2, [sp] | *(sp) = r2;
0x0002a8c0 ldr r2, [pc, 0x158] | r2 = *(0x2aa1c);
0x0002a8c4 mov r1, r4 | r1 = r4;
0x0002a8c8 mov r0, r5 | r0 = r5;
0x0002a8cc add r3, r3, 0xc | r3 += 0xc;
0x0002a8d0 add r2, pc, r2 | r2 = pc + r2;
0x0002a8d4 bl 0x5830 | r0 = snprintf (r0, r1, r2, r3)
0x0002a8d8 cmp r0, r4 |
| if (r0 > r4) {
0x0002a8dc subls r4, r4, r0 | r4 -= r0;
| }
| if (r0 > r4) {
0x0002a8e0 addls r5, r5, r0 | r5 += r0;
| }
0x0002a8e4 bls 0x2a900 |
| while (r4 == 0) {
| label_0:
0x0002a8e8 ldr r0, [pc, 0x134] | r0 = *(0x2aa20);
0x0002a8ec add r0, pc, r0 | r0 = pc + r0;
0x0002a8f0 bl 0x5728 | warnx (r0);
0x0002a8f4 mvn r0, 0 | r0 = ~0;
| label_1:
0x0002a8f8 add sp, sp, 8 |
0x0002a8fc pop {r4, r5, r6, r7, r8, pc} |
| label_4:
0x0002a900 and r3, r7, 3 | r3 = r7 & 3;
0x0002a904 cmp r3, 3 |
| if (r3 != 3) {
0x0002a908 bne 0x2a92c | goto label_5;
| }
0x0002a90c cmp r4, 0 |
0x0002a910 beq 0x2a8e8 |
| }
0x0002a914 tst r7, 0x20 |
| if ((r7 & 0x20) == 0) {
0x0002a918 movne r3, 0x54 | r3 = 0x54;
| }
| if ((r7 & 0x20) != 0) {
0x0002a91c moveq r3, 0x20 | r3 = 0x20;
| }
0x0002a920 strb r3, [r5] | *(r5) = r3;
0x0002a924 sub r4, r4, 1 | r4--;
0x0002a928 add r5, r5, 1 | r5++;
| label_5:
0x0002a92c tst r7, 2 |
| if ((r7 & 2) == 0) {
0x0002a930 beq 0x2a96c | goto label_6;
| }
0x0002a934 ldr r3, [r6] | r3 = *(r6);
0x0002a938 ldr r2, [pc, 0xe8] | r2 = *(0x2aa24);
0x0002a93c str r3, [sp, 4] | var_4h = r3;
0x0002a940 ldr r3, [r6, 4] | r3 = *((r6 + 4));
0x0002a944 add r2, pc, r2 | r2 = pc + r2;
0x0002a948 str r3, [sp] | *(sp) = r3;
0x0002a94c mov r1, r4 | r1 = r4;
0x0002a950 ldr r3, [r6, 8] | r3 = *((r6 + 8));
0x0002a954 mov r0, r5 | r0 = r5;
0x0002a958 bl 0x5830 | r0 = snprintf (r0, r1, r2, r3)
0x0002a95c cmp r0, r4 |
| if (r0 > r4) {
0x0002a960 bhi 0x2a8e8 | goto label_0;
| }
0x0002a964 sub r4, r4, r0 | r4 -= r0;
0x0002a968 add r5, r5, r0 | r5 += r0;
| label_6:
0x0002a96c tst r7, 8 |
| if ((r7 & 8) == 0) {
0x0002a970 beq 0x2a9ac | goto label_7;
| }
0x0002a974 ldr r2, [pc, 0xb0] | r2 = *(0x2aa28);
0x0002a978 mov r3, r8 | r3 = r8;
0x0002a97c add r2, pc, r2 | r2 = pc + r2;
| label_2:
0x0002a980 mov r1, r4 | r1 = r4;
0x0002a984 mov r0, r5 | r0 = r5;
0x0002a988 bl 0x5830 | r0 = snprintf (r0, r1, r2, r3)
0x0002a98c cmp r0, r4 |
| if (r0 > r4) {
0x0002a990 bhi 0x2a8e8 | goto label_0;
| }
0x0002a994 sub r4, r4, r0 | r4 -= r0;
0x0002a998 add r5, r5, r0 | r5 += r0;
| do {
0x0002a99c tst r7, 4 |
| if ((r7 & 4) != 0) {
0x0002a9a0 bne 0x2a9c4 | goto label_8;
| }
| label_3:
0x0002a9a4 mov r0, 0 | r0 = 0;
0x0002a9a8 b 0x2a8f8 | goto label_1;
| label_7:
0x0002a9ac tst r7, 0x10 |
0x0002a9b0 beq 0x2a99c |
| } while ((r7 & 0x10) == 0);
0x0002a9b4 ldr r2, [pc, 0x74] | r2 = *(0x2aa2c);
0x0002a9b8 mov r3, r8 | r3 = r8;
0x0002a9bc add r2, pc, r2 | r2 = pc + r2;
0x0002a9c0 b 0x2a980 | goto label_2;
| label_8:
0x0002a9c4 mov r0, r6 | r0 = r6;
0x0002a9c8 bl 0x2a870 | fcn_0002a870 (r0);
0x0002a9cc mov r1, 0xe10 | r1 = 0xe10;
0x0002a9d0 mov r7, r0 | r7 = r0;
0x0002a9d4 bl 0x360bc | fcn_000360bc (r0, r1);
0x0002a9d8 mov r1, 0x3c | r1 = 0x3c;
0x0002a9dc mov r6, r0 | r6 = r0;
0x0002a9e0 mov r0, r7 | r0 = r7;
0x0002a9e4 bl 0x360bc | fcn_000360bc (r0, r1);
0x0002a9e8 mov r1, 0x3c | r1 = 0x3c;
0x0002a9ec bl 0x36198 | fcn_00036198 (r0, r1);
0x0002a9f0 ldr r2, [pc, 0x3c] | r2 = *(0x2aa30);
0x0002a9f4 mov r3, r6 | r3 = r6;
0x0002a9f8 add r2, pc, r2 | r2 = pc + r2;
0x0002a9fc mov r0, r5 | r0 = r5;
0x0002aa00 cmp r1, 0 |
0x0002aa04 rsblt r1, r1, 0 | __asm ("rsblt r1, r1, 0");
0x0002aa08 str r1, [sp] | *(sp) = r1;
0x0002aa0c mov r1, r4 | r1 = r4;
0x0002aa10 bl 0x5830 | r0 = snprintf (r0, r1, r2, r3)
0x0002aa14 cmp r0, r4 |
| if (r0 < r4) {
0x0002aa18 bls 0x2a9a4 | goto label_3;
| }
0x0002aa1c b 0x2a8e8 | 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/lib/libblkid.so.1.1.0 @ 0x2d5dc */
| #include <stdint.h>
|
; (fcn) fcn.0002d5dc () | void fcn_0002d5dc (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_8h;
| r0 = arg1;
| r1 = arg2;
0x0002d5dc push {r0, r1, r4, r5, r6, r7, r8, lr} |
0x0002d5e0 ldr r8, [pc, 0x1a0] | r8 = *(0x2d784);
0x0002d5e4 subs r4, r0, 0 | r4 = r0 - 0;
0x0002d5e8 add r8, pc, r8 | r8 = pc + r8;
| if (r4 != r0) {
0x0002d5ec mvneq r0, 0x15 | r0 = ~0x15;
| }
| if (r4 == r0) {
0x0002d5f0 beq 0x2d75c | goto label_1;
| }
0x0002d5f4 ldr r0, [r4, 0x84] | r0 = *((r4 + 0x84));
0x0002d5f8 mov r6, r1 | r6 = r1;
0x0002d5fc cmp r0, 0 |
| if (r0 >= 0) {
0x0002d600 blt 0x2d664 |
0x0002d604 bl 0x61e4 | close (r0);
0x0002d608 ldr r3, [pc, 0x17c] |
0x0002d60c add r3, pc, r3 | r3 = pc + r3;
0x0002d610 ldr r3, [r3] | r3 = *(0x2d788);
0x0002d614 tst r3, 4 |
| if ((r3 & 4) == 0) {
0x0002d618 beq 0x2d664 | goto label_2;
| }
0x0002d61c ldr r3, [pc, 0x16c] | r3 = *(0x2d78c);
0x0002d620 ldr r3, [r8, r3] | r3 = *((r8 + r3));
0x0002d624 ldr r5, [r3] | r5 = *(0x2d78c);
0x0002d628 bl 0x58fc | getpid ();
0x0002d62c ldr r3, [pc, 0x160] | r3 = *(0x2d790);
0x0002d630 ldr r1, [pc, 0x160] | r1 = *(0x2d794);
0x0002d634 add r3, pc, r3 | r3 = pc + r3;
0x0002d638 str r3, [sp] | *(sp) = r3;
0x0002d63c ldr r3, [pc, 0x158] | r3 = *(0x2d798);
0x0002d640 add r1, pc, r1 | r1 = pc + r1;
0x0002d644 add r3, pc, r3 | r3 = pc + r3;
0x0002d648 mov r2, r0 | r2 = r0;
0x0002d64c mov r0, r5 | r0 = r5;
0x0002d650 bl 0x5c50 | fprintf (r0, r1, r2, r3)
0x0002d654 ldr r1, [pc, 0x144] | r1 = *(0x2d79c);
0x0002d658 mov r0, r4 | r0 = r4;
0x0002d65c add r1, pc, r1 | r1 = pc + r1;
0x0002d660 bl 0x2d0b4 | fcn_0002d0b4 (r0);
| }
| label_2:
0x0002d664 ldrb r3, [r4, 0x90] | r3 = *((r4 + 0x90));
0x0002d668 mov r7, 0 | r7 = 0;
0x0002d66c and r3, r3, 0xfa | r3 &= 0xfa;
0x0002d670 mov r0, r4 | r0 = r4;
0x0002d674 mvn r5, 0 | r5 = ~0;
0x0002d678 str r5, [r4, 0x84] | *((r4 + 0x84)) = r5;
0x0002d67c str r7, [r4, 0x88] | *((r4 + 0x88)) = r7;
0x0002d680 strb r3, [r4, 0x90] | *((r4 + 0x90)) = r3;
0x0002d684 mov r2, 0xe8 | r2 = 0xe8;
0x0002d688 strb r7, [r0], 0x98 | *(r0) = r7;
| r0 += 0x98;
0x0002d68c mov r1, r7 | r1 = r7;
0x0002d690 bl 0x5e78 | memset (r0, r1, r2);
0x0002d694 cmp r6, r7 |
| if (r6 == r7) {
0x0002d698 beq 0x2d74c | goto label_3;
| }
0x0002d69c ldrsb r3, [r6] | r3 = *(r6);
0x0002d6a0 cmp r3, 0x2f |
| if (r3 == 0x2f) {
0x0002d6a4 beq 0x2d770 | goto label_4;
| }
0x0002d6a8 ldr r3, [r4, 0x8c] | r3 = *((r4 + 0x8c));
0x0002d6ac tst r3, 0x80 |
| if ((r3 & 0x80) == 0) {
0x0002d6b0 beq 0x2d764 | goto label_5;
| }
0x0002d6b4 mov r0, r6 | r0 = r6;
0x0002d6b8 bl 0x6118 | r0 = strlen (r0);
0x0002d6bc cmp r0, 4 |
| if (r0 > 4) {
0x0002d6c0 movls r0, r5 | r0 = r5;
| }
| if (r0 < 4) {
0x0002d6c4 bls 0x2d75c | goto label_1;
| }
0x0002d6c8 ldr r3, [pc, 0xd4] | r3 = *(0x2d7a0);
0x0002d6cc add r6, r6, 4 | r6 += 4;
0x0002d6d0 add r3, pc, r3 | r3 = pc + r3;
| do {
0x0002d6d4 ldr r2, [pc, 0xcc] | r2 = *(0x2d7a4);
0x0002d6d8 str r6, [sp] | *(sp) = r6;
0x0002d6dc add r2, pc, r2 | r2 = pc + r2;
0x0002d6e0 mov r1, 0x80 | r1 = 0x80;
0x0002d6e4 mov r0, r4 | r0 = r4;
0x0002d6e8 bl 0x5830 | snprintf (r0, r1, r2, r3)
| label_0:
0x0002d6ec ldr r3, [pc, 0xb8] |
0x0002d6f0 add r3, pc, r3 | r3 = pc + r3;
0x0002d6f4 ldr r3, [r3] | r3 = *(0x2d7a8);
0x0002d6f8 tst r3, 4 |
| if ((r3 & 4) != 0) {
0x0002d6fc beq 0x2d74c |
0x0002d700 ldr r3, [pc, 0x88] | r3 = *(0x2d78c);
0x0002d704 ldr r3, [r8, r3] | r3 = *((r8 + r3));
0x0002d708 ldr r5, [r3] | r5 = *(0x2d78c);
0x0002d70c bl 0x58fc | getpid ();
0x0002d710 ldr r3, [pc, 0x98] | r3 = *(0x2d7ac);
0x0002d714 ldr r1, [pc, 0x98] | r1 = *(0x2d7b0);
0x0002d718 add r3, pc, r3 | r3 = pc + r3;
0x0002d71c str r3, [sp] | *(sp) = r3;
0x0002d720 ldr r3, [pc, 0x90] | r3 = *(0x2d7b4);
0x0002d724 add r1, pc, r1 | r1 = pc + r1;
0x0002d728 add r3, pc, r3 | r3 = pc + r3;
0x0002d72c mov r2, r0 | r2 = r0;
0x0002d730 mov r0, r5 | r0 = r5;
0x0002d734 bl 0x5c50 | fprintf (r0, r1, r2, r3)
0x0002d738 ldr r1, [pc, 0x7c] | r1 = *(0x2d7b8);
0x0002d73c mov r2, r6 | r2 = r6;
0x0002d740 add r1, pc, r1 | r1 = pc + r1;
0x0002d744 mov r0, r4 | r0 = r4;
0x0002d748 bl 0x2d0b4 | fcn_0002d0b4 (r0);
| }
| label_3:
0x0002d74c ldr r0, [r4, 0x94] | r0 = *((r4 + 0x94));
0x0002d750 bl 0x32668 | fcn_00032668 (r0);
0x0002d754 mov r0, 0 | r0 = 0;
0x0002d758 str r0, [r4, 0x94] | *((r4 + 0x94)) = r0;
| label_1:
0x0002d75c add sp, sp, 8 |
0x0002d760 pop {r4, r5, r6, r7, r8, pc} |
| label_5:
0x0002d764 ldr r3, [pc, 0x54] | r3 = *(0x2d7bc);
0x0002d768 add r3, pc, r3 | r3 = pc + r3;
0x0002d76c b 0x2d6d4 |
| } while (1);
| label_4:
0x0002d770 mov r2, 0x80 | r2 = 0x80;
0x0002d774 mov r1, r6 | r1 = r6;
0x0002d778 mov r0, r4 | r0 = r4;
0x0002d77c bl 0x5d40 | strncpy (r0, r1, r2);
0x0002d780 strb r7, [r4, 0x7f] | *((r4 + 0x7f)) = r7;
0x0002d784 b 0x2d6ec | 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/lib/libblkid.so.1.1.0 @ 0x2e5d4 */
| #include <stdint.h>
|
; (fcn) fcn.0002e5d4 () | void fcn_0002e5d4 (int32_t arg1) {
| int32_t var_0h;
| int32_t var_8h;
| char * format;
| int32_t var_10h;
| char * s;
| int32_t var_194h;
| r0 = arg1;
0x0002e5d4 ldr r3, [pc, 0x1c8] |
0x0002e5d8 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0002e5dc ldr r7, [pc, 0x1c4] | r7 = *(0x2e7a4);
0x0002e5e0 add r3, pc, r3 | r3 = pc + r3;
0x0002e5e4 ldr r3, [r3] | r3 = *(0x2e7a0);
0x0002e5e8 add r7, pc, r7 | r7 = pc + r7;
0x0002e5ec tst r3, 8 |
0x0002e5f0 sub sp, sp, 0x194 |
0x0002e5f4 mov r5, r0 | r5 = r0;
0x0002e5f8 add r8, r0, 0x180 | r8 = r0 + 0x180;
| if ((r3 & 8) != 0) {
0x0002e5fc beq 0x2e648 |
0x0002e600 ldr r3, [pc, 0x1a4] | r3 = *(0x2e7a8);
0x0002e604 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x0002e608 ldr r4, [r3] | r4 = *(0x2e7a8);
0x0002e60c bl 0x58fc | getpid ();
0x0002e610 ldr r3, [pc, 0x198] | r3 = *(0x2e7ac);
0x0002e614 ldr r1, [pc, 0x198] | r1 = *(0x2e7b0);
0x0002e618 add r3, pc, r3 | r3 = pc + r3;
0x0002e61c str r3, [sp] | *(sp) = r3;
0x0002e620 ldr r3, [pc, 0x190] | r3 = *(0x2e7b4);
0x0002e624 add r1, pc, r1 | r1 = pc + r1;
0x0002e628 add r3, pc, r3 | r3 = pc + r3;
0x0002e62c mov r2, r0 | r2 = r0;
0x0002e630 mov r0, r4 | r0 = r4;
0x0002e634 bl 0x5c50 | fprintf (r0, r1, r2, r3)
0x0002e638 ldr r1, [pc, 0x17c] | r1 = *(0x2e7b8);
0x0002e63c mov r0, r8 | r0 = r8;
0x0002e640 add r1, pc, r1 | r1 = pc + r1;
0x0002e644 bl 0x2d0b4 | fcn_0002d0b4 (r0);
| }
0x0002e648 ldr r3, [r5, 0x184] | r3 = *((r5 + 0x184));
0x0002e64c cmp r3, 0 |
| if (r3 == 0) {
0x0002e650 bne 0x2e664 |
0x0002e654 ldr r0, [pc, 0x164] | r0 = *(0x2e7bc);
0x0002e658 add r0, pc, r0 | r0 = pc + r0;
0x0002e65c bl 0x5ec0 | opendir ();
0x0002e660 str r0, [r5, 0x184] | *((r5 + 0x184)) = r0;
| }
0x0002e664 ldr r0, [r5, 0x184] | r0 = *((r5 + 0x184));
0x0002e668 cmp r0, 0 |
0x0002e66c bne 0x2e67c |
| while (r0 == 0) {
0x0002e670 mov r0, 1 | r0 = 1;
| label_1:
0x0002e674 add sp, sp, 0x194 |
0x0002e678 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x0002e67c bl 0x5d28 | dirfd ();
0x0002e680 ldr r3, [pc, 0x13c] | r3 = *(0x2e7c0);
0x0002e684 ldr sl, [pc, 0x13c] | sl = *(0x2e7c4);
0x0002e688 add r3, pc, r3 | r3 = pc + r3;
0x0002e68c str r3, [sp, 8] | var_8h = r3;
0x0002e690 ldr r3, [pc, 0x134] | r3 = *(0x2e7c8);
0x0002e694 add sl, pc, sl | sl = pc + sl;
0x0002e698 add r3, pc, r3 | r3 = pc + r3;
0x0002e69c str r3, [sp, 0xc] | format = r3;
0x0002e6a0 mov sb, r0 | sb = r0;
| label_0:
0x0002e6a4 ldr r0, [r5, 0x184] | r0 = *((r5 + 0x184));
0x0002e6a8 bl 0x5dac | r0 = readdir64 ();
0x0002e6ac cmp r0, 0 |
0x0002e6b0 beq 0x2e670 |
| }
0x0002e6b4 ldr r3, [sl] | r3 = *(sl);
0x0002e6b8 add r4, r0, 0x13 | r4 = r0 + 0x13;
0x0002e6bc tst r3, 8 |
| if ((r3 & 8) != 0) {
0x0002e6c0 beq 0x2e708 |
0x0002e6c4 ldr r3, [pc, 0xe0] | r3 = *(0x2e7a8);
0x0002e6c8 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x0002e6cc ldr r6, [r3] | r6 = *(0x2e7a8);
0x0002e6d0 bl 0x58fc | getpid ();
0x0002e6d4 ldr r3, [pc, 0xf4] | r3 = *(0x2e7cc);
0x0002e6d8 ldr r1, [sp, 0xc] | r1 = format;
0x0002e6dc add r3, pc, r3 | r3 = pc + r3;
0x0002e6e0 str r3, [sp] | *(sp) = r3;
0x0002e6e4 ldr r3, [sp, 8] | r3 = var_8h;
0x0002e6e8 mov r2, r0 | r2 = r0;
0x0002e6ec mov r0, r6 | r0 = r6;
0x0002e6f0 bl 0x5c50 | fprintf (r0, r1, r2, r3)
0x0002e6f4 ldr r1, [pc, 0xd8] | r1 = *(0x2e7d0);
0x0002e6f8 mov r2, r4 | r2 = r4;
0x0002e6fc add r1, pc, r1 | r1 = pc + r1;
0x0002e700 mov r0, r8 | r0 = r8;
0x0002e704 bl 0x2d0b4 | fcn_0002d0b4 (r0);
| }
0x0002e708 ldr r1, [pc, 0xc8] | r1 = *(0x2e7d4);
0x0002e70c mov r0, r4 | r0 = r4;
0x0002e710 add r1, pc, r1 | r1 = pc + r1;
0x0002e714 bl 0x5efc | r0 = strcmp (r0, r1);
0x0002e718 cmp r0, 0 |
| if (r0 == 0) {
0x0002e71c beq 0x2e6a4 | goto label_0;
| }
0x0002e720 ldr r1, [pc, 0xb4] | r1 = *(0x2e7d8);
0x0002e724 mov r0, r4 | r0 = r4;
0x0002e728 add r1, pc, r1 | r1 = pc + r1;
0x0002e72c bl 0x5efc | r0 = strcmp (r0, r1);
0x0002e730 cmp r0, 0 |
| if (r0 == 0) {
0x0002e734 beq 0x2e6a4 | goto label_0;
| }
0x0002e738 ldr r1, [pc, 0xa0] | r1 = *(0x2e7dc);
0x0002e73c mov r2, 4 | r2 = 4;
0x0002e740 add r1, pc, r1 | r1 = pc + r1;
0x0002e744 mov r0, r4 | r0 = r4;
0x0002e748 bl 0x5d34 | r0 = strncmp (r0, r1, r2);
0x0002e74c subs fp, r0, 0 |
| if (fp != r0) {
0x0002e750 bne 0x2e6a4 | goto label_0;
| }
0x0002e754 ldr r2, [pc, 0x88] | r2 = *(0x2e7e0);
0x0002e758 add r6, sp, 0x7c | r6 += s;
0x0002e75c mov r3, r4 | r3 = r4;
0x0002e760 add r2, pc, r2 | r2 = pc + r2;
0x0002e764 ldr r1, [pc, 0x7c] | r1 = *(0x2e7e4);
0x0002e768 mov r0, r6 | r0 = r6;
0x0002e76c bl 0x5830 | snprintf (r0, r1, r2, r3)
0x0002e770 mov r3, fp | r3 = fp;
0x0002e774 add r2, sp, 0x10 | r2 += var_10h;
0x0002e778 mov r1, r6 | r1 = r6;
0x0002e77c mov r0, sb | r0 = sb;
0x0002e780 bl 0x5f44 | r0 = fstatat64 ();
0x0002e784 cmp r0, 0 |
| if (r0 != 0) {
0x0002e788 bne 0x2e6a4 | goto label_0;
| }
0x0002e78c mov r1, r4 | r1 = r4;
0x0002e790 mov r0, r5 | r0 = r5;
0x0002e794 bl 0x2e3d4 | r0 = fcn_0002e3d4 (r0, r1);
0x0002e798 cmp r0, 0 |
| if (r0 != 0) {
0x0002e79c bne 0x2e6a4 | goto label_0;
| }
0x0002e7a0 b 0x2e674 | 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/lib/libblkid.so.1.1.0 @ 0x2e9ac */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0002e9ac () | void fcn_0002e9ac (int32_t arg1) {
| int32_t var_0h;
| char * s;
| int32_t var_18h;
| r0 = arg1;
0x0002e9ac push {r4, r5, r6, r7, r8, lr} |
0x0002e9b0 ldr r5, [pc, 0x298] | r5 = *(0x2ec4c);
0x0002e9b4 subs r4, r0, 0 | r4 = r0 - 0;
0x0002e9b8 add r5, pc, r5 | r5 = pc + r5;
0x0002e9bc sub sp, sp, 0x18 |
| if (r4 != r0) {
0x0002e9c0 mvneq r0, 0x15 | r0 = ~0x15;
| }
| if (r4 == r0) {
0x0002e9c4 beq 0x2ea6c | goto label_1;
| }
0x0002e9c8 ldrb r3, [r4, 0x19c] | r3 = *((r4 + 0x19c));
0x0002e9cc tst r3, 1 |
| if ((r3 & 1) != 0) {
0x0002e9d0 bne 0x2ea68 | goto label_5;
| }
0x0002e9d4 ldr r3, [pc, 0x278] |
0x0002e9d8 add r6, r4, 0x180 | r6 = r4 + 0x180;
0x0002e9dc add r3, pc, r3 | r3 = pc + r3;
0x0002e9e0 ldr r3, [r3] | r3 = *(0x2ec50);
0x0002e9e4 tst r3, 8 |
| if ((r3 & 8) != 0) {
0x0002e9e8 beq 0x2ea34 |
0x0002e9ec ldr r3, [pc, 0x264] | r3 = *(0x2ec54);
0x0002e9f0 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x0002e9f4 ldr r7, [r3] | r7 = *(0x2ec54);
0x0002e9f8 bl 0x58fc | getpid ();
0x0002e9fc ldr r3, [pc, 0x258] | r3 = *(0x2ec58);
0x0002ea00 ldr r1, [pc, 0x258] | r1 = *(0x2ec5c);
0x0002ea04 add r3, pc, r3 | r3 = pc + r3;
0x0002ea08 str r3, [sp] | *(sp) = r3;
0x0002ea0c ldr r3, [pc, 0x250] | r3 = *(0x2ec60);
0x0002ea10 add r1, pc, r1 | r1 = pc + r1;
0x0002ea14 add r3, pc, r3 | r3 = pc + r3;
0x0002ea18 mov r2, r0 | r2 = r0;
0x0002ea1c mov r0, r7 | r0 = r7;
0x0002ea20 bl 0x5c50 | fprintf (r0, r1, r2, r3)
0x0002ea24 ldr r1, [pc, 0x23c] | r1 = *(0x2ec64);
0x0002ea28 mov r0, r6 | r0 = r6;
0x0002ea2c add r1, pc, r1 | r1 = pc + r1;
0x0002ea30 bl 0x2d0b4 | fcn_0002d0b4 (r0);
| }
0x0002ea34 ldr r3, [r4, 0x1a0] | r3 = *((r4 + 0x1a0));
0x0002ea38 tst r3, 2 |
| if ((r3 & 2) == 0) {
0x0002ea3c beq 0x2ea7c | goto label_6;
| }
0x0002ea40 ldr r3, [r4, 0x8c] | r3 = *((r4 + 0x8c));
0x0002ea44 mov r0, r4 | r0 = r4;
0x0002ea48 and r3, r3, 0x60 | r3 &= 0x60;
0x0002ea4c cmp r3, 0x40 |
| if (r3 != 0x40) {
0x0002ea50 bne 0x2ea74 | goto label_7;
| }
0x0002ea54 bl 0x2e5d4 | r0 = fcn_0002e5d4 (r0);
| do {
0x0002ea58 cmp r0, 0 |
| if (r0 != 0) {
0x0002ea5c beq 0x2ea6c |
| label_0:
0x0002ea60 mov r0, r4 | r0 = r4;
0x0002ea64 bl 0x2de4c | fcn_0002de4c (r0);
| label_5:
0x0002ea68 mov r0, 1 | r0 = 1;
| }
| label_1:
0x0002ea6c add sp, sp, 0x18 |
0x0002ea70 pop {r4, r5, r6, r7, r8, pc} |
| label_7:
0x0002ea74 bl 0x2e7ec | fcn_0002e7ec (r0);
0x0002ea78 b 0x2ea58 |
| } while (1);
| label_6:
0x0002ea7c ldrb r3, [r4, 0x19c] | r3 = *((r4 + 0x19c));
0x0002ea80 tst r3, 2 |
| if ((r3 & 2) != 0) {
0x0002ea84 beq 0x2eb14 |
0x0002ea88 ldr r3, [pc, 0x1dc] |
0x0002ea8c add r3, pc, r3 | r3 = pc + r3;
0x0002ea90 ldr r3, [r3] | r3 = *(0x2ec68);
0x0002ea94 tst r3, 8 |
| if ((r3 & 8) != 0) {
0x0002ea98 beq 0x2eae4 |
0x0002ea9c ldr r3, [pc, 0x1b4] | r3 = *(0x2ec54);
0x0002eaa0 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x0002eaa4 ldr r7, [r3] | r7 = *(0x2ec54);
0x0002eaa8 bl 0x58fc | getpid ();
0x0002eaac ldr r3, [pc, 0x1bc] | r3 = *(0x2ec6c);
0x0002eab0 ldr r1, [pc, 0x1bc] | r1 = *(0x2ec70);
0x0002eab4 add r3, pc, r3 | r3 = pc + r3;
0x0002eab8 str r3, [sp] | *(sp) = r3;
0x0002eabc ldr r3, [pc, 0x1b4] | r3 = *(0x2ec74);
0x0002eac0 add r1, pc, r1 | r1 = pc + r1;
0x0002eac4 add r3, pc, r3 | r3 = pc + r3;
0x0002eac8 mov r2, r0 | r2 = r0;
0x0002eacc mov r0, r7 | r0 = r7;
0x0002ead0 bl 0x5c50 | fprintf (r0, r1, r2, r3)
0x0002ead4 ldr r1, [pc, 0x1a0] | r1 = *(0x2ec78);
0x0002ead8 mov r0, r6 | r0 = r6;
0x0002eadc add r1, pc, r1 | r1 = pc + r1;
0x0002eae0 bl 0x2d0b4 | fcn_0002d0b4 (r0);
| }
0x0002eae4 ldr r3, [r4, 0x188] | r3 = *((r4 + 0x188));
0x0002eae8 ldr r8, [pc, 0x190] | r8 = *(0x2ec7c);
0x0002eaec add r3, r3, 1 | r3++;
0x0002eaf0 add r8, pc, r8 | r8 = pc + r8;
0x0002eaf4 add r7, sp, 8 | r7 += s;
0x0002eaf8 str r3, [r4, 0x188] | *((r4 + 0x188)) = r3;
| label_3:
0x0002eafc ldr r3, [r4, 0x188] | r3 = *((r4 + 0x188));
0x0002eb00 cmp r3, 7 |
| if (r3 <= 7) {
0x0002eb04 ble 0x2ec0c | goto label_8;
| }
0x0002eb08 ldrb r3, [r4, 0x19c] | r3 = *((r4 + 0x19c));
0x0002eb0c bic r3, r3, 2 | r3 = BIT_MASK (r3, 2);
0x0002eb10 strb r3, [r4, 0x19c] | *((r4 + 0x19c)) = r3;
| }
0x0002eb14 ldr r3, [r4, 0x18c] | r3 = *((r4 + 0x18c));
0x0002eb18 cmp r3, 0 |
| if (r3 == 0) {
0x0002eb1c bne 0x2eba8 |
0x0002eb20 ldr r3, [pc, 0x15c] |
0x0002eb24 add r3, pc, r3 | r3 = pc + r3;
0x0002eb28 ldr r3, [r3] | r3 = *(0x2ec80);
0x0002eb2c tst r3, 8 |
| if ((r3 & 8) != 0) {
0x0002eb30 beq 0x2eb7c |
0x0002eb34 ldr r3, [pc, 0x11c] | r3 = *(0x2ec54);
0x0002eb38 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x0002eb3c ldr r5, [r3] | r5 = *(0x2ec54);
0x0002eb40 bl 0x58fc | getpid ();
0x0002eb44 ldr r3, [pc, 0x13c] | r3 = *(0x2ec84);
0x0002eb48 ldr r1, [pc, 0x13c] | r1 = *(0x2ec88);
0x0002eb4c add r3, pc, r3 | r3 = pc + r3;
0x0002eb50 str r3, [sp] | *(sp) = r3;
0x0002eb54 ldr r3, [pc, 0x134] | r3 = *(0x2ec8c);
0x0002eb58 add r1, pc, r1 | r1 = pc + r1;
0x0002eb5c add r3, pc, r3 | r3 = pc + r3;
0x0002eb60 mov r2, r0 | r2 = r0;
0x0002eb64 mov r0, r5 | r0 = r5;
0x0002eb68 bl 0x5c50 | fprintf (r0, r1, r2, r3)
0x0002eb6c ldr r1, [pc, 0x120] | r1 = *(0x2ec90);
0x0002eb70 mov r0, r6 | r0 = r6;
0x0002eb74 add r1, pc, r1 | r1 = pc + r1;
0x0002eb78 bl 0x2d0b4 | fcn_0002d0b4 (r0);
| }
0x0002eb7c ldr r3, [r4, 0x8c] | r3 = *((r4 + 0x8c));
0x0002eb80 add r1, r4, 0x18c | r1 = r4 + 0x18c;
0x0002eb84 tst r3, 0x80 |
| if ((r3 & 0x80) == 0) {
0x0002eb88 beq 0x2ec40 | goto label_9;
| }
0x0002eb8c ldr r0, [pc, 0x104] | r0 = *(0x2ec94);
0x0002eb90 mov r2, 0 | r2 = 0;
0x0002eb94 add r0, pc, r0 | r0 = pc + r0;
| label_4:
0x0002eb98 bl 0x2d368 | fcn_0002d368 (r0, r1);
0x0002eb9c mvn r3, 0 | r3 = ~0;
0x0002eba0 str r3, [r4, 0x188] | *((r4 + 0x188)) = r3;
0x0002eba4 str r0, [r4, 0x190] | *((r4 + 0x190)) = r0;
| }
0x0002eba8 ldr r3, [r4, 0x188] | r3 = *((r4 + 0x188));
0x0002ebac ldr r6, [pc, 0xe8] | r6 = *(0x2ec98);
0x0002ebb0 add r3, r3, 1 | r3++;
0x0002ebb4 add r6, pc, r6 | r6 = pc + r6;
0x0002ebb8 add r5, sp, 8 | r5 += s;
0x0002ebbc str r3, [r4, 0x188] | *((r4 + 0x188)) = r3;
| label_2:
0x0002ebc0 ldr r3, [r4, 0x188] | r3 = *((r4 + 0x188));
0x0002ebc4 ldr r2, [r4, 0x190] | r2 = *((r4 + 0x190));
0x0002ebc8 cmp r3, r2 |
| if (r3 >= r2) {
0x0002ebcc bge 0x2ea60 | goto label_0;
| }
0x0002ebd0 ldr r2, [r4, 0x18c] | r2 = *((r4 + 0x18c));
0x0002ebd4 mov r1, 0x10 | r1 = 0x10;
0x0002ebd8 ldr r3, [r2, r3, lsl 2] | offset_0 = r3 << 2;
| r3 = *((r2 + offset_0));
0x0002ebdc mov r0, r5 | r0 = r5;
0x0002ebe0 mov r2, r6 | r2 = r6;
0x0002ebe4 bl 0x5830 | snprintf (r0, r1, r2, r3)
0x0002ebe8 mov r1, r5 | r1 = r5;
0x0002ebec mov r0, r4 | r0 = r4;
0x0002ebf0 bl 0x2e3d4 | r0 = fcn_0002e3d4 (r0, r1);
0x0002ebf4 cmp r0, 0 |
| if (r0 == 0) {
0x0002ebf8 beq 0x2ea6c | goto label_1;
| }
0x0002ebfc ldr r3, [r4, 0x188] | r3 = *((r4 + 0x188));
0x0002ec00 add r3, r3, 1 | r3++;
0x0002ec04 str r3, [r4, 0x188] | *((r4 + 0x188)) = r3;
0x0002ec08 b 0x2ebc0 | goto label_2;
| label_8:
0x0002ec0c mov r2, r8 | r2 = r8;
0x0002ec10 mov r1, 0x10 | r1 = 0x10;
0x0002ec14 mov r0, r7 | r0 = r7;
0x0002ec18 bl 0x5830 | snprintf (r0, r1, r2, r3)
0x0002ec1c mov r1, r7 | r1 = r7;
0x0002ec20 mov r0, r4 | r0 = r4;
0x0002ec24 bl 0x2e3d4 | r0 = fcn_0002e3d4 (r0, r1);
0x0002ec28 cmp r0, 0 |
| if (r0 == 0) {
0x0002ec2c beq 0x2ea6c | goto label_1;
| }
0x0002ec30 ldr r3, [r4, 0x188] | r3 = *((r4 + 0x188));
0x0002ec34 add r3, r3, 1 | r3++;
0x0002ec38 str r3, [r4, 0x188] | *((r4 + 0x188)) = r3;
0x0002ec3c b 0x2eafc | goto label_3;
| label_9:
0x0002ec40 ldr r0, [pc, 0x58] | r0 = *(0x2ec9c);
0x0002ec44 mov r2, 1 | r2 = 1;
0x0002ec48 add r0, pc, r0 | r0 = pc + r0;
0x0002ec4c b 0x2eb98 | 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/lib/libblkid.so.1.1.0 @ 0x323b0 */
| #include <stdint.h>
|
; (fcn) fcn.000323b0 () | void fcn_000323b0 (int32_t arg1) {
| int32_t var_0h;
| int32_t var_8h;
| r0 = arg1;
0x000323b0 ldr r3, [r0, 0xc] | r3 = *((r0 + 0xc));
0x000323b4 push {r0, r1, r4, lr} |
0x000323b8 ldr r2, [r0, 4] | r2 = *((r0 + 4));
0x000323bc cmp r3, 0 |
| if (r3 != 0) {
0x000323c0 beq 0x3241c |
0x000323c4 cmp r2, 0 |
| if (r2 != 0) {
0x000323c8 moveq r2, r3 | r2 = r3;
| }
| if (r2 == 0) {
0x000323cc beq 0x3241c | goto label_0;
| }
0x000323d0 ldrsb r1, [r2] | r1 = *(r2);
0x000323d4 add r4, r0, 0x10 | r4 = r0 + 0x10;
0x000323d8 cmp r1, 0x2f |
| if (r1 != 0x2f) {
0x000323dc addeq r2, r2, 1 | r2++;
| }
0x000323e0 str r2, [sp] | *(sp) = r2;
0x000323e4 ldr r2, [pc, 0x3c] | r2 = *(0x32424);
0x000323e8 mov r1, 0x1000 | r1 = 0x1000;
0x000323ec add r2, pc, r2 | r2 = pc + r2;
0x000323f0 mov r0, r4 | r0 = r4;
0x000323f4 bl 0x5830 | r0 = snprintf (r0, r1, r2, r3)
0x000323f8 cmp r0, 0 |
| if (r0 >= 0) {
0x000323fc blt 0x32418 |
0x00032400 cmp r0, 0x1000 |
| if (r0 >= 0x1000) {
0x00032404 movlt r2, r4 | r2 = r4;
| }
| if (r0 < 0x1000) {
0x00032408 blt 0x3241c | goto label_0;
| }
0x0003240c bl 0x60ac | errno_location ();
0x00032410 mov r3, 0x24 | r3 = 0x24;
0x00032414 str r3, [r0] | *(r0) = r3;
| }
0x00032418 mov r2, 0 | r2 = 0;
| }
| label_0:
0x0003241c mov r0, r2 | r0 = r2;
0x00032420 add sp, sp, 8 |
0x00032424 pop {r4, 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/lib/libblkid.so.1.1.0 @ 0x33cf8 */
| #include <stdint.h>
|
; (fcn) fcn.00033cf8 () | void fcn_00033cf8 (int32_t arg_50h, int32_t arg1) {
| int32_t var_0h;
| int32_t var_0h_2;
| char * s;
| int32_t var_34h;
| r0 = arg1;
0x00033cf8 push {r4, r5, r6, r7, r8, sb, lr} |
0x00033cfc ldr r1, [pc, 0x78] | r1 = *(0x33d78);
0x00033d00 sub sp, sp, 0x34 |
0x00033d04 mov r8, r2 | r8 = r2;
0x00033d08 ldr r2, [sp, 0x50] | r2 = *(arg_50h);
0x00033d0c mov sb, r3 | sb = r3;
0x00033d10 bl 0x32eb4 | r0 = fcn_00032eb4 (r0, r1);
0x00033d14 mov r6, r0 | r6 = r0;
0x00033d18 bl 0x60ac | errno_location ();
0x00033d1c cmp r6, 0 |
| if (r6 >= 0) {
0x00033d20 ldrlt r4, [r0] | r4 = *(r0);
| }
0x00033d24 mov r5, r0 | r5 = r0;
0x00033d28 rsblt r4, r4, 0 | __asm ("rsblt r4, r4, 0");
| if (r6 >= 0) {
0x00033d2c blt 0x33d70 |
0x00033d30 ldr r2, [pc, 0x48] | r2 = *(0x33d7c);
0x00033d34 add r4, sp, 8 | r4 += s;
0x00033d38 add r2, pc, r2 | r2 = pc + r2;
0x00033d3c mov r1, 0x25 | r1 = 0x25;
0x00033d40 mov r0, r4 | r0 = r4;
0x00033d44 strd r8, sb, [sp] | __asm ("strd r8, sb, [sp]");
0x00033d48 bl 0x5830 | snprintf (r0, r1, r2, r3)
0x00033d4c mov r1, r4 | r1 = r4;
0x00033d50 mov r2, r0 | r2 = r0;
0x00033d54 mov r0, r6 | r0 = r6;
0x00033d58 bl 0x32440 | fcn_00032440 (r0, r1);
0x00033d5c ldr r7, [r5] | r7 = *(r5);
0x00033d60 mov r4, r0 | r4 = r0;
0x00033d64 mov r0, r6 | r0 = r6;
0x00033d68 bl 0x61e4 | close (r0);
0x00033d6c str r7, [r5] | *(r5) = r7;
| }
0x00033d70 mov r0, r4 | r0 = r4;
0x00033d74 add sp, sp, 0x34 |
0x00033d78 pop {r4, r5, r6, r7, r8, sb, 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/lib/libblkid.so.1.1.0 @ 0x34adc */
| #include <stdint.h>
|
; (fcn) fcn.00034adc () | void fcn_00034adc (int32_t arg_58h, int32_t arg1) {
| int32_t var_0h;
| char * s;
| int32_t var_3ch;
| r0 = arg1;
0x00034adc push {r4, r5, r6, r7, r8, sb, lr} |
0x00034ae0 ldr sb, [pc, 0x194] | sb = *(0x34c78);
0x00034ae4 sub sp, sp, 0x3c |
0x00034ae8 mov r1, r3 | r1 = r3;
0x00034aec mov r4, r0 | r4 = r0;
0x00034af0 mov r0, r2 | r0 = r2;
0x00034af4 mov r6, r2 | r6 = r2;
0x00034af8 mov r7, r3 | r7 = r3;
0x00034afc bl 0x5944 | gnu_dev_major ();
0x00034b00 mov r1, r7 | r1 = r7;
0x00034b04 add sb, pc, sb | sb = pc + sb;
0x00034b08 mov r5, r0 | r5 = r0;
0x00034b0c mov r0, r6 | r0 = r6;
0x00034b10 bl 0x5af4 | gnu_dev_minor ();
0x00034b14 ldr r2, [pc, 0x164] | r2 = *(0x34c7c);
0x00034b18 mov r3, r5 | r3 = r5;
0x00034b1c add r5, sp, 8 | r5 += s;
0x00034b20 add r2, pc, r2 | r2 = pc + r2;
0x00034b24 mov r1, 0x2e | r1 = 0x2e;
0x00034b28 str r0, [sp] | *(sp) = r0;
0x00034b2c mov r0, r5 | r0 = r5;
0x00034b30 bl 0x5830 | snprintf (r0, r1, r2, r3)
0x00034b34 mov r1, r5 | r1 = r5;
0x00034b38 mov r0, r4 | r0 = r4;
0x00034b3c bl 0x32968 | r0 = fcn_00032968 (r0, r1);
0x00034b40 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00034b44 bne 0x34c70 |
0x00034b48 mov r0, r4 | r0 = r4;
0x00034b4c bl 0x32b10 | r0 = fcn_00032b10 (r0);
0x00034b50 cmp r0, 0 |
| if (r0 >= 0) {
0x00034b54 movlt r5, r0 | r5 = r0;
| }
| if (r0 < 0) {
0x00034b58 blt 0x34c70 | goto label_0;
| }
0x00034b5c mov r0, r4 | r0 = r4;
0x00034b60 bl 0x32af0 | r0 = fcn_00032af0 (r0);
0x00034b64 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 == r0) {
0x00034b68 bne 0x34c04 |
0x00034b6c ldr r3, [pc, 0x110] |
0x00034b70 add r3, pc, r3 | r3 = pc + r3;
0x00034b74 ldr r3, [r3] | r3 = *(0x34c80);
0x00034b78 tst r3, 4 |
| if ((r3 & 4) != 0) {
0x00034b7c beq 0x34bc8 |
0x00034b80 ldr r3, [pc, 0x100] | r3 = *(0x34c84);
0x00034b84 ldr r3, [sb, r3] | r3 = *((sb + r3));
0x00034b88 ldr r8, [r3] | r8 = *(0x34c84);
0x00034b8c bl 0x58fc | getpid ();
0x00034b90 ldr r3, [pc, 0xf4] | r3 = *(0x34c88);
0x00034b94 ldr r1, [pc, 0xf4] | r1 = *(0x34c8c);
0x00034b98 add r3, pc, r3 | r3 = pc + r3;
0x00034b9c str r3, [sp] | *(sp) = r3;
0x00034ba0 ldr r3, [pc, 0xec] | r3 = *(0x34c90);
0x00034ba4 add r1, pc, r1 | r1 = pc + r1;
0x00034ba8 add r3, pc, r3 | r3 = pc + r3;
0x00034bac mov r2, r0 | r2 = r0;
0x00034bb0 mov r0, r8 | r0 = r8;
0x00034bb4 bl 0x5c50 | fprintf (r0, r1, r2, r3)
0x00034bb8 ldr r1, [pc, 0xd8] | r1 = *(0x34c94);
0x00034bbc mov r0, r4 | r0 = r4;
0x00034bc0 add r1, pc, r1 | r1 = pc + r1;
0x00034bc4 bl 0x34504 | fcn_00034504 (r0);
| }
0x00034bc8 mov r1, 0x20 | r1 = 0x20;
0x00034bcc mov r0, 1 | r0 = 1;
0x00034bd0 bl 0x5bf0 | r0 = calloc (r0, r1);
0x00034bd4 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x00034bd8 mvneq r5, 0xb | r5 = ~0xb;
| }
| if (r8 == r0) {
0x00034bdc beq 0x34c70 | goto label_0;
| }
0x00034be0 ldr r2, [pc, 0xb4] | r2 = *(0x34c98);
0x00034be4 mov r1, r8 | r1 = r8;
0x00034be8 add r2, pc, r2 | r2 = pc + r2;
0x00034bec mov r0, r4 | r0 = r4;
0x00034bf0 bl 0x32a50 | fcn_00032a50 (r0, r1);
0x00034bf4 ldr r1, [pc, 0xa4] | r1 = *(0x34c9c);
0x00034bf8 mov r0, r4 | r0 = r4;
0x00034bfc add r1, pc, r1 | r1 = pc + r1;
0x00034c00 bl 0x32b00 | fcn_00032b00 (r0, r1);
| }
0x00034c04 ldr r3, [pc, 0x98] |
0x00034c08 add r3, pc, r3 | r3 = pc + r3;
0x00034c0c ldr r3, [r3] | r3 = *(0x34ca0);
0x00034c10 tst r3, 4 |
| if ((r3 & 4) != 0) {
0x00034c14 beq 0x34c60 |
0x00034c18 ldr r3, [pc, 0x68] | r3 = *(0x34c84);
0x00034c1c ldr r3, [sb, r3] | r3 = *((sb + r3));
0x00034c20 ldr sb, [r3] | sb = *(0x34c84);
0x00034c24 bl 0x58fc | getpid ();
0x00034c28 ldr r3, [pc, 0x78] | r3 = *(0x34ca4);
0x00034c2c ldr r1, [pc, 0x78] | r1 = *(0x34ca8);
0x00034c30 add r3, pc, r3 | r3 = pc + r3;
0x00034c34 str r3, [sp] | *(sp) = r3;
0x00034c38 ldr r3, [pc, 0x70] | r3 = *(0x34cac);
0x00034c3c add r1, pc, r1 | r1 = pc + r1;
0x00034c40 add r3, pc, r3 | r3 = pc + r3;
0x00034c44 mov r2, r0 | r2 = r0;
0x00034c48 mov r0, sb | r0 = sb;
0x00034c4c bl 0x5c50 | fprintf (r0, r1, r2, r3)
0x00034c50 ldr r1, [pc, 0x5c] | r1 = *(0x34cb0);
0x00034c54 mov r0, r4 | r0 = r4;
0x00034c58 add r1, pc, r1 | r1 = pc + r1;
0x00034c5c bl 0x34504 | fcn_00034504 (r0);
| }
0x00034c60 strd r6, r7, [r8] | __asm ("strd r6, r7, [r8]");
0x00034c64 ldr r1, [sp, 0x58] | r1 = *(arg_58h);
0x00034c68 mov r0, r4 | r0 = r4;
0x00034c6c bl 0x349f8 | fcn_000349f8 (r0, r1);
| }
| label_0:
0x00034c70 mov r0, r5 | r0 = r5;
0x00034c74 add sp, sp, 0x3c |
0x00034c78 pop {r4, r5, r6, r7, r8, sb, 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/lib/libblkid.so.1.1.0 @ 0x34e44 */
| #include <stdint.h>
|
; (fcn) fcn.00034e44 () | void fcn_00034e44 (int32_t arg1, int32_t arg2) {
| char * s;
| int32_t var_10ch;
| r0 = arg1;
| r1 = arg2;
0x00034e44 push {r4, r5, r6, r7, lr} |
0x00034e48 ldrb r3, [r1, 0x12] | r3 = *((r1 + 0x12));
0x00034e4c ldr r7, [pc, 0x114] | r7 = *(0x34f64);
0x00034e50 mov r4, r2 | r4 = r2;
0x00034e54 and r2, r3, 0xfb | r2 = r3 & 0xfb;
0x00034e58 cmp r3, 0xa |
0x00034e5c cmpne r2, 0 | __asm ("cmpne r2, 0");
0x00034e60 add r7, pc, r7 | r7 = pc + r7;
0x00034e64 sub sp, sp, 0x10c |
| if (r3 != 0xa) {
0x00034e68 bne 0x34f60 | goto label_1;
| }
0x00034e6c cmp r4, 0 |
0x00034e70 mov r5, r1 | r5 = r1;
| if (r4 == 0) {
0x00034e74 beq 0x34f1c | goto label_2;
| }
0x00034e78 ldrsb r1, [r4] | r1 = *(r4);
0x00034e7c cmp r1, 0x2f |
| if (r1 == 0x2f) {
0x00034e80 bne 0x34e98 |
0x00034e84 mov r0, r4 | r0 = r4;
0x00034e88 bl 0x5bc0 | r0 = strrchr (r0, r1);
0x00034e8c cmp r0, 0 |
| if (r0 == 0) {
0x00034e90 beq 0x34f14 | goto label_0;
| }
0x00034e94 add r4, r0, 1 | r4 = r0 + 1;
| }
0x00034e98 mov r0, r4 | r0 = r4;
0x00034e9c bl 0x6118 | strlen (r0);
0x00034ea0 add r5, r5, 0x13 | r5 += 0x13;
0x00034ea4 mov r6, r0 | r6 = r0;
0x00034ea8 mov r0, r5 | r0 = r5;
0x00034eac bl 0x6118 | r0 = strlen (r0);
0x00034eb0 cmp r6, r0 |
| if (r6 >= r0) {
0x00034eb4 bhs 0x34f60 | goto label_1;
| }
0x00034eb8 mov r2, r6 | r2 = r6;
0x00034ebc mov r1, r5 | r1 = r5;
0x00034ec0 mov r0, r4 | r0 = r4;
0x00034ec4 bl 0x5d34 | r0 = strncmp (r0, r1, r2);
0x00034ec8 cmp r0, 0 |
| if (r0 != 0) {
0x00034ecc bne 0x34f60 | goto label_1;
| }
0x00034ed0 ldr r3, [pc, 0x94] | r3 = *(0x34f68);
0x00034ed4 ldrsb r2, [r5, r6] | r2 = *((r5 + r6));
0x00034ed8 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00034edc cmp r2, 0x70 |
0x00034ee0 ldr r1, [r3] | r1 = *(0x34f68);
| if (r2 == 0x70) {
0x00034ee4 bne 0x34f04 |
0x00034ee8 add r5, r5, r6 | r5 += r6;
0x00034eec ldrsb r3, [r5, 1] | r3 = *((r5 + 1));
0x00034ef0 lsl r3, r3, 1 | r3 <<= 1;
0x00034ef4 ldrh r3, [r1, r3] | r3 = *((r1 + r3));
0x00034ef8 tst r3, 8 |
| if ((r3 & 8) == 0) {
0x00034efc movne r0, 1 | r0 = 1;
| }
| if ((r3 & 8) != 0) {
0x00034f00 bne 0x34f14 | goto label_0;
| }
| }
0x00034f04 lsl r2, r2, 1 | r2 <<= 1;
0x00034f08 ldrh r0, [r1, r2] | r0 = *((r1 + r2));
0x00034f0c lsr r0, r0, 3 | r0 >>= 3;
0x00034f10 and r0, r0, 1 | r0 &= 1;
| do {
| label_0:
0x00034f14 add sp, sp, 0x10c |
0x00034f18 pop {r4, r5, r6, r7, pc} |
| label_2:
0x00034f1c ldr r2, [pc, 0x4c] | r2 = *(0x34f6c);
0x00034f20 mov r5, sp | r5 = sp;
0x00034f24 add r3, r1, 0x13 | r3 = r1 + 0x13;
0x00034f28 add r2, pc, r2 | r2 = pc + r2;
0x00034f2c ldr r1, [pc, 0x40] | r1 = *(0x34f70);
0x00034f30 mov r6, r0 | r6 = r0;
0x00034f34 mov r0, r5 | r0 = r5;
0x00034f38 bl 0x5830 | snprintf (r0, r1, r2, r3)
0x00034f3c mov r0, r6 | r0 = r6;
0x00034f40 bl 0x5d28 | dirfd ();
0x00034f44 mov r3, r4 | r3 = r4;
0x00034f48 mov r2, 4 | r2 = 4;
0x00034f4c mov r1, r5 | r1 = r5;
0x00034f50 bl 0x5848 | r0 = faccessat ();
0x00034f54 clz r0, r0 | r0 &= r0;
0x00034f58 lsr r0, r0, 5 | r0 >>= 5;
0x00034f5c b 0x34f14 |
| } while (1);
| label_1:
0x00034f60 mov r0, 0 | r0 = 0;
0x00034f64 b 0x34f14 | 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/lib/libblkid.so.1.1.0 @ 0x35648 */
| #include <stdint.h>
|
; (fcn) fcn.00035648 () | void fcn_00035648 (int32_t arg_30h, 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_14h;
| int32_t var_18h;
| r0 = arg1;
| r1 = arg2;
0x00035648 push {r4, r5, r6, r7, r8, lr} |
0x0003564c mov r5, r3 | r5 = r3;
0x00035650 sub sp, sp, 0x18 |
0x00035654 mov r3, 0 | r3 = 0;
0x00035658 mov r6, r1 | r6 = r1;
0x0003565c mov r4, r2 | r4 = r2;
0x00035660 str r3, [sp] | *(sp) = r3;
0x00035664 mov r2, r3 | r2 = r3;
0x00035668 add r1, sp, 0x14 | r1 += var_14h;
0x0003566c mov r8, r0 | r8 = r0;
0x00035670 ldr r7, [sp, 0x30] | r7 = *(arg_30h);
0x00035674 bl 0x35518 | r0 = fcn_00035518 (r0, r1);
0x00035678 cmp r0, 0 |
| if (r0 != 0) {
0x0003567c bne 0x356e4 | goto label_0;
| }
0x00035680 mov r0, r8 | r0 = r8;
0x00035684 bl 0x3295c | r0 = fcn_0003295c (r0);
0x00035688 subs r3, r0, 0 | r3 = r0 - 0;
| if (r3 != r0) {
0x0003568c ldreq r3, [pc, 0x8c] | r3 = *((pc + 0x8c));
| }
| if (r3 != r0) {
0x00035690 addeq r3, pc, r3 | r3 = pc + r3;
| }
0x00035694 cmp r7, 0 |
0x00035698 ldr r2, [sp, 0x14] | r2 = var_14h;
| if (r7 == 0) {
0x0003569c beq 0x356f4 | goto label_1;
| }
0x000356a0 str r2, [sp, 8] | var_8h = r2;
0x000356a4 ldr r2, [pc, 0x78] | r2 = *(0x35720);
0x000356a8 str r7, [sp, 0xc] | var_ch = r7;
0x000356ac add r2, pc, r2 | r2 = pc + r2;
0x000356b0 str r2, [sp] | *(sp) = r2;
0x000356b4 ldr r2, [pc, 0x6c] | r2 = *(0x35724);
0x000356b8 str r6, [sp, 4] | var_4h = r6;
0x000356bc add r2, pc, r2 | r2 = pc + r2;
0x000356c0 mov r1, r5 | r1 = r5;
0x000356c4 mov r0, r4 | r0 = r4;
0x000356c8 bl 0x5830 | r0 = snprintf (r0, r1, r2, r3)
| do {
0x000356cc cmp r0, r5 |
0x000356d0 mvn r3, r0 | r3 = ~r0;
0x000356d4 lsr r3, r3, 0x1f | r3 >>= 0x1f;
| if (r0 < r5) {
0x000356d8 movhs r3, 0 | r3 = 0;
| }
0x000356dc cmp r3, 0 |
| if (r3 == 0) {
0x000356e0 bne 0x356e8 |
| label_0:
0x000356e4 mov r4, 0 | r4 = 0;
| }
0x000356e8 mov r0, r4 | r0 = r4;
0x000356ec add sp, sp, 0x18 |
0x000356f0 pop {r4, r5, r6, r7, r8, pc} |
| label_1:
0x000356f4 str r2, [sp, 8] | var_8h = r2;
0x000356f8 ldr r2, [pc, 0x2c] | r2 = *(0x35728);
0x000356fc str r6, [sp, 4] | var_4h = r6;
0x00035700 add r2, pc, r2 | r2 = pc + r2;
0x00035704 str r2, [sp] | *(sp) = r2;
0x00035708 ldr r2, [pc, 0x20] | r2 = *(0x3572c);
0x0003570c mov r1, r5 | r1 = r5;
0x00035710 add r2, pc, r2 | r2 = pc + r2;
0x00035714 mov r0, r4 | r0 = r4;
0x00035718 bl 0x5830 | snprintf (r0, r1, r2, r3)
0x0003571c b 0x356cc |
| } 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/lib/libblkid.so.1.1.0 @ 0x35734 */
| #include <stdint.h>
|
; (fcn) fcn.00035734 () | void fcn_00035734 (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_1ch;
| int32_t var_20h;
| int32_t var_24h;
| int32_t var_28h;
| r0 = arg1;
| r1 = arg2;
0x00035734 push {r4, r5, r6, lr} |
0x00035738 sub sp, sp, 0x28 |
0x0003573c add r3, sp, 0x24 | r3 += var_24h;
0x00035740 str r3, [sp] | *(sp) = r3;
0x00035744 mov r4, r1 | r4 = r1;
0x00035748 mov r5, r2 | r5 = r2;
0x0003574c add r3, sp, 0x20 | r3 += var_20h;
0x00035750 add r2, sp, 0x1c | r2 += var_1ch;
0x00035754 add r1, sp, 0x18 | r1 += var_18h;
0x00035758 mov r6, r0 | r6 = r0;
0x0003575c bl 0x35518 | r0 = fcn_00035518 (r0, r1);
0x00035760 cmp r0, 0 |
| if (r0 != 0) {
0x00035764 bne 0x357d0 | goto label_0;
| }
0x00035768 mov r0, r6 | r0 = r6;
0x0003576c bl 0x3295c | r0 = fcn_0003295c (r0);
0x00035770 subs r3, r0, 0 | r3 = r0 - 0;
| if (r3 != r0) {
0x00035774 ldreq r3, [pc, 0x98] | r3 = *((pc + 0x98));
| }
| if (r3 != r0) {
0x00035778 addeq r3, pc, r3 | r3 = pc + r3;
| }
0x0003577c cmp r5, 0 |
0x00035780 ldr r2, [sp, 0x18] | r2 = var_18h;
0x00035784 ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x00035788 ldr r0, [sp, 0x20] | r0 = var_20h;
0x0003578c ldr ip, [sp, 0x24] | ip = var_24h;
| if (r5 == 0) {
0x00035790 beq 0x357e0 | goto label_1;
| }
0x00035794 str r2, [sp, 4] | var_4h = r2;
0x00035798 ldr r2, [pc, 0x78] | r2 = *(0x35814);
0x0003579c str r0, [sp, 0xc] | var_ch = r0;
0x000357a0 add r2, pc, r2 | r2 = pc + r2;
0x000357a4 str r2, [sp] | *(sp) = r2;
0x000357a8 ldr r2, [pc, 0x6c] | r2 = *(0x35818);
0x000357ac str r1, [sp, 8] | var_8h = r1;
0x000357b0 str r5, [sp, 0x14] | var_14h = r5;
0x000357b4 str ip, [sp, 0x10] | var_10h = ip;
0x000357b8 add r2, pc, r2 | r2 = pc + r2;
0x000357bc mov r1, 0x1000 | r1 = 0x1000;
0x000357c0 mov r0, r4 | r0 = r4;
0x000357c4 bl 0x5830 | r0 = snprintf (r0, r1, r2, r3)
| do {
0x000357c8 cmp r0, 0x1000 |
| if (r0 > 0x1000) {
0x000357cc blo 0x357d4 |
| label_0:
0x000357d0 mov r4, 0 | r4 = 0;
| }
0x000357d4 mov r0, r4 | r0 = r4;
0x000357d8 add sp, sp, 0x28 |
0x000357dc pop {r4, r5, r6, pc} |
| label_1:
0x000357e0 str r2, [sp, 4] | var_4h = r2;
0x000357e4 ldr r2, [pc, 0x34] | r2 = *(0x3581c);
0x000357e8 str r0, [sp, 0xc] | var_ch = r0;
0x000357ec add r2, pc, r2 | r2 = pc + r2;
0x000357f0 str r2, [sp] | *(sp) = r2;
0x000357f4 ldr r2, [pc, 0x28] | r2 = *(0x35820);
0x000357f8 str r1, [sp, 8] | var_8h = r1;
0x000357fc str ip, [sp, 0x10] | var_10h = ip;
0x00035800 add r2, pc, r2 | r2 = pc + r2;
0x00035804 mov r1, 0x1000 | r1 = 0x1000;
0x00035808 mov r0, r4 | r0 = r4;
0x0003580c bl 0x5830 | snprintf (r0, r1, r2, r3)
0x00035810 b 0x357c8 |
| } 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/lib/libblkid.so.1.1.0 @ 0x35a08 */
| #include <stdint.h>
|
; (fcn) fcn.00035a08 () | void fcn_00035a08 (int32_t arg1, char * arg2) {
| int32_t var_0h;
| char * s;
| r0 = arg1;
| r1 = arg2;
0x00035a08 push {r4, r5, r6, r7, r8, sb, lr} |
0x00035a0c subs r8, r0, 0 | r8 = r0 - 0;
0x00035a10 sub sp, sp, 0x1000 |
0x00035a14 sub sp, sp, 0xc |
0x00035a18 mov r4, r1 | r4 = r1;
0x00035a1c mov r5, r2 | r5 = r2;
| if (r8 != r0) {
0x00035a20 ldreq r8, [pc, 0x18c] | r8 = *((pc + 0x18c));
| }
| if (r8 != r0) {
0x00035a24 addeq r8, pc, r8 | r8 = pc + r8;
| }
0x00035a28 cmp r4, 0 |
| if (r4 == 0) {
0x00035a2c bne 0x35a50 |
0x00035a30 ldr r3, [pc, 0x180] | r3 = *(0x35bb4);
0x00035a34 ldr r1, [pc, 0x180] | r1 = *(0x35bb8);
0x00035a38 ldr r0, [pc, 0x180] | r0 = *(0x35bbc);
0x00035a3c add r3, pc, r3 | r3 = pc + r3;
0x00035a40 ldr r2, [pc, 0x17c] | r2 = *(0x35bc0);
0x00035a44 add r1, pc, r1 | r1 = pc + r1;
0x00035a48 add r0, pc, r0 | r0 = pc + r0;
0x00035a4c bl 0x6130 | assert ();
| }
0x00035a50 ldr r0, [pc, 0x170] | r0 = *(0x35bc4);
0x00035a54 mov r2, 5 | r2 = 5;
0x00035a58 mov r1, r4 | r1 = r4;
0x00035a5c add r0, pc, r0 | r0 = pc + r0;
0x00035a60 bl 0x5d34 | r0 = strncmp (r0, r1, r2);
0x00035a64 cmp r0, 0 |
| if (r0 != 0) {
0x00035a68 bne 0x35aa8 | goto label_2;
| }
0x00035a6c add r7, sp, 8 | r7 += s;
0x00035a70 mov r0, r4 | r0 = r4;
0x00035a74 mov r1, r7 | r1 = r7;
0x00035a78 bl 0x5800 | r0 = stat64 ();
0x00035a7c subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x00035a80 addne r4, r4, 5 | r4 += 5;
| }
| if (r6 != r0) {
0x00035a84 bne 0x35aa8 | goto label_2;
| }
0x00035a88 ldrd r4, r5, [r7, 0x20] | __asm ("ldrd r4, r5, [r7, 0x20]");
| do {
| label_1:
0x00035a8c mov r0, r6 | r0 = r6;
0x00035a90 bl 0x6220 | free (r0);
0x00035a94 mov r0, r4 | r0 = r4;
0x00035a98 mov r1, r5 | r1 = r5;
0x00035a9c add sp, sp, 0x1000 |
0x00035aa0 add sp, sp, 0xc |
0x00035aa4 pop {r4, r5, r6, r7, r8, sb, pc} |
| label_2:
0x00035aa8 mov r0, r4 | r0 = r4;
0x00035aac bl 0x5e48 | r0 = strdup (r0);
0x00035ab0 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 != r0) {
0x00035ab4 beq 0x35b2c |
0x00035ab8 bl 0x34890 | fcn_00034890 (r0);
0x00035abc cmp r5, 0 |
| if (r5 == 0) {
0x00035ac0 beq 0x35b38 | goto label_3;
| }
0x00035ac4 ldr r0, [pc, 0x100] | r0 = *(0x35bc8);
0x00035ac8 mov r2, 3 | r2 = 3;
0x00035acc mov r1, r4 | r1 = r4;
0x00035ad0 add r0, pc, r0 | r0 = pc + r0;
0x00035ad4 bl 0x5d34 | r0 = strncmp (r0, r1, r2);
0x00035ad8 cmp r0, 0 |
| if (r0 == 0) {
0x00035adc beq 0x35b38 | goto label_3;
| }
0x00035ae0 mov r0, r5 | r0 = r5;
0x00035ae4 bl 0x5e48 | r0 = strdup (r0);
0x00035ae8 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00035aec beq 0x35b2c | goto label_0;
| }
0x00035af0 bl 0x34890 | fcn_00034890 (r0);
0x00035af4 ldr r2, [pc, 0xd4] | r2 = *(0x35bcc);
0x00035af8 add r4, sp, 8 | r4 += s;
0x00035afc mov r3, r8 | r3 = r8;
0x00035b00 add r2, pc, r2 | r2 = pc + r2;
0x00035b04 mov r1, 0x1000 | r1 = 0x1000;
0x00035b08 stm sp, {r5, r6} | *(sp) = r5;
| *((sp + 4)) = r6;
0x00035b0c mov r0, r4 | r0 = r4;
0x00035b10 bl 0x5830 | r0 = snprintf (r0, r1, r2, r3)
0x00035b14 mov r7, r0 | r7 = r0;
0x00035b18 mov r0, r5 | r0 = r5;
0x00035b1c bl 0x6220 | free (r0);
0x00035b20 cmp r7, 0x1000 |
| if (r7 >= 0x1000) {
0x00035b24 movlo r0, r4 | r0 = r4;
| }
| if (r7 <= 0x1000) {
0x00035b28 blo 0x35ba4 | goto label_4;
| }
| }
| label_0:
0x00035b2c mov r4, 0 | r4 = 0;
0x00035b30 mov r5, 0 | r5 = 0;
0x00035b34 b 0x35a8c |
| } while (1);
| label_3:
0x00035b38 ldr r2, [pc, 0x94] | r2 = *(0x35bd0);
0x00035b3c add r7, sp, 8 | r7 += s;
0x00035b40 str r6, [sp] | *(sp) = r6;
0x00035b44 mov r3, r8 | r3 = r8;
0x00035b48 add r2, pc, r2 | r2 = pc + r2;
0x00035b4c mov r1, 0x1000 | r1 = 0x1000;
0x00035b50 mov r0, r7 | r0 = r7;
0x00035b54 bl 0x5830 | snprintf (r0, r1, r2, r3)
0x00035b58 ldr sb, [pc, 0x78] | sb = *(0x35bd4);
0x00035b5c cmp r0, sb |
| if (r0 > sb) {
0x00035b60 bhi 0x35b2c | goto label_0;
| }
0x00035b64 mov r0, r7 | r0 = r7;
0x00035b68 bl 0x346f4 | r0 = fcn_000346f4 ();
0x00035b6c mov r4, r0 | r4 = r0;
0x00035b70 mov r5, r1 | r5 = r1;
0x00035b74 orrs r3, r4, r5 | r3 = r4 | r5;
| if (r3 != r4) {
0x00035b78 bne 0x35a8c | goto label_1;
| }
0x00035b7c ldr r2, [pc, 0x58] | r2 = *(0x35bd8);
0x00035b80 str r6, [sp] | *(sp) = r6;
0x00035b84 mov r3, r8 | r3 = r8;
0x00035b88 add r2, pc, r2 | r2 = pc + r2;
0x00035b8c mov r1, 0x1000 | r1 = 0x1000;
0x00035b90 mov r0, r7 | r0 = r7;
0x00035b94 bl 0x5830 | r0 = snprintf (r0, r1, r2, r3)
0x00035b98 cmp r0, sb |
| if (r0 > sb) {
0x00035b9c bhi 0x35a8c | goto label_1;
| }
0x00035ba0 mov r0, r7 | r0 = r7;
| label_4:
0x00035ba4 bl 0x346f4 | r0 = fcn_000346f4 ();
0x00035ba8 mov r4, r0 | r4 = r0;
0x00035bac mov r5, r1 | r5 = r1;
0x00035bb0 b 0x35a8c | 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/lib/libblkid.so.1.1.0 @ 0xa5e8 */
| #include <stdint.h>
|
; (fcn) sym.blkid_send_uevent () | void blkid_send_uevent (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_8h;
| int32_t var_58h;
| int32_t var_48h;
| int32_t var_48h_2;
| char * stream;
| int32_t var_1040h;
| int32_t var_34h;
| r0 = arg1;
| r1 = arg2;
0x0000a5e8 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0000a5ec ldr r6, [pc, 0x248] | r6 = *(0xa838);
0x0000a5f0 ldr r3, [pc, 0x248] | r3 = *(0xa83c);
0x0000a5f4 add r6, pc, r6 | r6 = pc + r6;
0x0000a5f8 ldr r8, [r6, r3] | r8 = *(0xa838);
0x0000a5fc sub sp, sp, 0x1040 |
0x0000a600 ldr r3, [r8] | r3 = *(0xa838);
0x0000a604 sub sp, sp, 0x34 |
0x0000a608 tst r3, 0x80 |
0x0000a60c mov r4, r0 | r4 = r0;
0x0000a610 mov sb, r1 | sb = r1;
| if ((r3 & 0x80) != 0) {
0x0000a614 beq 0xa664 |
0x0000a618 ldr r3, [pc, 0x224] | r3 = *(0xa840);
0x0000a61c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0000a620 ldr r5, [r3] | r5 = *(0xa840);
0x0000a624 bl 0x58fc | getpid ();
0x0000a628 ldr r3, [pc, 0x218] | r3 = *(0xa844);
0x0000a62c ldr r1, [pc, 0x218] | r1 = *(0xa848);
0x0000a630 add r3, pc, r3 | r3 = pc + r3;
0x0000a634 str r3, [sp] | *(sp) = r3;
0x0000a638 ldr r3, [pc, 0x210] | r3 = *(0xa84c);
0x0000a63c add r1, pc, r1 | r1 = pc + r1;
0x0000a640 add r3, pc, r3 | r3 = pc + r3;
0x0000a644 mov r2, r0 | r2 = r0;
0x0000a648 mov r0, r5 | r0 = r5;
0x0000a64c bl 0x5c50 | fprintf (r0, r1, r2, r3)
0x0000a650 ldr r0, [pc, 0x1fc] | r0 = *(0xa850);
0x0000a654 mov r2, sb | r2 = sb;
0x0000a658 mov r1, r4 | r1 = r4;
0x0000a65c add r0, pc, r0 | r0 = pc + r0;
0x0000a660 bl 0xa288 | fcn_0000a288 ();
| }
0x0000a664 cmp sb, 0 |
0x0000a668 cmpne r4, 0 | __asm ("cmpne r4, 0");
0x0000a66c bne 0xa684 |
| while (r5 != r0) {
| label_0:
0x0000a670 mvn r5, 0 | r5 = ~0;
| label_1:
0x0000a674 mov r0, r5 | r0 = r5;
0x0000a678 add sp, sp, 0x1040 |
0x0000a67c add sp, sp, 0x34 |
0x0000a680 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x0000a684 add r1, sp, 8 | r1 += var_8h;
0x0000a688 mov r0, r4 | r0 = r4;
0x0000a68c bl 0x5800 | r0 = stat64 ();
0x0000a690 subs r5, r0, 0 | r5 = r0 - 0;
0x0000a694 bne 0xa670 |
| }
0x0000a698 add r4, sp, 0x70 | r4 += stream;
0x0000a69c ldr r3, [r4, -0x58] | r3 = var_58h;
0x0000a6a0 and r3, r3, 0xf000 | r3 &= 0xf000;
0x0000a6a4 cmp r3, 0x6000 |
| if (r3 != 0x6000) {
0x0000a6a8 bne 0xa670 | goto label_0;
| }
0x0000a6ac ldrd sl, fp, [r4, -0x48] | __asm ("ldrd sl, fp, [var_48h]");
0x0000a6b0 mov r1, fp | r1 = fp;
0x0000a6b4 mov r0, sl | r0 = sl;
0x0000a6b8 bl 0x5944 | gnu_dev_major ();
0x0000a6bc mov r1, fp | r1 = fp;
0x0000a6c0 mov r7, r0 | r7 = r0;
0x0000a6c4 mov r0, sl | r0 = sl;
0x0000a6c8 bl 0x5af4 | gnu_dev_minor ();
0x0000a6cc ldr r2, [pc, 0x184] | r2 = *(0xa854);
0x0000a6d0 mov r3, r7 | r3 = r7;
0x0000a6d4 add r2, pc, r2 | r2 = pc + r2;
0x0000a6d8 mov r1, 0x1000 | r1 = 0x1000;
0x0000a6dc str r0, [sp] | *(sp) = r0;
0x0000a6e0 mov r0, r4 | r0 = r4;
0x0000a6e4 bl 0x5830 | snprintf (r0, r1, r2, r3)
0x0000a6e8 ldr r1, [pc, 0x16c] | r1 = *(0xa858);
0x0000a6ec mov r0, r4 | r0 = r4;
0x0000a6f0 add r1, pc, r1 | r1 = pc + r1;
0x0000a6f4 bl 0x6238 | fopen64 ();
0x0000a6f8 subs r7, r0, 0 | r7 -= stream;
| if (r7 != stream) {
0x0000a6fc mvneq r5, 0 | r5 = ~0;
| }
| if (r7 != stream) {
0x0000a700 beq 0xa758 |
0x0000a704 mov r1, r7 | r1 = r7;
0x0000a708 mov r0, sb | r0 = sb;
0x0000a70c bl 0x6154 | fputs (r0, r1);
0x0000a710 mov r0, r7 | r0 = r7;
0x0000a714 bl 0x5824 | r0 = fpending ();
0x0000a718 mov sb, r0 | sb = r0;
0x0000a71c mov r0, r7 | r0 = r7;
0x0000a720 bl 0x5cf8 | r0 = ferror (r0);
0x0000a724 mov sl, r0 | sl = r0;
0x0000a728 mov r0, r7 | r0 = r7;
0x0000a72c bl 0x5e90 | fclose (r0);
0x0000a730 cmp sl, 0 |
| if (sl != 0) {
0x0000a734 bne 0xa7c0 | goto label_4;
| }
0x0000a738 cmp r0, 0 |
| if (r0 == 0) {
0x0000a73c beq 0xa758 | goto label_2;
| }
0x0000a740 cmp sb, 0 |
| if (sb != 0) {
0x0000a744 bne 0xa7d8 | goto label_5;
| }
0x0000a748 bl 0x60ac | r0 = errno_location ();
0x0000a74c ldr r3, [r0] | r3 = *(r0);
0x0000a750 cmp r3, 9 |
| if (r3 != 9) {
0x0000a754 bne 0xa7d8 | goto label_5;
| }
| }
| label_2:
0x0000a758 ldr r3, [r8] | r3 = *(r8);
0x0000a75c tst r3, 0x80 |
| if ((r3 & 0x80) == 0) {
0x0000a760 beq 0xa674 | goto label_1;
| }
0x0000a764 ldr r3, [pc, 0xd8] | r3 = *(0xa840);
0x0000a768 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0000a76c ldr r6, [r3] | r6 = *(0xa840);
0x0000a770 bl 0x58fc | getpid ();
0x0000a774 ldr r3, [pc, 0xe4] | r3 = *(0xa85c);
0x0000a778 ldr r1, [pc, 0xe4] | r1 = *(0xa860);
0x0000a77c add r3, pc, r3 | r3 = pc + r3;
0x0000a780 str r3, [sp] | *(sp) = r3;
0x0000a784 ldr r3, [pc, 0xdc] | r3 = *(0xa864);
0x0000a788 add r1, pc, r1 | r1 = pc + r1;
0x0000a78c add r3, pc, r3 | r3 = pc + r3;
0x0000a790 mov r2, r0 | r2 = r0;
0x0000a794 mov r0, r6 | r0 = r6;
0x0000a798 bl 0x5c50 | fprintf (r0, r1, r2, r3)
0x0000a79c cmp r5, 0 |
| if (r5 == 0) {
0x0000a7a0 beq 0xa830 | goto label_6;
| }
0x0000a7a4 ldr r2, [pc, 0xc0] | r2 = *(0xa868);
0x0000a7a8 add r2, pc, r2 | r2 = pc + r2;
| label_3:
0x0000a7ac ldr r0, [pc, 0xbc] | r0 = *(0xa86c);
0x0000a7b0 mov r1, r4 | r1 = r4;
0x0000a7b4 add r0, pc, r0 | r0 = pc + r0;
0x0000a7b8 bl 0xa288 | fcn_0000a288 ();
0x0000a7bc b 0xa674 | goto label_1;
| label_4:
0x0000a7c0 cmp r0, 0 |
| if (r0 == 0) {
0x0000a7c4 bne 0xa7d8 |
0x0000a7c8 bl 0x60ac | r0 = errno_location ();
0x0000a7cc ldr r3, [r0] | r3 = *(r0);
0x0000a7d0 cmp r3, 0x20 |
| if (r3 != 0x20) {
0x0000a7d4 strne r5, [r0] | *(r0) = r5;
| goto label_5;
| }
| }
| label_5:
0x0000a7d8 ldr r3, [r8] | r3 = *(r8);
0x0000a7dc tst r3, 0x80 |
| if ((r3 & 0x80) == 0) {
0x0000a7e0 beq 0xa758 | goto label_2;
| }
0x0000a7e4 ldr r3, [pc, 0x58] | r3 = *(0xa840);
0x0000a7e8 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0000a7ec ldr r7, [r3] | r7 = *(0xa840);
0x0000a7f0 bl 0x58fc | getpid ();
0x0000a7f4 ldr r3, [pc, 0x78] | r3 = *(0xa870);
0x0000a7f8 ldr r1, [pc, 0x78] | r1 = *(0xa874);
0x0000a7fc add r3, pc, r3 | r3 = pc + r3;
0x0000a800 str r3, [sp] | *(sp) = r3;
0x0000a804 ldr r3, [pc, 0x70] | r3 = *(0xa878);
0x0000a808 add r1, pc, r1 | r1 = pc + r1;
0x0000a80c add r3, pc, r3 | r3 = pc + r3;
0x0000a810 mov r2, r0 | r2 = r0;
0x0000a814 mov r0, r7 | r0 = r7;
0x0000a818 bl 0x5c50 | fprintf (r0, r1, r2, r3)
0x0000a81c ldr r0, [pc, 0x5c] | r0 = *(0xa87c);
0x0000a820 mov r1, r4 | r1 = r4;
0x0000a824 add r0, pc, r0 | r0 = pc + r0;
0x0000a828 bl 0xa288 | fcn_0000a288 ();
0x0000a82c b 0xa758 | goto label_2;
| label_6:
0x0000a830 ldr r2, [pc, 0x4c] | r2 = *(0xa880);
0x0000a834 add r2, pc, r2 | r2 = pc + r2;
0x0000a838 b 0xa7ac | goto label_3;
| }
[*] Function printf used 36 times libblkid.so.1.1.0