[*] Binary protection state of libxt_time.so
Partial RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function printf tear down of libxt_time.so
; 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/xtables/libxt_time.so @ 0xcc4 */
| #include <stdint.h>
|
; (fcn) fcn.00000cc4 () | void fcn_00000cc4 (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x00000cc4 push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00000cc8 ldr r8, [pc, 0xb8] | r8 = *(0xd84);
0x00000ccc ldr sb, [pc, 0xb8] | sb = *(0xd88);
0x00000cd0 ldr sl, [pc, 0xb8] | sl = *(0xd8c);
0x00000cd4 mov r6, r0 | r6 = r0;
0x00000cd8 mov r0, 0x20 | r0 = 0x20;
0x00000cdc mov r7, r1 | r7 = r1;
0x00000ce0 mov r4, 1 | r4 = 1;
0x00000ce4 bl 0x6ac | putchar (r0);
0x00000ce8 add r8, pc, r8 | r8 = pc + r8;
0x00000cec mov r3, 0 | r3 = 0;
0x00000cf0 add sb, pc, sb | sb = pc + sb;
0x00000cf4 add sl, pc, sl | sl = pc + sl;
| do {
0x00000cf8 mov r2, 1 | r2 = 1;
0x00000cfc ands r2, r6, r2, lsl r4 | r2 = r6 & (r2 << r4);
| if (r2 != r6) {
0x00000d00 moveq r5, r3 | r5 = r3;
| }
| if (r2 != r6) {
0x00000d04 beq 0xd68 |
0x00000d08 cmp r3, 0 |
0x00000d0c add r5, r3, 1 | r5 = r3 + 1;
| if (r3 != 0) {
0x00000d10 beq 0xd1c |
0x00000d14 mov r0, 0x2c | r0 = 0x2c;
0x00000d18 bl 0x6ac | putchar (r0);
| }
0x00000d1c mov r1, r4 | r1 = r4;
0x00000d20 mov r0, r8 | r0 = r8;
0x00000d24 bl 0x6b8 | printf (r0, r1)
0x00000d28 cmp r7, 0 |
| if (r7 == 0) {
0x00000d2c beq 0xd68 | goto label_1;
| }
0x00000d30 mov r1, 0xa | r1 = 0xa;
0x00000d34 mov r0, r4 | r0 = r4;
0x00000d38 bl 0x1628 | fcn_00001628 (r0, r1);
0x00000d3c cmp r1, 2 |
| if (r1 != 2) {
0x00000d40 moveq r0, sb | r0 = sb;
| }
| if (r1 != 2) {
0x00000d44 beq 0xd64 |
0x00000d48 cmp r1, 3 |
| if (r1 != 3) {
0x00000d4c moveq r0, sl | r0 = sl;
| }
| if (r1 == 3) {
0x00000d50 beq 0xd64 | goto label_0;
| }
0x00000d54 cmp r1, 1 |
| if (r1 != 1) {
0x00000d58 bne 0xd7c | goto label_2;
| }
0x00000d5c ldr r0, [pc, 0x30] | r0 = *(0xd90);
0x00000d60 add r0, pc, r0 | r0 = pc + r0;
| }
| label_0:
0x00000d64 bl 0x6b8 | printf (r0)
| }
| label_1:
0x00000d68 add r4, r4, 1 | r4++;
0x00000d6c cmp r4, 0x20 |
0x00000d70 popeq {r4, r5, r6, r7, r8, sb, sl, pc} |
0x00000d74 mov r3, r5 | r3 = r5;
0x00000d78 b 0xcf8 |
| } while (1);
| label_2:
0x00000d7c ldr r0, [pc, 0x14] | r0 = *(0xd94);
0x00000d80 add r0, pc, r0 | r0 = pc + r0;
0x00000d84 b 0xd64 | 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/xtables/libxt_time.so @ 0xd9c */
| #include <stdint.h>
|
; (fcn) fcn.00000d9c () | void fcn_00000d9c (int32_t arg1) {
| r0 = arg1;
0x00000d9c push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00000da0 ldr r7, [pc, 0x58] | r7 = *(0xdfc);
0x00000da4 mov r6, r0 | r6 = r0;
0x00000da8 mov r0, 0x20 | r0 = 0x20;
0x00000dac bl 0x6ac | putchar (r0);
0x00000db0 ldr r8, [pc, 0x4c] | r8 = *(0xe00);
0x00000db4 ldr sb, [pc, 0x4c] | sb = *(0x00000e08);
0x00000db8 mov r5, 0 | r5 = 0;
0x00000dbc mov r4, 1 | r4 = 1;
0x00000dc0 add r7, pc, r7 | r7 = pc + r7;
0x00000dc4 add r8, pc, r8 | r8 = pc + r8;
0x00000dc8 add sb, pc, sb | sb = pc + sb;
| do {
0x00000dcc mov r3, 1 | r3 = 1;
0x00000dd0 ands r3, r6, r3, lsl r4 | r3 = r6 & (r3 << r4);
| if (r3 != r6) {
0x00000dd4 beq 0xdf0 |
0x00000dd8 cmp r5, 0 |
0x00000ddc ldr r1, [r7, r4, lsl 2] | offset_0 = r4 << 2;
| r1 = *((r7 + offset_0));
| if (r5 == 0) {
0x00000de0 movne r0, sb | r0 = sb;
| }
| if (r5 != 0) {
0x00000de4 moveq r0, r8 | r0 = r8;
| }
0x00000de8 bl 0x6b8 | printf (r0, r1, r2, r3, r4, r5)
0x00000dec add r5, r5, 1 | r5++;
| }
0x00000df0 add r4, r4, 1 | r4++;
0x00000df4 cmp r4, 8 |
0x00000df8 bne 0xdcc |
| } while (r4 != 8);
0x00000dfc pop {r4, r5, r6, r7, r8, sb, sl, 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/xtables/libxt_time.so @ 0xe0c */
| #include <stdint.h>
|
; (fcn) fcn.00000e0c () | void fcn_00000e0c (time_t * arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch;
| time_t * timer;
| int32_t var_18h;
| int32_t var_8h_2;
| r0 = arg1;
| r1 = arg2;
0x00000e0c push {r4, lr} |
0x00000e10 cmn r0, 0x80000001 |
0x00000e14 cmpne r0, 0 | __asm ("cmpne r0, 0");
0x00000e18 sub sp, sp, 0x18 |
0x00000e1c str r0, [sp, 0x14] | timer = r0;
| if (r0 == 0x80000001) {
0x00000e20 beq 0xe7c | goto label_0;
| }
0x00000e24 add r0, sp, 0x14 | r0 += timer;
0x00000e28 mov r4, r1 | r4 = r1;
0x00000e2c bl 0x748 | gmtime (r0);
0x00000e30 cmp r4, 0 |
0x00000e34 ldr r2, [r0, 0x10] | r2 = *((r0 + 0x10));
0x00000e38 ldr r1, [r0, 0x14] | r1 = *((r0 + 0x14));
0x00000e3c ldr r3, [r0] | r3 = *(r0);
| if (r4 == 0) {
0x00000e40 beq 0xe84 | goto label_1;
| }
0x00000e44 str r3, [sp, 0xc] | var_ch = r3;
0x00000e48 ldr r3, [r0, 4] | r3 = var_18h;
0x00000e4c str r3, [sp, 8] | var_8h = r3;
0x00000e50 ldr r3, [r0, 8] | r3 = var_8h_2;
0x00000e54 str r3, [sp, 4] | var_4h = r3;
0x00000e58 ldr r3, [r0, 0xc] | r3 = *((r0 + 0xc));
0x00000e5c ldr r0, [pc, 0x54] | r0 = *(0xeb4);
0x00000e60 str r3, [sp] | *(sp) = r3;
0x00000e64 add r3, r2, 1 | r3 = r2 + 1;
0x00000e68 add r2, r1, 0x760 | r2 = r1 + sym.imp.fputs;
0x00000e6c add r2, r2, 0xc | r2 += 0xc;
0x00000e70 mov r1, r4 | r1 = r4;
0x00000e74 add r0, pc, r0 | r0 = pc + r0;
0x00000e78 bl 0x6b8 | printf (r0, r1, r2, r3)
| do {
| label_0:
0x00000e7c add sp, sp, 0x18 |
0x00000e80 pop {r4, pc} |
| label_1:
0x00000e84 str r3, [sp, 8] | var_8h = r3;
0x00000e88 ldr r3, [r0, 4] | r3 = var_18h;
0x00000e8c add r1, r1, 0x760 | r1 += sym.imp.fputs;
0x00000e90 str r3, [sp, 4] | var_4h = r3;
0x00000e94 ldr r3, [r0, 8] | r3 = var_8h_2;
0x00000e98 add r2, r2, 1 | r2++;
0x00000e9c str r3, [sp] | *(sp) = r3;
0x00000ea0 ldr r3, [r0, 0xc] | r3 = *((r0 + 0xc));
0x00000ea4 ldr r0, [pc, 0x10] | r0 = *(0xeb8);
0x00000ea8 add r1, r1, 0xc | r1 += 0xc;
0x00000eac add r0, pc, r0 | r0 = pc + r0;
0x00000eb0 bl 0x6b8 | printf (r0, r1, r2, r3)
0x00000eb4 b 0xe7c |
| } while (1);
| }
[*] Function printf used 6 times libxt_time.so