[*] Binary protection state of libpaho-mqtt3as.so.1.3.9
Partial RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function strcpy tear down of libpaho-mqtt3as.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-mqtt3as.so.1.3.9 @ 0x72b4 */
| #include <stdint.h>
|
; (fcn) fcn.000072b4 () | void fcn_000072b4 (char * arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| char * src;
| int32_t var_14h;
| r0 = arg1;
| r1 = arg2;
0x000072b4 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000072b8 sub sp, sp, 0x14 |
0x000072bc str r0, [sp, 0xc] | src = r0;
0x000072c0 add r5, r0, r1 | r5 = r0 + r1;
0x000072c4 ldr r0, [pc, 0x468] |
0x000072c8 mov r6, r1 | r6 = r1;
0x000072cc add r0, pc, r0 | r0 = pc + r0;
0x000072d0 mov r8, r2 | r8 = r2;
0x000072d4 ldr r1, [pc, 0x45c] | r1 = *(0x7734);
0x000072d8 mov r2, 3 | r2 = 3;
0x000072dc add r0, r0, 0x14 | r0 = 0x7744;
0x000072e0 mov r4, r3 | r4 = r3;
0x000072e4 bl 0x1e0d4 | fcn_0001e0d4 (r0, r1);
0x000072e8 cmp r6, 0 |
0x000072ec bne 0x731c |
| while (r4 == r0) {
| label_1:
0x000072f0 mov r4, 0 | r4 = 0;
| label_0:
0x000072f4 ldr r0, [pc, 0x440] |
0x000072f8 mov r3, 3 | r3 = 3;
0x000072fc add r0, pc, r0 | r0 = pc + r0;
0x00007300 mov r2, 0 | r2 = 0;
0x00007304 ldr r1, [pc, 0x434] | r1 = "alueAt";
0x00007308 add r0, r0, 0x14 | r0 = 0x774c;
0x0000730c bl 0x1e1bc | fcn_0001e1bc (r0, "alueAt");
0x00007310 mov r0, r4 | r0 = r4;
0x00007314 add sp, sp, 0x14 |
0x00007318 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x0000731c cmp r4, 0 |
| if (r4 == 0) {
0x00007320 movne r3, 0 | r3 = 0;
| }
| if (r4 != 0) {
0x00007324 bne 0x7354 | goto label_9;
| }
0x00007328 ldr r0, [pc, 0x414] | r0 = *(0x7740);
0x0000732c mov r2, 0x60 | r2 = 0x60;
0x00007330 ldr r1, [pc, 0x410] | r1 = *(0x7744);
0x00007334 add r0, pc, r0 | r0 = pc + r0;
0x00007338 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x0000733c subs r4, r0, 0 | r4 = r0 - 0;
0x00007340 beq 0x72f0 |
| }
0x00007344 mov r2, 0x60 | r2 = 0x60;
0x00007348 mov r1, 0 | r1 = 0;
0x0000734c bl 0x38a8 | memset (r0, r1, r2);
0x00007350 mov r3, 1 | r3 = 1;
| label_9:
0x00007354 str r3, [r4, 0x58] | *((r4 + 0x58)) = r3;
0x00007358 ldr r3, [sp, 0xc] | r3 = src;
0x0000735c add r0, r3, 8 | r0 = r3 + 8;
0x00007360 cmp r0, r5 |
| if (r0 > r5) {
0x00007364 bhi 0x74f0 | goto label_4;
| }
0x00007368 ldr r2, [r3] | r2 = *(r3);
0x0000736c str r2, [r4] | *(r4) = r2;
0x00007370 ldr r1, [r3, 4] | r1 = *((r3 + 4));
0x00007374 cmp r2, 8 |
0x00007378 str r1, [r4, 0x14] | *((r4 + 0x14)) = r1;
0x0000737c str r0, [sp, 0xc] | src = r0;
| if (r2 != 8) {
0x00007380 beq 0x7478 |
0x00007384 cmp r2, 0xa |
| if (r2 == 0xa) {
0x00007388 beq 0x766c | goto label_10;
| }
0x0000738c cmp r2, 3 |
| if (r2 != 3) {
0x00007390 bne 0x74f0 | goto label_4;
| }
0x00007394 sub r6, r5, r0 | r6 = r5 - r0;
0x00007398 mov r1, r6 | r1 = r6;
0x0000739c bl 0x398c | r0 = strnlen ();
0x000073a0 add r7, r0, 1 | r7 = r0 + 1;
0x000073a4 cmp r6, r7 |
| if (r6 == r7) {
0x000073a8 beq 0x74f0 | goto label_4;
| }
0x000073ac ldr r3, [r4, 0x58] | r3 = *((r4 + 0x58));
0x000073b0 cmp r3, 0 |
| if (r3 == 0) {
0x000073b4 bne 0x73e0 |
0x000073b8 ldr r0, [pc, 0x38c] | r0 = *(0x7748);
0x000073bc mov r2, r7 | r2 = r7;
0x000073c0 mov r1, 0x22c | r1 = 0x22c;
0x000073c4 add r0, pc, r0 | r0 = pc + r0;
0x000073c8 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x000073cc cmp r0, 0 |
0x000073d0 str r0, [r4, 0x34] | *((r4 + 0x34)) = r0;
| if (r0 == 0) {
0x000073d4 beq 0x74f0 | goto label_4;
| }
0x000073d8 ldr r1, [sp, 0xc] | r1 = src;
0x000073dc bl 0x3bd8 | strcpy (r0, r1)
| }
0x000073e0 ldr r2, [sp, 0xc] | r2 = src;
0x000073e4 add r3, r2, r7 | r3 = r2 + r7;
0x000073e8 str r3, [sp, 0xc] | src = r3;
0x000073ec add r3, r3, 4 | r3 += 4;
0x000073f0 cmp r3, r5 |
| if (r3 > r5) {
0x000073f4 bhi 0x74f0 | goto label_4;
| }
0x000073f8 ldr r6, [r2, r7] | r6 = *((r2 + r7));
0x000073fc str r3, [sp, 0xc] | src = r3;
0x00007400 add r3, r3, r6 | r3 += r6;
0x00007404 cmp r5, r3 |
0x00007408 str r6, [r4, 0x38] | *((r4 + 0x38)) = r6;
| if (r5 <= r3) {
0x0000740c blo 0x74f0 | goto label_4;
| }
0x00007410 ldr r3, [r4, 0x58] | r3 = *((r4 + 0x58));
0x00007414 cmp r3, 0 |
| if (r3 == 0) {
0x00007418 bne 0x7448 |
0x0000741c ldr r0, [pc, 0x32c] | r0 = *(0x774c);
0x00007420 mov r2, r6 | r2 = r6;
0x00007424 mov r1, 0x23c | r1 = 0x23c;
0x00007428 add r0, pc, r0 | r0 = pc + r0;
0x0000742c bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x00007430 cmp r0, 0 |
0x00007434 str r0, [r4, 0x3c] | *((r4 + 0x3c)) = r0;
| if (r0 == 0) {
0x00007438 beq 0x74f0 | goto label_4;
| }
0x0000743c mov r2, r6 | r2 = r6;
0x00007440 ldr r1, [sp, 0xc] | r1 = src;
0x00007444 bl 0x3494 | memcpy (r0, r1, r2);
| }
0x00007448 ldr r1, [sp, 0xc] | r1 = src;
0x0000744c add r3, r1, r6 | r3 = r1 + r6;
0x00007450 add r2, r3, 8 | r2 = r3 + 8;
0x00007454 cmp r2, r5 |
0x00007458 str r3, [sp, 0xc] | src = r3;
| if (r2 > r5) {
0x0000745c bhi 0x74f0 | goto label_4;
| }
0x00007460 ldr r1, [r1, r6] | r1 = *((r1 + r6));
0x00007464 str r2, [sp, 0xc] | src = r2;
0x00007468 str r1, [r4, 0x40] | *((r4 + 0x40)) = r1;
0x0000746c ldr r3, [r3, 4] | r3 = *((r3 + 4));
0x00007470 str r3, [r4, 0x44] | *((r4 + 0x44)) = r3;
0x00007474 b 0x7528 | goto label_7;
| }
0x00007478 ldr r2, [r4, 0x58] | r2 = *((r4 + 0x58));
0x0000747c cmp r2, 0 |
| if (r2 == 0) {
0x00007480 beq 0x7528 | goto label_7;
| }
0x00007484 add r1, r3, 0xc | r1 = r3 + 0xc;
0x00007488 cmp r1, r5 |
| if (r1 > r5) {
0x0000748c bhi 0x74f0 | goto label_4;
| }
0x00007490 ldr r2, [r3, 8] | r2 = *((r3 + 8));
0x00007494 str r1, [sp, 0xc] | src = r1;
0x00007498 cmp r2, 0 |
0x0000749c str r2, [r4, 0x34] | *((r4 + 0x34)) = r2;
| if (r2 <= 0) {
0x000074a0 ble 0x72f4 | goto label_0;
| }
0x000074a4 ldr r6, [pc, 0x2a8] | r6 = *(0x7750);
0x000074a8 lsl r2, r2, 2 | r2 <<= 2;
0x000074ac add r6, pc, r6 | r6 = pc + r6;
0x000074b0 mov r1, 0x1d4 | r1 = 0x1d4;
0x000074b4 mov r0, r6 | r0 = r6;
0x000074b8 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x000074bc cmp r0, 0 |
0x000074c0 str r0, [r4, 0x38] | *((r4 + 0x38)) = r0;
| if (r0 != 0) {
0x000074c4 beq 0x74f0 |
0x000074c8 cmp r8, 4 |
0x000074cc ldr r1, [r4, 0x34] | r1 = *((r4 + 0x34));
| if (r8 != 4) {
0x000074d0 bne 0x757c | goto label_11;
| }
0x000074d4 lsl r2, r1, 2 | r2 = r1 << 2;
0x000074d8 mov r0, r6 | r0 = r6;
0x000074dc mov r1, 0x1d8 | r1 = 0x1d8;
0x000074e0 bl 0x1e7a4 | fcn_0001e7a4 (r0, r1);
0x000074e4 str r0, [r4, 0x3c] | *((r4 + 0x3c)) = r0;
| label_3:
0x000074e8 cmp r0, 0 |
| if (r0 != 0) {
0x000074ec bne 0x7504 | goto label_2;
| }
| }
| label_4:
0x000074f0 ldr r0, [pc, 0x260] | r0 = *(0x7754);
0x000074f4 mov r2, r4 | r2 = r4;
0x000074f8 mov r1, 0x258 | r1 = 0x258;
0x000074fc add r0, pc, r0 | r0 = pc + r0;
0x00007500 b 0x7574 | goto label_12;
| label_2:
0x00007504 ldr r3, [pc, 0x250] | r3 = *(0x7758);
0x00007508 ldr sb, [pc, 0x250] | sb = *(0x775c);
0x0000750c add r3, pc, r3 | r3 = pc + r3;
0x00007510 mov r6, 0 | r6 = 0;
0x00007514 mov sl, 0xc | sl = 0xc;
0x00007518 str r3, [sp] | *(sp) = r3;
| label_5:
0x0000751c ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x00007520 cmp r3, r6 |
| if (r3 > r6) {
0x00007524 bgt 0x75a0 | goto label_13;
| }
| label_7:
0x00007528 ldr r3, [r4, 0x58] | r3 = *((r4 + 0x58));
0x0000752c cmp r3, 0 |
0x00007530 cmpeq r8, 5 | __asm ("cmpeq r8, 5");
| if (r3 != 0) {
0x00007534 bne 0x72f4 | goto label_0;
| }
0x00007538 mov r2, r5 | r2 = r5;
0x0000753c add r1, sp, 0xc | r1 += src;
0x00007540 add r0, r4, 0x24 | r0 = r4 + 0x24;
0x00007544 bl 0x1b96c | r0 = fcn_0001b96c (r0, r1);
0x00007548 cmp r0, 1 |
| if (r0 == 1) {
0x0000754c beq 0x72f4 | goto label_0;
| }
0x00007550 ldr r2, [pc, 0x20c] | r2 = *(0x7760);
0x00007554 mvn r1, 0 | r1 = ~0;
0x00007558 add r2, pc, r2 | r2 = pc + r2;
0x0000755c mov r0, 5 | r0 = 5;
0x00007560 bl 0x16364 | fcn_00016364 (r0, r1, r2, r3);
0x00007564 ldr r0, [pc, 0x1fc] | r0 = *(0x7764);
0x00007568 ldr r1, [pc, 0x1fc] | r1 = *(0x7768);
0x0000756c mov r2, r4 | r2 = r4;
0x00007570 add r0, pc, r0 | r0 = pc + r0;
| label_12:
0x00007574 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x00007578 b 0x72f0 | goto label_1;
| label_11:
0x0000757c cmp r1, 1 |
| if (r1 <= 1) {
0x00007580 ble 0x7504 | goto label_2;
| }
0x00007584 mov r3, 0xc | r3 = 0xc;
0x00007588 mul r2, r3, r1 | r2 = r3 * r1;
0x0000758c mov r0, r6 | r0 = r6;
0x00007590 ldr r1, [pc, 0x1d8] | r1 = *(0x776c);
0x00007594 bl 0x1e7a4 | fcn_0001e7a4 (r0, r1);
0x00007598 str r0, [r4, 0x4c] | *((r4 + 0x4c)) = r0;
0x0000759c b 0x74e8 | goto label_3;
| label_13:
0x000075a0 ldr r0, [sp, 0xc] | r0 = src;
0x000075a4 sub fp, r5, r0 |
0x000075a8 mov r1, fp | r1 = fp;
0x000075ac bl 0x398c | r0 = strnlen ();
0x000075b0 add r7, r0, 1 | r7 = r0 + 1;
0x000075b4 cmp fp, r7 |
| if (fp == r7) {
0x000075b8 beq 0x74f0 | goto label_4;
| }
0x000075bc ldr r3, [r4, 0x38] | r3 = *((r4 + 0x38));
0x000075c0 mov r2, r7 | r2 = r7;
0x000075c4 mov r1, sb | r1 = sb;
0x000075c8 ldr r0, [sp] | r0 = *(sp);
0x000075cc str r3, [sp, 4] | var_4h = r3;
0x000075d0 bl 0x1e7a4 | fcn_0001e7a4 (r0, r1);
0x000075d4 ldr r3, [sp, 4] | r3 = var_4h;
0x000075d8 lsl fp, r6, 2 |
0x000075dc cmp r0, 0 |
0x000075e0 str r0, [r3, r6, lsl 2] | offset_0 = r6 << 2;
| *((r3 + offset_0)) = r0;
| if (r0 == 0) {
0x000075e4 beq 0x74f0 | goto label_4;
| }
0x000075e8 ldr r3, [r4, 0x38] | r3 = *((r4 + 0x38));
0x000075ec ldr r1, [sp, 0xc] | r1 = src;
0x000075f0 ldr r0, [r3, r6, lsl 2] | offset_1 = r6 << 2;
| r0 = *((r3 + offset_1));
0x000075f4 bl 0x3bd8 | strcpy (r0, r1)
0x000075f8 ldr r2, [sp, 0xc] | r2 = src;
0x000075fc cmp r8, 4 |
0x00007600 add r3, r2, r7 | r3 = r2 + r7;
0x00007604 str r3, [sp, 0xc] | src = r3;
| if (r8 != 4) {
0x00007608 bne 0x7630 | goto label_14;
| }
0x0000760c add r3, r3, 4 | r3 += 4;
0x00007610 cmp r3, r5 |
| if (r3 > r5) {
0x00007614 bhi 0x74f0 | goto label_4;
| }
0x00007618 ldr r1, [r2, r7] | r1 = *((r2 + r7));
0x0000761c ldr r2, [r4, 0x3c] | r2 = *((r4 + 0x3c));
0x00007620 str r1, [r2, fp] | *((r2 + fp)) = r1;
0x00007624 str r3, [sp, 0xc] | src = r3;
| label_6:
0x00007628 add r6, r6, 1 | r6++;
0x0000762c b 0x751c | goto label_5;
| label_14:
0x00007630 add lr, r3, 0xc | lr = r3 + 0xc;
0x00007634 cmp lr, r5 |
| if (lr > r5) {
0x00007638 bhi 0x74f0 | goto label_4;
| }
0x0000763c ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x00007640 cmp r2, 1 |
| if (r2 == 1) {
0x00007644 ldrne r2, [r4, 0x4c] | r2 = *((r4 + 0x4c));
| }
| if (r2 != 1) {
0x00007648 ldmeq r3, {r0, r1, r2} | r0 = *(r3);
| r1 = *((r3 + 4));
| r2 = *((r3 + 8));
| }
0x0000764c mlane ip, sl, r6, r2 | __asm ("mlane ip, sl, r6, r2");
| if (r2 == 1) {
0x00007650 ldmne r3, {r0, r1, r2} | r0 = *(r3);
| r1 = *((r3 + 4));
| r2 = *((r3 + 8));
| }
| if (r2 != 1) {
0x00007654 addeq ip, r4, 0x40 |
| }
| if (r2 != 1) {
0x00007658 moveq r3, ip | r3 = ip;
| }
| if (r2 == 1) {
0x0000765c stmne ip, {r0, r1, r2} | *(ip) = r0;
| *((ip + 4)) = r1;
| *((ip + 8)) = r2;
| }
| if (r2 != 1) {
0x00007660 stmeq r3, {r0, r1, r2} | *(r3) = r0;
| *((r3 + 4)) = r1;
| *((r3 + 8)) = r2;
| }
0x00007664 str lr, [sp, 0xc] | src = lr;
0x00007668 b 0x7628 | goto label_6;
| label_10:
0x0000766c ldr r2, [r4, 0x58] | r2 = *((r4 + 0x58));
0x00007670 cmp r2, 0 |
| if (r2 == 0) {
0x00007674 beq 0x7528 | goto label_7;
| }
0x00007678 add r1, r3, 0xc | r1 = r3 + 0xc;
0x0000767c cmp r1, r5 |
| if (r1 > r5) {
0x00007680 bhi 0x74f0 | goto label_4;
| }
0x00007684 ldr r2, [r3, 8] | r2 = *((r3 + 8));
0x00007688 str r1, [sp, 0xc] | src = r1;
0x0000768c cmp r2, 0 |
0x00007690 str r2, [r4, 0x34] | *((r4 + 0x34)) = r2;
| if (r2 <= 0) {
0x00007694 ble 0x72f4 | goto label_0;
| }
0x00007698 ldr r0, [pc, 0xd4] | r0 = *(0x7770);
0x0000769c lsl r2, r2, 2 | r2 <<= 2;
0x000076a0 ldr r1, [pc, 0xd0] | r1 = *(0x7774);
0x000076a4 add r0, pc, r0 | r0 = pc + r0;
0x000076a8 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x000076ac cmp r0, 0 |
0x000076b0 str r0, [r4, 0x38] | *((r4 + 0x38)) = r0;
| if (r0 == 0) {
0x000076b4 beq 0x74f0 | goto label_4;
| }
0x000076b8 ldr r7, [pc, 0xbc] | r7 = *(0x7778);
0x000076bc ldr sb, [pc, 0xbc] | sb = *(0x00007780);
0x000076c0 mov r6, 0 | r6 = 0;
0x000076c4 add r7, pc, r7 | r7 = pc + r7;
| label_8:
0x000076c8 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x000076cc cmp r3, r6 |
| if (r3 <= r6) {
0x000076d0 ble 0x7528 | goto label_7;
| }
0x000076d4 ldr r0, [sp, 0xc] | r0 = src;
0x000076d8 sub fp, r5, r0 |
0x000076dc mov r1, fp | r1 = fp;
0x000076e0 bl 0x398c | r0 = strnlen ();
0x000076e4 add sl, r0, 1 | sl = r0 + 1;
0x000076e8 cmp fp, sl |
| if (fp == sl) {
0x000076ec beq 0x74f0 | goto label_4;
| }
0x000076f0 mov r2, sl | r2 = sl;
0x000076f4 mov r1, sb | r1 = sb;
0x000076f8 mov r0, r7 | r0 = r7;
0x000076fc ldr fp, [r4, 0x38] | fp = *((r4 + 0x38));
0x00007700 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x00007704 cmp r0, 0 |
0x00007708 str r0, [fp, r6, lsl 2] | offset_2 = r6 << 2;
| *((fp + offset_2)) = r0;
| if (r0 == 0) {
0x0000770c beq 0x74f0 | goto label_4;
| }
0x00007710 ldr r3, [r4, 0x38] | r3 = *((r4 + 0x38));
0x00007714 ldr r1, [sp, 0xc] | r1 = src;
0x00007718 ldr r0, [r3, r6, lsl 2] | offset_3 = r6 << 2;
| r0 = *((r3 + offset_3));
0x0000771c bl 0x3bd8 | strcpy (r0, r1)
0x00007720 ldr r2, [sp, 0xc] | r2 = src;
0x00007724 add r6, r6, 1 | r6++;
0x00007728 add r2, r2, sl | r2 += sl;
0x0000772c str r2, [sp, 0xc] | src = r2;
0x00007730 b 0x76c8 | 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-mqtt3as.so.1.3.9 @ 0x7f00 */
| #include <stdint.h>
|
; (fcn) fcn.00007f00 () | void fcn_00007f00 (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;
0x00007f00 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00007f04 ldr r5, [r0, 0xc] | r5 = *((r0 + 0xc));
0x00007f08 mov r6, r0 | r6 = r0;
0x00007f0c ldr r3, [pc, 0x2d0] | r3 = *(0x81e0);
0x00007f10 ldr r0, [pc, 0x2d0] |
0x00007f14 sub sp, sp, 0x34 |
0x00007f18 add r3, pc, r3 | r3 = pc + r3;
0x00007f1c add r0, pc, r0 | r0 = pc + r0;
0x00007f20 str r3, [sp, 8] | var_8h = r3;
0x00007f24 mov r2, 3 | r2 = 3;
0x00007f28 mov r3, 0 | r3 = 0;
0x00007f2c ldr r1, [pc, 0x2b8] | r1 = *(0x81e8);
0x00007f30 add r0, r0, 0xaf | r0 = 0x8293;
0x00007f34 str r3, [sp, 0x1c] | var_1ch = r3;
0x00007f38 bl 0x1e0d4 | fcn_0001e0d4 (r0, r1);
0x00007f3c ldr r3, [r5, 0x84] | r3 = *((r5 + 0x84));
0x00007f40 cmp r3, 0 |
0x00007f44 bne 0x7f94 |
| while (r0 != 0) {
| label_0:
0x00007f48 mov r4, 0 | r4 = 0;
| label_1:
0x00007f4c ldr r3, [r5] | r3 = *(r5);
0x00007f50 ldr r2, [pc, 0x298] | r2 = *(0x81ec);
0x00007f54 str r3, [sp] | *(sp) = r3;
0x00007f58 add r2, pc, r2 | r2 = pc + r2;
0x00007f5c mov r3, r4 | r3 = r4;
0x00007f60 mvn r1, 0 | r1 = ~0;
0x00007f64 mov r0, 3 | r0 = 3;
0x00007f68 bl 0x16364 | fcn_00016364 (r0, r1, r2, r3);
0x00007f6c ldr r0, [pc, 0x280] |
0x00007f70 mov r3, 3 | r3 = 3;
0x00007f74 add r0, pc, r0 | r0 = pc + r0;
0x00007f78 add r2, sp, 0x1c | r2 += var_1ch;
0x00007f7c ldr r1, [pc, 0x274] | r1 = *(0x81f4);
0x00007f80 add r0, r0, 0xaf | r0 = 0x829f;
0x00007f84 bl 0x1e1bc | fcn_0001e1bc (r0, r1);
0x00007f88 ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x00007f8c add sp, sp, 0x34 |
0x00007f90 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x00007f94 ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x00007f98 add r2, sp, 0x24 | r2 += var_24h;
0x00007f9c add r1, sp, 0x20 | r1 += base;
0x00007fa0 ldr r0, [r5, 0x80] | r0 = *((r5 + 0x80));
0x00007fa4 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00007fa8 cmp r0, 0 |
0x00007fac mov r4, r0 | r4 = r0;
0x00007fb0 str r0, [sp, 0x1c] | var_1ch = r0;
0x00007fb4 bne 0x7f48 |
| }
0x00007fb8 ldr r1, [sp, 0x24] | r1 = var_24h;
0x00007fbc cmp r1, 0 |
| if (r1 <= 0) {
0x00007fc0 ble 0x7f48 | goto label_0;
| }
0x00007fc4 ldr r3, [pc, 0x230] | r3 = *(0x81f8);
0x00007fc8 mov r2, 4 | r2 = 4;
0x00007fcc add r3, pc, r3 | r3 = pc + r3;
0x00007fd0 ldr r0, [sp, 0x20] | r0 = base;
0x00007fd4 bl 0x38f0 | qsort ();
0x00007fd8 ldr r3, [pc, 0x220] | r3 = *(0x81fc);
0x00007fdc mov fp, r4 |
0x00007fe0 add r3, pc, r3 | r3 = pc + r3;
0x00007fe4 str r3, [sp, 0x10] | s2 = r3;
0x00007fe8 ldr r3, [pc, 0x214] | r3 = *(0x8200);
0x00007fec add r3, pc, r3 | r3 = pc + r3;
0x00007ff0 str r3, [sp, 0x14] | var_14h = r3;
0x00007ff4 ldr r3, [pc, 0x20c] | r3 = *(0x8204);
0x00007ff8 add r3, pc, r3 | r3 = pc + r3;
0x00007ffc str r3, [sp, 0xc] | var_ch = r3;
| label_2:
0x00008000 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00008004 ldr r2, [sp, 0x20] | r2 = base;
0x00008008 cmp r3, 0 |
| if (r3 == 0) {
0x0000800c bne 0x801c |
0x00008010 ldr r1, [sp, 0x24] | r1 = var_24h;
0x00008014 cmp r1, fp |
| if (r1 > fp) {
0x00008018 bgt 0x8038 | goto label_4;
| }
| }
0x0000801c cmp r2, 0 |
| if (r2 == 0) {
0x00008020 beq 0x7f4c | goto label_1;
| }
0x00008024 ldr r0, [pc, 0x1e0] | r0 = *(0x8208);
0x00008028 ldr r1, [pc, 0x1e0] | r1 = *(0x820c);
0x0000802c add r0, pc, r0 | r0 = pc + r0;
0x00008030 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x00008034 b 0x7f4c | goto label_1;
| label_4:
0x00008038 str r3, [sp, 0x28] | var_28h = r3;
0x0000803c ldr r8, [r2, fp, lsl 2] | offset_0 = fp << 2;
| r8 = *((r2 + offset_0));
0x00008040 ldr r1, [sp, 0x10] | r1 = s2;
0x00008044 mov r2, 2 | r2 = 2;
0x00008048 mov r0, r8 | r0 = r8;
0x0000804c bl 0x35a8 | strncmp (r0, r1, r2);
0x00008050 lsl r7, fp, 2 | r7 = fp << 2;
0x00008054 cmp r0, 0 |
| if (r0 != 0) {
0x00008058 beq 0x8078 |
0x0000805c ldr r1, [pc, 0x1b0] | r1 = *(0x8210);
0x00008060 mov r2, 3 | r2 = 3;
0x00008064 add r1, pc, r1 | r1 = pc + r1;
0x00008068 mov r0, r8 | r0 = r8;
0x0000806c bl 0x35a8 | r0 = strncmp (r0, r1, r2);
0x00008070 cmp r0, 0 |
| if (r0 != 0) {
0x00008074 bne 0x80ec | goto label_3;
| }
| }
0x00008078 ldr r3, [r5, 0x84] | r3 = *((r5 + 0x84));
0x0000807c add sl, sp, 0x2c | sl += var_2ch;
0x00008080 ldr r3, [r3, 0x10] | r3 = *((r3 + 0x10));
0x00008084 add sb, sp, 0x28 | sb += var_28h;
0x00008088 mov ip, r3 |
0x0000808c mov r2, sb | r2 = sb;
0x00008090 mov r3, sl | r3 = sl;
0x00008094 mov r1, r8 | r1 = r8;
0x00008098 ldr r0, [r5, 0x80] | r0 = *((r5 + 0x80));
0x0000809c blx ip | r0 = ip (r0, r1, r2, r3);
0x000080a0 cmp r0, 0 |
0x000080a4 str r0, [sp, 0x1c] | var_1ch = r0;
| if (r0 != 0) {
0x000080a8 bne 0x80ec | goto label_3;
| }
0x000080ac ldr r3, [r5, 0x8c] | r3 = *((r5 + 0x8c));
0x000080b0 cmp r3, 0 |
0x000080b4 bne 0x8114 |
| while (r0 == 0) {
0x000080b8 ldr r3, [sp, 0x20] | r3 = base;
0x000080bc mov r2, 3 | r2 = 3;
0x000080c0 ldr r1, [sp, 0x14] | r1 = var_14h;
0x000080c4 ldr r0, [r3, r7] | r0 = *((r3 + r7));
0x000080c8 bl 0x35a8 | strncmp (r0, r1, r2);
0x000080cc mov r3, 0 | r3 = 0;
0x000080d0 cmp r0, 0 |
| if (r0 != 0) {
0x000080d4 moveq r2, 5 | r2 = 5;
| }
| if (r0 == 0) {
0x000080d8 movne r2, 4 | r2 = 4;
| }
0x000080dc ldrd r0, r1, [sp, 0x28] | __asm ("ldrd r0, r1, [var_28h]");
0x000080e0 bl 0x72b4 | r0 = fcn_000072b4 (r0, r1);
0x000080e4 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x000080e8 bne 0x8134 | goto label_5;
| }
| label_3:
0x000080ec ldr r3, [sp, 0x20] | r3 = base;
0x000080f0 ldr r2, [r3, r7] | r2 = *((r3 + r7));
0x000080f4 cmp r2, 0 |
| if (r2 != 0) {
0x000080f8 beq 0x810c |
0x000080fc ldr r0, [pc, 0x114] | r0 = *(0x8214);
0x00008100 ldr r1, [pc, 0x114] | r1 = *(0x8218);
0x00008104 add r0, pc, r0 | r0 = pc + r0;
0x00008108 bl 0x1e960 | fcn_0001e960 (r0, r1);
| }
0x0000810c add fp, fp, 1 |
0x00008110 b 0x8000 | goto label_2;
0x00008114 mov r2, sl | r2 = sl;
0x00008118 mov r1, sb | r1 = sb;
0x0000811c ldr r0, [r5, 0x94] | r0 = *((r5 + 0x94));
0x00008120 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x00008124 cmp r0, 0 |
0x00008128 str r0, [sp, 0x1c] | var_1ch = r0;
0x0000812c beq 0x80b8 |
| }
0x00008130 b 0x80ec | goto label_3;
| label_5:
0x00008134 ldr r3, [sp, 0x20] | r3 = base;
0x00008138 ldr r0, [r3, r7] | r0 = *((r3 + r7));
0x0000813c bl 0x3608 | strlen (r0);
0x00008140 ldr r1, [pc, 0xd8] | r1 = *(0x821c);
0x00008144 add r2, r0, 1 | r2 = r0 + 1;
0x00008148 ldr r0, [sp, 0xc] | r0 = var_ch;
0x0000814c bl 0x1e7a4 | fcn_0001e7a4 (r0, r1);
0x00008150 ldr r3, [sp, 0x20] | r3 = base;
0x00008154 str r0, [r8, 0x5c] | *((r8 + 0x5c)) = r0;
0x00008158 ldr r1, [r3, r7] | r1 = *((r3 + r7));
0x0000815c bl 0x3bd8 | strcpy (r0, r1)
0x00008160 ldr r3, [sp, 0x20] | r3 = base;
0x00008164 mov r1, 0x2d | r1 = 0x2d;
0x00008168 ldr r0, [r3, r7] | r0 = *((r3 + r7));
0x0000816c str r6, [r8, 0x50] | *((r8 + 0x50)) = r6;
0x00008170 bl 0x3b30 | r0 = strchr (r0, r1);
0x00008174 add r0, r0, 1 | r0++;
0x00008178 bl 0x3b18 | atoi (r0);
0x0000817c ldr r2, [sp, 8] | r2 = var_8h;
0x00008180 ldr r3, [pc, 0x9c] | r3 = *(0x8220);
0x00008184 mov r1, r8 | r1 = r8;
0x00008188 str r0, [r8, 0x54] | *((r8 + 0x54)) = r0;
0x0000818c ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00008190 mov r2, 0x60 | r2 = 0x60;
0x00008194 ldr r0, [r3] | r0 = *(0x8220);
0x00008198 bl 0x1ae08 | fcn_0001ae08 (r0, r1);
0x0000819c ldr r2, [sp, 0x28] | r2 = var_28h;
0x000081a0 cmp r2, 0 |
| if (r2 != 0) {
0x000081a4 beq 0x81b4 |
0x000081a8 ldr r1, [pc, 0x78] | r1 = *(0x8224);
0x000081ac ldr r0, [sp, 0xc] | r0 = var_ch;
0x000081b0 bl 0x1e960 | fcn_0001e960 (r0, r1);
| }
0x000081b4 ldr r3, [r8, 0x54] | r3 = *((r8 + 0x54));
0x000081b8 ldr r2, [r6, 0xe8] | r2 = *((r6 + 0xe8));
0x000081bc add r4, r4, 1 | r4++;
0x000081c0 cmp r2, r3 |
| if (r2 < r3) {
0x000081c4 strhs r2, [r6, 0xe8] | *((r6 + 0xe8)) = r2;
| }
| if (r2 >= r3) {
0x000081c8 strlo r3, [r6, 0xe8] | *((r6 + 0xe8)) = r3;
| }
0x000081cc ldr r3, [r8] | r3 = *(r8);
0x000081d0 cmp r3, 3 |
| if (r3 != 3) {
0x000081d4 ldreq r3, [r6, 0xf8] | r3 = *((r6 + 0xf8));
| }
| if (r3 != 3) {
0x000081d8 addeq r3, r3, 1 | r3++;
| }
| if (r3 != 3) {
0x000081dc streq r3, [r6, 0xf8] | *((r6 + 0xf8)) = r3;
| }
0x000081e0 b 0x80ec | 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-mqtt3as.so.1.3.9 @ 0x8430 */
| #include <stdint.h>
|
; (fcn) fcn.00008430 () | void fcn_00008430 (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;
0x00008430 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00008434 ldr fp, [pc, 0x89c] | fp = *(0x00008cd8);
0x00008438 mov r4, r0 | r4 = r0;
0x0000843c ldr r0, [pc, 0x898] |
0x00008440 sub sp, sp, 0x44 |
0x00008444 add r0, pc, r0 | r0 = pc + r0;
0x00008448 mov r3, 0 | r3 = 0;
0x0000844c mov r2, 3 | r2 = 3;
0x00008450 add r0, r0, 0xf0 | r0 = 0x8dc8;
0x00008454 mov r5, r1 | r5 = r1;
0x00008458 ldr r1, [pc, 0x880] | r1 = *(0x8cdc);
0x0000845c str r3, [sp, 0x28] | var_28h = r3;
0x00008460 bl 0x1e0d4 | fcn_0001e0d4 (r0, r1);
0x00008464 ldr r3, [pc, 0x878] | r3 = *(0x8ce0);
0x00008468 add fp, pc, fp |
0x0000846c ldr r3, [fp, r3] | r3 = *((fp + r3));
0x00008470 ldr r0, [r3] | r0 = *(0x8ce0);
0x00008474 str r3, [sp, 0xc] | var_ch = r3;
0x00008478 bl 0x7c18 | fcn_00007c18 ();
0x0000847c ldr r3, [r4] | r3 = *(r4);
0x00008480 cmp r3, 1 |
| if (r3 == 1) {
0x00008484 bne 0x849c |
0x00008488 ldr r3, [r4, 0x50] | r3 = *((r4 + 0x50));
0x0000848c ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
0x00008490 ldrh r3, [r3, 0x10] | r3 = *((r3 + 0x10));
0x00008494 tst r3, 0x3c0 |
| if ((r3 & 0x3c0) != 0) {
0x00008498 bne 0x84b4 | goto label_12;
| }
| }
0x0000849c add r6, sp, 0x20 | r6 += var_20h;
0x000084a0 mov r0, r6 | r0 = r6;
0x000084a4 bl 0xe8f0 | r0 = fcn_0000e8f0 (r0);
0x000084a8 ldm r6, {r0, r1} | r0 = *(r6);
| r1 = *((r6 + 4));
0x000084ac add r3, r4, 0x1c | r3 = r4 + 0x1c;
0x000084b0 stm r3, {r0, r1} | *(r3) = r0;
| *((r3 + 4)) = r1;
| label_12:
0x000084b4 ldr r2, [pc, 0x82c] | r2 = *(0x8ce4);
0x000084b8 ldr r3, [r4] | r3 = *(r4);
0x000084bc ldr r2, [fp, r2] | r2 = *((fp + r2));
0x000084c0 cmp r3, 1 |
0x000084c4 str r2, [sp, 8] | var_8h = r2;
| if (r3 != 1) {
0x000084c8 beq 0x84e0 |
0x000084cc cmp r3, 0xe |
| if (r3 != 0xe) {
0x000084d0 bne 0x8534 | goto label_13;
| }
0x000084d4 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x000084d8 cmp r3, 0 |
| if (r3 == 0) {
0x000084dc beq 0x8534 | goto label_13;
| }
| }
0x000084e0 ldr r3, [sp, 8] | r3 = var_8h;
0x000084e4 ldr r0, [r3] | r0 = *(r3);
0x000084e8 ldr r3, [r0] | r3 = *(r0);
0x000084ec mov r2, r3 | r2 = r3;
| label_0:
0x000084f0 cmp r2, 0 |
0x000084f4 bne 0x8508 |
| while (ip != 1) {
0x000084f8 mov r2, r5 | r2 = r5;
0x000084fc mov r1, r4 | r1 = r4;
0x00008500 bl 0x1ae54 | fcn_0001ae54 (r0, r1);
0x00008504 b 0x8780 | goto label_11;
0x00008508 ldr r1, [r2, 8] | r1 = *((r2 + 8));
0x0000850c ldr ip, [r1] | ip = *(r1);
0x00008510 cmp ip, 1 |
0x00008514 cmpne ip, 0xe | __asm ("cmpne ip, 0xe");
0x00008518 bne 0x84f8 |
| }
0x0000851c ldr ip, [r1, 0x50] | ip = *((r1 + 0x50));
0x00008520 ldr r1, [r4, 0x50] | r1 = *((r4 + 0x50));
0x00008524 cmp ip, r1 |
| if (ip == r1) {
0x00008528 beq 0x8c8c | goto label_14;
| }
0x0000852c ldr r2, [r2] | r2 = *(r2);
0x00008530 b 0x84f0 | goto label_0;
| label_13:
0x00008534 ldr r3, [sp, 8] | r3 = var_8h;
0x00008538 mov r2, r5 | r2 = r5;
0x0000853c ldr r0, [r3] | r0 = *(r3);
0x00008540 mov r1, r4 | r1 = r4;
0x00008544 bl 0x1ae08 | fcn_0001ae08 (r0, r1);
0x00008548 ldr sb, [r4, 0x50] | sb = *((r4 + 0x50));
0x0000854c ldr r3, [sb, 0xc] | r3 = *((sb + 0xc));
0x00008550 ldr r3, [r3, 0x84] | r3 = *((r3 + 0x84));
0x00008554 cmp r3, 0 |
| if (r3 == 0) {
0x00008558 beq 0x8c08 | goto label_15;
| }
0x0000855c ldr r3, [r4] | r3 = *(r4);
0x00008560 cmp r3, 3 |
| if (r3 == 3) {
0x00008564 bne 0x8598 |
0x00008568 ldr r3, [sb, 0xf0] | r3 = *((sb + 0xf0));
0x0000856c cmp r3, 0 |
| if (r3 == 0) {
0x00008570 beq 0x8598 | goto label_16;
| }
0x00008574 ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x00008578 cmp r2, 1 |
| if (r2 <= 1) {
0x0000857c ble 0x8598 | goto label_16;
| }
0x00008580 ldr r3, [r3, 0x20] | r3 = *((r3 + 0x20));
0x00008584 cmp r3, 0 |
| if (r3 != 0) {
0x00008588 bne 0x8598 | goto label_16;
| }
0x0000858c ldr r3, [r4, 0x40] | r3 = *((r4 + 0x40));
0x00008590 cmp r3, 0 |
| if (r3 == 0) {
0x00008594 beq 0x8c14 | goto label_17;
| }
| }
| label_16:
0x00008598 ldr r0, [pc, 0x74c] |
0x0000859c mov r2, 3 | r2 = 3;
0x000085a0 add r0, pc, r0 | r0 = pc + r0;
0x000085a4 add r0, r0, 0x104 | r0 = 0x8dec;
0x000085a8 mov r7, 0 | r7 = 0;
0x000085ac ldr r1, [pc, 0x73c] | r1 = *(0x8cec);
0x000085b0 add r0, r0, 1 | r0++;
0x000085b4 str r7, [sp, 0x2c] | var_2ch = r7;
0x000085b8 bl 0x1e0d4 | fcn_0001e0d4 (r0, r1);
0x000085bc ldr r2, [r4] | r2 = *(r4);
0x000085c0 ldr r3, [sb, 0xc] | r3 = *((sb + 0xc));
0x000085c4 cmp r2, 8 |
| if (r2 != 8) {
0x000085c8 beq 0x8698 |
0x000085cc cmp r2, 0xa |
| if (r2 == 0xa) {
0x000085d0 beq 0x89fc | goto label_18;
| }
0x000085d4 cmp r2, 3 |
| if (r2 != 3) {
0x000085d8 bne 0x8ab8 | goto label_19;
| }
0x000085dc ldr r3, [r3, 0x9c] | r3 = *((r3 + 0x9c));
0x000085e0 ldr r5, [pc, 0x70c] | r5 = *(0x8cf0);
0x000085e4 cmp r3, 5 |
| if (r3 >= 5) {
0x000085e8 movlt sl, 7 | sl = 7;
| }
| if (r3 < 5) {
0x000085ec movge sl, 8 | sl = 8;
| }
0x000085f0 lsl r7, sl, 2 | r7 = sl << 2;
0x000085f4 add r5, pc, r5 | r5 = pc + r5;
0x000085f8 mov r2, r7 | r2 = r7;
0x000085fc mov r1, 0x150 | r1 = 0x150;
0x00008600 mov r0, r5 | r0 = r5;
0x00008604 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x00008608 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x0000860c beq 0x86d4 | goto label_3;
| }
0x00008610 mov r0, r5 | r0 = r5;
0x00008614 mov r2, r7 | r2 = r7;
0x00008618 ldr r1, [pc, 0x6d8] | r1 = *(0x8cf4);
0x0000861c bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x00008620 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00008624 beq 0x86d4 | goto label_3;
| }
0x00008628 mov r7, 4 | r7 = 4;
0x0000862c add r3, r4, 0x14 | r3 = r4 + 0x14;
0x00008630 str r4, [r5] | *(r5) = r4;
0x00008634 str r7, [r6] | *(r6) = r7;
0x00008638 str r3, [r5, 4] | *((r5 + 4)) = r3;
0x0000863c str r7, [r6, 4] | *((r6 + 4)) = r7;
0x00008640 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
0x00008644 mov r8, 7 | r8 = 7;
0x00008648 str r3, [r5, 8] | *((r5 + 8)) = r3;
0x0000864c ldr r0, [r4, 0x34] | r0 = *((r4 + 0x34));
0x00008650 bl 0x3608 | strlen (r0);
0x00008654 add r3, r4, 0x38 | r3 = r4 + 0x38;
0x00008658 add r0, r0, 1 | r0++;
0x0000865c str r0, [r6, 8] | *((r6 + 8)) = r0;
0x00008660 str r3, [r5, 0xc] | *((r5 + 0xc)) = r3;
0x00008664 str r7, [r6, 0xc] | *((r6 + 0xc)) = r7;
0x00008668 ldr r3, [r4, 0x3c] | r3 = *((r4 + 0x3c));
0x0000866c str r3, [r5, 0x10] | *((r5 + 0x10)) = r3;
0x00008670 ldr r3, [r4, 0x38] | r3 = *((r4 + 0x38));
0x00008674 str r3, [r6, 0x10] | *((r6 + 0x10)) = r3;
0x00008678 add r3, r4, 0x40 | r3 = r4 + 0x40;
0x0000867c str r3, [r5, 0x14] | *((r5 + 0x14)) = r3;
0x00008680 add r3, r4, 0x44 | r3 = r4 + 0x44;
0x00008684 str r7, [r6, 0x14] | *((r6 + 0x14)) = r7;
0x00008688 str r3, [r5, 0x18] | *((r5 + 0x18)) = r3;
0x0000868c str r7, [r6, 0x18] | *((r6 + 0x18)) = r7;
0x00008690 mov r7, 1 | r7 = 1;
0x00008694 b 0x883c | goto label_6;
| }
0x00008698 ldr r3, [r3, 0x9c] | r3 = *((r3 + 0x9c));
0x0000869c ldr r5, [pc, 0x658] | r5 = *(0x8cf8);
0x000086a0 cmp r3, 5 |
0x000086a4 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
| if (r3 >= 5) {
0x000086a8 movlt sl, 3 | sl = 3;
| }
| if (r3 < 5) {
0x000086ac movge sl, 4 | sl = 4;
| }
0x000086b0 add sl, sl, r3, lsl 1 | sl += (r3 << 1);
0x000086b4 lsl r8, sl, 2 | r8 = sl << 2;
0x000086b8 add r5, pc, r5 | r5 = pc + r5;
0x000086bc mov r2, r8 | r2 = r8;
0x000086c0 ldr r1, [pc, 0x638] | r1 = *(0x8cfc);
0x000086c4 mov r0, r5 | r0 = r5;
0x000086c8 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x000086cc subs r6, r0, 0 | r6 = r0 - 0;
0x000086d0 bne 0x87e0 |
| while (r5 == r0) {
| label_3:
0x000086d4 mvn r3, 0x62 | r3 = ~0x62;
0x000086d8 cmp r6, 0 |
0x000086dc str r3, [sp, 0x2c] | var_2ch = r3;
| if (r6 == 0) {
0x000086e0 movne r5, 0 | r5 = 0;
| }
| if (r6 != 0) {
0x000086e4 bne 0x8b7c | goto label_20;
| }
| label_1:
0x000086e8 ldr r0, [pc, 0x614] |
0x000086ec mov r3, 3 | r3 = 3;
0x000086f0 add r0, pc, r0 | r0 = pc + r0;
0x000086f4 add r0, r0, 0x104 | r0 = 0x8e04;
0x000086f8 add r2, sp, 0x2c | r2 += var_2ch;
0x000086fc ldr r1, [pc, 0x604] | r1 = *(0x8d04);
0x00008700 add r0, r0, 1 | r0++;
0x00008704 bl 0x1e1bc | fcn_0001e1bc (r0, r1);
0x00008708 ldr r2, [r4] | r2 = *(r4);
0x0000870c ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00008710 cmp r2, 3 |
0x00008714 cmpeq r3, 0 | __asm ("cmpeq r3, 0");
| if (r2 != 3) {
0x00008718 bne 0x8c08 | goto label_15;
| }
0x0000871c ldr r2, [r4, 0x50] | r2 = *((r4 + 0x50));
0x00008720 mov r3, 1 | r3 = 1;
0x00008724 ldr r2, [r2, 0xc] | r2 = *((r2 + 0xc));
0x00008728 str r3, [r4, 0x58] | *((r4 + 0x58)) = r3;
0x0000872c ldr r2, [r2, 0x9c] | r2 = *((r2 + 0x9c));
0x00008730 ldr r3, [r4, 0x54] | r3 = *((r4 + 0x54));
0x00008734 cmp r2, 4 |
0x00008738 str r3, [sp] | *(sp) = r3;
0x0000873c add r6, sp, 0x34 | r6 += src;
| if (r2 <= 4) {
0x00008740 ble 0x8b94 | goto label_21;
| }
0x00008744 ldr r3, [pc, 0x5c0] | r3 = *(0x8d08);
0x00008748 ldr r2, [pc, 0x5c0] | r2 = *(0x8d0c);
0x0000874c add r3, pc, r3 | r3 = pc + r3;
0x00008750 add r2, pc, r2 | r2 = pc + r2;
| label_10:
0x00008754 mov r1, 0xb | r1 = 0xb;
0x00008758 mov r0, r6 | r0 = r6;
0x0000875c bl 0x3638 | r0 = snprintf (r0, r1, r2, r3);
0x00008760 cmp r0, 0xa |
| if (r0 <= 0xa) {
0x00008764 ble 0x8ba8 | goto label_22;
| }
0x00008768 ldr r2, [pc, 0x5a4] | r2 = *(0x8d10);
0x0000876c mov r3, r0 | r3 = r0;
0x00008770 add r2, pc, r2 | r2 = pc + r2;
0x00008774 mov r1, 0 | r1 = 0;
0x00008778 mov r0, 5 | r0 = 5;
0x0000877c bl 0x16364 | fcn_00016364 (r0, r1, r2, r3);
| label_11:
0x00008780 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00008784 ldr r0, [r3] | r0 = *(r3);
0x00008788 bl 0x7c4c | fcn_00007c4c ();
0x0000878c ldr r3, [pc, 0x584] | r3 = *(0x8d14);
0x00008790 ldr r3, [fp, r3] | r3 = *((fp + r3));
0x00008794 ldr r0, [r3] | r0 = *(0x8d14);
0x00008798 bl 0x186dc | r0 = fcn_000186dc (r0);
0x0000879c subs r3, r0, 0 | r3 = r0 - 0;
| if (r3 != r0) {
0x000087a0 beq 0x87b8 |
0x000087a4 ldr r2, [pc, 0x570] | r2 = *(0x8d18);
0x000087a8 mov r1, 0 | r1 = 0;
0x000087ac add r2, pc, r2 | r2 = pc + r2;
0x000087b0 mov r0, 5 | r0 = 5;
0x000087b4 bl 0x16364 | fcn_00016364 (r0, r1, r2, r3);
| }
0x000087b8 ldr r0, [pc, 0x560] |
0x000087bc mov r3, 3 | r3 = 3;
0x000087c0 add r0, pc, r0 | r0 = pc + r0;
0x000087c4 add r2, sp, 0x28 | r2 += var_28h;
0x000087c8 mov r1, 0x390 | r1 = 0x390;
0x000087cc add r0, r0, 0xf0 | r0 = 0x8e0c;
0x000087d0 bl 0x1e1bc | fcn_0001e1bc (r0, r1);
0x000087d4 ldr r0, [sp, 0x28] | r0 = var_28h;
0x000087d8 add sp, sp, 0x44 |
0x000087dc pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x000087e0 mov r0, r5 | r0 = r5;
0x000087e4 mov r2, r8 | r2 = r8;
0x000087e8 ldr r1, [pc, 0x534] | r1 = *(0x8d20);
0x000087ec bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x000087f0 subs r5, r0, 0 | r5 = r0 - 0;
0x000087f4 beq 0x86d4 |
| }
0x000087f8 mov r1, 4 | r1 = 4;
0x000087fc add r3, r4, 0x14 | r3 = r4 + 0x14;
0x00008800 str r4, [r5] | *(r5) = r4;
0x00008804 str r1, [r6] | *(r6) = r1;
0x00008808 str r3, [r5, 4] | *((r5 + 4)) = r3;
0x0000880c add r3, r4, 0x34 | r3 = r4 + 0x34;
0x00008810 str r1, [r6, 4] | *((r6 + 4)) = r1;
0x00008814 add r2, r4, 0x40 | r2 = r4 + 0x40;
0x00008818 str r3, [r5, 8] | *((r5 + 8)) = r3;
0x0000881c mov r8, 3 | r8 = 3;
0x00008820 mov r3, 0xc | r3 = 0xc;
0x00008824 str r1, [r6, 8] | *((r6 + 8)) = r1;
0x00008828 str r2, [sp, 0x10] | var_10h = r2;
| label_2:
0x0000882c ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x00008830 cmp r7, r2 |
| if (r7 < r2) {
0x00008834 blt 0x8958 | goto label_23;
| }
| label_4:
0x00008838 mov r7, 1 | r7 = 1;
| label_6:
0x0000883c ldr r3, [sb, 0xe8] | r3 = *((sb + 0xe8));
0x00008840 ldr r2, [pc, 0x4e0] | r2 = *(0x8d24);
0x00008844 add r3, r3, 1 | r3++;
0x00008848 cmp r3, r2 |
| if (r3 != r2) {
0x0000884c moveq r3, 0 | r3 = 0;
| }
0x00008850 str r3, [sb, 0xe8] | *((sb + 0xe8)) = r3;
0x00008854 ldr r3, [sb, 0xc] | r3 = *((sb + 0xc));
0x00008858 ldr r3, [r3, 0x9c] | r3 = *((r3 + 0x9c));
0x0000885c cmp r3, 4 |
| if (r3 > 4) {
0x00008860 movle r7, 0 | r7 = 0;
| }
| if (r3 <= 4) {
0x00008864 andgt r7, r7, 1 | r7 &= 1;
| }
0x00008868 cmp r7, 0 |
| if (r7 == 0) {
0x0000886c beq 0x8acc | goto label_24;
| }
0x00008870 mov r3, 0 | r3 = 0;
0x00008874 str r3, [sp, 0x30] | var_30h = r3;
0x00008878 add r3, r4, 0x24 | r3 = r4 + 0x24;
0x0000887c mov r0, r3 | r0 = r3;
0x00008880 str r3, [sp, 0x10] | var_10h = r3;
0x00008884 bl 0x1b370 | fcn_0001b370 (r0);
0x00008888 ldr r1, [pc, 0x49c] | r1 = *(0x8d28);
0x0000888c mov r2, r0 | r2 = r0;
0x00008890 mov r7, r0 | r7 = r0;
0x00008894 ldr r0, [pc, 0x494] | r0 = *(0x8d2c);
0x00008898 add r0, pc, r0 | r0 = pc + r0;
0x0000889c bl 0x1e7a4 | fcn_0001e7a4 (r0, r1);
0x000088a0 ldr r3, [sp, 0x10] | r3 = var_10h;
0x000088a4 cmp r0, 0 |
| if (r0 != 0) {
0x000088a8 mvneq r3, 0x62 | r3 = ~0x62;
| }
0x000088ac str r0, [r5, r8, lsl 2] | offset_0 = r8 << 2;
| *((r5 + offset_0)) = r0;
0x000088b0 str r0, [sp, 0x30] | var_30h = r0;
| if (r0 != 0) {
0x000088b4 streq r3, [sp, 0x2c] | var_2ch = r3;
| }
| if (r0 != 0) {
0x000088b8 beq 0x8930 |
0x000088bc mov r1, r3 | r1 = r3;
0x000088c0 add r0, sp, 0x30 | r0 += var_30h;
0x000088c4 bl 0x1b620 | fcn_0001b620 (r0, r1);
0x000088c8 ldr r2, [pc, 0x464] | r2 = *(0x8d30);
0x000088cc mov r1, 0xb | r1 = 0xb;
0x000088d0 add r2, pc, r2 | r2 = pc + r2;
0x000088d4 str r0, [sp, 0x2c] | var_2ch = r0;
0x000088d8 str r7, [r6, r8, lsl 2] | offset_1 = r8 << 2;
| *((r6 + offset_1)) = r7;
0x000088dc ldr r3, [sb, 0xe8] | r3 = *((sb + 0xe8));
0x000088e0 add r0, sp, 0x34 | r0 += src;
0x000088e4 str r3, [sp] | *(sp) = r3;
0x000088e8 ldr r3, [pc, 0x448] | r3 = *(0x8d34);
0x000088ec add r3, pc, r3 | r3 = pc + r3;
0x000088f0 bl 0x3638 | r0 = snprintf (r0, r1, r2, r3);
| label_7:
0x000088f4 cmp r0, 0xa |
| if (r0 <= 0xa) {
0x000088f8 ble 0x8af8 | goto label_25;
| }
0x000088fc ldr r2, [pc, 0x438] | r2 = *(0x8d38);
0x00008900 mov r3, r0 | r3 = r0;
0x00008904 add r2, pc, r2 | r2 = pc + r2;
0x00008908 mov r1, 0 | r1 = 0;
0x0000890c mov r0, 5 | r0 = 5;
0x00008910 bl 0x16364 | fcn_00016364 (r0, r1, r2, r3);
| label_8:
0x00008914 cmp r8, 0 |
| if (r8 == 0) {
0x00008918 beq 0x8930 | goto label_26;
| }
0x0000891c ldr r0, [pc, 0x41c] | r0 = *(0x8d3c);
0x00008920 ldr r2, [r5, r8, lsl 2] | offset_2 = r8 << 2;
| r2 = *((r5 + offset_2));
0x00008924 mov r1, 0x19c | r1 = 0x19c;
0x00008928 add r0, pc, r0 | r0 = pc + r0;
0x0000892c bl 0x1e960 | fcn_0001e960 (r0, r1);
| }
| label_26:
0x00008930 cmp r6, 0 |
| if (r6 != 0) {
0x00008934 bne 0x8b7c | goto label_20;
| }
| label_9:
0x00008938 cmp r5, 0 |
| if (r5 == 0) {
0x0000893c beq 0x86e8 | goto label_1;
| }
0x00008940 ldr r0, [pc, 0x3fc] | r0 = *(0x8d40);
0x00008944 mov r2, r5 | r2 = r5;
0x00008948 mov r1, 0x1a0 | r1 = 0x1a0;
0x0000894c add r0, pc, r0 | r0 = pc + r0;
0x00008950 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x00008954 b 0x86e8 | goto label_1;
| label_23:
0x00008958 ldr r0, [r4, 0x38] | r0 = *((r4 + 0x38));
0x0000895c lsl r2, r7, 2 | r2 = r7 << 2;
0x00008960 ldr r0, [r0, r7, lsl 2] | offset_3 = r7 << 2;
| r0 = *((r0 + offset_3));
0x00008964 str r1, [sp, 0x1c] | var_1ch = r1;
0x00008968 str r0, [r5, r8, lsl 2] | offset_4 = r8 << 2;
| *((r5 + offset_4)) = r0;
0x0000896c ldr r0, [r4, 0x38] | r0 = *((r4 + 0x38));
0x00008970 str r3, [sp, 0x18] | var_18h = r3;
0x00008974 ldr r0, [r0, r7, lsl 2] | offset_5 = r7 << 2;
| r0 = *((r0 + offset_5));
0x00008978 str r2, [sp, 0x14] | var_14h = r2;
0x0000897c bl 0x3608 | strlen (r0);
0x00008980 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00008984 ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x00008988 add r0, r0, 1 | r0++;
0x0000898c str r0, [r6, r8, lsl 2] | offset_6 = r8 << 2;
| *((r6 + offset_6)) = r0;
0x00008990 ldr r0, [sb, 0xc] | r0 = *((sb + 0xc));
0x00008994 add r8, r8, 2 | r8 += 2;
0x00008998 ldr r0, [r0, 0x9c] | r0 = *((r0 + 0x9c));
0x0000899c cmp r0, 4 |
0x000089a0 lsl r0, r7, 3 | r0 = r7 << 3;
| if (r0 > 4) {
0x000089a4 bgt 0x89cc | goto label_27;
| }
0x000089a8 ldr lr, [r4, 0x3c] |
0x000089ac ldr r2, [sp, 0x14] | r2 = var_14h;
0x000089b0 add ip, r5, r0 |
0x000089b4 add r2, lr, r2 | r2 = lr + r2;
0x000089b8 add r0, r6, r0 | r0 = r6 + r0;
0x000089bc str r2, [ip, 0x10] | *((ip + 0x10)) = r2;
0x000089c0 str r1, [r0, 0x10] | *((r0 + 0x10)) = r1;
| do {
0x000089c4 add r7, r7, 1 | r7++;
0x000089c8 b 0x882c | goto label_2;
| label_27:
0x000089cc ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x000089d0 cmp r2, 1 |
| if (r2 == 1) {
0x000089d4 ldrne r2, [r4, 0x4c] | r2 = *((r4 + 0x4c));
| }
| if (r2 != 1) {
0x000089d8 ldreq ip, [sp, 0x10] | ip = var_10h;
| }
0x000089dc mlane lr, r3, r7, r2 | __asm ("mlane lr, r3, r7, r2");
| if (r2 != 1) {
0x000089e0 addeq r2, r5, r0 | r2 = r5 + r0;
| }
| if (r2 == 1) {
0x000089e4 addne ip, r5, r0 |
| }
0x000089e8 add r0, r6, r0 | r0 = r6 + r0;
| if (r2 != 1) {
0x000089ec streq ip, [r2, 0x10] | *((r2 + 0x10)) = ip;
| }
| if (r2 == 1) {
0x000089f0 strne lr, [ip, 0x10] |
| }
0x000089f4 str r3, [r0, 0x10] | *((r0 + 0x10)) = r3;
0x000089f8 b 0x89c4 |
| } while (1);
| label_18:
0x000089fc ldr r3, [r3, 0x9c] | r3 = *((r3 + 0x9c));
0x00008a00 ldr r5, [pc, 0x340] | r5 = *(0x8d44);
0x00008a04 cmp r3, 5 |
0x00008a08 ldr r3, [r4, 0x34] | r3 = *((r4 + 0x34));
| if (r3 >= 5) {
0x00008a0c movlt sl, 3 | sl = 3;
| }
| if (r3 < 5) {
0x00008a10 movge sl, 4 | sl = 4;
| }
0x00008a14 add sl, sl, r3 | sl += r3;
0x00008a18 lsl r7, sl, 2 | r7 = sl << 2;
0x00008a1c add r5, pc, r5 | r5 = pc + r5;
0x00008a20 mov r2, r7 | r2 = r7;
0x00008a24 ldr r1, [pc, 0x320] | r1 = *(0x8d48);
0x00008a28 mov r0, r5 | r0 = r5;
0x00008a2c bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x00008a30 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x00008a34 beq 0x86d4 | goto label_3;
| }
0x00008a38 mov r0, r5 | r0 = r5;
0x00008a3c mov r2, r7 | r2 = r7;
0x00008a40 ldr r1, [pc, 0x308] | r1 = *(0x8d4c);
0x00008a44 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x00008a48 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00008a4c beq 0x86d4 | goto label_3;
| }
0x00008a50 mov r3, 4 | r3 = 4;
0x00008a54 add r2, r4, 0x14 | r2 = r4 + 0x14;
0x00008a58 str r4, [r5] | *(r5) = r4;
0x00008a5c mov r7, 3 | r7 = 3;
0x00008a60 str r3, [r6] | *(r6) = r3;
0x00008a64 str r2, [r5, 4] | *((r5 + 4)) = r2;
0x00008a68 add r2, r4, 0x34 | r2 = r4 + 0x34;
0x00008a6c str r3, [r6, 4] | *((r6 + 4)) = r3;
0x00008a70 str r2, [r5, 8] | *((r5 + 8)) = r2;
0x00008a74 str r3, [r6, 8] | *((r6 + 8)) = r3;
| label_5:
0x00008a78 ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x00008a7c sub r3, r7, 3 | r3 = r7 - 3;
0x00008a80 cmp r2, r3 |
0x00008a84 mov r8, r7 | r8 = r7;
| if (r2 <= r3) {
0x00008a88 ble 0x8838 | goto label_4;
| }
0x00008a8c ldr r2, [r4, 0x38] | r2 = *((r4 + 0x38));
0x00008a90 sub r3, r7, 0xc0000003 | r3 = r7 - 0xc0000003;
0x00008a94 ldr r2, [r2, r3, lsl 2] | offset_7 = r3 << 2;
| r2 = *((r2 + offset_7));
0x00008a98 str r2, [r5, r7, lsl 2] | offset_8 = r7 << 2;
| *((r5 + offset_8)) = r2;
0x00008a9c ldr r2, [r4, 0x38] | r2 = *((r4 + 0x38));
0x00008aa0 ldr r0, [r2, r3, lsl 2] | offset_9 = r3 << 2;
| r0 = *((r2 + offset_9));
0x00008aa4 bl 0x3608 | r0 = strlen (r0);
0x00008aa8 add r0, r0, 1 | r0++;
0x00008aac str r0, [r6, r7, lsl 2] | offset_10 = r7 << 2;
| *((r6 + offset_10)) = r0;
0x00008ab0 add r7, r7, 1 | r7++;
0x00008ab4 b 0x8a78 | goto label_5;
| label_19:
0x00008ab8 mov sl, r7 | sl = r7;
0x00008abc mov r8, r7 | r8 = r7;
0x00008ac0 mov r5, r7 | r5 = r7;
0x00008ac4 mov r6, r7 | r6 = r7;
0x00008ac8 b 0x883c | goto label_6;
| label_24:
0x00008acc ldr r3, [sb, 0xe8] | r3 = *((sb + 0xe8));
0x00008ad0 ldr r2, [pc, 0x27c] | r2 = *(0x8d50);
0x00008ad4 str r3, [sp] | *(sp) = r3;
0x00008ad8 ldr r3, [pc, 0x278] | r3 = *(0x8d54);
0x00008adc add r2, pc, r2 | r2 = pc + r2;
0x00008ae0 add r3, pc, r3 | r3 = pc + r3;
0x00008ae4 mov r1, 0xb | r1 = 0xb;
0x00008ae8 add r0, sp, 0x34 | r0 += src;
0x00008aec bl 0x3638 | snprintf (r0, r1, r2, r3);
0x00008af0 mov r8, r7 | r8 = r7;
0x00008af4 b 0x88f4 | goto label_7;
| label_25:
0x00008af8 cmp sl, 0 |
| if (sl <= 0) {
0x00008afc ble 0x8914 | goto label_8;
| }
0x00008b00 ldr r0, [sb, 0xc] | r0 = *((sb + 0xc));
0x00008b04 ldr r7, [r0, 0x88] | r7 = *((r0 + 0x88));
0x00008b08 cmp r7, 0 |
| if (r7 != 0) {
0x00008b0c beq 0x8b28 |
0x00008b10 mov r3, r6 | r3 = r6;
0x00008b14 mov r2, r5 | r2 = r5;
0x00008b18 mov r1, sl | r1 = sl;
0x00008b1c ldr r0, [r0, 0x90] | r0 = *((r0 + 0x90));
0x00008b20 blx r7 | uint32_t (*r7)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00008b24 str r0, [sp, 0x2c] | var_2ch = r0;
| }
0x00008b28 ldr r0, [sb, 0xc] | r0 = *((sb + 0xc));
0x00008b2c mov r2, sl | r2 = sl;
0x00008b30 ldr r3, [r0, 0x84] | r3 = *((r0 + 0x84));
0x00008b34 add r1, sp, 0x34 | r1 += src;
0x00008b38 str r6, [sp] | *(sp) = r6;
0x00008b3c ldr r7, [r3, 0xc] | r7 = *((r3 + 0xc));
0x00008b40 ldr r0, [r0, 0x80] | r0 = *((r0 + 0x80));
0x00008b44 mov r3, r5 | r3 = r5;
0x00008b48 blx r7 | r0 = uint32_t (*r7)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00008b4c cmp r0, 0 |
0x00008b50 mov r3, r0 | r3 = r0;
0x00008b54 str r0, [sp, 0x2c] | var_2ch = r0;
| if (r0 != 0) {
0x00008b58 beq 0x8b70 |
0x00008b5c ldr r2, [pc, 0x1f8] | r2 = *(0x8d58);
0x00008b60 mov r1, 0 | r1 = 0;
0x00008b64 add r2, pc, r2 | r2 = pc + r2;
0x00008b68 mov r0, 5 | r0 = 5;
0x00008b6c bl 0x16364 | fcn_00016364 (r0, r1, r2, r3);
| }
0x00008b70 ldr r3, [sb, 0xe8] | r3 = *((sb + 0xe8));
0x00008b74 str r3, [r4, 0x54] | *((r4 + 0x54)) = r3;
0x00008b78 b 0x8914 | goto label_8;
| label_20:
0x00008b7c ldr r0, [pc, 0x1dc] | r0 = *(0x8d5c);
0x00008b80 mov r2, r6 | r2 = r6;
0x00008b84 ldr r1, [pc, 0x1d8] | r1 = *(0x8d60);
0x00008b88 add r0, pc, r0 | r0 = pc + r0;
0x00008b8c bl 0x1e960 | fcn_0001e960 (r0, r1);
0x00008b90 b 0x8938 | goto label_9;
| label_21:
0x00008b94 ldr r3, [pc, 0x1cc] | r3 = *(0x8d64);
0x00008b98 ldr r2, [pc, 0x1cc] | r2 = *(0x8d68);
0x00008b9c add r3, pc, r3 | r3 = pc + r3;
0x00008ba0 add r2, pc, r2 | r2 = pc + r2;
0x00008ba4 b 0x8754 | goto label_10;
| label_22:
0x00008ba8 mov r0, r6 | r0 = r6;
0x00008bac bl 0x3608 | strlen (r0);
0x00008bb0 ldr r5, [pc, 0x1b8] | r5 = *(0x8d6c);
0x00008bb4 ldr r1, [pc, 0x1b8] | r1 = *(0x8d70);
0x00008bb8 add r5, pc, r5 | r5 = pc + r5;
0x00008bbc add r2, r0, 1 | r2 += var_1h;
0x00008bc0 mov r0, r5 | r0 = r5;
0x00008bc4 bl 0x1e7a4 | fcn_0001e7a4 (r0, r1);
0x00008bc8 mov r1, r6 | r1 = r6;
0x00008bcc mov r6, 0 | r6 = 0;
0x00008bd0 str r0, [r4, 0x5c] | *((r4 + 0x5c)) = r0;
0x00008bd4 bl 0x3bd8 | strcpy (r0, r1)
0x00008bd8 ldr r2, [r4, 0x3c] | r2 = *((r4 + 0x3c));
0x00008bdc mov r1, 0x35c | r1 = 0x35c;
0x00008be0 mov r0, r5 | r0 = r5;
0x00008be4 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x00008be8 mov r0, r5 | r0 = r5;
0x00008bec str r6, [r4, 0x3c] | *((r4 + 0x3c)) = r6;
0x00008bf0 ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x00008bf4 ldr r1, [pc, 0x17c] | r1 = *(0x8d74);
0x00008bf8 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x00008bfc str r6, [r4, 0x34] | *((r4 + 0x34)) = r6;
0x00008c00 add r0, r4, 0x24 | r0 = r4 + 0x24;
0x00008c04 bl 0x3ac4 | fcn_00003ac4 ();
| label_15:
0x00008c08 ldr r3, [r4] | r3 = *(r4);
0x00008c0c cmp r3, 3 |
| if (r3 != 3) {
0x00008c10 bne 0x8780 | goto label_11;
| }
| label_17:
0x00008c14 ldr r2, [r4, 0x50] | r2 = *((r4 + 0x50));
0x00008c18 ldr r1, [r2, 0xf0] | r1 = *((r2 + 0xf0));
0x00008c1c ldr r3, [r2, 0xf8] | r3 = *((r2 + 0xf8));
0x00008c20 cmp r1, 0 |
| if (r1 != 0) {
0x00008c24 beq 0x8c40 |
0x00008c28 ldr r1, [r1, 0xc] | r1 = *((r1 + 0xc));
0x00008c2c cmp r1, r3 |
| if (r1 > r3) {
0x00008c30 addle r6, sp, 0x40 | r6 += var_40h;
| }
| if (r1 > r3) {
0x00008c34 movle r3, 0 | r3 = 0;
| }
| if (r1 > r3) {
0x00008c38 strle r3, [r6, -0xc]! | *((r6 -= 0xc)) = r3;
| }
| if (r1 <= r3) {
0x00008c3c ble 0x8c70 | goto label_28;
| }
| }
0x00008c40 add r3, r3, 1 | r3++;
0x00008c44 str r3, [r2, 0xf8] | *((r2 + 0xf8)) = r3;
0x00008c48 b 0x8780 | goto label_11;
| do {
0x00008c4c ldr r3, [sp, 0x34] | r3 = src;
0x00008c50 ldr r5, [r3, 8] | r5 = *((r3 + 8));
0x00008c54 ldr r3, [r4, 0x50] | r3 = *((r4 + 0x50));
0x00008c58 ldr r2, [r5, 0x50] | r2 = *((r5 + 0x50));
0x00008c5c cmp r2, r3 |
| if (r2 == r3) {
0x00008c60 bne 0x8c70 |
0x00008c64 ldr r3, [r5] | r3 = *(r5);
0x00008c68 cmp r3, 3 |
| if (r3 == 3) {
0x00008c6c beq 0x8ca0 | goto label_29;
| }
| }
| label_28:
0x00008c70 ldr r3, [sp, 8] | r3 = var_8h;
0x00008c74 mov r1, r6 | r1 = r6;
0x00008c78 ldr r0, [r3] | r0 = *(r3);
0x00008c7c bl 0x1b10c | r0 = fcn_0001b10c (r0, r1);
0x00008c80 cmp r0, 0 |
0x00008c84 bne 0x8c4c |
| } while (r0 != 0);
0x00008c88 b 0x8780 | goto label_11;
| label_14:
0x00008c8c mov r0, r4 | r0 = r4;
0x00008c90 bl 0x7230 | fcn_00007230 (r0);
0x00008c94 mvn r3, 0x11 | r3 = ~0x11;
0x00008c98 str r3, [sp, 0x28] | var_28h = r3;
0x00008c9c b 0x8780 | goto label_11;
| label_29:
0x00008ca0 ldr r3, [sp, 8] | r3 = var_8h;
0x00008ca4 mov r1, r5 | r1 = r5;
0x00008ca8 ldr r0, [r3] | r0 = *(r3);
0x00008cac bl 0x1b288 | fcn_0001b288 (r0);
0x00008cb0 mov r0, r5 | r0 = r5;
0x00008cb4 bl 0x7230 | fcn_00007230 (r0);
0x00008cb8 ldr r3, [r4, 0x50] | r3 = *((r4 + 0x50));
0x00008cbc ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
0x00008cc0 ldr r3, [r3, 0x84] | r3 = *((r3 + 0x84));
0x00008cc4 cmp r3, 0 |
| if (r3 == 0) {
0x00008cc8 beq 0x8780 | goto label_11;
| }
0x00008ccc mov r0, r5 | r0 = r5;
0x00008cd0 bl 0x7784 | fcn_00007784 (r0);
0x00008cd4 b 0x8780 | 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-mqtt3as.so.1.3.9 @ 0x15dac */
| #include <stdint.h>
|
; (fcn) fcn.00015dac () | void fcn_00015dac (int32_t arg1) {
| int32_t var_0h;
| int32_t var_8h;
| int32_t var_70h;
| r0 = arg1;
0x00015dac ldr r3, [pc, 0x3f8] | r3 = *(0x161a8);
0x00015db0 push {r4, r5, r6, r7, r8, lr} |
0x00015db4 ldr r4, [pc, 0x3f4] | r4 = *(0x161ac);
0x00015db8 add r3, pc, r3 | r3 = pc + r3;
0x00015dbc ldr r6, [r3, 8] | r6 = *(0x161b0);
0x00015dc0 mov r3, 0x12c | r3 = 0x12c;
0x00015dc4 sub sp, sp, 0x70 |
0x00015dc8 mov r5, r0 | r5 = r0;
0x00015dcc mul r0, r6, r3 | r0 = r6 * r3;
0x00015dd0 bl 0x3584 | malloc (r0);
0x00015dd4 ldr r7, [pc, 0x3d8] | r7 = *(0x161b0);
0x00015dd8 add r4, pc, r4 | r4 = pc + r4;
0x00015ddc add r7, pc, r7 | r7 = pc + r7;
0x00015de0 cmp r0, 0 |
0x00015de4 str r0, [r4, 0x1c] | *((r4 + 0x1c)) = r0;
| if (r0 == 0) {
0x00015de8 beq 0x16034 | goto label_6;
| }
0x00015dec ldr r0, [pc, 0x3c4] | r0 = *(0x161b4);
0x00015df0 str r6, [r4, 0x18] | *((r4 + 0x18)) = r6;
0x00015df4 add r0, pc, r0 | r0 = pc + r0;
0x00015df8 bl 0x3470 | r0 = getenv (r0);
0x00015dfc subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x00015e00 beq 0x15e3c | goto label_0;
| }
0x00015e04 ldrb r3, [r6] | r3 = *(r6);
0x00015e08 cmp r3, 0 |
| if (r3 == 0) {
0x00015e0c beq 0x15e3c | goto label_0;
| }
0x00015e10 ldr r1, [pc, 0x3a4] | r1 = *(0x161b8);
0x00015e14 add r1, pc, r1 | r1 = pc + r1;
0x00015e18 bl 0x3aac | r0 = strcmp (r0, r1);
0x00015e1c cmp r0, 0 |
0x00015e20 bne 0x15fb8 |
| while (r0 == 0) {
0x00015e24 ldr r3, [pc, 0x394] | r3 = *(0x161bc);
0x00015e28 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00015e2c ldr r2, [r3] | r2 = *(0x161bc);
0x00015e30 ldr r3, [pc, 0x38c] | r3 = *(0x161c0);
0x00015e34 add r3, pc, r3 | r3 = pc + r3;
0x00015e38 str r2, [r3] | *(r3) = r2;
| label_0:
0x00015e3c ldr r0, [pc, 0x384] | r0 = *(0x161c4);
0x00015e40 add r0, pc, r0 | r0 = pc + r0;
0x00015e44 bl 0x3470 | r0 = getenv (r0);
0x00015e48 subs r3, r0, 0 | r3 = r0 - 0;
| if (r3 != r0) {
0x00015e4c beq 0x15e74 |
0x00015e50 ldrb r3, [r3] | r3 = *(r3);
0x00015e54 cmp r3, 0 |
| if (r3 == 0) {
0x00015e58 beq 0x15e74 | goto label_1;
| }
0x00015e5c bl 0x3b18 | r0 = atoi (r0);
0x00015e60 cmp r0, 0 |
| if (r0 <= 0) {
0x00015e64 ble 0x1606c | goto label_7;
| }
0x00015e68 ldr r3, [pc, 0x35c] | r3 = *(0x161c8);
0x00015e6c add r3, pc, r3 | r3 = pc + r3;
0x00015e70 str r0, [r3] | *(r3) = r0;
| }
| label_1:
0x00015e74 ldr r0, [pc, 0x354] | r0 = *(0x161cc);
0x00015e78 add r0, pc, r0 | r0 = pc + r0;
0x00015e7c bl 0x3470 | r0 = getenv (r0);
0x00015e80 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x00015e84 beq 0x15ed0 |
0x00015e88 ldrb r3, [r4] | r3 = *(r4);
0x00015e8c cmp r3, 0 |
| if (r3 == 0) {
0x00015e90 beq 0x15ed0 | goto label_3;
| }
0x00015e94 ldr r1, [pc, 0x338] | r1 = *(0x161d0);
0x00015e98 add r1, pc, r1 | r1 = pc + r1;
0x00015e9c bl 0x3aac | r0 = strcmp (r0, r1);
0x00015ea0 cmp r0, 0 |
| if (r0 != 0) {
0x00015ea4 beq 0x15ec0 |
0x00015ea8 ldr r1, [pc, 0x328] | r1 = *(0x161d4);
0x00015eac mov r0, r4 | r0 = r4;
0x00015eb0 add r1, pc, r1 | r1 = pc + r1;
0x00015eb4 bl 0x3aac | r0 = strcmp (r0, r1);
0x00015eb8 cmp r0, 0 |
| if (r0 != 0) {
0x00015ebc bne 0x16080 | goto label_8;
| }
| }
0x00015ec0 ldr r3, [pc, 0x314] | r3 = *(0x161d8);
0x00015ec4 mov r2, 1 | r2 = 1;
0x00015ec8 add r3, pc, r3 | r3 = pc + r3;
| label_2:
0x00015ecc str r2, [r3, 4] | *((r3 + 4)) = r2;
| }
| label_3:
0x00015ed0 ldr r1, [pc, 0x308] | r1 = *(0x161dc);
0x00015ed4 mov r0, 3 | r0 = 3;
0x00015ed8 add r1, pc, r1 | r1 = pc + r1;
0x00015edc bl 0x15904 | fcn_00015904 (r0, r1);
0x00015ee0 ldr r1, [pc, 0x2fc] | r1 = *(0x161e0);
0x00015ee4 mov r0, 3 | r0 = 3;
0x00015ee8 add r1, pc, r1 | r1 = pc + r1;
0x00015eec bl 0x15904 | fcn_00015904 (r0, r1);
0x00015ef0 cmp r5, 0 |
| if (r5 != 0) {
0x00015ef4 beq 0x15f20 |
0x00015ef8 add r4, r5, 8 | r4 = r5 + 8;
0x00015efc ldr r5, [pc, 0x2e4] |
0x00015f00 ldr r6, [pc, 0x2e4] | r6 = *(0x161e8);
0x00015f04 add r5, pc, r5 | r5 = pc + r5;
0x00015f08 add r6, pc, r6 | r6 = pc + r6;
0x00015f0c add r5, r5, 0x24 | r5 = 0x16208;
| label_5:
0x00015f10 add r4, r4, 8 | r4 += 8;
0x00015f14 ldr r3, [r4, -0x10] | r3 = *((r4 - 0x10));
0x00015f18 cmp r3, 0 |
| if (r3 != 0) {
0x00015f1c bne 0x16184 | goto label_9;
| }
| }
0x00015f20 ldr r4, [pc, 0x2c8] | r4 = *(0x161ec);
0x00015f24 add r1, sp, 8 | r1 += var_8h;
0x00015f28 add r4, pc, r4 | r4 = pc + r4;
0x00015f2c mov r0, r4 | r0 = r4;
0x00015f30 bl 0x36a4 | r0 = stat64 ();
0x00015f34 cmn r0, 1 |
| if (r0 != 1) {
0x00015f38 beq 0x15fa4 |
0x00015f3c ldr r1, [pc, 0x2b0] | r1 = *(0x161f0);
0x00015f40 mov r0, r4 | r0 = r4;
0x00015f44 add r1, pc, r1 | r1 = pc + r1;
0x00015f48 bl 0x35c0 | r0 = fopen64 ();
0x00015f4c subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00015f50 beq 0x15fa4 | goto label_10;
| }
0x00015f54 ldr r4, [pc, 0x29c] |
0x00015f58 ldr r1, [pc, 0x29c] | r1 = *(0x161f8);
0x00015f5c add r4, pc, r4 | r4 = pc + r4;
0x00015f60 add r4, r4, 0x24 | r4 = 0x16218;
0x00015f64 add r1, pc, r1 | r1 = pc + r1;
0x00015f68 mov r0, r4 | r0 = r4;
0x00015f6c bl 0x3bd8 | strcpy (r0, r1)
0x00015f70 mov r0, r4 | r0 = r4;
0x00015f74 bl 0x3608 | strlen (r0);
0x00015f78 mov r2, r5 | r2 = r5;
0x00015f7c rsb r1, r0, 0x200 | r1 = 0x200 - r0;
0x00015f80 add r0, r4, r0 | r0 = r4 + r0;
0x00015f84 bl 0x3800 | r0 = fgets (r0, r1, r2);
0x00015f88 cmp r0, 0 |
| if (r0 != 0) {
0x00015f8c beq 0x15f9c |
0x00015f90 mov r1, r4 | r1 = r4;
0x00015f94 mov r0, 3 | r0 = 3;
0x00015f98 bl 0x15904 | fcn_00015904 (r0, r1);
| }
0x00015f9c mov r0, r5 | r0 = r5;
0x00015fa0 bl 0x36e0 | fclose (r0);
| }
| label_10:
0x00015fa4 ldr r1, [pc, 0x254] | r1 = *(0x161fc);
0x00015fa8 mov r0, 3 | r0 = 3;
0x00015fac add r1, pc, r1 | r1 = pc + r1;
0x00015fb0 bl 0x15904 | fcn_00015904 (r0, r1);
0x00015fb4 b 0x16034 | goto label_6;
0x00015fb8 ldr r1, [pc, 0x244] | r1 = *(0x16200);
0x00015fbc mov r0, r6 | r0 = r6;
0x00015fc0 add r1, pc, r1 | r1 = pc + r1;
0x00015fc4 bl 0x35c0 | r0 = fopen64 ();
0x00015fc8 cmp r0, 0 |
0x00015fcc str r0, [r4] | *(r4) = r0;
0x00015fd0 beq 0x15e24 |
| }
0x00015fd4 mov r0, r6 | r0 = r6;
0x00015fd8 bl 0x3608 | r0 = strlen (r0);
0x00015fdc add r0, r0, 1 | r0++;
0x00015fe0 bl 0x3584 | r0 = malloc (r0);
0x00015fe4 cmp r0, 0 |
0x00015fe8 mov r7, r0 | r7 = r0;
0x00015fec str r0, [r4, 0xc] | *((r4 + 0xc)) = r0;
| if (r0 != 0) {
0x00015ff0 ldreq r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
| }
| if (r0 != 0) {
0x00015ff4 beq 0x16030 |
0x00015ff8 mov r1, r6 | r1 = r6;
0x00015ffc bl 0x3bd8 | strcpy (r0, r1)
0x00016000 mov r0, r6 | r0 = r6;
0x00016004 bl 0x3608 | r0 = strlen (r0);
0x00016008 add r6, r0, 3 | r6 = r0 + 3;
0x0001600c mov r8, r0 | r8 = r0;
0x00016010 mov r0, r6 | r0 = r6;
0x00016014 bl 0x3584 | r0 = malloc (r0);
0x00016018 cmp r0, 0 |
0x0001601c str r0, [r4, 8] | *((r4 + 8)) = r0;
| if (r0 != 0) {
0x00016020 bne 0x16040 | goto label_11;
| }
0x00016024 ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
0x00016028 bl 0x3b0c | free (r0);
0x0001602c mov r0, r7 | r0 = r7;
| }
0x00016030 bl 0x3b0c | free (r0);
| label_6:
0x00016034 mvn r0, 0 | r0 = ~0;
0x00016038 add sp, sp, 0x70 |
0x0001603c pop {r4, r5, r6, r7, r8, pc} |
| label_11:
0x00016040 ldr r2, [pc, 0x1c0] | r2 = *(0x16204);
0x00016044 mov r3, r7 | r3 = r7;
0x00016048 add r2, pc, r2 | r2 = pc + r2;
0x0001604c mov r1, r6 | r1 = r6;
0x00016050 bl 0x3638 | r0 = snprintf (r0, r1, r2, r3);
0x00016054 cmp r0, r6 |
| if (r0 < r6) {
0x00016058 ldrhs r0, [r4, 8] | r0 = *((r4 + 8));
| }
| if (r0 < r6) {
0x0001605c movhs r3, 0 | r3 = 0;
| }
| if (r0 < r6) {
0x00016060 addhs r0, r0, r8 | r0 += r8;
| }
| if (r0 < r6) {
0x00016064 strbhs r3, [r0, 2] | *((r0 + 2)) = r3;
| }
0x00016068 b 0x15e3c | goto label_0;
| label_7:
0x0001606c ldr r3, [pc, 0x198] | r3 = *(0x16208);
0x00016070 mov r2, 0x3e8 | r2 = 0x3e8;
0x00016074 add r3, pc, r3 | r3 = pc + r3;
0x00016078 str r2, [r3] | *(r3) = r2;
0x0001607c b 0x15e74 | goto label_1;
| label_8:
0x00016080 ldr r1, [pc, 0x188] | r1 = *(0x1620c);
0x00016084 mov r0, r4 | r0 = r4;
0x00016088 add r1, pc, r1 | r1 = pc + r1;
0x0001608c bl 0x3aac | r0 = strcmp (r0, r1);
0x00016090 cmp r0, 0 |
| if (r0 != 0) {
0x00016094 beq 0x160b0 |
0x00016098 ldr r1, [pc, 0x174] | r1 = *(0x16210);
0x0001609c mov r0, r4 | r0 = r4;
0x000160a0 add r1, pc, r1 | r1 = pc + r1;
0x000160a4 bl 0x3aac | r0 = strcmp (r0, r1);
0x000160a8 cmp r0, 0 |
| if (r0 != 0) {
0x000160ac bne 0x160c0 | goto label_12;
| }
| }
0x000160b0 ldr r3, [pc, 0x160] | r3 = *(0x16214);
0x000160b4 mov r2, 2 | r2 = 2;
0x000160b8 add r3, pc, r3 | r3 = pc + r3;
0x000160bc b 0x15ecc | goto label_2;
| label_12:
0x000160c0 ldr r1, [pc, 0x154] | r1 = *(0x16218);
0x000160c4 mov r0, r4 | r0 = r4;
0x000160c8 add r1, pc, r1 | r1 = pc + r1;
0x000160cc bl 0x3aac | r0 = strcmp (r0, r1);
0x000160d0 cmp r0, 0 |
| if (r0 != 0) {
0x000160d4 beq 0x160f0 |
0x000160d8 ldr r1, [pc, 0x140] | r1 = *(0x1621c);
0x000160dc mov r0, r4 | r0 = r4;
0x000160e0 add r1, pc, r1 | r1 = pc + r1;
0x000160e4 bl 0x3aac | r0 = strcmp (r0, r1);
0x000160e8 cmp r0, 0 |
| if (r0 != 0) {
0x000160ec bne 0x16100 | goto label_13;
| }
| }
0x000160f0 ldr r3, [pc, 0x12c] | r3 = *(0x16220);
0x000160f4 mov r2, 3 | r2 = 3;
0x000160f8 add r3, pc, r3 | r3 = pc + r3;
0x000160fc b 0x15ecc | goto label_2;
| label_13:
0x00016100 ldr r1, [pc, 0x120] | r1 = *(0x16224);
0x00016104 mov r0, r4 | r0 = r4;
0x00016108 add r1, pc, r1 | r1 = pc + r1;
0x0001610c bl 0x3aac | r0 = strcmp (r0, r1);
0x00016110 cmp r0, 0 |
| if (r0 != 0) {
0x00016114 beq 0x16130 |
0x00016118 ldr r1, [pc, 0x10c] | r1 = *(0x16228);
0x0001611c mov r0, r4 | r0 = r4;
0x00016120 add r1, pc, r1 | r1 = pc + r1;
0x00016124 bl 0x3aac | r0 = strcmp (r0, r1);
0x00016128 cmp r0, 0 |
| if (r0 != 0) {
0x0001612c bne 0x16144 | goto label_14;
| }
| }
0x00016130 ldr r3, [pc, 0xf8] | r3 = *(0x1622c);
0x00016134 mov r2, 4 | r2 = 4;
0x00016138 add r3, pc, r3 | r3 = pc + r3;
| label_4:
0x0001613c str r2, [r3, 0x14] | *((r3 + 0x14)) = r2;
0x00016140 b 0x15ed0 | goto label_3;
| label_14:
0x00016144 ldr r1, [pc, 0xe8] | r1 = *(0x16230);
0x00016148 mov r0, r4 | r0 = r4;
0x0001614c add r1, pc, r1 | r1 = pc + r1;
0x00016150 bl 0x3aac | r0 = strcmp (r0, r1);
0x00016154 cmp r0, 0 |
| if (r0 == 0) {
0x00016158 beq 0x16174 | goto label_15;
| }
0x0001615c ldr r1, [pc, 0xd4] | r1 = *(0x16234);
0x00016160 mov r0, r4 | r0 = r4;
0x00016164 add r1, pc, r1 | r1 = pc + r1;
0x00016168 bl 0x3aac | r0 = strcmp (r0, r1);
0x0001616c cmp r0, 0 |
| if (r0 != 0) {
0x00016170 bne 0x15ed0 | goto label_3;
| }
| label_15:
0x00016174 ldr r3, [pc, 0xc0] | r3 = *(0x16238);
0x00016178 mov r2, 5 | r2 = 5;
0x0001617c add r3, pc, r3 | r3 = pc + r3;
0x00016180 b 0x1613c | goto label_4;
| label_9:
0x00016184 ldr r2, [r4, -0xc] | r2 = *((r4 - 0xc));
0x00016188 mov r1, 0x200 | r1 = 0x200;
0x0001618c str r2, [sp] | *(sp) = r2;
0x00016190 mov r0, r5 | r0 = r5;
0x00016194 mov r2, r6 | r2 = r6;
0x00016198 bl 0x3638 | snprintf (r0, r1, r2, r3);
0x0001619c mov r1, r5 | r1 = r5;
0x000161a0 mov r0, 3 | r0 = 3;
0x000161a4 bl 0x15904 | fcn_00015904 (r0, r1);
0x000161a8 b 0x15f10 | 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-mqtt3as.so.1.3.9 @ 0x1647c */
| #include <stdint.h>
|
; (fcn) fcn.0001647c () | void fcn_0001647c (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;
0x0001647c push {r0, r1, r2, r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00016480 ldr sl, [pc, 0xe4] | sl = *(0x16568);
0x00016484 mov r7, r3 | r7 = r3;
0x00016488 ldr r3, [sp, 0x30] | r3 = *(arg_30h);
0x0001648c add sl, pc, sl | sl = pc + sl;
0x00016490 ldr ip, [sl, 0x1c] | ip = *(0x16584);
0x00016494 str r3, [sp] | *(sp) = r3;
0x00016498 ldr r3, [pc, 0xd0] | r3 = *(0x1656c);
0x0001649c cmp ip, 0 |
0x000164a0 add r3, pc, r3 | r3 = pc + r3;
0x000164a4 ldr fp, [sp, 0x34] | fp = *(arg_34h);
0x000164a8 ldr r6, [sp, 0x38] | r6 = *(arg_38h);
| if (ip != 0) {
0x000164ac beq 0x16564 |
0x000164b0 ldr ip, [pc, 0xbc] |
0x000164b4 add ip, pc, ip |
0x000164b8 ldr ip, [ip, 4] | ip = *(0x16574);
0x000164bc cmp ip, r0 |
| if (ip > r0) {
0x000164c0 bgt 0x16564 | goto label_0;
| }
0x000164c4 mov r5, r0 | r5 = r0;
0x000164c8 add r0, sl, 0x224 | r0 = sl + 0x224;
0x000164cc mov r8, r2 | r8 = r2;
0x000164d0 mov sb, r1 | sb = r1;
0x000164d4 str r3, [sp, 4] | var_4h = r3;
0x000164d8 bl 0x3af4 | fcn_00003af4 ();
0x000164dc bl 0x15a10 | fcn_00015a10 ();
0x000164e0 ldr r3, [sp, 4] | r3 = var_4h;
0x000164e4 ldr r2, [pc, 0x8c] | r2 = *(0x16574);
0x000164e8 ldr r3, [r3, r2] | r3 = *((r3 + r2));
0x000164ec mov r2, 8 | r2 = 8;
0x000164f0 mov r1, r3 | r1 = r3;
0x000164f4 str r3, [sp, 4] | var_4h = r3;
0x000164f8 mov r4, r0 | r4 = r0;
0x000164fc bl 0x3494 | memcpy (r0, r1, r2);
0x00016500 ldr r3, [sl, 0x14] | r3 = *((sl + 0x14));
0x00016504 ldr r1, [sp] | r1 = *(sp);
0x00016508 str r3, [r4, 8] | *((r4 + 8)) = r3;
0x0001650c str sb, [r4, 0xc] | *((r4 + 0xc)) = sb;
0x00016510 str r8, [r4, 0x10] | *((r4 + 0x10)) = r8;
0x00016514 str r7, [r4, 0x14] | *((r4 + 0x14)) = r7;
0x00016518 add r0, r4, 0x18 | r0 = r4 + 0x18;
0x0001651c bl 0x3bd8 | strcpy (r0, r1)
0x00016520 cmp r6, 0 |
| if (r6 == 0) {
0x00016524 movne r3, 1 | r3 = 1;
| }
0x00016528 str fp, [r4, 0x11c] | *((r4 + 0x11c)) = fp;
0x0001652c mov r0, r5 | r0 = r5;
0x00016530 str r5, [r4, 0x128] | *((r4 + 0x128)) = r5;
| if (r6 != 0) {
0x00016534 streq r6, [r4, 0x120] | *((r4 + 0x120)) = r6;
| }
0x00016538 mov r1, r4 | r1 = r4;
| if (r6 == 0) {
0x0001653c strne r3, [r4, 0x120] | *((r4 + 0x120)) = r3;
| }
| if (r6 == 0) {
0x00016540 ldrne r3, [r6] | r3 = *(r6);
| }
| if (r6 == 0) {
0x00016544 strne r3, [r4, 0x124] | *((r4 + 0x124)) = r3;
| }
0x00016548 bl 0x15bf4 | fcn_00015bf4 (r0, r1);
0x0001654c ldr r0, [pc, 0x28] |
0x00016550 add r0, pc, r0 | r0 = pc + r0;
0x00016554 add r0, r0, 0x224 | r0 = 0x1679c;
0x00016558 add sp, sp, 0xc |
0x0001655c pop {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00016560 b 0x3a34 | void (*0x3a34)() ();
| }
| label_0:
0x00016564 add sp, sp, 0xc |
0x00016568 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-mqtt3as.so.1.3.9 @ 0x16580 */
| #include <stdint.h>
|
; (fcn) fcn.00016580 () | void fcn_00016580 (int32_t arg1, int32_t arg2) {
| int32_t var_4h;
| int32_t var_8h;
| r0 = arg1;
| r1 = arg2;
0x00016580 push {r0, r1, r4, r5, r6, r7, r8, lr} |
0x00016584 ldr r6, [pc, 0x1d4] | r6 = *(0x1675c);
0x00016588 mov r8, r0 | r8 = r0;
0x0001658c ldr r0, [pc, 0x1d0] | r0 = *(0x16760);
0x00016590 mov r7, r1 | r7 = r1;
0x00016594 mov r4, r2 | r4 = r2;
0x00016598 mov r5, 0 | r5 = 0;
0x0001659c mov r2, 3 | r2 = 3;
0x000165a0 mov r1, 0x38 | r1 = 0x38;
0x000165a4 add r0, pc, r0 | r0 = pc + r0;
0x000165a8 str r5, [sp, 4] | var_4h = r5;
0x000165ac bl 0x1e0d4 | fcn_0001e0d4 (r0, r1);
0x000165b0 cmp r7, 1 |
0x000165b4 add r6, pc, r6 | r6 = pc + r6;
| if (r7 == 1) {
0x000165b8 beq 0x166c8 | goto label_1;
| }
0x000165bc cmp r7, 2 |
| if (r7 == 2) {
0x000165c0 beq 0x166dc | goto label_2;
| }
0x000165c4 cmp r7, r5 |
| if (r7 == r5) {
0x000165c8 mvnne r3, 1 | r3 = ~1;
| }
| if (r7 != r5) {
0x000165cc bne 0x166d4 | goto label_3;
| }
0x000165d0 ldr r0, [pc, 0x190] | r0 = *(0x16764);
0x000165d4 mov r2, 0x24 | r2 = 0x24;
0x000165d8 mov r1, 0x40 | r1 = 0x40;
0x000165dc add r0, pc, r0 | r0 = pc + r0;
0x000165e0 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x000165e4 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x000165e8 beq 0x166d0 | goto label_4;
| }
0x000165ec cmp r4, 0 |
| if (r4 != 0) {
0x000165f0 ldreq r4, [pc, 0x174] | r4 = *((pc + 0x174));
| }
| if (r4 != 0) {
0x000165f4 addeq r4, pc, r4 | r4 = pc + r4;
| }
0x000165f8 mov r0, r4 | r0 = r4;
0x000165fc bl 0x3608 | strlen (r0);
0x00016600 ldr r7, [pc, 0x168] | r7 = *(0x1676c);
0x00016604 mov r1, 0x45 | r1 = 0x45;
0x00016608 add r7, pc, r7 | r7 = pc + r7;
0x0001660c add r2, r0, 1 | r2 = r0 + 1;
0x00016610 mov r0, r7 | r0 = r7;
0x00016614 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x00016618 cmp r0, 0 |
0x0001661c str r0, [r5] | *(r5) = r0;
| if (r0 == 0) {
0x00016620 bne 0x16660 |
0x00016624 mov r2, r5 | r2 = r5;
0x00016628 mov r1, 0x47 | r1 = 0x47;
0x0001662c mov r0, r7 | r0 = r7;
0x00016630 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x00016634 mvn r3, 0x62 | r3 = ~0x62;
0x00016638 str r3, [sp, 4] | var_4h = r3;
| label_0:
0x0001663c ldr r0, [pc, 0x130] | r0 = *(0x16770);
0x00016640 mov r3, 3 | r3 = 3;
0x00016644 add r2, sp, 4 | r2 += var_4h;
0x00016648 mov r1, 0x68 | r1 = 0x68;
0x0001664c add r0, pc, r0 | r0 = pc + r0;
0x00016650 bl 0x1e1bc | fcn_0001e1bc (r0, r1);
0x00016654 ldr r0, [sp, 4] | r0 = var_4h;
0x00016658 add sp, sp, 8 |
0x0001665c pop {r4, r5, r6, r7, r8, pc} |
| }
0x00016660 mov r1, r4 | r1 = r4;
0x00016664 bl 0x3bd8 | strcpy (r0, r1)
0x00016668 ldr r3, [pc, 0x108] | r3 = *(0x16774);
0x0001666c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00016670 str r3, [r5, 4] | *((r5 + 4)) = r3;
0x00016674 ldr r3, [pc, 0x100] | r3 = *(0x16778);
0x00016678 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0001667c str r3, [r5, 8] | *((r5 + 8)) = r3;
0x00016680 ldr r3, [pc, 0xf8] | r3 = *(0x1677c);
0x00016684 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00016688 str r3, [r5, 0xc] | *((r5 + 0xc)) = r3;
0x0001668c ldr r3, [pc, 0xf0] | r3 = *(0x16780);
0x00016690 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00016694 str r3, [r5, 0x10] | *((r5 + 0x10)) = r3;
0x00016698 ldr r3, [pc, 0xe8] | r3 = *(0x16784);
0x0001669c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x000166a0 str r3, [r5, 0x14] | *((r5 + 0x14)) = r3;
0x000166a4 ldr r3, [pc, 0xe0] | r3 = *(0x16788);
0x000166a8 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x000166ac str r3, [r5, 0x18] | *((r5 + 0x18)) = r3;
0x000166b0 ldr r3, [pc, 0xd8] | r3 = *(0x1678c);
0x000166b4 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x000166b8 str r3, [r5, 0x1c] | *((r5 + 0x1c)) = r3;
0x000166bc ldr r3, [pc, 0xd0] | r3 = *(0x16790);
0x000166c0 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x000166c4 str r3, [r5, 0x20] | *((r5 + 0x20)) = r3;
| do {
| label_1:
0x000166c8 mov r4, r5 | r4 = r5;
0x000166cc b 0x16758 | goto label_5;
| label_4:
0x000166d0 mvn r3, 0x62 | r3 = ~0x62;
| label_3:
0x000166d4 str r3, [sp, 4] | var_4h = r3;
0x000166d8 b 0x166c8 |
| } while (1);
| label_2:
0x000166dc cmp r4, 0 |
| if (r4 != 0) {
0x000166e0 beq 0x16750 |
0x000166e4 ldr r3, [r4] | r3 = *(r4);
0x000166e8 cmp r3, 0 |
| if (r3 == 0) {
0x000166ec beq 0x16750 | goto label_6;
| }
0x000166f0 ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x000166f4 cmp r3, 0 |
| if (r3 == 0) {
0x000166f8 beq 0x16750 | goto label_6;
| }
0x000166fc ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00016700 cmp r3, 0 |
| if (r3 == 0) {
0x00016704 beq 0x16750 | goto label_6;
| }
0x00016708 ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x0001670c cmp r3, 0 |
| if (r3 == 0) {
0x00016710 beq 0x16750 | goto label_6;
| }
0x00016714 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00016718 cmp r3, 0 |
| if (r3 == 0) {
0x0001671c beq 0x16750 | goto label_6;
| }
0x00016720 ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x00016724 cmp r3, 0 |
| if (r3 == 0) {
0x00016728 beq 0x16750 | goto label_6;
| }
0x0001672c ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00016730 cmp r3, 0 |
| if (r3 == 0) {
0x00016734 beq 0x16750 | goto label_6;
| }
0x00016738 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0001673c cmp r3, 0 |
| if (r3 == 0) {
0x00016740 beq 0x16750 | goto label_6;
| }
0x00016744 ldr r3, [r4, 0x14] | r3 = *((r4 + 0x14));
0x00016748 cmp r3, 0 |
| if (r3 != 0) {
0x0001674c bne 0x16758 | goto label_5;
| }
| }
| label_6:
0x00016750 mvn r3, 1 | r3 = ~1;
0x00016754 str r3, [sp, 4] | var_4h = r3;
| label_5:
0x00016758 str r4, [r8] | *(r8) = r4;
0x0001675c b 0x1663c | 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-mqtt3as.so.1.3.9 @ 0x17d00 */
| #include <stdint.h>
|
; (fcn) fcn.00017d00 () | void fcn_00017d00 (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;
0x00017d00 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00017d04 mov r5, r0 | r5 = r0;
0x00017d08 ldr r0, [pc, 0x4f0] |
0x00017d0c mov r3, 0 | r3 = 0;
0x00017d10 add r0, pc, r0 | r0 = pc + r0;
0x00017d14 add r0, r0, 0x148 | r0 = 0x18344;
0x00017d18 sub sp, sp, 0x3c |
0x00017d1c mov r2, 3 | r2 = 3;
0x00017d20 mov r1, 0x360 | r1 = 0x360;
0x00017d24 add r0, r0, 2 | r0 += 2;
0x00017d28 str r3, [sp, 0x20] | var_20h = r3;
0x00017d2c bl 0x1e0d4 | fcn_0001e0d4 (r0, r1);
0x00017d30 ldr r3, [r5, 0x84] | r3 = *((r5 + 0x84));
0x00017d34 cmp r3, 0 |
0x00017d38 bne 0x17d8c |
| while (r0 != 0) {
0x00017d3c mov r7, 0 | r7 = 0;
| label_1:
0x00017d40 ldr r3, [r5] | r3 = *(r5);
0x00017d44 ldr r2, [pc, 0x4b8] | r2 = *(0x18200);
0x00017d48 str r3, [sp] | *(sp) = r3;
0x00017d4c add r2, pc, r2 | r2 = pc + r2;
0x00017d50 mov r3, r7 | r3 = r7;
0x00017d54 mvn r1, 0 | r1 = ~0;
0x00017d58 mov r0, 3 | r0 = 3;
0x00017d5c bl 0x16364 | fcn_00016364 (r0, r1, r2, r3);
0x00017d60 ldr r0, [pc, 0x4a0] |
0x00017d64 mov r3, 3 | r3 = 3;
0x00017d68 add r0, pc, r0 | r0 = pc + r0;
0x00017d6c add r0, r0, 0x148 | r0 = 0x1834c;
0x00017d70 add r2, sp, 0x20 | r2 += var_20h;
0x00017d74 mov r1, 0x388 | r1 = 0x388;
0x00017d78 add r0, r0, 2 | r0 += 2;
0x00017d7c bl 0x1e1bc | fcn_0001e1bc (r0, r1);
0x00017d80 ldr r0, [sp, 0x20] | r0 = var_20h;
0x00017d84 add sp, sp, 0x3c |
0x00017d88 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x00017d8c ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x00017d90 add r2, sp, 0x28 | r2 += var_28h;
0x00017d94 add r1, sp, 0x24 | r1 += var_24h;
0x00017d98 ldr r0, [r5, 0x80] | r0 = *((r5 + 0x80));
0x00017d9c blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00017da0 cmp r0, 0 |
0x00017da4 mov r7, r0 | r7 = r0;
0x00017da8 str r0, [sp, 0x20] | var_20h = r0;
0x00017dac bne 0x17d3c |
| }
0x00017db0 ldr r3, [pc, 0x454] |
0x00017db4 mov r8, r0 | r8 = r0;
0x00017db8 add r3, pc, r3 | r3 = pc + r3;
0x00017dbc add r3, r3, 0x16c | r3 = 0x18374;
0x00017dc0 add r3, r3, 2 | r3 += 2;
0x00017dc4 str r3, [sp, 0xc] | var_ch = r3;
0x00017dc8 b 0x17fe8 | goto label_4;
| label_0:
0x00017dcc str r3, [sp, 0x2c] | var_2ch = r3;
0x00017dd0 ldr r1, [pc, 0x438] | r1 = *(0x1820c);
0x00017dd4 ldr r4, [r2, r8, lsl 2] | offset_0 = r8 << 2;
| r4 = *((r2 + offset_0));
0x00017dd8 add r1, pc, r1 | r1 = pc + r1;
0x00017ddc mov r2, 2 | r2 = 2;
0x00017de0 mov r0, r4 | r0 = r4;
0x00017de4 bl 0x35a8 | strncmp (r0, r1, r2);
0x00017de8 lsl sb, r8, 2 | sb = r8 << 2;
0x00017dec cmp r0, 0 |
| if (r0 != 0) {
0x00017df0 beq 0x17e10 |
0x00017df4 ldr r1, [pc, 0x418] | r1 = *(0x18210);
0x00017df8 mov r2, 3 | r2 = 3;
0x00017dfc add r1, pc, r1 | r1 = pc + r1;
0x00017e00 mov r0, r4 | r0 = r4;
0x00017e04 bl 0x35a8 | r0 = strncmp (r0, r1, r2);
0x00017e08 cmp r0, 0 |
| if (r0 != 0) {
0x00017e0c bne 0x17fc4 | goto label_5;
| }
| }
0x00017e10 ldr r3, [r5, 0x84] | r3 = *((r5 + 0x84));
0x00017e14 add sl, sp, 0x30 | sl += var_30h;
0x00017e18 add r6, sp, 0x2c | r6 += var_2ch;
0x00017e1c ldr fp, [r3, 0x10] | fp = *((r3 + 0x10));
0x00017e20 mov r2, r6 | r2 = r6;
0x00017e24 mov r3, sl | r3 = sl;
0x00017e28 mov r1, r4 | r1 = r4;
0x00017e2c ldr r0, [r5, 0x80] | r0 = *((r5 + 0x80));
0x00017e30 blx fp | r0 = fp (r0, r1, r2, r3);
0x00017e34 cmp r0, 0 |
0x00017e38 str r0, [sp, 0x20] | var_20h = r0;
| if (r0 != 0) {
0x00017e3c bne 0x17fc4 | goto label_5;
| }
0x00017e40 ldr r3, [r5, 0x8c] | r3 = *((r5 + 0x8c));
0x00017e44 cmp r3, 0 |
0x00017e48 bne 0x17fa8 |
| while (r0 == 0) {
0x00017e4c ldr r3, [sp, 0x24] | r3 = var_24h;
0x00017e50 ldr r1, [pc, 0x3c0] | r1 = *(0x18214);
0x00017e54 ldr r0, [r3, sb] | r0 = *((r3 + sb));
0x00017e58 mov r2, 3 | r2 = 3;
0x00017e5c add r1, pc, r1 | r1 = pc + r1;
0x00017e60 bl 0x35a8 | strncmp (r0, r1, r2);
0x00017e64 ldr r6, [pc, 0x3b0] | r6 = *(0x18218);
0x00017e68 mov r2, 3 | r2 = 3;
0x00017e6c ldr r1, [pc, 0x3ac] | r1 = *(0x1821c);
0x00017e70 add r6, pc, r6 | r6 = pc + r6;
0x00017e74 cmp r0, 0 |
| if (r0 != 0) {
0x00017e78 moveq r3, 5 | r3 = 5;
| }
| if (r0 == 0) {
0x00017e7c movne r3, 4 | r3 = 4;
| }
0x00017e80 str r3, [sp, 0x14] | var_14h = r3;
0x00017e84 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00017e88 ldr r0, [sp, 0xc] | r0 = var_ch;
0x00017e8c str r3, [sp, 0x10] | var_10h = r3;
0x00017e90 ldr r3, [sp, 0x30] | r3 = var_30h;
0x00017e94 str r3, [sp, 0x18] | var_18h = r3;
0x00017e98 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00017e9c str r3, [sp, 0x34] | src = r3;
0x00017ea0 bl 0x1e0d4 | fcn_0001e0d4 (r0, r1);
0x00017ea4 mov r2, 0x10 | r2 = 0x10;
0x00017ea8 ldr r1, [pc, 0x374] | r1 = *(0x18220);
0x00017eac mov r0, r6 | r0 = r6;
0x00017eb0 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x00017eb4 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x00017eb8 bne 0x18020 | goto label_6;
| }
| label_2:
0x00017ebc ldr fp, [pc, 0x364] | fp = *(0x00018228);
0x00017ec0 mov r3, 3 | r3 = 3;
0x00017ec4 add fp, pc, fp |
0x00017ec8 add r0, fp, 0x16c | r0 += arg_16ch;
0x00017ecc mov r2, 0 | r2 = 0;
0x00017ed0 ldr r1, [pc, 0x354] | r1 = *(0x18228);
0x00017ed4 add r0, r0, 2 | r0 += 2;
0x00017ed8 bl 0x1e1bc | fcn_0001e1bc (r0, r1);
0x00017edc cmp r4, 0 |
| if (r4 == 0) {
0x00017ee0 beq 0x17fc4 | goto label_5;
| }
0x00017ee4 ldr r3, [sp, 0x24] | r3 = var_24h;
0x00017ee8 mov r1, 0x2d | r1 = 0x2d;
0x00017eec ldr r0, [r3, sb] | r0 = *((r3 + sb));
0x00017ef0 bl 0x3b30 | strchr (r0, r1);
0x00017ef4 mov r6, 0 | r6 = 0;
0x00017ef8 add sl, sp, 0x38 | sl += var_38h;
0x00017efc add r0, r0, 1 | r0++;
0x00017f00 bl 0x3b18 | atoi (r0);
0x00017f04 ldr r3, [r5, 0x78] | r3 = *((r5 + 0x78));
0x00017f08 mov r2, 3 | r2 = 3;
0x00017f0c mov r1, 0x348 | r1 = 0x348;
0x00017f10 str r3, [sp, 0x10] | var_10h = r3;
0x00017f14 str r0, [r4, 0xc] | *((r4 + 0xc)) = r0;
0x00017f18 add r0, fp, 0x190 | r0 += arg_190h;
0x00017f1c str r6, [sl, -4]! | *((sl -= 4)) = r6;
0x00017f20 bl 0x1e0d4 | fcn_0001e0d4 (r0, r1);
| label_3:
0x00017f24 mov r1, sl | r1 = sl;
0x00017f28 ldr r0, [sp, 0x10] | r0 = var_10h;
0x00017f2c bl 0x1b10c | fcn_0001b10c (r0, r1);
0x00017f30 clz fp, r6 |
0x00017f34 lsr fp, fp, 5 |
0x00017f38 cmp r0, 0 |
| if (r0 != 0) {
0x00017f3c moveq fp, 0 |
| }
0x00017f40 cmp fp, 0 |
| if (fp != 0) {
0x00017f44 bne 0x181e4 | goto label_7;
| }
0x00017f48 mov r3, r6 | r3 = r6;
0x00017f4c mov r2, 0x10 | r2 = 0x10;
0x00017f50 mov r1, r4 | r1 = r4;
0x00017f54 ldr r0, [sp, 0x10] | r0 = var_10h;
0x00017f58 bl 0x1ae54 | fcn_0001ae54 (r0, r1);
0x00017f5c ldr r0, [pc, 0x2cc] |
0x00017f60 mov r3, 3 | r3 = 3;
0x00017f64 add r0, pc, r0 | r0 = pc + r0;
0x00017f68 mov r2, fp | r2 = fp;
0x00017f6c ldr r1, [pc, 0x2c0] | r1 = *(0x18230);
0x00017f70 add r0, r0, 0x190 | r0 = 0x183bc;
0x00017f74 bl 0x1e1bc | fcn_0001e1bc (r0, r1);
0x00017f78 ldr r0, [pc, 0x2b8] | r0 = *(0x18234);
0x00017f7c ldr r2, [sp, 0x2c] | r2 = var_2ch;
0x00017f80 ldr r1, [pc, 0x2b4] | r1 = *(0x18238);
0x00017f84 add r0, pc, r0 | r0 = pc + r0;
0x00017f88 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x00017f8c ldr r2, [r5, 0x7c] | r2 = *((r5 + 0x7c));
0x00017f90 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00017f94 add r7, r7, 1 | r7++;
0x00017f98 cmp r2, r3 |
| if (r2 < r3) {
0x00017f9c strhs r2, [r5, 0x7c] | *((r5 + 0x7c)) = r2;
| }
| if (r2 >= r3) {
0x00017fa0 strlo r3, [r5, 0x7c] | *((r5 + 0x7c)) = r3;
| }
0x00017fa4 b 0x17fc4 | goto label_5;
0x00017fa8 mov r2, sl | r2 = sl;
0x00017fac mov r1, r6 | r1 = r6;
0x00017fb0 ldr r0, [r5, 0x94] | r0 = *((r5 + 0x94));
0x00017fb4 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x00017fb8 cmp r0, 0 |
0x00017fbc str r0, [sp, 0x20] | var_20h = r0;
0x00017fc0 beq 0x17e4c |
| }
| label_5:
0x00017fc4 ldr r3, [sp, 0x24] | r3 = var_24h;
0x00017fc8 ldr r2, [r3, sb] | r2 = *((r3 + sb));
0x00017fcc cmp r2, 0 |
| if (r2 != 0) {
0x00017fd0 beq 0x17fe4 |
0x00017fd4 ldr r0, [pc, 0x264] | r0 = *(0x1823c);
0x00017fd8 mov r1, 0x380 | r1 = 0x380;
0x00017fdc add r0, pc, r0 | r0 = pc + r0;
0x00017fe0 bl 0x1e960 | fcn_0001e960 (r0, r1);
| }
0x00017fe4 add r8, r8, 1 | r8++;
| label_4:
0x00017fe8 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00017fec ldr r2, [sp, 0x24] | r2 = var_24h;
0x00017ff0 cmp r3, 0 |
| if (r3 != 0) {
0x00017ff4 bne 0x18004 | goto label_8;
| }
0x00017ff8 ldr r1, [sp, 0x28] | r1 = var_28h;
0x00017ffc cmp r1, r8 |
| if (r1 > r8) {
0x00018000 bgt 0x17dcc | goto label_0;
| }
| label_8:
0x00018004 cmp r2, 0 |
| if (r2 == 0) {
0x00018008 beq 0x17d40 | goto label_1;
| }
0x0001800c ldr r0, [pc, 0x230] | r0 = *(0x18240);
0x00018010 ldr r1, [pc, 0x230] | r1 = *(0x18244);
0x00018014 add r0, pc, r0 | r0 = pc + r0;
0x00018018 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x0001801c b 0x17d40 | goto label_1;
| label_6:
0x00018020 mov r2, 0x10 | r2 = 0x10;
0x00018024 mov r1, 0 | r1 = 0;
0x00018028 bl 0x38a8 | memset (r0, r1, r2);
0x0001802c mov r2, 0x30 | r2 = 0x30;
0x00018030 ldr r1, [pc, 0x214] | r1 = *(0x18248);
0x00018034 mov r0, r6 | r0 = r6;
0x00018038 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x0001803c cmp r0, 0 |
0x00018040 mov sl, r0 | sl = r0;
0x00018044 str r0, [r4] | *(r4) = r0;
| if (r0 == 0) {
0x00018048 bne 0x18064 |
0x0001804c mov r2, r4 | r2 = r4;
0x00018050 mov r1, 0x308 | r1 = 0x308;
0x00018054 mov r0, r6 | r0 = r6;
0x00018058 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x0001805c mov r4, sl | r4 = sl;
0x00018060 b 0x17ebc | goto label_2;
| }
0x00018064 mov r2, 0x30 | r2 = 0x30;
0x00018068 mov r1, 0 | r1 = 0;
0x0001806c bl 0x38a8 | memset (r0, r1, r2);
0x00018070 ldr r3, [r4] | r3 = *(r4);
0x00018074 mov r2, 1 | r2 = 1;
0x00018078 str r2, [r3, 4] | *((r3 + 4)) = r2;
0x0001807c ldr r2, [sp, 0x34] | r2 = src;
0x00018080 mov r1, 0x314 | r1 = 0x314;
0x00018084 ldr sl, [r2], 4 | sl = *(r2);
| r2 += 4;
0x00018088 mov r0, r6 | r0 = r6;
0x0001808c str sl, [r3, 8] | *((r3 + 8)) = sl;
0x00018090 str r2, [sp, 0x34] | src = r2;
0x00018094 mov r2, sl | r2 = sl;
0x00018098 str r3, [sp, 0x1c] | var_1ch = r3;
0x0001809c bl 0x1e7a4 | fcn_0001e7a4 (r0, r1);
0x000180a0 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x000180a4 cmp r0, 0 |
0x000180a8 mov fp, r0 |
0x000180ac str r0, [r3, 0xc] | *((r3 + 0xc)) = r0;
| if (r0 != 0) {
0x000180b0 bne 0x180dc | goto label_9;
| }
0x000180b4 ldr r2, [r4] | r2 = *(r4);
0x000180b8 ldr r1, [pc, 0x190] | r1 = *(0x1824c);
0x000180bc mov r0, r6 | r0 = r6;
0x000180c0 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x000180c4 ldr r1, [pc, 0x188] | r1 = *(0x18250);
0x000180c8 mov r2, r4 | r2 = r4;
| do {
0x000180cc mov r0, r6 | r0 = r6;
0x000180d0 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x000180d4 mov r4, fp | r4 = fp;
0x000180d8 b 0x17ebc | goto label_2;
| label_9:
0x000180dc ldr r3, [r4] | r3 = *(r4);
0x000180e0 mov r2, sl | r2 = sl;
0x000180e4 ldr r1, [sp, 0x34] | r1 = src;
0x000180e8 ldr r0, [r3, 0xc] | r0 = *((r3 + 0xc));
0x000180ec bl 0x3494 | memcpy (r0, r1, r2);
0x000180f0 ldr r2, [sp, 0x34] | r2 = src;
0x000180f4 ldr r3, [r4] | r3 = *(r4);
0x000180f8 add r0, r2, sl | r0 = r2 + sl;
0x000180fc ldr r2, [r2, sl] | r2 = *((r2 + sl));
0x00018100 add r0, r0, 0x10 | r0 += 0x10;
0x00018104 str r2, [r3, 0x10] | *((r3 + 0x10)) = r2;
0x00018108 ldr r2, [r0, -0xc] | r2 = *((r0 - 0xc));
0x0001810c str r2, [r3, 0x14] | *((r3 + 0x14)) = r2;
0x00018110 ldr r2, [r0, -8] | r2 = *((r0 - 8));
0x00018114 str r2, [r3, 0x18] | *((r3 + 0x18)) = r2;
0x00018118 ldr r2, [r0, -4] | r2 = *((r0 - 4));
0x0001811c str r2, [r3, 0x1c] | *((r3 + 0x1c)) = r2;
0x00018120 str r0, [sp, 0x34] | src = r0;
0x00018124 bl 0x3608 | strlen (r0);
0x00018128 ldr r1, [pc, 0x128] | r1 = *(0x18254);
0x0001812c add sl, r0, 1 | sl = r0 + 1;
0x00018130 mov r2, sl | r2 = sl;
0x00018134 mov r0, r6 | r0 = r6;
0x00018138 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x0001813c cmp r0, 0 |
0x00018140 mov fp, r0 |
0x00018144 str r0, [r4, 4] | *((r4 + 4)) = r0;
| if (r0 != 0) {
0x00018148 bne 0x1817c | goto label_10;
| }
0x0001814c ldr r3, [r4] | r3 = *(r4);
0x00018150 ldr r1, [pc, 0x104] | r1 = *(0x18258);
0x00018154 ldr r2, [r3, 0xc] | r2 = *((r3 + 0xc));
0x00018158 mov r0, r6 | r0 = r6;
0x0001815c bl 0x1e960 | fcn_0001e960 (r0, r1);
0x00018160 ldr r2, [r4] | r2 = *(r4);
0x00018164 ldr r1, [pc, 0xf4] | r1 = *(0x1825c);
0x00018168 mov r0, r6 | r0 = r6;
0x0001816c bl 0x1e960 | fcn_0001e960 (r0, r1);
0x00018170 mov r2, r4 | r2 = r4;
0x00018174 ldr r1, [pc, 0xe8] | r1 = *(0x18260);
0x00018178 b 0x180cc |
| } while (1);
| label_10:
0x0001817c ldr r1, [sp, 0x34] | r1 = src;
0x00018180 bl 0x3bd8 | strcpy (r0, r1)
0x00018184 ldr r2, [sp, 0x34] | r2 = src;
0x00018188 add r3, r2, sl | r3 = r2 + sl;
0x0001818c ldr r2, [r2, sl] | r2 = *((r2 + sl));
0x00018190 add r3, r3, 4 | r3 += 4;
0x00018194 str r2, [r4, 8] | *((r4 + 8)) = r2;
0x00018198 str r3, [sp, 0x34] | src = r3;
0x0001819c ldr r3, [sp, 0x14] | r3 = var_14h;
0x000181a0 cmp r3, 5 |
| if (r3 != 5) {
0x000181a4 bne 0x17ebc | goto label_2;
| }
0x000181a8 ldr r0, [r4] | r0 = *(r4);
0x000181ac ldr r3, [sp, 0x10] | r3 = var_10h;
0x000181b0 ldr r2, [sp, 0x18] | r2 = var_18h;
0x000181b4 add r1, sp, 0x34 | r1 += src;
0x000181b8 add r2, r3, r2 | r2 = r3 + r2;
0x000181bc add r0, r0, 0x20 | r0 += 0x20;
0x000181c0 bl 0x1b96c | r0 = fcn_0001b96c (r0, r1);
0x000181c4 cmp r0, 1 |
| if (r0 == 1) {
0x000181c8 beq 0x17ebc | goto label_2;
| }
0x000181cc ldr r2, [pc, 0x94] | r2 = *(0x18264);
0x000181d0 mvn r1, 0 | r1 = ~0;
0x000181d4 add r2, pc, r2 | r2 = pc + r2;
0x000181d8 ldr r0, [sp, 0x14] | r0 = var_14h;
0x000181dc bl 0x16364 | fcn_00016364 (r0, r1, r2, r3);
0x000181e0 b 0x17ebc | goto label_2;
| label_7:
0x000181e4 ldr r6, [sp, 0x34] | r6 = src;
0x000181e8 ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x000181ec ldr r3, [r6, 8] | r3 = *((r6 + 8));
0x000181f0 ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
0x000181f4 cmp r2, r3 |
| if (r2 < r3) {
0x000181f8 movhs r6, 0 | r6 = 0;
| }
0x000181fc b 0x17f24 | 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-mqtt3as.so.1.3.9 @ 0x19b88 */
| #include <stdint.h>
|
; (fcn) fcn.00019b88 () | void fcn_00019b88 (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;
0x00019b88 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00019b8c mov r7, r0 | r7 = r0;
0x00019b90 ldr r0, [pc, 0x19c] |
0x00019b94 sub sp, sp, 0x7c |
0x00019b98 add r0, pc, r0 | r0 = pc + r0;
0x00019b9c mvn r3, 1 | r3 = ~1;
0x00019ba0 mov r2, 3 | r2 = 3;
0x00019ba4 add r0, r0, 0x32 | r0 = 0x19d62;
0x00019ba8 mov sl, r1 | sl = r1;
0x00019bac mov r1, 0x1ec | r1 = 0x1ec;
0x00019bb0 str r3, [sp, 0xc] | var_ch = r3;
0x00019bb4 bl 0x1e0d4 | fcn_0001e0d4 (r0, r1);
0x00019bb8 mov r0, r7 | r0 = r7;
0x00019bbc bl 0x3620 | r0 = opendir ();
0x00019bc0 subs sb, r0, 0 | sb = r0 - 0;
| if (sb == r0) {
0x00019bc4 beq 0x19c3c | goto label_3;
| }
0x00019bc8 ldr r6, [pc, 0x168] | r6 = *(0x19d34);
0x00019bcc add r6, pc, r6 | r6 = pc + r6;
| label_2:
0x00019bd0 ldr fp, [pc, 0x164] | fp = *(0x00019d3c);
0x00019bd4 add fp, pc, fp |
| label_0:
0x00019bd8 mov r0, sb | r0 = sb;
0x00019bdc bl 0x3bb4 | r0 = readdir64 ();
0x00019be0 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00019be4 beq 0x19c34 | goto label_4;
| }
0x00019be8 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00019bec cmp r3, 0 |
| if (r3 == 0) {
0x00019bf0 beq 0x19c34 | goto label_4;
| }
0x00019bf4 mov r0, r7 | r0 = r7;
0x00019bf8 bl 0x3608 | strlen (r0);
0x00019bfc add r5, r5, 0x13 | r5 += 0x13;
0x00019c00 mov r4, r0 | r4 = r0;
0x00019c04 mov r0, r5 | r0 = r5;
0x00019c08 bl 0x3608 | strlen (r0);
0x00019c0c ldr r1, [pc, 0x12c] | r1 = *(0x19d3c);
0x00019c10 add r4, r4, r0 | r4 += r0;
0x00019c14 add r4, r4, 2 | r4 += 2;
0x00019c18 mov r2, r4 | r2 = r4;
0x00019c1c mov r0, r6 | r0 = r6;
0x00019c20 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x00019c24 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x00019c28 bne 0x19c64 | goto label_5;
| }
| label_1:
0x00019c2c mvn r3, 0x62 | r3 = ~0x62;
| do {
0x00019c30 str r3, [sp, 0xc] | var_ch = r3;
| label_4:
0x00019c34 mov r0, sb | r0 = sb;
0x00019c38 bl 0x3794 | closedir ();
| label_3:
0x00019c3c ldr r0, [pc, 0x100] |
0x00019c40 mov r3, 3 | r3 = 3;
0x00019c44 add r0, pc, r0 | r0 = pc + r0;
0x00019c48 add r2, sp, 0xc | r2 += var_ch;
0x00019c4c ldr r1, [pc, 0xf4] | r1 = *(0x19d44);
0x00019c50 add r0, r0, 0x32 | r0 = 0x19d72;
0x00019c54 bl 0x1e1bc | fcn_0001e1bc (r0, r1);
0x00019c58 ldr r0, [sp, 0xc] | r0 = var_ch;
0x00019c5c add sp, sp, 0x7c |
0x00019c60 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x00019c64 str r5, [sp] | *(sp) = r5;
0x00019c68 mov r3, r7 | r3 = r7;
0x00019c6c mov r2, fp | r2 = fp;
0x00019c70 mov r1, r4 | r1 = r4;
0x00019c74 bl 0x3638 | r0 = snprintf (r0, r1, r2, r3);
0x00019c78 cmp r0, r4 |
| if (r0 <= r4) {
0x00019c7c blo 0x19c98 | goto label_6;
| }
0x00019c80 mov r2, r8 | r2 = r8;
0x00019c84 ldr r1, [pc, 0xc0] | r1 = *(0x19d48);
0x00019c88 mov r0, r6 | r0 = r6;
0x00019c8c bl 0x1e960 | fcn_0001e960 (r0, r1);
0x00019c90 mvn r3, 1 | r3 = ~1;
0x00019c94 b 0x19c30 |
| } while (1);
| label_6:
0x00019c98 add r1, sp, 0x10 | r1 += var_10h;
0x00019c9c mov r0, r8 | r0 = r8;
0x00019ca0 bl 0x3710 | lstat64 ();
0x00019ca4 mov r2, r8 | r2 = r8;
0x00019ca8 mov r1, 0x200 | r1 = 0x200;
0x00019cac mov r0, r6 | r0 = r6;
0x00019cb0 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x00019cb4 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00019cb8 and r3, r3, 0xf000 | r3 &= 0xf000;
0x00019cbc cmp r3, 0x8000 |
| if (r3 != 0x8000) {
0x00019cc0 bne 0x19bd8 | goto label_0;
| }
0x00019cc4 mov r0, r5 | r0 = r5;
0x00019cc8 bl 0x3608 | strlen (r0);
0x00019ccc ldr r1, [pc, 0x7c] | r1 = *(0x19d4c);
0x00019cd0 add r2, r0, 1 | r2 = r0 + 1;
0x00019cd4 mov r0, r6 | r0 = r6;
0x00019cd8 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x00019cdc subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x00019ce0 beq 0x19c2c | goto label_1;
| }
0x00019ce4 mov r1, r5 | r1 = r5;
0x00019ce8 bl 0x3bd8 | strcpy (r0, r1)
0x00019cec ldr r1, [pc, 0x60] | r1 = *(0x19d50);
0x00019cf0 mov r0, r4 | r0 = r4;
0x00019cf4 add r1, pc, r1 | r1 = pc + r1;
0x00019cf8 bl 0x3aa0 | strstr (r0, r1);
0x00019cfc mov r1, sl | r1 = sl;
0x00019d00 cmp r0, 0 |
| if (r0 == 0) {
0x00019d04 movne r3, 0 | r3 = 0;
| }
| if (r0 == 0) {
0x00019d08 strbne r3, [r0] | *(r0) = r3;
| }
0x00019d0c mov r0, r4 | r0 = r4;
0x00019d10 bl 0x3aac | strcmp (r0, r1);
0x00019d14 mov r2, r4 | r2 = r4;
0x00019d18 ldr r1, [pc, 0x38] | r1 = *(0x19d54);
0x00019d1c cmp r0, 0 |
| if (r0 != 0) {
0x00019d20 streq r0, [sp, 0xc] | var_ch = r0;
| }
0x00019d24 ldr r0, [pc, 0x30] | r0 = *(0x19d58);
0x00019d28 add r0, pc, r0 | r0 = pc + r0;
0x00019d2c bl 0x1e960 | fcn_0001e960 (r0, r1);
0x00019d30 b 0x19bd0 | 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-mqtt3as.so.1.3.9 @ 0x19f4c */
| #include <stdint.h>
|
; (fcn) fcn.00019f4c () | void fcn_00019f4c (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;
0x00019f4c push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00019f50 mov sl, r0 | sl = r0;
0x00019f54 ldr r0, [pc, 0x314] |
0x00019f58 sub sp, sp, 0x8c |
0x00019f5c add r0, pc, r0 | r0 = pc + r0;
0x00019f60 str r1, [sp, 0xc] | var_ch = r1;
0x00019f64 str r2, [sp, 0x10] | var_10h = r2;
0x00019f68 ldr r1, [pc, 0x304] | r1 = *(0x1a270);
0x00019f6c mov r2, 3 | r2 = 3;
0x00019f70 add r0, r0, 0x64 | r0 = 0x1a2d0;
0x00019f74 mov r4, 0 | r4 = 0;
0x00019f78 str r4, [sp, 0x1c] | var_1ch = r4;
0x00019f7c bl 0x1e0d4 | fcn_0001e0d4 (r0, r1);
0x00019f80 mov r0, sl | r0 = sl;
0x00019f84 bl 0x3620 | r0 = opendir ();
0x00019f88 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x00019f8c bne 0x1a0cc | goto label_10;
| }
| label_4:
0x00019f90 mvn r3, 1 | r3 = ~1;
| label_2:
0x00019f94 str r3, [sp, 0x1c] | var_1ch = r3;
| do {
| label_8:
0x00019f98 ldr r0, [pc, 0x2d8] |
0x00019f9c mov r3, 3 | r3 = 3;
0x00019fa0 add r0, pc, r0 | r0 = pc + r0;
0x00019fa4 add r2, sp, 0x1c | r2 += var_1ch;
0x00019fa8 mov r1, 0x370 | r1 = 0x370;
0x00019fac add r0, r0, 0x64 | r0 = 0x1a2d8;
0x00019fb0 bl 0x1e1bc | fcn_0001e1bc (r0, r1);
0x00019fb4 ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x00019fb8 add sp, sp, 0x8c |
0x00019fbc pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_1:
0x00019fc0 mov r0, sl | r0 = sl;
0x00019fc4 bl 0x3608 | strlen (r0);
0x00019fc8 add r3, r7, 0x13 | r3 = r7 + 0x13;
0x00019fcc str r3, [sp, 8] | var_8h = r3;
0x00019fd0 mov r6, r0 | r6 = r0;
0x00019fd4 mov r0, r3 | r0 = r3;
0x00019fd8 bl 0x3608 | strlen (r0);
0x00019fdc mov r1, sb | r1 = sb;
0x00019fe0 add r6, r6, r0 | r6 += r0;
0x00019fe4 add r6, r6, 2 | r6 += 2;
0x00019fe8 mov r2, r6 | r2 = r6;
0x00019fec mov r0, r8 | r0 = r8;
0x00019ff0 bl 0x1e7a4 | fcn_0001e7a4 (r0, r1);
0x00019ff4 ldr r3, [sp, 8] | r3 = var_8h;
0x00019ff8 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x00019ffc bne 0x1a014 | goto label_11;
| }
| label_5:
0x0001a000 mvn r3, 0x62 | r3 = ~0x62;
| label_0:
0x0001a004 str r3, [sp, 0x1c] | var_1ch = r3;
| label_9:
0x0001a008 mov r0, r5 | r0 = r5;
0x0001a00c bl 0x3794 | closedir ();
0x0001a010 b 0x19f98 |
| } while (1);
| label_11:
0x0001a014 str r3, [sp] | *(sp) = r3;
0x0001a018 mov r2, fp | r2 = fp;
0x0001a01c mov r3, sl | r3 = sl;
0x0001a020 mov r1, r6 | r1 = r6;
0x0001a024 bl 0x3638 | r0 = snprintf (r0, r1, r2, r3);
0x0001a028 cmp r0, r6 |
| if (r0 > r6) {
0x0001a02c blo 0x1a048 |
0x0001a030 ldr r1, [pc, 0x244] | r1 = *(0x1a278);
0x0001a034 mov r2, r7 | r2 = r7;
0x0001a038 mov r0, r8 | r0 = r8;
| label_6:
0x0001a03c bl 0x1e960 | fcn_0001e960 (r0, r1);
0x0001a040 mvn r3, 1 | r3 = ~1;
0x0001a044 b 0x1a004 | goto label_0;
| }
0x0001a048 add r1, sp, 0x20 | r1 += var_20h;
0x0001a04c mov r0, r7 | r0 = r7;
0x0001a050 bl 0x3710 | r0 = lstat64 ();
0x0001a054 cmp r0, 0 |
| if (r0 == 0) {
0x0001a058 bne 0x1a06c |
0x0001a05c ldr r3, [sp, 0x30] | r3 = var_30h;
0x0001a060 and r3, r3, 0xf000 | r3 &= 0xf000;
0x0001a064 cmp r3, 0x8000 |
| if (r3 == 0x8000) {
0x0001a068 addeq r4, r4, 1 | r4++;
| goto label_12;
| }
| }
| label_12:
0x0001a06c ldr r0, [pc, 0x20c] | r0 = *(0x1a27c);
0x0001a070 mov r2, r7 | r2 = r7;
0x0001a074 ldr r1, [pc, 0x208] | r1 = *(0x1a280);
0x0001a078 add r0, pc, r0 | r0 = pc + r0;
0x0001a07c bl 0x1e960 | fcn_0001e960 (r0, r1);
| label_3:
0x0001a080 mov r0, r5 | r0 = r5;
0x0001a084 bl 0x3bb4 | r0 = readdir64 ();
0x0001a088 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x0001a08c bne 0x19fc0 | goto label_1;
| }
0x0001a090 mov r0, r5 | r0 = r5;
0x0001a094 bl 0x3794 | closedir ();
0x0001a098 cmp r4, 0 |
| if (r4 != 0) {
0x0001a09c moveq r5, r4 | r5 = r4;
| }
| if (r4 != 0) {
0x0001a0a0 moveq r6, r4 | r6 = r4;
| }
| if (r4 == 0) {
0x0001a0a4 beq 0x1a254 | goto label_13;
| }
0x0001a0a8 ldr r0, [pc, 0x1d8] | r0 = *(0x1a284);
0x0001a0ac lsl r2, r4, 2 | r2 = r4 << 2;
0x0001a0b0 ldr r1, [pc, 0x1d4] | r1 = *(0x1a288);
0x0001a0b4 add r0, pc, r0 | r0 = pc + r0;
0x0001a0b8 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x0001a0bc subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x0001a0c0 bne 0x1a0e4 |
0x0001a0c4 mvn r3, 0x62 | r3 = ~0x62;
0x0001a0c8 b 0x19f94 | goto label_2;
| label_10:
0x0001a0cc ldr r8, [pc, 0x1bc] | r8 = *(0x1a28c);
0x0001a0d0 ldr fp, [pc, 0x1bc] | fp = *(0x0001a294);
0x0001a0d4 add r8, pc, r8 | r8 = pc + r8;
0x0001a0d8 ldr sb, [pc, 0x1b8] | sb = *(0x0001a298);
0x0001a0dc add fp, pc, fp |
0x0001a0e0 b 0x1a080 | goto label_3;
| }
0x0001a0e4 mov r0, sl | r0 = sl;
0x0001a0e8 bl 0x3620 | r0 = opendir ();
0x0001a0ec subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x0001a0f0 beq 0x19f90 | goto label_4;
| }
0x0001a0f4 ldr r3, [pc, 0x1a0] | r3 = *(0x1a298);
0x0001a0f8 str r7, [sp, 8] | var_8h = r7;
0x0001a0fc ldr r7, [pc, 0x19c] | r7 = *(0x1a29c);
0x0001a100 add r3, pc, r3 | r3 = pc + r3;
0x0001a104 add r7, pc, r7 | r7 = pc + r7;
0x0001a108 str r3, [sp, 0x14] | var_14h = r3;
0x0001a10c b 0x1a244 | goto label_14;
| label_7:
0x0001a110 mov r0, sl | r0 = sl;
0x0001a114 bl 0x3608 | strlen (r0);
0x0001a118 add sb, sb, 0x13 | sb += 0x13;
0x0001a11c mov r8, r0 | r8 = r0;
0x0001a120 mov r0, sb | r0 = sb;
0x0001a124 bl 0x3608 | strlen (r0);
0x0001a128 ldr r1, [pc, 0x174] | r1 = *(0x1a2a0);
0x0001a12c add r8, r8, r0 | r8 += r0;
0x0001a130 add r8, r8, 2 | r8 += 2;
0x0001a134 mov r2, r8 | r2 = r8;
0x0001a138 mov r0, r7 | r0 = r7;
0x0001a13c bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x0001a140 subs fp, r0, 0 |
| if (fp != r0) {
0x0001a144 bne 0x1a15c | goto label_15;
| }
0x0001a148 ldr r1, [pc, 0x158] | r1 = *(0x1a2a4);
0x0001a14c mov r2, r6 | r2 = r6;
| do {
0x0001a150 mov r0, r7 | r0 = r7;
0x0001a154 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x0001a158 b 0x1a000 | goto label_5;
| label_15:
0x0001a15c str sb, [sp] | *(sp) = sb;
0x0001a160 mov r3, sl | r3 = sl;
0x0001a164 ldr r2, [sp, 0x14] | r2 = var_14h;
0x0001a168 mov r1, r8 | r1 = r8;
0x0001a16c bl 0x3638 | r0 = snprintf (r0, r1, r2, r3);
0x0001a170 cmp r0, r8 |
| if (r0 > r8) {
0x0001a174 blo 0x1a198 |
0x0001a178 mov r2, fp | r2 = fp;
0x0001a17c mov r1, 0x34c | r1 = 0x34c;
0x0001a180 mov r0, r7 | r0 = r7;
0x0001a184 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x0001a188 mov r2, r6 | r2 = r6;
0x0001a18c ldr r1, [pc, 0x118] | r1 = *(0x1a2a8);
0x0001a190 mov r0, r7 | r0 = r7;
0x0001a194 b 0x1a03c | goto label_6;
| }
0x0001a198 add r1, sp, 0x20 | r1 += var_20h;
0x0001a19c mov r0, fp | r0 = fp;
0x0001a1a0 bl 0x3710 | r0 = lstat64 ();
0x0001a1a4 subs r8, r0, 0 | r8 = r0 - 0;
| if (r8 != r0) {
0x0001a1a8 bne 0x1a230 | goto label_16;
| }
0x0001a1ac ldr r3, [sp, 0x30] | r3 = var_30h;
0x0001a1b0 and r3, r3, 0xf000 | r3 &= 0xf000;
0x0001a1b4 cmp r3, 0x8000 |
| if (r3 != 0x8000) {
0x0001a1b8 bne 0x1a230 | goto label_16;
| }
0x0001a1bc mov r0, sb | r0 = sb;
0x0001a1c0 bl 0x3608 | strlen (r0);
0x0001a1c4 ldr r1, [pc, 0xe4] | r1 = *(0x1a2ac);
0x0001a1c8 add r2, r0, 1 | r2 = r0 + 1;
0x0001a1cc mov r0, r7 | r0 = r7;
0x0001a1d0 bl 0x1e7a4 | fcn_0001e7a4 (r0, r1);
0x0001a1d4 ldr r2, [sp, 8] | r2 = var_8h;
0x0001a1d8 cmp r0, 0 |
0x0001a1dc str r0, [r6, r2, lsl 2] | offset_0 = r2 << 2;
| *((r6 + offset_0)) = r0;
| if (r0 != 0) {
0x0001a1e0 bne 0x1a200 | goto label_17;
| }
0x0001a1e4 mov r2, fp | r2 = fp;
0x0001a1e8 ldr r1, [pc, 0xc4] | r1 = *(0x1a2b0);
0x0001a1ec mov r0, r7 | r0 = r7;
0x0001a1f0 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x0001a1f4 mov r2, r6 | r2 = r6;
0x0001a1f8 ldr r1, [pc, 0xb8] | r1 = *(0x1a2b4);
0x0001a1fc b 0x1a150 |
| } while (1);
| label_17:
0x0001a200 mov r1, sb | r1 = sb;
0x0001a204 bl 0x3bd8 | strcpy (r0, r1)
0x0001a208 ldr r3, [sp, 8] | r3 = var_8h;
0x0001a20c ldr r1, [pc, 0xa8] | r1 = *(0x1a2b8);
0x0001a210 ldr r0, [r6, r3, lsl 2] | offset_1 = r3 << 2;
| r0 = *((r6 + offset_1));
0x0001a214 add r1, pc, r1 | r1 = pc + r1;
0x0001a218 bl 0x3aa0 | strstr (r0, r1);
0x0001a21c ldr r3, [sp, 8] | r3 = var_8h;
0x0001a220 add r3, r3, 1 | r3++;
0x0001a224 str r3, [sp, 8] | var_8h = r3;
0x0001a228 cmp r0, 0 |
| if (r0 == 0) {
0x0001a22c strbne r8, [r0] | *(r0) = r8;
| }
| label_16:
0x0001a230 ldr r0, [pc, 0x88] | r0 = *(0x1a2bc);
0x0001a234 mov r2, fp | r2 = fp;
0x0001a238 mov r1, 0x360 | r1 = 0x360;
0x0001a23c add r0, pc, r0 | r0 = pc + r0;
0x0001a240 bl 0x1e960 | fcn_0001e960 (r0, r1);
| label_14:
0x0001a244 mov r0, r5 | r0 = r5;
0x0001a248 bl 0x3bb4 | r0 = readdir64 ();
0x0001a24c subs sb, r0, 0 | sb = r0 - 0;
| if (sb != r0) {
0x0001a250 bne 0x1a110 | goto label_7;
| }
| label_13:
0x0001a254 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0001a258 cmp r5, 0 |
0x0001a25c str r4, [r3] | *(r3) = r4;
0x0001a260 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0001a264 str r6, [r3] | *(r3) = r6;
| if (r5 == 0) {
0x0001a268 beq 0x19f98 | goto label_8;
| }
0x0001a26c b 0x1a008 | 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-mqtt3as.so.1.3.9 @ 0x1ca24 */
| #include <stdint.h>
|
; (fcn) fcn.0001ca24 () | void fcn_0001ca24 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_0h_3;
| void * s2;
| char * dest;
| int32_t var_20h;
| int32_t var_24h;
| int32_t var_28h;
| void * s;
| int32_t var_0h_2;
| void * var_40h;
| r0 = arg1;
| r1 = arg2;
0x0001ca24 push {r4, r5, r6, r7, r8, lr} |
0x0001ca28 sub sp, sp, 0x40 |
0x0001ca2c add r4, sp, 0x2c | r4 += s;
0x0001ca30 mov r5, r0 | r5 = r0;
0x0001ca34 mov r6, r1 | r6 = r1;
0x0001ca38 mov r7, r2 | r7 = r2;
0x0001ca3c mov r1, 0 | r1 = 0;
0x0001ca40 mov r2, 0x14 | r2 = 0x14;
0x0001ca44 mov r0, r4 | r0 = r4;
0x0001ca48 bl 0x38a8 | memset (r0, r1, r2);
0x0001ca4c ldr r0, [pc, 0x19c] |
0x0001ca50 mov r2, 3 | r2 = 3;
0x0001ca54 add r0, pc, r0 | r0 = pc + r0;
0x0001ca58 ldr r1, [pc, 0x194] | r1 = *(0x1cbf0);
0x0001ca5c add r0, r0, 0x42 | r0 = 0x1cc2e;
0x0001ca60 bl 0x1e0d4 | fcn_0001e0d4 (r0, r1);
0x0001ca64 ldr r3, [r5, 0x34] | r3 = *((r5 + 0x34));
0x0001ca68 cmp r3, 0 |
| if (r3 == 0) {
0x0001ca6c beq 0x1cb84 | goto label_0;
| }
0x0001ca70 mov r3, 2 | r3 = 2;
0x0001ca74 str r3, [sp, 0x20] | var_20h = r3;
0x0001ca78 ldr r3, [pc, 0x178] | r3 = *(0x1cbf4);
0x0001ca7c sub r2, r6, 0x3e8 | r2 = r6 - 0x3e8;
0x0001ca80 cmp r2, 0xf |
| if (r2 <= 0xf) {
0x0001ca84 movhi r6, r3 | r6 = r3;
| }
0x0001ca88 cmp r7, 0 |
| if (r7 != 0) {
0x0001ca8c beq 0x1caa0 |
0x0001ca90 mov r0, r7 | r0 = r7;
0x0001ca94 bl 0x3608 | r0 = strlen (r0);
0x0001ca98 add r0, r0, 2 | r0 += 2;
0x0001ca9c str r0, [sp, 0x20] | var_20h = r0;
| }
0x0001caa0 ldr r0, [pc, 0x154] | r0 = *(0x1cbf8);
0x0001caa4 ldr r2, [sp, 0x20] | r2 = var_20h;
0x0001caa8 mov r1, 0x220 | r1 = 0x220;
0x0001caac add r0, pc, r0 | r0 = pc + r0;
0x0001cab0 bl 0x1e7a4 | r0 = fcn_0001e7a4 (r0, r1);
0x0001cab4 cmp r0, 0 |
0x0001cab8 str r0, [sp, 0x1c] | dest = r0;
| if (r0 == 0) {
0x0001cabc beq 0x1cba8 | goto label_1;
| }
0x0001cac0 lsl r3, r6, 0x10 | r3 = r6 << 0x10;
0x0001cac4 lsr r3, r3, 0x18 | r3 >>= 0x18;
0x0001cac8 orr r3, r3, r6, lsl 8 | r3 |= (r6 << 8);
0x0001cacc add r1, sp, 0x40 | r1 += var_40h;
0x0001cad0 strh r3, [r1, -0x26]! | *((r1 -= 0x26)) = r3;
0x0001cad4 mov r2, 2 | r2 = 2;
0x0001cad8 bl 0x3494 | memcpy (r0, r1, r2);
0x0001cadc cmp r7, 0 |
| if (r7 != 0) {
0x0001cae0 beq 0x1caf4 |
0x0001cae4 ldr r0, [sp, 0x1c] | r0 = dest;
0x0001cae8 mov r1, r7 | r1 = r7;
0x0001caec add r0, r0, 2 | r0 += 2;
0x0001caf0 bl 0x3bd8 | strcpy (r0, r1)
| }
0x0001caf4 add r3, sp, 0x20 | r3 += var_20h;
0x0001caf8 str r3, [sp] | *(sp) = r3;
0x0001cafc str r4, [sp, 4] | var_4h = r4;
0x0001cb00 add r3, sp, 0x1c | r3 += dest;
0x0001cb04 mov r2, 8 | r2 = 8;
0x0001cb08 mov r1, r5 | r1 = r5;
0x0001cb0c add r0, sp, 0x24 | r0 += var_24h;
0x0001cb10 bl 0x1c31c | fcn_0001c31c (r0, r1, r2, r3);
0x0001cb14 ldr r8, [r5, 0x1c] | r8 = *((r5 + 0x1c));
0x0001cb18 ldr r6, [sp, 0x24] | r6 = var_24h;
0x0001cb1c cmp r8, 0 |
0x0001cb20 ldr r7, [sp, 0x28] | r7 = var_28h;
| if (r8 == 0) {
0x0001cb24 beq 0x1cbcc | goto label_2;
| }
0x0001cb28 mov ip, r4 |
0x0001cb2c ldm ip!, {r0, r1, r2, r3} | r0 = *(ip!);
| r1 = *((ip! + 4));
| r2 = *((ip! + 8));
| r3 = *((ip! + 12));
0x0001cb30 mov lr, sp | lr = sp;
0x0001cb34 stm lr!, {r0, r1, r2, r3} | *(lr!) = r0;
| *((lr! + 4)) = r1;
| *((lr! + 8)) = r2;
| *((lr! + 12)) = r3;
0x0001cb38 ldr r3, [ip] | r3 = *(ip);
0x0001cb3c mov r2, r6 | r2 = r6;
0x0001cb40 str r3, [lr] | *(lr) = r3;
0x0001cb44 mov r0, r8 | r0 = r8;
0x0001cb48 mov r3, r7 | r3 = r7;
0x0001cb4c ldr r1, [r5] | r1 = *(r5);
0x0001cb50 bl 0xe1d8 | fcn_0000e1d8 (r0, r1, r2, r3, r4, r5);
| do {
0x0001cb54 ldr r4, [pc, 0xa4] | r4 = *(0x1cbfc);
0x0001cb58 mov r2, r6 | r2 = r6;
0x0001cb5c add r4, pc, r4 | r4 = pc + r4;
0x0001cb60 ldr r1, [pc, 0x9c] | r1 = *(0x1cc00);
0x0001cb64 mov r0, r4 | r0 = r4;
0x0001cb68 bl 0x1e960 | fcn_0001e960 (r0, r1);
0x0001cb6c mov r3, 0 | r3 = 0;
0x0001cb70 str r3, [r5, 0x34] | *((r5 + 0x34)) = r3;
0x0001cb74 ldr r2, [sp, 0x1c] | r2 = dest;
0x0001cb78 ldr r1, [pc, 0x88] | r1 = *(0x1cc04);
0x0001cb7c mov r0, r4 | r0 = r4;
0x0001cb80 bl 0x1e960 | fcn_0001e960 (r0, r1);
| label_0:
0x0001cb84 ldr r2, [r5, 0x38] | r2 = *((r5 + 0x38));
0x0001cb88 cmp r2, 0 |
| if (r2 != 0) {
0x0001cb8c beq 0x1cba8 |
0x0001cb90 ldr r0, [pc, 0x74] | r0 = *(0x1cc08);
0x0001cb94 ldr r1, [pc, 0x74] | r1 = *(0x1cc0c);
0x0001cb98 add r0, pc, r0 | r0 = pc + r0;
0x0001cb9c bl 0x1e960 | fcn_0001e960 (r0, r1);
0x0001cba0 mov r3, 0 | r3 = 0;
0x0001cba4 str r3, [r5, 0x38] | *((r5 + 0x38)) = r3;
| }
| label_1:
0x0001cba8 ldr r0, [pc, 0x64] |
0x0001cbac mov r3, 3 | r3 = 3;
0x0001cbb0 add r0, pc, r0 | r0 = pc + r0;
0x0001cbb4 mov r2, 0 | r2 = 0;
0x0001cbb8 ldr r1, [pc, 0x58] | r1 = *(0x1cc14);
0x0001cbbc add r0, r0, 0x42 | r0 = 0x1cc52;
0x0001cbc0 bl 0x1e1bc | fcn_0001e1bc (r0, r1);
0x0001cbc4 add sp, sp, 0x40 |
0x0001cbc8 pop {r4, r5, r6, r7, r8, pc} |
| label_2:
0x0001cbcc add r3, sp, 0x40 | r3 += var_40h;
0x0001cbd0 ldmdb r3, {r0, r1, r2, r3} | __asm ("ldmdb r3, {r0, r1, r2, r3}");
0x0001cbd4 stm sp, {r0, r1, r2, r3} | *(sp) = r0;
| *((sp + 4)) = r1;
| *((sp + 8)) = r2;
| *((sp + 12)) = r3;
0x0001cbd8 ldr r3, [sp, 0x2c] | r3 = s;
0x0001cbdc mov r2, r7 | r2 = r7;
0x0001cbe0 mov r1, r6 | r1 = r6;
0x0001cbe4 ldr r0, [r5] | r0 = *(r5);
0x0001cbe8 bl 0x146d8 | fcn_000146d8 (r0, r1, r2, r3, r4);
0x0001cbec b 0x1cb54 |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/lib/libpaho-mqtt3as.so.1.3.9 @ 0x1e7a4 */
| #include <stdint.h>
|
; (fcn) fcn.0001e7a4 () | void fcn_0001e7a4 (int32_t arg1, int32_t arg2) {
| int32_t var_8h;
| int32_t var_14h;
| r0 = arg1;
| r1 = arg2;
0x0001e7a4 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001e7a8 sub sp, sp, 0x14 |
0x0001e7ac mov r6, r2 | r6 = r2;
0x0001e7b0 mov sb, r1 | sb = r1;
0x0001e7b4 mov r8, r0 | r8 = r0;
0x0001e7b8 bl 0x3608 | r0 = strlen (r0);
0x0001e7bc mov r5, r0 | r5 = r0;
0x0001e7c0 add r4, r0, 1 | r4 = r0 + 1;
0x0001e7c4 ldr r0, [pc, 0x170] |
0x0001e7c8 add r0, pc, r0 | r0 = pc + r0;
0x0001e7cc add r0, r0, 0x28 | r0 = 0x1e960;
0x0001e7d0 bl 0x3af4 | fcn_00003af4 ();
0x0001e7d4 ands r3, r6, 0xf | r3 = r6 & 0xf;
| if (r3 == r6) {
0x0001e7d8 addne r2, r6, 0x10 | r2 = r6 + 0x10;
| }
0x0001e7dc mov r0, 0x10 | r0 = 0x10;
| if (r3 == r6) {
0x0001e7e0 subne r6, r2, r3 | r6 = r2 - r3;
| }
0x0001e7e4 bl 0x3584 | r0 = malloc (r0);
0x0001e7e8 subs r7, r0, 0 | r7 = r0 - 0;
| if (r7 != r0) {
0x0001e7ec bne 0x1e824 | goto label_2;
| }
0x0001e7f0 ldr r2, [pc, 0x148] | r2 = *(0x1e93c);
0x0001e7f4 mov r1, 0xd | r1 = 0xd;
0x0001e7f8 add r2, pc, r2 | r2 = pc + r2;
0x0001e7fc mov r0, 5 | r0 = 5;
0x0001e800 bl 0x16364 | fcn_00016364 (r0, r1, r2, r3);
0x0001e804 mov r4, r7 | r4 = r7;
| do {
| label_1:
0x0001e808 ldr r0, [pc, 0x134] |
0x0001e80c add r0, pc, r0 | r0 = pc + r0;
0x0001e810 add r0, r0, 0x28 | r0 = 0x1e968;
0x0001e814 bl 0x3a34 | fcn_00003a34 ();
0x0001e818 mov r0, r4 | r0 = r4;
0x0001e81c add sp, sp, 0x14 |
0x0001e820 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_2:
0x0001e824 mov sl, 0 | sl = 0;
0x0001e828 mov r0, r4 | r0 = r4;
0x0001e82c str sl, [r7, 4] | *((r7 + 4)) = sl;
0x0001e830 str sl, [r7, 8] | *((r7 + 8)) = sl;
0x0001e834 str r6, [r7, 0xc] | *((r7 + 0xc)) = r6;
0x0001e838 bl 0x3584 | r0 = malloc (r0);
0x0001e83c cmp r0, sl |
0x0001e840 mov r4, r0 | r4 = r0;
0x0001e844 str r0, [r7] | *(r7) = r0;
| if (r0 != sl) {
0x0001e848 bne 0x1e86c | goto label_3;
| }
0x0001e84c ldr r2, [pc, 0xf4] | r2 = *(0x1e944);
0x0001e850 mov r1, 0xd | r1 = 0xd;
0x0001e854 add r2, pc, r2 | r2 = pc + r2;
0x0001e858 mov r0, 5 | r0 = 5;
0x0001e85c bl 0x16364 | fcn_00016364 (r0, r1, r2, r3);
| label_0:
0x0001e860 mov r0, r7 | r0 = r7;
0x0001e864 bl 0x3b0c | free (r0);
0x0001e868 b 0x1e808 |
| } while (1);
| label_3:
0x0001e86c mov r1, r8 | r1 = r8;
0x0001e870 str sl, [r0] | *(r0) = sl;
0x0001e874 add fp, r6, 0x10 |
0x0001e878 bl 0x3bd8 | strcpy (r0, r1)
0x0001e87c str sb, [r7, 4] | *((r7 + 4)) = sb;
0x0001e880 mov r0, fp | r0 = fp;
0x0001e884 bl 0x3584 | r0 = malloc (r0);
0x0001e888 cmp r0, 0 |
0x0001e88c mov r4, r0 | r4 = r0;
0x0001e890 str r0, [r7, 8] | *((r7 + 8)) = r0;
| if (r0 == 0) {
0x0001e894 bne 0x1e8b8 |
0x0001e898 ldr r2, [pc, 0xac] | r2 = *(0x1e948);
0x0001e89c mov r1, 0xd | r1 = 0xd;
0x0001e8a0 add r2, pc, r2 | r2 = pc + r2;
0x0001e8a4 mov r0, 5 | r0 = 5;
0x0001e8a8 bl 0x16364 | fcn_00016364 (r0, r1, r2, r3);
0x0001e8ac ldr r0, [r7] | r0 = *(r7);
0x0001e8b0 bl 0x3b0c | free (r0);
0x0001e8b4 b 0x1e860 | goto label_0;
| }
0x0001e8b8 mov r2, fp | r2 = fp;
0x0001e8bc mov r1, sl | r1 = sl;
0x0001e8c0 bl 0x38a8 | memset (r0, r1, r2);
0x0001e8c4 ldr r2, [pc, 0x84] | r2 = *(0x1e94c);
0x0001e8c8 ldr r3, [pc, 0x84] | r3 = *(0x1e950);
0x0001e8cc add r1, r4, r6 | r1 = r4 + r6;
0x0001e8d0 strd r2, r3, [r4] | __asm ("strd r2, r3, [r4]");
0x0001e8d4 strd r2, r3, [r1, 8] | __asm ("strd r2, r3, [r1, 8]");
0x0001e8d8 ldr r2, [pc, 0x78] | r2 = *(0x1e954);
0x0001e8dc str r4, [sp, 8] | var_8h = r4;
0x0001e8e0 ldr r4, [pc, 0x74] | r4 = *(0x1e958);
0x0001e8e4 add r5, r5, 0x21 | r5 += 0x21;
0x0001e8e8 add r4, pc, r4 | r4 = pc + r4;
0x0001e8ec mov r3, r6 | r3 = r6;
0x0001e8f0 add r2, pc, r2 | r2 = pc + r2;
0x0001e8f4 mvn r1, 0 | r1 = ~0;
0x0001e8f8 mov r0, 1 | r0 = 1;
0x0001e8fc add r5, r5, r6 | r5 += r6;
0x0001e900 stm sp, {r8, sb} | *(sp) = r8;
| *((sp + 4)) = sb;
0x0001e904 bl 0x16364 | fcn_00016364 (r0, r1, r2, r3);
0x0001e908 mov r2, r5 | r2 = r5;
0x0001e90c mov r0, r4 | r0 = r4;
0x0001e910 mov r1, r7 | r1 = r7;
0x0001e914 bl 0x1398c | fcn_0001398c (r0, r1);
0x0001e918 ldr r2, [r4, 0x20] | r2 = *(0x1e978);
0x0001e91c ldr r3, [r4, 0x24] | r3 = *(0x1e97c);
0x0001e920 add r2, r6, r2 | r2 = r6 + r2;
0x0001e924 cmp r2, r3 |
0x0001e928 str r2, [r4, 0x20] | *((r4 + 0x20)) = r2;
| if (r2 <= r3) {
0x0001e92c strhi r2, [r4, 0x24] | *((r4 + 0x24)) = r2;
| }
0x0001e930 ldr r4, [r7, 8] | r4 = *((r7 + 8));
0x0001e934 add r4, r4, 8 | r4 += 8;
0x0001e938 b 0x1e808 | 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-mqtt3as.so.1.3.9 @ 0x1ea30 */
| #include <stdint.h>
|
; (fcn) fcn.0001ea30 () | void fcn_0001ea30 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| r0 = arg1;
| r1 = arg2;
0x0001ea30 push {r0, r1, r2, r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001ea34 ldr r5, [pc, 0x16c] | r5 = *(0x1eba4);
0x0001ea38 mov r4, r2 | r4 = r2;
0x0001ea3c add r5, pc, r5 | r5 = pc + r5;
0x0001ea40 mov r8, r0 | r8 = r0;
0x0001ea44 add r0, r5, 0x28 | r0 = r5 + 0x28;
0x0001ea48 mov sb, r1 | sb = r1;
0x0001ea4c mov r6, r3 | r6 = r3;
0x0001ea50 bl 0x3af4 | fcn_00003af4 ();
0x0001ea54 mov r0, r5 | r0 = r5;
0x0001ea58 sub r1, r4, 8 | r1 = r4 - 8;
0x0001ea5c bl 0x13e7c | r0 = fcn_00013e7c (r0, r1);
0x0001ea60 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x0001ea64 bne 0x1eaac | goto label_1;
| }
0x0001ea68 ldr r2, [pc, 0x13c] | r2 = *(0x1eba8);
0x0001ea6c str sb, [sp] | *(sp) = sb;
0x0001ea70 mov r3, r8 | r3 = r8;
0x0001ea74 add r2, pc, r2 | r2 = pc + r2;
0x0001ea78 mov r1, 0xd | r1 = 0xd;
0x0001ea7c mov r0, 5 | r0 = 5;
0x0001ea80 bl 0x16364 | fcn_00016364 (r0, r1, r2, r3);
0x0001ea84 mov r4, r5 | r4 = r5;
| do {
| label_0:
0x0001ea88 ldr r0, [pc, 0x120] |
0x0001ea8c add r0, pc, r0 | r0 = pc + r0;
0x0001ea90 add r0, r0, 0x28 | r0 = 0x1ebd4;
0x0001ea94 bl 0x3a34 | fcn_00003a34 ();
0x0001ea98 cmp r4, 0 |
| if (r4 == 0) {
0x0001ea9c addne r4, r4, 8 | r4 += 8;
| }
0x0001eaa0 mov r0, r4 | r0 = r4;
0x0001eaa4 add sp, sp, 0xc |
0x0001eaa8 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_1:
0x0001eaac mov r0, r8 | r0 = r8;
0x0001eab0 bl 0x3608 | strlen (r0);
0x0001eab4 mov r2, r4 | r2 = r4;
0x0001eab8 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x0001eabc mov r1, sb | r1 = sb;
0x0001eac0 mov sl, r0 | sl = r0;
0x0001eac4 mov r0, r8 | r0 = r8;
0x0001eac8 bl 0x1e600 | fcn_0001e600 (r0, r1);
0x0001eacc ldr r2, [pc, 0xe0] | r2 = *(0x1ebb0);
0x0001ead0 ands r3, r6, 0xf | r3 = r6 & 0xf;
0x0001ead4 add r2, pc, r2 | r2 = pc + r2;
| if (r3 == r6) {
0x0001ead8 addne r6, r6, 0x10 | r6 += 0x10;
| }
| if (r3 == r6) {
0x0001eadc subne r6, r6, r3 | r6 -= r3;
| }
0x0001eae0 ldr r1, [r5, 0xc] | r1 = *((r5 + 0xc));
0x0001eae4 ldr r3, [r2, 0x20] | r3 = *(0x1ebd0);
0x0001eae8 ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x0001eaec sub r3, r3, r1 | r3 -= r1;
0x0001eaf0 ldr r1, [r2, 0x24] | r1 = *(0x1ebd4);
0x0001eaf4 add r3, r3, r6 | r3 += r6;
0x0001eaf8 cmp r3, r1 |
0x0001eafc add r1, r6, 0x10 | r1 = r6 + 0x10;
| if (r3 <= r1) {
0x0001eb00 strhi r3, [r2, 0x24] | *((r2 + 0x24)) = r3;
| }
0x0001eb04 str r3, [r2, 0x20] | *((r2 + 0x20)) = r3;
0x0001eb08 bl 0x34c4 | r0 = realloc (r0, r1);
0x0001eb0c cmp r0, 0 |
0x0001eb10 mov r4, r0 | r4 = r0;
0x0001eb14 str r0, [r5, 8] | *((r5 + 8)) = r0;
| if (r0 != 0) {
0x0001eb18 bne 0x1eb34 | goto label_2;
| }
0x0001eb1c ldr r2, [pc, 0x94] | r2 = *(0x1ebb4);
0x0001eb20 mov r1, 0xd | r1 = 0xd;
0x0001eb24 add r2, pc, r2 | r2 = pc + r2;
0x0001eb28 mov r0, 5 | r0 = 5;
0x0001eb2c bl 0x16364 | fcn_00016364 (r0, r1, r2, r3);
0x0001eb30 b 0x1ea88 |
| } while (1);
| label_2:
0x0001eb34 ldr r2, [r5, 0xc] | r2 = *((r5 + 0xc));
0x0001eb38 add sl, sl, 1 | sl++;
0x0001eb3c rsb r2, r2, 0x20 | r2 = 0x20 - r2;
0x0001eb40 ldr r3, [pc, 0x74] | r3 = *(0x1ebb8);
0x0001eb44 add r7, r2, sl | r7 = r2 + sl;
0x0001eb48 ldr r2, [pc, 0x70] | r2 = *(0x1ebbc);
0x0001eb4c add r4, r0, r6 | r4 = r0 + r6;
0x0001eb50 strd r2, r3, [r0] | __asm ("strd r2, r3, [r0]");
0x0001eb54 strd r2, r3, [r4, 8] | __asm ("strd r2, r3, [r4, 8]");
0x0001eb58 ldr r4, [r5] | r4 = *(r5);
0x0001eb5c str r6, [r5, 0xc] | *((r5 + 0xc)) = r6;
0x0001eb60 mov r0, r4 | r0 = r4;
0x0001eb64 bl 0x3608 | strlen (r0);
0x0001eb68 mov r1, sl | r1 = sl;
0x0001eb6c add r6, r7, r6 | r6 = r7 + r6;
0x0001eb70 mov fp, r0 |
0x0001eb74 mov r0, r4 | r0 = r4;
0x0001eb78 bl 0x34c4 | realloc (r0, r1);
0x0001eb7c mov r1, r8 | r1 = r8;
0x0001eb80 str r0, [r5] | *(r5) = r0;
0x0001eb84 bl 0x3bd8 | strcpy (r0, r1)
0x0001eb88 ldr r0, [pc, 0x34] | r0 = *(0x1ebc0);
0x0001eb8c str sb, [r5, 4] | *((r5 + 4)) = sb;
0x0001eb90 sub r2, r6, fp | r2 = r6 - fp;
0x0001eb94 mov r1, r5 | r1 = r5;
0x0001eb98 add r0, pc, r0 | r0 = pc + r0;
0x0001eb9c ldr r4, [r5, 8] | r4 = *((r5 + 8));
0x0001eba0 bl 0x1398c | fcn_0001398c (r0, r1);
0x0001eba4 b 0x1ea88 | goto label_0;
| }
[*] Function strcpy used 16 times libpaho-mqtt3as.so.1.3.9