[*] Binary protection state of libxtables.so.12.2.0

  
  	Partial RELRO  No Canary found   NX disabled  DSO          No RPATH     No RUNPATH   No Symbols


[*] Function printf tear down of libxtables.so.12.2.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/libxtables.so.12.2.0 @ 0x5e44 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) sym.xtables_print_mac ()     | void xtables_print_mac (int32_t arg1) {
                                         |     r0 = arg1;
    0x00005e44 push {r4, r5, r6, lr}     |     
    0x00005e48 ldrb r1, [r0]             |     r1 = *(r0);
    0x00005e4c mov r4, r0                |     r4 = r0;
    0x00005e50 ldr r0, [pc, 0x28]        |     r0 = *(0x5e7c);
    0x00005e54 ldr r6, [pc, 0x28]        |     r6 = *(0x5e80);
    0x00005e58 add r0, pc, r0            |     r0 = pc + r0;
    0x00005e5c bl 0x21fc                 |     printf (r0, r1, r2, r3, r4, r5, r6)
    0x00005e60 add r5, r4, 5             |     r5 = r4 + 5;
    0x00005e64 add r6, pc, r6            |     r6 = pc + r6;
                                         |     do {
    0x00005e68 ldrb r1, [r4, 1]!         |         r1 = *((r4 += 1));
    0x00005e6c mov r0, r6                |         r0 = r6;
    0x00005e70 bl 0x21fc                 |         printf (r0, r1, r2, r3, r4, r5, r6)
    0x00005e74 cmp r4, r5                |         
    0x00005e78 bne 0x5e68                |         
                                         |     } while (r4 != r5);
    0x00005e7c pop {r4, r5, r6, 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/libxtables.so.12.2.0 @ 0x5e88 */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) sym.xtables_print_mac_and_mask ()    | void xtables_print_mac_and_mask (int32_t arg2) {
                                                 |     r1 = arg2;
                                                 |     do {
    0x00002460 add ip, pc, 0, 12                 |         
    0x00002464 add ip, ip, 0x17000               |         
    0x00002468 ldr pc, [ip, 0xc88]!              |         pc = *((ip += 0xc88));
    0x00005e88 push {r4, lr}                     |         
    0x00005e8c mov r4, r1                        |         r4 = r1;
    0x00005e90 bl 0x2460                         |         void (*0x2460)() ();
    0x00005e94 ldr r1, [pc, 0x2c]                |         
    0x00005e98 mov r2, 6                         |         r2 = 6;
    0x00005e9c add r1, pc, r1                    |         r1 = pc + r1;
    0x00005ea0 add r1, r1, 0x6c                  |         r1 = 0x5f30;
    0x00005ea4 mov r0, r4                        |         r0 = r4;
    0x00005ea8 bl 0x2484                         |         r0 = memcmp (r0, r1, r2);
    0x00005eac cmp r0, 0                         |         
    0x00005eb0 popeq {r4, pc}                    |         
    0x00005eb4 mov r0, 0x2f                      |         r0 = 0x2f;
    0x00005eb8 bl 0x21b4                         |         putchar (r0);
    0x00005ebc mov r0, r4                        |         r0 = r4;
    0x00005ec0 pop {r4, lr}                      |         
    0x00005ec4 b 0x2460                          |         
                                                 |     } 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/libxtables.so.12.2.0 @ 0x5c74 */
                                                     | #include <stdint.h>
                                                     |  
    ; (fcn) sym.xtables_print_num ()                 | void xtables_print_num (int32_t arg1, int32_t arg2) {
                                                     |     r0 = arg1;
                                                     |     r1 = arg2;
    0x00005c74 tst r2, 4                             |     
    0x00005c78 push {r4, r6, r7, r8, sb, lr}         |     
    0x00005c7c mov r6, r0                            |     r6 = r0;
    0x00005c80 mov r7, r1                            |     r7 = r1;
    0x00005c84 and r4, r2, 0x10                      |     r4 = r2 & 0x10;
                                                     |     if ((r2 & 4) != 0) {
    0x00005c88 bne 0x5cb8                            |         goto label_3;
                                                     |     }
    0x00005c8c cmp r4, 0                             |     
                                                     |     if (r4 == 0) {
    0x00005c90 beq 0x5cac                            |         goto label_4;
                                                     |     }
    0x00005c94 ldr r0, [pc, 0x174]                   |     r0 = imp.stdout;
    0x00005c98 add r0, pc, r0                        |     r0 = pc + r0;
                                                     |     do {
                                                     | label_0:
    0x00005c9c mov r2, r6                            |         r2 = r6;
    0x00005ca0 mov r3, r7                            |         r3 = r7;
                                                     | label_1:
    0x00005ca4 pop {r4, r6, r7, r8, sb, lr}          |         
    0x00005ca8 b 0x21fc                              |         void (*0x21fc)() ();
                                                     | label_4:
    0x00005cac ldr r0, [pc, 0x160]                   |         r0 = *(0x5e10);
    0x00005cb0 add r0, pc, r0                        |         r0 = pc + r0;
    0x00005cb4 b 0x5c9c                              |         
                                                     |     } while (1);
                                                     | label_3:
    0x00005cb8 add r3, pc, 0x148                     |     r3 = pc + 0x148;
    0x00005cbc ldrd r2, r3, [r3]                     |     __asm ("ldrd r2, r3, [r3]");
    0x00005cc0 cmp r1, r3                            |     
    0x00005cc4 cmpeq r0, r2                          |     __asm ("cmpeq r0, r2");
                                                     |     if (r1 > r3) {
    0x00005cc8 bhi 0x5ce8                            |         goto label_5;
                                                     |     }
    0x00005ccc cmp r4, 0                             |     
                                                     |     if (r4 == 0) {
    0x00005cd0 ldrne r0, [pc, 0x140]                 |         r0 = *(0x00005e18);
                                                     |     }
                                                     |     if (r4 != 0) {
    0x00005cd4 addne r0, pc, r0                      |         r0 = pc + r0;
                                                     |         goto label_6;
                                                     |     }
                                                     |     if (r4 != 0) {
                                                     | label_6:
    0x00005cd8 bne 0x5c9c                            |         goto label_0;
                                                     |     }
    0x00005cdc ldr r0, [pc, 0x138]                   |     r0 = *(0x5e18);
    0x00005ce0 add r0, pc, r0                        |     r0 = pc + r0;
    0x00005ce4 b 0x5c9c                              |     goto label_0;
                                                     | label_5:
    0x00005ce8 adds r0, r0, 0x1f4                    |     r0 += 0x1f4;
    0x00005cec adc r1, r1, 0                         |     __asm ("adc r1, r1, 0");
    0x00005cf0 mov r2, 0x3e8                         |     r2 = 0x3e8;
    0x00005cf4 mov r3, 0                             |     r3 = 0;
    0x00005cf8 bl 0x89b4                             |     fcn_000089b4 (r0, r1);
    0x00005cfc ldr r6, [pc, 0x11c]                   |     r6 = *(0x5e1c);
    0x00005d00 mov r7, 0                             |     r7 = 0;
    0x00005d04 cmp r1, r7                            |     
    0x00005d08 cmpeq r0, r6                          |     __asm ("cmpeq r0, r6");
    0x00005d0c mov r8, r0                            |     r8 = r0;
    0x00005d10 mov sb, r1                            |     sb = r1;
                                                     |     if (r1 > r7) {
    0x00005d14 bhi 0x5d44                            |         goto label_7;
                                                     |     }
    0x00005d18 cmp r4, 0                             |     
                                                     |     if (r4 == 0) {
    0x00005d1c beq 0x5d38                            |         goto label_8;
                                                     |     }
    0x00005d20 ldr ip, [pc, 0xfc]                    |     ip = *(0x00005e24);
    0x00005d24 add ip, pc, ip                        |     
                                                     |     do {
                                                     | label_2:
    0x00005d28 mov r2, r8                            |         r2 = r8;
    0x00005d2c mov r3, sb                            |         r3 = sb;
    0x00005d30 mov r0, ip                            |         r0 = ip;
    0x00005d34 b 0x5ca4                              |         goto label_1;
                                                     | label_8:
    0x00005d38 ldr ip, [pc, 0xe8]                    |         ip = *(0x5e24);
    0x00005d3c add ip, pc, ip                        |         
    0x00005d40 b 0x5d28                              |         
                                                     |     } while (1);
                                                     | label_7:
    0x00005d44 adds r0, r0, 0x1f4                    |     r0 += 0x1f4;
    0x00005d48 adc r1, r1, 0                         |     __asm ("adc r1, r1, 0");
    0x00005d4c mov r2, 0x3e8                         |     r2 = 0x3e8;
    0x00005d50 mov r3, 0                             |     r3 = 0;
    0x00005d54 bl 0x89b4                             |     fcn_000089b4 (r0, r1);
    0x00005d58 cmp r1, r7                            |     
    0x00005d5c cmpeq r0, r6                          |     __asm ("cmpeq r0, r6");
    0x00005d60 mov r8, r0                            |     r8 = r0;
    0x00005d64 mov sb, r1                            |     sb = r1;
                                                     |     if (r1 > r7) {
    0x00005d68 bhi 0x5d88                            |         goto label_9;
                                                     |     }
    0x00005d6c cmp r4, 0                             |     
                                                     |     if (r4 == 0) {
    0x00005d70 ldrne ip, [pc, 0xb4]                  |         ip = *((pc + 0xb4));
                                                     |     }
                                                     |     if (r4 != 0) {
    0x00005d74 addne ip, pc, ip                      |         goto label_10;
                                                     |     }
                                                     |     if (r4 != 0) {
                                                     | label_10:
    0x00005d78 bne 0x5d28                            |         goto label_2;
                                                     |     }
    0x00005d7c ldr ip, [pc, 0xac]                    |     ip = *(0x5e2c);
    0x00005d80 add ip, pc, ip                        |     
    0x00005d84 b 0x5d28                              |     goto label_2;
                                                     | label_9:
    0x00005d88 adds r0, r0, 0x1f4                    |     r0 += 0x1f4;
    0x00005d8c adc r1, r1, 0                         |     __asm ("adc r1, r1, 0");
    0x00005d90 mov r2, 0x3e8                         |     r2 = 0x3e8;
    0x00005d94 mov r3, 0                             |     r3 = 0;
    0x00005d98 bl 0x89b4                             |     fcn_000089b4 (r0, r1);
    0x00005d9c cmp r1, r7                            |     
    0x00005da0 cmpeq r0, r6                          |     __asm ("cmpeq r0, r6");
    0x00005da4 mov r8, r0                            |     r8 = r0;
    0x00005da8 mov sb, r1                            |     sb = r1;
                                                     |     if (r1 > r7) {
    0x00005dac bhi 0x5dcc                            |         goto label_11;
                                                     |     }
    0x00005db0 cmp r4, 0                             |     
                                                     |     if (r4 == 0) {
    0x00005db4 ldrne ip, [pc, 0x78]                  |         ip = *((pc + 0x78));
                                                     |     }
                                                     |     if (r4 != 0) {
    0x00005db8 addne ip, pc, ip                      |         goto label_12;
                                                     |     }
                                                     |     if (r4 != 0) {
                                                     | label_12:
    0x00005dbc bne 0x5d28                            |         goto label_2;
                                                     |     }
    0x00005dc0 ldr ip, [pc, 0x70]                    |     ip = *(0x5e34);
    0x00005dc4 add ip, pc, ip                        |     
    0x00005dc8 b 0x5d28                              |     goto label_2;
                                                     | label_11:
    0x00005dcc adds r0, r0, 0x1f4                    |     r0 += 0x1f4;
    0x00005dd0 mov r2, 0x3e8                         |     r2 = 0x3e8;
    0x00005dd4 mov r3, 0                             |     r3 = 0;
    0x00005dd8 adc r1, r1, 0                         |     __asm ("adc r1, r1, 0");
    0x00005ddc bl 0x89b4                             |     fcn_000089b4 (r0, r1);
    0x00005de0 cmp r4, 0                             |     
    0x00005de4 mov r2, r0                            |     r2 = r0;
    0x00005de8 mov r3, r1                            |     r3 = r1;
                                                     |     if (r4 == 0) {
    0x00005dec ldrne r0, [pc, 0x48]                  |         r0 = *((pc + 0x48));
                                                     |     }
                                                     |     if (r4 != 0) {
    0x00005df0 addne r0, pc, r0                      |         r0 = pc + r0;
                                                     |         goto label_13;
                                                     |     }
                                                     |     if (r4 != 0) {
                                                     | label_13:
    0x00005df4 bne 0x5ca4                            |         goto label_1;
                                                     |     }
    0x00005df8 ldr r0, [pc, 0x40]                    |     r0 = *(0x5e3c);
    0x00005dfc add r0, pc, r0                        |     r0 = pc + r0;
    0x00005e00 b 0x5ca4                              |     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/libxtables.so.12.2.0 @ 0x6028 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) sym.xtables_print_val_mask ()    | void xtables_print_val_mask (int32_t arg1, uint32_t arg2) {
                                             |     r0 = arg1;
                                             |     r1 = arg2;
    0x00006028 cmn r1, 1                     |     
    0x0000602c push {r4, lr}                 |     
    0x00006030 mov r4, r0                    |     r4 = r0;
                                             |     if (r1 != 1) {
    0x00006034 beq 0x6050                    |         
    0x00006038 mov r2, r1                    |         r2 = r1;
    0x0000603c mov r1, r0                    |         r1 = r0;
    0x00006040 ldr r0, [pc, 0x44]            |         r0 = *(0x6088);
    0x00006044 pop {r4, lr}                  |         
    0x00006048 add r0, pc, r0                |         r0 = pc + r0;
    0x0000604c b 0x21fc                      |         void (*0x21fc)() ();
                                             |     }
    0x00006050 cmp r2, 0                     |     
    0x00006054 mov r0, r2                    |     r0 = r2;
                                             |     if (r2 == 0) {
    0x00006058 beq 0x607c                    |         goto label_0;
                                             |     }
    0x0000605c mov r1, r4                    |     r1 = r4;
    0x00006060 bl 0x234c                     |     r0 = fcn_0000234c ();
    0x00006064 subs r1, r0, 0                |     r1 = r0 - 0;
                                             |     if (r1 == r0) {
    0x00006068 beq 0x607c                    |         goto label_0;
                                             |     }
    0x0000606c ldr r0, [pc, 0x1c]            |     r0 = *(0x608c);
    0x00006070 add r0, pc, r0                |     r0 = pc + r0;
                                             |     do {
    0x00006074 pop {r4, lr}                  |         
    0x00006078 b 0x21fc                      |         void (*0x21fc)() ();
                                             | label_0:
    0x0000607c ldr r0, [pc, 0x10]            |         r0 = *(0x6090);
    0x00006080 mov r1, r4                    |         r1 = r4;
    0x00006084 add r0, pc, r0                |         r0 = pc + r0;
    0x00006088 b 0x6074                      |         
                                             |     } while (1);
                                             | }

[*] Function printf used 3 times libxtables.so.12.2.0