[*] Binary protection state of libxt_policy.so

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


[*] Function printf tear down of libxt_policy.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_policy.so @ 0xfd4 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) fcn.00000fd4 ()              | void fcn_00000fd4 (int32_t arg1, int32_t arg2) {
                                         |     r0 = arg1;
                                         |     r1 = arg2;
    0x00000fd4 ldrh r3, [r1]             |     r3 = *(r1);
    0x00000fd8 push {r4, r5, r6, lr}     |     
    0x00000fdc tst r3, 1                 |     
    0x00000fe0 mov r5, r1                |     r5 = r1;
    0x00000fe4 mov r4, r0                |     r4 = r0;
    0x00000fe8 mov r1, r0                |     r1 = r0;
                                         |     if ((r3 & 1) == 0) {
    0x00000fec beq 0x1038                |         goto label_1;
                                         |     }
    0x00000ff0 ldr r0, [pc, 0x58]        |     r0 = *(0x104c);
    0x00000ff4 add r0, pc, r0            |     r0 = pc + r0;
                                         |     do {
    0x00000ff8 bl 0x6a8                  |         printf (r0)
    0x00000ffc ldrh r3, [r5]             |         r3 = *(r5);
    0x00001000 mov r1, r4                |         r1 = r4;
    0x00001004 tst r3, 4                 |         
                                         |         if ((r3 & 4) == 0) {
    0x00001008 beq 0x1044                |             goto label_2;
                                         |         }
    0x0000100c ldr r0, [pc, 0x40]        |         r0 = *(0x1050);
    0x00001010 add r0, pc, r0            |         r0 = pc + r0;
                                         | label_0:
    0x00001014 bl 0x6a8                  |         printf (r0)
    0x00001018 ldrh r3, [r5]             |         r3 = *(r5);
    0x0000101c tst r3, 8                 |         
    0x00001020 popeq {r4, r5, r6, pc}    |         
    0x00001024 ldr r0, [pc, 0x2c]        |         r0 = *(0x1054);
    0x00001028 mov r1, r4                |         r1 = r4;
    0x0000102c add r0, pc, r0            |         r0 = pc + r0;
    0x00001030 pop {r4, r5, r6, lr}      |         
    0x00001034 b 0x6a8                   |         void (*0x6a8)() ();
                                         | label_1:
    0x00001038 ldr r0, [pc, 0x1c]        |         r0 = *(0x1058);
    0x0000103c add r0, pc, r0            |         r0 = pc + r0;
    0x00001040 b 0xff8                   |         
                                         |     } while (1);
                                         | label_2:
    0x00001044 ldr r0, [pc, 0x14]        |     r0 = *(0x105c);
    0x00001048 add r0, pc, r0            |     r0 = pc + r0;
    0x0000104c b 0x1014                  |     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_policy.so @ 0x1064 */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) fcn.00001064 ()                      | void fcn_00001064 (int32_t arg1, int32_t arg2) {
                                                 |     r0 = arg1;
                                                 |     r1 = arg2;
    0x00001064 push {r4, r5, r6, r7, r8, lr}     |     
    0x00001068 mov r7, r3                        |     r7 = r3;
    0x0000106c ldrb r3, [r1, 0x4a]               |     r3 = *((r1 + 0x4a));
    0x00001070 mov r5, r0                        |     r5 = r0;
    0x00001074 tst r3, 0x20                      |     
    0x00001078 mov r4, r1                        |     r4 = r1;
    0x0000107c mov r8, r2                        |     r8 = r2;
                                                 |     if ((r3 & 0x20) != 0) {
    0x00001080 beq 0x10b0                        |         
    0x00001084 ldrb r3, [r1, 0x4b]               |         r3 = *((r1 + 0x4b));
    0x00001088 tst r3, 0x20                      |         
                                                 |         if ((r3 & 0x20) != 0) {
    0x0000108c beq 0x109c                        |             
    0x00001090 ldr r0, [pc, 0x238]               |             r0 = *(0x12cc);
    0x00001094 add r0, pc, r0                    |             r0 = pc + r0;
    0x00001098 bl 0x6a8                          |             printf (r0)
                                                 |         }
    0x0000109c ldr r0, [pc, 0x230]               |         r0 = *(0x12d0);
    0x000010a0 ldr r2, [r4, 0x44]                |         r2 = *((r4 + 0x44));
    0x000010a4 mov r1, r5                        |         r1 = r5;
    0x000010a8 add r0, pc, r0                    |         r0 = pc + r0;
    0x000010ac bl 0x6a8                          |         printf (r0, r1, r2)
                                                 |     }
    0x000010b0 ldrb r3, [r4, 0x4a]               |     r3 = *((r4 + 0x4a));
    0x000010b4 tst r3, 0x10                      |     
                                                 |     if ((r3 & 0x10) != 0) {
    0x000010b8 beq 0x10e8                        |         
    0x000010bc ldrb r3, [r4, 0x4b]               |         r3 = *((r4 + 0x4b));
    0x000010c0 tst r3, 0x10                      |         
                                                 |         if ((r3 & 0x10) != 0) {
    0x000010c4 beq 0x10d4                        |             
    0x000010c8 ldr r0, [pc, 0x208]               |             r0 = *(0x12d4);
    0x000010cc add r0, pc, r0                    |             r0 = pc + r0;
    0x000010d0 bl 0x6a8                          |             printf (r0)
                                                 |         }
    0x000010d4 ldr r0, [pc, 0x200]               |         r0 = *(0x12d8);
    0x000010d8 ldr r2, [r4, 0x40]                |         r2 = *((r4 + 0x40));
    0x000010dc mov r1, r5                        |         r1 = r5;
    0x000010e0 add r0, pc, r0                    |         r0 = pc + r0;
    0x000010e4 bl 0x6a8                          |         printf (r0, r1, r2)
                                                 |     }
    0x000010e8 ldrb r3, [r4, 0x4a]               |     r3 = *((r4 + 0x4a));
    0x000010ec tst r3, 4                         |     
                                                 |     if ((r3 & 4) == 0) {
    0x000010f0 beq 0x1148                        |         goto label_2;
                                                 |     }
    0x000010f4 ldrb r3, [r4, 0x4b]               |     r3 = *((r4 + 0x4b));
    0x000010f8 tst r3, 4                         |     
                                                 |     if ((r3 & 4) != 0) {
    0x000010fc beq 0x110c                        |         
    0x00001100 ldr r0, [pc, 0x1d8]               |         r0 = *(0x12dc);
    0x00001104 add r0, pc, r0                    |         r0 = pc + r0;
    0x00001108 bl 0x6a8                          |         printf (r0)
                                                 |     }
    0x0000110c ldr r0, [pc, 0x1d0]               |     r0 = *(0x12e0);
    0x00001110 mov r1, r5                        |     r1 = r5;
    0x00001114 add r0, pc, r0                    |     r0 = pc + r0;
    0x00001118 ldrb r6, [r4, 0x48]               |     r6 = *((r4 + 0x48));
    0x0000111c bl 0x6a8                          |     printf (r0, r1, r2, r3, r4, r5, r6)
    0x00001120 cmp r8, 0                         |     
                                                 |     if (r8 != 0) {
    0x00001124 bne 0x119c                        |         goto label_3;
                                                 |     }
    0x00001128 mov r0, r6                        |     r0 = r6;
    0x0000112c bl 0x6b4                          |     r0 = getprotobynumber ();
    0x00001130 cmp r0, 0                         |     
                                                 |     if (r0 == 0) {
    0x00001134 beq 0x119c                        |         goto label_3;
                                                 |     }
    0x00001138 ldr r1, [r0]                      |     r1 = *(r0);
    0x0000113c ldr r0, [pc, 0x1a4]               |     r0 = *(0x12e4);
    0x00001140 add r0, pc, r0                    |     r0 = pc + r0;
                                                 |     do {
    0x00001144 bl 0x6a8                          |         printf (r0, r1)
                                                 | label_2:
    0x00001148 ldrb r3, [r4, 0x4a]               |         r3 = *((r4 + 0x4a));
    0x0000114c tst r3, 8                         |         
                                                 |         if ((r3 & 8) == 0) {
    0x00001150 beq 0x11b8                        |             goto label_4;
                                                 |         }
    0x00001154 ldrb r3, [r4, 0x4b]               |         r3 = *((r4 + 0x4b));
    0x00001158 tst r3, 8                         |         
                                                 |         if ((r3 & 8) != 0) {
    0x0000115c beq 0x116c                        |             
    0x00001160 ldr r0, [pc, 0x184]               |             r0 = *(0x12e8);
    0x00001164 add r0, pc, r0                    |             r0 = pc + r0;
    0x00001168 bl 0x6a8                          |             printf (r0)
                                                 |         }
    0x0000116c ldr r0, [pc, 0x17c]               |         r0 = *(0x12ec);
    0x00001170 ldrb r6, [r4, 0x49]               |         r6 = *((r4 + 0x49));
    0x00001174 mov r1, r5                        |         r1 = r5;
    0x00001178 add r0, pc, r0                    |         r0 = pc + r0;
    0x0000117c bl 0x6a8                          |         printf (r0, r1, r2, r3, r4, r5, r6)
    0x00001180 cmp r6, 0                         |         
                                                 |         if (r6 == 0) {
    0x00001184 beq 0x11ac                        |             goto label_5;
                                                 |         }
    0x00001188 cmp r6, 1                         |         
                                                 |         if (r6 == 1) {
    0x0000118c beq 0x1274                        |             goto label_6;
                                                 |         }
    0x00001190 ldr r0, [pc, 0x15c]               |         r0 = *(0x12f0);
    0x00001194 add r0, pc, r0                    |         r0 = pc + r0;
    0x00001198 b 0x11b4                          |         goto label_7;
                                                 | label_3:
    0x0000119c ldr r0, [pc, 0x154]               |         r0 = *(0x12f4);
    0x000011a0 mov r1, r6                        |         r1 = r6;
    0x000011a4 add r0, pc, r0                    |         r0 = pc + r0;
    0x000011a8 b 0x1144                          |         
                                                 |     } while (1);
                                                 | label_5:
    0x000011ac ldr r0, [pc, 0x148]               |     r0 = *(0x12f8);
    0x000011b0 add r0, pc, r0                    |     r0 = pc + r0;
                                                 |     do {
                                                 | label_7:
    0x000011b4 bl 0x6a8                          |         printf (r0)
                                                 | label_4:
    0x000011b8 ldrb r3, [r4, 0x4a]               |         r3 = *((r4 + 0x4a));
    0x000011bc tst r3, 2                         |         
                                                 |         if ((r3 & 2) != 0) {
    0x000011c0 beq 0x1214                        |             
    0x000011c4 ldrb r3, [r4, 0x4b]               |             r3 = *((r4 + 0x4b));
    0x000011c8 tst r3, 2                         |             
                                                 |             if ((r3 & 2) != 0) {
    0x000011cc beq 0x11dc                        |                 
    0x000011d0 ldr r0, [pc, 0x128]               |                 r0 = *(0x12fc);
    0x000011d4 add r0, pc, r0                    |                 r0 = pc + r0;
    0x000011d8 bl 0x6a8                          |                 printf (r0)
                                                 |             }
    0x000011dc cmp r7, 0xa                       |             
    0x000011e0 add r0, r4, 0x20                  |             r0 = r4 + 0x20;
    0x000011e4 add r6, r4, 0x30                  |             r6 = r4 + 0x30;
                                                 |             if (r7 != 0xa) {
    0x000011e8 bne 0x1280                        |                 goto label_8;
                                                 |             }
    0x000011ec bl 0x6e4                          |             r0 = xtables_ip6addr_to_numeric ();
    0x000011f0 mov r8, r0                        |             r8 = r0;
    0x000011f4 mov r0, r6                        |             r0 = r6;
    0x000011f8 bl 0x69c                          |             xtables_ip6mask_to_numeric ();
    0x000011fc mov r2, r8                        |             r2 = r8;
    0x00001200 mov r1, r5                        |             r1 = r5;
    0x00001204 mov r3, r0                        |             r3 = r0;
    0x00001208 ldr r0, [pc, 0xf4]                |             r0 = *(0x1300);
    0x0000120c add r0, pc, r0                    |             r0 = pc + r0;
                                                 | label_0:
    0x00001210 bl 0x6a8                          |             printf (r0, r1, r2, r3)
                                                 |         }
    0x00001214 ldrb r3, [r4, 0x4a]               |         r3 = *((r4 + 0x4a));
    0x00001218 tst r3, 1                         |         
    0x0000121c popeq {r4, r5, r6, r7, r8, pc}    |         
    0x00001220 ldrb r3, [r4, 0x4b]               |         r3 = *((r4 + 0x4b));
    0x00001224 tst r3, 1                         |         
                                                 |         if ((r3 & 1) != 0) {
    0x00001228 beq 0x1238                        |             
    0x0000122c ldr r0, [pc, 0xd4]                |             r0 = *(0x1304);
    0x00001230 add r0, pc, r0                    |             r0 = pc + r0;
    0x00001234 bl 0x6a8                          |             printf (r0)
                                                 |         }
    0x00001238 cmp r7, 0xa                       |         
    0x0000123c add r6, r4, 0x10                  |         r6 = r4 + 0x10;
    0x00001240 mov r0, r4                        |         r0 = r4;
                                                 |         if (r7 != 0xa) {
    0x00001244 bne 0x12a8                        |             goto label_9;
                                                 |         }
    0x00001248 bl 0x6e4                          |         r0 = xtables_ip6addr_to_numeric ();
    0x0000124c mov r4, r0                        |         r4 = r0;
    0x00001250 mov r0, r6                        |         r0 = r6;
    0x00001254 bl 0x69c                          |         xtables_ip6mask_to_numeric ();
    0x00001258 mov r2, r4                        |         r2 = r4;
    0x0000125c mov r1, r5                        |         r1 = r5;
    0x00001260 mov r3, r0                        |         r3 = r0;
    0x00001264 ldr r0, [pc, 0xa0]                |         r0 = *(0x1308);
    0x00001268 add r0, pc, r0                    |         r0 = pc + r0;
                                                 | label_1:
    0x0000126c pop {r4, r5, r6, r7, r8, lr}      |         
    0x00001270 b 0x6a8                           |         void (*0x6a8)() ();
                                                 | label_6:
    0x00001274 ldr r0, [pc, 0x94]                |         r0 = *(0x130c);
    0x00001278 add r0, pc, r0                    |         r0 = pc + r0;
    0x0000127c b 0x11b4                          |         
                                                 |     } while (1);
                                                 | label_8:
    0x00001280 bl 0x6f0                          |     r0 = xtables_ipaddr_to_numeric ();
    0x00001284 mov r8, r0                        |     r8 = r0;
    0x00001288 mov r0, r6                        |     r0 = r6;
    0x0000128c bl 0x738                          |     xtables_ipmask_to_numeric ();
    0x00001290 mov r2, r8                        |     r2 = r8;
    0x00001294 mov r1, r5                        |     r1 = r5;
    0x00001298 mov r3, r0                        |     r3 = r0;
    0x0000129c ldr r0, [pc, 0x70]                |     r0 = *(0x1310);
    0x000012a0 add r0, pc, r0                    |     r0 = pc + r0;
    0x000012a4 b 0x1210                          |     goto label_0;
                                                 | label_9:
    0x000012a8 bl 0x6f0                          |     r0 = xtables_ipaddr_to_numeric ();
    0x000012ac mov r4, r0                        |     r4 = r0;
    0x000012b0 mov r0, r6                        |     r0 = r6;
    0x000012b4 bl 0x738                          |     xtables_ipmask_to_numeric ();
    0x000012b8 mov r2, r4                        |     r2 = r4;
    0x000012bc mov r1, r5                        |     r1 = r5;
    0x000012c0 mov r3, r0                        |     r3 = r0;
    0x000012c4 ldr r0, [pc, 0x4c]                |     r0 = *(0x1314);
    0x000012c8 add r0, pc, r0                    |     r0 = pc + r0;
    0x000012cc b 0x126c                          |     goto label_1;
                                                 | }

[*] Function printf used 16 times libxt_policy.so