[*] Binary protection state of libsyslog-ng-3.38.so.0.0.0
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function sprintf tear down of libsyslog-ng-3.38.so.0.0.0
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libsyslog-ng-3.38.so.0.0.0 @ 0x67500 */
| #include <stdint.h>
|
; (fcn) sym.str_repr_encode_append () | void str_repr_encode_append (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00067500 push.w {r4, r5, r6, r7, r8, lr} |
0x00067504 subs r5, r2, 0 | r5 = r2 - 0;
0x00067506 mov r4, r0 | r4 = r0;
0x00067508 mov r7, r1 | r7 = r1;
0x0006750a mov r8, r3 | r8 = r3;
| if (r5 < r2) {
0x0006750c blt 0x67580 | goto label_2;
| }
0x0006750e cmp r5, 0 |
| if (r5 == 0) {
0x00067510 beq 0x6758c | goto label_3;
| }
| do {
0x00067512 mov r2, r5 | r2 = r5;
0x00067514 movs r1, 0x27 | r1 = 0x27;
0x00067516 mov r0, r7 | r0 = r7;
0x00067518 blx 0x25798 | fcn_00025798 ();
0x0006751c mov r2, r5 | r2 = r5;
0x0006751e mov r6, r0 | r6 = r0;
0x00067520 movs r1, 0x22 | r1 = 0x22;
0x00067522 mov r0, r7 | r0 = r7;
0x00067524 blx 0x25798 | r0 = fcn_00025798 ();
0x00067528 orrs.w r3, r6, r0 | r3 = r6 | r0;
| if (r3 == r6) {
0x0006752c beq 0x6759c | goto label_4;
| }
0x0006752e ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x00067530 clz lr, r6 | lr &= r6;
0x00067534 lsr.w lr, lr, 5 | lr >>= 5;
0x00067538 cmp r0, 0 |
0x0006753a it eq |
| if (r0 != 0) {
0x0006753c moveq lr, 0 | lr = 0;
| }
0x00067540 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x00067542 add.w ip, r2, 1 |
0x00067546 cmp.w lr, 0 |
| if (lr == 0) {
0x0006754a beq 0x675ea | goto label_5;
| }
0x0006754c cmp ip, r1 |
| if (ip >= r1) {
0x0006754e bhs.w 0x67658 | goto label_6;
| }
0x00067552 ldr r3, [r4] | r3 = *(r4);
0x00067554 movs r1, 0x27 | r1 = 0x27;
0x00067556 str.w ip, [r4, 4] | __asm ("str.w ip, [r4, 4]");
0x0006755a strb r1, [r3, r2] | *((r3 + r2)) = r1;
0x0006755c movs r1, 0 | r1 = 0;
0x0006755e ldrd r2, r3, [r4] | __asm ("ldrd r2, r3, [r4]");
0x00067562 strb r1, [r2, r3] | *((r2 + r3)) = r1;
| label_1:
0x00067564 movs r3, 0 | r3 = 0;
0x00067566 mov r2, r5 | r2 = r5;
0x00067568 mov r1, r7 | r1 = r7;
0x0006756a mov r0, r4 | r0 = r4;
0x0006756c blx 0x25198 | fcn_00025198 ();
0x00067570 ldrd r3, r1, [r4, 4] | __asm ("ldrd r3, r1, [r4, 4]");
0x00067574 adds r2, r3, 1 | r2 = r3 + 1;
0x00067576 cmp r2, r1 |
| if (r2 >= r1) {
0x00067578 bhs 0x67676 | goto label_7;
| }
0x0006757a ldr r1, [r4] | r1 = *(r4);
0x0006757c movs r0, 0x27 | r0 = 0x27;
0x0006757e b 0x6762c | goto label_8;
| label_2:
0x00067580 mov r0, r1 | r0 = r1;
0x00067582 blx 0x24df4 | r0 = fcn_00024df4 ();
0x00067586 mov r5, r0 | r5 = r0;
0x00067588 cmp r5, 0 |
0x0006758a bne 0x67512 |
| } while (r5 != 0);
| label_3:
0x0006758c ldr r1, [pc, 0xf8] |
0x0006758e mov r0, r4 | r0 = r4;
0x00067590 movs r2, 2 | r2 = 2;
0x00067592 pop.w {r4, r5, r6, r7, r8, lr} |
0x00067596 add r1, pc | r1 = 0xcec22;
0x00067598 b.w 0x21e50 | void (*0x21e50)() ();
| label_4:
0x0006759c ldr r1, [pc, 0xec] |
0x0006759e mov r0, r7 | r0 = r7;
0x000675a0 add r1, pc | r1 = 0xcec30;
0x000675a2 blx 0x21e04 | r0 = fcn_00021e04 ();
0x000675a6 cmp r5, r0 |
| if (r5 <= r0) {
0x000675a8 bhi 0x675ca |
0x000675aa cmp.w r8, 0 |
| if (r8 != 0) {
0x000675ae beq 0x675bc |
0x000675b0 mov r1, r8 | r1 = r8;
0x000675b2 mov r0, r7 | r0 = r7;
0x000675b4 blx 0x21e04 | r0 = fcn_00021e04 ();
0x000675b8 cmp r5, r0 |
| if (r5 > r0) {
0x000675ba bhi 0x675ca | goto label_9;
| }
| }
0x000675bc mov r2, r5 | r2 = r5;
0x000675be mov r1, r7 | r1 = r7;
0x000675c0 mov r0, r4 | r0 = r4;
0x000675c2 pop.w {r4, r5, r6, r7, r8, lr} |
0x000675c6 b.w 0x21e50 | void (*0x21e50)() ();
| }
| label_9:
0x000675ca ldrd r2, r1, [r4, 4] | __asm ("ldrd r2, r1, [r4, 4]");
| do {
0x000675ce adds r3, r2, 1 | r3 = r2 + 1;
0x000675d0 cmp r3, r1 |
| if (r3 >= r1) {
0x000675d2 bhs 0x6764a | goto label_10;
| }
0x000675d4 str r3, [r4, 4] | *((r4 + 4)) = r3;
0x000675d6 movs r1, 0x22 | r1 = 0x22;
0x000675d8 ldr r3, [r4] | r3 = *(r4);
0x000675da strb r1, [r3, r2] | *((r3 + r2)) = r1;
0x000675dc movs r1, 0 | r1 = 0;
0x000675de ldrd r2, r3, [r4] | __asm ("ldrd r2, r3, [r4]");
0x000675e2 strb r1, [r2, r3] | *((r2 + r3)) = r1;
| label_0:
0x000675e4 ldr r3, [pc, 0xa8] |
0x000675e6 add r3, pc | r3 = 0xcec7a;
0x000675e8 b 0x67614 | goto label_11;
| label_5:
0x000675ea clz r0, r0 | r0 &= r0;
0x000675ee cmp r6, 0 |
0x000675f0 lsr.w r0, r0, 5 | r0 >>= 5;
0x000675f4 it eq |
| if (r6 != 0) {
0x000675f6 moveq r0, 0 | r0 = 0;
| }
0x000675f8 cmp r0, 0 |
0x000675fa beq 0x675ce |
| } while (r0 == 0);
0x000675fc cmp ip, r1 |
| if (ip >= r1) {
0x000675fe bhs 0x6763c | goto label_12;
| }
0x00067600 ldr r3, [r4] | r3 = *(r4);
0x00067602 movs r1, 0x22 | r1 = 0x22;
0x00067604 str.w ip, [r4, 4] | __asm ("str.w ip, [r4, 4]");
0x00067608 strb r1, [r3, r2] | *((r3 + r2)) = r1;
0x0006760a ldrd r2, r3, [r4] | __asm ("ldrd r2, r3, [r4]");
0x0006760e strb.w lr, [r2, r3] |
| do {
0x00067612 movs r3, 0 | r3 = 0;
| label_11:
0x00067614 mov r2, r5 | r2 = r5;
0x00067616 mov r1, r7 | r1 = r7;
0x00067618 mov r0, r4 | r0 = r4;
0x0006761a blx 0x25198 | fcn_00025198 ();
0x0006761e ldrd r3, r1, [r4, 4] | __asm ("ldrd r3, r1, [r4, 4]");
0x00067622 adds r2, r3, 1 | r2 = r3 + 1;
0x00067624 cmp r2, r1 |
| if (r2 >= r1) {
0x00067626 bhs 0x67666 | goto label_13;
| }
0x00067628 ldr r1, [r4] | r1 = *(r4);
0x0006762a movs r0, 0x22 | r0 = 0x22;
| label_8:
0x0006762c str r2, [r4, 4] | *((r4 + 4)) = r2;
0x0006762e strb r0, [r1, r3] | *((r1 + r3)) = r0;
0x00067630 movs r1, 0 | r1 = 0;
0x00067632 ldrd r2, r3, [r4] | __asm ("ldrd r2, r3, [r4]");
0x00067636 strb r1, [r2, r3] | *((r2 + r3)) = r1;
0x00067638 pop.w {r4, r5, r6, r7, r8, pc} |
| label_12:
0x0006763c movs r2, 0x22 | r2 = 0x22;
0x0006763e mov.w r1, -1 | r1 = -1;
0x00067642 mov r0, r4 | r0 = r4;
0x00067644 blx 0x231b4 | fcn_000231b4 ();
0x00067648 b 0x67612 |
| } while (1);
| label_10:
0x0006764a movs r2, 0x22 | r2 = 0x22;
0x0006764c mov.w r1, -1 | r1 = -1;
0x00067650 mov r0, r4 | r0 = r4;
0x00067652 blx 0x231b4 | fcn_000231b4 ();
0x00067656 b 0x675e4 | goto label_0;
| label_6:
0x00067658 movs r2, 0x27 | r2 = 0x27;
0x0006765a mov.w r1, -1 | r1 = -1;
0x0006765e mov r0, r4 | r0 = r4;
0x00067660 blx 0x231b4 | fcn_000231b4 ();
0x00067664 b 0x67564 | goto label_1;
| label_13:
0x00067666 mov r0, r4 | r0 = r4;
0x00067668 movs r2, 0x22 | r2 = 0x22;
0x0006766a pop.w {r4, r5, r6, r7, r8, lr} |
0x0006766e mov.w r1, -1 | r1 = -1;
0x00067672 b.w 0x231b0 | void (*0x231b0)() ();
| label_7:
0x00067676 mov r0, r4 | r0 = r4;
0x00067678 movs r2, 0x27 | r2 = 0x27;
0x0006767a pop.w {r4, r5, r6, r7, r8, lr} |
0x0006767e mov.w r1, -1 | r1 = -1;
0x00067682 b.w 0x231b0 | return void (*0x231b0)() ();
| }
[*] Function sprintf used 1 times libsyslog-ng-3.38.so.0.0.0