[*] Binary protection state of libevent-2.1.so.6.0.2
Partial RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of libevent-2.1.so.6.0.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/libevent-2.1.so.6.0.2 @ 0x25bd0 */
| #include <stdint.h>
|
; (fcn) sym.event_logv_ () | void event_logv_ (int32_t arg1, int32_t arg2) {
| char * s;
| int32_t var_400h;
| int32_t var_4h;
| r0 = arg1;
| r1 = arg2;
0x00025bd0 push {r4, r5, r6, r7, lr} |
0x00025bd4 ldr r7, [pc, 0x114] | r7 = *(0x25cec);
0x00025bd8 sub sp, sp, 0x400 |
0x00025bdc subs r5, r0, 0 | r5 = r0 - 0;
0x00025be0 add r7, pc, r7 | r7 = pc + r7;
0x00025be4 sub sp, sp, 4 |
| if (r5 == r0) {
0x00025be8 bne 0x25c00 |
0x00025bec ldr r0, [pc, 0x100] |
0x00025bf0 ldr r0, [r7, r0] | r0 = *((r7 + r0));
0x00025bf4 ldr r0, [r0] | r0 = "_";
0x00025bf8 cmp r0, 0 |
| if (r0 == 0) {
0x00025bfc beq 0x25c70 | goto label_1;
| }
| }
0x00025c00 cmp r2, 0 |
0x00025c04 mov r6, r1 | r6 = r1;
0x00025c08 mov r4, sp | r4 = sp;
| if (r2 != 0) {
0x00025c0c strbeq r2, [sp] | *(sp) = r2;
| }
| if (r2 != 0) {
0x00025c10 beq 0x25c20 |
0x00025c14 mov r1, 0x400 | r1 = 0x400;
0x00025c18 mov r0, r4 | r0 = r4;
0x00025c1c bl 0xb2f0 | fcn_0000b2f0 ();
| }
0x00025c20 cmp r6, 0 |
| if (r6 != 0) {
0x00025c24 beq 0x25c50 |
0x00025c28 mov r0, r4 | r0 = r4;
0x00025c2c bl 0xac78 | r0 = strlen (r0);
0x00025c30 cmp r0, 0x3fc |
| if (r0 > 0x3fc) {
0x00025c34 bhi 0x25c50 | goto label_2;
| }
0x00025c38 ldr r2, [pc, 0xb8] | r2 = *(0x25cf4);
0x00025c3c rsb r1, r0, 0x400 | r1 = 0x400 - r0;
0x00025c40 mov r3, r6 | r3 = r6;
0x00025c44 add r2, pc, r2 | r2 = pc + r2;
0x00025c48 add r0, r4, r0 | r0 = r4 + r0;
0x00025c4c bl 0xab4c | fcn_0000ab4c ();
| }
| label_2:
0x00025c50 ldr r3, [pc, 0xa4] |
0x00025c54 add r3, pc, r3 | r3 = pc + r3;
0x00025c58 ldr r3, [r3, 4] | r3 = *(0x25cfc);
0x00025c5c cmp r3, 0 |
| if (r3 == 0) {
0x00025c60 beq 0x25c7c | goto label_3;
| }
0x00025c64 mov r1, r4 | r1 = r4;
0x00025c68 mov r0, r5 | r0 = r5;
0x00025c6c blx r3 | uint32_t (*r3)(uint32_t, uint32_t) (r0, r1);
| do {
| label_1:
0x00025c70 add sp, sp, 0x400 |
0x00025c74 add sp, sp, 4 |
0x00025c78 pop {r4, r5, r6, r7, pc} |
| label_3:
0x00025c7c cmp r5, 3 |
| if (r5 > 3) {
| /* switch table (4 cases) at 0x25c88 */
0x00025c80 addls pc, pc, r5, lsl 2 | pc += (r5 << 2);
| }
0x00025c84 b 0x25cd8 | goto label_4;
0x00025c88 b 0x25ce4 | goto label_5;
0x00025c8c b 0x25c98 | goto label_6;
0x00025c90 b 0x25cc0 | goto label_7;
0x00025c94 b 0x25ccc | goto label_8;
| label_6:
0x00025c98 ldr r2, [pc, 0x60] | r2 = *(0x25cfc);
0x00025c9c add r2, pc, r2 | r2 = pc + r2;
| label_0:
0x00025ca0 ldr r3, [pc, 0x5c] | r3 = *(0x25d00);
0x00025ca4 ldr r1, [pc, 0x5c] | r1 = *(0x25d04);
0x00025ca8 ldr r0, [r7, r3] | r0 = *((r7 + r3));
0x00025cac add r1, pc, r1 | r1 = pc + r1;
0x00025cb0 mov r3, r4 | r3 = r4;
0x00025cb4 ldr r0, [r0] | r0 = *(r0);
0x00025cb8 bl 0xb3e0 | fprintf (r0, r1, r2, r3)
0x00025cbc b 0x25c70 |
| } while (1);
| label_7:
0x00025cc0 ldr r2, [pc, 0x44] | r2 = *(0x25d08);
0x00025cc4 add r2, pc, r2 | r2 = pc + r2;
0x00025cc8 b 0x25ca0 | goto label_0;
| label_8:
0x00025ccc ldr r2, [pc, 0x3c] | r2 = *(0x25d0c);
0x00025cd0 add r2, pc, r2 | r2 = pc + r2;
0x00025cd4 b 0x25ca0 | goto label_0;
| label_4:
0x00025cd8 ldr r2, [pc, 0x34] | r2 = *(0x25d10);
0x00025cdc add r2, pc, r2 | r2 = pc + r2;
0x00025ce0 b 0x25ca0 | goto label_0;
| label_5:
0x00025ce4 ldr r2, [pc, 0x2c] | r2 = *(0x25d14);
0x00025ce8 add r2, pc, r2 | r2 = pc + r2;
0x00025cec b 0x25ca0 | goto label_0;
| }
[*] Function fprintf used 2 times libevent-2.1.so.6.0.2