[*] Binary protection state of libpaho-mqtt3c.so.1.3.9
Partial RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function strcpy tear down of libpaho-mqtt3c.so.1.3.9
; 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/lib/libpaho-mqtt3c.so.1.3.9 @ 0xe834 */
| #include <stdint.h>
|
; (fcn) fcn.0000e834 () | void fcn_0000e834 (int32_t arg1) {
| int32_t var_0h;
| int32_t var_8h;
| int32_t var_70h;
| r0 = arg1;
0x0000e834 ldr r3, [pc, 0x3f8] | r3 = *(0xec30);
0x0000e838 push {r4, r5, r6, r7, r8, lr} |
0x0000e83c ldr r4, [pc, 0x3f4] | r4 = *(0xec34);
0x0000e840 add r3, pc, r3 | r3 = pc + r3;
0x0000e844 ldr r6, [r3, 8] | r6 = *(0xec38);
0x0000e848 mov r3, 0x12c | r3 = 0x12c;
0x0000e84c sub sp, sp, 0x70 |
0x0000e850 mov r5, r0 | r5 = r0;
0x0000e854 mul r0, r6, r3 | r0 = r6 * r3;
0x0000e858 bl 0x2464 | malloc (r0);
0x0000e85c ldr r7, [pc, 0x3d8] | r7 = *(0xec38);
0x0000e860 add r4, pc, r4 | r4 = pc + r4;
0x0000e864 add r7, pc, r7 | r7 = pc + r7;
0x0000e868 cmp r0, 0 |
0x0000e86c str r0, [r4, 0x1c] | *((r4 + 0x1c)) = r0;
| if (r0 == 0) {
0x0000e870 beq 0xeabc | goto label_6;
| }
0x0000e874 ldr r0, [pc, 0x3c4] | r0 = *(0xec3c);
0x0000e878 str r6, [r4, 0x18] | *((r4 + 0x18)) = r6;
0x0000e87c add r0, pc, r0 | r0 = pc + r0;
0x0000e880 bl 0x23ec | r0 = getenv (r0);
0x0000e884 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x0000e888 beq 0xe8c4 | goto label_0;
| }
0x0000e88c ldrb r3, [r6] | r3 = *(r6);
0x0000e890 cmp r3, 0 |
| if (r3 == 0) {
0x0000e894 beq 0xe8c4 | goto label_0;
| }
0x0000e898 ldr r1, [pc, 0x3a4] | r1 = *(0xec40);
0x0000e89c add r1, pc, r1 | r1 = pc + r1;
0x0000e8a0 bl 0x26bc | r0 = strcmp (r0, r1);
0x0000e8a4 cmp r0, 0 |
0x0000e8a8 bne 0xea40 |
| while (r0 == 0) {
0x0000e8ac ldr r3, [pc, 0x394] | r3 = *(0xec44);
0x0000e8b0 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x0000e8b4 ldr r2, [r3] | r2 = *(0xec44);
0x0000e8b8 ldr r3, [pc, 0x38c] | r3 = *(0xec48);
0x0000e8bc add r3, pc, r3 | r3 = pc + r3;
0x0000e8c0 str r2, [r3] | *(r3) = r2;
| label_0:
0x0000e8c4 ldr r0, [pc, 0x384] | r0 = *(0xec4c);
0x0000e8c8 add r0, pc, r0 | r0 = pc + r0;
0x0000e8cc bl 0x23ec | r0 = getenv (r0);
0x0000e8d0 subs r3, r0, 0 | r3 = r0 - 0;
| if (r3 != r0) {
0x0000e8d4 beq 0xe8fc |
0x0000e8d8 ldrb r3, [r3] | r3 = *(r3);
0x0000e8dc cmp r3, 0 |
| if (r3 == 0) {
0x0000e8e0 beq 0xe8fc | goto label_1;
| }
0x0000e8e4 bl 0x27a0 | r0 = atoi (r0);
0x0000e8e8 cmp r0, 0 |
| if (r0 <= 0) {
0x0000e8ec ble 0xeaf4 | goto label_7;
| }
0x0000e8f0 ldr r3, [pc, 0x35c] | r3 = *(0xec50);
0x0000e8f4 add r3, pc, r3 | r3 = pc + r3;
0x0000e8f8 str r0, [r3] | *(r3) = r0;
| }
| label_1:
0x0000e8fc ldr r0, [pc, 0x354] | r0 = *(0xec54);
0x0000e900 add r0, pc, r0 | r0 = pc + r0;
0x0000e904 bl 0x23ec | r0 = getenv (r0);
0x0000e908 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x0000e90c beq 0xe958 |
0x0000e910 ldrb r3, [r4] | r3 = *(r4);
0x0000e914 cmp r3, 0 |
| if (r3 == 0) {
0x0000e918 beq 0xe958 | goto label_3;
| }
0x0000e91c ldr r1, [pc, 0x338] | r1 = *(0xec58);
0x0000e920 add r1, pc, r1 | r1 = pc + r1;
0x0000e924 bl 0x26bc | r0 = strcmp (r0, r1);
0x0000e928 cmp r0, 0 |
| if (r0 != 0) {
0x0000e92c beq 0xe948 |
0x0000e930 ldr r1, [pc, 0x328] | r1 = *(0xec5c);
0x0000e934 mov r0, r4 | r0 = r4;
0x0000e938 add r1, pc, r1 | r1 = pc + r1;
0x0000e93c bl 0x26bc | r0 = strcmp (r0, r1);
0x0000e940 cmp r0, 0 |
| if (r0 != 0) {
0x0000e944 bne 0xeb08 | goto label_8;
| }
| }
0x0000e948 ldr r3, [pc, 0x314] | r3 = *(0xec60);
0x0000e94c mov r2, 1 | r2 = 1;
0x0000e950 add r3, pc, r3 | r3 = pc + r3;
| label_2:
0x0000e954 str r2, [r3, 4] | *((r3 + 4)) = r2;
| }
| label_3:
0x0000e958 ldr r1, [pc, 0x308] | r1 = *(0xec64);
0x0000e95c mov r0, 3 | r0 = 3;
0x0000e960 add r1, pc, r1 | r1 = pc + r1;
0x0000e964 bl 0xe38c | fcn_0000e38c (r0, r1);
0x0000e968 ldr r1, [pc, 0x2fc] | r1 = *(0xec68);
0x0000e96c mov r0, 3 | r0 = 3;
0x0000e970 add r1, pc, r1 | r1 = pc + r1;
0x0000e974 bl 0xe38c | fcn_0000e38c (r0, r1);
0x0000e978 cmp r5, 0 |
| if (r5 != 0) {
0x0000e97c beq 0xe9a8 |
0x0000e980 add r4, r5, 8 | r4 = r5 + 8;
0x0000e984 ldr r5, [pc, 0x2e4] |
0x0000e988 ldr r6, [pc, 0x2e4] | r6 = *(0xec70);
0x0000e98c add r5, pc, r5 | r5 = pc + r5;
0x0000e990 add r6, pc, r6 | r6 = pc + r6;
0x0000e994 add r5, r5, 0x24 | r5 = 0xec90;
| label_5:
0x0000e998 add r4, r4, 8 | r4 += 8;
0x0000e99c ldr r3, [r4, -0x10] | r3 = *((r4 - 0x10));
0x0000e9a0 cmp r3, 0 |
| if (r3 != 0) {
0x0000e9a4 bne 0xec0c | goto label_9;
| }
| }
0x0000e9a8 ldr r4, [pc, 0x2c8] | r4 = *(0xec74);
0x0000e9ac add r1, sp, 8 | r1 += var_8h;
0x0000e9b0 add r4, pc, r4 | r4 = pc + r4;
0x0000e9b4 mov r0, r4 | r0 = r4;
0x0000e9b8 bl 0x23d4 | r0 = stat64 ();
0x0000e9bc cmn r0, 1 |
| if (r0 != 1) {
0x0000e9c0 beq 0xea2c |
0x0000e9c4 ldr r1, [pc, 0x2b0] | r1 = *(0xec78);
0x0000e9c8 mov r0, r4 | r0 = r4;
0x0000e9cc add r1, pc, r1 | r1 = pc + r1;
0x0000e9d0 bl 0x2878 | r0 = fopen64 ();
0x0000e9d4 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x0000e9d8 beq 0xea2c | goto label_10;
| }
0x0000e9dc ldr r4, [pc, 0x29c] |
0x0000e9e0 ldr r1, [pc, 0x29c] | r1 = *(0xec80);
0x0000e9e4 add r4, pc, r4 | r4 = pc + r4;
0x0000e9e8 add r4, r4, 0x24 | r4 = 0xeca0;
0x0000e9ec add r1, pc, r1 | r1 = pc + r1;
0x0000e9f0 mov r0, r4 | r0 = r4;
0x0000e9f4 bl 0x2338 | strcpy (r0, r1)
0x0000e9f8 mov r0, r4 | r0 = r4;
0x0000e9fc bl 0x27d0 | strlen (r0);
0x0000ea00 mov r2, r5 | r2 = r5;
0x0000ea04 rsb r1, r0, 0x200 | r1 = 0x200 - r0;
0x0000ea08 add r0, r4, r0 | r0 = r4 + r0;
0x0000ea0c bl 0x241c | r0 = fgets (r0, r1, r2);
0x0000ea10 cmp r0, 0 |
| if (r0 != 0) {
0x0000ea14 beq 0xea24 |
0x0000ea18 mov r1, r4 | r1 = r4;
0x0000ea1c mov r0, 3 | r0 = 3;
0x0000ea20 bl 0xe38c | fcn_0000e38c (r0, r1);
| }
0x0000ea24 mov r0, r5 | r0 = r5;
0x0000ea28 bl 0x2674 | fclose (r0);
| }
| label_10:
0x0000ea2c ldr r1, [pc, 0x254] | r1 = *(0xec84);
0x0000ea30 mov r0, 3 | r0 = 3;
0x0000ea34 add r1, pc, r1 | r1 = pc + r1;
0x0000ea38 bl 0xe38c | fcn_0000e38c (r0, r1);
0x0000ea3c b 0xeabc | goto label_6;
0x0000ea40 ldr r1, [pc, 0x244] | r1 = *(0xec88);
0x0000ea44 mov r0, r6 | r0 = r6;
0x0000ea48 add r1, pc, r1 | r1 = pc + r1;
0x0000ea4c bl 0x2878 | r0 = fopen64 ();
0x0000ea50 cmp r0, 0 |
0x0000ea54 str r0, [r4] | *(r4) = r0;
0x0000ea58 beq 0xe8ac |
| }
0x0000ea5c mov r0, r6 | r0 = r6;
0x0000ea60 bl 0x27d0 | r0 = strlen (r0);
0x0000ea64 add r0, r0, 1 | r0++;
0x0000ea68 bl 0x2464 | r0 = malloc (r0);
0x0000ea6c cmp r0, 0 |
0x0000ea70 mov r7, r0 | r7 = r0;
0x0000ea74 str r0, [r4, 0xc] | *((r4 + 0xc)) = r0;
| if (r0 != 0) {
0x0000ea78 ldreq r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
| }
| if (r0 != 0) {
0x0000ea7c beq 0xeab8 |
0x0000ea80 mov r1, r6 | r1 = r6;
0x0000ea84 bl 0x2338 | strcpy (r0, r1)
0x0000ea88 mov r0, r6 | r0 = r6;
0x0000ea8c bl 0x27d0 | r0 = strlen (r0);
0x0000ea90 add r6, r0, 3 | r6 = r0 + 3;
0x0000ea94 mov r8, r0 | r8 = r0;
0x0000ea98 mov r0, r6 | r0 = r6;
0x0000ea9c bl 0x2464 | r0 = malloc (r0);
0x0000eaa0 cmp r0, 0 |
0x0000eaa4 str r0, [r4, 8] | *((r4 + 8)) = r0;
| if (r0 != 0) {
0x0000eaa8 bne 0xeac8 | goto label_11;
| }
0x0000eaac ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
0x0000eab0 bl 0x2860 | free (r0);
0x0000eab4 mov r0, r7 | r0 = r7;
| }
0x0000eab8 bl 0x2860 | free (r0);
| label_6:
0x0000eabc mvn r0, 0 | r0 = ~0;
0x0000eac0 add sp, sp, 0x70 |
0x0000eac4 pop {r4, r5, r6, r7, r8, pc} |
| label_11:
0x0000eac8 ldr r2, [pc, 0x1c0] | r2 = *(0xec8c);
0x0000eacc mov r3, r7 | r3 = r7;
0x0000ead0 add r2, pc, r2 | r2 = pc + r2;
0x0000ead4 mov r1, r6 | r1 = r6;
0x0000ead8 bl 0x23e0 | r0 = snprintf (r0, r1, r2, r3);
0x0000eadc cmp r0, r6 |
| if (r0 < r6) {
0x0000eae0 ldrhs r0, [r4, 8] | r0 = *((r4 + 8));
| }
| if (r0 < r6) {
0x0000eae4 movhs r3, 0 | r3 = 0;
| }
| if (r0 < r6) {
0x0000eae8 addhs r0, r0, r8 | r0 += r8;
| }
| if (r0 < r6) {
0x0000eaec strbhs r3, [r0, 2] | *((r0 + 2)) = r3;
| }
0x0000eaf0 b 0xe8c4 | goto label_0;
| label_7:
0x0000eaf4 ldr r3, [pc, 0x198] | r3 = *(0xec90);
0x0000eaf8 mov r2, 0x3e8 | r2 = 0x3e8;
0x0000eafc add r3, pc, r3 | r3 = pc + r3;
0x0000eb00 str r2, [r3] | *(r3) = r2;
0x0000eb04 b 0xe8fc | goto label_1;
| label_8:
0x0000eb08 ldr r1, [pc, 0x188] | r1 = *(0xec94);
0x0000eb0c mov r0, r4 | r0 = r4;
0x0000eb10 add r1, pc, r1 | r1 = pc + r1;
0x0000eb14 bl 0x26bc | r0 = strcmp (r0, r1);
0x0000eb18 cmp r0, 0 |
| if (r0 != 0) {
0x0000eb1c beq 0xeb38 |
0x0000eb20 ldr r1, [pc, 0x174] | r1 = *(0xec98);
0x0000eb24 mov r0, r4 | r0 = r4;
0x0000eb28 add r1, pc, r1 | r1 = pc + r1;
0x0000eb2c bl 0x26bc | r0 = strcmp (r0, r1);
0x0000eb30 cmp r0, 0 |
| if (r0 != 0) {
0x0000eb34 bne 0xeb48 | goto label_12;
| }
| }
0x0000eb38 ldr r3, [pc, 0x160] | r3 = *(0xec9c);
0x0000eb3c mov r2, 2 | r2 = 2;
0x0000eb40 add r3, pc, r3 | r3 = pc + r3;
0x0000eb44 b 0xe954 | goto label_2;
| label_12:
0x0000eb48 ldr r1, [pc, 0x154] | r1 = *(0xeca0);
0x0000eb4c mov r0, r4 | r0 = r4;
0x0000eb50 add r1, pc, r1 | r1 = pc + r1;
0x0000eb54 bl 0x26bc | r0 = strcmp (r0, r1);
0x0000eb58 cmp r0, 0 |
| if (r0 != 0) {
0x0000eb5c beq 0xeb78 |
0x0000eb60 ldr r1, [pc, 0x140] | r1 = *(0xeca4);
0x0000eb64 mov r0, r4 | r0 = r4;
0x0000eb68 add r1, pc, r1 | r1 = pc + r1;
0x0000eb6c bl 0x26bc | r0 = strcmp (r0, r1);
0x0000eb70 cmp r0, 0 |
| if (r0 != 0) {
0x0000eb74 bne 0xeb88 | goto label_13;
| }
| }
0x0000eb78 ldr r3, [pc, 0x12c] | r3 = *(0xeca8);
0x0000eb7c mov r2, 3 | r2 = 3;
0x0000eb80 add r3, pc, r3 | r3 = pc + r3;
0x0000eb84 b 0xe954 | goto label_2;
| label_13:
0x0000eb88 ldr r1, [pc, 0x120] | r1 = *(0xecac);
0x0000eb8c mov r0, r4 | r0 = r4;
0x0000eb90 add r1, pc, r1 | r1 = pc + r1;
0x0000eb94 bl 0x26bc | r0 = strcmp (r0, r1);
0x0000eb98 cmp r0, 0 |
| if (r0 != 0) {
0x0000eb9c beq 0xebb8 |
0x0000eba0 ldr r1, [pc, 0x10c] | r1 = *(0xecb0);
0x0000eba4 mov r0, r4 | r0 = r4;
0x0000eba8 add r1, pc, r1 | r1 = pc + r1;
0x0000ebac bl 0x26bc | r0 = strcmp (r0, r1);
0x0000ebb0 cmp r0, 0 |
| if (r0 != 0) {
0x0000ebb4 bne 0xebcc | goto label_14;
| }
| }
0x0000ebb8 ldr r3, [pc, 0xf8] | r3 = *(0xecb4);
0x0000ebbc mov r2, 4 | r2 = 4;
0x0000ebc0 add r3, pc, r3 | r3 = pc + r3;
| label_4:
0x0000ebc4 str r2, [r3, 0x14] | *((r3 + 0x14)) = r2;
0x0000ebc8 b 0xe958 | goto label_3;
| label_14:
0x0000ebcc ldr r1, [pc, 0xe8] | r1 = *(0xecb8);
0x0000ebd0 mov r0, r4 | r0 = r4;
0x0000ebd4 add r1, pc, r1 | r1 = pc + r1;
0x0000ebd8 bl 0x26bc | r0 = strcmp (r0, r1);
0x0000ebdc cmp r0, 0 |
| if (r0 == 0) {
0x0000ebe0 beq 0xebfc | goto label_15;
| }
0x0000ebe4 ldr r1, [pc, 0xd4] | r1 = *(0xecbc);
0x0000ebe8 mov r0, r4 | r0 = r4;
0x0000ebec add r1, pc, r1 | r1 = pc + r1;
0x0000ebf0 bl 0x26bc | r0 = strcmp (r0, r1);
0x0000ebf4 cmp r0, 0 |
| if (r0 != 0) {
0x0000ebf8 bne 0xe958 | goto label_3;
| }
| label_15:
0x0000ebfc ldr r3, [pc, 0xc0] | r3 = *(0xecc0);
0x0000ec00 mov r2, 5 | r2 = 5;
0x0000ec04 add r3, pc, r3 | r3 = pc + r3;
0x0000ec08 b 0xebc4 | goto label_4;
| label_9:
0x0000ec0c ldr r2, [r4, -0xc] | r2 = *((r4 - 0xc));
0x0000ec10 mov r1, 0x200 | r1 = 0x200;
0x0000ec14 str r2, [sp] | *(sp) = r2;
0x0000ec18 mov r0, r5 | r0 = r5;
0x0000ec1c mov r2, r6 | r2 = r6;
0x0000ec20 bl 0x23e0 | snprintf (r0, r1, r2, r3);
0x0000ec24 mov r1, r5 | r1 = r5;
0x0000ec28 mov r0, 3 | r0 = 3;
0x0000ec2c bl 0xe38c | fcn_0000e38c (r0, r1);
0x0000ec30 b 0xe998 | goto label_5;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/lib/libpaho-mqtt3c.so.1.3.9 @ 0xef04 */
| #include <stdint.h>
|
; (fcn) fcn.0000ef04 () | void fcn_0000ef04 (int32_t arg_30h, int32_t arg_34h, int32_t arg_38h, uint32_t arg1, int32_t arg2) {
| char * src;
| int32_t var_4h;
| int32_t var_ch;
| r0 = arg1;
| r1 = arg2;
0x0000ef04 push {r0, r1, r2, r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0000ef08 ldr sl, [pc, 0xe4] | sl = *(0x0000eff4);
0x0000ef0c mov r7, r3 | r7 = r3;
0x0000ef10 ldr r3, [sp, 0x30] | r3 = *(arg_30h);
0x0000ef14 add sl, pc, sl | sl = pc + sl;
0x0000ef18 ldr ip, [sl, 0x1c] | ip = *((sl + 0x1c));
0x0000ef1c str r3, [sp] | *(sp) = r3;
0x0000ef20 ldr r3, [pc, 0xd0] | r3 = *(0xeff4);
0x0000ef24 cmp ip, 0 |
0x0000ef28 add r3, pc, r3 | r3 = pc + r3;
0x0000ef2c ldr fp, [sp, 0x34] | fp = *(arg_34h);
0x0000ef30 ldr r6, [sp, 0x38] | r6 = *(arg_38h);
| if (ip != 0) {
0x0000ef34 beq 0xefec |
0x0000ef38 ldr ip, [pc, 0xbc] | ip = *(0x0000effc);
0x0000ef3c add ip, pc, ip |
0x0000ef40 ldr ip, [ip, 4] | ip = *((ip + 4));
0x0000ef44 cmp ip, r0 |
| if (ip > r0) {
0x0000ef48 bgt 0xefec | goto label_0;
| }
0x0000ef4c mov r5, r0 | r5 = r0;
0x0000ef50 add r0, sl, 0x224 | r0 = sl + 0x224;
0x0000ef54 mov r8, r2 | r8 = r2;
0x0000ef58 mov sb, r1 | sb = r1;
0x0000ef5c str r3, [sp, 4] | var_4h = r3;
0x0000ef60 bl 0x26b0 | fcn_000026b0 ();
0x0000ef64 bl 0xe498 | fcn_0000e498 ();
0x0000ef68 ldr r3, [sp, 4] | r3 = var_4h;
0x0000ef6c ldr r2, [pc, 0x8c] | r2 = *(0xeffc);
0x0000ef70 ldr r3, [r3, r2] | r3 = *((r3 + r2));
0x0000ef74 mov r2, 8 | r2 = 8;
0x0000ef78 mov r1, r3 | r1 = r3;
0x0000ef7c str r3, [sp, 4] | var_4h = r3;
0x0000ef80 mov r4, r0 | r4 = r0;
0x0000ef84 bl 0x2434 | memcpy (r0, r1, r2);
0x0000ef88 ldr r3, [sl, 0x14] | r3 = *((sl + 0x14));
0x0000ef8c ldr r1, [sp] | r1 = *(sp);
0x0000ef90 str r3, [r4, 8] | *((r4 + 8)) = r3;
0x0000ef94 str sb, [r4, 0xc] | *((r4 + 0xc)) = sb;
0x0000ef98 str r8, [r4, 0x10] | *((r4 + 0x10)) = r8;
0x0000ef9c str r7, [r4, 0x14] | *((r4 + 0x14)) = r7;
0x0000efa0 add r0, r4, 0x18 | r0 = r4 + 0x18;
0x0000efa4 bl 0x2338 | strcpy (r0, r1)
0x0000efa8 cmp r6, 0 |
| if (r6 == 0) {
0x0000efac movne r3, 1 | r3 = 1;
| }
0x0000efb0 str fp, [r4, 0x11c] | *((r4 + 0x11c)) = fp;
0x0000efb4 mov r0, r5 | r0 = r5;
0x0000efb8 str r5, [r4, 0x128] | *((r4 + 0x128)) = r5;
| if (r6 != 0) {
0x0000efbc streq r6, [r4, 0x120] | *((r4 + 0x120)) = r6;
| }
0x0000efc0 mov r1, r4 | r1 = r4;
| if (r6 == 0) {
0x0000efc4 strne r3, [r4, 0x120] | *((r4 + 0x120)) = r3;
| }
| if (r6 == 0) {
0x0000efc8 ldrne r3, [r6] | r3 = *(r6);
| }
| if (r6 == 0) {
0x0000efcc strne r3, [r4, 0x124] | *((r4 + 0x124)) = r3;
| }
0x0000efd0 bl 0xe67c | fcn_0000e67c (r0, r1);
0x0000efd4 ldr r0, [pc, 0x28] |
0x0000efd8 add r0, pc, r0 | r0 = pc + r0;
0x0000efdc add r0, r0, 0x224 | r0 = 0xf224;
0x0000efe0 add sp, sp, 0xc |
0x0000efe4 pop {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0000efe8 b 0x27dc | void (*0x27dc)() ();
| }
| label_0:
0x0000efec add sp, sp, 0xc |
0x0000eff0 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/lib/libpaho-mqtt3c.so.1.3.9 @ 0xf008 */
| #include <stdint.h>
|
; (fcn) fcn.0000f008 () | void fcn_0000f008 (int32_t arg1, int32_t arg2) {
| int32_t var_4h;
| int32_t var_8h;
| r0 = arg1;
| r1 = arg2;
0x0000f008 push {r0, r1, r4, r5, r6, r7, r8, lr} |
0x0000f00c ldr r6, [pc, 0x1d4] | r6 = *(0xf1e4);
0x0000f010 mov r8, r0 | r8 = r0;
0x0000f014 ldr r0, [pc, 0x1d0] | r0 = *(0xf1e8);
0x0000f018 mov r7, r1 | r7 = r1;
0x0000f01c mov r4, r2 | r4 = r2;
0x0000f020 mov r5, 0 | r5 = 0;
0x0000f024 mov r2, 3 | r2 = 3;
0x0000f028 mov r1, 0x38 | r1 = 0x38;
0x0000f02c add r0, pc, r0 | r0 = pc + r0;
0x0000f030 str r5, [sp, 4] | var_4h = r5;
0x0000f034 bl 0x16b58 | fcn_00016b58 (r0, r1);
0x0000f038 cmp r7, 1 |
0x0000f03c add r6, pc, r6 | r6 = pc + r6;
| if (r7 == 1) {
0x0000f040 beq 0xf150 | goto label_1;
| }
0x0000f044 cmp r7, 2 |
| if (r7 == 2) {
0x0000f048 beq 0xf164 | goto label_2;
| }
0x0000f04c cmp r7, r5 |
| if (r7 == r5) {
0x0000f050 mvnne r3, 1 | r3 = ~1;
| }
| if (r7 != r5) {
0x0000f054 bne 0xf15c | goto label_3;
| }
0x0000f058 ldr r0, [pc, 0x190] | r0 = *(0xf1ec);
0x0000f05c mov r2, 0x24 | r2 = 0x24;
0x0000f060 mov r1, 0x40 | r1 = 0x40;
0x0000f064 add r0, pc, r0 | r0 = pc + r0;
0x0000f068 bl 0x17228 | r0 = fcn_00017228 (r0, r1);
0x0000f06c subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x0000f070 beq 0xf158 | goto label_4;
| }
0x0000f074 cmp r4, 0 |
| if (r4 != 0) {
0x0000f078 ldreq r4, [pc, 0x174] | r4 = *((pc + 0x174));
| }
| if (r4 != 0) {
0x0000f07c addeq r4, pc, r4 | r4 = pc + r4;
| }
0x0000f080 mov r0, r4 | r0 = r4;
0x0000f084 bl 0x27d0 | strlen (r0);
0x0000f088 ldr r7, [pc, 0x168] | r7 = *(0xf1f4);
0x0000f08c mov r1, 0x45 | r1 = 0x45;
0x0000f090 add r7, pc, r7 | r7 = pc + r7;
0x0000f094 add r2, r0, 1 | r2 = r0 + 1;
0x0000f098 mov r0, r7 | r0 = r7;
0x0000f09c bl 0x17228 | r0 = fcn_00017228 (r0, r1);
0x0000f0a0 cmp r0, 0 |
0x0000f0a4 str r0, [r5] | *(r5) = r0;
| if (r0 == 0) {
0x0000f0a8 bne 0xf0e8 |
0x0000f0ac mov r2, r5 | r2 = r5;
0x0000f0b0 mov r1, 0x47 | r1 = 0x47;
0x0000f0b4 mov r0, r7 | r0 = r7;
0x0000f0b8 bl 0x173e4 | fcn_000173e4 (r0, r1);
0x0000f0bc mvn r3, 0x62 | r3 = ~0x62;
0x0000f0c0 str r3, [sp, 4] | var_4h = r3;
| label_0:
0x0000f0c4 ldr r0, [pc, 0x130] | r0 = *(0xf1f8);
0x0000f0c8 mov r3, 3 | r3 = 3;
0x0000f0cc add r2, sp, 4 | r2 += var_4h;
0x0000f0d0 mov r1, 0x68 | r1 = 0x68;
0x0000f0d4 add r0, pc, r0 | r0 = pc + r0;
0x0000f0d8 bl 0x16c40 | fcn_00016c40 (r0, r1);
0x0000f0dc ldr r0, [sp, 4] | r0 = var_4h;
0x0000f0e0 add sp, sp, 8 |
0x0000f0e4 pop {r4, r5, r6, r7, r8, pc} |
| }
0x0000f0e8 mov r1, r4 | r1 = r4;
0x0000f0ec bl 0x2338 | strcpy (r0, r1)
0x0000f0f0 ldr r3, [pc, 0x108] | r3 = *(0xf1fc);
0x0000f0f4 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0000f0f8 str r3, [r5, 4] | *((r5 + 4)) = r3;
0x0000f0fc ldr r3, [pc, 0x100] | r3 = *(0xf200);
0x0000f100 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0000f104 str r3, [r5, 8] | *((r5 + 8)) = r3;
0x0000f108 ldr r3, [pc, 0xf8] | r3 = *(0xf204);
0x0000f10c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0000f110 str r3, [r5, 0xc] | *((r5 + 0xc)) = r3;
0x0000f114 ldr r3, [pc, 0xf0] | r3 = *(0xf208);
0x0000f118 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0000f11c str r3, [r5, 0x10] | *((r5 + 0x10)) = r3;
0x0000f120 ldr r3, [pc, 0xe8] | r3 = *(0xf20c);
0x0000f124 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0000f128 str r3, [r5, 0x14] | *((r5 + 0x14)) = r3;
0x0000f12c ldr r3, [pc, 0xe0] | r3 = *(0xf210);
0x0000f130 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0000f134 str r3, [r5, 0x18] | *((r5 + 0x18)) = r3;
0x0000f138 ldr r3, [pc, 0xd8] | r3 = *(0xf214);
0x0000f13c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0000f140 str r3, [r5, 0x1c] | *((r5 + 0x1c)) = r3;
0x0000f144 ldr r3, [pc, 0xd0] | r3 = *(0xf218);
0x0000f148 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0000f14c str r3, [r5, 0x20] | *((r5 + 0x20)) = r3;
| do {
| label_1:
0x0000f150 mov r4, r5 | r4 = r5;
0x0000f154 b 0xf1e0 | goto label_5;
| label_4:
0x0000f158 mvn r3, 0x62 | r3 = ~0x62;
| label_3:
0x0000f15c str r3, [sp, 4] | var_4h = r3;
0x0000f160 b 0xf150 |
| } while (1);
| label_2:
0x0000f164 cmp r4, 0 |
| if (r4 != 0) {
0x0000f168 beq 0xf1d8 |
0x0000f16c ldr r3, [r4] | r3 = *(r4);
0x0000f170 cmp r3, 0 |
| if (r3 == 0) {
0x0000f174 beq 0xf1d8 | goto label_6;
| }
0x0000f178 ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x0000f17c cmp r3, 0 |
| if (r3 == 0) {
0x0000f180 beq 0xf1d8 | goto label_6;
| }
0x0000f184 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x0000f188 cmp r3, 0 |
| if (r3 == 0) {
0x0000f18c beq 0xf1d8 | goto label_6;
| }
0x0000f190 ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x0000f194 cmp r3, 0 |
| if (r3 == 0) {
0x0000f198 beq 0xf1d8 | goto label_6;
| }
0x0000f19c ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0000f1a0 cmp r3, 0 |
| if (r3 == 0) {
0x0000f1a4 beq 0xf1d8 | goto label_6;
| }
0x0000f1a8 ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x0000f1ac cmp r3, 0 |
| if (r3 == 0) {
0x0000f1b0 beq 0xf1d8 | goto label_6;
| }
0x0000f1b4 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x0000f1b8 cmp r3, 0 |
| if (r3 == 0) {
0x0000f1bc beq 0xf1d8 | goto label_6;
| }
0x0000f1c0 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0000f1c4 cmp r3, 0 |
| if (r3 == 0) {
0x0000f1c8 beq 0xf1d8 | goto label_6;
| }
0x0000f1cc ldr r3, [r4, 0x14] | r3 = *((r4 + 0x14));
0x0000f1d0 cmp r3, 0 |
| if (r3 != 0) {
0x0000f1d4 bne 0xf1e0 | goto label_5;
| }
| }
| label_6:
0x0000f1d8 mvn r3, 1 | r3 = ~1;
0x0000f1dc str r3, [sp, 4] | var_4h = r3;
| label_5:
0x0000f1e0 str r4, [r8] | *(r8) = r4;
0x0000f1e4 b 0xf0c4 | 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/lib/libpaho-mqtt3c.so.1.3.9 @ 0x10788 */
| #include <stdint.h>
|
; (fcn) fcn.00010788 () | void fcn_00010788 (int32_t arg_16ch, int32_t arg_190h, int32_t arg1) {
| int32_t var_bp_0h;
| int32_t var_0h;
| 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;
| int32_t var_2ch;
| int32_t var_30h;
| char * src;
| int32_t var_38h;
| int32_t var_3ch;
| r0 = arg1;
0x00010788 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001078c mov r5, r0 | r5 = r0;
0x00010790 ldr r0, [pc, 0x4f0] |
0x00010794 mov r3, 0 | r3 = 0;
0x00010798 add r0, pc, r0 | r0 = pc + r0;
0x0001079c add r0, r0, 0x148 | r0 = 0x10dcc;
0x000107a0 sub sp, sp, 0x3c |
0x000107a4 mov r2, 3 | r2 = 3;
0x000107a8 mov r1, 0x360 | r1 = 0x360;
0x000107ac add r0, r0, 2 | r0 += 2;
0x000107b0 str r3, [sp, 0x20] | var_20h = r3;
0x000107b4 bl 0x16b58 | fcn_00016b58 (r0, r1);
0x000107b8 ldr r3, [r5, 0x74] | r3 = *((r5 + 0x74));
0x000107bc cmp r3, 0 |
0x000107c0 bne 0x10814 |
| while (r0 != 0) {
0x000107c4 mov r7, 0 | r7 = 0;
| label_1:
0x000107c8 ldr r3, [r5] | r3 = *(r5);
0x000107cc ldr r2, [pc, 0x4b8] | r2 = *(0x10c88);
0x000107d0 str r3, [sp] | *(sp) = r3;
0x000107d4 add r2, pc, r2 | r2 = pc + r2;
0x000107d8 mov r3, r7 | r3 = r7;
0x000107dc mvn r1, 0 | r1 = ~0;
0x000107e0 mov r0, 3 | r0 = 3;
0x000107e4 bl 0xedec | fcn_0000edec (r0, r1);
0x000107e8 ldr r0, [pc, 0x4a0] |
0x000107ec mov r3, 3 | r3 = 3;
0x000107f0 add r0, pc, r0 | r0 = pc + r0;
0x000107f4 add r0, r0, 0x148 | r0 = 0x10dd4;
0x000107f8 add r2, sp, 0x20 | r2 += var_20h;
0x000107fc mov r1, 0x388 | r1 = 0x388;
0x00010800 add r0, r0, 2 | r0 += 2;
0x00010804 bl 0x16c40 | fcn_00016c40 (r0, r1);
0x00010808 ldr r0, [sp, 0x20] | r0 = var_20h;
0x0001080c add sp, sp, 0x3c |
0x00010810 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x00010814 ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x00010818 add r2, sp, 0x28 | r2 += var_28h;
0x0001081c add r1, sp, 0x24 | r1 += var_24h;
0x00010820 ldr r0, [r5, 0x70] | r0 = *((r5 + 0x70));
0x00010824 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00010828 cmp r0, 0 |
0x0001082c mov r7, r0 | r7 = r0;
0x00010830 str r0, [sp, 0x20] | var_20h = r0;
0x00010834 bne 0x107c4 |
| }
0x00010838 ldr r3, [pc, 0x454] |
0x0001083c mov r8, r0 | r8 = r0;
0x00010840 add r3, pc, r3 | r3 = pc + r3;
0x00010844 add r3, r3, 0x16c | r3 = 0x10dfc;
0x00010848 add r3, r3, 2 | r3 += 2;
0x0001084c str r3, [sp, 0xc] | var_ch = r3;
0x00010850 b 0x10a70 | goto label_4;
| label_0:
0x00010854 str r3, [sp, 0x2c] | var_2ch = r3;
0x00010858 ldr r1, [pc, 0x438] | r1 = *(0x10c94);
0x0001085c ldr r4, [r2, r8, lsl 2] | offset_0 = r8 << 2;
| r4 = *((r2 + offset_0));
0x00010860 add r1, pc, r1 | r1 = pc + r1;
0x00010864 mov r2, 2 | r2 = 2;
0x00010868 mov r0, r4 | r0 = r4;
0x0001086c bl 0x25b4 | strncmp (r0, r1, r2);
0x00010870 lsl sb, r8, 2 | sb = r8 << 2;
0x00010874 cmp r0, 0 |
| if (r0 != 0) {
0x00010878 beq 0x10898 |
0x0001087c ldr r1, [pc, 0x418] | r1 = *(0x10c98);
0x00010880 mov r2, 3 | r2 = 3;
0x00010884 add r1, pc, r1 | r1 = pc + r1;
0x00010888 mov r0, r4 | r0 = r4;
0x0001088c bl 0x25b4 | r0 = strncmp (r0, r1, r2);
0x00010890 cmp r0, 0 |
| if (r0 != 0) {
0x00010894 bne 0x10a4c | goto label_5;
| }
| }
0x00010898 ldr r3, [r5, 0x74] | r3 = *((r5 + 0x74));
0x0001089c add sl, sp, 0x30 | sl += var_30h;
0x000108a0 add r6, sp, 0x2c | r6 += var_2ch;
0x000108a4 ldr fp, [r3, 0x10] | fp = *((r3 + 0x10));
0x000108a8 mov r2, r6 | r2 = r6;
0x000108ac mov r3, sl | r3 = sl;
0x000108b0 mov r1, r4 | r1 = r4;
0x000108b4 ldr r0, [r5, 0x70] | r0 = *((r5 + 0x70));
0x000108b8 blx fp | r0 = fp (r0, r1, r2, r3);
0x000108bc cmp r0, 0 |
0x000108c0 str r0, [sp, 0x20] | var_20h = r0;
| if (r0 != 0) {
0x000108c4 bne 0x10a4c | goto label_5;
| }
0x000108c8 ldr r3, [r5, 0x7c] | r3 = *((r5 + 0x7c));
0x000108cc cmp r3, 0 |
0x000108d0 bne 0x10a30 |
| while (r0 == 0) {
0x000108d4 ldr r3, [sp, 0x24] | r3 = var_24h;
0x000108d8 ldr r1, [pc, 0x3c0] | r1 = *(0x10c9c);
0x000108dc ldr r0, [r3, sb] | r0 = *((r3 + sb));
0x000108e0 mov r2, 3 | r2 = 3;
0x000108e4 add r1, pc, r1 | r1 = pc + r1;
0x000108e8 bl 0x25b4 | strncmp (r0, r1, r2);
0x000108ec ldr r6, [pc, 0x3b0] | r6 = *(0x10ca0);
0x000108f0 mov r2, 3 | r2 = 3;
0x000108f4 ldr r1, [pc, 0x3ac] | r1 = *(0x10ca4);
0x000108f8 add r6, pc, r6 | r6 = pc + r6;
0x000108fc cmp r0, 0 |
| if (r0 != 0) {
0x00010900 moveq r3, 5 | r3 = 5;
| }
| if (r0 == 0) {
0x00010904 movne r3, 4 | r3 = 4;
| }
0x00010908 str r3, [sp, 0x14] | var_14h = r3;
0x0001090c ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00010910 ldr r0, [sp, 0xc] | r0 = var_ch;
0x00010914 str r3, [sp, 0x10] | var_10h = r3;
0x00010918 ldr r3, [sp, 0x30] | r3 = var_30h;
0x0001091c str r3, [sp, 0x18] | var_18h = r3;
0x00010920 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00010924 str r3, [sp, 0x34] | src = r3;
0x00010928 bl 0x16b58 | fcn_00016b58 (r0, r1);
0x0001092c mov r2, 0x10 | r2 = 0x10;
0x00010930 ldr r1, [pc, 0x374] | r1 = *(0x10ca8);
0x00010934 mov r0, r6 | r0 = r6;
0x00010938 bl 0x17228 | r0 = fcn_00017228 (r0, r1);
0x0001093c subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x00010940 bne 0x10aa8 | goto label_6;
| }
| label_2:
0x00010944 ldr fp, [pc, 0x364] | fp = *(0x10cac);
0x00010948 mov r3, 3 | r3 = 3;
0x0001094c add fp, pc, fp |
0x00010950 add r0, fp, 0x16c | r0 += arg_16ch;
0x00010954 mov r2, 0 | r2 = 0;
0x00010958 ldr r1, [pc, 0x354] | r1 = *(0x10cb0);
0x0001095c add r0, r0, 2 | r0 += 2;
0x00010960 bl 0x16c40 | fcn_00016c40 (r0, r1);
0x00010964 cmp r4, 0 |
| if (r4 == 0) {
0x00010968 beq 0x10a4c | goto label_5;
| }
0x0001096c ldr r3, [sp, 0x24] | r3 = var_24h;
0x00010970 mov r1, 0x2d | r1 = 0x2d;
0x00010974 ldr r0, [r3, sb] | r0 = *((r3 + sb));
0x00010978 bl 0x27e8 | strchr (r0, r1);
0x0001097c mov r6, 0 | r6 = 0;
0x00010980 add sl, sp, 0x38 | sl += var_38h;
0x00010984 add r0, r0, 1 | r0++;
0x00010988 bl 0x27a0 | atoi (r0);
0x0001098c ldr r3, [r5, 0x68] | r3 = *((r5 + 0x68));
0x00010990 mov r2, 3 | r2 = 3;
0x00010994 mov r1, 0x348 | r1 = 0x348;
0x00010998 str r3, [sp, 0x10] | var_10h = r3;
0x0001099c str r0, [r4, 0xc] | *((r4 + 0xc)) = r0;
0x000109a0 add r0, fp, 0x190 | r0 += arg_190h;
0x000109a4 str r6, [sl, -4]! | *((sl -= 4)) = r6;
0x000109a8 bl 0x16b58 | fcn_00016b58 (r0, r1);
| label_3:
0x000109ac mov r1, sl | r1 = sl;
0x000109b0 ldr r0, [sp, 0x10] | r0 = var_10h;
0x000109b4 bl 0x1399c | fcn_0001399c (r0, r1);
0x000109b8 clz fp, r6 |
0x000109bc lsr fp, fp, 5 |
0x000109c0 cmp r0, 0 |
| if (r0 != 0) {
0x000109c4 moveq fp, 0 |
| }
0x000109c8 cmp fp, 0 |
| if (fp != 0) {
0x000109cc bne 0x10c6c | goto label_7;
| }
0x000109d0 mov r3, r6 | r3 = r6;
0x000109d4 mov r2, 0x10 | r2 = 0x10;
0x000109d8 mov r1, r4 | r1 = r4;
0x000109dc ldr r0, [sp, 0x10] | r0 = var_10h;
0x000109e0 bl 0x136e4 | fcn_000136e4 (r0, r1);
0x000109e4 ldr r0, [pc, 0x2cc] |
0x000109e8 mov r3, 3 | r3 = 3;
0x000109ec add r0, pc, r0 | r0 = pc + r0;
0x000109f0 mov r2, fp | r2 = fp;
0x000109f4 ldr r1, [pc, 0x2c0] | r1 = *(0x10cb8);
0x000109f8 add r0, r0, 0x190 | r0 = 0x10e44;
0x000109fc bl 0x16c40 | fcn_00016c40 (r0, r1);
0x00010a00 ldr r0, [pc, 0x2b8] | r0 = *(0x10cbc);
0x00010a04 ldr r2, [sp, 0x2c] | r2 = var_2ch;
0x00010a08 ldr r1, [pc, 0x2b4] | r1 = *(0x10cc0);
0x00010a0c add r0, pc, r0 | r0 = pc + r0;
0x00010a10 bl 0x173e4 | fcn_000173e4 (r0, r1);
0x00010a14 ldr r2, [r5, 0x6c] | r2 = *((r5 + 0x6c));
0x00010a18 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00010a1c add r7, r7, 1 | r7++;
0x00010a20 cmp r2, r3 |
| if (r2 < r3) {
0x00010a24 strhs r2, [r5, 0x6c] | *((r5 + 0x6c)) = r2;
| }
| if (r2 >= r3) {
0x00010a28 strlo r3, [r5, 0x6c] | *((r5 + 0x6c)) = r3;
| }
0x00010a2c b 0x10a4c | goto label_5;
0x00010a30 mov r2, sl | r2 = sl;
0x00010a34 mov r1, r6 | r1 = r6;
0x00010a38 ldr r0, [r5, 0x84] | r0 = *((r5 + 0x84));
0x00010a3c blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x00010a40 cmp r0, 0 |
0x00010a44 str r0, [sp, 0x20] | var_20h = r0;
0x00010a48 beq 0x108d4 |
| }
| label_5:
0x00010a4c ldr r3, [sp, 0x24] | r3 = var_24h;
0x00010a50 ldr r2, [r3, sb] | r2 = *((r3 + sb));
0x00010a54 cmp r2, 0 |
| if (r2 != 0) {
0x00010a58 beq 0x10a6c |
0x00010a5c ldr r0, [pc, 0x264] | r0 = *(0x10cc4);
0x00010a60 mov r1, 0x380 | r1 = 0x380;
0x00010a64 add r0, pc, r0 | r0 = pc + r0;
0x00010a68 bl 0x173e4 | fcn_000173e4 (r0, r1);
| }
0x00010a6c add r8, r8, 1 | r8++;
| label_4:
0x00010a70 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00010a74 ldr r2, [sp, 0x24] | r2 = var_24h;
0x00010a78 cmp r3, 0 |
| if (r3 != 0) {
0x00010a7c bne 0x10a8c | goto label_8;
| }
0x00010a80 ldr r1, [sp, 0x28] | r1 = var_28h;
0x00010a84 cmp r1, r8 |
| if (r1 > r8) {
0x00010a88 bgt 0x10854 | goto label_0;
| }
| label_8:
0x00010a8c cmp r2, 0 |
| if (r2 == 0) {
0x00010a90 beq 0x107c8 | goto label_1;
| }
0x00010a94 ldr r0, [pc, 0x230] | r0 = *(0x10cc8);
0x00010a98 ldr r1, [pc, 0x230] | r1 = *(0x10ccc);
0x00010a9c add r0, pc, r0 | r0 = pc + r0;
0x00010aa0 bl 0x173e4 | fcn_000173e4 (r0, r1);
0x00010aa4 b 0x107c8 | goto label_1;
| label_6:
0x00010aa8 mov r2, 0x10 | r2 = 0x10;
0x00010aac mov r1, 0 | r1 = 0;
0x00010ab0 bl 0x2650 | memset (r0, r1, r2);
0x00010ab4 mov r2, 0x30 | r2 = 0x30;
0x00010ab8 ldr r1, [pc, 0x214] | r1 = *(0x10cd0);
0x00010abc mov r0, r6 | r0 = r6;
0x00010ac0 bl 0x17228 | r0 = fcn_00017228 (r0, r1);
0x00010ac4 cmp r0, 0 |
0x00010ac8 mov sl, r0 | sl = r0;
0x00010acc str r0, [r4] | *(r4) = r0;
| if (r0 == 0) {
0x00010ad0 bne 0x10aec |
0x00010ad4 mov r2, r4 | r2 = r4;
0x00010ad8 mov r1, 0x308 | r1 = 0x308;
0x00010adc mov r0, r6 | r0 = r6;
0x00010ae0 bl 0x173e4 | fcn_000173e4 (r0, r1);
0x00010ae4 mov r4, sl | r4 = sl;
0x00010ae8 b 0x10944 | goto label_2;
| }
0x00010aec mov r2, 0x30 | r2 = 0x30;
0x00010af0 mov r1, 0 | r1 = 0;
0x00010af4 bl 0x2650 | memset (r0, r1, r2);
0x00010af8 ldr r3, [r4] | r3 = *(r4);
0x00010afc mov r2, 1 | r2 = 1;
0x00010b00 str r2, [r3, 4] | *((r3 + 4)) = r2;
0x00010b04 ldr r2, [sp, 0x34] | r2 = src;
0x00010b08 mov r1, 0x314 | r1 = 0x314;
0x00010b0c ldr sl, [r2], 4 | sl = *(r2);
| r2 += 4;
0x00010b10 mov r0, r6 | r0 = r6;
0x00010b14 str sl, [r3, 8] | *((r3 + 8)) = sl;
0x00010b18 str r2, [sp, 0x34] | src = r2;
0x00010b1c mov r2, sl | r2 = sl;
0x00010b20 str r3, [sp, 0x1c] | var_1ch = r3;
0x00010b24 bl 0x17228 | fcn_00017228 (r0, r1);
0x00010b28 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00010b2c cmp r0, 0 |
0x00010b30 mov fp, r0 |
0x00010b34 str r0, [r3, 0xc] | *((r3 + 0xc)) = r0;
| if (r0 != 0) {
0x00010b38 bne 0x10b64 | goto label_9;
| }
0x00010b3c ldr r2, [r4] | r2 = *(r4);
0x00010b40 ldr r1, [pc, 0x190] | r1 = *(0x10cd4);
0x00010b44 mov r0, r6 | r0 = r6;
0x00010b48 bl 0x173e4 | fcn_000173e4 (r0, r1);
0x00010b4c ldr r1, [pc, 0x188] | r1 = *(0x10cd8);
0x00010b50 mov r2, r4 | r2 = r4;
| do {
0x00010b54 mov r0, r6 | r0 = r6;
0x00010b58 bl 0x173e4 | fcn_000173e4 (r0, r1);
0x00010b5c mov r4, fp | r4 = fp;
0x00010b60 b 0x10944 | goto label_2;
| label_9:
0x00010b64 ldr r3, [r4] | r3 = *(r4);
0x00010b68 mov r2, sl | r2 = sl;
0x00010b6c ldr r1, [sp, 0x34] | r1 = src;
0x00010b70 ldr r0, [r3, 0xc] | r0 = *((r3 + 0xc));
0x00010b74 bl 0x2434 | memcpy (r0, r1, r2);
0x00010b78 ldr r2, [sp, 0x34] | r2 = src;
0x00010b7c ldr r3, [r4] | r3 = *(r4);
0x00010b80 add r0, r2, sl | r0 = r2 + sl;
0x00010b84 ldr r2, [r2, sl] | r2 = *((r2 + sl));
0x00010b88 add r0, r0, 0x10 | r0 += 0x10;
0x00010b8c str r2, [r3, 0x10] | *((r3 + 0x10)) = r2;
0x00010b90 ldr r2, [r0, -0xc] | r2 = *((r0 - 0xc));
0x00010b94 str r2, [r3, 0x14] | *((r3 + 0x14)) = r2;
0x00010b98 ldr r2, [r0, -8] | r2 = *((r0 - 8));
0x00010b9c str r2, [r3, 0x18] | *((r3 + 0x18)) = r2;
0x00010ba0 ldr r2, [r0, -4] | r2 = *((r0 - 4));
0x00010ba4 str r2, [r3, 0x1c] | *((r3 + 0x1c)) = r2;
0x00010ba8 str r0, [sp, 0x34] | src = r0;
0x00010bac bl 0x27d0 | strlen (r0);
0x00010bb0 ldr r1, [pc, 0x128] | r1 = *(0x10cdc);
0x00010bb4 add sl, r0, 1 | sl = r0 + 1;
0x00010bb8 mov r2, sl | r2 = sl;
0x00010bbc mov r0, r6 | r0 = r6;
0x00010bc0 bl 0x17228 | r0 = fcn_00017228 (r0, r1);
0x00010bc4 cmp r0, 0 |
0x00010bc8 mov fp, r0 |
0x00010bcc str r0, [r4, 4] | *((r4 + 4)) = r0;
| if (r0 != 0) {
0x00010bd0 bne 0x10c04 | goto label_10;
| }
0x00010bd4 ldr r3, [r4] | r3 = *(r4);
0x00010bd8 ldr r1, [pc, 0x104] | r1 = *(0x10ce0);
0x00010bdc ldr r2, [r3, 0xc] | r2 = *((r3 + 0xc));
0x00010be0 mov r0, r6 | r0 = r6;
0x00010be4 bl 0x173e4 | fcn_000173e4 (r0, r1);
0x00010be8 ldr r2, [r4] | r2 = *(r4);
0x00010bec ldr r1, [pc, 0xf4] | r1 = *(0x10ce4);
0x00010bf0 mov r0, r6 | r0 = r6;
0x00010bf4 bl 0x173e4 | fcn_000173e4 (r0, r1);
0x00010bf8 mov r2, r4 | r2 = r4;
0x00010bfc ldr r1, [pc, 0xe8] | r1 = *(0x10ce8);
0x00010c00 b 0x10b54 |
| } while (1);
| label_10:
0x00010c04 ldr r1, [sp, 0x34] | r1 = src;
0x00010c08 bl 0x2338 | strcpy (r0, r1)
0x00010c0c ldr r2, [sp, 0x34] | r2 = src;
0x00010c10 add r3, r2, sl | r3 = r2 + sl;
0x00010c14 ldr r2, [r2, sl] | r2 = *((r2 + sl));
0x00010c18 add r3, r3, 4 | r3 += 4;
0x00010c1c str r2, [r4, 8] | *((r4 + 8)) = r2;
0x00010c20 str r3, [sp, 0x34] | src = r3;
0x00010c24 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00010c28 cmp r3, 5 |
| if (r3 != 5) {
0x00010c2c bne 0x10944 | goto label_2;
| }
0x00010c30 ldr r0, [r4] | r0 = *(r4);
0x00010c34 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00010c38 ldr r2, [sp, 0x18] | r2 = var_18h;
0x00010c3c add r1, sp, 0x34 | r1 += src;
0x00010c40 add r2, r3, r2 | r2 = r3 + r2;
0x00010c44 add r0, r0, 0x20 | r0 += 0x20;
0x00010c48 bl 0x141fc | r0 = fcn_000141fc (r0, r1);
0x00010c4c cmp r0, 1 |
| if (r0 == 1) {
0x00010c50 beq 0x10944 | goto label_2;
| }
0x00010c54 ldr r2, [pc, 0x94] | r2 = *(0x10cec);
0x00010c58 mvn r1, 0 | r1 = ~0;
0x00010c5c add r2, pc, r2 | r2 = pc + r2;
0x00010c60 ldr r0, [sp, 0x14] | r0 = var_14h;
0x00010c64 bl 0xedec | fcn_0000edec (r0, r1);
0x00010c68 b 0x10944 | goto label_2;
| label_7:
0x00010c6c ldr r6, [sp, 0x34] | r6 = src;
0x00010c70 ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x00010c74 ldr r3, [r6, 8] | r3 = *((r6 + 8));
0x00010c78 ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
0x00010c7c cmp r2, r3 |
| if (r2 < r3) {
0x00010c80 movhs r6, 0 | r6 = 0;
| }
0x00010c84 b 0x109ac | goto label_3;
| }
; 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/lib/libpaho-mqtt3c.so.1.3.9 @ 0x12420 */
| #include <stdint.h>
|
; (fcn) fcn.00012420 () | void fcn_00012420 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_20h;
| int32_t var_7ch;
| r0 = arg1;
| r1 = arg2;
0x00012420 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00012424 mov r7, r0 | r7 = r0;
0x00012428 ldr r0, [pc, 0x19c] |
0x0001242c sub sp, sp, 0x7c |
0x00012430 add r0, pc, r0 | r0 = pc + r0;
0x00012434 mvn r3, 1 | r3 = ~1;
0x00012438 mov r2, 3 | r2 = 3;
0x0001243c add r0, r0, 0x32 | r0 = 0x125fa;
0x00012440 mov sl, r1 | sl = r1;
0x00012444 mov r1, 0x1ec | r1 = 0x1ec;
0x00012448 str r3, [sp, 0xc] | var_ch = r3;
0x0001244c bl 0x16b58 | fcn_00016b58 (r0, r1);
0x00012450 mov r0, r7 | r0 = r7;
0x00012454 bl 0x26a4 | r0 = opendir ();
0x00012458 subs sb, r0, 0 | sb = r0 - 0;
| if (sb == r0) {
0x0001245c beq 0x124d4 | goto label_3;
| }
0x00012460 ldr r6, [pc, 0x168] | r6 = *(0x125cc);
0x00012464 add r6, pc, r6 | r6 = pc + r6;
| label_2:
0x00012468 ldr fp, [pc, 0x164] | fp = *(0x125d0);
0x0001246c add fp, pc, fp |
| label_0:
0x00012470 mov r0, sb | r0 = sb;
0x00012474 bl 0x25e4 | r0 = readdir64 ();
0x00012478 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x0001247c beq 0x124cc | goto label_4;
| }
0x00012480 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00012484 cmp r3, 0 |
| if (r3 == 0) {
0x00012488 beq 0x124cc | goto label_4;
| }
0x0001248c mov r0, r7 | r0 = r7;
0x00012490 bl 0x27d0 | strlen (r0);
0x00012494 add r5, r5, 0x13 | r5 += 0x13;
0x00012498 mov r4, r0 | r4 = r0;
0x0001249c mov r0, r5 | r0 = r5;
0x000124a0 bl 0x27d0 | strlen (r0);
0x000124a4 ldr r1, [pc, 0x12c] | r1 = *(0x125d4);
0x000124a8 add r4, r4, r0 | r4 += r0;
0x000124ac add r4, r4, 2 | r4 += 2;
0x000124b0 mov r2, r4 | r2 = r4;
0x000124b4 mov r0, r6 | r0 = r6;
0x000124b8 bl 0x17228 | r0 = fcn_00017228 (r0, r1);
0x000124bc subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x000124c0 bne 0x124fc | goto label_5;
| }
| label_1:
0x000124c4 mvn r3, 0x62 | r3 = ~0x62;
| do {
0x000124c8 str r3, [sp, 0xc] | var_ch = r3;
| label_4:
0x000124cc mov r0, sb | r0 = sb;
0x000124d0 bl 0x27f4 | closedir ();
| label_3:
0x000124d4 ldr r0, [pc, 0x100] |
0x000124d8 mov r3, 3 | r3 = 3;
0x000124dc add r0, pc, r0 | r0 = pc + r0;
0x000124e0 add r2, sp, 0xc | r2 += var_ch;
0x000124e4 ldr r1, [pc, 0xf4] | r1 = *(0x125dc);
0x000124e8 add r0, r0, 0x32 | r0 = 0x1260a;
0x000124ec bl 0x16c40 | fcn_00016c40 (r0, r1);
0x000124f0 ldr r0, [sp, 0xc] | r0 = var_ch;
0x000124f4 add sp, sp, 0x7c |
0x000124f8 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x000124fc str r5, [sp] | *(sp) = r5;
0x00012500 mov r3, r7 | r3 = r7;
0x00012504 mov r2, fp | r2 = fp;
0x00012508 mov r1, r4 | r1 = r4;
0x0001250c bl 0x23e0 | r0 = snprintf (r0, r1, r2, r3);
0x00012510 cmp r0, r4 |
| if (r0 <= r4) {
0x00012514 blo 0x12530 | goto label_6;
| }
0x00012518 mov r2, r8 | r2 = r8;
0x0001251c ldr r1, [pc, 0xc0] | r1 = *(0x125e0);
0x00012520 mov r0, r6 | r0 = r6;
0x00012524 bl 0x173e4 | fcn_000173e4 (r0, r1);
0x00012528 mvn r3, 1 | r3 = ~1;
0x0001252c b 0x124c8 |
| } while (1);
| label_6:
0x00012530 add r1, sp, 0x10 | r1 += var_10h;
0x00012534 mov r0, r8 | r0 = r8;
0x00012538 bl 0x2608 | lstat64 ();
0x0001253c mov r2, r8 | r2 = r8;
0x00012540 mov r1, 0x200 | r1 = 0x200;
0x00012544 mov r0, r6 | r0 = r6;
0x00012548 bl 0x173e4 | fcn_000173e4 (r0, r1);
0x0001254c ldr r3, [sp, 0x20] | r3 = var_20h;
0x00012550 and r3, r3, 0xf000 | r3 &= 0xf000;
0x00012554 cmp r3, 0x8000 |
| if (r3 != 0x8000) {
0x00012558 bne 0x12470 | goto label_0;
| }
0x0001255c mov r0, r5 | r0 = r5;
0x00012560 bl 0x27d0 | strlen (r0);
0x00012564 ldr r1, [pc, 0x7c] | r1 = *(0x125e4);
0x00012568 add r2, r0, 1 | r2 = r0 + 1;
0x0001256c mov r0, r6 | r0 = r6;
0x00012570 bl 0x17228 | r0 = fcn_00017228 (r0, r1);
0x00012574 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x00012578 beq 0x124c4 | goto label_1;
| }
0x0001257c mov r1, r5 | r1 = r5;
0x00012580 bl 0x2338 | strcpy (r0, r1)
0x00012584 ldr r1, [pc, 0x60] | r1 = *(0x125e8);
0x00012588 mov r0, r4 | r0 = r4;
0x0001258c add r1, pc, r1 | r1 = pc + r1;
0x00012590 bl 0x2590 | strstr (r0, r1);
0x00012594 mov r1, sl | r1 = sl;
0x00012598 cmp r0, 0 |
| if (r0 == 0) {
0x0001259c movne r3, 0 | r3 = 0;
| }
| if (r0 == 0) {
0x000125a0 strbne r3, [r0] | *(r0) = r3;
| }
0x000125a4 mov r0, r4 | r0 = r4;
0x000125a8 bl 0x26bc | strcmp (r0, r1);
0x000125ac mov r2, r4 | r2 = r4;
0x000125b0 ldr r1, [pc, 0x38] | r1 = *(0x125ec);
0x000125b4 cmp r0, 0 |
| if (r0 != 0) {
0x000125b8 streq r0, [sp, 0xc] | var_ch = r0;
| }
0x000125bc ldr r0, [pc, 0x30] | r0 = *(0x125f0);
0x000125c0 add r0, pc, r0 | r0 = pc + r0;
0x000125c4 bl 0x173e4 | fcn_000173e4 (r0, r1);
0x000125c8 b 0x12468 | 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/usr/lib/libpaho-mqtt3c.so.1.3.9 @ 0x127e4 */
| #include <stdint.h>
|
; (fcn) fcn.000127e4 () | void fcn_000127e4 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_30h;
| int32_t var_8ch;
| r0 = arg1;
| r1 = arg2;
0x000127e4 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000127e8 mov sl, r0 | sl = r0;
0x000127ec ldr r0, [pc, 0x314] |
0x000127f0 sub sp, sp, 0x8c |
0x000127f4 add r0, pc, r0 | r0 = pc + r0;
0x000127f8 str r1, [sp, 0xc] | var_ch = r1;
0x000127fc str r2, [sp, 0x10] | var_10h = r2;
0x00012800 ldr r1, [pc, 0x304] | r1 = *(0x12b08);
0x00012804 mov r2, 3 | r2 = 3;
0x00012808 add r0, r0, 0x64 | r0 = 0x12b68;
0x0001280c mov r4, 0 | r4 = 0;
0x00012810 str r4, [sp, 0x1c] | var_1ch = r4;
0x00012814 bl 0x16b58 | fcn_00016b58 (r0, r1);
0x00012818 mov r0, sl | r0 = sl;
0x0001281c bl 0x26a4 | r0 = opendir ();
0x00012820 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x00012824 bne 0x12964 | goto label_10;
| }
| label_4:
0x00012828 mvn r3, 1 | r3 = ~1;
| label_2:
0x0001282c str r3, [sp, 0x1c] | var_1ch = r3;
| do {
| label_8:
0x00012830 ldr r0, [pc, 0x2d8] |
0x00012834 mov r3, 3 | r3 = 3;
0x00012838 add r0, pc, r0 | r0 = pc + r0;
0x0001283c add r2, sp, 0x1c | r2 += var_1ch;
0x00012840 mov r1, 0x370 | r1 = 0x370;
0x00012844 add r0, r0, 0x64 | r0 = 0x12b70;
0x00012848 bl 0x16c40 | fcn_00016c40 (r0, r1);
0x0001284c ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x00012850 add sp, sp, 0x8c |
0x00012854 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_1:
0x00012858 mov r0, sl | r0 = sl;
0x0001285c bl 0x27d0 | strlen (r0);
0x00012860 add r3, r7, 0x13 | r3 = r7 + 0x13;
0x00012864 str r3, [sp, 8] | var_8h = r3;
0x00012868 mov r6, r0 | r6 = r0;
0x0001286c mov r0, r3 | r0 = r3;
0x00012870 bl 0x27d0 | strlen (r0);
0x00012874 mov r1, sb | r1 = sb;
0x00012878 add r6, r6, r0 | r6 += r0;
0x0001287c add r6, r6, 2 | r6 += 2;
0x00012880 mov r2, r6 | r2 = r6;
0x00012884 mov r0, r8 | r0 = r8;
0x00012888 bl 0x17228 | fcn_00017228 (r0, r1);
0x0001288c ldr r3, [sp, 8] | r3 = var_8h;
0x00012890 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x00012894 bne 0x128ac | goto label_11;
| }
| label_5:
0x00012898 mvn r3, 0x62 | r3 = ~0x62;
| label_0:
0x0001289c str r3, [sp, 0x1c] | var_1ch = r3;
| label_9:
0x000128a0 mov r0, r5 | r0 = r5;
0x000128a4 bl 0x27f4 | closedir ();
0x000128a8 b 0x12830 |
| } while (1);
| label_11:
0x000128ac str r3, [sp] | *(sp) = r3;
0x000128b0 mov r2, fp | r2 = fp;
0x000128b4 mov r3, sl | r3 = sl;
0x000128b8 mov r1, r6 | r1 = r6;
0x000128bc bl 0x23e0 | r0 = snprintf (r0, r1, r2, r3);
0x000128c0 cmp r0, r6 |
| if (r0 > r6) {
0x000128c4 blo 0x128e0 |
0x000128c8 ldr r1, [pc, 0x244] | r1 = *(0x12b10);
0x000128cc mov r2, r7 | r2 = r7;
0x000128d0 mov r0, r8 | r0 = r8;
| label_6:
0x000128d4 bl 0x173e4 | fcn_000173e4 (r0, r1);
0x000128d8 mvn r3, 1 | r3 = ~1;
0x000128dc b 0x1289c | goto label_0;
| }
0x000128e0 add r1, sp, 0x20 | r1 += var_20h;
0x000128e4 mov r0, r7 | r0 = r7;
0x000128e8 bl 0x2608 | r0 = lstat64 ();
0x000128ec cmp r0, 0 |
| if (r0 == 0) {
0x000128f0 bne 0x12904 |
0x000128f4 ldr r3, [sp, 0x30] | r3 = var_30h;
0x000128f8 and r3, r3, 0xf000 | r3 &= 0xf000;
0x000128fc cmp r3, 0x8000 |
| if (r3 == 0x8000) {
0x00012900 addeq r4, r4, 1 | r4++;
| goto label_12;
| }
| }
| label_12:
0x00012904 ldr r0, [pc, 0x20c] | r0 = *(0x12b14);
0x00012908 mov r2, r7 | r2 = r7;
0x0001290c ldr r1, [pc, 0x208] | r1 = *(0x12b18);
0x00012910 add r0, pc, r0 | r0 = pc + r0;
0x00012914 bl 0x173e4 | fcn_000173e4 (r0, r1);
| label_3:
0x00012918 mov r0, r5 | r0 = r5;
0x0001291c bl 0x25e4 | r0 = readdir64 ();
0x00012920 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x00012924 bne 0x12858 | goto label_1;
| }
0x00012928 mov r0, r5 | r0 = r5;
0x0001292c bl 0x27f4 | closedir ();
0x00012930 cmp r4, 0 |
| if (r4 != 0) {
0x00012934 moveq r5, r4 | r5 = r4;
| }
| if (r4 != 0) {
0x00012938 moveq r6, r4 | r6 = r4;
| }
| if (r4 == 0) {
0x0001293c beq 0x12aec | goto label_13;
| }
0x00012940 ldr r0, [pc, 0x1d8] | r0 = *(0x12b1c);
0x00012944 lsl r2, r4, 2 | r2 = r4 << 2;
0x00012948 ldr r1, [pc, 0x1d4] | r1 = *(0x12b20);
0x0001294c add r0, pc, r0 | r0 = pc + r0;
0x00012950 bl 0x17228 | r0 = fcn_00017228 (r0, r1);
0x00012954 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x00012958 bne 0x1297c |
0x0001295c mvn r3, 0x62 | r3 = ~0x62;
0x00012960 b 0x1282c | goto label_2;
| label_10:
0x00012964 ldr r8, [pc, 0x1bc] | r8 = *(0x12b24);
0x00012968 ldr fp, [pc, 0x1bc] | fp = *(0x12b28);
0x0001296c add r8, pc, r8 | r8 = pc + r8;
0x00012970 ldr sb, [pc, 0x1b8] | sb = *(0x00012b30);
0x00012974 add fp, pc, fp |
0x00012978 b 0x12918 | goto label_3;
| }
0x0001297c mov r0, sl | r0 = sl;
0x00012980 bl 0x26a4 | r0 = opendir ();
0x00012984 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00012988 beq 0x12828 | goto label_4;
| }
0x0001298c ldr r3, [pc, 0x1a0] | r3 = *(0x12b30);
0x00012990 str r7, [sp, 8] | var_8h = r7;
0x00012994 ldr r7, [pc, 0x19c] | r7 = *(0x12b34);
0x00012998 add r3, pc, r3 | r3 = pc + r3;
0x0001299c add r7, pc, r7 | r7 = pc + r7;
0x000129a0 str r3, [sp, 0x14] | var_14h = r3;
0x000129a4 b 0x12adc | goto label_14;
| label_7:
0x000129a8 mov r0, sl | r0 = sl;
0x000129ac bl 0x27d0 | strlen (r0);
0x000129b0 add sb, sb, 0x13 | sb += 0x13;
0x000129b4 mov r8, r0 | r8 = r0;
0x000129b8 mov r0, sb | r0 = sb;
0x000129bc bl 0x27d0 | strlen (r0);
0x000129c0 ldr r1, [pc, 0x174] | r1 = *(0x12b38);
0x000129c4 add r8, r8, r0 | r8 += r0;
0x000129c8 add r8, r8, 2 | r8 += 2;
0x000129cc mov r2, r8 | r2 = r8;
0x000129d0 mov r0, r7 | r0 = r7;
0x000129d4 bl 0x17228 | r0 = fcn_00017228 (r0, r1);
0x000129d8 subs fp, r0, 0 |
| if (fp != r0) {
0x000129dc bne 0x129f4 | goto label_15;
| }
0x000129e0 ldr r1, [pc, 0x158] | r1 = *(0x12b3c);
0x000129e4 mov r2, r6 | r2 = r6;
| do {
0x000129e8 mov r0, r7 | r0 = r7;
0x000129ec bl 0x173e4 | fcn_000173e4 (r0, r1);
0x000129f0 b 0x12898 | goto label_5;
| label_15:
0x000129f4 str sb, [sp] | *(sp) = sb;
0x000129f8 mov r3, sl | r3 = sl;
0x000129fc ldr r2, [sp, 0x14] | r2 = var_14h;
0x00012a00 mov r1, r8 | r1 = r8;
0x00012a04 bl 0x23e0 | r0 = snprintf (r0, r1, r2, r3);
0x00012a08 cmp r0, r8 |
| if (r0 > r8) {
0x00012a0c blo 0x12a30 |
0x00012a10 mov r2, fp | r2 = fp;
0x00012a14 mov r1, 0x34c | r1 = 0x34c;
0x00012a18 mov r0, r7 | r0 = r7;
0x00012a1c bl 0x173e4 | fcn_000173e4 (r0, r1);
0x00012a20 mov r2, r6 | r2 = r6;
0x00012a24 ldr r1, [pc, 0x118] | r1 = *(0x12b40);
0x00012a28 mov r0, r7 | r0 = r7;
0x00012a2c b 0x128d4 | goto label_6;
| }
0x00012a30 add r1, sp, 0x20 | r1 += var_20h;
0x00012a34 mov r0, fp | r0 = fp;
0x00012a38 bl 0x2608 | r0 = lstat64 ();
0x00012a3c subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x00012a40 bne 0x12ac8 | goto label_16;
| }
0x00012a44 ldr r3, [sp, 0x30] | r3 = var_30h;
0x00012a48 and r3, r3, 0xf000 | r3 &= 0xf000;
0x00012a4c cmp r3, 0x8000 |
| if (r3 != 0x8000) {
0x00012a50 bne 0x12ac8 | goto label_16;
| }
0x00012a54 mov r0, sb | r0 = sb;
0x00012a58 bl 0x27d0 | strlen (r0);
0x00012a5c ldr r1, [pc, 0xe4] | r1 = *(0x12b44);
0x00012a60 add r2, r0, 1 | r2 = r0 + 1;
0x00012a64 mov r0, r7 | r0 = r7;
0x00012a68 bl 0x17228 | fcn_00017228 (r0, r1);
0x00012a6c ldr r2, [sp, 8] | r2 = var_8h;
0x00012a70 cmp r0, 0 |
0x00012a74 str r0, [r6, r2, lsl 2] | offset_0 = r2 << 2;
| *((r6 + offset_0)) = r0;
| if (r0 != 0) {
0x00012a78 bne 0x12a98 | goto label_17;
| }
0x00012a7c mov r2, fp | r2 = fp;
0x00012a80 ldr r1, [pc, 0xc4] | r1 = *(0x12b48);
0x00012a84 mov r0, r7 | r0 = r7;
0x00012a88 bl 0x173e4 | fcn_000173e4 (r0, r1);
0x00012a8c mov r2, r6 | r2 = r6;
0x00012a90 ldr r1, [pc, 0xb8] | r1 = *(0x12b4c);
0x00012a94 b 0x129e8 |
| } while (1);
| label_17:
0x00012a98 mov r1, sb | r1 = sb;
0x00012a9c bl 0x2338 | strcpy (r0, r1)
0x00012aa0 ldr r3, [sp, 8] | r3 = var_8h;
0x00012aa4 ldr r1, [pc, 0xa8] | r1 = *(0x12b50);
0x00012aa8 ldr r0, [r6, r3, lsl 2] | offset_1 = r3 << 2;
| r0 = *((r6 + offset_1));
0x00012aac add r1, pc, r1 | r1 = pc + r1;
0x00012ab0 bl 0x2590 | strstr (r0, r1);
0x00012ab4 ldr r3, [sp, 8] | r3 = var_8h;
0x00012ab8 add r3, r3, 1 | r3++;
0x00012abc str r3, [sp, 8] | var_8h = r3;
0x00012ac0 cmp r0, 0 |
| if (r0 == 0) {
0x00012ac4 strbne r8, [r0] | *(r0) = r8;
| }
| label_16:
0x00012ac8 ldr r0, [pc, 0x88] | r0 = *(0x12b54);
0x00012acc mov r2, fp | r2 = fp;
0x00012ad0 mov r1, 0x360 | r1 = 0x360;
0x00012ad4 add r0, pc, r0 | r0 = pc + r0;
0x00012ad8 bl 0x173e4 | fcn_000173e4 (r0, r1);
| label_14:
0x00012adc mov r0, r5 | r0 = r5;
0x00012ae0 bl 0x25e4 | r0 = readdir64 ();
0x00012ae4 subs sb, r0, 0 | sb = r0 - 0;
| if (sb != r0) {
0x00012ae8 bne 0x129a8 | goto label_7;
| }
| label_13:
0x00012aec ldr r3, [sp, 0x10] | r3 = var_10h;
0x00012af0 cmp r5, 0 |
0x00012af4 str r4, [r3] | *(r3) = r4;
0x00012af8 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00012afc str r6, [r3] | *(r3) = r6;
| if (r5 == 0) {
0x00012b00 beq 0x12830 | goto label_8;
| }
0x00012b04 b 0x128a0 | goto label_9;
| }
; 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/lib/libpaho-mqtt3c.so.1.3.9 @ 0x15660 */
| #include <stdint.h>
|
; (fcn) fcn.00015660 () | void fcn_00015660 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| void * s2;
| char * dest;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_20h;
| void * s;
| void * var_38h;
| int32_t var_3ch;
| r0 = arg1;
| r1 = arg2;
0x00015660 push {r4, r5, r6, r7, lr} |
0x00015664 sub sp, sp, 0x3c |
0x00015668 add r7, sp, 0x24 | r7 += s;
0x0001566c mov r4, r0 | r4 = r0;
0x00015670 mov r5, r1 | r5 = r1;
0x00015674 mov r6, r2 | r6 = r2;
0x00015678 mov r1, 0 | r1 = 0;
0x0001567c mov r2, 0x14 | r2 = 0x14;
0x00015680 mov r0, r7 | r0 = r7;
0x00015684 bl 0x2650 | memset (r0, r1, r2);
0x00015688 ldr r0, [pc, 0x15c] |
0x0001568c mov r2, 3 | r2 = 3;
0x00015690 add r0, pc, r0 | r0 = pc + r0;
0x00015694 ldr r1, [pc, 0x154] | r1 = *(0x157ec);
0x00015698 add r0, r0, 0x42 | r0 = 0x1582a;
0x0001569c bl 0x16b58 | fcn_00016b58 (r0, r1);
0x000156a0 ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
0x000156a4 cmp r3, 0 |
| if (r3 != 0) {
0x000156a8 beq 0x157a4 |
0x000156ac mov r3, 2 | r3 = 2;
0x000156b0 str r3, [sp, 0x18] | var_18h = r3;
0x000156b4 ldr r3, [pc, 0x138] | r3 = *(0x157f0);
0x000156b8 sub r2, r5, 0x3e8 | r2 = r5 - 0x3e8;
0x000156bc cmp r2, 0xf |
| if (r2 <= 0xf) {
0x000156c0 movhi r5, r3 | r5 = r3;
| }
0x000156c4 cmp r6, 0 |
| if (r6 != 0) {
0x000156c8 beq 0x156dc |
0x000156cc mov r0, r6 | r0 = r6;
0x000156d0 bl 0x27d0 | r0 = strlen (r0);
0x000156d4 add r0, r0, 2 | r0 += 2;
0x000156d8 str r0, [sp, 0x18] | var_18h = r0;
| }
0x000156dc ldr r0, [pc, 0x114] | r0 = *(0x157f4);
0x000156e0 ldr r2, [sp, 0x18] | r2 = var_18h;
0x000156e4 mov r1, 0x220 | r1 = 0x220;
0x000156e8 add r0, pc, r0 | r0 = pc + r0;
0x000156ec bl 0x17228 | r0 = fcn_00017228 (r0, r1);
0x000156f0 cmp r0, 0 |
0x000156f4 str r0, [sp, 0x14] | dest = r0;
| if (r0 == 0) {
0x000156f8 beq 0x157c8 | goto label_0;
| }
0x000156fc lsl r3, r5, 0x10 | r3 = r5 << 0x10;
0x00015700 lsr r3, r3, 0x18 | r3 >>= 0x18;
0x00015704 orr r3, r3, r5, lsl 8 | r3 |= (r5 << 8);
0x00015708 add r1, sp, 0x38 | r1 += var_38h;
0x0001570c strh r3, [r1, -0x26]! | *((r1 -= 0x26)) = r3;
0x00015710 mov r2, 2 | r2 = 2;
0x00015714 bl 0x2434 | memcpy (r0, r1, r2);
0x00015718 cmp r6, 0 |
| if (r6 != 0) {
0x0001571c beq 0x15730 |
0x00015720 ldr r0, [sp, 0x14] | r0 = dest;
0x00015724 mov r1, r6 | r1 = r6;
0x00015728 add r0, r0, 2 | r0 += 2;
0x0001572c bl 0x2338 | strcpy (r0, r1)
| }
0x00015730 add r3, sp, 0x18 | r3 += var_18h;
0x00015734 str r3, [sp] | *(sp) = r3;
0x00015738 mov r2, 8 | r2 = 8;
0x0001573c add r3, sp, 0x14 | r3 += dest;
0x00015740 mov r1, r4 | r1 = r4;
0x00015744 add r0, sp, 0x1c | r0 += var_1ch;
0x00015748 str r7, [sp, 4] | var_4h = r7;
0x0001574c bl 0x14f88 | fcn_00014f88 (r0, r1, r2, r3, r4);
0x00015750 add r3, sp, 0x38 | r3 += var_38h;
0x00015754 ldmdb r3, {r0, r1, r2, r3} | __asm ("ldmdb r3, {r0, r1, r2, r3}");
0x00015758 ldr r6, [sp, 0x1c] | r6 = var_1ch;
0x0001575c ldr r5, [pc, 0x98] | r5 = *(0x157f8);
0x00015760 stm sp, {r0, r1, r2, r3} | *(sp) = r0;
| *((sp + 4)) = r1;
| *((sp + 8)) = r2;
| *((sp + 12)) = r3;
0x00015764 ldr r3, [sp, 0x24] | r3 = s;
0x00015768 ldr r2, [sp, 0x20] | r2 = var_20h;
0x0001576c mov r1, r6 | r1 = r6;
0x00015770 add r5, pc, r5 | r5 = pc + r5;
0x00015774 ldr r0, [r4] | r0 = *(r4);
0x00015778 bl 0xd188 | fcn_0000d188 (r0, r1, r2, r3, r4);
0x0001577c mov r2, r6 | r2 = r6;
0x00015780 ldr r1, [pc, 0x78] | r1 = *(0x157fc);
0x00015784 mov r0, r5 | r0 = r5;
0x00015788 bl 0x173e4 | fcn_000173e4 (r0, r1);
0x0001578c mov r3, 0 | r3 = 0;
0x00015790 str r3, [r4, 0x24] | *((r4 + 0x24)) = r3;
0x00015794 ldr r2, [sp, 0x14] | r2 = dest;
0x00015798 ldr r1, [pc, 0x64] | r1 = *(0x15800);
0x0001579c mov r0, r5 | r0 = r5;
0x000157a0 bl 0x173e4 | fcn_000173e4 (r0, r1);
| }
0x000157a4 ldr r2, [r4, 0x28] | r2 = *((r4 + 0x28));
0x000157a8 cmp r2, 0 |
| if (r2 != 0) {
0x000157ac beq 0x157c8 |
0x000157b0 ldr r0, [pc, 0x50] | r0 = *(0x15804);
0x000157b4 ldr r1, [pc, 0x50] | r1 = *(0x15808);
0x000157b8 add r0, pc, r0 | r0 = pc + r0;
0x000157bc bl 0x173e4 | fcn_000173e4 (r0, r1);
0x000157c0 mov r3, 0 | r3 = 0;
0x000157c4 str r3, [r4, 0x28] | *((r4 + 0x28)) = r3;
| }
| label_0:
0x000157c8 ldr r0, [pc, 0x40] |
0x000157cc mov r3, 3 | r3 = 3;
0x000157d0 add r0, pc, r0 | r0 = pc + r0;
0x000157d4 mov r2, 0 | r2 = 0;
0x000157d8 ldr r1, [pc, 0x34] | r1 = *(0x15810);
0x000157dc add r0, r0, 0x42 | r0 = 0x1584e;
0x000157e0 bl 0x16c40 | fcn_00016c40 (r0, r1);
0x000157e4 add sp, sp, 0x3c |
0x000157e8 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/lib/libpaho-mqtt3c.so.1.3.9 @ 0x17228 */
| #include <stdint.h>
|
; (fcn) fcn.00017228 () | void fcn_00017228 (int32_t arg1, int32_t arg2) {
| int32_t var_8h;
| int32_t var_14h;
| r0 = arg1;
| r1 = arg2;
0x00017228 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001722c sub sp, sp, 0x14 |
0x00017230 mov r6, r2 | r6 = r2;
0x00017234 mov sb, r1 | sb = r1;
0x00017238 mov r8, r0 | r8 = r0;
0x0001723c bl 0x27d0 | r0 = strlen (r0);
0x00017240 mov r5, r0 | r5 = r0;
0x00017244 add r4, r0, 1 | r4 = r0 + 1;
0x00017248 ldr r0, [pc, 0x170] |
0x0001724c add r0, pc, r0 | r0 = pc + r0;
0x00017250 add r0, r0, 0x28 | r0 = 0x173e4;
0x00017254 bl 0x26b0 | fcn_000026b0 ();
0x00017258 ands r3, r6, 0xf | r3 = r6 & 0xf;
| if (r3 == r6) {
0x0001725c addne r2, r6, 0x10 | r2 = r6 + 0x10;
| }
0x00017260 mov r0, 0x10 | r0 = 0x10;
| if (r3 == r6) {
0x00017264 subne r6, r2, r3 | r6 = r2 - r3;
| }
0x00017268 bl 0x2464 | r0 = malloc (r0);
0x0001726c subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x00017270 bne 0x172a8 | goto label_2;
| }
0x00017274 ldr r2, [pc, 0x148] | r2 = *(0x173c0);
0x00017278 mov r1, 0xd | r1 = 0xd;
0x0001727c add r2, pc, r2 | r2 = pc + r2;
0x00017280 mov r0, 5 | r0 = 5;
0x00017284 bl 0xedec | fcn_0000edec (r0, r1);
0x00017288 mov r4, r7 | r4 = r7;
| do {
| label_1:
0x0001728c ldr r0, [pc, 0x134] |
0x00017290 add r0, pc, r0 | r0 = pc + r0;
0x00017294 add r0, r0, 0x28 | r0 = 0x173ec;
0x00017298 bl 0x27dc | fcn_000027dc ();
0x0001729c mov r0, r4 | r0 = r4;
0x000172a0 add sp, sp, 0x14 |
0x000172a4 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_2:
0x000172a8 mov sl, 0 | sl = 0;
0x000172ac mov r0, r4 | r0 = r4;
0x000172b0 str sl, [r7, 4] | *((r7 + 4)) = sl;
0x000172b4 str sl, [r7, 8] | *((r7 + 8)) = sl;
0x000172b8 str r6, [r7, 0xc] | *((r7 + 0xc)) = r6;
0x000172bc bl 0x2464 | r0 = malloc (r0);
0x000172c0 cmp r0, sl |
0x000172c4 mov r4, r0 | r4 = r0;
0x000172c8 str r0, [r7] | *(r7) = r0;
| if (r0 != sl) {
0x000172cc bne 0x172f0 | goto label_3;
| }
0x000172d0 ldr r2, [pc, 0xf4] | r2 = *(0x173c8);
0x000172d4 mov r1, 0xd | r1 = 0xd;
0x000172d8 add r2, pc, r2 | r2 = pc + r2;
0x000172dc mov r0, 5 | r0 = 5;
0x000172e0 bl 0xedec | fcn_0000edec (r0, r1);
| label_0:
0x000172e4 mov r0, r7 | r0 = r7;
0x000172e8 bl 0x2860 | free (r0);
0x000172ec b 0x1728c |
| } while (1);
| label_3:
0x000172f0 mov r1, r8 | r1 = r8;
0x000172f4 str sl, [r0] | *(r0) = sl;
0x000172f8 add fp, r6, 0x10 |
0x000172fc bl 0x2338 | strcpy (r0, r1)
0x00017300 str sb, [r7, 4] | *((r7 + 4)) = sb;
0x00017304 mov r0, fp | r0 = fp;
0x00017308 bl 0x2464 | r0 = malloc (r0);
0x0001730c cmp r0, 0 |
0x00017310 mov r4, r0 | r4 = r0;
0x00017314 str r0, [r7, 8] | *((r7 + 8)) = r0;
| if (r0 == 0) {
0x00017318 bne 0x1733c |
0x0001731c ldr r2, [pc, 0xac] | r2 = *(0x173cc);
0x00017320 mov r1, 0xd | r1 = 0xd;
0x00017324 add r2, pc, r2 | r2 = pc + r2;
0x00017328 mov r0, 5 | r0 = 5;
0x0001732c bl 0xedec | fcn_0000edec (r0, r1);
0x00017330 ldr r0, [r7] | r0 = *(r7);
0x00017334 bl 0x2860 | free (r0);
0x00017338 b 0x172e4 | goto label_0;
| }
0x0001733c mov r2, fp | r2 = fp;
0x00017340 mov r1, sl | r1 = sl;
0x00017344 bl 0x2650 | memset (r0, r1, r2);
0x00017348 ldr r2, [pc, 0x84] | r2 = *(0x173d0);
0x0001734c ldr r3, [pc, 0x84] | r3 = *(0x173d4);
0x00017350 add r1, r4, r6 | r1 = r4 + r6;
0x00017354 strd r2, r3, [r4] | __asm ("strd r2, r3, [r4]");
0x00017358 strd r2, r3, [r1, 8] | __asm ("strd r2, r3, [r1, 8]");
0x0001735c ldr r2, [pc, 0x78] | r2 = *(0x173d8);
0x00017360 str r4, [sp, 8] | var_8h = r4;
0x00017364 ldr r4, [pc, 0x74] | r4 = *(0x173dc);
0x00017368 add r5, r5, 0x21 | r5 += 0x21;
0x0001736c add r4, pc, r4 | r4 = pc + r4;
0x00017370 mov r3, r6 | r3 = r6;
0x00017374 add r2, pc, r2 | r2 = pc + r2;
0x00017378 mvn r1, 0 | r1 = ~0;
0x0001737c mov r0, 1 | r0 = 1;
0x00017380 add r5, r5, r6 | r5 += r6;
0x00017384 stm sp, {r8, sb} | *(sp) = r8;
| *((sp + 4)) = sb;
0x00017388 bl 0xedec | fcn_0000edec (r0, r1);
0x0001738c mov r2, r5 | r2 = r5;
0x00017390 mov r0, r4 | r0 = r4;
0x00017394 mov r1, r7 | r1 = r7;
0x00017398 bl 0xc43c | fcn_0000c43c (r0, r1);
0x0001739c ldr r2, [r4, 0x20] | r2 = *(0x173fc);
0x000173a0 ldr r3, [r4, 0x24] | r3 = *(0x17400);
0x000173a4 add r2, r6, r2 | r2 = r6 + r2;
0x000173a8 cmp r2, r3 |
0x000173ac str r2, [r4, 0x20] | *((r4 + 0x20)) = r2;
| if (r2 <= r3) {
0x000173b0 strhi r2, [r4, 0x24] | *((r4 + 0x24)) = r2;
| }
0x000173b4 ldr r4, [r7, 8] | r4 = *((r7 + 8));
0x000173b8 add r4, r4, 8 | r4 += 8;
0x000173bc b 0x1728c | 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/lib/libpaho-mqtt3c.so.1.3.9 @ 0x174b4 */
| #include <stdint.h>
|
; (fcn) fcn.000174b4 () | void fcn_000174b4 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| r0 = arg1;
| r1 = arg2;
0x000174b4 push {r0, r1, r2, r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000174b8 ldr r5, [pc, 0x16c] | r5 = *(0x17628);
0x000174bc mov r4, r2 | r4 = r2;
0x000174c0 add r5, pc, r5 | r5 = pc + r5;
0x000174c4 mov r8, r0 | r8 = r0;
0x000174c8 add r0, r5, 0x28 | r0 = r5 + 0x28;
0x000174cc mov sb, r1 | sb = r1;
0x000174d0 mov r6, r3 | r6 = r3;
0x000174d4 bl 0x26b0 | fcn_000026b0 ();
0x000174d8 mov r0, r5 | r0 = r5;
0x000174dc sub r1, r4, 8 | r1 = r4 - 8;
0x000174e0 bl 0xc92c | r0 = fcn_0000c92c (r0, r1);
0x000174e4 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x000174e8 bne 0x17530 | goto label_1;
| }
0x000174ec ldr r2, [pc, 0x13c] | r2 = *(0x1762c);
0x000174f0 str sb, [sp] | *(sp) = sb;
0x000174f4 mov r3, r8 | r3 = r8;
0x000174f8 add r2, pc, r2 | r2 = pc + r2;
0x000174fc mov r1, 0xd | r1 = 0xd;
0x00017500 mov r0, 5 | r0 = 5;
0x00017504 bl 0xedec | fcn_0000edec (r0, r1);
0x00017508 mov r4, r5 | r4 = r5;
| do {
| label_0:
0x0001750c ldr r0, [pc, 0x120] |
0x00017510 add r0, pc, r0 | r0 = pc + r0;
0x00017514 add r0, r0, 0x28 | r0 = 0x17658;
0x00017518 bl 0x27dc | fcn_000027dc ();
0x0001751c cmp r4, 0 |
| if (r4 == 0) {
0x00017520 addne r4, r4, 8 | r4 += 8;
| }
0x00017524 mov r0, r4 | r0 = r4;
0x00017528 add sp, sp, 0xc |
0x0001752c pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_1:
0x00017530 mov r0, r8 | r0 = r8;
0x00017534 bl 0x27d0 | strlen (r0);
0x00017538 mov r2, r4 | r2 = r4;
0x0001753c ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00017540 mov r1, sb | r1 = sb;
0x00017544 mov sl, r0 | sl = r0;
0x00017548 mov r0, r8 | r0 = r8;
0x0001754c bl 0x17084 | fcn_00017084 (r0, r1);
0x00017550 ldr r2, [pc, 0xe0] | r2 = *(0x17634);
0x00017554 ands r3, r6, 0xf | r3 = r6 & 0xf;
0x00017558 add r2, pc, r2 | r2 = pc + r2;
| if (r3 == r6) {
0x0001755c addne r6, r6, 0x10 | r6 += 0x10;
| }
| if (r3 == r6) {
0x00017560 subne r6, r6, r3 | r6 -= r3;
| }
0x00017564 ldr r1, [r5, 0xc] | r1 = *((r5 + 0xc));
0x00017568 ldr r3, [r2, 0x20] | r3 = *(0x17654);
0x0001756c ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x00017570 sub r3, r3, r1 | r3 -= r1;
0x00017574 ldr r1, [r2, 0x24] | r1 = *(0x17658);
0x00017578 add r3, r3, r6 | r3 += r6;
0x0001757c cmp r3, r1 |
0x00017580 add r1, r6, 0x10 | r1 = r6 + 0x10;
| if (r3 <= r1) {
0x00017584 strhi r3, [r2, 0x24] | *((r2 + 0x24)) = r3;
| }
0x00017588 str r3, [r2, 0x20] | *((r2 + 0x20)) = r3;
0x0001758c bl 0x25d8 | r0 = realloc (r0, r1);
0x00017590 cmp r0, 0 |
0x00017594 mov r4, r0 | r4 = r0;
0x00017598 str r0, [r5, 8] | *((r5 + 8)) = r0;
| if (r0 != 0) {
0x0001759c bne 0x175b8 | goto label_2;
| }
0x000175a0 ldr r2, [pc, 0x94] | r2 = *(0x17638);
0x000175a4 mov r1, 0xd | r1 = 0xd;
0x000175a8 add r2, pc, r2 | r2 = pc + r2;
0x000175ac mov r0, 5 | r0 = 5;
0x000175b0 bl 0xedec | fcn_0000edec (r0, r1);
0x000175b4 b 0x1750c |
| } while (1);
| label_2:
0x000175b8 ldr r2, [r5, 0xc] | r2 = *((r5 + 0xc));
0x000175bc add sl, sl, 1 | sl++;
0x000175c0 rsb r2, r2, 0x20 | r2 = 0x20 - r2;
0x000175c4 ldr r3, [pc, 0x74] | r3 = *(0x1763c);
0x000175c8 add r7, r2, sl | r7 = r2 + sl;
0x000175cc ldr r2, [pc, 0x70] | r2 = *(0x17640);
0x000175d0 add r4, r0, r6 | r4 = r0 + r6;
0x000175d4 strd r2, r3, [r0] | __asm ("strd r2, r3, [r0]");
0x000175d8 strd r2, r3, [r4, 8] | __asm ("strd r2, r3, [r4, 8]");
0x000175dc ldr r4, [r5] | r4 = *(r5);
0x000175e0 str r6, [r5, 0xc] | *((r5 + 0xc)) = r6;
0x000175e4 mov r0, r4 | r0 = r4;
0x000175e8 bl 0x27d0 | strlen (r0);
0x000175ec mov r1, sl | r1 = sl;
0x000175f0 add r6, r7, r6 | r6 = r7 + r6;
0x000175f4 mov fp, r0 |
0x000175f8 mov r0, r4 | r0 = r4;
0x000175fc bl 0x25d8 | realloc (r0, r1);
0x00017600 mov r1, r8 | r1 = r8;
0x00017604 str r0, [r5] | *(r5) = r0;
0x00017608 bl 0x2338 | strcpy (r0, r1)
0x0001760c ldr r0, [pc, 0x34] | r0 = *(0x17644);
0x00017610 str sb, [r5, 4] | *((r5 + 4)) = sb;
0x00017614 sub r2, r6, fp | r2 = r6 - fp;
0x00017618 mov r1, r5 | r1 = r5;
0x0001761c add r0, pc, r0 | r0 = pc + r0;
0x00017620 ldr r4, [r5, 8] | r4 = *((r5 + 8));
0x00017624 bl 0xc43c | fcn_0000c43c (r0, r1);
0x00017628 b 0x1750c | goto label_0;
| }
[*] Function strcpy used 11 times libpaho-mqtt3c.so.1.3.9