[*] Binary protection state of libipt_SNAT.so
Partial RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function printf tear down of libipt_SNAT.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/libipt_SNAT.so @ 0xf54 */
| #include <stdint.h>
|
; (fcn) fcn.00000f54 () | void fcn_00000f54 (int32_t arg1) {
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch;
| r0 = arg1;
0x00000f54 ldr r3, [r0] | r3 = *(r0);
0x00000f58 push {r0, r1, r2, r4, r5, lr} |
0x00000f5c tst r3, 1 |
0x00000f60 mov r4, r0 | r4 = r0;
| if ((r3 & 1) != 0) {
0x00000f64 beq 0xfb4 |
0x00000f68 ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x00000f6c add r5, sp, 8 | r5 += var_8h;
0x00000f70 str r3, [r5, -4]! | *((r5 -= 4)) = r3;
0x00000f74 mov r0, r5 | r0 = r5;
0x00000f78 bl 0x6a4 | r0 = xtables_ipaddr_to_numeric ();
0x00000f7c mov r1, r0 | r1 = r0;
0x00000f80 ldr r0, [pc, 0x94] | r0 = *(0x1018);
0x00000f84 add r0, pc, r0 | r0 = pc + r0;
0x00000f88 bl 0x668 | printf (r0, r1)
0x00000f8c ldmib r4, {r2, r3} | __asm ("ldmib r4, {r2, r3}");
0x00000f90 cmp r3, r2 |
| if (r3 == r2) {
0x00000f94 beq 0xfb4 | goto label_0;
| }
0x00000f98 mov r0, r5 | r0 = r5;
0x00000f9c str r3, [sp, 4] | var_4h = r3;
0x00000fa0 bl 0x6a4 | r0 = xtables_ipaddr_to_numeric ();
0x00000fa4 mov r1, r0 | r1 = r0;
0x00000fa8 ldr r0, [pc, 0x70] | r0 = *(0x101c);
0x00000fac add r0, pc, r0 | r0 = pc + r0;
0x00000fb0 bl 0x668 | printf (r0, r1)
| }
| label_0:
0x00000fb4 ldr r3, [r4] | r3 = *(r4);
0x00000fb8 tst r3, 2 |
| if ((r3 & 2) != 0) {
0x00000fbc beq 0x1014 |
0x00000fc0 mov r0, 0x3a | r0 = 0x3a;
0x00000fc4 bl 0x65c | putchar (r0);
0x00000fc8 ldrh r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00000fcc ldr r0, [pc, 0x50] | r0 = *(0x1020);
0x00000fd0 lsr r1, r3, 8 | r1 = r3 >> 8;
0x00000fd4 orr r1, r1, r3, lsl 8 | r1 |= (r3 << 8);
0x00000fd8 lsl r1, r1, 0x10 | r1 <<= 0x10;
0x00000fdc lsr r1, r1, 0x10 | r1 >>= 0x10;
0x00000fe0 add r0, pc, r0 | r0 = pc + r0;
0x00000fe4 bl 0x668 | printf (r0, r1, r2, r3)
0x00000fe8 ldrh r3, [r4, 0xe] | r3 = *((r4 + 0xe));
0x00000fec ldrh r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x00000ff0 cmp r2, r3 |
| if (r2 == r3) {
0x00000ff4 beq 0x1014 | goto label_1;
| }
0x00000ff8 lsr r1, r3, 8 | r1 = r3 >> 8;
0x00000ffc ldr r0, [pc, 0x24] | r0 = *(0x1024);
0x00001000 orr r1, r1, r3, lsl 8 | r1 |= (r3 << 8);
0x00001004 lsl r1, r1, 0x10 | r1 <<= 0x10;
0x00001008 lsr r1, r1, 0x10 | r1 >>= 0x10;
0x0000100c add r0, pc, r0 | r0 = pc + r0;
0x00001010 bl 0x668 | printf (r0, r1)
| }
| label_1:
0x00001014 add sp, sp, 0xc |
0x00001018 pop {r4, r5, pc} |
| }
[*] Function printf used 5 times libipt_SNAT.so