[*] Binary protection state of libpaho-mqtt3cs.so.1.3.9
Partial RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function printf tear down of libpaho-mqtt3cs.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-mqtt3cs.so.1.3.9 @ 0x9624 */
| #include <stdint.h>
|
; (fcn) fcn.00009624 () | uint32_t fcn_00009624 (uint32_t arg1) {
| r0 = arg1;
0x00009624 cmp r0, 2 |
0x00009628 mov r3, r0 | r3 = r0;
| if (r0 == 2) {
0x0000962c beq 0x9674 | goto label_1;
| }
0x00009630 cmp r0, 0x300 |
| if (r0 == 0x300) {
0x00009634 beq 0x9694 | goto label_2;
| }
0x00009638 ldr r2, [pc, 0x5c] | r2 = *(0x9698);
0x0000963c cmp r0, r2 |
| if (r0 != r2) {
0x00009640 moveq r1, 2 | r1 = 2;
| }
0x00009644 beq 0x9678 |
| while (1) {
0x00009648 push {r4, lr} |
0x0000964c ldr r4, [pc, 0x4c] |
0x00009650 ldr r2, [pc, 0x4c] | r2 = *(0x96a0);
0x00009654 add r4, pc, r4 | r4 = pc + r4;
0x00009658 add r4, r4, 0x7c | r4 = 0x9718;
0x0000965c add r2, pc, r2 | r2 = pc + r2;
0x00009660 mov r1, 0x14 | r1 = 0x14;
0x00009664 mov r0, r4 | r0 = r4;
0x00009668 bl 0x360c | snprintf (r0, r1, r2, r3)
0x0000966c mov r0, r4 | r0 = r4;
0x00009670 pop {r4, pc} |
| label_1:
0x00009674 mov r1, 0 | r1 = 0;
| label_0:
0x00009678 ldr r2, [pc, 0x28] | r2 = *(0x96a4);
0x0000967c add r2, pc, r2 | r2 = pc + r2;
0x00009680 add r2, r2, r1, lsl 3 | r2 += (r1 << 3);
0x00009684 ldr r0, [r2, 0x1a4] | r0 = *((r2 + 0x1a4));
0x00009688 cmp r0, 0 |
| if (r0 == 0) {
0x0000968c bxne lr | return r0;
| }
0x00009690 b 0x9648 |
| }
| label_2:
0x00009694 mov r1, 1 | r1 = 1;
0x00009698 b 0x9678 | 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-mqtt3cs.so.1.3.9 @ 0x11bd4 */
| #include <stdint.h>
|
; (fcn) fcn.00011bd4 () | void fcn_00011bd4 (int32_t arg1) {
| r0 = arg1;
0x00011bd4 push {r4, r5, r6, r7, r8, lr} |
0x00011bd8 ldr r6, [pc, 0x74] | r6 = *(0x11c50);
0x00011bdc mov r5, r0 | r5 = r0;
0x00011be0 add r6, pc, r6 | r6 = pc + r6;
0x00011be4 add r4, r6, 0x8c | r4 = r6 + 0x8c;
0x00011be8 mov r0, r4 | r0 = r4;
0x00011bec bl 0x35dc | strlen (r0);
0x00011bf0 mov r2, r4 | r2 = r4;
0x00011bf4 add r1, r5, 4 | r1 = r5 + 4;
0x00011bf8 mov r3, 0x2f | r3 = 0x2f;
0x00011bfc rsb r7, r0, 0x39 | r7 = 0x39 - r0;
0x00011c00 ldrh r0, [r5] | r0 = *(r5);
0x00011c04 bl 0x3b64 | inet_ntop ();
0x00011c08 mov r0, r4 | r0 = r4;
0x00011c0c bl 0x35dc | strlen (r0);
0x00011c10 ldrh r2, [r5, 2] | r2 = *((r5 + 2));
0x00011c14 mov r1, r7 | r1 = r7;
0x00011c18 lsr r3, r2, 8 | r3 = r2 >> 8;
0x00011c1c orr r3, r3, r2, lsl 8 | r3 |= (r2 << 8);
0x00011c20 ldr r2, [pc, 0x30] | r2 = "t_c_v1.3.9_src_LinkedList.c";
0x00011c24 lsl r3, r3, 0x10 | r3 <<= 0x10;
0x00011c28 lsr r3, r3, 0x10 | r3 >>= 0x10;
0x00011c2c add r2, pc, r2 | r2 = pc + r2;
0x00011c30 add r0, r4, r0 | r0 = r4 + r0;
0x00011c34 bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
0x00011c38 cmp r0, r7 |
0x00011c3c ldr r0, [pc, 0x18] |
| if (r0 < r7) {
0x00011c40 movhs r3, 0 | r3 = 0;
| }
0x00011c44 add r0, pc, r0 | r0 = pc + r0;
| if (r0 < r7) {
0x00011c48 strbhs r3, [r6, 0xc4] | *((r6 + 0xc4)) = r3;
| }
0x00011c4c add r0, r0, 0x8c | r0 = 0x11ce4;
0x00011c50 pop {r4, r5, r6, r7, r8, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/lib/libpaho-mqtt3cs.so.1.3.9 @ 0x11fb0 */
| #include <stdint.h>
|
; (fcn) fcn.00011fb0 () | void fcn_00011fb0 (uint32_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;
| r0 = arg1;
| r1 = arg2;
0x00011fb0 ldr r2, [pc, 0x188] | r2 = *(0x1213c);
0x00011fb4 add r2, pc, r2 | r2 = pc + r2;
0x00011fb8 ldr r3, [r2, 0x14] | r3 = *(0x12150);
0x00011fbc cmn r3, 1 |
| if (r3 != 1) {
0x00011fc0 ldreq r3, [r2, 4] | r3 = *((r2 + 4));
| }
0x00011fc4 cmp r3, r0 |
| if (r3 <= r0) {
0x00011fc8 movgt r3, 0 | r3 = 0;
| }
| if (r3 > r0) {
0x00011fcc movle r3, 1 | r3 = 1;
| }
0x00011fd0 cmp r3, 0 |
| if (r3 != 0) {
0x00011fd4 bxeq lr | return;
| }
0x00011fd8 ldr r3, [pc, 0x164] | r3 = "ue";
0x00011fdc push {r4, r5, r6, r7, r8, lr} |
0x00011fe0 add r3, pc, r3 | r3 = pc + r3;
0x00011fe4 ldr r2, [r3] | r2 = "ue";
0x00011fe8 sub sp, sp, 0x18 |
0x00011fec cmp r2, 0 |
0x00011ff0 mov r4, r1 | r4 = r1;
0x00011ff4 mov r7, r0 | r7 = r0;
| if (r2 == 0) {
0x00011ff8 bne 0x12008 |
0x00011ffc ldr r5, [r3, 0x10] | r5 = *((r3 + 0x10));
0x00012000 cmp r5, 0 |
| if (r5 == 0) {
0x00012004 beq 0x120a0 | goto label_0;
| }
| }
0x00012008 mov r0, r4 | r0 = r4;
0x0001200c bl 0x3774 | localtime (r0);
0x00012010 ldr r6, [pc, 0x130] |
0x00012014 ldr r2, [pc, 0x130] | r2 = ":__";
0x00012018 add r6, pc, r6 | r6 = pc + r6;
0x0001201c add r5, r6, 0x2b | r5 = r6 + 0x2b;
0x00012020 add r2, pc, r2 | r2 = pc + r2;
0x00012024 mov r1, 0x50 | r1 = 0x50;
0x00012028 add r8, r6, 0x24 | r8 = r6 + 0x24;
0x0001202c mov r3, r0 | r3 = r0;
0x00012030 mov r0, r5 | r0 = r5;
0x00012034 bl 0x33a8 | strftime (r0, r1, r2, r3);
0x00012038 mov r1, 0x3e8 | r1 = 0x3e8;
0x0001203c ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x00012040 bl 0x1b274 | fcn_0001b274 (r0, r1);
0x00012044 ldr r2, [pc, 0x104] | r2 = *(0x1214c);
0x00012048 ldr r1, [pc, 0x104] | r1 = *(0x12150);
0x0001204c add r2, pc, r2 | r2 = pc + r2;
0x00012050 mov r3, r0 | r3 = r0;
0x00012054 add r0, r6, 0x3a | r0 = r6 + 0x3a;
0x00012058 bl 0x360c | snprintf (r0, r1, r2, r3)
0x0001205c ldr r2, [pc, 0xf4] | r2 = *(0x12154);
0x00012060 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00012064 mov r0, r8 | r0 = r8;
0x00012068 add r2, pc, r2 | r2 = pc + r2;
0x0001206c mov r1, 0x200 | r1 = 0x200;
0x00012070 bl 0x360c | snprintf (r0, r1, r2, r3)
0x00012074 mov r3, 0x20 | r3 = 0x20;
0x00012078 strb r3, [r6, 0x2a] | *((r6 + 0x2a)) = r3;
0x0001207c ldr r3, [r4, 0x120] | r3 = *((r4 + 0x120));
0x00012080 add r8, r4, 0x18 | r8 = r4 + 0x18;
0x00012084 cmp r3, 2 |
0x00012088 add r6, r6, 0x3f | r6 = 0x12183;
| if (r3 != 2) {
0x0001208c bne 0x120b4 | goto label_1;
| }
0x00012090 ldr r2, [pc, 0xc4] | r2 = *(0x12158);
0x00012094 mov r1, r8 | r1 = r8;
0x00012098 mov r0, r6 | r0 = r6;
0x0001209c bl 0x37ec | strncpy (r0, r1, r2);
| do {
| label_0:
0x000120a0 mov r1, r5 | r1 = r5;
0x000120a4 mov r0, r7 | r0 = r7;
0x000120a8 add sp, sp, 0x18 |
0x000120ac pop {r4, r5, r6, r7, r8, lr} |
0x000120b0 b 0x11cc0 | void (*0x11cc0)() ();
| label_1:
0x000120b4 ldr r1, [r4, 0x128] | r1 = *((r4 + 0x128));
0x000120b8 ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x000120bc bl 0xf958 | fcn_0000f958 (r0, r1);
0x000120c0 ldr r3, [r4, 0x120] | r3 = *((r4 + 0x120));
0x000120c4 ldr r1, [r4, 0x11c] | r1 = *((r4 + 0x11c));
0x000120c8 cmp r3, 1 |
0x000120cc ldr r3, [r4, 0x14] | r3 = *((r4 + 0x14));
0x000120d0 mov r2, r0 | r2 = r0;
| if (r3 != 1) {
0x000120d4 bne 0x12110 | goto label_2;
| }
0x000120d8 ldr r0, [r4, 0x124] | r0 = *((r4 + 0x124));
0x000120dc str r1, [sp, 0x10] | var_10h = r1;
0x000120e0 ldr r1, [pc, 0x78] | r1 = *(0x1215c);
0x000120e4 str r0, [sp, 0x14] | var_14h = r0;
0x000120e8 add r1, pc, r1 | r1 = pc + r1;
0x000120ec str r1, [sp, 4] | var_4h = r1;
0x000120f0 str r8, [sp, 0xc] | var_ch = r8;
0x000120f4 str r3, [sp, 8] | var_8h = r3;
0x000120f8 str r3, [sp] | *(sp) = r3;
0x000120fc ldr r1, [pc, 0x58] | r1 = *(0x12158);
0x00012100 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00012104 mov r0, r6 | r0 = r6;
0x00012108 bl 0x360c | snprintf (r0, r1, r2, r3)
0x0001210c b 0x120a0 |
| } while (1);
| label_2:
0x00012110 str r1, [sp, 0x10] | var_10h = r1;
0x00012114 ldr r1, [pc, 0x48] | r1 = *(0x12160);
0x00012118 str r8, [sp, 0xc] | var_ch = r8;
0x0001211c add r1, pc, r1 | r1 = pc + r1;
0x00012120 str r1, [sp, 4] | var_4h = r1;
0x00012124 str r3, [sp, 8] | var_8h = r3;
0x00012128 str r3, [sp] | *(sp) = r3;
0x0001212c ldr r1, [pc, 0x28] | r1 = *(0x12158);
0x00012130 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00012134 mov r0, r6 | r0 = r6;
0x00012138 bl 0x360c | snprintf (r0, r1, r2, r3)
0x0001213c b 0x120a0 | 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-mqtt3cs.so.1.3.9 @ 0x12168 */
| #include <stdint.h>
|
; (fcn) fcn.00012168 () | void fcn_00012168 (int32_t arg1) {
| int32_t var_0h;
| int32_t var_8h;
| int32_t var_70h;
| r0 = arg1;
0x00012168 ldr r3, [pc, 0x3f8] | r3 = *(0x12564);
0x0001216c push {r4, r5, r6, r7, r8, lr} |
0x00012170 ldr r4, [pc, 0x3f4] | r4 = "_";
0x00012174 add r3, pc, r3 | r3 = pc + r3;
0x00012178 ldr r6, [r3, 8] | r6 = *(0x1256c);
0x0001217c mov r3, 0x12c | r3 = 0x12c;
0x00012180 sub sp, sp, 0x70 |
0x00012184 mov r5, r0 | r5 = r0;
0x00012188 mul r0, r6, r3 | r0 = r6 * r3;
0x0001218c bl 0x3558 | malloc (r0);
0x00012190 ldr r7, [pc, 0x3d8] | r7 = *(0x1256c);
0x00012194 add r4, pc, r4 | r4 = pc + r4;
0x00012198 add r7, pc, r7 | r7 = pc + r7;
0x0001219c cmp r0, 0 |
0x000121a0 str r0, [r4, 0x1c] | *((r4 + 0x1c)) = r0;
| if (r0 == 0) {
0x000121a4 beq 0x123f0 | goto label_6;
| }
0x000121a8 ldr r0, [pc, 0x3c4] | r0 = "ket:_exceeded_FD_SETSIZE__d";
0x000121ac str r6, [r4, 0x18] | *((r4 + 0x18)) = r6;
0x000121b0 add r0, pc, r0 | r0 = pc + r0;
0x000121b4 bl 0x3444 | r0 = getenv (r0);
0x000121b8 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x000121bc beq 0x121f8 | goto label_0;
| }
0x000121c0 ldrb r3, [r6] | r3 = *(r6);
0x000121c4 cmp r3, 0 |
| if (r3 == 0) {
0x000121c8 beq 0x121f8 | goto label_0;
| }
0x000121cc ldr r1, [pc, 0x3a4] | r1 = *(0x12574);
0x000121d0 add r1, pc, r1 | r1 = pc + r1;
0x000121d4 bl 0x3a5c | r0 = strcmp (r0, r1);
0x000121d8 cmp r0, 0 |
0x000121dc bne 0x12374 |
| while (r0 == 0) {
0x000121e0 ldr r3, [pc, 0x394] | r3 = *(0x12578);
0x000121e4 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x000121e8 ldr r2, [r3] | r2 = *(0x12578);
0x000121ec ldr r3, [pc, 0x38c] | r3 = *(0x1257c);
0x000121f0 add r3, pc, r3 | r3 = pc + r3;
0x000121f4 str r2, [r3] | *(r3) = r2;
| label_0:
0x000121f8 ldr r0, [pc, 0x384] | r0 = "estored_for_client__s";
0x000121fc add r0, pc, r0 | r0 = pc + r0;
0x00012200 bl 0x3444 | r0 = getenv (r0);
0x00012204 subs r3, r0, 0 | r3 = r0 - 0;
| if (r3 != r0) {
0x00012208 beq 0x12230 |
0x0001220c ldrb r3, [r3] | r3 = *(r3);
0x00012210 cmp r3, 0 |
| if (r3 == 0) {
0x00012214 beq 0x12230 | goto label_1;
| }
0x00012218 bl 0x3ac8 | r0 = atoi (r0);
0x0001221c cmp r0, 0 |
| if (r0 <= 0) {
0x00012220 ble 0x12428 | goto label_7;
| }
0x00012224 ldr r3, [pc, 0x35c] | r3 = *(0x12584);
0x00012228 add r3, pc, r3 | r3 = pc + r3;
0x0001222c str r0, [r3] | *(r3) = r0;
| }
| label_1:
0x00012230 ldr r0, [pc, 0x354] | r0 = "NT_TRACE";
0x00012234 add r0, pc, r0 | r0 = pc + r0;
0x00012238 bl 0x3444 | r0 = getenv (r0);
0x0001223c subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x00012240 beq 0x1228c |
0x00012244 ldrb r3, [r4] | r3 = *(r4);
0x00012248 cmp r3, 0 |
| if (r3 == 0) {
0x0001224c beq 0x1228c | goto label_3;
| }
0x00012250 ldr r1, [pc, 0x338] | r1 = *(0x1258c);
0x00012254 add r1, pc, r1 | r1 = pc + r1;
0x00012258 bl 0x3a5c | r0 = strcmp (r0, r1);
0x0001225c cmp r0, 0 |
| if (r0 != 0) {
0x00012260 beq 0x1227c |
0x00012264 ldr r1, [pc, 0x328] | r1 = *(0x12590);
0x00012268 mov r0, r4 | r0 = r4;
0x0001226c add r1, pc, r1 | r1 = pc + r1;
0x00012270 bl 0x3a5c | r0 = strcmp (r0, r1);
0x00012274 cmp r0, 0 |
| if (r0 != 0) {
0x00012278 bne 0x1243c | goto label_8;
| }
| }
0x0001227c ldr r3, [pc, 0x314] | r3 = *(0x12594);
0x00012280 mov r2, 1 | r2 = 1;
0x00012284 add r3, pc, r3 | r3 = pc + r3;
| label_2:
0x00012288 str r2, [r3, 4] | *((r3 + 4)) = r2;
| }
| label_3:
0x0001228c ldr r1, [pc, 0x308] | r1 = "turn_code__d_from_write_select";
0x00012290 mov r0, 3 | r0 = 3;
0x00012294 add r1, pc, r1 | r1 = pc + r1;
0x00012298 bl 0x11cc0 | fcn_00011cc0 (r0, r1);
0x0001229c ldr r1, [pc, 0x2fc] | r1 = *(0x1259c);
0x000122a0 mov r0, 3 | r0 = 3;
0x000122a4 add r1, pc, r1 | r1 = pc + r1;
0x000122a8 bl 0x11cc0 | fcn_00011cc0 (r0, r1);
0x000122ac cmp r5, 0 |
| if (r5 != 0) {
0x000122b0 beq 0x122dc |
0x000122b4 add r4, r5, 8 | r4 = r5 + 8;
0x000122b8 ldr r5, [pc, 0x2e4] |
0x000122bc ldr r6, [pc, 0x2e4] | r6 = "nt_messages_and__d_received_messages_restored_for_client__s";
0x000122c0 add r5, pc, r5 | r5 = pc + r5;
0x000122c4 add r6, pc, r6 | r6 = pc + r6;
0x000122c8 add r5, r5, 0x24 | r5 = 0x125c4;
| label_5:
0x000122cc add r4, r4, 8 | r4 += 8;
0x000122d0 ldr r3, [r4, -0x10] | r3 = *((r4 - 0x10));
0x000122d4 cmp r3, 0 |
| if (r3 != 0) {
0x000122d8 bne 0x12540 | goto label_9;
| }
| }
0x000122dc ldr r4, [pc, 0x2c8] | r4 = *(0x125a8);
0x000122e0 add r1, sp, 8 | r1 += var_8h;
0x000122e4 add r4, pc, r4 | r4 = pc + r4;
0x000122e8 mov r0, r4 | r0 = r4;
0x000122ec bl 0x3660 | r0 = stat64 ();
0x000122f0 cmn r0, 1 |
| if (r0 != 1) {
0x000122f4 beq 0x12360 |
0x000122f8 ldr r1, [pc, 0x2b0] | r1 = *(0x125ac);
0x000122fc mov r0, r4 | r0 = r4;
0x00012300 add r1, pc, r1 | r1 = pc + r1;
0x00012304 bl 0x3594 | r0 = fopen64 ();
0x00012308 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x0001230c beq 0x12360 | goto label_10;
| }
0x00012310 ldr r4, [pc, 0x29c] |
0x00012314 ldr r1, [pc, 0x29c] | r1 = "t_kt400_output_build_paho_mqtt_c_v1.3.9_src_MQTTPersistence.c";
0x00012318 add r4, pc, r4 | r4 = pc + r4;
0x0001231c add r4, r4, 0x24 | r4 = 0x125d4;
0x00012320 add r1, pc, r1 | r1 = pc + r1;
0x00012324 mov r0, r4 | r0 = r4;
0x00012328 bl 0x3b94 | strcpy (r0, r1);
0x0001232c mov r0, r4 | r0 = r4;
0x00012330 bl 0x35dc | strlen (r0);
0x00012334 mov r2, r5 | r2 = r5;
0x00012338 rsb r1, r0, 0x200 | r1 = 0x200 - r0;
0x0001233c add r0, r4, r0 | r0 = r4 + r0;
0x00012340 bl 0x37c8 | r0 = fgets (r0, r1, r2);
0x00012344 cmp r0, 0 |
| if (r0 != 0) {
0x00012348 beq 0x12358 |
0x0001234c mov r1, r4 | r1 = r4;
0x00012350 mov r0, 3 | r0 = 3;
0x00012354 bl 0x11cc0 | fcn_00011cc0 (r0, r1);
| }
0x00012358 mov r0, r5 | r0 = r5;
0x0001235c bl 0x36a8 | fclose (r0);
| }
| label_10:
0x00012360 ldr r1, [pc, 0x254] | r1 = *(0x125b8);
0x00012364 mov r0, 3 | r0 = 3;
0x00012368 add r1, pc, r1 | r1 = pc + r1;
0x0001236c bl 0x11cc0 | fcn_00011cc0 (r0, r1);
0x00012370 b 0x123f0 | goto label_6;
0x00012374 ldr r1, [pc, 0x244] | r1 = *(0x125bc);
0x00012378 mov r0, r6 | r0 = r6;
0x0001237c add r1, pc, r1 | r1 = pc + r1;
0x00012380 bl 0x3594 | r0 = fopen64 ();
0x00012384 cmp r0, 0 |
0x00012388 str r0, [r4] | *(r4) = r0;
0x0001238c beq 0x121e0 |
| }
0x00012390 mov r0, r6 | r0 = r6;
0x00012394 bl 0x35dc | r0 = strlen (r0);
0x00012398 add r0, r0, 1 | r0++;
0x0001239c bl 0x3558 | r0 = malloc (r0);
0x000123a0 cmp r0, 0 |
0x000123a4 mov r7, r0 | r7 = r0;
0x000123a8 str r0, [r4, 0xc] | *((r4 + 0xc)) = r0;
| if (r0 != 0) {
0x000123ac ldreq r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
| }
| if (r0 != 0) {
0x000123b0 beq 0x123ec |
0x000123b4 mov r1, r6 | r1 = r6;
0x000123b8 bl 0x3b94 | strcpy (r0, r1);
0x000123bc mov r0, r6 | r0 = r6;
0x000123c0 bl 0x35dc | r0 = strlen (r0);
0x000123c4 add r6, r0, 3 | r6 = r0 + 3;
0x000123c8 mov r8, r0 | r8 = r0;
0x000123cc mov r0, r6 | r0 = r6;
0x000123d0 bl 0x3558 | r0 = malloc (r0);
0x000123d4 cmp r0, 0 |
0x000123d8 str r0, [r4, 8] | *((r4 + 8)) = r0;
| if (r0 != 0) {
0x000123dc bne 0x123fc | goto label_11;
| }
0x000123e0 ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
0x000123e4 bl 0x3abc | free (r0);
0x000123e8 mov r0, r7 | r0 = r7;
| }
0x000123ec bl 0x3abc | free (r0);
| label_6:
0x000123f0 mvn r0, 0 | r0 = ~0;
0x000123f4 add sp, sp, 0x70 |
0x000123f8 pop {r4, r5, r6, r7, r8, pc} |
| label_11:
0x000123fc ldr r2, [pc, 0x1c0] | r2 = *(0x125c0);
0x00012400 mov r3, r7 | r3 = r7;
0x00012404 add r2, pc, r2 | r2 = pc + r2;
0x00012408 mov r1, r6 | r1 = r6;
0x0001240c bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
0x00012410 cmp r0, r6 |
| if (r0 < r6) {
0x00012414 ldrhs r0, [r4, 8] | r0 = *((r4 + 8));
| }
| if (r0 < r6) {
0x00012418 movhs r3, 0 | r3 = 0;
| }
| if (r0 < r6) {
0x0001241c addhs r0, r0, r8 | r0 += r8;
| }
| if (r0 < r6) {
0x00012420 strbhs r3, [r0, 2] | *((r0 + 2)) = r3;
| }
0x00012424 b 0x121f8 | goto label_0;
| label_7:
0x00012428 ldr r3, [pc, 0x198] | r3 = *(0x125c4);
0x0001242c mov r2, 0x3e8 | r2 = 0x3e8;
0x00012430 add r3, pc, r3 | r3 = pc + r3;
0x00012434 str r2, [r3] | *(r3) = r2;
0x00012438 b 0x12230 | goto label_1;
| label_8:
0x0001243c ldr r1, [pc, 0x188] | r1 = "te_for_socket__d";
0x00012440 mov r0, r4 | r0 = r4;
0x00012444 add r1, pc, r1 | r1 = pc + r1;
0x00012448 bl 0x3a5c | r0 = strcmp (r0, r1);
0x0001244c cmp r0, 0 |
| if (r0 != 0) {
0x00012450 beq 0x1246c |
0x00012454 ldr r1, [pc, 0x174] | r1 = *(0x125cc);
0x00012458 mov r0, r4 | r0 = r4;
0x0001245c add r1, pc, r1 | r1 = pc + r1;
0x00012460 bl 0x3a5c | r0 = strcmp (r0, r1);
0x00012464 cmp r0, 0 |
| if (r0 != 0) {
0x00012468 bne 0x1247c | goto label_12;
| }
| }
0x0001246c ldr r3, [pc, 0x160] | r3 = *(0x125d0);
0x00012470 mov r2, 2 | r2 = 2;
0x00012474 add r3, pc, r3 | r3 = pc + r3;
0x00012478 b 0x12288 | goto label_2;
| label_12:
0x0001247c ldr r1, [pc, 0x154] | r1 = "y_written_on_socket__d";
0x00012480 mov r0, r4 | r0 = r4;
0x00012484 add r1, pc, r1 | r1 = pc + r1;
0x00012488 bl 0x3a5c | r0 = strcmp (r0, r1);
0x0001248c cmp r0, 0 |
| if (r0 != 0) {
0x00012490 beq 0x124ac |
0x00012494 ldr r1, [pc, 0x140] | r1 = *(0x125d8);
0x00012498 mov r0, r4 | r0 = r4;
0x0001249c add r1, pc, r1 | r1 = pc + r1;
0x000124a0 bl 0x3a5c | r0 = strcmp (r0, r1);
0x000124a4 cmp r0, 0 |
| if (r0 != 0) {
0x000124a8 bne 0x124bc | goto label_13;
| }
| }
0x000124ac ldr r3, [pc, 0x12c] | r3 = *(0x125dc);
0x000124b0 mov r2, 3 | r2 = 3;
0x000124b4 add r3, pc, r3 | r3 = pc + r3;
0x000124b8 b 0x12288 | goto label_2;
| label_13:
0x000124bc ldr r1, [pc, 0x120] | r1 = "s_already_pending_output";
0x000124c0 mov r0, r4 | r0 = r4;
0x000124c4 add r1, pc, r1 | r1 = pc + r1;
0x000124c8 bl 0x3a5c | r0 = strcmp (r0, r1);
0x000124cc cmp r0, 0 |
| if (r0 != 0) {
0x000124d0 beq 0x124ec |
0x000124d4 ldr r1, [pc, 0x10c] | r1 = *(0x125e4);
0x000124d8 mov r0, r4 | r0 = r4;
0x000124dc add r1, pc, r1 | r1 = pc + r1;
0x000124e0 bl 0x3a5c | r0 = strcmp (r0, r1);
0x000124e4 cmp r0, 0 |
| if (r0 != 0) {
0x000124e8 bne 0x12500 | goto label_14;
| }
| }
0x000124ec ldr r3, [pc, 0xf8] | r3 = *(0x125e8);
0x000124f0 mov r2, 4 | r2 = 4;
0x000124f4 add r3, pc, r3 | r3 = pc + r3;
| label_4:
0x000124f8 str r2, [r3, 0x14] | *((r3 + 0x14)) = r2;
0x000124fc b 0x1228c | goto label_3;
| label_14:
0x00012500 ldr r1, [pc, 0xe8] | r1 = "writev___putdatas";
0x00012504 mov r0, r4 | r0 = r4;
0x00012508 add r1, pc, r1 | r1 = pc + r1;
0x0001250c bl 0x3a5c | r0 = strcmp (r0, r1);
0x00012510 cmp r0, 0 |
| if (r0 == 0) {
0x00012514 beq 0x12530 | goto label_15;
| }
0x00012518 ldr r1, [pc, 0xd4] | r1 = *(0x125f0);
0x0001251c mov r0, r4 | r0 = r4;
0x00012520 add r1, pc, r1 | r1 = pc + r1;
0x00012524 bl 0x3a5c | r0 = strcmp (r0, r1);
0x00012528 cmp r0, 0 |
| if (r0 != 0) {
0x0001252c bne 0x1228c | goto label_3;
| }
| label_15:
0x00012530 ldr r3, [pc, 0xc0] | r3 = *(0x125f4);
0x00012534 mov r2, 5 | r2 = 5;
0x00012538 add r3, pc, r3 | r3 = pc + r3;
0x0001253c b 0x124f8 | goto label_4;
| label_9:
0x00012540 ldr r2, [r4, -0xc] | r2 = *((r4 - 0xc));
0x00012544 mov r1, 0x200 | r1 = 0x200;
0x00012548 str r2, [sp] | *(sp) = r2;
0x0001254c mov r0, r5 | r0 = r5;
0x00012550 mov r2, r6 | r2 = r6;
0x00012554 bl 0x360c | snprintf (r0, r1, r2, r3)
0x00012558 mov r1, r5 | r1 = r5;
0x0001255c mov r0, 3 | r0 = 3;
0x00012560 bl 0x11cc0 | fcn_00011cc0 (r0, r1);
0x00012564 b 0x122cc | 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-mqtt3cs.so.1.3.9 @ 0x12e58 */
| #include <stdint.h>
|
; (fcn) fcn.00012e58 () | void fcn_00012e58 (int32_t arg_1h, int32_t arg_48h, int32_t arg_4ch, int32_t arg_50h, int32_t arg_54h, int32_t arg_58h, int32_t arg_5ch, 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_24h;
| r0 = arg1;
| r1 = arg2;
0x00012e58 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00012e5c ldr r5, [pc, 0x2dc] | r5 = *(0x1313c);
0x00012e60 sub sp, sp, 0x24 |
0x00012e64 str r0, [sp, 0x14] | var_14h = r0;
0x00012e68 ldr r0, [pc, 0x2d4] |
0x00012e6c str r1, [sp, 8] | var_8h = r1;
0x00012e70 add r0, pc, r0 | r0 = pc + r0;
0x00012e74 str r2, [sp, 0xc] | var_ch = r2;
0x00012e78 mov r4, 0 | r4 = 0;
0x00012e7c mov r2, 3 | r2 = 3;
0x00012e80 ldr r1, [pc, 0x2c0] | r1 = *(0x13144);
0x00012e84 add r0, r0, 0x7f | r0 = 0x131bf;
0x00012e88 mov fp, r3 |
0x00012e8c str r4, [sp, 0x1c] | var_1ch = r4;
0x00012e90 bl 0x1a490 | fcn_0001a490 (r0, r1);
0x00012e94 ldr r3, [pc, 0x2b0] | r3 = *(0x13148);
0x00012e98 add r5, pc, r5 | r5 = pc + r5;
0x00012e9c ldr r3, [r5, r3] | r3 = *(0x1313c);
0x00012ea0 add r1, sp, 0x14 | r1 += var_14h;
0x00012ea4 str r3, [sp, 0x10] | var_10h = r3;
0x00012ea8 ldr r3, [pc, 0x2a0] | r3 = *(0x1314c);
0x00012eac ldr r2, [sp, 0x10] | r2 = var_10h;
0x00012eb0 ldr r3, [r5, r3] |
0x00012eb4 ldr r3, [r3] | r3 = *(0x1313c);
0x00012eb8 ldr r0, [r3, 4] | r0 = "persistence";
0x00012ebc bl 0x174e0 | fcn_000174e0 ("persistence", r1);
0x00012ec0 ldr sb, [r0, 8] | sb = *(0x13148);
0x00012ec4 ldr r3, [sb, 0x84] | r3 = *(0x131cc);
0x00012ec8 cmp r3, r4 |
| if (r3 == r4) {
0x00012ecc beq 0x12ef8 | goto label_1;
| }
0x00012ed0 ldr r7, [pc, 0x27c] | r7 = *(0x13150);
0x00012ed4 mov r2, 0xb | r2 = 0xb;
0x00012ed8 add r7, pc, r7 | r7 = pc + r7;
0x00012edc ldr r1, [pc, 0x274] | r1 = *(0x13154);
0x00012ee0 mov r0, r7 | r0 = r7;
0x00012ee4 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00012ee8 subs r6, r0, 0 | r6 = r0 - 0;
0x00012eec bne 0x12f20 |
| while (1) {
0x00012ef0 mvn r3, 0x62 | r3 = ~0x62;
0x00012ef4 str r3, [sp, 0x1c] | var_1ch = r3;
| label_1:
0x00012ef8 ldr r0, [pc, 0x25c] |
0x00012efc mov r3, 3 | r3 = 3;
0x00012f00 add r0, pc, r0 | r0 = pc + r0;
0x00012f04 add r2, sp, 0x1c | r2 += var_1ch;
0x00012f08 ldr r1, [pc, 0x250] | r1 = *(0x1315c);
0x00012f0c add r0, r0, 0x7f | r0 = 0x131d7;
0x00012f10 bl 0x1a578 | fcn_0001a578 (r0, r1);
0x00012f14 ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x00012f18 add sp, sp, 0x24 |
0x00012f1c pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x00012f20 add sl, fp, 1 | sl += arg_1h;
0x00012f24 lsl r8, sl, 2 | r8 = sl << 2;
0x00012f28 mov r2, r8 | r2 = r8;
0x00012f2c mov r1, 0x1c8 | r1 = 0x1c8;
0x00012f30 mov r0, r7 | r0 = r7;
0x00012f34 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00012f38 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x00012f3c bne 0x12f54 | goto label_5;
| }
0x00012f40 ldr r1, [pc, 0x21c] | r1 = *(0x13160);
0x00012f44 mov r2, r6 | r2 = r6;
| label_0:
0x00012f48 mov r0, r7 | r0 = r7;
0x00012f4c bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00012f50 b 0x12ef0 |
| }
| label_5:
0x00012f54 mov r2, r8 | r2 = r8;
0x00012f58 ldr r1, [pc, 0x208] | r1 = *(0x13164);
0x00012f5c mov r0, r7 | r0 = r7;
0x00012f60 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00012f64 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 == r0) {
0x00012f68 bne 0x12f88 |
0x00012f6c mov r2, r6 | r2 = r6;
0x00012f70 mov r1, 0x1d0 | r1 = 0x1d0;
0x00012f74 mov r0, r7 | r0 = r7;
0x00012f78 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00012f7c mov r2, r5 | r2 = r5;
0x00012f80 ldr r1, [pc, 0x1e4] | r1 = *(0x13168);
0x00012f84 b 0x12f48 | goto label_0;
| }
0x00012f88 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00012f8c mov r2, r8 | r2 = r8;
0x00012f90 str r3, [r5] | *(r5) = r3;
0x00012f94 ldr r3, [sp, 8] | r3 = var_8h;
0x00012f98 str r3, [r8] | *(r8) = r3;
0x00012f9c mov r3, r5 | r3 = r5;
| do {
0x00012fa0 cmp r4, fp |
| if (r4 >= fp) {
0x00012fa4 blt 0x13098 |
0x00012fa8 ldr r3, [sp, 0x58] | r3 = *(arg_58h);
0x00012fac cmp r3, 0 |
| if (r3 != 0) {
0x00012fb0 bne 0x13100 | goto label_6;
| }
0x00012fb4 ldr r3, [sp, 0x50] | r3 = *(arg_50h);
0x00012fb8 cmp r3, 3 |
| if (r3 != 3) {
0x00012fbc bne 0x130b8 | goto label_7;
| }
0x00012fc0 ldr r3, [sp, 0x5c] | r3 = *(arg_5ch);
0x00012fc4 cmp r3, 4 |
| if (r3 <= 4) {
0x00012fc8 ble 0x130dc | goto label_8;
| }
0x00012fcc ldr r3, [pc, 0x19c] | r3 = *(0x1316c);
0x00012fd0 add r3, pc, r3 | r3 = pc + r3;
| label_2:
0x00012fd4 ldr r2, [sp, 0x54] | r2 = *(arg_54h);
0x00012fd8 str r2, [sp] | *(sp) = r2;
0x00012fdc ldr r2, [pc, 0x190] | r2 = *(0x13170);
0x00012fe0 add r2, pc, r2 | r2 = pc + r2;
| label_4:
0x00012fe4 mov r1, 0xb | r1 = 0xb;
0x00012fe8 mov r0, r6 | r0 = r6;
0x00012fec bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
0x00012ff0 cmp r0, 0xa |
| if (r0 <= 0xa) {
0x00012ff4 mvngt r3, 1 | r3 = ~1;
| }
| if (r0 <= 0xa) {
0x00012ff8 strgt r3, [sp, 0x1c] | var_1ch = r3;
| }
| label_3:
0x00012ffc ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00013000 cmp r3, 0 |
| if (r3 == 0) {
0x00013004 bne 0x1302c |
0x00013008 ldr r4, [sb, 0x88] | r4 = *((sb + 0x88));
0x0001300c cmp r4, 0 |
| if (r4 == 0) {
0x00013010 beq 0x1302c | goto label_9;
| }
0x00013014 mov r3, r5 | r3 = r5;
0x00013018 mov r2, r8 | r2 = r8;
0x0001301c mov r1, sl | r1 = sl;
0x00013020 ldr r0, [sb, 0x90] | r0 = *((sb + 0x90));
0x00013024 blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00013028 str r0, [sp, 0x1c] | var_1ch = r0;
| }
| label_9:
0x0001302c ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00013030 cmp r3, 0 |
| if (r3 == 0) {
0x00013034 bne 0x1305c |
0x00013038 ldr r3, [sb, 0x84] | r3 = *((sb + 0x84));
0x0001303c mov r2, sl | r2 = sl;
0x00013040 str r5, [sp] | *(sp) = r5;
0x00013044 mov r1, r6 | r1 = r6;
0x00013048 ldr r4, [r3, 0xc] | r4 = *((r3 + 0xc));
0x0001304c ldr r0, [sb, 0x80] | r0 = *((sb + 0x80));
0x00013050 mov r3, r8 | r3 = r8;
0x00013054 blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00013058 str r0, [sp, 0x1c] | var_1ch = r0;
| }
0x0001305c ldr r4, [pc, 0x114] | r4 = *(0x13174);
0x00013060 mov r2, r6 | r2 = r6;
0x00013064 add r4, pc, r4 | r4 = pc + r4;
0x00013068 mov r0, r4 | r0 = r4;
0x0001306c ldr r1, [pc, 0x108] | r1 = *(0x13178);
0x00013070 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00013074 mov r2, r5 | r2 = r5;
0x00013078 mov r0, r4 | r0 = r4;
0x0001307c ldr r1, [pc, 0xfc] | r1 = *(0x1317c);
0x00013080 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00013084 mov r2, r8 | r2 = r8;
0x00013088 ldr r1, [pc, 0xf4] | r1 = *(0x13180);
0x0001308c mov r0, r4 | r0 = r4;
0x00013090 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00013094 b 0x12ef8 | goto label_1;
| }
0x00013098 ldr r1, [sp, 0x4c] | r1 = *(arg_4ch);
0x0001309c ldr r1, [r1, r4, lsl 2] | offset_0 = r4 << 2;
| r1 = *((r1 + offset_0));
0x000130a0 str r1, [r3, 4]! | *((r3 += 4)) = r1;
0x000130a4 ldr r1, [sp, 0x48] | r1 = *(arg_48h);
0x000130a8 ldr r1, [r1, r4, lsl 2] | offset_1 = r4 << 2;
| r1 = *((r1 + offset_1));
0x000130ac add r4, r4, 1 | r4++;
0x000130b0 str r1, [r2, 4]! | *((r2 += 4)) = r1;
0x000130b4 b 0x12fa0 |
| } while (1);
| label_7:
0x000130b8 ldr r3, [sp, 0x50] | r3 = *(arg_50h);
0x000130bc cmp r3, 6 |
| if (r3 == 6) {
0x000130c0 bne 0x130e8 |
0x000130c4 ldr r3, [sp, 0x5c] | r3 = *(arg_5ch);
0x000130c8 cmp r3, 4 |
| if (r3 > 4) {
0x000130cc bgt 0x130f4 | goto label_10;
| }
0x000130d0 ldr r3, [pc, 0xb0] | r3 = *(0x13184);
0x000130d4 add r3, pc, r3 | r3 = pc + r3;
0x000130d8 b 0x12fd4 | goto label_2;
| label_8:
0x000130dc ldr r3, [pc, 0xa8] | r3 = *(0x13188);
0x000130e0 add r3, pc, r3 | r3 = pc + r3;
0x000130e4 b 0x12fd4 | goto label_2;
| }
0x000130e8 ldr r3, [pc, 0xa0] | r3 = *(0x1318c);
0x000130ec add r3, pc, r3 | r3 = pc + r3;
0x000130f0 b 0x12fd4 | goto label_2;
| label_10:
0x000130f4 ldr r3, [pc, 0x98] | r3 = *(0x13190);
0x000130f8 add r3, pc, r3 | r3 = pc + r3;
0x000130fc b 0x12fd4 | goto label_2;
| label_6:
0x00013100 ldr r3, [sp, 0x58] | r3 = *(arg_58h);
0x00013104 cmp r3, 1 |
| if (r3 != 1) {
0x00013108 bne 0x12ffc | goto label_3;
| }
0x0001310c ldr r3, [sp, 0x5c] | r3 = *(arg_5ch);
0x00013110 cmp r3, 4 |
| if (r3 <= 4) {
0x00013114 ble 0x13134 | goto label_11;
| }
0x00013118 ldr r3, [pc, 0x78] | r3 = *(0x13194);
0x0001311c add r3, pc, r3 | r3 = pc + r3;
| do {
0x00013120 ldr r2, [sp, 0x54] | r2 = *(arg_54h);
0x00013124 str r2, [sp] | *(sp) = r2;
0x00013128 ldr r2, [pc, 0x6c] | r2 = *(0x13198);
0x0001312c add r2, pc, r2 | r2 = pc + r2;
0x00013130 b 0x12fe4 | goto label_4;
| label_11:
0x00013134 ldr r3, [pc, 0x64] | r3 = *(0x1319c);
0x00013138 add r3, pc, r3 | r3 = pc + r3;
0x0001313c b 0x13120 |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/lib/libpaho-mqtt3cs.so.1.3.9 @ 0x131a4 */
| #include <stdint.h>
|
; (fcn) fcn.000131a4 () | void fcn_000131a4 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| int32_t var_10h;
| r0 = arg1;
| r1 = arg2;
0x000131a4 push {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr} |
0x000131a8 mov r5, r0 | r5 = r0;
0x000131ac ldr r0, [pc, 0x264] |
0x000131b0 mov r6, r1 | r6 = r1;
0x000131b4 add r0, pc, r0 | r0 = pc + r0;
0x000131b8 mov r7, r3 | r7 = r3;
0x000131bc mov r2, 3 | r2 = 3;
0x000131c0 mov r3, 0 | r3 = 0;
0x000131c4 ldr r1, [pc, 0x250] | r1 = *(0x13418);
0x000131c8 add r0, r0, 0x99 | r0 = 0x134ad;
0x000131cc str r3, [sp, 0xc] | var_ch = r3;
0x000131d0 bl 0x1a490 | fcn_0001a490 (r0, r1);
0x000131d4 ldr r3, [r5, 0x84] | r3 = *((r5 + 0x84));
0x000131d8 cmp r3, 0 |
| if (r3 == 0) {
0x000131dc beq 0x132a4 | goto label_3;
| }
0x000131e0 ldr r0, [pc, 0x238] | r0 = *(0x1341c);
0x000131e4 mov r2, 0xb | r2 = 0xb;
0x000131e8 ldr r1, [pc, 0x234] | r1 = *(0x13420);
0x000131ec add r0, pc, r0 | r0 = pc + r0;
0x000131f0 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x000131f4 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x000131f8 mvneq r3, 0x62 | r3 = ~0x62;
| }
| if (r4 != r0) {
0x000131fc streq r3, [sp, 0xc] | var_ch = r3;
| }
| if (r4 == r0) {
0x00013200 beq 0x132a4 | goto label_3;
| }
0x00013204 ldr r1, [pc, 0x21c] | r1 = *(0x13424);
0x00013208 mov r0, r6 | r0 = r6;
0x0001320c add r1, pc, r1 | r1 = pc + r1;
0x00013210 bl 0x3a5c | r0 = strcmp (r0, r1);
0x00013214 cmp r0, 0 |
| if (r0 != 0) {
0x00013218 beq 0x13234 |
0x0001321c ldr r1, [pc, 0x208] | r1 = *(0x13428);
0x00013220 mov r0, r6 | r0 = r6;
0x00013224 add r1, pc, r1 | r1 = pc + r1;
0x00013228 bl 0x3a5c | r0 = strcmp (r0, r1);
0x0001322c cmp r0, 0 |
| if (r0 != 0) {
0x00013230 bne 0x133c0 | goto label_4;
| }
| }
0x00013234 ldr r8, [pc, 0x1f4] | r8 = *(0x1342c);
0x00013238 ldr r3, [pc, 0x1f4] | r3 = *(0x13430);
0x0001323c add r8, pc, r8 | r8 = pc + r8;
0x00013240 str r7, [sp] | *(sp) = r7;
0x00013244 add r3, pc, r3 | r3 = pc + r3;
0x00013248 mov r2, r8 | r2 = r8;
0x0001324c mov r1, 0xb | r1 = 0xb;
0x00013250 mov r0, r4 | r0 = r4;
0x00013254 bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
0x00013258 cmp r0, 0xa |
0x0001325c mov r6, r0 | r6 = r0;
0x00013260 ble 0x132cc |
| while (r0 > 0xa) {
| label_0:
0x00013264 mvn r3, 1 | r3 = ~1;
0x00013268 str r3, [sp, 0xc] | var_ch = r3;
| label_1:
0x0001326c ldr r3, [sp, 0xc] | r3 = var_ch;
0x00013270 cmn r3, 2 |
| if (r3 == 2) {
0x00013274 bne 0x13290 |
0x00013278 ldr r2, [pc, 0x1b8] | r2 = *(0x13434);
0x0001327c mov r3, r6 | r3 = r6;
0x00013280 add r2, pc, r2 | r2 = pc + r2;
0x00013284 mov r1, 0 | r1 = 0;
0x00013288 mov r0, 5 | r0 = 5;
0x0001328c bl 0x12720 | fcn_00012720 (r0, r1);
| }
0x00013290 ldr r0, [pc, 0x1a4] | r0 = *(0x13438);
0x00013294 mov r2, r4 | r2 = r4;
0x00013298 ldr r1, [pc, 0x1a0] | r1 = *(0x1343c);
0x0001329c add r0, pc, r0 | r0 = pc + r0;
0x000132a0 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
| label_3:
0x000132a4 ldr r0, [pc, 0x198] |
0x000132a8 mov r3, 3 | r3 = 3;
0x000132ac add r0, pc, r0 | r0 = pc + r0;
0x000132b0 add r2, sp, 0xc | r2 += var_ch;
0x000132b4 ldr r1, [pc, 0x18c] | r1 = *(0x13444);
0x000132b8 add r0, r0, 0x99 | r0 = 0x134d9;
0x000132bc bl 0x1a578 | fcn_0001a578 (r0, r1);
0x000132c0 ldr r0, [sp, 0xc] | r0 = var_ch;
0x000132c4 add sp, sp, 0x10 |
0x000132c8 pop {r4, r5, r6, r7, r8, pc} |
0x000132cc ldr r3, [r5, 0x84] | r3 = *((r5 + 0x84));
0x000132d0 mov r1, r4 | r1 = r4;
0x000132d4 ldr r3, [r3, 0x14] | r3 = *((r3 + 0x14));
0x000132d8 ldr r0, [r5, 0x80] | r0 = *((r5 + 0x80));
0x000132dc blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x000132e0 ldr r3, [pc, 0x164] | r3 = *(0x13448);
0x000132e4 str r7, [sp] | *(sp) = r7;
0x000132e8 add r3, pc, r3 | r3 = pc + r3;
0x000132ec mov r2, r8 | r2 = r8;
0x000132f0 mov r1, 0xb | r1 = 0xb;
0x000132f4 str r0, [sp, 0xc] | var_ch = r0;
0x000132f8 mov r0, r4 | r0 = r4;
0x000132fc bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
0x00013300 cmp r0, 0xa |
0x00013304 mov r6, r0 | r6 = r0;
0x00013308 bgt 0x13264 |
| }
0x0001330c ldr r3, [r5, 0x84] | r3 = *((r5 + 0x84));
0x00013310 mov r1, r4 | r1 = r4;
0x00013314 ldr r3, [r3, 0x14] | r3 = *((r3 + 0x14));
0x00013318 ldr r0, [r5, 0x80] | r0 = *((r5 + 0x80));
0x0001331c blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x00013320 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00013324 str r7, [sp] | *(sp) = r7;
0x00013328 mov r2, r8 | r2 = r8;
0x0001332c mov r1, 0xb | r1 = 0xb;
0x00013330 add r0, r3, r0 | r0 = r3 + r0;
0x00013334 ldr r3, [pc, 0x114] | r3 = *(0x1344c);
0x00013338 str r0, [sp, 0xc] | var_ch = r0;
0x0001333c add r3, pc, r3 | r3 = pc + r3;
0x00013340 mov r0, r4 | r0 = r4;
0x00013344 bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
0x00013348 cmp r0, 0xa |
0x0001334c mov r6, r0 | r6 = r0;
| if (r0 > 0xa) {
0x00013350 bgt 0x13264 | goto label_0;
| }
0x00013354 ldr r3, [r5, 0x84] | r3 = *((r5 + 0x84));
0x00013358 mov r1, r4 | r1 = r4;
0x0001335c ldr r3, [r3, 0x14] | r3 = *((r3 + 0x14));
0x00013360 ldr r0, [r5, 0x80] | r0 = *((r5 + 0x80));
0x00013364 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x00013368 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0001336c str r7, [sp] | *(sp) = r7;
0x00013370 add r0, r3, r0 | r0 = r3 + r0;
0x00013374 ldr r3, [pc, 0xd8] | r3 = *(0x13450);
0x00013378 str r0, [sp, 0xc] | var_ch = r0;
0x0001337c add r3, pc, r3 | r3 = pc + r3;
| label_2:
0x00013380 mov r2, r8 | r2 = r8;
0x00013384 mov r1, 0xb | r1 = 0xb;
0x00013388 mov r0, r4 | r0 = r4;
0x0001338c bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
0x00013390 cmp r0, 0xa |
0x00013394 mov r6, r0 | r6 = r0;
| if (r0 > 0xa) {
0x00013398 bgt 0x13264 | goto label_0;
| }
0x0001339c ldr r3, [r5, 0x84] | r3 = *((r5 + 0x84));
0x000133a0 mov r1, r4 | r1 = r4;
0x000133a4 ldr r3, [r3, 0x14] | r3 = *((r3 + 0x14));
0x000133a8 ldr r0, [r5, 0x80] | r0 = *((r5 + 0x80));
0x000133ac blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x000133b0 ldr r3, [sp, 0xc] | r3 = var_ch;
0x000133b4 add r0, r3, r0 | r0 = r3 + r0;
0x000133b8 str r0, [sp, 0xc] | var_ch = r0;
0x000133bc b 0x1326c | goto label_1;
| label_4:
0x000133c0 ldr r8, [pc, 0x90] | r8 = *(0x13454);
0x000133c4 ldr r3, [pc, 0x90] | r3 = *(0x13458);
0x000133c8 add r8, pc, r8 | r8 = pc + r8;
0x000133cc str r7, [sp] | *(sp) = r7;
0x000133d0 add r3, pc, r3 | r3 = pc + r3;
0x000133d4 mov r2, r8 | r2 = r8;
0x000133d8 mov r1, 0xb | r1 = 0xb;
0x000133dc mov r0, r4 | r0 = r4;
0x000133e0 bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
0x000133e4 cmp r0, 0xa |
0x000133e8 mov r6, r0 | r6 = r0;
| if (r0 > 0xa) {
0x000133ec bgt 0x13264 | goto label_0;
| }
0x000133f0 ldr r3, [r5, 0x84] | r3 = *((r5 + 0x84));
0x000133f4 mov r1, r4 | r1 = r4;
0x000133f8 ldr r3, [r3, 0x14] | r3 = *((r3 + 0x14));
0x000133fc ldr r0, [r5, 0x80] | r0 = *((r5 + 0x80));
0x00013400 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x00013404 ldr r3, [pc, 0x54] | r3 = *(0x1345c);
0x00013408 str r7, [sp] | *(sp) = r7;
0x0001340c add r3, pc, r3 | r3 = pc + r3;
0x00013410 str r0, [sp, 0xc] | var_ch = r0;
0x00013414 b 0x13380 | 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-mqtt3cs.so.1.3.9 @ 0x13570 */
| #include <stdint.h>
|
; (fcn) fcn.00013570 () | void fcn_00013570 (int32_t arg1) {
| int32_t var_0h;
| int32_t var_4h;
| char * s2;
| char * var_10h;
| char * 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;
| int32_t var_34h;
| r0 = arg1;
0x00013570 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00013574 mov r4, r0 | r4 = r0;
0x00013578 ldr r0, [pc, 0x62c] |
0x0001357c mov r3, 0 | r3 = 0;
0x00013580 add r0, pc, r0 | r0 = pc + r0;
0x00013584 sub sp, sp, 0x34 |
0x00013588 mov r2, 3 | r2 = 3;
0x0001358c mov r1, 0xc3 | r1 = 0xc3;
0x00013590 add r0, r0, 0xca | r0 = 0x13c72;
0x00013594 str r3, [sp, 0x18] | var_18h = r3;
0x00013598 str r3, [sp, 0x1c] | var_1ch = r3;
0x0001359c str r3, [sp, 0x20] | var_20h = r3;
0x000135a0 bl 0x1a490 | fcn_0001a490 (r0, r1);
0x000135a4 ldr r3, [r4, 0x84] | r3 = *((r4 + 0x84));
0x000135a8 cmp r3, 0 |
0x000135ac bne 0x135e8 |
| while (r0 != 0) {
0x000135b0 mov r6, 0 | r6 = 0;
0x000135b4 mov r5, r6 | r5 = r6;
| label_1:
0x000135b8 ldr r3, [r4] | r3 = *(r4);
0x000135bc ldr r2, [pc, 0x5ec] | r2 = *(0x13bac);
0x000135c0 str r3, [sp, 4] | var_4h = r3;
0x000135c4 str r6, [sp] | *(sp) = r6;
0x000135c8 mov r3, r5 | r3 = r5;
0x000135cc add r2, pc, r2 | r2 = pc + r2;
0x000135d0 mvn r1, 0 | r1 = ~0;
0x000135d4 mov r0, 3 | r0 = 3;
0x000135d8 bl 0x12720 | fcn_00012720 (r0, r1);
0x000135dc mov r0, r4 | r0 = r4;
0x000135e0 bl 0x13464 | fcn_00013464 (r0);
0x000135e4 b 0x13760 | goto label_9;
0x000135e8 ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x000135ec add r2, sp, 0x24 | r2 += var_24h;
0x000135f0 add r1, sp, 0x1c | r1 += var_1ch;
0x000135f4 ldr r0, [r4, 0x80] | r0 = *((r4 + 0x80));
0x000135f8 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x000135fc cmp r0, 0 |
0x00013600 mov r5, r0 | r5 = r0;
0x00013604 str r0, [sp, 0x18] | var_18h = r0;
0x00013608 bne 0x135b0 |
| }
0x0001360c ldr r3, [pc, 0x5a0] | r3 = *(0x13bb0);
0x00013610 mov r6, r0 | r6 = r0;
0x00013614 add r3, pc, r3 | r3 = pc + r3;
0x00013618 str r3, [sp, 0xc] | s2 = r3;
0x0001361c ldr r3, [pc, 0x594] | r3 = *(0x13bb4);
0x00013620 mov r7, r0 | r7 = r0;
0x00013624 add r3, pc, r3 | r3 = pc + r3;
0x00013628 str r3, [sp, 0x10] | var_10h = r3;
0x0001362c ldr r3, [pc, 0x588] | r3 = *(0x13bb8);
0x00013630 add r3, pc, r3 | r3 = pc + r3;
0x00013634 str r3, [sp, 0x14] | var_14h = r3;
0x00013638 b 0x137ec | goto label_10;
| label_0:
0x0001363c ldr r8, [r2, r7, lsl 2] | offset_0 = r7 << 2;
| r8 = *((r2 + offset_0));
0x00013640 ldr r1, [sp, 0xc] | r1 = s2;
0x00013644 mov r2, 2 | r2 = 2;
0x00013648 mov r0, r8 | r0 = r8;
0x0001364c bl 0x357c | strncmp (r0, r1, r2);
0x00013650 lsl fp, r7, 2 |
0x00013654 cmp r0, 0 |
| if (r0 == 0) {
0x00013658 beq 0x137a4 | goto label_3;
| }
0x0001365c mov r2, 3 | r2 = 3;
0x00013660 ldr r1, [sp, 0x10] | r1 = var_10h;
0x00013664 mov r0, r8 | r0 = r8;
0x00013668 bl 0x357c | r0 = strncmp (r0, r1, r2);
0x0001366c cmp r0, 0 |
| if (r0 == 0) {
0x00013670 beq 0x137a4 | goto label_3;
| }
0x00013674 mov r2, 2 | r2 = 2;
0x00013678 ldr r1, [sp, 0x14] | r1 = var_14h;
0x0001367c mov r0, r8 | r0 = r8;
0x00013680 bl 0x357c | r0 = strncmp (r0, r1, r2);
0x00013684 cmp r0, 0 |
| if (r0 == 0) {
0x00013688 beq 0x137a4 | goto label_3;
| }
0x0001368c ldr r1, [pc, 0x52c] | r1 = *(0x13bbc);
0x00013690 mov r2, 3 | r2 = 3;
0x00013694 add r1, pc, r1 | r1 = pc + r1;
0x00013698 mov r0, r8 | r0 = r8;
0x0001369c bl 0x357c | r0 = strncmp (r0, r1, r2);
0x000136a0 cmp r0, 0 |
| if (r0 == 0) {
0x000136a4 beq 0x137a4 | goto label_3;
| }
0x000136a8 ldr r3, [r4, 0x84] | r3 = *((r4 + 0x84));
0x000136ac add sl, sp, 0x28 | sl += var_28h;
0x000136b0 ldr r3, [r3, 0x10] | r3 = *((r3 + 0x10));
0x000136b4 add sb, sp, 0x20 | sb += var_20h;
0x000136b8 mov ip, r3 |
0x000136bc mov r2, sb | r2 = sb;
0x000136c0 mov r3, sl | r3 = sl;
0x000136c4 mov r1, r8 | r1 = r8;
0x000136c8 ldr r0, [r4, 0x80] | r0 = *((r4 + 0x80));
0x000136cc blx ip | r0 = ip (r0, r1, r2, r3);
0x000136d0 cmp r0, 0 |
0x000136d4 str r0, [sp, 0x18] | var_18h = r0;
| if (r0 != 0) {
0x000136d8 bne 0x137a4 | goto label_3;
| }
0x000136dc ldr r3, [r4, 0x8c] | r3 = *((r4 + 0x8c));
0x000136e0 cmp r3, 0 |
0x000136e4 bne 0x13788 |
| while (r0 == 0) {
0x000136e8 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x000136ec ldr r1, [pc, 0x4d0] | r1 = *(0x13bc0);
0x000136f0 ldr sb, [r3, fp] | sb = *((r3 + fp));
0x000136f4 mov r2, 3 | r2 = 3;
0x000136f8 add r1, pc, r1 | r1 = pc + r1;
0x000136fc mov r0, sb | r0 = sb;
0x00013700 bl 0x357c | r0 = strncmp (r0, r1, r2);
0x00013704 cmp r0, 0 |
| if (r0 == 0) {
0x00013708 beq 0x13824 | goto label_11;
| }
0x0001370c ldr r1, [pc, 0x4b4] | r1 = *(0x13bc4);
0x00013710 mov r2, 3 | r2 = 3;
0x00013714 add r1, pc, r1 | r1 = pc + r1;
0x00013718 mov r0, sb | r0 = sb;
0x0001371c bl 0x357c | r0 = strncmp (r0, r1, r2);
0x00013720 cmp r0, 0 |
| if (r0 == 0) {
0x00013724 beq 0x13830 | goto label_12;
| }
0x00013728 ldr r1, [pc, 0x49c] | r1 = *(0x13bc8);
0x0001372c mov r2, 4 | r2 = 4;
0x00013730 add r1, pc, r1 | r1 = pc + r1;
0x00013734 mov r0, sb | r0 = sb;
0x00013738 bl 0x357c | r0 = strncmp (r0, r1, r2);
0x0001373c cmp r0, 0 |
| if (r0 != 0) {
0x00013740 bne 0x1383c | goto label_13;
| }
0x00013744 ldr sb, [pc, 0x484] | sb = *(0x13bcc);
0x00013748 add sb, pc, sb | sb = pc + sb;
| label_2:
0x0001374c ldr r3, [r4, 0x9c] | r3 = *((r4 + 0x9c));
0x00013750 cmp r3, 4 |
| if (r3 > 4) {
0x00013754 bgt 0x13928 | goto label_14;
| }
0x00013758 mvn r3, 1 | r3 = ~1;
| label_4:
0x0001375c str r3, [sp, 0x18] | var_18h = r3;
| label_9:
0x00013760 ldr r0, [pc, 0x46c] |
0x00013764 mov r3, 3 | r3 = 3;
0x00013768 add r0, pc, r0 | r0 = pc + r0;
0x0001376c add r2, sp, 0x18 | r2 += var_18h;
0x00013770 ldr r1, [pc, 0x460] | r1 = *(0x13bd4);
0x00013774 add r0, r0, 0xca | r0 = 0x13c9a;
0x00013778 bl 0x1a578 | fcn_0001a578 (r0, r1);
0x0001377c ldr r0, [sp, 0x18] | r0 = var_18h;
0x00013780 add sp, sp, 0x34 |
0x00013784 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x00013788 mov r2, sl | r2 = sl;
0x0001378c mov r1, sb | r1 = sb;
0x00013790 ldr r0, [r4, 0x94] | r0 = *((r4 + 0x94));
0x00013794 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x00013798 cmp r0, 0 |
0x0001379c str r0, [sp, 0x18] | var_18h = r0;
0x000137a0 beq 0x136e8 |
| }
| label_3:
0x000137a4 ldr r2, [sp, 0x20] | r2 = var_20h;
0x000137a8 cmp r2, 0 |
| if (r2 != 0) {
0x000137ac beq 0x137c8 |
0x000137b0 ldr r0, [pc, 0x424] | r0 = *(0x13bd8);
0x000137b4 ldr r1, [pc, 0x424] | r1 = *(0x13bdc);
0x000137b8 add r0, pc, r0 | r0 = pc + r0;
0x000137bc bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x000137c0 mov r3, 0 | r3 = 0;
0x000137c4 str r3, [sp, 0x20] | var_20h = r3;
| }
0x000137c8 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x000137cc ldr r2, [r3, fp] | r2 = *((r3 + fp));
0x000137d0 cmp r2, 0 |
| if (r2 != 0) {
0x000137d4 beq 0x137e8 |
0x000137d8 ldr r0, [pc, 0x404] | r0 = *(0x13be0);
0x000137dc ldr r1, [pc, 0x404] | r1 = *(0x13be4);
0x000137e0 add r0, pc, r0 | r0 = pc + r0;
0x000137e4 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
| }
0x000137e8 add r7, r7, 1 | r7++;
| label_10:
0x000137ec ldr r3, [sp, 0x18] | r3 = var_18h;
0x000137f0 ldr r2, [sp, 0x1c] | r2 = var_1ch;
0x000137f4 cmp r3, 0 |
| if (r3 != 0) {
0x000137f8 bne 0x13808 | goto label_15;
| }
0x000137fc ldr r3, [sp, 0x24] | r3 = var_24h;
0x00013800 cmp r3, r7 |
| if (r3 > r7) {
0x00013804 bgt 0x1363c | goto label_0;
| }
| label_15:
0x00013808 cmp r2, 0 |
| if (r2 == 0) {
0x0001380c beq 0x135b8 | goto label_1;
| }
0x00013810 ldr r0, [pc, 0x3d4] | r0 = *(0x13be8);
0x00013814 ldr r1, [pc, 0x3d4] | r1 = *(0x13bec);
0x00013818 add r0, pc, r0 | r0 = pc + r0;
0x0001381c bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00013820 b 0x135b8 | goto label_1;
| label_11:
0x00013824 ldr sb, [pc, 0x3c8] | sb = *(0x13bf0);
0x00013828 add sb, pc, sb | sb = pc + sb;
0x0001382c b 0x1374c | goto label_2;
| label_12:
0x00013830 ldr sb, [pc, 0x3c0] | sb = *(0x00013bf8);
0x00013834 add sb, pc, sb | sb = pc + sb;
0x00013838 b 0x1374c | goto label_2;
| label_13:
0x0001383c mov r0, 4 | r0 = 4;
| do {
0x00013840 ldr r2, [sp, 0x28] | r2 = var_28h;
0x00013844 ldr r1, [sp, 0x20] | r1 = var_20h;
0x00013848 bl 0x12ca8 | r0 = fcn_00012ca8 (r0, r1);
0x0001384c subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 == r0) {
0x00013850 beq 0x13b8c | goto label_16;
| }
0x00013854 ldr r1, [pc, 0x3a0] | r1 = *(0x13bf8);
0x00013858 mov r2, 2 | r2 = 2;
0x0001385c add r1, pc, r1 | r1 = pc + r1;
0x00013860 mov r0, sb | r0 = sb;
0x00013864 bl 0x357c | r0 = strncmp (r0, r1, r2);
0x00013868 subs sl, r0, 0 | sl = r0 - 0;
| if (sl != r0) {
0x0001386c bne 0x13930 | goto label_17;
| }
0x00013870 ldr r3, [r4, 0x9c] | r3 = *((r4 + 0x9c));
0x00013874 add r1, sp, 0x30 | r1 += var_30h;
0x00013878 str sl, [r1, -4]! | *((r1 -= 4)) = sl;
0x0001387c str r3, [r8, 0x18] | *((r8 + 0x18)) = r3;
0x00013880 ldrb r3, [r8] | r3 = *(r8);
0x00013884 mov r0, 1 | r0 = 1;
0x00013888 lsr r2, r3, 1 | r2 = r3 >> 1;
0x0001388c str r0, [sp] | *(sp) = r0;
0x00013890 and r3, r3, r0 | r3 &= r0;
0x00013894 and r2, r2, 3 | r2 &= 3;
0x00013898 mov r0, r8 | r0 = r8;
0x0001389c bl 0xb0cc | fcn_0000b0cc (r0, r1, r2);
0x000138a0 mov r3, 6 | r3 = 6;
0x000138a4 str r0, [sp, 0x2c] | var_2ch = r0;
0x000138a8 mov r1, r0 | r1 = r0;
0x000138ac strb r3, [r0, 0x2c] | *((r0 + 0x2c)) = r3;
0x000138b0 ldr r2, [r0, 0x30] | r2 = *((r0 + 0x30));
0x000138b4 ldr r0, [r4, 0x70] | r0 = *((r4 + 0x70));
0x000138b8 bl 0x171c4 | fcn_000171c4 (r0, r1);
0x000138bc ldr r3, [r4, 0x9c] | r3 = *((r4 + 0x9c));
0x000138c0 cmp r3, 4 |
| if (r3 > 4) {
0x000138c4 ble 0x13910 |
0x000138c8 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x000138cc ldr sb, [pc, 0x32c] | sb = *(0x13bfc);
0x000138d0 ldr r3, [r3, 0x20] | r3 = *((r3 + 0x20));
0x000138d4 add sb, pc, sb | sb = pc + sb;
0x000138d8 ldr r2, [r3, 8] | r2 = *((r3 + 8));
0x000138dc ldr r1, [pc, 0x320] | r1 = *(0x13c00);
0x000138e0 mov r0, sb | r0 = sb;
0x000138e4 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x000138e8 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x000138ec ldr r1, [pc, 0x314] | r1 = *(0x13c04);
0x000138f0 ldr r3, [r3, 0x20] | r3 = *((r3 + 0x20));
0x000138f4 mov r0, sb | r0 = sb;
0x000138f8 ldr r2, [r3] | r2 = *(r3);
0x000138fc bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00013900 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00013904 ldr r3, [r3, 0x20] | r3 = *((r3 + 0x20));
0x00013908 str sl, [r3] | *(r3) = sl;
0x0001390c str sl, [r3, 8] | *((r3 + 8)) = sl;
| }
0x00013910 mov r3, 0 | r3 = 0;
0x00013914 str r3, [r8, 4] | *((r8 + 4)) = r3;
0x00013918 mov r0, r8 | r0 = r8;
0x0001391c bl 0xe048 | fcn_0000e048 (r0);
0x00013920 add r6, r6, 1 | r6++;
0x00013924 b 0x137a4 | goto label_3;
| label_14:
0x00013928 mov r0, 5 | r0 = 5;
0x0001392c b 0x13840 |
| } while (1);
| label_17:
0x00013930 ldr sl, [pc, 0x2d4] | sl = *(0x00013c0c);
0x00013934 mov r2, 2 | r2 = 2;
0x00013938 add sl, pc, sl | sl = pc + sl;
0x0001393c mov r1, sl | r1 = sl;
0x00013940 mov r0, sb | r0 = sb;
0x00013944 bl 0x357c | r0 = strncmp (r0, r1, r2);
0x00013948 cmp r0, 0 |
| if (r0 != 0) {
0x0001394c bne 0x13a84 | goto label_18;
| }
0x00013950 str r0, [sp, 0x2c] | var_2ch = r0;
0x00013954 ldr r0, [pc, 0x2b4] | r0 = *(0x13c0c);
0x00013958 mov r2, 0xb | r2 = 0xb;
0x0001395c ldr r1, [pc, 0x2b0] | r1 = *(0x13c10);
0x00013960 add r0, pc, r0 | r0 = pc + r0;
0x00013964 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00013968 subs sb, r0, 0 | sb = r0 - 0;
| if (sb == r0) {
0x0001396c bne 0x13978 |
| label_6:
0x00013970 mvn r3, 0x62 | r3 = ~0x62;
0x00013974 b 0x1375c | goto label_4;
| }
0x00013978 ldr r2, [r4, 0x9c] | r2 = *((r4 + 0x9c));
0x0001397c ldr r3, [r8, 0xc] | r3 = *((r8 + 0xc));
0x00013980 cmp r2, 4 |
0x00013984 str r2, [r8, 0x18] | *((r8 + 0x18)) = r2;
0x00013988 str r3, [sp] | *(sp) = r3;
| if (r2 <= 4) {
0x0001398c ble 0x139e8 | goto label_19;
| }
0x00013990 ldr r3, [pc, 0x280] | r3 = *(0x13c14);
0x00013994 ldr r2, [pc, 0x280] | r2 = "MQTTPersistence_putPacket";
0x00013998 add r3, pc, r3 | r3 = pc + r3;
0x0001399c add r2, pc, r2 | r2 = pc + r2;
| do {
0x000139a0 mov r1, 0xb | r1 = 0xb;
0x000139a4 bl 0x360c | r0 = snprintf (r0, r1, "MQTTPersistence_putPacket", r3)
0x000139a8 cmp r0, 0xa |
| if (r0 <= 0xa) {
0x000139ac ble 0x139fc | goto label_20;
| }
0x000139b0 ldr r2, [pc, 0x268] | r2 = *(0x13c1c);
0x000139b4 mvn r3, 1 | r3 = ~1;
0x000139b8 str r3, [sp, 0x18] | var_18h = r3;
0x000139bc add r2, pc, r2 | r2 = pc + r2;
0x000139c0 mov r3, r0 | r3 = r0;
0x000139c4 mov r1, 0 | r1 = 0;
0x000139c8 mov r0, 5 | r0 = 5;
0x000139cc bl 0x12720 | fcn_00012720 (r0, r1);
| label_5:
0x000139d0 ldr r0, [pc, 0x24c] | r0 = *(0x13c20);
0x000139d4 ldr r1, [pc, 0x24c] | r1 = *(0x13c24);
0x000139d8 mov r2, sb | r2 = sb;
0x000139dc add r0, pc, r0 | r0 = pc + r0;
| label_7:
0x000139e0 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x000139e4 b 0x137a4 | goto label_3;
| label_19:
0x000139e8 ldr r3, [pc, 0x23c] | r3 = *(0x13c28);
0x000139ec ldr r2, [pc, 0x23c] | r2 = *(0x13c2c);
0x000139f0 add r3, pc, r3 | r3 = pc + r3;
0x000139f4 add r2, pc, r2 | r2 = pc + r2;
0x000139f8 b 0x139a0 |
| } while (1);
| label_20:
0x000139fc ldrb r3, [r8] | r3 = *(r8);
0x00013a00 mov r1, 1 | r1 = 1;
0x00013a04 lsr r2, r3, 1 | r2 = r3 >> 1;
0x00013a08 and r2, r2, 3 | r2 &= 3;
0x00013a0c and r3, r3, r1 | r3 &= r1;
0x00013a10 str r1, [sp] | *(sp) = r1;
0x00013a14 mov r0, r8 | r0 = r8;
0x00013a18 add r1, sp, 0x2c | r1 += var_2ch;
0x00013a1c bl 0xb0cc | fcn_0000b0cc (r0, r1, r2);
0x00013a20 ldr r3, [r4, 0x84] | r3 = *((r4 + 0x84));
0x00013a24 mov r1, sb | r1 = sb;
0x00013a28 ldr r3, [r3, 0x20] | r3 = *((r3 + 0x20));
0x00013a2c add r5, r5, 1 | r5++;
0x00013a30 str r0, [sp, 0x2c] | var_2ch = r0;
0x00013a34 ldr r0, [r4, 0x80] | r0 = *((r4 + 0x80));
0x00013a38 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x00013a3c mov r1, 0 | r1 = 0;
0x00013a40 cmp r0, 0 |
| if (r0 != 0) {
0x00013a44 ldreq r3, [sp, 0x2c] | r3 = var_2ch;
| }
| if (r0 != 0) {
0x00013a48 moveq r2, 7 | r2 = 7;
| }
| if (r0 != 0) {
0x00013a4c strbeq r2, [r3, 0x2c] | *((r3 + 0x2c)) = r2;
| }
0x00013a50 ldr sl, [sp, 0x2c] | sl = var_2ch;
0x00013a54 mov r2, 8 | r2 = 8;
0x00013a58 add r0, sl, 0x24 | r0 = sl + 0x24;
0x00013a5c bl 0x384c | memset (r0, r1, r2);
0x00013a60 ldr r2, [sl, 0x30] | r2 = *((sl + 0x30));
0x00013a64 mov r1, sl | r1 = sl;
0x00013a68 ldr r0, [r4, 0x74] | r0 = *((r4 + 0x74));
0x00013a6c bl 0x12d98 | fcn_00012d98 (r0, r1);
0x00013a70 mov r3, 0 | r3 = 0;
0x00013a74 str r3, [r8, 4] | *((r8 + 4)) = r3;
0x00013a78 mov r0, r8 | r0 = r8;
0x00013a7c bl 0xe048 | fcn_0000e048 (r0);
0x00013a80 b 0x139d0 | goto label_5;
| label_18:
0x00013a84 ldr r1, [pc, 0x1a8] | r1 = *(0x13c30);
0x00013a88 mov r2, 3 | r2 = 3;
0x00013a8c add r1, pc, r1 | r1 = pc + r1;
0x00013a90 mov r0, sb | r0 = sb;
0x00013a94 bl 0x357c | r0 = strncmp (r0, r1, r2);
0x00013a98 cmp r0, 0 |
| if (r0 != 0) {
0x00013a9c bne 0x137a4 | goto label_3;
| }
0x00013aa0 ldr r0, [pc, 0x190] | r0 = *(0x13c34);
0x00013aa4 mov r2, 0xb | r2 = 0xb;
0x00013aa8 ldr r1, [pc, 0x18c] | r1 = *(0x13c38);
0x00013aac add r0, pc, r0 | r0 = pc + r0;
0x00013ab0 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00013ab4 subs sb, r0, 0 | sb = r0 - 0;
| if (sb == r0) {
0x00013ab8 beq 0x13970 | goto label_6;
| }
0x00013abc ldr r2, [r4, 0x9c] | r2 = *((r4 + 0x9c));
0x00013ac0 ldr r3, [r8, 4] | r3 = *((r8 + 4));
0x00013ac4 cmp r2, 4 |
0x00013ac8 str r2, [r8, 0xc] | *((r8 + 0xc)) = r2;
0x00013acc str r3, [sp] | *(sp) = r3;
| if (r2 <= 4) {
0x00013ad0 ble 0x13b40 | goto label_21;
| }
0x00013ad4 ldr r3, [pc, 0x164] | r3 = *(0x13c3c);
0x00013ad8 ldr r2, [pc, 0x164] | r2 = *(0x13c40);
0x00013adc add r3, pc, r3 | r3 = pc + r3;
0x00013ae0 add r2, pc, r2 | r2 = pc + r2;
| do {
0x00013ae4 mov r1, 0xb | r1 = 0xb;
0x00013ae8 bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
0x00013aec cmp r0, 0xa |
| if (r0 <= 0xa) {
0x00013af0 ble 0x13b50 | goto label_22;
| }
0x00013af4 ldr r2, [pc, 0x14c] | r2 = *(0x13c44);
0x00013af8 mvn r3, 1 | r3 = ~1;
0x00013afc str r3, [sp, 0x18] | var_18h = r3;
0x00013b00 add r2, pc, r2 | r2 = pc + r2;
0x00013b04 mov r3, r0 | r3 = r0;
0x00013b08 mov r1, 0 | r1 = 0;
0x00013b0c mov r0, 5 | r0 = 5;
0x00013b10 bl 0x12720 | fcn_00012720 (r0, r1);
| label_8:
0x00013b14 ldr r3, [pc, 0x130] | r3 = *(0x13c48);
0x00013b18 mov r2, r8 | r2 = r8;
0x00013b1c add r3, pc, r3 | r3 = pc + r3;
0x00013b20 ldr r1, [pc, 0x128] | r1 = *(0x13c4c);
0x00013b24 mov r8, r3 | r8 = r3;
0x00013b28 mov r0, r3 | r0 = r3;
0x00013b2c bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00013b30 mov r2, sb | r2 = sb;
0x00013b34 ldr r1, [pc, 0x118] | r1 = *(0x13c50);
0x00013b38 mov r0, r8 | r0 = r8;
0x00013b3c b 0x139e0 | goto label_7;
| label_21:
0x00013b40 ldr r2, [pc, 0x110] | r2 = *(0x13c54);
0x00013b44 mov r3, sl | r3 = sl;
0x00013b48 add r2, pc, r2 | r2 = pc + r2;
0x00013b4c b 0x13ae4 |
| } while (1);
| label_22:
0x00013b50 ldr r3, [r4, 0x84] | r3 = *((r4 + 0x84));
0x00013b54 mov r1, sb | r1 = sb;
0x00013b58 ldr r3, [r3, 0x20] | r3 = *((r3 + 0x20));
0x00013b5c ldr r0, [r4, 0x80] | r0 = *((r4 + 0x80));
0x00013b60 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x00013b64 cmp r0, 0 |
| if (r0 == 0) {
0x00013b68 beq 0x13b14 | goto label_8;
| }
0x00013b6c ldr r3, [r4, 0x84] | r3 = *((r4 + 0x84));
0x00013b70 ldr r2, [sp, 0x1c] | r2 = var_1ch;
0x00013b74 ldr r3, [r3, 0x14] | r3 = *((r3 + 0x14));
0x00013b78 ldr r1, [r2, fp] | r1 = *((r2 + fp));
0x00013b7c ldr r0, [r4, 0x80] | r0 = *((r4 + 0x80));
0x00013b80 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00013b84 str r0, [sp, 0x18] | var_18h = r0;
0x00013b88 b 0x13b14 | goto label_8;
| label_16:
0x00013b8c ldr r3, [r4, 0x84] | r3 = *((r4 + 0x84));
0x00013b90 ldr r2, [sp, 0x1c] | r2 = var_1ch;
0x00013b94 ldr r3, [r3, 0x14] | r3 = *((r3 + 0x14));
0x00013b98 ldr r1, [r2, fp] | r1 = *((r2 + fp));
0x00013b9c ldr r0, [r4, 0x80] | r0 = *((r4 + 0x80));
0x00013ba0 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00013ba4 str r0, [sp, 0x18] | var_18h = r0;
0x00013ba8 b 0x137a4 | 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-mqtt3cs.so.1.3.9 @ 0x13cf0 */
| #include <stdint.h>
|
; (fcn) fcn.00013cf0 () | void fcn_00013cf0 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_8h;
| char * s;
| int32_t var_18h;
| r0 = arg1;
| r1 = arg2;
0x00013cf0 push {r4, r5, r6, lr} |
0x00013cf4 mov r4, r0 | r4 = r0;
0x00013cf8 ldr r0, [pc, 0xf4] |
0x00013cfc sub sp, sp, 0x18 |
0x00013d00 add r0, pc, r0 | r0 = pc + r0;
0x00013d04 mov r3, 0 | r3 = 0;
0x00013d08 mov r6, r1 | r6 = r1;
0x00013d0c mov r2, 3 | r2 = 3;
0x00013d10 ldr r1, [pc, 0xe0] | r1 = *(0x13df4);
0x00013d14 add r0, r0, 0x104 | r0 = 0x13ef4;
0x00013d18 str r3, [sp, 8] | var_8h = r3;
0x00013d1c bl 0x1a490 | fcn_0001a490 (r0, r1);
0x00013d20 ldr r3, [r4, 0x9c] | r3 = *((r4 + 0x9c));
0x00013d24 add r5, sp, 0xc | r5 += s;
0x00013d28 cmp r3, 4 |
0x00013d2c ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x00013d30 str r3, [sp] | *(sp) = r3;
| if (r3 <= 4) {
0x00013d34 ble 0x13da4 | goto label_1;
| }
0x00013d38 ldr r3, [pc, 0xbc] | r3 = *(0x13df8);
0x00013d3c ldr r2, [pc, 0xbc] | r2 = *(0x13dfc);
0x00013d40 add r3, pc, r3 | r3 = pc + r3;
0x00013d44 add r2, pc, r2 | r2 = pc + r2;
| do {
0x00013d48 mov r1, 0xb | r1 = 0xb;
0x00013d4c mov r0, r5 | r0 = r5;
0x00013d50 bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
0x00013d54 cmp r0, 0xa |
| if (r0 <= 0xa) {
0x00013d58 ble 0x13db8 | goto label_2;
| }
0x00013d5c ldr r2, [pc, 0xa0] | r2 = *(0x13e00);
0x00013d60 mov r3, r0 | r3 = r0;
0x00013d64 add r2, pc, r2 | r2 = pc + r2;
0x00013d68 mov r1, 0 | r1 = 0;
0x00013d6c mov r0, 5 | r0 = 5;
0x00013d70 bl 0x12720 | fcn_00012720 (r0, r1);
0x00013d74 mvn r3, 1 | r3 = ~1;
0x00013d78 str r3, [sp, 8] | var_8h = r3;
| label_0:
0x00013d7c ldr r0, [pc, 0x84] |
0x00013d80 mov r3, 3 | r3 = 3;
0x00013d84 add r0, pc, r0 | r0 = pc + r0;
0x00013d88 add r2, sp, 8 | r2 += var_8h;
0x00013d8c ldr r1, [pc, 0x78] | r1 = *(0x13e08);
0x00013d90 add r0, r0, 0x104 | r0 = 0x13f08;
0x00013d94 bl 0x1a578 | fcn_0001a578 (r0, r1);
0x00013d98 ldr r0, [sp, 8] | r0 = var_8h;
0x00013d9c add sp, sp, 0x18 |
0x00013da0 pop {r4, r5, r6, pc} |
| label_1:
0x00013da4 ldr r3, [pc, 0x64] | r3 = *(0x13e0c);
0x00013da8 ldr r2, [pc, 0x64] | r2 = *(0x13e10);
0x00013dac add r3, pc, r3 | r3 = pc + r3;
0x00013db0 add r2, pc, r2 | r2 = pc + r2;
0x00013db4 b 0x13d48 |
| } while (1);
| label_2:
0x00013db8 ldr r3, [r4, 0x84] | r3 = *((r4 + 0x84));
0x00013dbc mov r1, r5 | r1 = r5;
0x00013dc0 ldr r3, [r3, 0x14] | r3 = *((r3 + 0x14));
0x00013dc4 ldr r0, [r4, 0x80] | r0 = *((r4 + 0x80));
0x00013dc8 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x00013dcc cmp r0, 0 |
0x00013dd0 mov r3, r0 | r3 = r0;
0x00013dd4 str r0, [sp, 8] | var_8h = r0;
| if (r0 == 0) {
0x00013dd8 beq 0x13d7c | goto label_0;
| }
0x00013ddc ldr r2, [pc, 0x34] | r2 = *(0x13e14);
0x00013de0 mov r1, 0 | r1 = 0;
0x00013de4 add r2, pc, r2 | r2 = pc + r2;
0x00013de8 mov r0, 5 | r0 = 5;
0x00013dec bl 0x12720 | fcn_00012720 (r0, r1);
0x00013df0 b 0x13d7c | 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-mqtt3cs.so.1.3.9 @ 0x13e1c */
| #include <stdint.h>
|
; (fcn) fcn.00013e1c () | void fcn_00013e1c (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| int32_t var_10h;
| char * var_14h;
| void * s;
| int32_t var_30h;
| int32_t var_34h;
| int32_t var_38h;
| int32_t var_3ch;
| int32_t var_40h;
| int32_t var_44h;
| int32_t var_48h;
| int32_t var_4ch;
| int32_t var_50h;
| int32_t var_54h;
| int32_t var_58h;
| int32_t var_5ch;
| int32_t var_60h;
| int32_t var_64h;
| int32_t var_68h;
| int32_t var_6ch;
| int32_t var_70h;
| int32_t var_74h;
| int32_t var_78h;
| r0 = arg1;
| r1 = arg2;
0x00013e1c push {r4, r5, r6, r7, r8, lr} |
0x00013e20 mov r5, r0 | r5 = r0;
0x00013e24 ldr r0, [pc, 0x25c] |
0x00013e28 sub sp, sp, 0x78 |
0x00013e2c add r0, pc, r0 | r0 = pc + r0;
0x00013e30 mov r7, r1 | r7 = r1;
0x00013e34 mov r2, 3 | r2 = 3;
0x00013e38 mov r4, 0 | r4 = 0;
0x00013e3c mov r1, 0x2b0 | r1 = 0x2b0;
0x00013e40 add r0, r0, 0x128 | r0 = 0x141ac;
0x00013e44 str r4, [sp, 0xc] | var_ch = r4;
0x00013e48 bl 0x1a490 | fcn_0001a490 (r0, r1);
0x00013e4c ldr r6, [r7] | r6 = *(r7);
0x00013e50 ldr r0, [r7, 4] | r0 = *((r7 + 4));
0x00013e54 add r3, r6, 8 | r3 = r6 + 8;
0x00013e58 str r3, [sp, 0x54] | var_54h = r3;
0x00013e5c ldr r3, [r6, 0xc] | r3 = *((r6 + 0xc));
0x00013e60 mov r8, 4 | r8 = 4;
0x00013e64 str r3, [sp, 0x58] | var_58h = r3;
0x00013e68 ldr r3, [r6, 8] | r3 = *((r6 + 8));
0x00013e6c str r8, [sp, 0x30] | var_30h = r8;
0x00013e70 str r3, [sp, 0x34] | var_34h = r3;
0x00013e74 add r3, r6, 0x10 | r3 = r6 + 0x10;
0x00013e78 str r3, [sp, 0x5c] | var_5ch = r3;
0x00013e7c add r3, r6, 0x14 | r3 = r6 + 0x14;
0x00013e80 str r3, [sp, 0x60] | var_60h = r3;
0x00013e84 add r3, r6, 0x18 | r3 = r6 + 0x18;
0x00013e88 str r3, [sp, 0x64] | var_64h = r3;
0x00013e8c add r3, r6, 0x1c | r3 = r6 + 0x1c;
0x00013e90 str r3, [sp, 0x68] | var_68h = r3;
0x00013e94 str r8, [sp, 0x38] | var_38h = r8;
0x00013e98 str r8, [sp, 0x3c] | var_3ch = r8;
0x00013e9c str r8, [sp, 0x40] | var_40h = r8;
0x00013ea0 str r8, [sp, 0x44] | var_44h = r8;
0x00013ea4 str r0, [sp, 0x6c] | var_6ch = r0;
0x00013ea8 bl 0x35dc | strlen (r0);
0x00013eac add r3, r7, 8 | r3 = r7 + 8;
0x00013eb0 str r3, [sp, 0x70] | var_70h = r3;
0x00013eb4 ldr r3, [r5, 0x7c] | r3 = *((r5 + 0x7c));
0x00013eb8 ldr r2, [pc, 0x1cc] | r2 = *(0x14088);
0x00013ebc add r3, r3, 1 | r3++;
0x00013ec0 cmp r3, r2 |
0x00013ec4 ldr r2, [r5, 0x9c] | r2 = *((r5 + 0x9c));
| if (r3 != r2) {
0x00013ec8 moveq r3, r4 | r3 = r4;
| }
0x00013ecc cmp r2, r8 |
0x00013ed0 str r8, [sp, 0x4c] | var_4ch = r8;
0x00013ed4 str r3, [r5, 0x7c] | *((r5 + 0x7c)) = r3;
0x00013ed8 add r0, r0, 1 | r0++;
0x00013edc str r0, [sp, 0x48] | var_48h = r0;
| if (r2 <= r8) {
0x00013ee0 ble 0x14060 | goto label_0;
| }
0x00013ee4 add r3, sp, 0x20 | r3 += s;
0x00013ee8 mov r1, r4 | r1 = r4;
0x00013eec mov r0, r3 | r0 = r3;
0x00013ef0 mov r2, 0x10 | r2 = 0x10;
0x00013ef4 bl 0x384c | memset (r0, r1, r2);
0x00013ef8 ldr r2, [r6, 4] | r2 = *((r6 + 4));
0x00013efc str r4, [sp, 0x10] | var_10h = r4;
0x00013f00 cmp r2, r4 |
| if (r2 <= r4) {
0x00013f04 addgt r6, r6, 0x20 | r6 += 0x20;
| }
| if (r2 > r4) {
0x00013f08 movle r6, r0 | r6 = r0;
| }
0x00013f0c mov r0, r6 | r0 = r6;
0x00013f10 bl 0x1772c | fcn_0001772c (r0);
0x00013f14 ldr r1, [pc, 0x174] | r1 = *(0x1408c);
0x00013f18 mov r2, r0 | r2 = r0;
0x00013f1c mov r4, r0 | r4 = r0;
0x00013f20 ldr r0, [pc, 0x16c] | r0 = *(0x14090);
0x00013f24 add r0, pc, r0 | r0 = pc + r0;
0x00013f28 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00013f2c cmp r0, 0 |
| if (r0 != 0) {
0x00013f30 mvneq r3, 0x62 | r3 = ~0x62;
| }
0x00013f34 str r0, [sp, 0x74] | var_74h = r0;
0x00013f38 str r0, [sp, 0x10] | var_10h = r0;
| if (r0 != 0) {
0x00013f3c streq r3, [sp, 0xc] | var_ch = r3;
| }
| if (r0 == 0) {
0x00013f40 beq 0x14038 | goto label_1;
| }
0x00013f44 mov r1, r6 | r1 = r6;
0x00013f48 add r0, sp, 0x10 | r0 += var_10h;
0x00013f4c bl 0x179dc | fcn_000179dc (r0, r1);
0x00013f50 ldr r3, [r5, 0x7c] | r3 = *((r5 + 0x7c));
0x00013f54 ldr r2, [pc, 0x13c] | r2 = *(0x14094);
0x00013f58 str r3, [sp] | *(sp) = r3;
0x00013f5c ldr r3, [pc, 0x138] | r3 = *(0x14098);
0x00013f60 add r2, pc, r2 | r2 = pc + r2;
0x00013f64 add r3, pc, r3 | r3 = pc + r3;
0x00013f68 mov r1, 0xb | r1 = 0xb;
0x00013f6c str r4, [sp, 0x50] | var_50h = r4;
0x00013f70 mov r6, 9 | r6 = 9;
0x00013f74 mov r4, 8 | r4 = 8;
0x00013f78 str r0, [sp, 0xc] | var_ch = r0;
0x00013f7c add r0, sp, 0x14 | r0 += var_14h;
0x00013f80 bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
| do {
0x00013f84 cmp r0, 0xa |
| if (r0 <= 0xa) {
0x00013f88 mvngt r3, 1 | r3 = ~1;
| }
| if (r0 <= 0xa) {
0x00013f8c strgt r3, [sp, 0xc] | var_ch = r3;
| }
| if (r0 <= 0xa) {
0x00013f90 bgt 0x14014 |
0x00013f94 ldr r3, [r5, 0x7c] | r3 = *((r5 + 0x7c));
0x00013f98 str r3, [r7, 0xc] | *((r7 + 0xc)) = r3;
0x00013f9c ldr r7, [r5, 0x88] | r7 = *((r5 + 0x88));
0x00013fa0 cmp r7, 0 |
| if (r7 != 0) {
0x00013fa4 beq 0x13fc0 |
0x00013fa8 add r3, sp, 0x30 | r3 += var_30h;
0x00013fac add r2, sp, 0x54 | r2 += var_54h;
0x00013fb0 mov r1, r6 | r1 = r6;
0x00013fb4 ldr r0, [r5, 0x90] | r0 = *((r5 + 0x90));
0x00013fb8 blx r7 | uint32_t (*r7)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00013fbc str r0, [sp, 0xc] | var_ch = r0;
| }
0x00013fc0 ldr r7, [sp, 0xc] | r7 = var_ch;
0x00013fc4 cmp r7, 0 |
| if (r7 != 0) {
0x00013fc8 bne 0x14014 | goto label_2;
| }
0x00013fcc ldr r3, [r5, 0x84] | r3 = *((r5 + 0x84));
0x00013fd0 add r2, sp, 0x30 | r2 += var_30h;
0x00013fd4 str r2, [sp] | *(sp) = r2;
0x00013fd8 add r1, sp, 0x14 | r1 += var_14h;
0x00013fdc ldr r8, [r3, 0xc] | r8 = *((r3 + 0xc));
0x00013fe0 mov r2, r6 | r2 = r6;
0x00013fe4 add r3, sp, 0x54 | r3 += var_54h;
0x00013fe8 ldr r0, [r5, 0x80] | r0 = *((r5 + 0x80));
0x00013fec blx r8 | r0 = uint32_t (*r8)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00013ff0 cmp r0, 0 |
0x00013ff4 mov r3, r0 | r3 = r0;
0x00013ff8 str r0, [sp, 0xc] | var_ch = r0;
| if (r0 == 0) {
0x00013ffc beq 0x14014 | goto label_2;
| }
0x00014000 ldr r2, [pc, 0x98] | r2 = *(0x1409c);
0x00014004 mov r1, r7 | r1 = r7;
0x00014008 add r2, pc, r2 | r2 = pc + r2;
0x0001400c mov r0, 5 | r0 = 5;
0x00014010 bl 0x12720 | fcn_00012720 (r0, r1);
| }
| label_2:
0x00014014 cmp r4, 0 |
| if (r4 != 0) {
0x00014018 beq 0x14038 |
0x0001401c ldr r0, [pc, 0x80] | r0 = *(0x140a0);
0x00014020 add r3, sp, 0x78 | r3 += var_78h;
0x00014024 add r4, r3, r4, lsl 2 | r4 = r3 + (r4 << 2);
0x00014028 ldr r2, [r4, -0x24] | r2 = var_54h;
0x0001402c ldr r1, [pc, 0x74] | r1 = *(0x140a4);
0x00014030 add r0, pc, r0 | r0 = pc + r0;
0x00014034 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
| }
| label_1:
0x00014038 ldr r0, [pc, 0x6c] |
0x0001403c mov r3, 3 | r3 = 3;
0x00014040 add r0, pc, r0 | r0 = pc + r0;
0x00014044 add r2, sp, 0xc | r2 += var_ch;
0x00014048 ldr r1, [pc, 0x60] | r1 = *(0x140ac);
0x0001404c add r0, r0, 0x128 | r0 = 0x141d0;
0x00014050 bl 0x1a578 | fcn_0001a578 (r0, r1);
0x00014054 ldr r0, [sp, 0xc] | r0 = var_ch;
0x00014058 add sp, sp, 0x78 |
0x0001405c pop {r4, r5, r6, r7, r8, pc} |
| label_0:
0x00014060 str r3, [sp] | *(sp) = r3;
0x00014064 ldr r2, [pc, 0x48] | r2 = *(0x140b0);
0x00014068 ldr r3, [pc, 0x48] | r3 = *(0x140b4);
0x0001406c add r2, pc, r2 | r2 = pc + r2;
0x00014070 add r3, pc, r3 | r3 = pc + r3;
0x00014074 mov r1, 0xb | r1 = 0xb;
0x00014078 add r0, sp, 0x14 | r0 += var_14h;
0x0001407c bl 0x360c | snprintf (r0, r1, r2, r3)
0x00014080 mov r6, 8 | r6 = 8;
0x00014084 b 0x13f84 |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/lib/libpaho-mqtt3cs.so.1.3.9 @ 0x15bd0 */
| #include <stdint.h>
|
; (fcn) fcn.00015bd0 () | void fcn_00015bd0 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_ch;
| int32_t var_14h;
| r0 = arg1;
| r1 = arg2;
0x00015bd0 push {r4, r5, r6, r7, lr} |
0x00015bd4 mov r5, r0 | r5 = r0;
0x00015bd8 ldr r0, [pc, 0x104] |
0x00015bdc mov r3, 0 | r3 = 0;
0x00015be0 add r0, pc, r0 | r0 = pc + r0;
0x00015be4 sub sp, sp, 0x14 |
0x00015be8 mov r7, r1 | r7 = r1;
0x00015bec mov r2, 3 | r2 = 3;
0x00015bf0 ldr r1, [pc, 0xf0] | r1 = *(0x15ce4);
0x00015bf4 add r0, r0, 0x18 | r0 = 0x15cf8;
0x00015bf8 str r3, [sp, 0xc] | var_ch = r3;
0x00015bfc bl 0x1a490 | fcn_0001a490 (r0, r1);
0x00015c00 cmp r5, 0 |
| if (r5 != 0) {
0x00015c04 mvneq r3, 1 | r3 = ~1;
| }
| if (r5 != 0) {
0x00015c08 beq 0x15c48 |
0x00015c0c mov r0, r5 | r0 = r5;
0x00015c10 bl 0x35dc | r0 = strlen (r0);
0x00015c14 mov r4, r0 | r4 = r0;
0x00015c18 mov r0, r7 | r0 = r7;
0x00015c1c bl 0x35dc | strlen (r0);
0x00015c20 ldr r1, [pc, 0xc4] | r1 = *(0x15ce8);
0x00015c24 add r4, r4, r0 | r4 += r0;
0x00015c28 ldr r0, [pc, 0xc0] | r0 = *(0x15cec);
0x00015c2c add r4, r4, 6 | r4 += 6;
0x00015c30 mov r2, r4 | r2 = r4;
0x00015c34 add r0, pc, r0 | r0 = pc + r0;
0x00015c38 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00015c3c subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 != r0) {
0x00015c40 bne 0x15c74 | goto label_2;
| }
0x00015c44 mvn r3, 0x62 | r3 = ~0x62;
| }
0x00015c48 str r3, [sp, 0xc] | var_ch = r3;
| do {
0x00015c4c ldr r0, [pc, 0xa0] |
0x00015c50 mov r3, 3 | r3 = 3;
0x00015c54 add r0, pc, r0 | r0 = pc + r0;
0x00015c58 add r2, sp, 0xc | r2 += var_ch;
0x00015c5c ldr r1, [pc, 0x94] | r1 = *(0x15cf4);
0x00015c60 add r0, r0, 0x18 | r0 = 0x15d08;
0x00015c64 bl 0x1a578 | fcn_0001a578 (r0, r1);
0x00015c68 ldr r0, [sp, 0xc] | r0 = var_ch;
0x00015c6c add sp, sp, 0x14 |
0x00015c70 pop {r4, r5, r6, r7, pc} |
| label_2:
0x00015c74 ldr r3, [pc, 0x80] | r3 = *(0x15cf8);
0x00015c78 ldr r2, [pc, 0x80] | r2 = *(0x15cfc);
0x00015c7c add r3, pc, r3 | r3 = pc + r3;
0x00015c80 str r3, [sp, 4] | var_4h = r3;
0x00015c84 str r7, [sp] | *(sp) = r7;
0x00015c88 mov r3, r5 | r3 = r5;
0x00015c8c add r2, pc, r2 | r2 = pc + r2;
0x00015c90 mov r1, r4 | r1 = r4;
0x00015c94 bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
0x00015c98 cmp r0, r4 |
| if (r0 <= r4) {
0x00015c9c blo 0x15cc0 | goto label_3;
| }
| label_1:
0x00015ca0 mvn r3, 1 | r3 = ~1;
0x00015ca4 str r3, [sp, 0xc] | var_ch = r3;
| label_0:
0x00015ca8 ldr r0, [pc, 0x54] | r0 = *(0x15d00);
0x00015cac mov r2, r6 | r2 = r6;
0x00015cb0 ldr r1, [pc, 0x50] | r1 = "ersistence_clear";
0x00015cb4 add r0, pc, r0 | r0 = pc + r0;
0x00015cb8 bl 0x1ad1c | fcn_0001ad1c (r0, "ersistence_clear");
0x00015cbc b 0x15c4c |
| } while (1);
| label_3:
0x00015cc0 mov r0, r6 | r0 = r6;
0x00015cc4 bl 0x3834 | r0 = unlink (r0);
0x00015cc8 cmp r0, 0 |
| if (r0 == 0) {
0x00015ccc beq 0x15ca8 | goto label_0;
| }
0x00015cd0 bl 0x33f0 | r0 = errno_location ();
0x00015cd4 ldr r3, [r0] | r3 = *(r0);
0x00015cd8 cmp r3, 2 |
| if (r3 != 2) {
0x00015cdc bne 0x15ca0 | goto label_1;
| }
0x00015ce0 b 0x15ca8 | 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-mqtt3cs.so.1.3.9 @ 0x15f44 */
| #include <stdint.h>
|
; (fcn) fcn.00015f44 () | void fcn_00015f44 (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;
0x00015f44 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00015f48 mov r7, r0 | r7 = r0;
0x00015f4c ldr r0, [pc, 0x19c] |
0x00015f50 sub sp, sp, 0x7c |
0x00015f54 add r0, pc, r0 | r0 = pc + r0;
0x00015f58 mvn r3, 1 | r3 = ~1;
0x00015f5c mov r2, 3 | r2 = 3;
0x00015f60 add r0, r0, 0x32 | r0 = 0x1611e;
0x00015f64 mov sl, r1 | sl = r1;
0x00015f68 mov r1, 0x1ec | r1 = 0x1ec;
0x00015f6c str r3, [sp, 0xc] | var_ch = r3;
0x00015f70 bl 0x1a490 | fcn_0001a490 (r0, r1);
0x00015f74 mov r0, r7 | r0 = r7;
0x00015f78 bl 0x35f4 | r0 = opendir ();
0x00015f7c subs sb, r0, 0 | sb = r0 - 0;
| if (sb == r0) {
0x00015f80 beq 0x15ff8 | goto label_3;
| }
0x00015f84 ldr r6, [pc, 0x168] | r6 = *(0x160f0);
0x00015f88 add r6, pc, r6 | r6 = pc + r6;
| label_2:
0x00015f8c ldr fp, [pc, 0x164] | fp = *(0x000160f8);
0x00015f90 add fp, pc, fp |
| label_0:
0x00015f94 mov r0, sb | r0 = sb;
0x00015f98 bl 0x3b70 | r0 = readdir64 ();
0x00015f9c subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00015fa0 beq 0x15ff0 | goto label_4;
| }
0x00015fa4 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00015fa8 cmp r3, 0 |
| if (r3 == 0) {
0x00015fac beq 0x15ff0 | goto label_4;
| }
0x00015fb0 mov r0, r7 | r0 = r7;
0x00015fb4 bl 0x35dc | strlen (r0);
0x00015fb8 add r5, r5, 0x13 | r5 += 0x13;
0x00015fbc mov r4, r0 | r4 = r0;
0x00015fc0 mov r0, r5 | r0 = r5;
0x00015fc4 bl 0x35dc | strlen (r0);
0x00015fc8 ldr r1, [pc, 0x12c] | r1 = *(0x160f8);
0x00015fcc add r4, r4, r0 | r4 += r0;
0x00015fd0 add r4, r4, 2 | r4 += 2;
0x00015fd4 mov r2, r4 | r2 = r4;
0x00015fd8 mov r0, r6 | r0 = r6;
0x00015fdc bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00015fe0 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x00015fe4 bne 0x16020 | goto label_5;
| }
| label_1:
0x00015fe8 mvn r3, 0x62 | r3 = ~0x62;
| do {
0x00015fec str r3, [sp, 0xc] | var_ch = r3;
| label_4:
0x00015ff0 mov r0, sb | r0 = sb;
0x00015ff4 bl 0x3750 | closedir ();
| label_3:
0x00015ff8 ldr r0, [pc, 0x100] |
0x00015ffc mov r3, 3 | r3 = 3;
0x00016000 add r0, pc, r0 | r0 = pc + r0;
0x00016004 add r2, sp, 0xc | r2 += var_ch;
0x00016008 ldr r1, [pc, 0xf4] | r1 = *(0x16100);
0x0001600c add r0, r0, 0x32 | r0 = 0x1612e;
0x00016010 bl 0x1a578 | fcn_0001a578 (r0, r1);
0x00016014 ldr r0, [sp, 0xc] | r0 = var_ch;
0x00016018 add sp, sp, 0x7c |
0x0001601c pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x00016020 str r5, [sp] | *(sp) = r5;
0x00016024 mov r3, r7 | r3 = r7;
0x00016028 mov r2, fp | r2 = fp;
0x0001602c mov r1, r4 | r1 = r4;
0x00016030 bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
0x00016034 cmp r0, r4 |
| if (r0 <= r4) {
0x00016038 blo 0x16054 | goto label_6;
| }
0x0001603c mov r2, r8 | r2 = r8;
0x00016040 ldr r1, [pc, 0xc0] | r1 = *(0x16104);
0x00016044 mov r0, r6 | r0 = r6;
0x00016048 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x0001604c mvn r3, 1 | r3 = ~1;
0x00016050 b 0x15fec |
| } while (1);
| label_6:
0x00016054 add r1, sp, 0x10 | r1 += var_10h;
0x00016058 mov r0, r8 | r0 = r8;
0x0001605c bl 0x36cc | lstat64 ();
0x00016060 mov r2, r8 | r2 = r8;
0x00016064 mov r1, 0x200 | r1 = 0x200;
0x00016068 mov r0, r6 | r0 = r6;
0x0001606c bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00016070 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00016074 and r3, r3, 0xf000 | r3 &= 0xf000;
0x00016078 cmp r3, 0x8000 |
| if (r3 != 0x8000) {
0x0001607c bne 0x15f94 | goto label_0;
| }
0x00016080 mov r0, r5 | r0 = r5;
0x00016084 bl 0x35dc | strlen (r0);
0x00016088 ldr r1, [pc, 0x7c] | r1 = *(0x16108);
0x0001608c add r2, r0, 1 | r2 = r0 + 1;
0x00016090 mov r0, r6 | r0 = r6;
0x00016094 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00016098 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x0001609c beq 0x15fe8 | goto label_1;
| }
0x000160a0 mov r1, r5 | r1 = r5;
0x000160a4 bl 0x3b94 | strcpy (r0, r1);
0x000160a8 ldr r1, [pc, 0x60] | r1 = *(0x1610c);
0x000160ac mov r0, r4 | r0 = r4;
0x000160b0 add r1, pc, r1 | r1 = pc + r1;
0x000160b4 bl 0x3a50 | strstr (r0, r1);
0x000160b8 mov r1, sl | r1 = sl;
0x000160bc cmp r0, 0 |
| if (r0 == 0) {
0x000160c0 movne r3, 0 | r3 = 0;
| }
| if (r0 == 0) {
0x000160c4 strbne r3, [r0] | *(r0) = r3;
| }
0x000160c8 mov r0, r4 | r0 = r4;
0x000160cc bl 0x3a5c | strcmp (r0, r1);
0x000160d0 mov r2, r4 | r2 = r4;
0x000160d4 ldr r1, [pc, 0x38] | r1 = *(0x16110);
0x000160d8 cmp r0, 0 |
| if (r0 != 0) {
0x000160dc streq r0, [sp, 0xc] | var_ch = r0;
| }
0x000160e0 ldr r0, [pc, 0x30] | r0 = *(0x16114);
0x000160e4 add r0, pc, r0 | r0 = pc + r0;
0x000160e8 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x000160ec b 0x15f8c | 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-mqtt3cs.so.1.3.9 @ 0x16308 */
| #include <stdint.h>
|
; (fcn) fcn.00016308 () | void fcn_00016308 (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;
0x00016308 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001630c mov sl, r0 | sl = r0;
0x00016310 ldr r0, [pc, 0x314] |
0x00016314 sub sp, sp, 0x8c |
0x00016318 add r0, pc, r0 | r0 = pc + r0;
0x0001631c str r1, [sp, 0xc] | var_ch = r1;
0x00016320 str r2, [sp, 0x10] | var_10h = r2;
0x00016324 ldr r1, [pc, 0x304] | r1 = *(0x1662c);
0x00016328 mov r2, 3 | r2 = 3;
0x0001632c add r0, r0, 0x64 | r0 = 0x1668c;
0x00016330 mov r4, 0 | r4 = 0;
0x00016334 str r4, [sp, 0x1c] | var_1ch = r4;
0x00016338 bl 0x1a490 | fcn_0001a490 (r0, r1);
0x0001633c mov r0, sl | r0 = sl;
0x00016340 bl 0x35f4 | r0 = opendir ();
0x00016344 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x00016348 bne 0x16488 | goto label_10;
| }
| label_4:
0x0001634c mvn r3, 1 | r3 = ~1;
| label_2:
0x00016350 str r3, [sp, 0x1c] | var_1ch = r3;
| do {
| label_8:
0x00016354 ldr r0, [pc, 0x2d8] |
0x00016358 mov r3, 3 | r3 = 3;
0x0001635c add r0, pc, r0 | r0 = pc + r0;
0x00016360 add r2, sp, 0x1c | r2 += var_1ch;
0x00016364 mov r1, 0x370 | r1 = 0x370;
0x00016368 add r0, r0, 0x64 | r0 = 0x16694;
0x0001636c bl 0x1a578 | fcn_0001a578 (r0, r1);
0x00016370 ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x00016374 add sp, sp, 0x8c |
0x00016378 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_1:
0x0001637c mov r0, sl | r0 = sl;
0x00016380 bl 0x35dc | strlen (r0);
0x00016384 add r3, r7, 0x13 | r3 = r7 + 0x13;
0x00016388 str r3, [sp, 8] | var_8h = r3;
0x0001638c mov r6, r0 | r6 = r0;
0x00016390 mov r0, r3 | r0 = r3;
0x00016394 bl 0x35dc | strlen (r0);
0x00016398 mov r1, sb | r1 = sb;
0x0001639c add r6, r6, r0 | r6 += r0;
0x000163a0 add r6, r6, 2 | r6 += 2;
0x000163a4 mov r2, r6 | r2 = r6;
0x000163a8 mov r0, r8 | r0 = r8;
0x000163ac bl 0x1ab60 | fcn_0001ab60 (r0, r1);
0x000163b0 ldr r3, [sp, 8] | r3 = var_8h;
0x000163b4 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x000163b8 bne 0x163d0 | goto label_11;
| }
| label_5:
0x000163bc mvn r3, 0x62 | r3 = ~0x62;
| label_0:
0x000163c0 str r3, [sp, 0x1c] | var_1ch = r3;
| label_9:
0x000163c4 mov r0, r5 | r0 = r5;
0x000163c8 bl 0x3750 | closedir ();
0x000163cc b 0x16354 |
| } while (1);
| label_11:
0x000163d0 str r3, [sp] | *(sp) = r3;
0x000163d4 mov r2, fp | r2 = fp;
0x000163d8 mov r3, sl | r3 = sl;
0x000163dc mov r1, r6 | r1 = r6;
0x000163e0 bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
0x000163e4 cmp r0, r6 |
| if (r0 > r6) {
0x000163e8 blo 0x16404 |
0x000163ec ldr r1, [pc, 0x244] | r1 = "G";
0x000163f0 mov r2, r7 | r2 = r7;
0x000163f4 mov r0, r8 | r0 = r8;
| label_6:
0x000163f8 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x000163fc mvn r3, 1 | r3 = ~1;
0x00016400 b 0x163c0 | goto label_0;
| }
0x00016404 add r1, sp, 0x20 | r1 += var_20h;
0x00016408 mov r0, r7 | r0 = r7;
0x0001640c bl 0x36cc | r0 = lstat64 ();
0x00016410 cmp r0, 0 |
| if (r0 == 0) {
0x00016414 bne 0x16428 |
0x00016418 ldr r3, [sp, 0x30] | r3 = var_30h;
0x0001641c and r3, r3, 0xf000 | r3 &= 0xf000;
0x00016420 cmp r3, 0x8000 |
| if (r3 == 0x8000) {
0x00016424 addeq r4, r4, 1 | r4++;
| goto label_12;
| }
| }
| label_12:
0x00016428 ldr r0, [pc, 0x20c] | r0 = *(0x16638);
0x0001642c mov r2, r7 | r2 = r7;
0x00016430 ldr r1, [pc, 0x208] | r1 = *(0x1663c);
0x00016434 add r0, pc, r0 | r0 = pc + r0;
0x00016438 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
| label_3:
0x0001643c mov r0, r5 | r0 = r5;
0x00016440 bl 0x3b70 | r0 = readdir64 ();
0x00016444 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x00016448 bne 0x1637c | goto label_1;
| }
0x0001644c mov r0, r5 | r0 = r5;
0x00016450 bl 0x3750 | closedir ();
0x00016454 cmp r4, 0 |
| if (r4 != 0) {
0x00016458 moveq r5, r4 | r5 = r4;
| }
| if (r4 != 0) {
0x0001645c moveq r6, r4 | r6 = r4;
| }
| if (r4 == 0) {
0x00016460 beq 0x16610 | goto label_13;
| }
0x00016464 ldr r0, [pc, 0x1d8] | r0 = *(0x16640);
0x00016468 lsl r2, r4, 2 | r2 = r4 << 2;
0x0001646c ldr r1, [pc, 0x1d4] | r1 = *(0x16644);
0x00016470 add r0, pc, r0 | r0 = pc + r0;
0x00016474 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00016478 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x0001647c bne 0x164a0 |
0x00016480 mvn r3, 0x62 | r3 = ~0x62;
0x00016484 b 0x16350 | goto label_2;
| label_10:
0x00016488 ldr r8, [pc, 0x1bc] | r8 = *(0x16648);
0x0001648c ldr fp, [pc, 0x1bc] | fp = *(0x00016650);
0x00016490 add r8, pc, r8 | r8 = pc + r8;
0x00016494 ldr sb, [pc, 0x1b8] | sb = *(0x00016654);
0x00016498 add fp, pc, fp |
0x0001649c b 0x1643c | goto label_3;
| }
0x000164a0 mov r0, sl | r0 = sl;
0x000164a4 bl 0x35f4 | r0 = opendir ();
0x000164a8 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x000164ac beq 0x1634c | goto label_4;
| }
0x000164b0 ldr r3, [pc, 0x1a0] | r3 = *(0x16654);
0x000164b4 str r7, [sp, 8] | var_8h = r7;
0x000164b8 ldr r7, [pc, 0x19c] | r7 = *(0x16658);
0x000164bc add r3, pc, r3 | r3 = pc + r3;
0x000164c0 add r7, pc, r7 | r7 = pc + r7;
0x000164c4 str r3, [sp, 0x14] | var_14h = r3;
0x000164c8 b 0x16600 | goto label_14;
| label_7:
0x000164cc mov r0, sl | r0 = sl;
0x000164d0 bl 0x35dc | strlen (r0);
0x000164d4 add sb, sb, 0x13 | sb += 0x13;
0x000164d8 mov r8, r0 | r8 = r0;
0x000164dc mov r0, sb | r0 = sb;
0x000164e0 bl 0x35dc | strlen (r0);
0x000164e4 ldr r1, [pc, 0x174] | r1 = *(0x1665c);
0x000164e8 add r8, r8, r0 | r8 += r0;
0x000164ec add r8, r8, 2 | r8 += 2;
0x000164f0 mov r2, r8 | r2 = r8;
0x000164f4 mov r0, r7 | r0 = r7;
0x000164f8 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x000164fc subs fp, r0, 0 |
| if (fp != r0) {
0x00016500 bne 0x16518 | goto label_15;
| }
0x00016504 ldr r1, [pc, 0x158] | r1 = *(0x16660);
0x00016508 mov r2, r6 | r2 = r6;
| do {
0x0001650c mov r0, r7 | r0 = r7;
0x00016510 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00016514 b 0x163bc | goto label_5;
| label_15:
0x00016518 str sb, [sp] | *(sp) = sb;
0x0001651c mov r3, sl | r3 = sl;
0x00016520 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00016524 mov r1, r8 | r1 = r8;
0x00016528 bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
0x0001652c cmp r0, r8 |
| if (r0 > r8) {
0x00016530 blo 0x16554 |
0x00016534 mov r2, fp | r2 = fp;
0x00016538 mov r1, 0x34c | r1 = 0x34c;
0x0001653c mov r0, r7 | r0 = r7;
0x00016540 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00016544 mov r2, r6 | r2 = r6;
0x00016548 ldr r1, [pc, 0x118] | r1 = *(0x16664);
0x0001654c mov r0, r7 | r0 = r7;
0x00016550 b 0x163f8 | goto label_6;
| }
0x00016554 add r1, sp, 0x20 | r1 += var_20h;
0x00016558 mov r0, fp | r0 = fp;
0x0001655c bl 0x36cc | r0 = lstat64 ();
0x00016560 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x00016564 bne 0x165ec | goto label_16;
| }
0x00016568 ldr r3, [sp, 0x30] | r3 = var_30h;
0x0001656c and r3, r3, 0xf000 | r3 &= 0xf000;
0x00016570 cmp r3, 0x8000 |
| if (r3 != 0x8000) {
0x00016574 bne 0x165ec | goto label_16;
| }
0x00016578 mov r0, sb | r0 = sb;
0x0001657c bl 0x35dc | strlen (r0);
0x00016580 ldr r1, [pc, 0xe4] | r1 = *(0x16668);
0x00016584 add r2, r0, 1 | r2 = r0 + 1;
0x00016588 mov r0, r7 | r0 = r7;
0x0001658c bl 0x1ab60 | fcn_0001ab60 (r0, r1);
0x00016590 ldr r2, [sp, 8] | r2 = var_8h;
0x00016594 cmp r0, 0 |
0x00016598 str r0, [r6, r2, lsl 2] | offset_0 = r2 << 2;
| *((r6 + offset_0)) = r0;
| if (r0 != 0) {
0x0001659c bne 0x165bc | goto label_17;
| }
0x000165a0 mov r2, fp | r2 = fp;
0x000165a4 ldr r1, [pc, 0xc4] | r1 = *(0x1666c);
0x000165a8 mov r0, r7 | r0 = r7;
0x000165ac bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x000165b0 mov r2, r6 | r2 = r6;
0x000165b4 ldr r1, [pc, 0xb8] | r1 = *(0x16670);
0x000165b8 b 0x1650c |
| } while (1);
| label_17:
0x000165bc mov r1, sb | r1 = sb;
0x000165c0 bl 0x3b94 | strcpy (r0, r1);
0x000165c4 ldr r3, [sp, 8] | r3 = var_8h;
0x000165c8 ldr r1, [pc, 0xa8] | r1 = *(0x16674);
0x000165cc ldr r0, [r6, r3, lsl 2] | offset_1 = r3 << 2;
| r0 = *((r6 + offset_1));
0x000165d0 add r1, pc, r1 | r1 = pc + r1;
0x000165d4 bl 0x3a50 | strstr (r0, r1);
0x000165d8 ldr r3, [sp, 8] | r3 = var_8h;
0x000165dc add r3, r3, 1 | r3++;
0x000165e0 str r3, [sp, 8] | var_8h = r3;
0x000165e4 cmp r0, 0 |
| if (r0 == 0) {
0x000165e8 strbne r8, [r0] | *(r0) = r8;
| }
| label_16:
0x000165ec ldr r0, [pc, 0x88] | r0 = *(0x16678);
0x000165f0 mov r2, fp | r2 = fp;
0x000165f4 mov r1, 0x360 | r1 = 0x360;
0x000165f8 add r0, pc, r0 | r0 = pc + r0;
0x000165fc bl 0x1ad1c | fcn_0001ad1c (r0, r1);
| label_14:
0x00016600 mov r0, r5 | r0 = r5;
0x00016604 bl 0x3b70 | r0 = readdir64 ();
0x00016608 subs sb, r0, 0 | sb = r0 - 0;
| if (sb != r0) {
0x0001660c bne 0x164cc | goto label_7;
| }
| label_13:
0x00016610 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00016614 cmp r5, 0 |
0x00016618 str r4, [r3] | *(r3) = r4;
0x0001661c ldr r3, [sp, 0xc] | r3 = var_ch;
0x00016620 str r6, [r3] | *(r3) = r6;
| if (r5 == 0) {
0x00016624 beq 0x16354 | goto label_8;
| }
0x00016628 b 0x163c4 | 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-mqtt3cs.so.1.3.9 @ 0x18a0c */
| #include <stdint.h>
|
; (fcn) fcn.00018a0c () | void fcn_00018a0c (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_2ch;
| int32_t var_30h;
| int32_t var_34h;
| int32_t var_38h;
| int32_t var_3ch;
| int32_t var_40h;
| int32_t var_44h;
| void * s;
| int32_t var_0h_2;
| int32_t var_68h;
| int32_t var_6ch;
| r0 = arg1;
| r1 = arg2;
0x00018a0c push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00018a10 ldr r4, [r0, 0x3c] | r4 = *((r0 + 0x3c));
0x00018a14 mov r5, r0 | r5 = r0;
0x00018a18 ldr r0, [pc, 0x364] |
0x00018a1c sub sp, sp, 0x6c |
0x00018a20 mov r3, 0x50 | r3 = 0x50;
0x00018a24 add r0, pc, r0 | r0 = pc + r0;
0x00018a28 str r3, [sp, 0x3c] | var_3ch = r3;
0x00018a2c mov r2, 3 | r2 = 3;
0x00018a30 mov r3, 0 | r3 = 0;
0x00018a34 mov sb, r1 | sb = r1;
0x00018a38 add r0, r0, 0x30 | r0 = 0x18db0;
0x00018a3c ldr r1, [pc, 0x344] | r1 = *(0x18d84);
0x00018a40 str r3, [sp, 0x40] | var_40h = r3;
0x00018a44 bl 0x1a490 | fcn_0001a490 (r0, r1);
0x00018a48 ldr r2, [r5, 0x38] | r2 = *((r5 + 0x38));
0x00018a4c cmp r2, 0 |
| if (r2 != 0) {
0x00018a50 bne 0x18aa8 | goto label_5;
| }
0x00018a54 ldr r0, [pc, 0x330] | r0 = *(0x18d88);
0x00018a58 mov r2, 0x19 | r2 = 0x19;
0x00018a5c ldr r1, [pc, 0x32c] | r1 = *(0x18d8c);
0x00018a60 add r0, pc, r0 | r0 = pc + r0;
0x00018a64 bl 0x1ab60 | fcn_0001ab60 (r0, r1);
| do {
0x00018a68 str r0, [r5, 0x38] | *((r5 + 0x38)) = r0;
0x00018a6c ldr r3, [r5, 0x38] | r3 = *((r5 + 0x38));
0x00018a70 cmp r3, 0 |
| if (r3 != 0) {
0x00018a74 bne 0x18ac0 | goto label_6;
| }
| label_0:
0x00018a78 mvn r3, 0x62 | r3 = ~0x62;
| label_1:
0x00018a7c ldr r0, [pc, 0x310] |
0x00018a80 str r3, [sp, 0x38] | var_38h = r3;
0x00018a84 add r0, pc, r0 | r0 = pc + r0;
0x00018a88 mov r3, 3 | r3 = 3;
0x00018a8c add r2, sp, 0x38 | r2 += var_38h;
0x00018a90 ldr r1, [pc, 0x300] | r1 = *(0x18d94);
0x00018a94 add r0, r0, 0x30 | r0 = 0x18dc0;
0x00018a98 bl 0x1a578 | fcn_0001a578 (r0, r1);
0x00018a9c ldr r0, [sp, 0x38] | r0 = var_38h;
0x00018aa0 add sp, sp, 0x6c |
0x00018aa4 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x00018aa8 ldr r0, [pc, 0x2ec] | r0 = *(0x18d98);
0x00018aac mov r3, 0x19 | r3 = 0x19;
0x00018ab0 ldr r1, [pc, 0x2e8] | r1 = *(0x18d9c);
0x00018ab4 add r0, pc, r0 | r0 = pc + r0;
0x00018ab8 bl 0x1adec | fcn_0001adec (r0, r1);
0x00018abc b 0x18a68 |
| } while (1);
| label_6:
0x00018ac0 add r6, sp, 0x44 | r6 += var_44h;
0x00018ac4 mov r0, r6 | r0 = r6;
0x00018ac8 bl 0x185dc | fcn_000185dc (r0);
0x00018acc mov r3, 0x10 | r3 = 0x10;
0x00018ad0 mov r2, r6 | r2 = r6;
0x00018ad4 mov r1, 0x19 | r1 = 0x19;
0x00018ad8 ldr r0, [r5, 0x38] | r0 = *((r5 + 0x38));
0x00018adc bl 0x18260 | fcn_00018260 ();
0x00018ae0 mov r3, 0x50 | r3 = 0x50;
0x00018ae4 add r2, sp, 0x40 | r2 += var_40h;
0x00018ae8 add r1, sp, 0x3c | r1 += var_3ch;
0x00018aec mov r0, sb | r0 = sb;
0x00018af0 bl 0x14be0 | fcn_00014be0 (r0, r1);
0x00018af4 ldr r3, [sp, 0x40] | r3 = var_40h;
0x00018af8 cmp r3, 0 |
0x00018afc mov sl, r0 | sl = r0;
| if (r3 != 0) {
0x00018b00 ldreq r3, [pc, 0x29c] | r3 = *(0x00018da4);
| }
| if (r3 != 0) {
0x00018b04 addeq r3, pc, r3 | r3 = pc + r3;
| }
| if (r3 != 0) {
0x00018b08 streq r3, [sp, 0x40] | var_40h = r3;
| }
0x00018b0c cmp r4, 0 |
| if (r4 == 0) {
0x00018b10 addne r4, r4, 8 | r4 += 8;
| }
| if (r4 == 0) {
0x00018b14 movne r6, 0 | r6 = 0;
| }
| if (r4 != 0) {
0x00018b18 bne 0x18ca0 | goto label_7;
| }
| label_2:
0x00018b1c ldr r3, [pc, 0x284] | r3 = *(0x18da4);
0x00018b20 cmp r4, 0 |
0x00018b24 add r3, pc, r3 | r3 = pc + r3;
| if (r4 == 0) {
0x00018b28 movne r3, r4 | r3 = r4;
| }
0x00018b2c str r3, [sp, 0x2c] | var_2ch = r3;
0x00018b30 ldr r3, [pc, 0x274] | r3 = *(0x18da8);
0x00018b34 ldr fp, [pc, 0x274] | fp = *(0x18dac);
0x00018b38 add r3, pc, r3 | r3 = pc + r3;
0x00018b3c str r3, [sp, 0x34] | var_34h = r3;
0x00018b40 ldr r3, [pc, 0x26c] | r3 = *(0x18db0);
0x00018b44 mov r6, 0 | r6 = 0;
0x00018b48 add r3, pc, r3 | r3 = pc + r3;
0x00018b4c mov r8, r6 | r8 = r6;
0x00018b50 mov r7, r6 | r7 = r6;
0x00018b54 add fp, pc, fp |
0x00018b58 str r3, [sp, 0x30] | var_30h = r3;
| label_3:
0x00018b5c ldr r2, [r5, 0x1c] | r2 = *((r5 + 0x1c));
0x00018b60 ldr r1, [sp, 0x2c] | r1 = var_2ch;
0x00018b64 cmp r2, 0 |
0x00018b68 ldr r3, [sp, 0x3c] | r3 = var_3ch;
0x00018b6c ldr r2, [sp, 0x34] | r2 = var_34h;
0x00018b70 str r1, [sp, 0x20] | var_20h = r1;
0x00018b74 ldr r1, [r5, 0x38] | r1 = *((r5 + 0x38));
| if (r2 == 0) {
0x00018b78 movne r2, fp | r2 = fp;
| }
0x00018b7c str r1, [sp, 0x1c] | var_1ch = r1;
0x00018b80 str r3, [sp, 0x18] | var_18h = r3;
0x00018b84 str r2, [sp, 0xc] | var_ch = r2;
0x00018b88 str r3, [sp, 8] | var_8h = r3;
0x00018b8c mov r1, r6 | r1 = r6;
0x00018b90 ldr r3, [sp, 0x40] | r3 = var_40h;
0x00018b94 str sb, [sp, 0x14] | var_14h = sb;
0x00018b98 str sl, [sp, 0x10] | var_10h = sl;
0x00018b9c str sb, [sp, 4] | var_4h = sb;
0x00018ba0 str sl, [sp] | *(sp) = sl;
0x00018ba4 ldr r2, [sp, 0x30] | r2 = var_30h;
0x00018ba8 mov r0, r7 | r0 = r7;
0x00018bac bl 0x360c | snprintf (r0, r1, r2, r3)
0x00018bb0 eor r3, r8, 1 | r3 = r8 ^ 1;
0x00018bb4 cmp r0, 0 |
| if (r0 > 0) {
0x00018bb8 movle r3, 0 | r3 = 0;
| }
| if (r0 <= 0) {
0x00018bbc andgt r3, r3, 1 | r3 &= 1;
| }
0x00018bc0 cmp r3, 0 |
0x00018bc4 mov r6, r0 | r6 = r0;
| if (r3 == 0) {
0x00018bc8 beq 0x18bec | goto label_8;
| }
0x00018bcc add r6, r0, 1 | r6 = r0 + 1;
0x00018bd0 ldr r0, [pc, 0x1e0] | r0 = *(0x18db4);
0x00018bd4 mov r2, r6 | r2 = r6;
0x00018bd8 ldr r1, [pc, 0x1dc] | r1 = *(0x18db8);
0x00018bdc add r0, pc, r0 | r0 = pc + r0;
0x00018be0 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00018be4 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 == r0) {
0x00018be8 beq 0x18a78 | goto label_0;
| }
| label_8:
0x00018bec cmp r8, 1 |
| if (r8 != 1) {
0x00018bf0 bne 0x18d38 | goto label_9;
| }
0x00018bf4 cmp r4, 0 |
| if (r4 != 0) {
0x00018bf8 beq 0x18c10 |
0x00018bfc ldr r0, [pc, 0x1bc] | r0 = *(0x18dbc);
0x00018c00 mov r2, r4 | r2 = r4;
0x00018c04 ldr r1, [pc, 0x1b8] | r1 = *(0x18dc0);
0x00018c08 add r0, pc, r0 | r0 = pc + r0;
0x00018c0c bl 0x1ad1c | fcn_0001ad1c (r0, r1);
| }
0x00018c10 cmp r7, 0 |
| if (r7 == 0) {
0x00018c14 beq 0x18d64 | goto label_10;
| }
0x00018c18 add r3, sp, 0x54 | r3 += s;
0x00018c1c mov r2, 0x14 | r2 = 0x14;
0x00018c20 mov r1, 0 | r1 = 0;
0x00018c24 mov r0, r3 | r0 = r3;
0x00018c28 bl 0x384c | memset (r0, r1, r2);
0x00018c2c ldr r8, [r5, 0x1c] | r8 = *((r5 + 0x1c));
0x00018c30 ldr r4, [r5] | r4 = *(r5);
0x00018c34 cmp r8, 0 |
| if (r8 == 0) {
0x00018c38 beq 0x18d40 | goto label_11;
| }
0x00018c3c mov ip, r0 |
0x00018c40 ldm ip!, {r0, r1, r2, r3} | r0 = *(ip!);
| r1 = *((ip! + 4));
| r2 = *((ip! + 8));
| r3 = *((ip! + 12));
0x00018c44 mov lr, sp | lr = sp;
0x00018c48 stm lr!, {r0, r1, r2, r3} | *(lr!) = r0;
| *((lr! + 4)) = r1;
| *((lr! + 8)) = r2;
| *((lr! + 12)) = r3;
0x00018c4c ldr r3, [ip] | r3 = *(ip);
0x00018c50 mov r2, r7 | r2 = r7;
0x00018c54 str r3, [lr] | *(lr) = r3;
0x00018c58 mov r1, r4 | r1 = r4;
0x00018c5c mov r3, r6 | r3 = r6;
0x00018c60 mov r0, r8 | r0 = r8;
0x00018c64 bl 0xa594 | fcn_0000a594 (r0, r1, r2, r3, r4, r5);
| label_4:
0x00018c68 ldr r0, [pc, 0x158] | r0 = *(0x18dc4);
0x00018c6c mov r2, r7 | r2 = r7;
0x00018c70 ldr r1, [pc, 0x154] | r1 = *(0x18dc8);
0x00018c74 add r0, pc, r0 | r0 = pc + r0;
0x00018c78 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00018c7c mov r3, 1 | r3 = 1;
0x00018c80 b 0x18a7c | goto label_1;
| do {
0x00018c84 bl 0x35dc | strlen (r0);
0x00018c88 add r6, r6, 4 | r6 += 4;
0x00018c8c mov r8, r0 | r8 = r0;
0x00018c90 mov r0, r7 | r0 = r7;
0x00018c94 bl 0x35dc | strlen (r0);
0x00018c98 add r6, r6, r8 | r6 += r8;
0x00018c9c add r6, r6, r0 | r6 += r0;
| label_7:
0x00018ca0 ldr r0, [r4, -8] | r0 = *((r4 - 8));
0x00018ca4 cmp r0, 0 |
| if (r0 == 0) {
0x00018ca8 beq 0x18cbc | goto label_12;
| }
0x00018cac add r4, r4, 8 | r4 += 8;
0x00018cb0 ldr r7, [r4, -0xc] | r7 = *((r4 - 0xc));
0x00018cb4 cmp r7, 0 |
0x00018cb8 bne 0x18c84 |
| } while (r7 != 0);
| label_12:
0x00018cbc ldr r0, [pc, 0x10c] | r0 = *(0x18dcc);
0x00018cc0 add r6, r6, 1 | r6++;
0x00018cc4 mov r2, r6 | r2 = r6;
0x00018cc8 ldr r1, [pc, 0x104] | r1 = *(0x18dd0);
0x00018ccc add r0, pc, r0 | r0 = pc + r0;
0x00018cd0 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x00018cd4 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x00018cd8 beq 0x18a78 | goto label_0;
| }
0x00018cdc ldr r7, [r5, 0x3c] | r7 = *((r5 + 0x3c));
0x00018ce0 ldr fp, [pc, 0xf0] | fp = *(0x18dd4);
0x00018ce4 add r7, r7, 8 | r7 += 8;
0x00018ce8 mov r8, r4 | r8 = r4;
0x00018cec add fp, pc, fp |
| do {
0x00018cf0 ldr r3, [r7, -8] | r3 = *((r7 - 8));
0x00018cf4 cmp r3, 0 |
| if (r3 != 0) {
0x00018cf8 beq 0x18d0c |
0x00018cfc add r7, r7, 8 | r7 += 8;
0x00018d00 ldr r2, [r7, -0xc] | r2 = *((r7 - 0xc));
0x00018d04 cmp r2, 0 |
| if (r2 != 0) {
0x00018d08 bne 0x18d18 | goto label_13;
| }
| }
0x00018d0c mov r3, 0 | r3 = 0;
0x00018d10 strb r3, [r8] | *(r8) = r3;
0x00018d14 b 0x18b1c | goto label_2;
| label_13:
0x00018d18 sub r1, r8, r4 | r1 = r8 - r4;
0x00018d1c str r2, [sp] | *(sp) = r2;
0x00018d20 mov r0, r8 | r0 = r8;
0x00018d24 mov r2, fp | r2 = fp;
0x00018d28 sub r1, r6, r1 | r1 = r6 - r1;
0x00018d2c bl 0x360c | r0 = snprintf (r0, r1, r2, r3)
0x00018d30 add r8, r8, r0 | r8 += r0;
0x00018d34 b 0x18cf0 |
| } while (1);
| label_9:
0x00018d38 mov r8, 1 | r8 = 1;
0x00018d3c b 0x18b5c | goto label_3;
| label_11:
0x00018d40 add r3, sp, 0x68 | r3 += var_68h;
0x00018d44 ldmdb r3, {r0, r1, r2, r3} | __asm ("ldmdb r3, {r0, r1, r2, r3}");
0x00018d48 stm sp, {r0, r1, r2, r3} | *(sp) = r0;
| *((sp + 4)) = r1;
| *((sp + 8)) = r2;
| *((sp + 12)) = r3;
0x00018d4c ldr r3, [sp, 0x54] | r3 = s;
0x00018d50 mov r2, r6 | r2 = r6;
0x00018d54 mov r1, r7 | r1 = r7;
0x00018d58 mov r0, r4 | r0 = r4;
0x00018d5c bl 0x10a94 | fcn_00010a94 (r0, r1, r2, r3, r4);
0x00018d60 b 0x18c68 | goto label_4;
| label_10:
0x00018d64 ldr r0, [pc, 0x70] | r0 = *(0x18dd8);
0x00018d68 ldr r2, [r5, 0x38] | r2 = *((r5 + 0x38));
0x00018d6c mov r1, 0x1fc | r1 = 0x1fc;
0x00018d70 add r0, pc, r0 | r0 = pc + r0;
0x00018d74 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x00018d78 str r7, [r5, 0x38] | *((r5 + 0x38)) = r7;
0x00018d7c mvn r3, 0 | r3 = ~0;
0x00018d80 b 0x18a7c | 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-mqtt3cs.so.1.3.9 @ 0x19cd8 */
| #include <stdint.h>
|
; (fcn) fcn.00019cd8 () | void fcn_00019cd8 (int32_t arg1) {
| int32_t var_0h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| char * s2;
| int32_t var_68h;
| int32_t var_c8h;
| r0 = arg1;
0x00019cd8 push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00019cdc ldr r1, [pc, 0x368] | r1 = *(0x1a048);
0x00019ce0 mov r5, r0 | r5 = r0;
0x00019ce4 ldr r0, [pc, 0x364] |
0x00019ce8 sub sp, sp, 0xc8 |
0x00019cec add r0, pc, r0 | r0 = pc + r0;
0x00019cf0 mvn sb, 0 | sb = ~0;
0x00019cf4 add r6, sp, 0xc8 | r6 += var_c8h;
0x00019cf8 mov r2, 3 | r2 = 3;
0x00019cfc add r0, r0, 0xd6 | r0 = 0x1a122;
0x00019d00 str sb, [r6, -0xbc]! | *((r6 -= 0xbc)) = sb;
0x00019d04 bl 0x1a490 | fcn_0001a490 (r0, r1);
0x00019d08 ldr r4, [r5, 0x38] | r4 = *((r5 + 0x38));
0x00019d0c cmp r4, 0 |
| if (r4 == 0) {
0x00019d10 beq 0x19e4c | goto label_0;
| }
0x00019d14 add r7, sp, 0x28 | r7 += s2;
0x00019d18 mov r2, 0x3e | r2 = 0x3e;
0x00019d1c mov r1, 0 | r1 = 0;
0x00019d20 mov r0, r7 | r0 = r7;
0x00019d24 bl 0x384c | memset (r0, r1, r2);
0x00019d28 mov r3, 0 | r3 = 0;
0x00019d2c str r3, [sp, 0x10] | var_10h = r3;
0x00019d30 ldr r3, [pc, 0x31c] | r3 = *(0x1a050);
0x00019d34 ldr r2, [pc, 0x31c] | r2 = *(0x1a054);
0x00019d38 add r3, pc, r3 | r3 = pc + r3;
0x00019d3c add r2, pc, r2 | r2 = pc + r2;
0x00019d40 mov r1, 0x3e | r1 = 0x3e;
0x00019d44 str r3, [sp] | *(sp) = r3;
0x00019d48 mov r0, r7 | r0 = r7;
0x00019d4c mov r3, r4 | r3 = r4;
0x00019d50 add r4, sp, 0x68 | r4 += var_68h;
0x00019d54 bl 0x360c | snprintf (r0, r1, r2, r3)
0x00019d58 mov r0, r4 | r0 = r4;
0x00019d5c bl 0x3828 | SHA1_Init ();
0x00019d60 mov r0, r7 | r0 = r7;
0x00019d64 bl 0x35dc | strlen (r0);
0x00019d68 mov r1, r7 | r1 = r7;
0x00019d6c add r8, sp, 0x10 | r8 += var_10h;
0x00019d70 mov r2, r0 | r2 = r0;
0x00019d74 mov r0, r4 | r0 = r4;
0x00019d78 bl 0x36fc | SHA1_Update ();
0x00019d7c mov r1, r4 | r1 = r4;
0x00019d80 add r4, sp, 0x14 | r4 += var_14h;
0x00019d84 mov r0, r4 | r0 = r4;
0x00019d88 bl 0x3714 | SHA1_Final ();
0x00019d8c mov r2, r4 | r2 = r4;
0x00019d90 mov r3, 0x14 | r3 = 0x14;
0x00019d94 mov r1, 0x3e | r1 = 0x3e;
0x00019d98 mov r0, r7 | r0 = r7;
0x00019d9c bl 0x18260 | fcn_00018260 ();
0x00019da0 mov r3, r6 | r3 = r6;
0x00019da4 mov r2, r8 | r2 = r8;
0x00019da8 mov r1, 0xc | r1 = 0xc;
0x00019dac mov r0, r5 | r0 = r5;
0x00019db0 bl 0x18300 | fcn_00018300 (r0, r1);
0x00019db4 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00019db8 cmp r3, sb |
0x00019dbc mov r4, r0 | r4 = r0;
| if (r3 == sb) {
0x00019dc0 beq 0x19e4c | goto label_0;
| }
0x00019dc4 cmp r0, 0 |
0x00019dc8 ldr r3, [sp, 0x10] | r3 = var_10h;
| if (r0 != 0) {
0x00019dcc beq 0x19dd8 |
0x00019dd0 cmp r3, 0xb |
| if (r3 > 0xb) {
0x00019dd4 bhi 0x19df8 | goto label_2;
| }
| }
0x00019dd8 ldr r2, [pc, 0x27c] | r2 = *(0x1a058);
0x00019ddc mov r1, 1 | r1 = 1;
0x00019de0 add r2, pc, r2 | r2 = pc + r2;
0x00019de4 mov r0, 4 | r0 = 4;
0x00019de8 bl 0x12720 | fcn_00012720 (r0, r1);
0x00019dec mvn r3, 0x15 | r3 = ~0x15;
| label_1:
0x00019df0 str r3, [sp, 0xc] | var_ch = r3;
0x00019df4 b 0x19e4c | goto label_0;
| label_2:
0x00019df8 ldr r1, [pc, 0x260] | r1 = *(0x1a05c);
0x00019dfc mov r2, 8 | r2 = 8;
0x00019e00 add r1, pc, r1 | r1 = pc + r1;
0x00019e04 bl 0x357c | r0 = strncmp (r0, r1, r2);
0x00019e08 cmp r0, 0 |
| if (r0 != 0) {
0x00019e0c bne 0x19e74 | goto label_3;
| }
0x00019e10 ldr r1, [pc, 0x24c] | r1 = *(0x1a060);
0x00019e14 add sl, r4, 9 | sl = r4 + 9;
0x00019e18 mov r2, 3 | r2 = 3;
0x00019e1c add r1, pc, r1 | r1 = pc + r1;
0x00019e20 mov r0, sl | r0 = sl;
0x00019e24 bl 0x357c | r0 = strncmp (r0, r1, r2);
0x00019e28 cmp r0, 0 |
| if (r0 == 0) {
0x00019e2c beq 0x19e74 | goto label_3;
| }
0x00019e30 ldr r2, [pc, 0x230] | r2 = *(0x1a064);
0x00019e34 mov r3, sl | r3 = sl;
0x00019e38 add r2, pc, r2 | r2 = pc + r2;
0x00019e3c mov r1, 1 | r1 = 1;
0x00019e40 mov r0, 4 | r0 = 4;
0x00019e44 bl 0x12720 | fcn_00012720 (r0, r1);
0x00019e48 str sb, [sp, 0xc] | var_ch = sb;
| do {
| label_0:
0x00019e4c ldr r0, [pc, 0x218] |
0x00019e50 mov r3, 3 | r3 = 3;
0x00019e54 add r0, pc, r0 | r0 = pc + r0;
0x00019e58 mov r2, r6 | r2 = r6;
0x00019e5c ldr r1, [pc, 0x20c] | r1 = *(0x1a06c);
0x00019e60 add r0, r0, 0xd6 | r0 = 0x1a13e;
0x00019e64 bl 0x1a578 | fcn_0001a578 (r0, r1);
0x00019e68 ldr r0, [sp, 0xc] | r0 = var_ch;
0x00019e6c add sp, sp, 0xc8 |
0x00019e70 pop {r4, r5, r6, r7, r8, sb, sl, pc} |
| label_3:
0x00019e74 ldr r1, [pc, 0x1f8] | r1 = *(0x1a070);
0x00019e78 mov r2, 0xc | r2 = 0xc;
0x00019e7c add r1, pc, r1 | r1 = pc + r1;
0x00019e80 mov r0, r4 | r0 = r4;
0x00019e84 bl 0x357c | r0 = strncmp (r0, r1, r2);
0x00019e88 cmp r0, 0 |
0x00019e8c bne 0x19e4c |
| } while (r0 != 0);
0x00019e90 mov r3, r6 | r3 = r6;
0x00019e94 mov r2, r8 | r2 = r8;
0x00019e98 mov r1, 0x400 | r1 = 0x400;
0x00019e9c mov r0, r5 | r0 = r5;
0x00019ea0 bl 0x18300 | fcn_00018300 (r0, r1);
0x00019ea4 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00019ea8 cmn r3, 1 |
0x00019eac mov r4, r0 | r4 = r0;
| if (r3 == 1) {
0x00019eb0 beq 0x19e4c | goto label_0;
| }
0x00019eb4 cmp r0, 0 |
0x00019eb8 ldr sb, [sp, 0x10] | sb = var_10h;
| if (r0 != 0) {
0x00019ebc beq 0x19f08 |
0x00019ec0 cmp sb, 4 |
| if (sb < 4) {
0x00019ec4 bls 0x19f08 | goto label_4;
| }
0x00019ec8 ldr r1, [pc, 0x1a8] | r1 = *(0x1a074);
0x00019ecc sub r0, sb, 4 | r0 = sb - 4;
0x00019ed0 mov r2, 4 | r2 = 4;
0x00019ed4 add r1, pc, r1 | r1 = pc + r1;
0x00019ed8 add r0, r4, r0 | r0 = r4 + r0;
0x00019edc bl 0x3900 | r0 = memcmp (r0, r1, r2);
0x00019ee0 cmp r0, 0 |
| if (r0 == 0) {
0x00019ee4 beq 0x19f08 | goto label_4;
| }
0x00019ee8 ldr r2, [pc, 0x18c] | r2 = *(0x1a078);
0x00019eec mov r3, sb | r3 = sb;
0x00019ef0 add r2, pc, r2 | r2 = pc + r2;
0x00019ef4 mvn r1, 0 | r1 = ~0;
0x00019ef8 mov r0, 4 | r0 = 4;
0x00019efc bl 0x12720 | fcn_00012720 (r0, r1);
0x00019f00 mvn r3, 0 | r3 = ~0;
0x00019f04 b 0x19df0 | goto label_1;
| }
| label_4:
0x00019f08 ldr r1, [pc, 0x170] | r1 = *(0x1a07c);
0x00019f0c mov r2, sb | r2 = sb;
0x00019f10 add r1, pc, r1 | r1 = pc + r1;
0x00019f14 mov r0, r4 | r0 = r4;
0x00019f18 bl 0x18564 | r0 = fcn_00018564 (r0, r1);
0x00019f1c subs sl, r0, 0 | sl = r0 - 0;
| if (sl == r0) {
0x00019f20 beq 0x19fd0 | goto label_5;
| }
0x00019f24 sub r2, r4, sl | r2 = r4 - sl;
0x00019f28 sub r2, sb, r2 | r2 = sb - r2;
0x00019f2c mov r1, 0xa | r1 = 0xa;
0x00019f30 bl 0x3990 | r0 = memchr (r0, r1, r2);
0x00019f34 subs r2, r0, 0 | r2 = r0 - 0;
| if (r2 == r0) {
0x00019f38 beq 0x19fd0 | goto label_5;
| }
0x00019f3c ldr r1, [pc, 0x140] | r1 = *(0x1a080);
0x00019f40 sub r2, r2, sl | r2 -= sl;
0x00019f44 add r1, pc, r1 | r1 = pc + r1;
0x00019f48 mov r0, sl | r0 = sl;
0x00019f4c bl 0x18564 | r0 = fcn_00018564 (r0, r1);
0x00019f50 cmp r0, 0 |
| if (r0 == 0) {
0x00019f54 beq 0x19fd0 | goto label_5;
| }
0x00019f58 ldr r1, [pc, 0x128] | r1 = *(0x1a084);
0x00019f5c mov r2, sb | r2 = sb;
0x00019f60 add r1, pc, r1 | r1 = pc + r1;
0x00019f64 mov r0, r4 | r0 = r4;
0x00019f68 bl 0x18564 | r0 = fcn_00018564 (r0, r1);
0x00019f6c subs sl, r0, 0 | sl = r0 - 0;
| if (sl == r0) {
0x00019f70 beq 0x19fd0 | goto label_5;
| }
0x00019f74 sub r2, r4, sl | r2 = r4 - sl;
0x00019f78 sub r2, sb, r2 | r2 = sb - r2;
0x00019f7c mov r1, 0xa | r1 = 0xa;
0x00019f80 bl 0x3990 | r0 = memchr (r0, r1, r2);
0x00019f84 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x00019f88 beq 0x19fd0 | goto label_5;
| }
0x00019f8c sub r2, r4, sl | r2 = r4 - sl;
0x00019f90 mov r1, 0x3a | r1 = 0x3a;
0x00019f94 mov r0, sl | r0 = sl;
0x00019f98 bl 0x3990 | r0 = memchr (r0, r1, r2);
0x00019f9c subs r3, r0, 0 | r3 = r0 - 0;
| if (r3 == r0) {
0x00019fa0 beq 0x19fd0 | goto label_5;
| }
0x00019fa4 sub r2, r4, r3 | r2 = r4 - r3;
| do {
0x00019fa8 mov r0, r3 | r0 = r3;
0x00019fac ldrb r1, [r3], 1 | r1 = *(r3);
| r3++;
0x00019fb0 sub r2, r2, 1 | r2--;
0x00019fb4 cmp r1, 0x20 |
0x00019fb8 cmpne r1, 0x3a | __asm ("cmpne r1, 0x3a");
0x00019fbc beq 0x19fa8 |
| } while (r1 == 0x20);
0x00019fc0 mov r1, r7 | r1 = r7;
0x00019fc4 bl 0x357c | r0 = strncmp (r0, r1, r2);
0x00019fc8 cmp r0, 0 |
| if (r0 == 0) {
0x00019fcc beq 0x1a028 | goto label_6;
| }
| label_5:
0x00019fd0 ldr r2, [pc, 0xb4] | r2 = *(0x1a088);
0x00019fd4 mov r1, 1 | r1 = 1;
0x00019fd8 add r2, pc, r2 | r2 = pc + r2;
0x00019fdc mov r0, 4 | r0 = 4;
0x00019fe0 bl 0x12720 | fcn_00012720 (r0, r1);
0x00019fe4 mvn r3, 0 | r3 = ~0;
0x00019fe8 str r3, [sp, 0xc] | var_ch = r3;
| do {
0x00019fec ldr r2, [r5, 0x38] | r2 = *((r5 + 0x38));
0x00019ff0 cmp r2, 0 |
| if (r2 != 0) {
0x00019ff4 beq 0x1a010 |
0x00019ff8 ldr r0, [pc, 0x90] | r0 = *(0x1a08c);
0x00019ffc ldr r1, [pc, 0x90] | r1 = *(0x1a090);
0x0001a000 add r0, pc, r0 | r0 = pc + r0;
0x0001a004 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x0001a008 mov r3, 0 | r3 = 0;
0x0001a00c str r3, [r5, 0x38] | *((r5 + 0x38)) = r3;
| }
0x0001a010 mov r3, r6 | r3 = r6;
0x0001a014 mov r2, r8 | r2 = r8;
0x0001a018 mov r1, 0 | r1 = 0;
0x0001a01c mov r0, r5 | r0 = r5;
0x0001a020 bl 0x18300 | fcn_00018300 (r0, r1);
0x0001a024 b 0x19e4c | goto label_0;
| label_6:
0x0001a028 ldr r2, [pc, 0x68] | r2 = *(0x1a094);
0x0001a02c mov r4, 1 | r4 = 1;
0x0001a030 str r4, [r5, 0x34] | *((r5 + 0x34)) = r4;
0x0001a034 add r2, pc, r2 | r2 = pc + r2;
0x0001a038 mov r1, r4 | r1 = r4;
0x0001a03c mov r0, 4 | r0 = 4;
0x0001a040 bl 0x12720 | fcn_00012720 (r0, r1);
0x0001a044 str r4, [sp, 0xc] | var_ch = r4;
0x0001a048 b 0x19fec |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/lib/libpaho-mqtt3cs.so.1.3.9 @ 0x1a09c */
| #include <stdint.h>
|
; (fcn) fcn.0001a09c () | void fcn_0001a09c (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_24h;
| int32_t var_28h;
| int32_t var_2ch;
| time_t * var_30h;
| time_t * timer;
| int32_t var_38h;
| void * s;
| int32_t var_50h;
| int32_t var_54h;
| r0 = arg1;
| r1 = arg2;
0x0001a09c push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001a0a0 ldr fp, [pc, 0x2b8] | fp = *(0x1a35c);
0x0001a0a4 sub sp, sp, 0x54 |
0x0001a0a8 mov r4, 0 | r4 = 0;
0x0001a0ac mov r6, r2 | r6 = r2;
0x0001a0b0 mov r8, r0 | r8 = r0;
0x0001a0b4 mov r2, 0x14 | r2 = 0x14;
0x0001a0b8 mov sl, r1 | sl = r1;
0x0001a0bc add r0, sp, 0x3c | r0 += s;
0x0001a0c0 mov r1, r4 | r1 = r4;
0x0001a0c4 str r4, [sp, 0x28] | var_28h = r4;
0x0001a0c8 str r4, [sp, 0x2c] | var_2ch = r4;
0x0001a0cc bl 0x384c | memset (r0, r1, r2);
0x0001a0d0 ldr r0, [pc, 0x28c] |
0x0001a0d4 mov r2, 3 | r2 = 3;
0x0001a0d8 add r0, pc, r0 | r0 = pc + r0;
0x0001a0dc ldr r1, [pc, 0x284] | r1 = *(0x1a364);
0x0001a0e0 add r0, r0, 0xe8 | r0 = 0x1a448;
0x0001a0e4 bl 0x1a490 | fcn_0001a490 (r0, r1);
0x0001a0e8 mov r3, 0x50 | r3 = 0x50;
0x0001a0ec mov r2, r4 | r2 = r4;
0x0001a0f0 add r1, sp, 0x24 | r1 += var_24h;
0x0001a0f4 mov r0, r6 | r0 = r6;
0x0001a0f8 bl 0x14be0 | fcn_00014be0 (r0, r1);
0x0001a0fc ldr r3, [pc, 0x268] | r3 = *(0x1a368);
0x0001a100 mov r5, r4 | r5 = r4;
0x0001a104 add r3, pc, r3 | r3 = pc + r3;
0x0001a108 str r3, [sp, 0x18] | var_18h = r3;
0x0001a10c ldr r3, [pc, 0x25c] | r3 = *(0x1a36c);
0x0001a110 mov sb, r4 | sb = r4;
0x0001a114 add r3, pc, r3 | r3 = pc + r3;
0x0001a118 add fp, pc, fp |
0x0001a11c str r3, [sp, 0x1c] | var_1ch = r3;
0x0001a120 mov r7, r0 | r7 = r0;
| do {
0x0001a124 cmp sl, 0 |
0x0001a128 ldr r3, [sp, 0x24] | r3 = var_24h;
| if (sl == 0) {
0x0001a12c beq 0x1a1fc | goto label_7;
| }
0x0001a130 ldr r2, [r8, 0x28] | r2 = *((r8 + 0x28));
0x0001a134 cmp r2, 0 |
| if (r2 == 0) {
0x0001a138 beq 0x1a1d8 | goto label_8;
| }
0x0001a13c str r2, [sp, 0x10] | var_10h = r2;
0x0001a140 ldr r2, [pc, 0x22c] | r2 = *(0x1a370);
0x0001a144 stmib sp, {r3, r7} | __asm ("stmib sp, {r3, r7}");
0x0001a148 add r2, pc, r2 | r2 = pc + r2;
0x0001a14c mov r3, r7 | r3 = r7;
0x0001a150 str r6, [sp, 0xc] | var_ch = r6;
0x0001a154 str r6, [sp] | *(sp) = r6;
| label_1:
0x0001a158 mov r1, r5 | r1 = r5;
0x0001a15c mov r0, r4 | r0 = r4;
0x0001a160 bl 0x360c | snprintf (r0, r1, r2, r3)
| label_0:
0x0001a164 eor r3, sb, 1 | r3 = sb ^ 1;
0x0001a168 cmp r0, 0 |
| if (r0 > 0) {
0x0001a16c movle r3, 0 | r3 = 0;
| }
| if (r0 <= 0) {
0x0001a170 andgt r3, r3, 1 | r3 &= 1;
| }
0x0001a174 cmp r3, 0 |
0x0001a178 mov r5, r0 | r5 = r0;
| if (r3 == 0) {
0x0001a17c beq 0x1a23c | goto label_9;
| }
0x0001a180 add r5, r0, 1 | r5 = r0 + 1;
0x0001a184 ldr r0, [pc, 0x1ec] | r0 = *(0x1a374);
0x0001a188 mov r2, r5 | r2 = r5;
0x0001a18c ldr r1, [pc, 0x1e8] | r1 = *(0x1a378);
0x0001a190 add r0, pc, r0 | r0 = pc + r0;
0x0001a194 bl 0x1ab60 | r0 = fcn_0001ab60 (r0, r1);
0x0001a198 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x0001a19c bne 0x1a23c | goto label_9;
| }
0x0001a1a0 mvn r3, 0x62 | r3 = ~0x62;
0x0001a1a4 str r3, [sp, 0x28] | var_28h = r3;
| label_3:
0x0001a1a8 ldr r0, [pc, 0x1d0] |
0x0001a1ac mov r3, 3 | r3 = 3;
0x0001a1b0 add r0, pc, r0 | r0 = pc + r0;
0x0001a1b4 add r2, sp, 0x28 | r2 += var_28h;
0x0001a1b8 ldr r1, [pc, 0x1c4] | r1 = *(0x1a380);
0x0001a1bc add r0, r0, 0xe8 | r0 = 0x1a464;
0x0001a1c0 bl 0x1a578 | fcn_0001a578 (r0, r1);
0x0001a1c4 ldr r0, [sp, 0x28] | r0 = var_28h;
0x0001a1c8 add sp, sp, 0x54 |
0x0001a1cc pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_2:
0x0001a1d0 mov sb, 1 | sb = 1;
0x0001a1d4 b 0x1a124 |
| } while (1);
| label_8:
0x0001a1d8 stmib sp, {r3, r7} | __asm ("stmib sp, {r3, r7}");
0x0001a1dc mov r2, fp | r2 = fp;
0x0001a1e0 mov r3, r7 | r3 = r7;
0x0001a1e4 str r6, [sp, 0xc] | var_ch = r6;
0x0001a1e8 str r6, [sp] | *(sp) = r6;
| do {
0x0001a1ec mov r1, r5 | r1 = r5;
0x0001a1f0 mov r0, r4 | r0 = r4;
0x0001a1f4 bl 0x360c | snprintf (r0, r1, r2, r3)
0x0001a1f8 b 0x1a164 | goto label_0;
| label_7:
0x0001a1fc ldr r2, [r8, 0x30] | r2 = *((r8 + 0x30));
0x0001a200 cmp r2, 0 |
| if (r2 != 0) {
0x0001a204 beq 0x1a224 |
0x0001a208 str r2, [sp, 0x10] | var_10h = r2;
0x0001a20c stmib sp, {r3, r7} | __asm ("stmib sp, {r3, r7}");
0x0001a210 ldr r2, [sp, 0x1c] | r2 = var_1ch;
0x0001a214 str r6, [sp, 0xc] | var_ch = r6;
0x0001a218 str r6, [sp] | *(sp) = r6;
0x0001a21c mov r3, r7 | r3 = r7;
0x0001a220 b 0x1a158 | goto label_1;
| }
0x0001a224 stmib sp, {r3, r7} | __asm ("stmib sp, {r3, r7}");
0x0001a228 ldr r2, [sp, 0x18] | r2 = var_18h;
0x0001a22c str r6, [sp, 0xc] | var_ch = r6;
0x0001a230 str r6, [sp] | *(sp) = r6;
0x0001a234 mov r3, r7 | r3 = r7;
0x0001a238 b 0x1a1ec |
| } while (1);
| label_9:
0x0001a23c cmp sb, 1 |
| if (sb != 1) {
0x0001a240 bne 0x1a1d0 | goto label_2;
| }
0x0001a244 ldr r2, [pc, 0x13c] | r2 = *(0x1a384);
0x0001a248 mov r3, r4 | r3 = r4;
0x0001a24c add r2, pc, r2 | r2 = pc + r2;
0x0001a250 mvn r1, 0 | r1 = ~0;
0x0001a254 mov r0, 4 | r0 = 4;
0x0001a258 bl 0x12720 | fcn_00012720 (r0, r1);
0x0001a25c add r3, sp, 0x50 | r3 += var_50h;
0x0001a260 ldmdb r3, {r0, r1, r2, r3} | __asm ("ldmdb r3, {r0, r1, r2, r3}");
0x0001a264 add r6, sp, 0x28 | r6 += var_28h;
0x0001a268 stm sp, {r0, r1, r2, r3} | *(sp) = r0;
| *((sp + 4)) = r1;
| *((sp + 8)) = r2;
| *((sp + 12)) = r3;
0x0001a26c ldr r3, [sp, 0x3c] | r3 = s;
0x0001a270 mov r2, r5 | r2 = r5;
0x0001a274 mov r1, r4 | r1 = r4;
0x0001a278 ldr r0, [r8] | r0 = *(r8);
0x0001a27c bl 0x10a94 | fcn_00010a94 (r0, r1, r2, r3, r4);
0x0001a280 ldr r0, [pc, 0x104] | r0 = *(0x1a388);
0x0001a284 mov r2, r4 | r2 = r4;
0x0001a288 ldr r1, [pc, 0x100] | r1 = *(0x1a38c);
0x0001a28c add r0, pc, r0 | r0 = pc + r0;
0x0001a290 bl 0x1ad1c | fcn_0001ad1c (r0, r1);
0x0001a294 add r0, sp, 0x34 | r0 += timer;
0x0001a298 bl 0x3708 | time (r0);
0x0001a29c ldr r3, [sp, 0x34] | r3 = timer;
0x0001a2a0 ldr r5, [pc, 0xec] | r5 = *(0x1a390);
0x0001a2a4 add r3, r3, 0xa | r3 += 0xa;
0x0001a2a8 add r4, sp, 0x2c | r4 += var_2ch;
0x0001a2ac str r3, [sp, 0x34] | timer = r3;
| label_6:
0x0001a2b0 mov r3, r6 | r3 = r6;
0x0001a2b4 mov r2, r4 | r2 = r4;
0x0001a2b8 mov r1, 0xc | r1 = 0xc;
0x0001a2bc ldr r0, [r8] | r0 = *(r8);
0x0001a2c0 bl 0x1075c | fcn_0001075c (r0, r1);
0x0001a2c4 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x0001a2c8 cmp r3, 0 |
0x0001a2cc mov r7, r0 | r7 = r0;
| if (r3 == 0) {
0x0001a2d0 beq 0x1a340 | goto label_10;
| }
0x0001a2d4 ldr r1, [pc, 0xbc] | r1 = *(0x1a394);
0x0001a2d8 mov r2, 0xc | r2 = 0xc;
0x0001a2dc add r1, pc, r1 | r1 = pc + r1;
0x0001a2e0 bl 0x357c | r0 = strncmp (r0, r1, r2);
0x0001a2e4 cmp r0, 0 |
| if (r0 != 0) {
0x0001a2e8 beq 0x1a310 |
0x0001a2ec ldr r1, [pc, 0xa8] | r1 = *(0x1a398);
0x0001a2f0 mov r2, 0xc | r2 = 0xc;
0x0001a2f4 add r1, pc, r1 | r1 = pc + r1;
0x0001a2f8 mov r0, r7 | r0 = r7;
0x0001a2fc bl 0x357c | r0 = strncmp (r0, r1, r2);
0x0001a300 cmp r0, 0 |
| if (r0 == 0) {
0x0001a304 beq 0x1a310 | goto label_11;
| }
| label_5:
0x0001a308 mvn r3, 0 | r3 = ~0;
0x0001a30c str r3, [sp, 0x28] | var_28h = r3;
| }
| label_11:
0x0001a310 mov r3, 1 | r3 = 1;
0x0001a314 add r5, sp, 0x38 | r5 += var_38h;
0x0001a318 str r3, [sp, 0x2c] | var_2ch = r3;
| label_4:
0x0001a31c ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x0001a320 cmp r3, 0 |
| if (r3 == 0) {
0x0001a324 beq 0x1a1a8 | goto label_3;
| }
0x0001a328 mov r3, r5 | r3 = r5;
0x0001a32c mov r2, r4 | r2 = r4;
0x0001a330 mov r1, 1 | r1 = 1;
0x0001a334 ldr r0, [r8] | r0 = *(r8);
0x0001a338 bl 0x1075c | fcn_0001075c (r0, r1);
0x0001a33c b 0x1a31c | goto label_4;
| label_10:
0x0001a340 add r0, sp, 0x30 | r0 += var_30h;
0x0001a344 bl 0x3708 | time (r0);
0x0001a348 ldrd r2, r3, [sp, 0x30] | __asm ("ldrd r2, r3, [timer]");
0x0001a34c cmp r2, r3 |
| if (r2 > r3) {
0x0001a350 bgt 0x1a308 | goto label_5;
| }
0x0001a354 mov r0, r5 | r0 = r5;
0x0001a358 bl 0x345c | usleep (r0);
0x0001a35c b 0x1a2b0 | goto label_6;
| }
[*] Function printf used 29 times libpaho-mqtt3cs.so.1.3.9