[*] Binary protection state of libip4tc.so.0.1.0

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


[*] Function printf tear down of libip4tc.so.0.1.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/libip4tc.so.0.1.0 @ 0x1580 */
                                                             | #include <stdint.h>
                                                             |  
    ; (fcn) sym.dump_entries ()                              | void dump_entries (int32_t arg1) {
                                                             |     int32_t var_0h;
                                                             |     int32_t var_4h;
                                                             |     int32_t var_8h;
                                                             |     int32_t var_ch;
                                                             |     int32_t var_10h;
                                                             |     int32_t var_1ch;
                                                             |     r0 = arg1;
    0x00001580 push {r4, r5, r6, r7, r8, sb, sl, fp, lr}     |     
    0x00001584 ldr r8, [pc, 0x3a8]                           |     r8 = *(0x1930);
    0x00001588 ldr r3, [pc, 0x3a8]                           |     r3 = *(0x1934);
    0x0000158c add r8, pc, r8                                |     r8 = pc + r8;
    0x00001590 ldr r2, [r8, r3]                              |     r2 = *(0x1930);
    0x00001594 ldr r3, [pc, 0x3a0]                           |     r3 = *(0x1938);
    0x00001598 mov r5, r0                                    |     r5 = r0;
    0x0000159c add r3, pc, r3                                |     r3 = pc + r3;
    0x000015a0 str r2, [r3]                                  |     *(r3) = r2;
    0x000015a4 ldr r1, [pc, 0x394]                           |     r1 = *(0x193c);
    0x000015a8 ldr r3, [r0, 0x7c]                            |     r3 = *((r0 + 0x7c));
    0x000015ac ldr r0, [pc, 0x390]                           |     r0 = *(0x1940);
    0x000015b0 sub sp, sp, 0x1c                              |     
    0x000015b4 ldr r2, [r3, 0x20]                            |     r2 = *(0x1958);
    0x000015b8 add r1, pc, r1                                |     r1 = pc + r1;
    0x000015bc add r0, pc, r0                                |     r0 = pc + r0;
    0x000015c0 bl 0xdfc                                      |     printf (r0, r1, r2, r3, r4, r5)
    0x000015c4 ldr r0, [pc, 0x37c]                           |     r0 = *(0x1944);
    0x000015c8 add r1, r5, 0x28                              |     r1 = r5 + 0x28;
    0x000015cc add r0, pc, r0                                |     r0 = pc + r0;
    0x000015d0 bl 0xdfc                                      |     printf (r0, r1)
    0x000015d4 ldr r3, [r5, 0x5c]                            |     r3 = *((r5 + 0x5c));
    0x000015d8 ldr r0, [pc, 0x36c]                           |     r0 = *(0x1948);
    0x000015dc str r3, [sp, 4]                               |     var_4h = r3;
    0x000015e0 ldr r3, [r5, 0x58]                            |     r3 = *((r5 + 0x58));
    0x000015e4 add r1, r5, 0x4c                              |     r1 = r5 + 0x4c;
    0x000015e8 str r3, [sp]                                  |     *(sp) = r3;
    0x000015ec add r0, pc, r0                                |     r0 = pc + r0;
    0x000015f0 ldm r1, {r1, r2, r3}                          |     r1 = *(r1);
                                                             |     r2 = *((r1 + 4));
                                                             |     r3 = *((r1 + 8));
    0x000015f4 bl 0xdfc                                      |     printf (r0, r1, r2, r3)
    0x000015f8 ldr r3, [r5, 0x70]                            |     r3 = *((r5 + 0x70));
    0x000015fc ldr r0, [pc, 0x34c]                           |     r0 = *(0x194c);
    0x00001600 str r3, [sp, 4]                               |     var_4h = r3;
    0x00001604 ldr r3, [r5, 0x6c]                            |     r3 = *((r5 + 0x6c));
    0x00001608 add r1, r5, 0x60                              |     r1 = r5 + 0x60;
    0x0000160c str r3, [sp]                                  |     *(sp) = r3;
    0x00001610 add r0, pc, r0                                |     r0 = pc + r0;
    0x00001614 ldm r1, {r1, r2, r3}                          |     r1 = *(r1);
                                                             |     r2 = *((r1 + 4));
                                                             |     r3 = *((r1 + 8));
    0x00001618 bl 0xdfc                                      |     printf (r0, r1, r2, r3)
    0x0000161c ldr sb, [pc, 0x330]                           |     sb = *(0x1950);
    0x00001620 ldr sl, [pc, 0x330]                           |     sl = *(0x1954);
    0x00001624 mov r7, 0                                     |     r7 = 0;
    0x00001628 add sb, pc, sb                                |     sb = pc + sb;
    0x0000162c add sl, pc, sl                                |     sl = pc + sl;
                                                             | label_7:
    0x00001630 ldr r3, [r5, 0x7c]                            |     r3 = *((r5 + 0x7c));
    0x00001634 ldr r0, [r3, 0x20]                            |     r0 = *((r3 + 0x20));
    0x00001638 cmp r0, r7                                    |     
                                                             |     if (r0 <= r7) {
    0x0000163c bhi 0x1648                                    |         
    0x00001640 add sp, sp, 0x1c                              |         
    0x00001644 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc}      |         
                                                             |     }
    0x00001648 add r3, r3, 0x28                              |     r3 += 0x28;
    0x0000164c mov r1, 0                                     |     r1 = 0;
    0x00001650 add r4, r3, r7                                |     r4 = r3 + r7;
    0x00001654 mov r2, r1                                    |     r2 = r1;
                                                             |     do {
    0x00001658 cmp r0, r2                                    |         
                                                             |         if (r0 <= r2) {
    0x0000165c bhi 0x1680                                    |             
    0x00001660 ldr r3, [pc, 0x2f4]                           |             r3 = *(0x1958);
    0x00001664 ldr r1, [pc, 0x2f4]                           |             r1 = *(0x195c);
    0x00001668 ldr r3, [r8, r3]                              |             r3 = *((r8 + r3));
    0x0000166c mov r2, r7                                    |             r2 = r7;
    0x00001670 add r1, pc, r1                                |             r1 = pc + r1;
    0x00001674 ldr r0, [r3]                                  |             r0 = *(0x1958);
    0x00001678 bl 0xe68                                      |             r0 = fprintf (r0, r1, r2, r3)
    0x0000167c bl 0xe50                                      |             abort ();
                                                             |         }
    0x00001680 add ip, r3, r2                                |         
    0x00001684 cmp r4, ip                                    |         
                                                             |         if (r4 == ip) {
    0x00001688 beq 0x171c                                    |             goto label_8;
                                                             |         }
    0x0000168c ldrh ip, [ip, 0x5a]                           |         ip = *((ip + 0x5a));
    0x00001690 add r1, r1, 1                                 |         r1++;
    0x00001694 add r2, r2, ip                                |         r2 += ip;
    0x00001698 b 0x1658                                      |         
                                                             |     } while (1);
                                                             | label_0:
    0x0000169c add r1, r4, r6                                |     r1 = r4 + r6;
    0x000016a0 add r1, r1, 2                                 |     r1 += 2;
    0x000016a4 mov r0, sl                                    |     r0 = sl;
    0x000016a8 bl 0xdfc                                      |     printf (r0, r1)
    0x000016ac ldrh r3, [r4, r6]                             |     r3 = *((r4 + r6));
    0x000016b0 add r6, r6, r3                                |     r6 += r3;
    0x000016b4 b 0x18ac                                      |     goto label_9;
                                                             | label_3:
    0x000016b8 ldr r1, [pc, 0x2a4]                           |     r1 = *(0x1960);
    0x000016bc add r1, pc, r1                                |     r1 = pc + r1;
    0x000016c0 b 0x1914                                      |     goto label_10;
                                                             | label_4:
    0x000016c4 ldr r1, [pc, 0x29c]                           |     r1 = *(0x1964);
    0x000016c8 add r1, pc, r1                                |     r1 = pc + r1;
    0x000016cc b 0x1914                                      |     goto label_10;
                                                             | label_5:
    0x000016d0 ldr r1, [pc, 0x294]                           |     r1 = *(0x1968);
    0x000016d4 add r1, pc, r1                                |     r1 = pc + r1;
    0x000016d8 b 0x1914                                      |     goto label_10;
                                                             | label_6:
    0x000016dc ldr r1, [pc, 0x28c]                           |     r1 = *(0x196c);
    0x000016e0 add r1, pc, r1                                |     r1 = pc + r1;
    0x000016e4 b 0x1914                                      |     goto label_10;
                                                             | label_2:
    0x000016e8 ldr r0, [pc, 0x284]                           |     r0 = *(0x1970);
    0x000016ec add r0, pc, r0                                |     r0 = pc + r0;
    0x000016f0 b 0x191c                                      |     goto label_11;
                                                             | label_1:
    0x000016f4 ldr r1, [pc, 0x27c]                           |     r1 = *(0x1974);
    0x000016f8 mov r0, fp                                    |     r0 = fp;
    0x000016fc add r1, pc, r1                                |     r1 = pc + r1;
    0x00001700 bl 0xea4                                      |     r0 = strcmp (r0, r1);
    0x00001704 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00001708 bne 0x1920                                    |         goto label_12;
                                                             |     }
    0x0000170c ldr r0, [pc, 0x268]                           |     r0 = *(0x1978);
    0x00001710 add r1, r6, 0x20                              |     r1 = r6 + 0x20;
    0x00001714 add r0, pc, r0                                |     r0 = pc + r0;
    0x00001718 b 0x191c                                      |     goto label_11;
                                                             | label_8:
    0x0000171c mov r0, sb                                    |     r0 = sb;
    0x00001720 bl 0xdfc                                      |     printf (r0)
    0x00001724 ldr r0, [r4]                                  |     r0 = *(r4);
    0x00001728 bl 0x3dfc                                     |     fcn_00003dfc (r0);
    0x0000172c add fp, r4, 0x40                              |     
    0x00001730 mov r6, r0                                    |     r6 = r0;
    0x00001734 ldr r0, [r4, 8]                               |     r0 = *((r4 + 8));
    0x00001738 bl 0x3dfc                                     |     fcn_00003dfc (r0);
    0x0000173c lsr r3, r6, 8                                 |     r3 = r6 >> 8;
    0x00001740 lsr r2, r6, 0x10                              |     r2 = r6 >> 0x10;
    0x00001744 and r3, r3, 0xff                              |     r3 &= 0xff;
    0x00001748 and r2, r2, 0xff                              |     r2 &= 0xff;
    0x0000174c and r1, r0, 0xff                              |     r1 = r0 & 0xff;
    0x00001750 str r1, [sp, 0x10]                            |     var_10h = r1;
    0x00001754 lsr r1, r0, 8                                 |     r1 = r0 >> 8;
    0x00001758 and r1, r1, 0xff                              |     r1 &= 0xff;
    0x0000175c str r1, [sp, 0xc]                             |     var_ch = r1;
    0x00001760 lsr r1, r0, 0x10                              |     r1 = r0 >> 0x10;
    0x00001764 lsr r0, r0, 0x18                              |     r0 >>= 0x18;
    0x00001768 str r0, [sp, 4]                               |     var_4h = r0;
    0x0000176c ldr r0, [pc, 0x20c]                           |     r0 = *(0x197c);
    0x00001770 and r1, r1, 0xff                              |     r1 &= 0xff;
    0x00001774 str r1, [sp, 8]                               |     var_8h = r1;
    0x00001778 and r1, r6, 0xff                              |     r1 = r6 & 0xff;
    0x0000177c str r1, [sp]                                  |     *(sp) = r1;
    0x00001780 add r0, pc, r0                                |     r0 = pc + r0;
    0x00001784 lsr r1, r6, 0x18                              |     r1 = r6 >> 0x18;
    0x00001788 bl 0xdfc                                      |     printf (r0, r1, r2, r3)
    0x0000178c ldr r0, [r4, 4]                               |     r0 = *((r4 + 4));
    0x00001790 bl 0x3dfc                                     |     r0 = fcn_00003dfc (r0);
    0x00001794 mov r6, r0                                    |     r6 = r0;
    0x00001798 ldr r0, [r4, 0xc]                             |     r0 = *((r4 + 0xc));
    0x0000179c bl 0x3dfc                                     |     fcn_00003dfc (r0);
    0x000017a0 lsr r3, r6, 8                                 |     r3 = r6 >> 8;
    0x000017a4 lsr r2, r6, 0x10                              |     r2 = r6 >> 0x10;
    0x000017a8 and r3, r3, 0xff                              |     r3 &= 0xff;
    0x000017ac and r2, r2, 0xff                              |     r2 &= 0xff;
    0x000017b0 and r1, r0, 0xff                              |     r1 = r0 & 0xff;
    0x000017b4 str r1, [sp, 0x10]                            |     var_10h = r1;
    0x000017b8 lsr r1, r0, 8                                 |     r1 = r0 >> 8;
    0x000017bc and r1, r1, 0xff                              |     r1 &= 0xff;
    0x000017c0 str r1, [sp, 0xc]                             |     var_ch = r1;
    0x000017c4 lsr r1, r0, 0x10                              |     r1 = r0 >> 0x10;
    0x000017c8 lsr r0, r0, 0x18                              |     r0 >>= 0x18;
    0x000017cc str r0, [sp, 4]                               |     var_4h = r0;
    0x000017d0 ldr r0, [pc, 0x1ac]                           |     r0 = *(0x1980);
    0x000017d4 and r1, r1, 0xff                              |     r1 &= 0xff;
    0x000017d8 str r1, [sp, 8]                               |     var_8h = r1;
    0x000017dc and r1, r6, 0xff                              |     r1 = r6 & 0xff;
    0x000017e0 str r1, [sp]                                  |     *(sp) = r1;
    0x000017e4 add r0, pc, r0                                |     r0 = pc + r0;
    0x000017e8 lsr r1, r6, 0x18                              |     r1 = r6 >> 0x18;
    0x000017ec bl 0xdfc                                      |     printf (r0, r1, r2, r3)
    0x000017f0 ldr r0, [pc, 0x190]                           |     r0 = *(0x1984);
    0x000017f4 add r1, r4, 0x10                              |     r1 = r4 + 0x10;
    0x000017f8 add r0, pc, r0                                |     r0 = pc + r0;
    0x000017fc bl 0xdfc                                      |     printf (r0, r1)
    0x00001800 add r6, r4, 0x30                              |     r6 = r4 + 0x30;
                                                             |     do {
    0x00001804 ldrb r3, [r6], 1                              |         r3 = *(r6);
                                                             |         r6++;
    0x00001808 cmp r3, 0                                     |         
                                                             |         if (r3 != 0) {
    0x0000180c moveq r0, 0x2e                                |             r0 = 0x2e;
                                                             |         }
                                                             |         if (r3 == 0) {
    0x00001810 movne r0, 0x58                                |             r0 = 0x58;
                                                             |         }
    0x00001814 bl 0xde4                                      |         putchar (r0);
    0x00001818 cmp r6, fp                                    |         
    0x0000181c bne 0x1804                                    |         
                                                             |     } while (r6 != fp);
    0x00001820 ldr r0, [pc, 0x164]                           |     r0 = *(0x1988);
    0x00001824 add r1, r4, 0x20                              |     r1 = r4 + 0x20;
    0x00001828 add r0, pc, r0                                |     r0 = pc + r0;
    0x0000182c bl 0xdfc                                      |     printf (r0, r1)
    0x00001830 add fp, r4, 0x50                              |     
                                                             |     do {
    0x00001834 ldrb r3, [r6], 1                              |         r3 = *(r6);
                                                             |         r6++;
    0x00001838 cmp r3, 0                                     |         
                                                             |         if (r3 != 0) {
    0x0000183c moveq r0, 0x2e                                |             r0 = 0x2e;
                                                             |         }
                                                             |         if (r3 == 0) {
    0x00001840 movne r0, 0x58                                |             r0 = 0x58;
                                                             |         }
    0x00001844 bl 0xde4                                      |         putchar (r0);
    0x00001848 cmp fp, r6                                    |         
    0x0000184c bne 0x1834                                    |         
                                                             |     } while (fp != r6);
    0x00001850 ldr r0, [pc, 0x138]                           |     r0 = *(0x198c);
    0x00001854 ldrh r1, [r4, 0x50]                           |     r1 = *((r4 + 0x50));
    0x00001858 add r0, pc, r0                                |     r0 = pc + r0;
    0x0000185c bl 0xdfc                                      |     printf (r0, r1)
    0x00001860 ldr r0, [pc, 0x12c]                           |     r0 = *(0x1990);
    0x00001864 ldrb r1, [r4, 0x52]                           |     r1 = *((r4 + 0x52));
    0x00001868 add r0, pc, r0                                |     r0 = pc + r0;
    0x0000186c bl 0xdfc                                      |     printf (r0, r1)
    0x00001870 ldr r0, [pc, 0x120]                           |     r0 = *(0x1994);
    0x00001874 ldrb r1, [r4, 0x53]                           |     r1 = *((r4 + 0x53));
    0x00001878 add r0, pc, r0                                |     r0 = pc + r0;
    0x0000187c bl 0xdfc                                      |     printf (r0, r1)
    0x00001880 ldrd r0, r1, [r4, 0x68]                       |     __asm ("ldrd r0, r1, [r4, 0x68]");
    0x00001884 ldrd r2, r3, [r4, 0x60]                       |     __asm ("ldrd r2, r3, [r4, 0x60]");
    0x00001888 strd r0, r1, [sp]                             |     __asm ("strd r0, r1, [sp]");
    0x0000188c ldr r0, [pc, 0x108]                           |     r0 = *(0x1998);
    0x00001890 mov r6, 0x70                                  |     r6 = 0x70;
    0x00001894 add r0, pc, r0                                |     r0 = pc + r0;
    0x00001898 bl 0xdfc                                      |     printf (r0, r1, r2, r3, r4, r5, r6)
    0x0000189c ldr r0, [pc, 0xfc]                            |     r0 = *(0x199c);
    0x000018a0 ldr r1, [r4, 0x54]                            |     r1 = *((r4 + 0x54));
    0x000018a4 add r0, pc, r0                                |     r0 = pc + r0;
    0x000018a8 bl 0xdfc                                      |     printf (r0, r1)
                                                             | label_9:
    0x000018ac ldrh r3, [r4, 0x58]                           |     r3 = *((r4 + 0x58));
    0x000018b0 cmp r6, r3                                    |     
                                                             |     if (r6 <= r3) {
    0x000018b4 blo 0x169c                                    |         goto label_0;
                                                             |     }
    0x000018b8 ldr r0, [pc, 0xe4]                            |     r0 = *(0x19a0);
    0x000018bc add r6, r4, r3                                |     r6 = r4 + r3;
    0x000018c0 add fp, r6, 2                                 |     
    0x000018c4 ldrh r2, [r4, r3]                             |     r2 = *((r4 + r3));
    0x000018c8 mov r1, fp                                    |     r1 = fp;
    0x000018cc add r0, pc, r0                                |     r0 = pc + r0;
    0x000018d0 bl 0xdfc                                      |     printf (r0, r1, r2, r3, r4, r5, r6)
    0x000018d4 ldrb r3, [r6, 2]                              |     r3 = *((r6 + 2));
    0x000018d8 cmp r3, 0                                     |     
                                                             |     if (r3 != 0) {
    0x000018dc bne 0x16f4                                    |         goto label_1;
                                                             |     }
    0x000018e0 ldr r1, [r6, 0x20]                            |     r1 = *((r6 + 0x20));
    0x000018e4 cmp r1, 0                                     |     
                                                             |     if (r1 >= 0) {
    0x000018e8 bge 0x16e8                                    |         goto label_2;
                                                             |     }
    0x000018ec cmn r1, 2                                     |     
                                                             |     if (r1 == 2) {
    0x000018f0 beq 0x16b8                                    |         goto label_3;
                                                             |     }
    0x000018f4 cmn r1, 1                                     |     
                                                             |     if (r1 == 1) {
    0x000018f8 beq 0x16c4                                    |         goto label_4;
                                                             |     }
    0x000018fc cmn r1, 4                                     |     
                                                             |     if (r1 == 4) {
    0x00001900 beq 0x16d0                                    |         goto label_5;
                                                             |     }
    0x00001904 cmn r1, 5                                     |     
                                                             |     if (r1 != 5) {
    0x00001908 bne 0x16dc                                    |         goto label_6;
                                                             |     }
    0x0000190c ldr r1, [pc, 0x94]                            |     r1 = *(0x19a4);
    0x00001910 add r1, pc, r1                                |     r1 = pc + r1;
                                                             | label_10:
    0x00001914 ldr r0, [pc, 0x90]                            |     r0 = *(0x19a8);
    0x00001918 add r0, pc, r0                                |     r0 = pc + r0;
                                                             | label_11:
    0x0000191c bl 0xdfc                                      |     printf (r0, r1)
                                                             | label_12:
    0x00001920 mov r0, 0xa                                   |     r0 = 0xa;
    0x00001924 bl 0xde4                                      |     putchar (r0);
    0x00001928 ldrh r3, [r4, 0x5a]                           |     r3 = *((r4 + 0x5a));
    0x0000192c add r7, r7, r3                                |     r7 += r3;
    0x00001930 b 0x1630                                      |     goto label_7;
                                                             | }

[*] Function printf used 19 times libip4tc.so.0.1.0