[*] Binary protection state of libpaho-mqtt3a.so.1.3.9
Partial RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function strcpy tear down of libpaho-mqtt3a.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-mqtt3a.so.1.3.9 @ 0x5b58 */
| #include <stdint.h>
|
; (fcn) fcn.00005b58 () | void fcn_00005b58 (char * arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| char * src;
| int32_t var_14h;
| r0 = arg1;
| r1 = arg2;
0x00005b58 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00005b5c sub sp, sp, 0x14 |
0x00005b60 str r0, [sp, 0xc] | src = r0;
0x00005b64 add r5, r0, r1 | r5 = r0 + r1;
0x00005b68 ldr r0, [pc, 0x468] |
0x00005b6c mov r6, r1 | r6 = r1;
0x00005b70 add r0, pc, r0 | r0 = pc + r0;
0x00005b74 mov r8, r2 | r8 = r2;
0x00005b78 ldr r1, [pc, 0x45c] | r1 = *(0x5fd8);
0x00005b7c mov r2, 3 | r2 = 3;
0x00005b80 add r0, r0, 0x14 | r0 = 0x5fe8;
0x00005b84 mov r4, r3 | r4 = r3;
0x00005b88 bl 0x1a930 | fcn_0001a930 (r0, r1);
0x00005b8c cmp r6, 0 |
0x00005b90 bne 0x5bc0 |
| while (r4 == r0) {
| label_1:
0x00005b94 mov r4, 0 | r4 = 0;
| label_0:
0x00005b98 ldr r0, [pc, 0x440] |
0x00005b9c mov r3, 3 | r3 = 3;
0x00005ba0 add r0, pc, r0 | r0 = pc + r0;
0x00005ba4 mov r2, 0 | r2 = 0;
0x00005ba8 ldr r1, [pc, 0x434] | r1 = *(0x5fe0);
0x00005bac add r0, r0, 0x14 | r0 = 0x5ff0;
0x00005bb0 bl 0x1aa18 | fcn_0001aa18 (r0, r1);
0x00005bb4 mov r0, r4 | r0 = r4;
0x00005bb8 add sp, sp, 0x14 |
0x00005bbc pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x00005bc0 cmp r4, 0 |
| if (r4 == 0) {
0x00005bc4 movne r3, 0 | r3 = 0;
| }
| if (r4 != 0) {
0x00005bc8 bne 0x5bf8 | goto label_9;
| }
0x00005bcc ldr r0, [pc, 0x414] | r0 = *(0x5fe4);
0x00005bd0 mov r2, 0x60 | r2 = 0x60;
0x00005bd4 ldr r1, [pc, 0x410] | r1 = *(0x5fe8);
0x00005bd8 add r0, pc, r0 | r0 = pc + r0;
0x00005bdc bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x00005be0 subs r4, r0, 0 | r4 = r0 - 0;
0x00005be4 beq 0x5b94 |
| }
0x00005be8 mov r2, 0x60 | r2 = 0x60;
0x00005bec mov r1, 0 | r1 = 0;
0x00005bf0 bl 0x2688 | memset (r0, r1, r2);
0x00005bf4 mov r3, 1 | r3 = 1;
| label_9:
0x00005bf8 str r3, [r4, 0x58] | *((r4 + 0x58)) = r3;
0x00005bfc ldr r3, [sp, 0xc] | r3 = src;
0x00005c00 add r0, r3, 8 | r0 = r3 + 8;
0x00005c04 cmp r0, r5 |
| if (r0 > r5) {
0x00005c08 bhi 0x5d94 | goto label_4;
| }
0x00005c0c ldr r2, [r3] | r2 = *(r3);
0x00005c10 str r2, [r4] | *(r4) = r2;
0x00005c14 ldr r1, [r3, 4] | r1 = *((r3 + 4));
0x00005c18 cmp r2, 8 |
0x00005c1c str r1, [r4, 0x14] | *((r4 + 0x14)) = r1;
0x00005c20 str r0, [sp, 0xc] | src = r0;
| if (r2 != 8) {
0x00005c24 beq 0x5d1c |
0x00005c28 cmp r2, 0xa |
| if (r2 == 0xa) {
0x00005c2c beq 0x5f10 | goto label_10;
| }
0x00005c30 cmp r2, 3 |
| if (r2 != 3) {
0x00005c34 bne 0x5d94 | goto label_4;
| }
0x00005c38 sub r6, r5, r0 | r6 = r5 - r0;
0x00005c3c mov r1, r6 | r1 = r6;
0x00005c40 bl 0x2538 | r0 = strnlen ();
0x00005c44 add r7, r0, 1 | r7 = r0 + 1;
0x00005c48 cmp r6, r7 |
| if (r6 == r7) {
0x00005c4c beq 0x5d94 | goto label_4;
| }
0x00005c50 ldr r3, [r4, 0x58] | r3 = *((r4 + 0x58));
0x00005c54 cmp r3, 0 |
| if (r3 == 0) {
0x00005c58 bne 0x5c84 |
0x00005c5c ldr r0, [pc, 0x38c] | r0 = *(0x5fec);
0x00005c60 mov r2, r7 | r2 = r7;
0x00005c64 mov r1, 0x22c | r1 = 0x22c;
0x00005c68 add r0, pc, r0 | r0 = pc + r0;
0x00005c6c bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x00005c70 cmp r0, 0 |
0x00005c74 str r0, [r4, 0x34] | *((r4 + 0x34)) = r0;
| if (r0 == 0) {
0x00005c78 beq 0x5d94 | goto label_4;
| }
0x00005c7c ldr r1, [sp, 0xc] | r1 = src;
0x00005c80 bl 0x2370 | strcpy (r0, r1)
| }
0x00005c84 ldr r2, [sp, 0xc] | r2 = src;
0x00005c88 add r3, r2, r7 | r3 = r2 + r7;
0x00005c8c str r3, [sp, 0xc] | src = r3;
0x00005c90 add r3, r3, 4 | r3 += 4;
0x00005c94 cmp r3, r5 |
| if (r3 > r5) {
0x00005c98 bhi 0x5d94 | goto label_4;
| }
0x00005c9c ldr r6, [r2, r7] | r6 = *((r2 + r7));
0x00005ca0 str r3, [sp, 0xc] | src = r3;
0x00005ca4 add r3, r3, r6 | r3 += r6;
0x00005ca8 cmp r5, r3 |
0x00005cac str r6, [r4, 0x38] | *((r4 + 0x38)) = r6;
| if (r5 <= r3) {
0x00005cb0 blo 0x5d94 | goto label_4;
| }
0x00005cb4 ldr r3, [r4, 0x58] | r3 = *((r4 + 0x58));
0x00005cb8 cmp r3, 0 |
| if (r3 == 0) {
0x00005cbc bne 0x5cec |
0x00005cc0 ldr r0, [pc, 0x32c] | r0 = *(0x5ff0);
0x00005cc4 mov r2, r6 | r2 = r6;
0x00005cc8 mov r1, 0x23c | r1 = 0x23c;
0x00005ccc add r0, pc, r0 | r0 = pc + r0;
0x00005cd0 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x00005cd4 cmp r0, 0 |
0x00005cd8 str r0, [r4, 0x3c] | *((r4 + 0x3c)) = r0;
| if (r0 == 0) {
0x00005cdc beq 0x5d94 | goto label_4;
| }
0x00005ce0 mov r2, r6 | r2 = r6;
0x00005ce4 ldr r1, [sp, 0xc] | r1 = src;
0x00005ce8 bl 0x246c | memcpy (r0, r1, r2);
| }
0x00005cec ldr r1, [sp, 0xc] | r1 = src;
0x00005cf0 add r3, r1, r6 | r3 = r1 + r6;
0x00005cf4 add r2, r3, 8 | r2 = r3 + 8;
0x00005cf8 cmp r2, r5 |
0x00005cfc str r3, [sp, 0xc] | src = r3;
| if (r2 > r5) {
0x00005d00 bhi 0x5d94 | goto label_4;
| }
0x00005d04 ldr r1, [r1, r6] | r1 = *((r1 + r6));
0x00005d08 str r2, [sp, 0xc] | src = r2;
0x00005d0c str r1, [r4, 0x40] | *((r4 + 0x40)) = r1;
0x00005d10 ldr r3, [r3, 4] | r3 = *((r3 + 4));
0x00005d14 str r3, [r4, 0x44] | *((r4 + 0x44)) = r3;
0x00005d18 b 0x5dcc | goto label_7;
| }
0x00005d1c ldr r2, [r4, 0x58] | r2 = *((r4 + 0x58));
0x00005d20 cmp r2, 0 |
| if (r2 == 0) {
0x00005d24 beq 0x5dcc | goto label_7;
| }
0x00005d28 add r1, r3, 0xc | r1 = r3 + 0xc;
0x00005d2c cmp r1, r5 |
| if (r1 > r5) {
0x00005d30 bhi 0x5d94 | goto label_4;
| }
0x00005d34 ldr r2, [r3, 8] | r2 = *((r3 + 8));
0x00005d38 str r1, [sp, 0xc] | src = r1;
0x00005d3c cmp r2, 0 |
0x00005d40 str r2, [r4, 0x34] | *((r4 + 0x34)) = r2;
| if (r2 <= 0) {
0x00005d44 ble 0x5b98 | goto label_0;
| }
0x00005d48 ldr r6, [pc, 0x2a8] | r6 = *(0x5ff4);
0x00005d4c lsl r2, r2, 2 | r2 <<= 2;
0x00005d50 add r6, pc, r6 | r6 = pc + r6;
0x00005d54 mov r1, 0x1d4 | r1 = 0x1d4;
0x00005d58 mov r0, r6 | r0 = r6;
0x00005d5c bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x00005d60 cmp r0, 0 |
0x00005d64 str r0, [r4, 0x38] | *((r4 + 0x38)) = r0;
| if (r0 != 0) {
0x00005d68 beq 0x5d94 |
0x00005d6c cmp r8, 4 |
0x00005d70 ldr r1, [r4, 0x34] | r1 = *((r4 + 0x34));
| if (r8 != 4) {
0x00005d74 bne 0x5e20 | goto label_11;
| }
0x00005d78 lsl r2, r1, 2 | r2 = r1 << 2;
0x00005d7c mov r0, r6 | r0 = r6;
0x00005d80 mov r1, 0x1d8 | r1 = 0x1d8;
0x00005d84 bl 0x1b000 | fcn_0001b000 (r0, r1);
0x00005d88 str r0, [r4, 0x3c] | *((r4 + 0x3c)) = r0;
| label_3:
0x00005d8c cmp r0, 0 |
| if (r0 != 0) {
0x00005d90 bne 0x5da8 | goto label_2;
| }
| }
| label_4:
0x00005d94 ldr r0, [pc, 0x260] | r0 = *(0x5ff8);
0x00005d98 mov r2, r4 | r2 = r4;
0x00005d9c mov r1, 0x258 | r1 = 0x258;
0x00005da0 add r0, pc, r0 | r0 = pc + r0;
0x00005da4 b 0x5e18 | goto label_12;
| label_2:
0x00005da8 ldr r3, [pc, 0x250] | r3 = *(0x5ffc);
0x00005dac ldr sb, [pc, 0x250] | sb = *(0x6000);
0x00005db0 add r3, pc, r3 | r3 = pc + r3;
0x00005db4 mov r6, 0 | r6 = 0;
0x00005db8 mov sl, 0xc | sl = 0xc;
0x00005dbc str r3, [sp] | *(sp) = r3;
| label_5:
0x00005dc0 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x00005dc4 cmp r3, r6 |
| if (r3 > r6) {
0x00005dc8 bgt 0x5e44 | goto label_13;
| }
| label_7:
0x00005dcc ldr r3, [r4, 0x58] | r3 = *((r4 + 0x58));
0x00005dd0 cmp r3, 0 |
0x00005dd4 cmpeq r8, 5 | __asm ("cmpeq r8, 5");
| if (r3 != 0) {
0x00005dd8 bne 0x5b98 | goto label_0;
| }
0x00005ddc mov r2, r5 | r2 = r5;
0x00005de0 add r1, sp, 0xc | r1 += src;
0x00005de4 add r0, r4, 0x24 | r0 = r4 + 0x24;
0x00005de8 bl 0x17fd4 | r0 = fcn_00017fd4 (r0, r1);
0x00005dec cmp r0, 1 |
| if (r0 == 1) {
0x00005df0 beq 0x5b98 | goto label_0;
| }
0x00005df4 ldr r2, [pc, 0x20c] | r2 = *(0x6004);
0x00005df8 mvn r1, 0 | r1 = ~0;
0x00005dfc add r2, pc, r2 | r2 = pc + r2;
0x00005e00 mov r0, 5 | r0 = 5;
0x00005e04 bl 0x12bc4 | fcn_00012bc4 (r0, r1, r2, r3);
0x00005e08 ldr r0, [pc, 0x1fc] | r0 = *(0x6008);
0x00005e0c ldr r1, [pc, 0x1fc] | r1 = *(0x600c);
0x00005e10 mov r2, r4 | r2 = r4;
0x00005e14 add r0, pc, r0 | r0 = pc + r0;
| label_12:
0x00005e18 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x00005e1c b 0x5b94 | goto label_1;
| label_11:
0x00005e20 cmp r1, 1 |
| if (r1 <= 1) {
0x00005e24 ble 0x5da8 | goto label_2;
| }
0x00005e28 mov r3, 0xc | r3 = 0xc;
0x00005e2c mul r2, r3, r1 | r2 = r3 * r1;
0x00005e30 mov r0, r6 | r0 = r6;
0x00005e34 ldr r1, [pc, 0x1d8] | r1 = *(0x6010);
0x00005e38 bl 0x1b000 | fcn_0001b000 (r0, r1);
0x00005e3c str r0, [r4, 0x4c] | *((r4 + 0x4c)) = r0;
0x00005e40 b 0x5d8c | goto label_3;
| label_13:
0x00005e44 ldr r0, [sp, 0xc] | r0 = src;
0x00005e48 sub fp, r5, r0 |
0x00005e4c mov r1, fp | r1 = fp;
0x00005e50 bl 0x2538 | r0 = strnlen ();
0x00005e54 add r7, r0, 1 | r7 = r0 + 1;
0x00005e58 cmp fp, r7 |
| if (fp == r7) {
0x00005e5c beq 0x5d94 | goto label_4;
| }
0x00005e60 ldr r3, [r4, 0x38] | r3 = *((r4 + 0x38));
0x00005e64 mov r2, r7 | r2 = r7;
0x00005e68 mov r1, sb | r1 = sb;
0x00005e6c ldr r0, [sp] | r0 = *(sp);
0x00005e70 str r3, [sp, 4] | var_4h = r3;
0x00005e74 bl 0x1b000 | fcn_0001b000 (r0, r1);
0x00005e78 ldr r3, [sp, 4] | r3 = var_4h;
0x00005e7c lsl fp, r6, 2 |
0x00005e80 cmp r0, 0 |
0x00005e84 str r0, [r3, r6, lsl 2] | offset_0 = r6 << 2;
| *((r3 + offset_0)) = r0;
| if (r0 == 0) {
0x00005e88 beq 0x5d94 | goto label_4;
| }
0x00005e8c ldr r3, [r4, 0x38] | r3 = *((r4 + 0x38));
0x00005e90 ldr r1, [sp, 0xc] | r1 = src;
0x00005e94 ldr r0, [r3, r6, lsl 2] | offset_1 = r6 << 2;
| r0 = *((r3 + offset_1));
0x00005e98 bl 0x2370 | strcpy (r0, r1)
0x00005e9c ldr r2, [sp, 0xc] | r2 = src;
0x00005ea0 cmp r8, 4 |
0x00005ea4 add r3, r2, r7 | r3 = r2 + r7;
0x00005ea8 str r3, [sp, 0xc] | src = r3;
| if (r8 != 4) {
0x00005eac bne 0x5ed4 | goto label_14;
| }
0x00005eb0 add r3, r3, 4 | r3 += 4;
0x00005eb4 cmp r3, r5 |
| if (r3 > r5) {
0x00005eb8 bhi 0x5d94 | goto label_4;
| }
0x00005ebc ldr r1, [r2, r7] | r1 = *((r2 + r7));
0x00005ec0 ldr r2, [r4, 0x3c] | r2 = *((r4 + 0x3c));
0x00005ec4 str r1, [r2, fp] | *((r2 + fp)) = r1;
0x00005ec8 str r3, [sp, 0xc] | src = r3;
| label_6:
0x00005ecc add r6, r6, 1 | r6++;
0x00005ed0 b 0x5dc0 | goto label_5;
| label_14:
0x00005ed4 add lr, r3, 0xc | lr = r3 + 0xc;
0x00005ed8 cmp lr, r5 |
| if (lr > r5) {
0x00005edc bhi 0x5d94 | goto label_4;
| }
0x00005ee0 ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x00005ee4 cmp r2, 1 |
| if (r2 == 1) {
0x00005ee8 ldrne r2, [r4, 0x4c] | r2 = *((r4 + 0x4c));
| }
| if (r2 != 1) {
0x00005eec ldmeq r3, {r0, r1, r2} | r0 = *(r3);
| r1 = *((r3 + 4));
| r2 = *((r3 + 8));
| }
0x00005ef0 mlane ip, sl, r6, r2 | __asm ("mlane ip, sl, r6, r2");
| if (r2 == 1) {
0x00005ef4 ldmne r3, {r0, r1, r2} | r0 = *(r3);
| r1 = *((r3 + 4));
| r2 = *((r3 + 8));
| }
| if (r2 != 1) {
0x00005ef8 addeq ip, r4, 0x40 |
| }
| if (r2 != 1) {
0x00005efc moveq r3, ip | r3 = ip;
| }
| if (r2 == 1) {
0x00005f00 stmne ip, {r0, r1, r2} | *(ip) = r0;
| *((ip + 4)) = r1;
| *((ip + 8)) = r2;
| }
| if (r2 != 1) {
0x00005f04 stmeq r3, {r0, r1, r2} | *(r3) = r0;
| *((r3 + 4)) = r1;
| *((r3 + 8)) = r2;
| }
0x00005f08 str lr, [sp, 0xc] | src = lr;
0x00005f0c b 0x5ecc | goto label_6;
| label_10:
0x00005f10 ldr r2, [r4, 0x58] | r2 = *((r4 + 0x58));
0x00005f14 cmp r2, 0 |
| if (r2 == 0) {
0x00005f18 beq 0x5dcc | goto label_7;
| }
0x00005f1c add r1, r3, 0xc | r1 = r3 + 0xc;
0x00005f20 cmp r1, r5 |
| if (r1 > r5) {
0x00005f24 bhi 0x5d94 | goto label_4;
| }
0x00005f28 ldr r2, [r3, 8] | r2 = *((r3 + 8));
0x00005f2c str r1, [sp, 0xc] | src = r1;
0x00005f30 cmp r2, 0 |
0x00005f34 str r2, [r4, 0x34] | *((r4 + 0x34)) = r2;
| if (r2 <= 0) {
0x00005f38 ble 0x5b98 | goto label_0;
| }
0x00005f3c ldr r0, [pc, 0xd4] | r0 = *(0x6014);
0x00005f40 lsl r2, r2, 2 | r2 <<= 2;
0x00005f44 ldr r1, [pc, 0xd0] | r1 = *(0x6018);
0x00005f48 add r0, pc, r0 | r0 = pc + r0;
0x00005f4c bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x00005f50 cmp r0, 0 |
0x00005f54 str r0, [r4, 0x38] | *((r4 + 0x38)) = r0;
| if (r0 == 0) {
0x00005f58 beq 0x5d94 | goto label_4;
| }
0x00005f5c ldr r7, [pc, 0xbc] | r7 = *(0x601c);
0x00005f60 ldr sb, [pc, 0xbc] | sb = *(0x00006024);
0x00005f64 mov r6, 0 | r6 = 0;
0x00005f68 add r7, pc, r7 | r7 = pc + r7;
| label_8:
0x00005f6c ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x00005f70 cmp r3, r6 |
| if (r3 <= r6) {
0x00005f74 ble 0x5dcc | goto label_7;
| }
0x00005f78 ldr r0, [sp, 0xc] | r0 = src;
0x00005f7c sub fp, r5, r0 |
0x00005f80 mov r1, fp | r1 = fp;
0x00005f84 bl 0x2538 | r0 = strnlen ();
0x00005f88 add sl, r0, 1 | sl = r0 + 1;
0x00005f8c cmp fp, sl |
| if (fp == sl) {
0x00005f90 beq 0x5d94 | goto label_4;
| }
0x00005f94 mov r2, sl | r2 = sl;
0x00005f98 mov r1, sb | r1 = sb;
0x00005f9c mov r0, r7 | r0 = r7;
0x00005fa0 ldr fp, [r4, 0x38] | fp = *((r4 + 0x38));
0x00005fa4 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x00005fa8 cmp r0, 0 |
0x00005fac str r0, [fp, r6, lsl 2] | offset_2 = r6 << 2;
| *((fp + offset_2)) = r0;
| if (r0 == 0) {
0x00005fb0 beq 0x5d94 | goto label_4;
| }
0x00005fb4 ldr r3, [r4, 0x38] | r3 = *((r4 + 0x38));
0x00005fb8 ldr r1, [sp, 0xc] | r1 = src;
0x00005fbc ldr r0, [r3, r6, lsl 2] | offset_3 = r6 << 2;
| r0 = *((r3 + offset_3));
0x00005fc0 bl 0x2370 | strcpy (r0, r1)
0x00005fc4 ldr r2, [sp, 0xc] | r2 = src;
0x00005fc8 add r6, r6, 1 | r6++;
0x00005fcc add r2, r2, sl | r2 += sl;
0x00005fd0 str r2, [sp, 0xc] | src = r2;
0x00005fd4 b 0x5f6c | goto label_8;
| }
; 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-mqtt3a.so.1.3.9 @ 0x6788 */
| #include <stdint.h>
|
; (fcn) fcn.00006788 () | void fcn_00006788 (int32_t arg1) {
| int32_t var_0h;
| int32_t var_8h;
| int32_t var_ch;
| char * s2;
| char * var_14h;
| int32_t var_1ch;
| void * base;
| int32_t var_24h;
| int32_t var_28h;
| int32_t var_2ch;
| int32_t var_34h;
| r0 = arg1;
0x00006788 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0000678c ldr r5, [r0, 0xc] | r5 = *((r0 + 0xc));
0x00006790 mov r6, r0 | r6 = r0;
0x00006794 ldr r3, [pc, 0x2d0] | r3 = *(0x6a68);
0x00006798 ldr r0, [pc, 0x2d0] |
0x0000679c sub sp, sp, 0x34 |
0x000067a0 add r3, pc, r3 | r3 = pc + r3;
0x000067a4 add r0, pc, r0 | r0 = pc + r0;
0x000067a8 str r3, [sp, 8] | var_8h = r3;
0x000067ac mov r2, 3 | r2 = 3;
0x000067b0 mov r3, 0 | r3 = 0;
0x000067b4 ldr r1, [pc, 0x2b8] | r1 = *(0x6a70);
0x000067b8 add r0, r0, 0xaf | r0 = 0x6b1b;
0x000067bc str r3, [sp, 0x1c] | var_1ch = r3;
0x000067c0 bl 0x1a930 | fcn_0001a930 (r0, r1);
0x000067c4 ldr r3, [r5, 0x74] | r3 = *((r5 + 0x74));
0x000067c8 cmp r3, 0 |
0x000067cc bne 0x681c |
| while (r0 != 0) {
| label_0:
0x000067d0 mov r4, 0 | r4 = 0;
| label_1:
0x000067d4 ldr r3, [r5] | r3 = *(r5);
0x000067d8 ldr r2, [pc, 0x298] | r2 = *(0x6a74);
0x000067dc str r3, [sp] | *(sp) = r3;
0x000067e0 add r2, pc, r2 | r2 = pc + r2;
0x000067e4 mov r3, r4 | r3 = r4;
0x000067e8 mvn r1, 0 | r1 = ~0;
0x000067ec mov r0, 3 | r0 = 3;
0x000067f0 bl 0x12bc4 | fcn_00012bc4 (r0, r1, r2, r3);
0x000067f4 ldr r0, [pc, 0x280] |
0x000067f8 mov r3, 3 | r3 = 3;
0x000067fc add r0, pc, r0 | r0 = pc + r0;
0x00006800 add r2, sp, 0x1c | r2 += var_1ch;
0x00006804 ldr r1, [pc, 0x274] | r1 = *(0x6a7c);
0x00006808 add r0, r0, 0xaf | r0 = 0x6b27;
0x0000680c bl 0x1aa18 | fcn_0001aa18 (r0, r1);
0x00006810 ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x00006814 add sp, sp, 0x34 |
0x00006818 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x0000681c ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x00006820 add r2, sp, 0x24 | r2 += var_24h;
0x00006824 add r1, sp, 0x20 | r1 += base;
0x00006828 ldr r0, [r5, 0x70] | r0 = *((r5 + 0x70));
0x0000682c blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00006830 cmp r0, 0 |
0x00006834 mov r4, r0 | r4 = r0;
0x00006838 str r0, [sp, 0x1c] | var_1ch = r0;
0x0000683c bne 0x67d0 |
| }
0x00006840 ldr r1, [sp, 0x24] | r1 = var_24h;
0x00006844 cmp r1, 0 |
| if (r1 <= 0) {
0x00006848 ble 0x67d0 | goto label_0;
| }
0x0000684c ldr r3, [pc, 0x230] | r3 = *(0x6a80);
0x00006850 mov r2, 4 | r2 = 4;
0x00006854 add r3, pc, r3 | r3 = pc + r3;
0x00006858 ldr r0, [sp, 0x20] | r0 = base;
0x0000685c bl 0x2448 | qsort ();
0x00006860 ldr r3, [pc, 0x220] | r3 = *(0x6a84);
0x00006864 mov fp, r4 |
0x00006868 add r3, pc, r3 | r3 = pc + r3;
0x0000686c str r3, [sp, 0x10] | s2 = r3;
0x00006870 ldr r3, [pc, 0x214] | r3 = *(0x6a88);
0x00006874 add r3, pc, r3 | r3 = pc + r3;
0x00006878 str r3, [sp, 0x14] | var_14h = r3;
0x0000687c ldr r3, [pc, 0x20c] | r3 = *(0x6a8c);
0x00006880 add r3, pc, r3 | r3 = pc + r3;
0x00006884 str r3, [sp, 0xc] | var_ch = r3;
| label_2:
0x00006888 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x0000688c ldr r2, [sp, 0x20] | r2 = base;
0x00006890 cmp r3, 0 |
| if (r3 == 0) {
0x00006894 bne 0x68a4 |
0x00006898 ldr r1, [sp, 0x24] | r1 = var_24h;
0x0000689c cmp r1, fp |
| if (r1 > fp) {
0x000068a0 bgt 0x68c0 | goto label_4;
| }
| }
0x000068a4 cmp r2, 0 |
| if (r2 == 0) {
0x000068a8 beq 0x67d4 | goto label_1;
| }
0x000068ac ldr r0, [pc, 0x1e0] | r0 = *(0x6a90);
0x000068b0 ldr r1, [pc, 0x1e0] | r1 = *(0x6a94);
0x000068b4 add r0, pc, r0 | r0 = pc + r0;
0x000068b8 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x000068bc b 0x67d4 | goto label_1;
| label_4:
0x000068c0 str r3, [sp, 0x28] | var_28h = r3;
0x000068c4 ldr r8, [r2, fp, lsl 2] | offset_0 = fp << 2;
| r8 = *((r2 + offset_0));
0x000068c8 ldr r1, [sp, 0x10] | r1 = s2;
0x000068cc mov r2, 2 | r2 = 2;
0x000068d0 mov r0, r8 | r0 = r8;
0x000068d4 bl 0x25e0 | strncmp (r0, r1, r2);
0x000068d8 lsl r7, fp, 2 | r7 = fp << 2;
0x000068dc cmp r0, 0 |
| if (r0 != 0) {
0x000068e0 beq 0x6900 |
0x000068e4 ldr r1, [pc, 0x1b0] | r1 = *(0x6a98);
0x000068e8 mov r2, 3 | r2 = 3;
0x000068ec add r1, pc, r1 | r1 = pc + r1;
0x000068f0 mov r0, r8 | r0 = r8;
0x000068f4 bl 0x25e0 | r0 = strncmp (r0, r1, r2);
0x000068f8 cmp r0, 0 |
| if (r0 != 0) {
0x000068fc bne 0x6974 | goto label_3;
| }
| }
0x00006900 ldr r3, [r5, 0x74] | r3 = *((r5 + 0x74));
0x00006904 add sl, sp, 0x2c | sl += var_2ch;
0x00006908 ldr r3, [r3, 0x10] | r3 = *((r3 + 0x10));
0x0000690c add sb, sp, 0x28 | sb += var_28h;
0x00006910 mov ip, r3 |
0x00006914 mov r2, sb | r2 = sb;
0x00006918 mov r3, sl | r3 = sl;
0x0000691c mov r1, r8 | r1 = r8;
0x00006920 ldr r0, [r5, 0x70] | r0 = *((r5 + 0x70));
0x00006924 blx ip | r0 = ip (r0, r1, r2, r3);
0x00006928 cmp r0, 0 |
0x0000692c str r0, [sp, 0x1c] | var_1ch = r0;
| if (r0 != 0) {
0x00006930 bne 0x6974 | goto label_3;
| }
0x00006934 ldr r3, [r5, 0x7c] | r3 = *((r5 + 0x7c));
0x00006938 cmp r3, 0 |
0x0000693c bne 0x699c |
| while (r0 == 0) {
0x00006940 ldr r3, [sp, 0x20] | r3 = base;
0x00006944 mov r2, 3 | r2 = 3;
0x00006948 ldr r1, [sp, 0x14] | r1 = var_14h;
0x0000694c ldr r0, [r3, r7] | r0 = *((r3 + r7));
0x00006950 bl 0x25e0 | strncmp (r0, r1, r2);
0x00006954 mov r3, 0 | r3 = 0;
0x00006958 cmp r0, 0 |
| if (r0 != 0) {
0x0000695c moveq r2, 5 | r2 = 5;
| }
| if (r0 == 0) {
0x00006960 movne r2, 4 | r2 = 4;
| }
0x00006964 ldrd r0, r1, [sp, 0x28] | __asm ("ldrd r0, r1, [var_28h]");
0x00006968 bl 0x5b58 | r0 = fcn_00005b58 (r0, r1);
0x0000696c subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x00006970 bne 0x69bc | goto label_5;
| }
| label_3:
0x00006974 ldr r3, [sp, 0x20] | r3 = base;
0x00006978 ldr r2, [r3, r7] | r2 = *((r3 + r7));
0x0000697c cmp r2, 0 |
| if (r2 != 0) {
0x00006980 beq 0x6994 |
0x00006984 ldr r0, [pc, 0x114] | r0 = *(0x6a9c);
0x00006988 ldr r1, [pc, 0x114] | r1 = *(0x6aa0);
0x0000698c add r0, pc, r0 | r0 = pc + r0;
0x00006990 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
| }
0x00006994 add fp, fp, 1 |
0x00006998 b 0x6888 | goto label_2;
0x0000699c mov r2, sl | r2 = sl;
0x000069a0 mov r1, sb | r1 = sb;
0x000069a4 ldr r0, [r5, 0x84] | r0 = *((r5 + 0x84));
0x000069a8 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x000069ac cmp r0, 0 |
0x000069b0 str r0, [sp, 0x1c] | var_1ch = r0;
0x000069b4 beq 0x6940 |
| }
0x000069b8 b 0x6974 | goto label_3;
| label_5:
0x000069bc ldr r3, [sp, 0x20] | r3 = base;
0x000069c0 ldr r0, [r3, r7] | r0 = *((r3 + r7));
0x000069c4 bl 0x2808 | strlen (r0);
0x000069c8 ldr r1, [pc, 0xd8] | r1 = *(0x6aa4);
0x000069cc add r2, r0, 1 | r2 = r0 + 1;
0x000069d0 ldr r0, [sp, 0xc] | r0 = var_ch;
0x000069d4 bl 0x1b000 | fcn_0001b000 (r0, r1);
0x000069d8 ldr r3, [sp, 0x20] | r3 = base;
0x000069dc str r0, [r8, 0x5c] | *((r8 + 0x5c)) = r0;
0x000069e0 ldr r1, [r3, r7] | r1 = *((r3 + r7));
0x000069e4 bl 0x2370 | strcpy (r0, r1)
0x000069e8 ldr r3, [sp, 0x20] | r3 = base;
0x000069ec mov r1, 0x2d | r1 = 0x2d;
0x000069f0 ldr r0, [r3, r7] | r0 = *((r3 + r7));
0x000069f4 str r6, [r8, 0x50] | *((r8 + 0x50)) = r6;
0x000069f8 bl 0x2820 | r0 = strchr (r0, r1);
0x000069fc add r0, r0, 1 | r0++;
0x00006a00 bl 0x27e4 | atoi (r0);
0x00006a04 ldr r2, [sp, 8] | r2 = var_8h;
0x00006a08 ldr r3, [pc, 0x9c] | r3 = *(0x6aa8);
0x00006a0c mov r1, r8 | r1 = r8;
0x00006a10 str r0, [r8, 0x54] | *((r8 + 0x54)) = r0;
0x00006a14 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00006a18 mov r2, 0x60 | r2 = 0x60;
0x00006a1c ldr r0, [r3] | r0 = *(0x6aa8);
0x00006a20 bl 0x17470 | fcn_00017470 (r0, r1);
0x00006a24 ldr r2, [sp, 0x28] | r2 = var_28h;
0x00006a28 cmp r2, 0 |
| if (r2 != 0) {
0x00006a2c beq 0x6a3c |
0x00006a30 ldr r1, [pc, 0x78] | r1 = *(0x6aac);
0x00006a34 ldr r0, [sp, 0xc] | r0 = var_ch;
0x00006a38 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
| }
0x00006a3c ldr r3, [r8, 0x54] | r3 = *((r8 + 0x54));
0x00006a40 ldr r2, [r6, 0xe8] | r2 = *((r6 + 0xe8));
0x00006a44 add r4, r4, 1 | r4++;
0x00006a48 cmp r2, r3 |
| if (r2 < r3) {
0x00006a4c strhs r2, [r6, 0xe8] | *((r6 + 0xe8)) = r2;
| }
| if (r2 >= r3) {
0x00006a50 strlo r3, [r6, 0xe8] | *((r6 + 0xe8)) = r3;
| }
0x00006a54 ldr r3, [r8] | r3 = *(r8);
0x00006a58 cmp r3, 3 |
| if (r3 != 3) {
0x00006a5c ldreq r3, [r6, 0xf8] | r3 = *((r6 + 0xf8));
| }
| if (r3 != 3) {
0x00006a60 addeq r3, r3, 1 | r3++;
| }
| if (r3 != 3) {
0x00006a64 streq r3, [r6, 0xf8] | *((r6 + 0xf8)) = r3;
| }
0x00006a68 b 0x6974 | 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-mqtt3a.so.1.3.9 @ 0x6cb8 */
| #include <stdint.h>
|
; (fcn) fcn.00006cb8 () | void fcn_00006cb8 (int32_t arg_0h, 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_18h;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_28h;
| int32_t var_2ch;
| int32_t var_30h;
| char * src;
| int32_t var_1h;
| int32_t var_40h;
| int32_t var_44h;
| r0 = arg1;
| r1 = arg2;
0x00006cb8 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00006cbc ldr fp, [pc, 0x89c] | fp = *(0x00007560);
0x00006cc0 mov r4, r0 | r4 = r0;
0x00006cc4 ldr r0, [pc, 0x898] |
0x00006cc8 sub sp, sp, 0x44 |
0x00006ccc add r0, pc, r0 | r0 = pc + r0;
0x00006cd0 mov r3, 0 | r3 = 0;
0x00006cd4 mov r2, 3 | r2 = 3;
0x00006cd8 add r0, r0, 0xf0 | r0 = 0x7650;
0x00006cdc mov r5, r1 | r5 = r1;
0x00006ce0 ldr r1, [pc, 0x880] | r1 = *(0x7564);
0x00006ce4 str r3, [sp, 0x28] | var_28h = r3;
0x00006ce8 bl 0x1a930 | fcn_0001a930 (r0, r1);
0x00006cec ldr r3, [pc, 0x878] | r3 = *(0x7568);
0x00006cf0 add fp, pc, fp |
0x00006cf4 ldr r3, [fp, r3] | r3 = *((fp + r3));
0x00006cf8 ldr r0, [r3] | r0 = *(0x7568);
0x00006cfc str r3, [sp, 0xc] | var_ch = r3;
0x00006d00 bl 0x64a0 | fcn_000064a0 ();
0x00006d04 ldr r3, [r4] | r3 = *(r4);
0x00006d08 cmp r3, 1 |
| if (r3 == 1) {
0x00006d0c bne 0x6d24 |
0x00006d10 ldr r3, [r4, 0x50] | r3 = *((r4 + 0x50));
0x00006d14 ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
0x00006d18 ldrh r3, [r3, 0x10] | r3 = *((r3 + 0x10));
0x00006d1c tst r3, 0x3c0 |
| if ((r3 & 0x3c0) != 0) {
0x00006d20 bne 0x6d3c | goto label_12;
| }
| }
0x00006d24 add r6, sp, 0x20 | r6 += var_20h;
0x00006d28 mov r0, r6 | r0 = r6;
0x00006d2c bl 0xb2c4 | r0 = fcn_0000b2c4 (r0);
0x00006d30 ldm r6, {r0, r1} | r0 = *(r6);
| r1 = *((r6 + 4));
0x00006d34 add r3, r4, 0x1c | r3 = r4 + 0x1c;
0x00006d38 stm r3, {r0, r1} | *(r3) = r0;
| *((r3 + 4)) = r1;
| label_12:
0x00006d3c ldr r2, [pc, 0x82c] | r2 = *(0x756c);
0x00006d40 ldr r3, [r4] | r3 = *(r4);
0x00006d44 ldr r2, [fp, r2] | r2 = *((fp + r2));
0x00006d48 cmp r3, 1 |
0x00006d4c str r2, [sp, 8] | var_8h = r2;
| if (r3 != 1) {
0x00006d50 beq 0x6d68 |
0x00006d54 cmp r3, 0xe |
| if (r3 != 0xe) {
0x00006d58 bne 0x6dbc | goto label_13;
| }
0x00006d5c ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x00006d60 cmp r3, 0 |
| if (r3 == 0) {
0x00006d64 beq 0x6dbc | goto label_13;
| }
| }
0x00006d68 ldr r3, [sp, 8] | r3 = var_8h;
0x00006d6c ldr r0, [r3] | r0 = *(r3);
0x00006d70 ldr r3, [r0] | r3 = *(r0);
0x00006d74 mov r2, r3 | r2 = r3;
| label_0:
0x00006d78 cmp r2, 0 |
0x00006d7c bne 0x6d90 |
| while (ip != 1) {
0x00006d80 mov r2, r5 | r2 = r5;
0x00006d84 mov r1, r4 | r1 = r4;
0x00006d88 bl 0x174bc | fcn_000174bc (r0, r1);
0x00006d8c b 0x7008 | goto label_11;
0x00006d90 ldr r1, [r2, 8] | r1 = *((r2 + 8));
0x00006d94 ldr ip, [r1] | ip = *(r1);
0x00006d98 cmp ip, 1 |
0x00006d9c cmpne ip, 0xe | __asm ("cmpne ip, 0xe");
0x00006da0 bne 0x6d80 |
| }
0x00006da4 ldr ip, [r1, 0x50] | ip = *((r1 + 0x50));
0x00006da8 ldr r1, [r4, 0x50] | r1 = *((r4 + 0x50));
0x00006dac cmp ip, r1 |
| if (ip == r1) {
0x00006db0 beq 0x7514 | goto label_14;
| }
0x00006db4 ldr r2, [r2] | r2 = *(r2);
0x00006db8 b 0x6d78 | goto label_0;
| label_13:
0x00006dbc ldr r3, [sp, 8] | r3 = var_8h;
0x00006dc0 mov r2, r5 | r2 = r5;
0x00006dc4 ldr r0, [r3] | r0 = *(r3);
0x00006dc8 mov r1, r4 | r1 = r4;
0x00006dcc bl 0x17470 | fcn_00017470 (r0, r1);
0x00006dd0 ldr sb, [r4, 0x50] | sb = *((r4 + 0x50));
0x00006dd4 ldr r3, [sb, 0xc] | r3 = *((sb + 0xc));
0x00006dd8 ldr r3, [r3, 0x74] | r3 = *((r3 + 0x74));
0x00006ddc cmp r3, 0 |
| if (r3 == 0) {
0x00006de0 beq 0x7490 | goto label_15;
| }
0x00006de4 ldr r3, [r4] | r3 = *(r4);
0x00006de8 cmp r3, 3 |
| if (r3 == 3) {
0x00006dec bne 0x6e20 |
0x00006df0 ldr r3, [sb, 0xf0] | r3 = *((sb + 0xf0));
0x00006df4 cmp r3, 0 |
| if (r3 == 0) {
0x00006df8 beq 0x6e20 | goto label_16;
| }
0x00006dfc ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x00006e00 cmp r2, 1 |
| if (r2 <= 1) {
0x00006e04 ble 0x6e20 | goto label_16;
| }
0x00006e08 ldr r3, [r3, 0x20] | r3 = *((r3 + 0x20));
0x00006e0c cmp r3, 0 |
| if (r3 != 0) {
0x00006e10 bne 0x6e20 | goto label_16;
| }
0x00006e14 ldr r3, [r4, 0x40] | r3 = *((r4 + 0x40));
0x00006e18 cmp r3, 0 |
| if (r3 == 0) {
0x00006e1c beq 0x749c | goto label_17;
| }
| }
| label_16:
0x00006e20 ldr r0, [pc, 0x74c] |
0x00006e24 mov r2, 3 | r2 = 3;
0x00006e28 add r0, pc, r0 | r0 = pc + r0;
0x00006e2c add r0, r0, 0x104 | r0 = 0x7674;
0x00006e30 mov r7, 0 | r7 = 0;
0x00006e34 ldr r1, [pc, 0x73c] | r1 = *(0x7574);
0x00006e38 add r0, r0, 1 | r0++;
0x00006e3c str r7, [sp, 0x2c] | var_2ch = r7;
0x00006e40 bl 0x1a930 | fcn_0001a930 (r0, r1);
0x00006e44 ldr r2, [r4] | r2 = *(r4);
0x00006e48 ldr r3, [sb, 0xc] | r3 = *((sb + 0xc));
0x00006e4c cmp r2, 8 |
| if (r2 != 8) {
0x00006e50 beq 0x6f20 |
0x00006e54 cmp r2, 0xa |
| if (r2 == 0xa) {
0x00006e58 beq 0x7284 | goto label_18;
| }
0x00006e5c cmp r2, 3 |
| if (r2 != 3) {
0x00006e60 bne 0x7340 | goto label_19;
| }
0x00006e64 ldr r3, [r3, 0x8c] | r3 = *((r3 + 0x8c));
0x00006e68 ldr r5, [pc, 0x70c] | r5 = *(0x7578);
0x00006e6c cmp r3, 5 |
| if (r3 >= 5) {
0x00006e70 movlt sl, 7 | sl = 7;
| }
| if (r3 < 5) {
0x00006e74 movge sl, 8 | sl = 8;
| }
0x00006e78 lsl r7, sl, 2 | r7 = sl << 2;
0x00006e7c add r5, pc, r5 | r5 = pc + r5;
0x00006e80 mov r2, r7 | r2 = r7;
0x00006e84 mov r1, 0x150 | r1 = 0x150;
0x00006e88 mov r0, r5 | r0 = r5;
0x00006e8c bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x00006e90 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x00006e94 beq 0x6f5c | goto label_3;
| }
0x00006e98 mov r0, r5 | r0 = r5;
0x00006e9c mov r2, r7 | r2 = r7;
0x00006ea0 ldr r1, [pc, 0x6d8] | r1 = *(0x757c);
0x00006ea4 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x00006ea8 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00006eac beq 0x6f5c | goto label_3;
| }
0x00006eb0 mov r7, 4 | r7 = 4;
0x00006eb4 add r3, r4, 0x14 | r3 = r4 + 0x14;
0x00006eb8 str r4, [r5] | *(r5) = r4;
0x00006ebc str r7, [r6] | *(r6) = r7;
0x00006ec0 str r3, [r5, 4] | *((r5 + 4)) = r3;
0x00006ec4 str r7, [r6, 4] | *((r6 + 4)) = r7;
0x00006ec8 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x00006ecc mov r8, 7 | r8 = 7;
0x00006ed0 str r3, [r5, 8] | *((r5 + 8)) = r3;
0x00006ed4 ldr r0, [r4, 0x34] | r0 = *((r4 + 0x34));
0x00006ed8 bl 0x2808 | strlen (r0);
0x00006edc add r3, r4, 0x38 | r3 = r4 + 0x38;
0x00006ee0 add r0, r0, 1 | r0++;
0x00006ee4 str r0, [r6, 8] | *((r6 + 8)) = r0;
0x00006ee8 str r3, [r5, 0xc] | *((r5 + 0xc)) = r3;
0x00006eec str r7, [r6, 0xc] | *((r6 + 0xc)) = r7;
0x00006ef0 ldr r3, [r4, 0x3c] | r3 = *((r4 + 0x3c));
0x00006ef4 str r3, [r5, 0x10] | *((r5 + 0x10)) = r3;
0x00006ef8 ldr r3, [r4, 0x38] | r3 = *((r4 + 0x38));
0x00006efc str r3, [r6, 0x10] | *((r6 + 0x10)) = r3;
0x00006f00 add r3, r4, 0x40 | r3 = r4 + 0x40;
0x00006f04 str r3, [r5, 0x14] | *((r5 + 0x14)) = r3;
0x00006f08 add r3, r4, 0x44 | r3 = r4 + 0x44;
0x00006f0c str r7, [r6, 0x14] | *((r6 + 0x14)) = r7;
0x00006f10 str r3, [r5, 0x18] | *((r5 + 0x18)) = r3;
0x00006f14 str r7, [r6, 0x18] | *((r6 + 0x18)) = r7;
0x00006f18 mov r7, 1 | r7 = 1;
0x00006f1c b 0x70c4 | goto label_6;
| }
0x00006f20 ldr r3, [r3, 0x8c] | r3 = *((r3 + 0x8c));
0x00006f24 ldr r5, [pc, 0x658] | r5 = *(0x7580);
0x00006f28 cmp r3, 5 |
0x00006f2c ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
| if (r3 >= 5) {
0x00006f30 movlt sl, 3 | sl = 3;
| }
| if (r3 < 5) {
0x00006f34 movge sl, 4 | sl = 4;
| }
0x00006f38 add sl, sl, r3, lsl 1 | sl += (r3 << 1);
0x00006f3c lsl r8, sl, 2 | r8 = sl << 2;
0x00006f40 add r5, pc, r5 | r5 = pc + r5;
0x00006f44 mov r2, r8 | r2 = r8;
0x00006f48 ldr r1, [pc, 0x638] | r1 = *(0x7584);
0x00006f4c mov r0, r5 | r0 = r5;
0x00006f50 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x00006f54 subs r6, r0, 0 | r6 = r0 - 0;
0x00006f58 bne 0x7068 |
| while (r5 == r0) {
| label_3:
0x00006f5c mvn r3, 0x62 | r3 = ~0x62;
0x00006f60 cmp r6, 0 |
0x00006f64 str r3, [sp, 0x2c] | var_2ch = r3;
| if (r6 == 0) {
0x00006f68 movne r5, 0 | r5 = 0;
| }
| if (r6 != 0) {
0x00006f6c bne 0x7404 | goto label_20;
| }
| label_1:
0x00006f70 ldr r0, [pc, 0x614] |
0x00006f74 mov r3, 3 | r3 = 3;
0x00006f78 add r0, pc, r0 | r0 = pc + r0;
0x00006f7c add r0, r0, 0x104 | r0 = 0x768c;
0x00006f80 add r2, sp, 0x2c | r2 += var_2ch;
0x00006f84 ldr r1, [pc, 0x604] | r1 = *(0x758c);
0x00006f88 add r0, r0, 1 | r0++;
0x00006f8c bl 0x1aa18 | fcn_0001aa18 (r0, r1);
0x00006f90 ldr r2, [r4] | r2 = *(r4);
0x00006f94 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00006f98 cmp r2, 3 |
0x00006f9c cmpeq r3, 0 | __asm ("cmpeq r3, 0");
| if (r2 != 3) {
0x00006fa0 bne 0x7490 | goto label_15;
| }
0x00006fa4 ldr r2, [r4, 0x50] | r2 = *((r4 + 0x50));
0x00006fa8 mov r3, 1 | r3 = 1;
0x00006fac ldr r2, [r2, 0xc] | r2 = *((r2 + 0xc));
0x00006fb0 str r3, [r4, 0x58] | *((r4 + 0x58)) = r3;
0x00006fb4 ldr r2, [r2, 0x8c] | r2 = *((r2 + 0x8c));
0x00006fb8 ldr r3, [r4, 0x54] | r3 = *((r4 + 0x54));
0x00006fbc cmp r2, 4 |
0x00006fc0 str r3, [sp] | *(sp) = r3;
0x00006fc4 add r6, sp, 0x34 | r6 += src;
| if (r2 <= 4) {
0x00006fc8 ble 0x741c | goto label_21;
| }
0x00006fcc ldr r3, [pc, 0x5c0] | r3 = *(0x7590);
0x00006fd0 ldr r2, [pc, 0x5c0] | r2 = *(0x7594);
0x00006fd4 add r3, pc, r3 | r3 = pc + r3;
0x00006fd8 add r2, pc, r2 | r2 = pc + r2;
| label_10:
0x00006fdc mov r1, 0xb | r1 = 0xb;
0x00006fe0 mov r0, r6 | r0 = r6;
0x00006fe4 bl 0x2418 | r0 = snprintf (r0, r1, r2, r3);
0x00006fe8 cmp r0, 0xa |
| if (r0 <= 0xa) {
0x00006fec ble 0x7430 | goto label_22;
| }
0x00006ff0 ldr r2, [pc, 0x5a4] | r2 = *(0x7598);
0x00006ff4 mov r3, r0 | r3 = r0;
0x00006ff8 add r2, pc, r2 | r2 = pc + r2;
0x00006ffc mov r1, 0 | r1 = 0;
0x00007000 mov r0, 5 | r0 = 5;
0x00007004 bl 0x12bc4 | fcn_00012bc4 (r0, r1, r2, r3);
| label_11:
0x00007008 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0000700c ldr r0, [r3] | r0 = *(r3);
0x00007010 bl 0x64d4 | fcn_000064d4 ();
0x00007014 ldr r3, [pc, 0x584] | r3 = *(0x759c);
0x00007018 ldr r3, [fp, r3] | r3 = *((fp + r3));
0x0000701c ldr r0, [r3] | r0 = *(0x759c);
0x00007020 bl 0x14f3c | r0 = fcn_00014f3c (r0);
0x00007024 subs r3, r0, 0 | r3 = r0 - 0;
| if (r3 != r0) {
0x00007028 beq 0x7040 |
0x0000702c ldr r2, [pc, 0x570] | r2 = *(0x75a0);
0x00007030 mov r1, 0 | r1 = 0;
0x00007034 add r2, pc, r2 | r2 = pc + r2;
0x00007038 mov r0, 5 | r0 = 5;
0x0000703c bl 0x12bc4 | fcn_00012bc4 (r0, r1, r2, r3);
| }
0x00007040 ldr r0, [pc, 0x560] |
0x00007044 mov r3, 3 | r3 = 3;
0x00007048 add r0, pc, r0 | r0 = pc + r0;
0x0000704c add r2, sp, 0x28 | r2 += var_28h;
0x00007050 mov r1, 0x390 | r1 = 0x390;
0x00007054 add r0, r0, 0xf0 | r0 = 0x7694;
0x00007058 bl 0x1aa18 | fcn_0001aa18 (r0, r1);
0x0000705c ldr r0, [sp, 0x28] | r0 = var_28h;
0x00007060 add sp, sp, 0x44 |
0x00007064 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x00007068 mov r0, r5 | r0 = r5;
0x0000706c mov r2, r8 | r2 = r8;
0x00007070 ldr r1, [pc, 0x534] | r1 = *(0x75a8);
0x00007074 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x00007078 subs r5, r0, 0 | r5 = r0 - 0;
0x0000707c beq 0x6f5c |
| }
0x00007080 mov r1, 4 | r1 = 4;
0x00007084 add r3, r4, 0x14 | r3 = r4 + 0x14;
0x00007088 str r4, [r5] | *(r5) = r4;
0x0000708c str r1, [r6] | *(r6) = r1;
0x00007090 str r3, [r5, 4] | *((r5 + 4)) = r3;
0x00007094 add r3, r4, 0x34 | r3 = r4 + 0x34;
0x00007098 str r1, [r6, 4] | *((r6 + 4)) = r1;
0x0000709c add r2, r4, 0x40 | r2 = r4 + 0x40;
0x000070a0 str r3, [r5, 8] | *((r5 + 8)) = r3;
0x000070a4 mov r8, 3 | r8 = 3;
0x000070a8 mov r3, 0xc | r3 = 0xc;
0x000070ac str r1, [r6, 8] | *((r6 + 8)) = r1;
0x000070b0 str r2, [sp, 0x10] | var_10h = r2;
| label_2:
0x000070b4 ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x000070b8 cmp r7, r2 |
| if (r7 < r2) {
0x000070bc blt 0x71e0 | goto label_23;
| }
| label_4:
0x000070c0 mov r7, 1 | r7 = 1;
| label_6:
0x000070c4 ldr r3, [sb, 0xe8] | r3 = *((sb + 0xe8));
0x000070c8 ldr r2, [pc, 0x4e0] | r2 = *(0x75ac);
0x000070cc add r3, r3, 1 | r3++;
0x000070d0 cmp r3, r2 |
| if (r3 != r2) {
0x000070d4 moveq r3, 0 | r3 = 0;
| }
0x000070d8 str r3, [sb, 0xe8] | *((sb + 0xe8)) = r3;
0x000070dc ldr r3, [sb, 0xc] | r3 = *((sb + 0xc));
0x000070e0 ldr r3, [r3, 0x8c] | r3 = *((r3 + 0x8c));
0x000070e4 cmp r3, 4 |
| if (r3 > 4) {
0x000070e8 movle r7, 0 | r7 = 0;
| }
| if (r3 <= 4) {
0x000070ec andgt r7, r7, 1 | r7 &= 1;
| }
0x000070f0 cmp r7, 0 |
| if (r7 == 0) {
0x000070f4 beq 0x7354 | goto label_24;
| }
0x000070f8 mov r3, 0 | r3 = 0;
0x000070fc str r3, [sp, 0x30] | var_30h = r3;
0x00007100 add r3, r4, 0x24 | r3 = r4 + 0x24;
0x00007104 mov r0, r3 | r0 = r3;
0x00007108 str r3, [sp, 0x10] | var_10h = r3;
0x0000710c bl 0x179d8 | fcn_000179d8 (r0);
0x00007110 ldr r1, [pc, 0x49c] | r1 = *(0x75b0);
0x00007114 mov r2, r0 | r2 = r0;
0x00007118 mov r7, r0 | r7 = r0;
0x0000711c ldr r0, [pc, 0x494] | r0 = *(0x75b4);
0x00007120 add r0, pc, r0 | r0 = pc + r0;
0x00007124 bl 0x1b000 | fcn_0001b000 (r0, r1);
0x00007128 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0000712c cmp r0, 0 |
| if (r0 != 0) {
0x00007130 mvneq r3, 0x62 | r3 = ~0x62;
| }
0x00007134 str r0, [r5, r8, lsl 2] | offset_0 = r8 << 2;
| *((r5 + offset_0)) = r0;
0x00007138 str r0, [sp, 0x30] | var_30h = r0;
| if (r0 != 0) {
0x0000713c streq r3, [sp, 0x2c] | var_2ch = r3;
| }
| if (r0 != 0) {
0x00007140 beq 0x71b8 |
0x00007144 mov r1, r3 | r1 = r3;
0x00007148 add r0, sp, 0x30 | r0 += var_30h;
0x0000714c bl 0x17c88 | fcn_00017c88 (r0, r1);
0x00007150 ldr r2, [pc, 0x464] | r2 = *(0x75b8);
0x00007154 mov r1, 0xb | r1 = 0xb;
0x00007158 add r2, pc, r2 | r2 = pc + r2;
0x0000715c str r0, [sp, 0x2c] | var_2ch = r0;
0x00007160 str r7, [r6, r8, lsl 2] | offset_1 = r8 << 2;
| *((r6 + offset_1)) = r7;
0x00007164 ldr r3, [sb, 0xe8] | r3 = *((sb + 0xe8));
0x00007168 add r0, sp, 0x34 | r0 += src;
0x0000716c str r3, [sp] | *(sp) = r3;
0x00007170 ldr r3, [pc, 0x448] | r3 = *(0x75bc);
0x00007174 add r3, pc, r3 | r3 = pc + r3;
0x00007178 bl 0x2418 | r0 = snprintf (r0, r1, r2, r3);
| label_7:
0x0000717c cmp r0, 0xa |
| if (r0 <= 0xa) {
0x00007180 ble 0x7380 | goto label_25;
| }
0x00007184 ldr r2, [pc, 0x438] | r2 = *(0x75c0);
0x00007188 mov r3, r0 | r3 = r0;
0x0000718c add r2, pc, r2 | r2 = pc + r2;
0x00007190 mov r1, 0 | r1 = 0;
0x00007194 mov r0, 5 | r0 = 5;
0x00007198 bl 0x12bc4 | fcn_00012bc4 (r0, r1, r2, r3);
| label_8:
0x0000719c cmp r8, 0 |
| if (r8 == 0) {
0x000071a0 beq 0x71b8 | goto label_26;
| }
0x000071a4 ldr r0, [pc, 0x41c] | r0 = *(0x75c4);
0x000071a8 ldr r2, [r5, r8, lsl 2] | offset_2 = r8 << 2;
| r2 = *((r5 + offset_2));
0x000071ac mov r1, 0x19c | r1 = 0x19c;
0x000071b0 add r0, pc, r0 | r0 = pc + r0;
0x000071b4 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
| }
| label_26:
0x000071b8 cmp r6, 0 |
| if (r6 != 0) {
0x000071bc bne 0x7404 | goto label_20;
| }
| label_9:
0x000071c0 cmp r5, 0 |
| if (r5 == 0) {
0x000071c4 beq 0x6f70 | goto label_1;
| }
0x000071c8 ldr r0, [pc, 0x3fc] | r0 = *(0x75c8);
0x000071cc mov r2, r5 | r2 = r5;
0x000071d0 mov r1, 0x1a0 | r1 = 0x1a0;
0x000071d4 add r0, pc, r0 | r0 = pc + r0;
0x000071d8 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x000071dc b 0x6f70 | goto label_1;
| label_23:
0x000071e0 ldr r0, [r4, 0x38] | r0 = *((r4 + 0x38));
0x000071e4 lsl r2, r7, 2 | r2 = r7 << 2;
0x000071e8 ldr r0, [r0, r7, lsl 2] | offset_3 = r7 << 2;
| r0 = *((r0 + offset_3));
0x000071ec str r1, [sp, 0x1c] | var_1ch = r1;
0x000071f0 str r0, [r5, r8, lsl 2] | offset_4 = r8 << 2;
| *((r5 + offset_4)) = r0;
0x000071f4 ldr r0, [r4, 0x38] | r0 = *((r4 + 0x38));
0x000071f8 str r3, [sp, 0x18] | var_18h = r3;
0x000071fc ldr r0, [r0, r7, lsl 2] | offset_5 = r7 << 2;
| r0 = *((r0 + offset_5));
0x00007200 str r2, [sp, 0x14] | var_14h = r2;
0x00007204 bl 0x2808 | strlen (r0);
0x00007208 ldr r3, [sp, 0x18] | r3 = var_18h;
0x0000720c ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x00007210 add r0, r0, 1 | r0++;
0x00007214 str r0, [r6, r8, lsl 2] | offset_6 = r8 << 2;
| *((r6 + offset_6)) = r0;
0x00007218 ldr r0, [sb, 0xc] | r0 = *((sb + 0xc));
0x0000721c add r8, r8, 2 | r8 += 2;
0x00007220 ldr r0, [r0, 0x8c] | r0 = *((r0 + 0x8c));
0x00007224 cmp r0, 4 |
0x00007228 lsl r0, r7, 3 | r0 = r7 << 3;
| if (r0 > 4) {
0x0000722c bgt 0x7254 | goto label_27;
| }
0x00007230 ldr lr, [r4, 0x3c] |
0x00007234 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00007238 add ip, r5, r0 |
0x0000723c add r2, lr, r2 | r2 = lr + r2;
0x00007240 add r0, r6, r0 | r0 = r6 + r0;
0x00007244 str r2, [ip, 0x10] | *((ip + 0x10)) = r2;
0x00007248 str r1, [r0, 0x10] | *((r0 + 0x10)) = r1;
| do {
0x0000724c add r7, r7, 1 | r7++;
0x00007250 b 0x70b4 | goto label_2;
| label_27:
0x00007254 ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x00007258 cmp r2, 1 |
| if (r2 == 1) {
0x0000725c ldrne r2, [r4, 0x4c] | r2 = *((r4 + 0x4c));
| }
| if (r2 != 1) {
0x00007260 ldreq ip, [sp, 0x10] | ip = var_10h;
| }
0x00007264 mlane lr, r3, r7, r2 | __asm ("mlane lr, r3, r7, r2");
| if (r2 != 1) {
0x00007268 addeq r2, r5, r0 | r2 = r5 + r0;
| }
| if (r2 == 1) {
0x0000726c addne ip, r5, r0 |
| }
0x00007270 add r0, r6, r0 | r0 = r6 + r0;
| if (r2 != 1) {
0x00007274 streq ip, [r2, 0x10] | *((r2 + 0x10)) = ip;
| }
| if (r2 == 1) {
0x00007278 strne lr, [ip, 0x10] |
| }
0x0000727c str r3, [r0, 0x10] | *((r0 + 0x10)) = r3;
0x00007280 b 0x724c |
| } while (1);
| label_18:
0x00007284 ldr r3, [r3, 0x8c] | r3 = *((r3 + 0x8c));
0x00007288 ldr r5, [pc, 0x340] | r5 = *(0x75cc);
0x0000728c cmp r3, 5 |
0x00007290 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
| if (r3 >= 5) {
0x00007294 movlt sl, 3 | sl = 3;
| }
| if (r3 < 5) {
0x00007298 movge sl, 4 | sl = 4;
| }
0x0000729c add sl, sl, r3 | sl += r3;
0x000072a0 lsl r7, sl, 2 | r7 = sl << 2;
0x000072a4 add r5, pc, r5 | r5 = pc + r5;
0x000072a8 mov r2, r7 | r2 = r7;
0x000072ac ldr r1, [pc, 0x320] | r1 = *(0x75d0);
0x000072b0 mov r0, r5 | r0 = r5;
0x000072b4 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x000072b8 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x000072bc beq 0x6f5c | goto label_3;
| }
0x000072c0 mov r0, r5 | r0 = r5;
0x000072c4 mov r2, r7 | r2 = r7;
0x000072c8 ldr r1, [pc, 0x308] | r1 = *(0x75d4);
0x000072cc bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x000072d0 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x000072d4 beq 0x6f5c | goto label_3;
| }
0x000072d8 mov r3, 4 | r3 = 4;
0x000072dc add r2, r4, 0x14 | r2 = r4 + 0x14;
0x000072e0 str r4, [r5] | *(r5) = r4;
0x000072e4 mov r7, 3 | r7 = 3;
0x000072e8 str r3, [r6] | *(r6) = r3;
0x000072ec str r2, [r5, 4] | *((r5 + 4)) = r2;
0x000072f0 add r2, r4, 0x34 | r2 = r4 + 0x34;
0x000072f4 str r3, [r6, 4] | *((r6 + 4)) = r3;
0x000072f8 str r2, [r5, 8] | *((r5 + 8)) = r2;
0x000072fc str r3, [r6, 8] | *((r6 + 8)) = r3;
| label_5:
0x00007300 ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x00007304 sub r3, r7, 3 | r3 = r7 - 3;
0x00007308 cmp r2, r3 |
0x0000730c mov r8, r7 | r8 = r7;
| if (r2 <= r3) {
0x00007310 ble 0x70c0 | goto label_4;
| }
0x00007314 ldr r2, [r4, 0x38] | r2 = *((r4 + 0x38));
0x00007318 sub r3, r7, 0xc0000003 | r3 = r7 - 0xc0000003;
0x0000731c ldr r2, [r2, r3, lsl 2] | offset_7 = r3 << 2;
| r2 = *((r2 + offset_7));
0x00007320 str r2, [r5, r7, lsl 2] | offset_8 = r7 << 2;
| *((r5 + offset_8)) = r2;
0x00007324 ldr r2, [r4, 0x38] | r2 = *((r4 + 0x38));
0x00007328 ldr r0, [r2, r3, lsl 2] | offset_9 = r3 << 2;
| r0 = *((r2 + offset_9));
0x0000732c bl 0x2808 | r0 = strlen (r0);
0x00007330 add r0, r0, 1 | r0++;
0x00007334 str r0, [r6, r7, lsl 2] | offset_10 = r7 << 2;
| *((r6 + offset_10)) = r0;
0x00007338 add r7, r7, 1 | r7++;
0x0000733c b 0x7300 | goto label_5;
| label_19:
0x00007340 mov sl, r7 | sl = r7;
0x00007344 mov r8, r7 | r8 = r7;
0x00007348 mov r5, r7 | r5 = r7;
0x0000734c mov r6, r7 | r6 = r7;
0x00007350 b 0x70c4 | goto label_6;
| label_24:
0x00007354 ldr r3, [sb, 0xe8] | r3 = *((sb + 0xe8));
0x00007358 ldr r2, [pc, 0x27c] | r2 = *(0x75d8);
0x0000735c str r3, [sp] | *(sp) = r3;
0x00007360 ldr r3, [pc, 0x278] | r3 = *(0x75dc);
0x00007364 add r2, pc, r2 | r2 = pc + r2;
0x00007368 add r3, pc, r3 | r3 = pc + r3;
0x0000736c mov r1, 0xb | r1 = 0xb;
0x00007370 add r0, sp, 0x34 | r0 += src;
0x00007374 bl 0x2418 | snprintf (r0, r1, r2, r3);
0x00007378 mov r8, r7 | r8 = r7;
0x0000737c b 0x717c | goto label_7;
| label_25:
0x00007380 cmp sl, 0 |
| if (sl <= 0) {
0x00007384 ble 0x719c | goto label_8;
| }
0x00007388 ldr r0, [sb, 0xc] | r0 = *((sb + 0xc));
0x0000738c ldr r7, [r0, 0x78] | r7 = *((r0 + 0x78));
0x00007390 cmp r7, 0 |
| if (r7 != 0) {
0x00007394 beq 0x73b0 |
0x00007398 mov r3, r6 | r3 = r6;
0x0000739c mov r2, r5 | r2 = r5;
0x000073a0 mov r1, sl | r1 = sl;
0x000073a4 ldr r0, [r0, 0x80] | r0 = *((r0 + 0x80));
0x000073a8 blx r7 | uint32_t (*r7)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x000073ac str r0, [sp, 0x2c] | var_2ch = r0;
| }
0x000073b0 ldr r0, [sb, 0xc] | r0 = *((sb + 0xc));
0x000073b4 mov r2, sl | r2 = sl;
0x000073b8 ldr r3, [r0, 0x74] | r3 = *((r0 + 0x74));
0x000073bc add r1, sp, 0x34 | r1 += src;
0x000073c0 str r6, [sp] | *(sp) = r6;
0x000073c4 ldr r7, [r3, 0xc] | r7 = *((r3 + 0xc));
0x000073c8 ldr r0, [r0, 0x70] | r0 = *((r0 + 0x70));
0x000073cc mov r3, r5 | r3 = r5;
0x000073d0 blx r7 | r0 = uint32_t (*r7)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x000073d4 cmp r0, 0 |
0x000073d8 mov r3, r0 | r3 = r0;
0x000073dc str r0, [sp, 0x2c] | var_2ch = r0;
| if (r0 != 0) {
0x000073e0 beq 0x73f8 |
0x000073e4 ldr r2, [pc, 0x1f8] | r2 = *(0x75e0);
0x000073e8 mov r1, 0 | r1 = 0;
0x000073ec add r2, pc, r2 | r2 = pc + r2;
0x000073f0 mov r0, 5 | r0 = 5;
0x000073f4 bl 0x12bc4 | fcn_00012bc4 (r0, r1, r2, r3);
| }
0x000073f8 ldr r3, [sb, 0xe8] | r3 = *((sb + 0xe8));
0x000073fc str r3, [r4, 0x54] | *((r4 + 0x54)) = r3;
0x00007400 b 0x719c | goto label_8;
| label_20:
0x00007404 ldr r0, [pc, 0x1dc] | r0 = *(0x75e4);
0x00007408 mov r2, r6 | r2 = r6;
0x0000740c ldr r1, [pc, 0x1d8] | r1 = *(0x75e8);
0x00007410 add r0, pc, r0 | r0 = pc + r0;
0x00007414 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x00007418 b 0x71c0 | goto label_9;
| label_21:
0x0000741c ldr r3, [pc, 0x1cc] | r3 = *(0x75ec);
0x00007420 ldr r2, [pc, 0x1cc] | r2 = *(0x75f0);
0x00007424 add r3, pc, r3 | r3 = pc + r3;
0x00007428 add r2, pc, r2 | r2 = pc + r2;
0x0000742c b 0x6fdc | goto label_10;
| label_22:
0x00007430 mov r0, r6 | r0 = r6;
0x00007434 bl 0x2808 | strlen (r0);
0x00007438 ldr r5, [pc, 0x1b8] | r5 = *(0x75f4);
0x0000743c ldr r1, [pc, 0x1b8] | r1 = *(0x75f8);
0x00007440 add r5, pc, r5 | r5 = pc + r5;
0x00007444 add r2, r0, 1 | r2 += var_1h;
0x00007448 mov r0, r5 | r0 = r5;
0x0000744c bl 0x1b000 | fcn_0001b000 (r0, r1);
0x00007450 mov r1, r6 | r1 = r6;
0x00007454 mov r6, 0 | r6 = 0;
0x00007458 str r0, [r4, 0x5c] | *((r4 + 0x5c)) = r0;
0x0000745c bl 0x2370 | strcpy (r0, r1)
0x00007460 ldr r2, [r4, 0x3c] | r2 = *((r4 + 0x3c));
0x00007464 mov r1, 0x35c | r1 = 0x35c;
0x00007468 mov r0, r5 | r0 = r5;
0x0000746c bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x00007470 mov r0, r5 | r0 = r5;
0x00007474 str r6, [r4, 0x3c] | *((r4 + 0x3c)) = r6;
0x00007478 ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x0000747c ldr r1, [pc, 0x17c] | r1 = *(0x75fc);
0x00007480 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x00007484 str r6, [r4, 0x34] | *((r4 + 0x34)) = r6;
0x00007488 add r0, r4, 0x24 | r0 = r4 + 0x24;
0x0000748c bl 0x270c | fcn_0000270c ();
| label_15:
0x00007490 ldr r3, [r4] | r3 = *(r4);
0x00007494 cmp r3, 3 |
| if (r3 != 3) {
0x00007498 bne 0x7008 | goto label_11;
| }
| label_17:
0x0000749c ldr r2, [r4, 0x50] | r2 = *((r4 + 0x50));
0x000074a0 ldr r1, [r2, 0xf0] | r1 = *((r2 + 0xf0));
0x000074a4 ldr r3, [r2, 0xf8] | r3 = *((r2 + 0xf8));
0x000074a8 cmp r1, 0 |
| if (r1 != 0) {
0x000074ac beq 0x74c8 |
0x000074b0 ldr r1, [r1, 0xc] | r1 = *((r1 + 0xc));
0x000074b4 cmp r1, r3 |
| if (r1 > r3) {
0x000074b8 addle r6, sp, 0x40 | r6 += var_40h;
| }
| if (r1 > r3) {
0x000074bc movle r3, 0 | r3 = 0;
| }
| if (r1 > r3) {
0x000074c0 strle r3, [r6, -0xc]! | *((r6 -= 0xc)) = r3;
| }
| if (r1 <= r3) {
0x000074c4 ble 0x74f8 | goto label_28;
| }
| }
0x000074c8 add r3, r3, 1 | r3++;
0x000074cc str r3, [r2, 0xf8] | *((r2 + 0xf8)) = r3;
0x000074d0 b 0x7008 | goto label_11;
| do {
0x000074d4 ldr r3, [sp, 0x34] | r3 = src;
0x000074d8 ldr r5, [r3, 8] | r5 = *((r3 + 8));
0x000074dc ldr r3, [r4, 0x50] | r3 = *((r4 + 0x50));
0x000074e0 ldr r2, [r5, 0x50] | r2 = *((r5 + 0x50));
0x000074e4 cmp r2, r3 |
| if (r2 == r3) {
0x000074e8 bne 0x74f8 |
0x000074ec ldr r3, [r5] | r3 = *(r5);
0x000074f0 cmp r3, 3 |
| if (r3 == 3) {
0x000074f4 beq 0x7528 | goto label_29;
| }
| }
| label_28:
0x000074f8 ldr r3, [sp, 8] | r3 = var_8h;
0x000074fc mov r1, r6 | r1 = r6;
0x00007500 ldr r0, [r3] | r0 = *(r3);
0x00007504 bl 0x17774 | r0 = fcn_00017774 (r0, r1);
0x00007508 cmp r0, 0 |
0x0000750c bne 0x74d4 |
| } while (r0 != 0);
0x00007510 b 0x7008 | goto label_11;
| label_14:
0x00007514 mov r0, r4 | r0 = r4;
0x00007518 bl 0x5ad4 | fcn_00005ad4 (r0);
0x0000751c mvn r3, 0x11 | r3 = ~0x11;
0x00007520 str r3, [sp, 0x28] | var_28h = r3;
0x00007524 b 0x7008 | goto label_11;
| label_29:
0x00007528 ldr r3, [sp, 8] | r3 = var_8h;
0x0000752c mov r1, r5 | r1 = r5;
0x00007530 ldr r0, [r3] | r0 = *(r3);
0x00007534 bl 0x178f0 | fcn_000178f0 (r0);
0x00007538 mov r0, r5 | r0 = r5;
0x0000753c bl 0x5ad4 | fcn_00005ad4 (r0);
0x00007540 ldr r3, [r4, 0x50] | r3 = *((r4 + 0x50));
0x00007544 ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
0x00007548 ldr r3, [r3, 0x74] | r3 = *((r3 + 0x74));
0x0000754c cmp r3, 0 |
| if (r3 == 0) {
0x00007550 beq 0x7008 | goto label_11;
| }
0x00007554 mov r0, r5 | r0 = r5;
0x00007558 bl 0x6028 | fcn_00006028 (r0);
0x0000755c b 0x7008 | goto label_11;
| }
; 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-mqtt3a.so.1.3.9 @ 0x1260c */
| #include <stdint.h>
|
; (fcn) fcn.0001260c () | void fcn_0001260c (int32_t arg1) {
| int32_t var_0h;
| int32_t var_8h;
| int32_t var_70h;
| r0 = arg1;
0x0001260c ldr r3, [pc, 0x3f8] | r3 = *(0x12a08);
0x00012610 push {r4, r5, r6, r7, r8, lr} |
0x00012614 ldr r4, [pc, 0x3f4] | r4 = "ersistQueueEntry";
0x00012618 add r3, pc, r3 | r3 = pc + r3;
0x0001261c ldr r6, [r3, 8] | r6 = "TTProtocolOut.c";
0x00012620 mov r3, 0x12c | r3 = 0x12c;
0x00012624 sub sp, sp, 0x70 |
0x00012628 mov r5, r0 | r5 = r0;
0x0001262c mul r0, r6, r3 | r0 = r6 * r3;
0x00012630 bl 0x249c | malloc (r0);
0x00012634 ldr r7, [pc, 0x3d8] | r7 = "TTProtocolOut.c";
0x00012638 add r4, pc, r4 | r4 = pc + r4;
0x0001263c add r7, pc, r7 | r7 = pc + r7;
0x00012640 cmp r0, 0 |
0x00012644 str r0, [r4, 0x1c] | *((r4 + 0x1c)) = r0;
| if (r0 == 0) {
0x00012648 beq 0x12894 | goto label_6;
| }
0x0001264c ldr r0, [pc, 0x3c4] | r0 = "t__d";
0x00012650 str r6, [r4, 0x18] | *((r4 + 0x18)) = r6;
0x00012654 add r0, pc, r0 | r0 = pc + r0;
0x00012658 bl 0x2424 | r0 = getenv (r0);
0x0001265c subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x00012660 beq 0x1269c | goto label_0;
| }
0x00012664 ldrb r3, [r6] | r3 = *(r6);
0x00012668 cmp r3, 0 |
| if (r3 == 0) {
0x0001266c beq 0x1269c | goto label_0;
| }
0x00012670 ldr r1, [pc, 0x3a4] | r1 = *(0x12a18);
0x00012674 add r1, pc, r1 | r1 = pc + r1;
0x00012678 bl 0x2700 | r0 = strcmp (r0, r1);
0x0001267c cmp r0, 0 |
0x00012680 bne 0x12818 |
| while (r0 == 0) {
0x00012684 ldr r3, [pc, 0x394] | r3 = *(0x12a1c);
0x00012688 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x0001268c ldr r2, [r3] | r2 = *(0x12a1c);
0x00012690 ldr r3, [pc, 0x38c] | r3 = *(0x12a20);
0x00012694 add r3, pc, r3 | r3 = pc + r3;
0x00012698 str r2, [r3] | *(r3) = r2;
| label_0:
0x0001269c ldr r0, [pc, 0x384] | r0 = *(0x12a24);
0x000126a0 add r0, pc, r0 | r0 = pc + r0;
0x000126a4 bl 0x2424 | r0 = getenv (r0);
0x000126a8 subs r3, r0, 0 | r3 = r0 - 0;
| if (r3 != r0) {
0x000126ac beq 0x126d4 |
0x000126b0 ldrb r3, [r3] | r3 = *(r3);
0x000126b4 cmp r3, 0 |
| if (r3 == 0) {
0x000126b8 beq 0x126d4 | goto label_1;
| }
0x000126bc bl 0x27e4 | r0 = atoi (r0);
0x000126c0 cmp r0, 0 |
| if (r0 <= 0) {
0x000126c4 ble 0x128cc | goto label_7;
| }
0x000126c8 ldr r3, [pc, 0x35c] | r3 = *(0x12a28);
0x000126cc add r3, pc, r3 | r3 = pc + r3;
0x000126d0 str r0, [r3] | *(r3) = r0;
| }
| label_1:
0x000126d4 ldr r0, [pc, 0x354] | r0 = "TTPersistence_insertInOrder";
0x000126d8 add r0, pc, r0 | r0 = pc + r0;
0x000126dc bl 0x2424 | r0 = getenv (r0);
0x000126e0 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x000126e4 beq 0x12730 |
0x000126e8 ldrb r3, [r4] | r3 = *(r4);
0x000126ec cmp r3, 0 |
| if (r3 == 0) {
0x000126f0 beq 0x12730 | goto label_3;
| }
0x000126f4 ldr r1, [pc, 0x338] | r1 = *(0x12a30);
0x000126f8 add r1, pc, r1 | r1 = pc + r1;
0x000126fc bl 0x2700 | r0 = strcmp (r0, r1);
0x00012700 cmp r0, 0 |
| if (r0 != 0) {
0x00012704 beq 0x12720 |
0x00012708 ldr r1, [pc, 0x328] | r1 = *(0x12a34);
0x0001270c mov r0, r4 | r0 = r4;
0x00012710 add r1, pc, r1 | r1 = pc + r1;
0x00012714 bl 0x2700 | r0 = strcmp (r0, r1);
0x00012718 cmp r0, 0 |
| if (r0 != 0) {
0x0001271c bne 0x128e0 | goto label_8;
| }
| }
0x00012720 ldr r3, [pc, 0x314] | r3 = *(0x12a38);
0x00012724 mov r2, 1 | r2 = 1;
0x00012728 add r3, pc, r3 | r3 = pc + r3;
| label_2:
0x0001272c str r2, [r3, 4] | *((r3 + 4)) = r2;
| }
| label_3:
0x00012730 ldr r1, [pc, 0x308] | r1 = "sistence_create";
0x00012734 mov r0, 3 | r0 = 3;
0x00012738 add r1, pc, r1 | r1 = pc + r1;
0x0001273c bl 0x12164 | fcn_00012164 (r0, r1);
0x00012740 ldr r1, [pc, 0x2fc] | r1 = *(0x12a40);
0x00012744 mov r0, 3 | r0 = 3;
0x00012748 add r1, pc, r1 | r1 = pc + r1;
0x0001274c bl 0x12164 | fcn_00012164 (r0, r1);
0x00012750 cmp r5, 0 |
| if (r5 != 0) {
0x00012754 beq 0x12780 |
0x00012758 add r4, r5, 8 | r4 = r5 + 8;
0x0001275c ldr r5, [pc, 0x2e4] |
0x00012760 ldr r6, [pc, 0x2e4] | r6 = "sem";
0x00012764 add r5, pc, r5 | r5 = pc + r5;
0x00012768 add r6, pc, r6 | r6 = pc + r6;
0x0001276c add r5, r5, 0x24 | r5 = 0x12a68;
| label_5:
0x00012770 add r4, r4, 8 | r4 += 8;
0x00012774 ldr r3, [r4, -0x10] | r3 = *((r4 - 0x10));
0x00012778 cmp r3, 0 |
| if (r3 != 0) {
0x0001277c bne 0x129e4 | goto label_9;
| }
| }
0x00012780 ldr r4, [pc, 0x2c8] | r4 = *(0x12a4c);
0x00012784 add r1, sp, 8 | r1 += var_8h;
0x00012788 add r4, pc, r4 | r4 = pc + r4;
0x0001278c mov r0, r4 | r0 = r4;
0x00012790 bl 0x240c | r0 = stat64 ();
0x00012794 cmn r0, 1 |
| if (r0 != 1) {
0x00012798 beq 0x12804 |
0x0001279c ldr r1, [pc, 0x2b0] | r1 = *(0x12a50);
0x000127a0 mov r0, r4 | r0 = r4;
0x000127a4 add r1, pc, r1 | r1 = pc + r1;
0x000127a8 bl 0x28b0 | r0 = fopen64 ();
0x000127ac subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x000127b0 beq 0x12804 | goto label_10;
| }
0x000127b4 ldr r4, [pc, 0x29c] |
0x000127b8 ldr r1, [pc, 0x29c] | r1 = *(0x12a58);
0x000127bc add r4, pc, r4 | r4 = pc + r4;
0x000127c0 add r4, r4, 0x24 | r4 = 0x12a78;
0x000127c4 add r1, pc, r1 | r1 = pc + r1;
0x000127c8 mov r0, r4 | r0 = r4;
0x000127cc bl 0x2370 | strcpy (r0, r1)
0x000127d0 mov r0, r4 | r0 = r4;
0x000127d4 bl 0x2808 | strlen (r0);
0x000127d8 mov r2, r5 | r2 = r5;
0x000127dc rsb r1, r0, 0x200 | r1 = 0x200 - r0;
0x000127e0 add r0, r4, r0 | r0 = r4 + r0;
0x000127e4 bl 0x2454 | r0 = fgets (r0, r1, r2);
0x000127e8 cmp r0, 0 |
| if (r0 != 0) {
0x000127ec beq 0x127fc |
0x000127f0 mov r1, r4 | r1 = r4;
0x000127f4 mov r0, 3 | r0 = 3;
0x000127f8 bl 0x12164 | fcn_00012164 (r0, r1);
| }
0x000127fc mov r0, r5 | r0 = r5;
0x00012800 bl 0x26ac | fclose (r0);
| }
| label_10:
0x00012804 ldr r1, [pc, 0x254] | r1 = *(0x12a5c);
0x00012808 mov r0, 3 | r0 = 3;
0x0001280c add r1, pc, r1 | r1 = pc + r1;
0x00012810 bl 0x12164 | fcn_00012164 (r0, r1);
0x00012814 b 0x12894 | goto label_6;
0x00012818 ldr r1, [pc, 0x244] | r1 = *(0x12a60);
0x0001281c mov r0, r6 | r0 = r6;
0x00012820 add r1, pc, r1 | r1 = pc + r1;
0x00012824 bl 0x28b0 | r0 = fopen64 ();
0x00012828 cmp r0, 0 |
0x0001282c str r0, [r4] | *(r4) = r0;
0x00012830 beq 0x12684 |
| }
0x00012834 mov r0, r6 | r0 = r6;
0x00012838 bl 0x2808 | r0 = strlen (r0);
0x0001283c add r0, r0, 1 | r0++;
0x00012840 bl 0x249c | r0 = malloc (r0);
0x00012844 cmp r0, 0 |
0x00012848 mov r7, r0 | r7 = r0;
0x0001284c str r0, [r4, 0xc] | *((r4 + 0xc)) = r0;
| if (r0 != 0) {
0x00012850 ldreq r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
| }
| if (r0 != 0) {
0x00012854 beq 0x12890 |
0x00012858 mov r1, r6 | r1 = r6;
0x0001285c bl 0x2370 | strcpy (r0, r1)
0x00012860 mov r0, r6 | r0 = r6;
0x00012864 bl 0x2808 | r0 = strlen (r0);
0x00012868 add r6, r0, 3 | r6 = r0 + 3;
0x0001286c mov r8, r0 | r8 = r0;
0x00012870 mov r0, r6 | r0 = r6;
0x00012874 bl 0x249c | r0 = malloc (r0);
0x00012878 cmp r0, 0 |
0x0001287c str r0, [r4, 8] | *((r4 + 8)) = r0;
| if (r0 != 0) {
0x00012880 bne 0x128a0 | goto label_11;
| }
0x00012884 ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
0x00012888 bl 0x2898 | free (r0);
0x0001288c mov r0, r7 | r0 = r7;
| }
0x00012890 bl 0x2898 | free (r0);
| label_6:
0x00012894 mvn r0, 0 | r0 = ~0;
0x00012898 add sp, sp, 0x70 |
0x0001289c pop {r4, r5, r6, r7, r8, pc} |
| label_11:
0x000128a0 ldr r2, [pc, 0x1c0] | r2 = *(0x12a64);
0x000128a4 mov r3, r7 | r3 = r7;
0x000128a8 add r2, pc, r2 | r2 = pc + r2;
0x000128ac mov r1, r6 | r1 = r6;
0x000128b0 bl 0x2418 | r0 = snprintf (r0, r1, r2, r3);
0x000128b4 cmp r0, r6 |
| if (r0 < r6) {
0x000128b8 ldrhs r0, [r4, 8] | r0 = *((r4 + 8));
| }
| if (r0 < r6) {
0x000128bc movhs r3, 0 | r3 = 0;
| }
| if (r0 < r6) {
0x000128c0 addhs r0, r0, r8 | r0 += r8;
| }
| if (r0 < r6) {
0x000128c4 strbhs r3, [r0, 2] | *((r0 + 2)) = r3;
| }
0x000128c8 b 0x1269c | goto label_0;
| label_7:
0x000128cc ldr r3, [pc, 0x198] | r3 = *(0x12a68);
0x000128d0 mov r2, 0x3e8 | r2 = 0x3e8;
0x000128d4 add r3, pc, r3 | r3 = pc + r3;
0x000128d8 str r2, [r3] | *(r3) = r2;
0x000128dc b 0x126d4 | goto label_1;
| label_8:
0x000128e0 ldr r1, [pc, 0x188] | r1 = "ove_pending_write_from_list";
0x000128e4 mov r0, r4 | r0 = r4;
0x000128e8 add r1, pc, r1 | r1 = pc + r1;
0x000128ec bl 0x2700 | r0 = strcmp (r0, r1);
0x000128f0 cmp r0, 0 |
| if (r0 != 0) {
0x000128f4 beq 0x12910 |
0x000128f8 ldr r1, [pc, 0x174] | r1 = *(0x12a70);
0x000128fc mov r0, r4 | r0 = r4;
0x00012900 add r1, pc, r1 | r1 = pc + r1;
0x00012904 bl 0x2700 | r0 = strcmp (r0, r1);
0x00012908 cmp r0, 0 |
| if (r0 != 0) {
0x0001290c bne 0x12920 | goto label_12;
| }
| }
0x00012910 ldr r3, [pc, 0x160] | r3 = *(0x12a74);
0x00012914 mov r2, 2 | r2 = 2;
0x00012918 add r3, pc, r3 | r3 = pc + r3;
0x0001291c b 0x1272c | goto label_2;
| label_12:
0x00012920 ldr r1, [pc, 0x154] | r1 = "Failed_to_remove_pending_write_from_socket_buffer_list";
0x00012924 mov r0, r4 | r0 = r4;
0x00012928 add r1, pc, r1 | r1 = pc + r1;
0x0001292c bl 0x2700 | r0 = strcmp (r0, r1);
0x00012930 cmp r0, 0 |
| if (r0 != 0) {
0x00012934 beq 0x12950 |
0x00012938 ldr r1, [pc, 0x140] | r1 = *(0x12a7c);
0x0001293c mov r0, r4 | r0 = r4;
0x00012940 add r1, pc, r1 | r1 = pc + r1;
0x00012944 bl 0x2700 | r0 = strcmp (r0, r1);
0x00012948 cmp r0, 0 |
| if (r0 != 0) {
0x0001294c bne 0x12960 | goto label_13;
| }
| }
0x00012950 ldr r3, [pc, 0x12c] | r3 = *(0x12a80);
0x00012954 mov r2, 3 | r2 = 3;
0x00012958 add r3, pc, r3 | r3 = pc + r3;
0x0001295c b 0x1272c | goto label_2;
| label_13:
0x00012960 ldr r1, [pc, 0x120] | r1 = "address";
0x00012964 mov r0, r4 | r0 = r4;
0x00012968 add r1, pc, r1 | r1 = pc + r1;
0x0001296c bl 0x2700 | r0 = strcmp (r0, r1);
0x00012970 cmp r0, 0 |
| if (r0 != 0) {
0x00012974 beq 0x12990 |
0x00012978 ldr r1, [pc, 0x10c] | r1 = *(0x12a88);
0x0001297c mov r0, r4 | r0 = r4;
0x00012980 add r1, pc, r1 | r1 = pc + r1;
0x00012984 bl 0x2700 | r0 = strcmp (r0, r1);
0x00012988 cmp r0, 0 |
| if (r0 != 0) {
0x0001298c bne 0x129a4 | goto label_14;
| }
| }
0x00012990 ldr r3, [pc, 0xf8] | r3 = *(0x12a8c);
0x00012994 mov r2, 4 | r2 = 4;
0x00012998 add r3, pc, r3 | r3 = pc + r3;
| label_4:
0x0001299c str r2, [r3, 0x14] | *((r3 + 0x14)) = r2;
0x000129a0 b 0x12730 | goto label_3;
| label_14:
0x000129a4 ldr r1, [pc, 0xe8] | r1 = *(0x12a90);
0x000129a8 mov r0, r4 | r0 = r4;
0x000129ac add r1, pc, r1 | r1 = pc + r1;
0x000129b0 bl 0x2700 | r0 = strcmp (r0, r1);
0x000129b4 cmp r0, 0 |
| if (r0 == 0) {
0x000129b8 beq 0x129d4 | goto label_15;
| }
0x000129bc ldr r1, [pc, 0xd4] | r1 = *(0x12a94);
0x000129c0 mov r0, r4 | r0 = r4;
0x000129c4 add r1, pc, r1 | r1 = pc + r1;
0x000129c8 bl 0x2700 | r0 = strcmp (r0, r1);
0x000129cc cmp r0, 0 |
| if (r0 != 0) {
0x000129d0 bne 0x12730 | goto label_3;
| }
| label_15:
0x000129d4 ldr r3, [pc, 0xc0] | r3 = *(0x12a98);
0x000129d8 mov r2, 5 | r2 = 5;
0x000129dc add r3, pc, r3 | r3 = pc + r3;
0x000129e0 b 0x1299c | goto label_4;
| label_9:
0x000129e4 ldr r2, [r4, -0xc] | r2 = *((r4 - 0xc));
0x000129e8 mov r1, 0x200 | r1 = 0x200;
0x000129ec str r2, [sp] | *(sp) = r2;
0x000129f0 mov r0, r5 | r0 = r5;
0x000129f4 mov r2, r6 | r2 = r6;
0x000129f8 bl 0x2418 | snprintf (r0, r1, r2, r3);
0x000129fc mov r1, r5 | r1 = r5;
0x00012a00 mov r0, 3 | r0 = 3;
0x00012a04 bl 0x12164 | fcn_00012164 (r0, r1);
0x00012a08 b 0x12770 | 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-mqtt3a.so.1.3.9 @ 0x12cdc */
| #include <stdint.h>
|
; (fcn) fcn.00012cdc () | void fcn_00012cdc (int32_t arg_30h, int32_t arg_34h, int32_t arg_38h, uint32_t arg1, int32_t arg2) {
| char * src;
| int32_t var_4h;
| int32_t var_ch;
| r0 = arg1;
| r1 = arg2;
0x00012cdc push {r0, r1, r2, r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00012ce0 ldr sl, [pc, 0xe4] | sl = "addr__s_with_rc__d";
0x00012ce4 mov r7, r3 | r7 = r3;
0x00012ce8 ldr r3, [sp, 0x30] | r3 = *(arg_30h);
0x00012cec add sl, pc, sl | sl = pc + sl;
0x00012cf0 ldr ip, [sl, 0x1c] | ip = *((sl + 0x1c));
0x00012cf4 str r3, [sp] | *(sp) = r3;
0x00012cf8 ldr r3, [pc, 0xd0] | r3 = "addr__s_with_rc__d";
0x00012cfc cmp ip, 0 |
0x00012d00 add r3, pc, r3 | r3 = pc + r3;
0x00012d04 ldr fp, [sp, 0x34] | fp = *(arg_34h);
0x00012d08 ldr r6, [sp, 0x38] | r6 = *(arg_38h);
| if (ip != 0) {
0x00012d0c beq 0x12dc4 |
0x00012d10 ldr ip, [pc, 0xbc] | ip = "dSocket";
0x00012d14 add ip, pc, ip |
0x00012d18 ldr ip, [ip, 4] | ip = *((ip + 4));
0x00012d1c cmp ip, r0 |
| if (ip > r0) {
0x00012d20 bgt 0x12dc4 | goto label_0;
| }
0x00012d24 mov r5, r0 | r5 = r0;
0x00012d28 add r0, sl, 0x224 | r0 = sl + 0x224;
0x00012d2c mov r8, r2 | r8 = r2;
0x00012d30 mov sb, r1 | sb = r1;
0x00012d34 str r3, [sp, 4] | var_4h = r3;
0x00012d38 bl 0x26f4 | fcn_000026f4 ();
0x00012d3c bl 0x12270 | fcn_00012270 ();
0x00012d40 ldr r3, [sp, 4] | r3 = var_4h;
0x00012d44 ldr r2, [pc, 0x8c] | r2 = "dSocket";
0x00012d48 ldr r3, [r3, r2] | r3 = *((r3 + r2));
0x00012d4c mov r2, 8 | r2 = 8;
0x00012d50 mov r1, r3 | r1 = r3;
0x00012d54 str r3, [sp, 4] | var_4h = r3;
0x00012d58 mov r4, r0 | r4 = r0;
0x00012d5c bl 0x246c | memcpy (r0, r1, r2);
0x00012d60 ldr r3, [sl, 0x14] | r3 = *((sl + 0x14));
0x00012d64 ldr r1, [sp] | r1 = *(sp);
0x00012d68 str r3, [r4, 8] | *((r4 + 8)) = r3;
0x00012d6c str sb, [r4, 0xc] | *((r4 + 0xc)) = sb;
0x00012d70 str r8, [r4, 0x10] | *((r4 + 0x10)) = r8;
0x00012d74 str r7, [r4, 0x14] | *((r4 + 0x14)) = r7;
0x00012d78 add r0, r4, 0x18 | r0 = r4 + 0x18;
0x00012d7c bl 0x2370 | strcpy (r0, r1)
0x00012d80 cmp r6, 0 |
| if (r6 == 0) {
0x00012d84 movne r3, 1 | r3 = 1;
| }
0x00012d88 str fp, [r4, 0x11c] | *((r4 + 0x11c)) = fp;
0x00012d8c mov r0, r5 | r0 = r5;
0x00012d90 str r5, [r4, 0x128] | *((r4 + 0x128)) = r5;
| if (r6 != 0) {
0x00012d94 streq r6, [r4, 0x120] | *((r4 + 0x120)) = r6;
| }
0x00012d98 mov r1, r4 | r1 = r4;
| if (r6 == 0) {
0x00012d9c strne r3, [r4, 0x120] | *((r4 + 0x120)) = r3;
| }
| if (r6 == 0) {
0x00012da0 ldrne r3, [r6] | r3 = *(r6);
| }
| if (r6 == 0) {
0x00012da4 strne r3, [r4, 0x124] | *((r4 + 0x124)) = r3;
| }
0x00012da8 bl 0x12454 | fcn_00012454 (r0, r1);
0x00012dac ldr r0, [pc, 0x28] |
0x00012db0 add r0, pc, r0 | r0 = pc + r0;
0x00012db4 add r0, r0, 0x224 | r0 = 0x12ffc;
0x00012db8 add sp, sp, 0xc |
0x00012dbc pop {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00012dc0 b 0x2814 | void (*0x2814)() ();
| }
| label_0:
0x00012dc4 add sp, sp, 0xc |
0x00012dc8 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/lib/libpaho-mqtt3a.so.1.3.9 @ 0x12de0 */
| #include <stdint.h>
|
; (fcn) fcn.00012de0 () | void fcn_00012de0 (int32_t arg1, int32_t arg2) {
| int32_t var_4h;
| int32_t var_8h;
| r0 = arg1;
| r1 = arg2;
0x00012de0 push {r0, r1, r4, r5, r6, r7, r8, lr} |
0x00012de4 ldr r6, [pc, 0x1d4] | r6 = *(0x12fbc);
0x00012de8 mov r8, r0 | r8 = r0;
0x00012dec ldr r0, [pc, 0x1d0] | r0 = "sent_QoS_0_message";
0x00012df0 mov r7, r1 | r7 = r1;
0x00012df4 mov r4, r2 | r4 = r2;
0x00012df8 mov r5, 0 | r5 = 0;
0x00012dfc mov r2, 3 | r2 = 3;
0x00012e00 mov r1, 0x38 | r1 = 0x38;
0x00012e04 add r0, pc, r0 | r0 = pc + r0;
0x00012e08 str r5, [sp, 4] | var_4h = r5;
0x00012e0c bl 0x1a930 | fcn_0001a930 (r0, r1);
0x00012e10 cmp r7, 1 |
0x00012e14 add r6, pc, r6 | r6 = pc + r6;
| if (r7 == 1) {
0x00012e18 beq 0x12f28 | goto label_1;
| }
0x00012e1c cmp r7, 2 |
| if (r7 == 2) {
0x00012e20 beq 0x12f3c | goto label_2;
| }
0x00012e24 cmp r7, r5 |
| if (r7 == r5) {
0x00012e28 mvnne r3, 1 | r3 = ~1;
| }
| if (r7 != r5) {
0x00012e2c bne 0x12f34 | goto label_3;
| }
0x00012e30 ldr r0, [pc, 0x190] | r0 = *(0x12fc4);
0x00012e34 mov r2, 0x24 | r2 = 0x24;
0x00012e38 mov r1, 0x40 | r1 = 0x40;
0x00012e3c add r0, pc, r0 | r0 = pc + r0;
0x00012e40 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x00012e44 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00012e48 beq 0x12f30 | goto label_4;
| }
0x00012e4c cmp r4, 0 |
| if (r4 != 0) {
0x00012e50 ldreq r4, [pc, 0x174] | r4 = *(0x00012fcc);
| }
| if (r4 != 0) {
0x00012e54 addeq r4, pc, r4 | r4 = pc + r4;
| }
0x00012e58 mov r0, r4 | r0 = r4;
0x00012e5c bl 0x2808 | strlen (r0);
0x00012e60 ldr r7, [pc, 0x168] | r7 = *(0x12fcc);
0x00012e64 mov r1, 0x45 | r1 = 0x45;
0x00012e68 add r7, pc, r7 | r7 = pc + r7;
0x00012e6c add r2, r0, 1 | r2 = r0 + 1;
0x00012e70 mov r0, r7 | r0 = r7;
0x00012e74 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x00012e78 cmp r0, 0 |
0x00012e7c str r0, [r5] | *(r5) = r0;
| if (r0 == 0) {
0x00012e80 bne 0x12ec0 |
0x00012e84 mov r2, r5 | r2 = r5;
0x00012e88 mov r1, 0x47 | r1 = 0x47;
0x00012e8c mov r0, r7 | r0 = r7;
0x00012e90 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x00012e94 mvn r3, 0x62 | r3 = ~0x62;
0x00012e98 str r3, [sp, 4] | var_4h = r3;
| label_0:
0x00012e9c ldr r0, [pc, 0x130] | r0 = *(0x12fd0);
0x00012ea0 mov r3, 3 | r3 = 3;
0x00012ea4 add r2, sp, 4 | r2 += var_4h;
0x00012ea8 mov r1, 0x68 | r1 = 0x68;
0x00012eac add r0, pc, r0 | r0 = pc + r0;
0x00012eb0 bl 0x1aa18 | fcn_0001aa18 (r0, r1);
0x00012eb4 ldr r0, [sp, 4] | r0 = var_4h;
0x00012eb8 add sp, sp, 8 |
0x00012ebc pop {r4, r5, r6, r7, r8, pc} |
| }
0x00012ec0 mov r1, r4 | r1 = r4;
0x00012ec4 bl 0x2370 | strcpy (r0, r1)
0x00012ec8 ldr r3, [pc, 0x108] | r3 = *(0x12fd4);
0x00012ecc ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012ed0 str r3, [r5, 4] | *((r5 + 4)) = r3;
0x00012ed4 ldr r3, [pc, 0x100] | r3 = *(0x12fd8);
0x00012ed8 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012edc str r3, [r5, 8] | *((r5 + 8)) = r3;
0x00012ee0 ldr r3, [pc, 0xf8] | r3 = *(0x12fdc);
0x00012ee4 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012ee8 str r3, [r5, 0xc] | *((r5 + 0xc)) = r3;
0x00012eec ldr r3, [pc, 0xf0] | r3 = *(0x12fe0);
0x00012ef0 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012ef4 str r3, [r5, 0x10] | *((r5 + 0x10)) = r3;
0x00012ef8 ldr r3, [pc, 0xe8] | r3 = *(0x12fe4);
0x00012efc ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012f00 str r3, [r5, 0x14] | *((r5 + 0x14)) = r3;
0x00012f04 ldr r3, [pc, 0xe0] | r3 = *(0x12fe8);
0x00012f08 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012f0c str r3, [r5, 0x18] | *((r5 + 0x18)) = r3;
0x00012f10 ldr r3, [pc, 0xd8] | r3 = *(0x12fec);
0x00012f14 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012f18 str r3, [r5, 0x1c] | *((r5 + 0x1c)) = r3;
0x00012f1c ldr r3, [pc, 0xd0] | r3 = *(0x12ff0);
0x00012f20 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00012f24 str r3, [r5, 0x20] | *((r5 + 0x20)) = r3;
| do {
| label_1:
0x00012f28 mov r4, r5 | r4 = r5;
0x00012f2c b 0x12fb8 | goto label_5;
| label_4:
0x00012f30 mvn r3, 0x62 | r3 = ~0x62;
| label_3:
0x00012f34 str r3, [sp, 4] | var_4h = r3;
0x00012f38 b 0x12f28 |
| } while (1);
| label_2:
0x00012f3c cmp r4, 0 |
| if (r4 != 0) {
0x00012f40 beq 0x12fb0 |
0x00012f44 ldr r3, [r4] | r3 = *(r4);
0x00012f48 cmp r3, 0 |
| if (r3 == 0) {
0x00012f4c beq 0x12fb0 | goto label_6;
| }
0x00012f50 ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x00012f54 cmp r3, 0 |
| if (r3 == 0) {
0x00012f58 beq 0x12fb0 | goto label_6;
| }
0x00012f5c ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00012f60 cmp r3, 0 |
| if (r3 == 0) {
0x00012f64 beq 0x12fb0 | goto label_6;
| }
0x00012f68 ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x00012f6c cmp r3, 0 |
| if (r3 == 0) {
0x00012f70 beq 0x12fb0 | goto label_6;
| }
0x00012f74 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00012f78 cmp r3, 0 |
| if (r3 == 0) {
0x00012f7c beq 0x12fb0 | goto label_6;
| }
0x00012f80 ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x00012f84 cmp r3, 0 |
| if (r3 == 0) {
0x00012f88 beq 0x12fb0 | goto label_6;
| }
0x00012f8c ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00012f90 cmp r3, 0 |
| if (r3 == 0) {
0x00012f94 beq 0x12fb0 | goto label_6;
| }
0x00012f98 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00012f9c cmp r3, 0 |
| if (r3 == 0) {
0x00012fa0 beq 0x12fb0 | goto label_6;
| }
0x00012fa4 ldr r3, [r4, 0x14] | r3 = *((r4 + 0x14));
0x00012fa8 cmp r3, 0 |
| if (r3 != 0) {
0x00012fac bne 0x12fb8 | goto label_5;
| }
| }
| label_6:
0x00012fb0 mvn r3, 1 | r3 = ~1;
0x00012fb4 str r3, [sp, 4] | var_4h = r3;
| label_5:
0x00012fb8 str r4, [r8] | *(r8) = r4;
0x00012fbc b 0x12e9c | 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-mqtt3a.so.1.3.9 @ 0x14560 */
| #include <stdint.h>
|
; (fcn) fcn.00014560 () | void fcn_00014560 (int32_t arg_16ch, int32_t arg_190h, int32_t arg1) {
| int32_t var_bp_0h;
| int32_t var_0h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_24h;
| int32_t var_28h;
| int32_t var_2ch;
| int32_t var_30h;
| char * src;
| int32_t var_38h;
| int32_t var_3ch;
| r0 = arg1;
0x00014560 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00014564 mov r5, r0 | r5 = r0;
0x00014568 ldr r0, [pc, 0x4f0] |
0x0001456c mov r3, 0 | r3 = 0;
0x00014570 add r0, pc, r0 | r0 = pc + r0;
0x00014574 add r0, r0, 0x148 | r0 = 0x14ba4;
0x00014578 sub sp, sp, 0x3c |
0x0001457c mov r2, 3 | r2 = 3;
0x00014580 mov r1, 0x360 | r1 = 0x360;
0x00014584 add r0, r0, 2 | r0 += 2;
0x00014588 str r3, [sp, 0x20] | var_20h = r3;
0x0001458c bl 0x1a930 | fcn_0001a930 (r0, r1);
0x00014590 ldr r3, [r5, 0x74] | r3 = *((r5 + 0x74));
0x00014594 cmp r3, 0 |
0x00014598 bne 0x145ec |
| while (r0 != 0) {
0x0001459c mov r7, 0 | r7 = 0;
| label_1:
0x000145a0 ldr r3, [r5] | r3 = *(r5);
0x000145a4 ldr r2, [pc, 0x4b8] | r2 = *(0x14a60);
0x000145a8 str r3, [sp] | *(sp) = r3;
0x000145ac add r2, pc, r2 | r2 = pc + r2;
0x000145b0 mov r3, r7 | r3 = r7;
0x000145b4 mvn r1, 0 | r1 = ~0;
0x000145b8 mov r0, 3 | r0 = 3;
0x000145bc bl 0x12bc4 | fcn_00012bc4 (r0, r1, r2, r3);
0x000145c0 ldr r0, [pc, 0x4a0] |
0x000145c4 mov r3, 3 | r3 = 3;
0x000145c8 add r0, pc, r0 | r0 = pc + r0;
0x000145cc add r0, r0, 0x148 | r0 = 0x14bac;
0x000145d0 add r2, sp, 0x20 | r2 += var_20h;
0x000145d4 mov r1, 0x388 | r1 = 0x388;
0x000145d8 add r0, r0, 2 | r0 += 2;
0x000145dc bl 0x1aa18 | fcn_0001aa18 (r0, r1);
0x000145e0 ldr r0, [sp, 0x20] | r0 = var_20h;
0x000145e4 add sp, sp, 0x3c |
0x000145e8 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x000145ec ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x000145f0 add r2, sp, 0x28 | r2 += var_28h;
0x000145f4 add r1, sp, 0x24 | r1 += var_24h;
0x000145f8 ldr r0, [r5, 0x70] | r0 = *((r5 + 0x70));
0x000145fc blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00014600 cmp r0, 0 |
0x00014604 mov r7, r0 | r7 = r0;
0x00014608 str r0, [sp, 0x20] | var_20h = r0;
0x0001460c bne 0x1459c |
| }
0x00014610 ldr r3, [pc, 0x454] |
0x00014614 mov r8, r0 | r8 = r0;
0x00014618 add r3, pc, r3 | r3 = pc + r3;
0x0001461c add r3, r3, 0x16c | r3 = 0x14bd4;
0x00014620 add r3, r3, 2 | r3 += 2;
0x00014624 str r3, [sp, 0xc] | var_ch = r3;
0x00014628 b 0x14848 | goto label_4;
| label_0:
0x0001462c str r3, [sp, 0x2c] | var_2ch = r3;
0x00014630 ldr r1, [pc, 0x438] | r1 = *(0x14a6c);
0x00014634 ldr r4, [r2, r8, lsl 2] | offset_0 = r8 << 2;
| r4 = *((r2 + offset_0));
0x00014638 add r1, pc, r1 | r1 = pc + r1;
0x0001463c mov r2, 2 | r2 = 2;
0x00014640 mov r0, r4 | r0 = r4;
0x00014644 bl 0x25e0 | strncmp (r0, r1, r2);
0x00014648 lsl sb, r8, 2 | sb = r8 << 2;
0x0001464c cmp r0, 0 |
| if (r0 != 0) {
0x00014650 beq 0x14670 |
0x00014654 ldr r1, [pc, 0x418] | r1 = *(0x14a70);
0x00014658 mov r2, 3 | r2 = 3;
0x0001465c add r1, pc, r1 | r1 = pc + r1;
0x00014660 mov r0, r4 | r0 = r4;
0x00014664 bl 0x25e0 | r0 = strncmp (r0, r1, r2);
0x00014668 cmp r0, 0 |
| if (r0 != 0) {
0x0001466c bne 0x14824 | goto label_5;
| }
| }
0x00014670 ldr r3, [r5, 0x74] | r3 = *((r5 + 0x74));
0x00014674 add sl, sp, 0x30 | sl += var_30h;
0x00014678 add r6, sp, 0x2c | r6 += var_2ch;
0x0001467c ldr fp, [r3, 0x10] | fp = *((r3 + 0x10));
0x00014680 mov r2, r6 | r2 = r6;
0x00014684 mov r3, sl | r3 = sl;
0x00014688 mov r1, r4 | r1 = r4;
0x0001468c ldr r0, [r5, 0x70] | r0 = *((r5 + 0x70));
0x00014690 blx fp | r0 = fp (r0, r1, r2, r3);
0x00014694 cmp r0, 0 |
0x00014698 str r0, [sp, 0x20] | var_20h = r0;
| if (r0 != 0) {
0x0001469c bne 0x14824 | goto label_5;
| }
0x000146a0 ldr r3, [r5, 0x7c] | r3 = *((r5 + 0x7c));
0x000146a4 cmp r3, 0 |
0x000146a8 bne 0x14808 |
| while (r0 == 0) {
0x000146ac ldr r3, [sp, 0x24] | r3 = var_24h;
0x000146b0 ldr r1, [pc, 0x3c0] | r1 = *(0x14a74);
0x000146b4 ldr r0, [r3, sb] | r0 = *((r3 + sb));
0x000146b8 mov r2, 3 | r2 = 3;
0x000146bc add r1, pc, r1 | r1 = pc + r1;
0x000146c0 bl 0x25e0 | strncmp (r0, r1, r2);
0x000146c4 ldr r6, [pc, 0x3b0] | r6 = *(0x14a78);
0x000146c8 mov r2, 3 | r2 = 3;
0x000146cc ldr r1, [pc, 0x3ac] | r1 = *(0x14a7c);
0x000146d0 add r6, pc, r6 | r6 = pc + r6;
0x000146d4 cmp r0, 0 |
| if (r0 != 0) {
0x000146d8 moveq r3, 5 | r3 = 5;
| }
| if (r0 == 0) {
0x000146dc movne r3, 4 | r3 = 4;
| }
0x000146e0 str r3, [sp, 0x14] | var_14h = r3;
0x000146e4 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x000146e8 ldr r0, [sp, 0xc] | r0 = var_ch;
0x000146ec str r3, [sp, 0x10] | var_10h = r3;
0x000146f0 ldr r3, [sp, 0x30] | r3 = var_30h;
0x000146f4 str r3, [sp, 0x18] | var_18h = r3;
0x000146f8 ldr r3, [sp, 0x10] | r3 = var_10h;
0x000146fc str r3, [sp, 0x34] | src = r3;
0x00014700 bl 0x1a930 | fcn_0001a930 (r0, r1);
0x00014704 mov r2, 0x10 | r2 = 0x10;
0x00014708 ldr r1, [pc, 0x374] | r1 = *(0x14a80);
0x0001470c mov r0, r6 | r0 = r6;
0x00014710 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x00014714 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x00014718 bne 0x14880 | goto label_6;
| }
| label_2:
0x0001471c ldr fp, [pc, 0x364] | fp = *(0x14a84);
0x00014720 mov r3, 3 | r3 = 3;
0x00014724 add fp, pc, fp |
0x00014728 add r0, fp, 0x16c | r0 += arg_16ch;
0x0001472c mov r2, 0 | r2 = 0;
0x00014730 ldr r1, [pc, 0x354] | r1 = *(0x14a88);
0x00014734 add r0, r0, 2 | r0 += 2;
0x00014738 bl 0x1aa18 | fcn_0001aa18 (r0, r1);
0x0001473c cmp r4, 0 |
| if (r4 == 0) {
0x00014740 beq 0x14824 | goto label_5;
| }
0x00014744 ldr r3, [sp, 0x24] | r3 = var_24h;
0x00014748 mov r1, 0x2d | r1 = 0x2d;
0x0001474c ldr r0, [r3, sb] | r0 = *((r3 + sb));
0x00014750 bl 0x2820 | strchr (r0, r1);
0x00014754 mov r6, 0 | r6 = 0;
0x00014758 add sl, sp, 0x38 | sl += var_38h;
0x0001475c add r0, r0, 1 | r0++;
0x00014760 bl 0x27e4 | atoi (r0);
0x00014764 ldr r3, [r5, 0x68] | r3 = *((r5 + 0x68));
0x00014768 mov r2, 3 | r2 = 3;
0x0001476c mov r1, 0x348 | r1 = 0x348;
0x00014770 str r3, [sp, 0x10] | var_10h = r3;
0x00014774 str r0, [r4, 0xc] | *((r4 + 0xc)) = r0;
0x00014778 add r0, fp, 0x190 | r0 += arg_190h;
0x0001477c str r6, [sl, -4]! | *((sl -= 4)) = r6;
0x00014780 bl 0x1a930 | fcn_0001a930 (r0, r1);
| label_3:
0x00014784 mov r1, sl | r1 = sl;
0x00014788 ldr r0, [sp, 0x10] | r0 = var_10h;
0x0001478c bl 0x17774 | fcn_00017774 (r0, r1);
0x00014790 clz fp, r6 |
0x00014794 lsr fp, fp, 5 |
0x00014798 cmp r0, 0 |
| if (r0 != 0) {
0x0001479c moveq fp, 0 |
| }
0x000147a0 cmp fp, 0 |
| if (fp != 0) {
0x000147a4 bne 0x14a44 | goto label_7;
| }
0x000147a8 mov r3, r6 | r3 = r6;
0x000147ac mov r2, 0x10 | r2 = 0x10;
0x000147b0 mov r1, r4 | r1 = r4;
0x000147b4 ldr r0, [sp, 0x10] | r0 = var_10h;
0x000147b8 bl 0x174bc | fcn_000174bc (r0, r1);
0x000147bc ldr r0, [pc, 0x2cc] |
0x000147c0 mov r3, 3 | r3 = 3;
0x000147c4 add r0, pc, r0 | r0 = pc + r0;
0x000147c8 mov r2, fp | r2 = fp;
0x000147cc ldr r1, [pc, 0x2c0] | r1 = *(0x14a90);
0x000147d0 add r0, r0, 0x190 | r0 = 0x14c1c;
0x000147d4 bl 0x1aa18 | fcn_0001aa18 (r0, r1);
0x000147d8 ldr r0, [pc, 0x2b8] | r0 = *(0x14a94);
0x000147dc ldr r2, [sp, 0x2c] | r2 = var_2ch;
0x000147e0 ldr r1, [pc, 0x2b4] | r1 = *(0x14a98);
0x000147e4 add r0, pc, r0 | r0 = pc + r0;
0x000147e8 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x000147ec ldr r2, [r5, 0x6c] | r2 = *((r5 + 0x6c));
0x000147f0 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x000147f4 add r7, r7, 1 | r7++;
0x000147f8 cmp r2, r3 |
| if (r2 < r3) {
0x000147fc strhs r2, [r5, 0x6c] | *((r5 + 0x6c)) = r2;
| }
| if (r2 >= r3) {
0x00014800 strlo r3, [r5, 0x6c] | *((r5 + 0x6c)) = r3;
| }
0x00014804 b 0x14824 | goto label_5;
0x00014808 mov r2, sl | r2 = sl;
0x0001480c mov r1, r6 | r1 = r6;
0x00014810 ldr r0, [r5, 0x84] | r0 = *((r5 + 0x84));
0x00014814 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x00014818 cmp r0, 0 |
0x0001481c str r0, [sp, 0x20] | var_20h = r0;
0x00014820 beq 0x146ac |
| }
| label_5:
0x00014824 ldr r3, [sp, 0x24] | r3 = var_24h;
0x00014828 ldr r2, [r3, sb] | r2 = *((r3 + sb));
0x0001482c cmp r2, 0 |
| if (r2 != 0) {
0x00014830 beq 0x14844 |
0x00014834 ldr r0, [pc, 0x264] | r0 = *(0x14a9c);
0x00014838 mov r1, 0x380 | r1 = 0x380;
0x0001483c add r0, pc, r0 | r0 = pc + r0;
0x00014840 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
| }
0x00014844 add r8, r8, 1 | r8++;
| label_4:
0x00014848 ldr r3, [sp, 0x20] | r3 = var_20h;
0x0001484c ldr r2, [sp, 0x24] | r2 = var_24h;
0x00014850 cmp r3, 0 |
| if (r3 != 0) {
0x00014854 bne 0x14864 | goto label_8;
| }
0x00014858 ldr r1, [sp, 0x28] | r1 = var_28h;
0x0001485c cmp r1, r8 |
| if (r1 > r8) {
0x00014860 bgt 0x1462c | goto label_0;
| }
| label_8:
0x00014864 cmp r2, 0 |
| if (r2 == 0) {
0x00014868 beq 0x145a0 | goto label_1;
| }
0x0001486c ldr r0, [pc, 0x230] | r0 = *(0x14aa0);
0x00014870 ldr r1, [pc, 0x230] | r1 = *(0x14aa4);
0x00014874 add r0, pc, r0 | r0 = pc + r0;
0x00014878 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x0001487c b 0x145a0 | goto label_1;
| label_6:
0x00014880 mov r2, 0x10 | r2 = 0x10;
0x00014884 mov r1, 0 | r1 = 0;
0x00014888 bl 0x2688 | memset (r0, r1, r2);
0x0001488c mov r2, 0x30 | r2 = 0x30;
0x00014890 ldr r1, [pc, 0x214] | r1 = *(0x14aa8);
0x00014894 mov r0, r6 | r0 = r6;
0x00014898 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x0001489c cmp r0, 0 |
0x000148a0 mov sl, r0 | sl = r0;
0x000148a4 str r0, [r4] | *(r4) = r0;
| if (r0 == 0) {
0x000148a8 bne 0x148c4 |
0x000148ac mov r2, r4 | r2 = r4;
0x000148b0 mov r1, 0x308 | r1 = 0x308;
0x000148b4 mov r0, r6 | r0 = r6;
0x000148b8 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x000148bc mov r4, sl | r4 = sl;
0x000148c0 b 0x1471c | goto label_2;
| }
0x000148c4 mov r2, 0x30 | r2 = 0x30;
0x000148c8 mov r1, 0 | r1 = 0;
0x000148cc bl 0x2688 | memset (r0, r1, r2);
0x000148d0 ldr r3, [r4] | r3 = *(r4);
0x000148d4 mov r2, 1 | r2 = 1;
0x000148d8 str r2, [r3, 4] | *((r3 + 4)) = r2;
0x000148dc ldr r2, [sp, 0x34] | r2 = src;
0x000148e0 mov r1, 0x314 | r1 = 0x314;
0x000148e4 ldr sl, [r2], 4 | sl = *(r2);
| r2 += 4;
0x000148e8 mov r0, r6 | r0 = r6;
0x000148ec str sl, [r3, 8] | *((r3 + 8)) = sl;
0x000148f0 str r2, [sp, 0x34] | src = r2;
0x000148f4 mov r2, sl | r2 = sl;
0x000148f8 str r3, [sp, 0x1c] | var_1ch = r3;
0x000148fc bl 0x1b000 | fcn_0001b000 (r0, r1);
0x00014900 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00014904 cmp r0, 0 |
0x00014908 mov fp, r0 |
0x0001490c str r0, [r3, 0xc] | *((r3 + 0xc)) = r0;
| if (r0 != 0) {
0x00014910 bne 0x1493c | goto label_9;
| }
0x00014914 ldr r2, [r4] | r2 = *(r4);
0x00014918 ldr r1, [pc, 0x190] | r1 = *(0x14aac);
0x0001491c mov r0, r6 | r0 = r6;
0x00014920 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x00014924 ldr r1, [pc, 0x188] | r1 = *(0x14ab0);
0x00014928 mov r2, r4 | r2 = r4;
| do {
0x0001492c mov r0, r6 | r0 = r6;
0x00014930 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x00014934 mov r4, fp | r4 = fp;
0x00014938 b 0x1471c | goto label_2;
| label_9:
0x0001493c ldr r3, [r4] | r3 = *(r4);
0x00014940 mov r2, sl | r2 = sl;
0x00014944 ldr r1, [sp, 0x34] | r1 = src;
0x00014948 ldr r0, [r3, 0xc] | r0 = *((r3 + 0xc));
0x0001494c bl 0x246c | memcpy (r0, r1, r2);
0x00014950 ldr r2, [sp, 0x34] | r2 = src;
0x00014954 ldr r3, [r4] | r3 = *(r4);
0x00014958 add r0, r2, sl | r0 = r2 + sl;
0x0001495c ldr r2, [r2, sl] | r2 = *((r2 + sl));
0x00014960 add r0, r0, 0x10 | r0 += 0x10;
0x00014964 str r2, [r3, 0x10] | *((r3 + 0x10)) = r2;
0x00014968 ldr r2, [r0, -0xc] | r2 = *((r0 - 0xc));
0x0001496c str r2, [r3, 0x14] | *((r3 + 0x14)) = r2;
0x00014970 ldr r2, [r0, -8] | r2 = *((r0 - 8));
0x00014974 str r2, [r3, 0x18] | *((r3 + 0x18)) = r2;
0x00014978 ldr r2, [r0, -4] | r2 = *((r0 - 4));
0x0001497c str r2, [r3, 0x1c] | *((r3 + 0x1c)) = r2;
0x00014980 str r0, [sp, 0x34] | src = r0;
0x00014984 bl 0x2808 | strlen (r0);
0x00014988 ldr r1, [pc, 0x128] | r1 = *(0x14ab4);
0x0001498c add sl, r0, 1 | sl = r0 + 1;
0x00014990 mov r2, sl | r2 = sl;
0x00014994 mov r0, r6 | r0 = r6;
0x00014998 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x0001499c cmp r0, 0 |
0x000149a0 mov fp, r0 |
0x000149a4 str r0, [r4, 4] | *((r4 + 4)) = r0;
| if (r0 != 0) {
0x000149a8 bne 0x149dc | goto label_10;
| }
0x000149ac ldr r3, [r4] | r3 = *(r4);
0x000149b0 ldr r1, [pc, 0x104] | r1 = *(0x14ab8);
0x000149b4 ldr r2, [r3, 0xc] | r2 = *((r3 + 0xc));
0x000149b8 mov r0, r6 | r0 = r6;
0x000149bc bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x000149c0 ldr r2, [r4] | r2 = *(r4);
0x000149c4 ldr r1, [pc, 0xf4] | r1 = *(0x14abc);
0x000149c8 mov r0, r6 | r0 = r6;
0x000149cc bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x000149d0 mov r2, r4 | r2 = r4;
0x000149d4 ldr r1, [pc, 0xe8] | r1 = *(0x14ac0);
0x000149d8 b 0x1492c |
| } while (1);
| label_10:
0x000149dc ldr r1, [sp, 0x34] | r1 = src;
0x000149e0 bl 0x2370 | strcpy (r0, r1)
0x000149e4 ldr r2, [sp, 0x34] | r2 = src;
0x000149e8 add r3, r2, sl | r3 = r2 + sl;
0x000149ec ldr r2, [r2, sl] | r2 = *((r2 + sl));
0x000149f0 add r3, r3, 4 | r3 += 4;
0x000149f4 str r2, [r4, 8] | *((r4 + 8)) = r2;
0x000149f8 str r3, [sp, 0x34] | src = r3;
0x000149fc ldr r3, [sp, 0x14] | r3 = var_14h;
0x00014a00 cmp r3, 5 |
| if (r3 != 5) {
0x00014a04 bne 0x1471c | goto label_2;
| }
0x00014a08 ldr r0, [r4] | r0 = *(r4);
0x00014a0c ldr r3, [sp, 0x10] | r3 = var_10h;
0x00014a10 ldr r2, [sp, 0x18] | r2 = var_18h;
0x00014a14 add r1, sp, 0x34 | r1 += src;
0x00014a18 add r2, r3, r2 | r2 = r3 + r2;
0x00014a1c add r0, r0, 0x20 | r0 += 0x20;
0x00014a20 bl 0x17fd4 | r0 = fcn_00017fd4 (r0, r1);
0x00014a24 cmp r0, 1 |
| if (r0 == 1) {
0x00014a28 beq 0x1471c | goto label_2;
| }
0x00014a2c ldr r2, [pc, 0x94] | r2 = *(0x14ac4);
0x00014a30 mvn r1, 0 | r1 = ~0;
0x00014a34 add r2, pc, r2 | r2 = pc + r2;
0x00014a38 ldr r0, [sp, 0x14] | r0 = var_14h;
0x00014a3c bl 0x12bc4 | fcn_00012bc4 (r0, r1, r2, r3);
0x00014a40 b 0x1471c | goto label_2;
| label_7:
0x00014a44 ldr r6, [sp, 0x34] | r6 = src;
0x00014a48 ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x00014a4c ldr r3, [r6, 8] | r3 = *((r6 + 8));
0x00014a50 ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
0x00014a54 cmp r2, r3 |
| if (r2 < r3) {
0x00014a58 movhs r6, 0 | r6 = 0;
| }
0x00014a5c b 0x14784 | 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-mqtt3a.so.1.3.9 @ 0x161f8 */
| #include <stdint.h>
|
; (fcn) fcn.000161f8 () | void fcn_000161f8 (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;
0x000161f8 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000161fc mov r7, r0 | r7 = r0;
0x00016200 ldr r0, [pc, 0x19c] |
0x00016204 sub sp, sp, 0x7c |
0x00016208 add r0, pc, r0 | r0 = pc + r0;
0x0001620c mvn r3, 1 | r3 = ~1;
0x00016210 mov r2, 3 | r2 = 3;
0x00016214 add r0, r0, 0x32 | r0 = 0x163d2;
0x00016218 mov sl, r1 | sl = r1;
0x0001621c mov r1, 0x1ec | r1 = 0x1ec;
0x00016220 str r3, [sp, 0xc] | var_ch = r3;
0x00016224 bl 0x1a930 | fcn_0001a930 (r0, r1);
0x00016228 mov r0, r7 | r0 = r7;
0x0001622c bl 0x26e8 | r0 = opendir ();
0x00016230 subs sb, r0, 0 | sb = r0 - 0;
| if (sb == r0) {
0x00016234 beq 0x162ac | goto label_3;
| }
0x00016238 ldr r6, [pc, 0x168] | r6 = *(0x163a4);
0x0001623c add r6, pc, r6 | r6 = pc + r6;
| label_2:
0x00016240 ldr fp, [pc, 0x164] | fp = *(0x163a8);
0x00016244 add fp, pc, fp |
| label_0:
0x00016248 mov r0, sb | r0 = sb;
0x0001624c bl 0x261c | r0 = readdir64 ();
0x00016250 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00016254 beq 0x162a4 | goto label_4;
| }
0x00016258 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0001625c cmp r3, 0 |
| if (r3 == 0) {
0x00016260 beq 0x162a4 | goto label_4;
| }
0x00016264 mov r0, r7 | r0 = r7;
0x00016268 bl 0x2808 | strlen (r0);
0x0001626c add r5, r5, 0x13 | r5 += 0x13;
0x00016270 mov r4, r0 | r4 = r0;
0x00016274 mov r0, r5 | r0 = r5;
0x00016278 bl 0x2808 | strlen (r0);
0x0001627c ldr r1, [pc, 0x12c] | r1 = *(0x163ac);
0x00016280 add r4, r4, r0 | r4 += r0;
0x00016284 add r4, r4, 2 | r4 += 2;
0x00016288 mov r2, r4 | r2 = r4;
0x0001628c mov r0, r6 | r0 = r6;
0x00016290 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x00016294 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x00016298 bne 0x162d4 | goto label_5;
| }
| label_1:
0x0001629c mvn r3, 0x62 | r3 = ~0x62;
| do {
0x000162a0 str r3, [sp, 0xc] | var_ch = r3;
| label_4:
0x000162a4 mov r0, sb | r0 = sb;
0x000162a8 bl 0x282c | closedir ();
| label_3:
0x000162ac ldr r0, [pc, 0x100] |
0x000162b0 mov r3, 3 | r3 = 3;
0x000162b4 add r0, pc, r0 | r0 = pc + r0;
0x000162b8 add r2, sp, 0xc | r2 += var_ch;
0x000162bc ldr r1, [pc, 0xf4] | r1 = *(0x163b4);
0x000162c0 add r0, r0, 0x32 | r0 = 0x163e2;
0x000162c4 bl 0x1aa18 | fcn_0001aa18 (r0, r1);
0x000162c8 ldr r0, [sp, 0xc] | r0 = var_ch;
0x000162cc add sp, sp, 0x7c |
0x000162d0 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x000162d4 str r5, [sp] | *(sp) = r5;
0x000162d8 mov r3, r7 | r3 = r7;
0x000162dc mov r2, fp | r2 = fp;
0x000162e0 mov r1, r4 | r1 = r4;
0x000162e4 bl 0x2418 | r0 = snprintf (r0, r1, r2, r3);
0x000162e8 cmp r0, r4 |
| if (r0 <= r4) {
0x000162ec blo 0x16308 | goto label_6;
| }
0x000162f0 mov r2, r8 | r2 = r8;
0x000162f4 ldr r1, [pc, 0xc0] | r1 = *(0x163b8);
0x000162f8 mov r0, r6 | r0 = r6;
0x000162fc bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x00016300 mvn r3, 1 | r3 = ~1;
0x00016304 b 0x162a0 |
| } while (1);
| label_6:
0x00016308 add r1, sp, 0x10 | r1 += var_10h;
0x0001630c mov r0, r8 | r0 = r8;
0x00016310 bl 0x2640 | lstat64 ();
0x00016314 mov r2, r8 | r2 = r8;
0x00016318 mov r1, 0x200 | r1 = 0x200;
0x0001631c mov r0, r6 | r0 = r6;
0x00016320 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x00016324 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00016328 and r3, r3, 0xf000 | r3 &= 0xf000;
0x0001632c cmp r3, 0x8000 |
| if (r3 != 0x8000) {
0x00016330 bne 0x16248 | goto label_0;
| }
0x00016334 mov r0, r5 | r0 = r5;
0x00016338 bl 0x2808 | strlen (r0);
0x0001633c ldr r1, [pc, 0x7c] | r1 = *(0x163bc);
0x00016340 add r2, r0, 1 | r2 = r0 + 1;
0x00016344 mov r0, r6 | r0 = r6;
0x00016348 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x0001634c subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x00016350 beq 0x1629c | goto label_1;
| }
0x00016354 mov r1, r5 | r1 = r5;
0x00016358 bl 0x2370 | strcpy (r0, r1)
0x0001635c ldr r1, [pc, 0x60] | r1 = *(0x163c0);
0x00016360 mov r0, r4 | r0 = r4;
0x00016364 add r1, pc, r1 | r1 = pc + r1;
0x00016368 bl 0x25bc | strstr (r0, r1);
0x0001636c mov r1, sl | r1 = sl;
0x00016370 cmp r0, 0 |
| if (r0 == 0) {
0x00016374 movne r3, 0 | r3 = 0;
| }
| if (r0 == 0) {
0x00016378 strbne r3, [r0] | *(r0) = r3;
| }
0x0001637c mov r0, r4 | r0 = r4;
0x00016380 bl 0x2700 | strcmp (r0, r1);
0x00016384 mov r2, r4 | r2 = r4;
0x00016388 ldr r1, [pc, 0x38] | r1 = *(0x163c4);
0x0001638c cmp r0, 0 |
| if (r0 != 0) {
0x00016390 streq r0, [sp, 0xc] | var_ch = r0;
| }
0x00016394 ldr r0, [pc, 0x30] | r0 = *(0x163c8);
0x00016398 add r0, pc, r0 | r0 = pc + r0;
0x0001639c bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x000163a0 b 0x16240 | 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-mqtt3a.so.1.3.9 @ 0x165bc */
| #include <stdint.h>
|
; (fcn) fcn.000165bc () | void fcn_000165bc (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;
0x000165bc push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000165c0 mov sl, r0 | sl = r0;
0x000165c4 ldr r0, [pc, 0x314] |
0x000165c8 sub sp, sp, 0x8c |
0x000165cc add r0, pc, r0 | r0 = pc + r0;
0x000165d0 str r1, [sp, 0xc] | var_ch = r1;
0x000165d4 str r2, [sp, 0x10] | var_10h = r2;
0x000165d8 ldr r1, [pc, 0x304] | r1 = *(0x168e0);
0x000165dc mov r2, 3 | r2 = 3;
0x000165e0 add r0, r0, 0x64 | r0 = 0x16940;
0x000165e4 mov r4, 0 | r4 = 0;
0x000165e8 str r4, [sp, 0x1c] | var_1ch = r4;
0x000165ec bl 0x1a930 | fcn_0001a930 (r0, r1);
0x000165f0 mov r0, sl | r0 = sl;
0x000165f4 bl 0x26e8 | r0 = opendir ();
0x000165f8 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x000165fc bne 0x1673c | goto label_10;
| }
| label_4:
0x00016600 mvn r3, 1 | r3 = ~1;
| label_2:
0x00016604 str r3, [sp, 0x1c] | var_1ch = r3;
| do {
| label_8:
0x00016608 ldr r0, [pc, 0x2d8] |
0x0001660c mov r3, 3 | r3 = 3;
0x00016610 add r0, pc, r0 | r0 = pc + r0;
0x00016614 add r2, sp, 0x1c | r2 += var_1ch;
0x00016618 mov r1, 0x370 | r1 = 0x370;
0x0001661c add r0, r0, 0x64 | r0 = 0x16948;
0x00016620 bl 0x1aa18 | fcn_0001aa18 (r0, r1);
0x00016624 ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x00016628 add sp, sp, 0x8c |
0x0001662c pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_1:
0x00016630 mov r0, sl | r0 = sl;
0x00016634 bl 0x2808 | strlen (r0);
0x00016638 add r3, r7, 0x13 | r3 = r7 + 0x13;
0x0001663c str r3, [sp, 8] | var_8h = r3;
0x00016640 mov r6, r0 | r6 = r0;
0x00016644 mov r0, r3 | r0 = r3;
0x00016648 bl 0x2808 | strlen (r0);
0x0001664c mov r1, sb | r1 = sb;
0x00016650 add r6, r6, r0 | r6 += r0;
0x00016654 add r6, r6, 2 | r6 += 2;
0x00016658 mov r2, r6 | r2 = r6;
0x0001665c mov r0, r8 | r0 = r8;
0x00016660 bl 0x1b000 | fcn_0001b000 (r0, r1);
0x00016664 ldr r3, [sp, 8] | r3 = var_8h;
0x00016668 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x0001666c bne 0x16684 | goto label_11;
| }
| label_5:
0x00016670 mvn r3, 0x62 | r3 = ~0x62;
| label_0:
0x00016674 str r3, [sp, 0x1c] | var_1ch = r3;
| label_9:
0x00016678 mov r0, r5 | r0 = r5;
0x0001667c bl 0x282c | closedir ();
0x00016680 b 0x16608 |
| } while (1);
| label_11:
0x00016684 str r3, [sp] | *(sp) = r3;
0x00016688 mov r2, fp | r2 = fp;
0x0001668c mov r3, sl | r3 = sl;
0x00016690 mov r1, r6 | r1 = r6;
0x00016694 bl 0x2418 | r0 = snprintf (r0, r1, r2, r3);
0x00016698 cmp r0, r6 |
| if (r0 > r6) {
0x0001669c blo 0x166b8 |
0x000166a0 ldr r1, [pc, 0x244] | r1 = *(0x168e8);
0x000166a4 mov r2, r7 | r2 = r7;
0x000166a8 mov r0, r8 | r0 = r8;
| label_6:
0x000166ac bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x000166b0 mvn r3, 1 | r3 = ~1;
0x000166b4 b 0x16674 | goto label_0;
| }
0x000166b8 add r1, sp, 0x20 | r1 += var_20h;
0x000166bc mov r0, r7 | r0 = r7;
0x000166c0 bl 0x2640 | r0 = lstat64 ();
0x000166c4 cmp r0, 0 |
| if (r0 == 0) {
0x000166c8 bne 0x166dc |
0x000166cc ldr r3, [sp, 0x30] | r3 = var_30h;
0x000166d0 and r3, r3, 0xf000 | r3 &= 0xf000;
0x000166d4 cmp r3, 0x8000 |
| if (r3 == 0x8000) {
0x000166d8 addeq r4, r4, 1 | r4++;
| goto label_12;
| }
| }
| label_12:
0x000166dc ldr r0, [pc, 0x20c] | r0 = *(0x168ec);
0x000166e0 mov r2, r7 | r2 = r7;
0x000166e4 ldr r1, [pc, 0x208] | r1 = *(0x168f0);
0x000166e8 add r0, pc, r0 | r0 = pc + r0;
0x000166ec bl 0x1b1bc | fcn_0001b1bc (r0, r1);
| label_3:
0x000166f0 mov r0, r5 | r0 = r5;
0x000166f4 bl 0x261c | r0 = readdir64 ();
0x000166f8 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x000166fc bne 0x16630 | goto label_1;
| }
0x00016700 mov r0, r5 | r0 = r5;
0x00016704 bl 0x282c | closedir ();
0x00016708 cmp r4, 0 |
| if (r4 != 0) {
0x0001670c moveq r5, r4 | r5 = r4;
| }
| if (r4 != 0) {
0x00016710 moveq r6, r4 | r6 = r4;
| }
| if (r4 == 0) {
0x00016714 beq 0x168c4 | goto label_13;
| }
0x00016718 ldr r0, [pc, 0x1d8] | r0 = *(0x168f4);
0x0001671c lsl r2, r4, 2 | r2 = r4 << 2;
0x00016720 ldr r1, [pc, 0x1d4] | r1 = *(0x168f8);
0x00016724 add r0, pc, r0 | r0 = pc + r0;
0x00016728 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x0001672c subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x00016730 bne 0x16754 |
0x00016734 mvn r3, 0x62 | r3 = ~0x62;
0x00016738 b 0x16604 | goto label_2;
| label_10:
0x0001673c ldr r8, [pc, 0x1bc] | r8 = *(0x168fc);
0x00016740 ldr fp, [pc, 0x1bc] | fp = *(0x16900);
0x00016744 add r8, pc, r8 | r8 = pc + r8;
0x00016748 ldr sb, [pc, 0x1b8] | sb = *(0x00016908);
0x0001674c add fp, pc, fp |
0x00016750 b 0x166f0 | goto label_3;
| }
0x00016754 mov r0, sl | r0 = sl;
0x00016758 bl 0x26e8 | r0 = opendir ();
0x0001675c subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00016760 beq 0x16600 | goto label_4;
| }
0x00016764 ldr r3, [pc, 0x1a0] | r3 = *(0x16908);
0x00016768 str r7, [sp, 8] | var_8h = r7;
0x0001676c ldr r7, [pc, 0x19c] | r7 = *(0x1690c);
0x00016770 add r3, pc, r3 | r3 = pc + r3;
0x00016774 add r7, pc, r7 | r7 = pc + r7;
0x00016778 str r3, [sp, 0x14] | var_14h = r3;
0x0001677c b 0x168b4 | goto label_14;
| label_7:
0x00016780 mov r0, sl | r0 = sl;
0x00016784 bl 0x2808 | strlen (r0);
0x00016788 add sb, sb, 0x13 | sb += 0x13;
0x0001678c mov r8, r0 | r8 = r0;
0x00016790 mov r0, sb | r0 = sb;
0x00016794 bl 0x2808 | strlen (r0);
0x00016798 ldr r1, [pc, 0x174] | r1 = *(0x16910);
0x0001679c add r8, r8, r0 | r8 += r0;
0x000167a0 add r8, r8, 2 | r8 += 2;
0x000167a4 mov r2, r8 | r2 = r8;
0x000167a8 mov r0, r7 | r0 = r7;
0x000167ac bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x000167b0 subs fp, r0, 0 |
| if (fp != r0) {
0x000167b4 bne 0x167cc | goto label_15;
| }
0x000167b8 ldr r1, [pc, 0x158] | r1 = *(0x16914);
0x000167bc mov r2, r6 | r2 = r6;
| do {
0x000167c0 mov r0, r7 | r0 = r7;
0x000167c4 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x000167c8 b 0x16670 | goto label_5;
| label_15:
0x000167cc str sb, [sp] | *(sp) = sb;
0x000167d0 mov r3, sl | r3 = sl;
0x000167d4 ldr r2, [sp, 0x14] | r2 = var_14h;
0x000167d8 mov r1, r8 | r1 = r8;
0x000167dc bl 0x2418 | r0 = snprintf (r0, r1, r2, r3);
0x000167e0 cmp r0, r8 |
| if (r0 > r8) {
0x000167e4 blo 0x16808 |
0x000167e8 mov r2, fp | r2 = fp;
0x000167ec mov r1, 0x34c | r1 = 0x34c;
0x000167f0 mov r0, r7 | r0 = r7;
0x000167f4 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x000167f8 mov r2, r6 | r2 = r6;
0x000167fc ldr r1, [pc, 0x118] | r1 = *(0x16918);
0x00016800 mov r0, r7 | r0 = r7;
0x00016804 b 0x166ac | goto label_6;
| }
0x00016808 add r1, sp, 0x20 | r1 += var_20h;
0x0001680c mov r0, fp | r0 = fp;
0x00016810 bl 0x2640 | r0 = lstat64 ();
0x00016814 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x00016818 bne 0x168a0 | goto label_16;
| }
0x0001681c ldr r3, [sp, 0x30] | r3 = var_30h;
0x00016820 and r3, r3, 0xf000 | r3 &= 0xf000;
0x00016824 cmp r3, 0x8000 |
| if (r3 != 0x8000) {
0x00016828 bne 0x168a0 | goto label_16;
| }
0x0001682c mov r0, sb | r0 = sb;
0x00016830 bl 0x2808 | strlen (r0);
0x00016834 ldr r1, [pc, 0xe4] | r1 = *(0x1691c);
0x00016838 add r2, r0, 1 | r2 = r0 + 1;
0x0001683c mov r0, r7 | r0 = r7;
0x00016840 bl 0x1b000 | fcn_0001b000 (r0, r1);
0x00016844 ldr r2, [sp, 8] | r2 = var_8h;
0x00016848 cmp r0, 0 |
0x0001684c str r0, [r6, r2, lsl 2] | offset_0 = r2 << 2;
| *((r6 + offset_0)) = r0;
| if (r0 != 0) {
0x00016850 bne 0x16870 | goto label_17;
| }
0x00016854 mov r2, fp | r2 = fp;
0x00016858 ldr r1, [pc, 0xc4] | r1 = *(0x16920);
0x0001685c mov r0, r7 | r0 = r7;
0x00016860 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x00016864 mov r2, r6 | r2 = r6;
0x00016868 ldr r1, [pc, 0xb8] | r1 = *(0x16924);
0x0001686c b 0x167c0 |
| } while (1);
| label_17:
0x00016870 mov r1, sb | r1 = sb;
0x00016874 bl 0x2370 | strcpy (r0, r1)
0x00016878 ldr r3, [sp, 8] | r3 = var_8h;
0x0001687c ldr r1, [pc, 0xa8] | r1 = *(0x16928);
0x00016880 ldr r0, [r6, r3, lsl 2] | offset_1 = r3 << 2;
| r0 = *((r6 + offset_1));
0x00016884 add r1, pc, r1 | r1 = pc + r1;
0x00016888 bl 0x25bc | strstr (r0, r1);
0x0001688c ldr r3, [sp, 8] | r3 = var_8h;
0x00016890 add r3, r3, 1 | r3++;
0x00016894 str r3, [sp, 8] | var_8h = r3;
0x00016898 cmp r0, 0 |
| if (r0 == 0) {
0x0001689c strbne r8, [r0] | *(r0) = r8;
| }
| label_16:
0x000168a0 ldr r0, [pc, 0x88] | r0 = *(0x1692c);
0x000168a4 mov r2, fp | r2 = fp;
0x000168a8 mov r1, 0x360 | r1 = 0x360;
0x000168ac add r0, pc, r0 | r0 = pc + r0;
0x000168b0 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
| label_14:
0x000168b4 mov r0, r5 | r0 = r5;
0x000168b8 bl 0x261c | r0 = readdir64 ();
0x000168bc subs sb, r0, 0 | sb = r0 - 0;
| if (sb != r0) {
0x000168c0 bne 0x16780 | goto label_7;
| }
| label_13:
0x000168c4 ldr r3, [sp, 0x10] | r3 = var_10h;
0x000168c8 cmp r5, 0 |
0x000168cc str r4, [r3] | *(r3) = r4;
0x000168d0 ldr r3, [sp, 0xc] | r3 = var_ch;
0x000168d4 str r6, [r3] | *(r3) = r6;
| if (r5 == 0) {
0x000168d8 beq 0x16608 | goto label_8;
| }
0x000168dc b 0x16678 | 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-mqtt3a.so.1.3.9 @ 0x19438 */
| #include <stdint.h>
|
; (fcn) fcn.00019438 () | void fcn_00019438 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| void * s2;
| char * dest;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_20h;
| void * s;
| void * var_38h;
| int32_t var_3ch;
| r0 = arg1;
| r1 = arg2;
0x00019438 push {r4, r5, r6, r7, lr} |
0x0001943c sub sp, sp, 0x3c |
0x00019440 add r7, sp, 0x24 | r7 += s;
0x00019444 mov r4, r0 | r4 = r0;
0x00019448 mov r5, r1 | r5 = r1;
0x0001944c mov r6, r2 | r6 = r2;
0x00019450 mov r1, 0 | r1 = 0;
0x00019454 mov r2, 0x14 | r2 = 0x14;
0x00019458 mov r0, r7 | r0 = r7;
0x0001945c bl 0x2688 | memset (r0, r1, r2);
0x00019460 ldr r0, [pc, 0x15c] |
0x00019464 mov r2, 3 | r2 = 3;
0x00019468 add r0, pc, r0 | r0 = pc + r0;
0x0001946c ldr r1, [pc, 0x154] | r1 = "Hh";
0x00019470 add r0, r0, 0x42 | r0 = 0x19602;
0x00019474 bl 0x1a930 | fcn_0001a930 (r0, "Hh");
0x00019478 ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
0x0001947c cmp r3, 0 |
| if (r3 != 0) {
0x00019480 beq 0x1957c |
0x00019484 mov r3, 2 | r3 = 2;
0x00019488 str r3, [sp, 0x18] | var_18h = r3;
0x0001948c ldr r3, [pc, 0x138] | r3 = *(0x195c8);
0x00019490 sub r2, r5, 0x3e8 | r2 = r5 - 0x3e8;
0x00019494 cmp r2, 0xf |
| if (r2 <= 0xf) {
0x00019498 movhi r5, r3 | r5 = r3;
| }
0x0001949c cmp r6, 0 |
| if (r6 != 0) {
0x000194a0 beq 0x194b4 |
0x000194a4 mov r0, r6 | r0 = r6;
0x000194a8 bl 0x2808 | r0 = strlen (r0);
0x000194ac add r0, r0, 2 | r0 += 2;
0x000194b0 str r0, [sp, 0x18] | var_18h = r0;
| }
0x000194b4 ldr r0, [pc, 0x114] | r0 = *(0x195cc);
0x000194b8 ldr r2, [sp, 0x18] | r2 = var_18h;
0x000194bc mov r1, 0x220 | r1 = 0x220;
0x000194c0 add r0, pc, r0 | r0 = pc + r0;
0x000194c4 bl 0x1b000 | r0 = fcn_0001b000 (r0, r1);
0x000194c8 cmp r0, 0 |
0x000194cc str r0, [sp, 0x14] | dest = r0;
| if (r0 == 0) {
0x000194d0 beq 0x195a0 | goto label_0;
| }
0x000194d4 lsl r3, r5, 0x10 | r3 = r5 << 0x10;
0x000194d8 lsr r3, r3, 0x18 | r3 >>= 0x18;
0x000194dc orr r3, r3, r5, lsl 8 | r3 |= (r5 << 8);
0x000194e0 add r1, sp, 0x38 | r1 += var_38h;
0x000194e4 strh r3, [r1, -0x26]! | *((r1 -= 0x26)) = r3;
0x000194e8 mov r2, 2 | r2 = 2;
0x000194ec bl 0x246c | memcpy (r0, r1, r2);
0x000194f0 cmp r6, 0 |
| if (r6 != 0) {
0x000194f4 beq 0x19508 |
0x000194f8 ldr r0, [sp, 0x14] | r0 = dest;
0x000194fc mov r1, r6 | r1 = r6;
0x00019500 add r0, r0, 2 | r0 += 2;
0x00019504 bl 0x2370 | strcpy (r0, r1)
| }
0x00019508 add r3, sp, 0x18 | r3 += var_18h;
0x0001950c str r3, [sp] | *(sp) = r3;
0x00019510 mov r2, 8 | r2 = 8;
0x00019514 add r3, sp, 0x14 | r3 += dest;
0x00019518 mov r1, r4 | r1 = r4;
0x0001951c add r0, sp, 0x1c | r0 += var_1ch;
0x00019520 str r7, [sp, 4] | var_4h = r7;
0x00019524 bl 0x18d60 | fcn_00018d60 (r0, r1, r2, r3, r4);
0x00019528 add r3, sp, 0x38 | r3 += var_38h;
0x0001952c ldmdb r3, {r0, r1, r2, r3} | __asm ("ldmdb r3, {r0, r1, r2, r3}");
0x00019530 ldr r6, [sp, 0x1c] | r6 = var_1ch;
0x00019534 ldr r5, [pc, 0x98] | r5 = *(0x195d0);
0x00019538 stm sp, {r0, r1, r2, r3} | *(sp) = r0;
| *((sp + 4)) = r1;
| *((sp + 8)) = r2;
| *((sp + 12)) = r3;
0x0001953c ldr r3, [sp, 0x24] | r3 = s;
0x00019540 ldr r2, [sp, 0x20] | r2 = var_20h;
0x00019544 mov r1, r6 | r1 = r6;
0x00019548 add r5, pc, r5 | r5 = pc + r5;
0x0001954c ldr r0, [r4] | r0 = *(r4);
0x00019550 bl 0x10f60 | fcn_00010f60 (r0, r1, r2, r3, r4);
0x00019554 mov r2, r6 | r2 = r6;
0x00019558 ldr r1, [pc, 0x78] | r1 = *(0x195d4);
0x0001955c mov r0, r5 | r0 = r5;
0x00019560 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x00019564 mov r3, 0 | r3 = 0;
0x00019568 str r3, [r4, 0x24] | *((r4 + 0x24)) = r3;
0x0001956c ldr r2, [sp, 0x14] | r2 = dest;
0x00019570 ldr r1, [pc, 0x64] | r1 = *(0x195d8);
0x00019574 mov r0, r5 | r0 = r5;
0x00019578 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
| }
0x0001957c ldr r2, [r4, 0x28] | r2 = *((r4 + 0x28));
0x00019580 cmp r2, 0 |
| if (r2 != 0) {
0x00019584 beq 0x195a0 |
0x00019588 ldr r0, [pc, 0x50] | r0 = *(0x195dc);
0x0001958c ldr r1, [pc, 0x50] | r1 = *(0x195e0);
0x00019590 add r0, pc, r0 | r0 = pc + r0;
0x00019594 bl 0x1b1bc | fcn_0001b1bc (r0, r1);
0x00019598 mov r3, 0 | r3 = 0;
0x0001959c str r3, [r4, 0x28] | *((r4 + 0x28)) = r3;
| }
| label_0:
0x000195a0 ldr r0, [pc, 0x40] |
0x000195a4 mov r3, 3 | r3 = 3;
0x000195a8 add r0, pc, r0 | r0 = pc + r0;
0x000195ac mov r2, 0 | r2 = 0;
0x000195b0 ldr r1, [pc, 0x34] | r1 = *(0x195e8);
0x000195b4 add r0, r0, 0x42 | r0 = 0x19626;
0x000195b8 bl 0x1aa18 | fcn_0001aa18 (r0, r1);
0x000195bc add sp, sp, 0x3c |
0x000195c0 pop {r4, r5, r6, r7, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/lib/libpaho-mqtt3a.so.1.3.9 @ 0x1b000 */
| #include <stdint.h>
|
; (fcn) fcn.0001b000 () | void fcn_0001b000 (int32_t arg1, int32_t arg2) {
| int32_t var_8h;
| int32_t var_14h;
| r0 = arg1;
| r1 = arg2;
0x0001b000 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001b004 sub sp, sp, 0x14 |
0x0001b008 mov r6, r2 | r6 = r2;
0x0001b00c mov sb, r1 | sb = r1;
0x0001b010 mov r8, r0 | r8 = r0;
0x0001b014 bl 0x2808 | r0 = strlen (r0);
0x0001b018 mov r5, r0 | r5 = r0;
0x0001b01c add r4, r0, 1 | r4 = r0 + 1;
0x0001b020 ldr r0, [pc, 0x170] |
0x0001b024 add r0, pc, r0 | r0 = pc + r0;
0x0001b028 add r0, r0, 0x28 | r0 = 0x1b1bc;
0x0001b02c bl 0x26f4 | fcn_000026f4 ();
0x0001b030 ands r3, r6, 0xf | r3 = r6 & 0xf;
| if (r3 == r6) {
0x0001b034 addne r2, r6, 0x10 | r2 = r6 + 0x10;
| }
0x0001b038 mov r0, 0x10 | r0 = 0x10;
| if (r3 == r6) {
0x0001b03c subne r6, r2, r3 | r6 = r2 - r3;
| }
0x0001b040 bl 0x249c | r0 = malloc (r0);
0x0001b044 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x0001b048 bne 0x1b080 | goto label_2;
| }
0x0001b04c ldr r2, [pc, 0x148] | r2 = *(0x1b198);
0x0001b050 mov r1, 0xd | r1 = 0xd;
0x0001b054 add r2, pc, r2 | r2 = pc + r2;
0x0001b058 mov r0, 5 | r0 = 5;
0x0001b05c bl 0x12bc4 | fcn_00012bc4 (r0, r1, r2, r3);
0x0001b060 mov r4, r7 | r4 = r7;
| do {
| label_1:
0x0001b064 ldr r0, [pc, 0x134] |
0x0001b068 add r0, pc, r0 | r0 = pc + r0;
0x0001b06c add r0, r0, 0x28 | r0 = 0x1b1c4;
0x0001b070 bl 0x2814 | fcn_00002814 ();
0x0001b074 mov r0, r4 | r0 = r4;
0x0001b078 add sp, sp, 0x14 |
0x0001b07c pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_2:
0x0001b080 mov sl, 0 | sl = 0;
0x0001b084 mov r0, r4 | r0 = r4;
0x0001b088 str sl, [r7, 4] | *((r7 + 4)) = sl;
0x0001b08c str sl, [r7, 8] | *((r7 + 8)) = sl;
0x0001b090 str r6, [r7, 0xc] | *((r7 + 0xc)) = r6;
0x0001b094 bl 0x249c | r0 = malloc (r0);
0x0001b098 cmp r0, sl |
0x0001b09c mov r4, r0 | r4 = r0;
0x0001b0a0 str r0, [r7] | *(r7) = r0;
| if (r0 != sl) {
0x0001b0a4 bne 0x1b0c8 | goto label_3;
| }
0x0001b0a8 ldr r2, [pc, 0xf4] | r2 = *(0x1b1a0);
0x0001b0ac mov r1, 0xd | r1 = 0xd;
0x0001b0b0 add r2, pc, r2 | r2 = pc + r2;
0x0001b0b4 mov r0, 5 | r0 = 5;
0x0001b0b8 bl 0x12bc4 | fcn_00012bc4 (r0, r1, r2, r3);
| label_0:
0x0001b0bc mov r0, r7 | r0 = r7;
0x0001b0c0 bl 0x2898 | free (r0);
0x0001b0c4 b 0x1b064 |
| } while (1);
| label_3:
0x0001b0c8 mov r1, r8 | r1 = r8;
0x0001b0cc str sl, [r0] | *(r0) = sl;
0x0001b0d0 add fp, r6, 0x10 |
0x0001b0d4 bl 0x2370 | strcpy (r0, r1)
0x0001b0d8 str sb, [r7, 4] | *((r7 + 4)) = sb;
0x0001b0dc mov r0, fp | r0 = fp;
0x0001b0e0 bl 0x249c | r0 = malloc (r0);
0x0001b0e4 cmp r0, 0 |
0x0001b0e8 mov r4, r0 | r4 = r0;
0x0001b0ec str r0, [r7, 8] | *((r7 + 8)) = r0;
| if (r0 == 0) {
0x0001b0f0 bne 0x1b114 |
0x0001b0f4 ldr r2, [pc, 0xac] | r2 = *(0x1b1a4);
0x0001b0f8 mov r1, 0xd | r1 = 0xd;
0x0001b0fc add r2, pc, r2 | r2 = pc + r2;
0x0001b100 mov r0, 5 | r0 = 5;
0x0001b104 bl 0x12bc4 | fcn_00012bc4 (r0, r1, r2, r3);
0x0001b108 ldr r0, [r7] | r0 = *(r7);
0x0001b10c bl 0x2898 | free (r0);
0x0001b110 b 0x1b0bc | goto label_0;
| }
0x0001b114 mov r2, fp | r2 = fp;
0x0001b118 mov r1, sl | r1 = sl;
0x0001b11c bl 0x2688 | memset (r0, r1, r2);
0x0001b120 ldr r2, [pc, 0x84] | r2 = *(0x1b1a8);
0x0001b124 ldr r3, [pc, 0x84] | r3 = *(0x1b1ac);
0x0001b128 add r1, r4, r6 | r1 = r4 + r6;
0x0001b12c strd r2, r3, [r4] | __asm ("strd r2, r3, [r4]");
0x0001b130 strd r2, r3, [r1, 8] | __asm ("strd r2, r3, [r1, 8]");
0x0001b134 ldr r2, [pc, 0x78] | r2 = *(0x1b1b0);
0x0001b138 str r4, [sp, 8] | var_8h = r4;
0x0001b13c ldr r4, [pc, 0x74] | r4 = *(0x1b1b4);
0x0001b140 add r5, r5, 0x21 | r5 += 0x21;
0x0001b144 add r4, pc, r4 | r4 = pc + r4;
0x0001b148 mov r3, r6 | r3 = r6;
0x0001b14c add r2, pc, r2 | r2 = pc + r2;
0x0001b150 mvn r1, 0 | r1 = ~0;
0x0001b154 mov r0, 1 | r0 = 1;
0x0001b158 add r5, r5, r6 | r5 += r6;
0x0001b15c stm sp, {r8, sb} | *(sp) = r8;
| *((sp + 4)) = sb;
0x0001b160 bl 0x12bc4 | fcn_00012bc4 (r0, r1, r2, r3);
0x0001b164 mov r2, r5 | r2 = r5;
0x0001b168 mov r0, r4 | r0 = r4;
0x0001b16c mov r1, r7 | r1 = r7;
0x0001b170 bl 0x10214 | fcn_00010214 (r0, r1);
0x0001b174 ldr r2, [r4, 0x20] | r2 = *(0x1b1d4);
0x0001b178 ldr r3, [r4, 0x24] | r3 = *(0x1b1d8);
0x0001b17c add r2, r6, r2 | r2 = r6 + r2;
0x0001b180 cmp r2, r3 |
0x0001b184 str r2, [r4, 0x20] | *((r4 + 0x20)) = r2;
| if (r2 <= r3) {
0x0001b188 strhi r2, [r4, 0x24] | *((r4 + 0x24)) = r2;
| }
0x0001b18c ldr r4, [r7, 8] | r4 = *((r7 + 8));
0x0001b190 add r4, r4, 8 | r4 += 8;
0x0001b194 b 0x1b064 | 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-mqtt3a.so.1.3.9 @ 0x1b28c */
| #include <stdint.h>
|
; (fcn) fcn.0001b28c () | void fcn_0001b28c (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| r0 = arg1;
| r1 = arg2;
0x0001b28c push {r0, r1, r2, r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001b290 ldr r5, [pc, 0x16c] | r5 = *(0x1b400);
0x0001b294 mov r4, r2 | r4 = r2;
0x0001b298 add r5, pc, r5 | r5 = pc + r5;
0x0001b29c mov r8, r0 | r8 = r0;
0x0001b2a0 add r0, r5, 0x28 | r0 = r5 + 0x28;
0x0001b2a4 mov sb, r1 | sb = r1;
0x0001b2a8 mov r6, r3 | r6 = r3;
0x0001b2ac bl 0x26f4 | fcn_000026f4 ();
0x0001b2b0 mov r0, r5 | r0 = r5;
0x0001b2b4 sub r1, r4, 8 | r1 = r4 - 8;
0x0001b2b8 bl 0x10704 | r0 = fcn_00010704 (r0, r1);
0x0001b2bc subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x0001b2c0 bne 0x1b308 | goto label_1;
| }
0x0001b2c4 ldr r2, [pc, 0x13c] | r2 = *(0x1b404);
0x0001b2c8 str sb, [sp] | *(sp) = sb;
0x0001b2cc mov r3, r8 | r3 = r8;
0x0001b2d0 add r2, pc, r2 | r2 = pc + r2;
0x0001b2d4 mov r1, 0xd | r1 = 0xd;
0x0001b2d8 mov r0, 5 | r0 = 5;
0x0001b2dc bl 0x12bc4 | fcn_00012bc4 (r0, r1, r2, r3);
0x0001b2e0 mov r4, r5 | r4 = r5;
| do {
| label_0:
0x0001b2e4 ldr r0, [pc, 0x120] |
0x0001b2e8 add r0, pc, r0 | r0 = pc + r0;
0x0001b2ec add r0, r0, 0x28 | r0 = 0x1b430;
0x0001b2f0 bl 0x2814 | fcn_00002814 ();
0x0001b2f4 cmp r4, 0 |
| if (r4 == 0) {
0x0001b2f8 addne r4, r4, 8 | r4 += 8;
| }
0x0001b2fc mov r0, r4 | r0 = r4;
0x0001b300 add sp, sp, 0xc |
0x0001b304 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_1:
0x0001b308 mov r0, r8 | r0 = r8;
0x0001b30c bl 0x2808 | strlen (r0);
0x0001b310 mov r2, r4 | r2 = r4;
0x0001b314 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x0001b318 mov r1, sb | r1 = sb;
0x0001b31c mov sl, r0 | sl = r0;
0x0001b320 mov r0, r8 | r0 = r8;
0x0001b324 bl 0x1ae5c | fcn_0001ae5c (r0, r1);
0x0001b328 ldr r2, [pc, 0xe0] | r2 = *(0x1b40c);
0x0001b32c ands r3, r6, 0xf | r3 = r6 & 0xf;
0x0001b330 add r2, pc, r2 | r2 = pc + r2;
| if (r3 == r6) {
0x0001b334 addne r6, r6, 0x10 | r6 += 0x10;
| }
| if (r3 == r6) {
0x0001b338 subne r6, r6, r3 | r6 -= r3;
| }
0x0001b33c ldr r1, [r5, 0xc] | r1 = *((r5 + 0xc));
0x0001b340 ldr r3, [r2, 0x20] | r3 = *(0x1b42c);
0x0001b344 ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x0001b348 sub r3, r3, r1 | r3 -= r1;
0x0001b34c ldr r1, [r2, 0x24] | r1 = *(0x1b430);
0x0001b350 add r3, r3, r6 | r3 += r6;
0x0001b354 cmp r3, r1 |
0x0001b358 add r1, r6, 0x10 | r1 = r6 + 0x10;
| if (r3 <= r1) {
0x0001b35c strhi r3, [r2, 0x24] | *((r2 + 0x24)) = r3;
| }
0x0001b360 str r3, [r2, 0x20] | *((r2 + 0x20)) = r3;
0x0001b364 bl 0x2610 | r0 = realloc (r0, r1);
0x0001b368 cmp r0, 0 |
0x0001b36c mov r4, r0 | r4 = r0;
0x0001b370 str r0, [r5, 8] | *((r5 + 8)) = r0;
| if (r0 != 0) {
0x0001b374 bne 0x1b390 | goto label_2;
| }
0x0001b378 ldr r2, [pc, 0x94] | r2 = *(0x1b410);
0x0001b37c mov r1, 0xd | r1 = 0xd;
0x0001b380 add r2, pc, r2 | r2 = pc + r2;
0x0001b384 mov r0, 5 | r0 = 5;
0x0001b388 bl 0x12bc4 | fcn_00012bc4 (r0, r1, r2, r3);
0x0001b38c b 0x1b2e4 |
| } while (1);
| label_2:
0x0001b390 ldr r2, [r5, 0xc] | r2 = *((r5 + 0xc));
0x0001b394 add sl, sl, 1 | sl++;
0x0001b398 rsb r2, r2, 0x20 | r2 = 0x20 - r2;
0x0001b39c ldr r3, [pc, 0x74] | r3 = *(0x1b414);
0x0001b3a0 add r7, r2, sl | r7 = r2 + sl;
0x0001b3a4 ldr r2, [pc, 0x70] | r2 = *(0x1b418);
0x0001b3a8 add r4, r0, r6 | r4 = r0 + r6;
0x0001b3ac strd r2, r3, [r0] | __asm ("strd r2, r3, [r0]");
0x0001b3b0 strd r2, r3, [r4, 8] | __asm ("strd r2, r3, [r4, 8]");
0x0001b3b4 ldr r4, [r5] | r4 = *(r5);
0x0001b3b8 str r6, [r5, 0xc] | *((r5 + 0xc)) = r6;
0x0001b3bc mov r0, r4 | r0 = r4;
0x0001b3c0 bl 0x2808 | strlen (r0);
0x0001b3c4 mov r1, sl | r1 = sl;
0x0001b3c8 add r6, r7, r6 | r6 = r7 + r6;
0x0001b3cc mov fp, r0 |
0x0001b3d0 mov r0, r4 | r0 = r4;
0x0001b3d4 bl 0x2610 | realloc (r0, r1);
0x0001b3d8 mov r1, r8 | r1 = r8;
0x0001b3dc str r0, [r5] | *(r5) = r0;
0x0001b3e0 bl 0x2370 | strcpy (r0, r1)
0x0001b3e4 ldr r0, [pc, 0x34] | r0 = *(0x1b41c);
0x0001b3e8 str sb, [r5, 4] | *((r5 + 4)) = sb;
0x0001b3ec sub r2, r6, fp | r2 = r6 - fp;
0x0001b3f0 mov r1, r5 | r1 = r5;
0x0001b3f4 add r0, pc, r0 | r0 = pc + r0;
0x0001b3f8 ldr r4, [r5, 8] | r4 = *((r5 + 8));
0x0001b3fc bl 0x10214 | fcn_00010214 (r0, r1);
0x0001b400 b 0x1b2e4 | goto label_0;
| }
[*] Function strcpy used 16 times libpaho-mqtt3a.so.1.3.9