[*] Binary protection state of systemd-getty-generator

  
  	Full RELRO     Canary found      NX disabled  PIE enabled  RPATH        No RUNPATH   No Symbols


[*] Function strcpy tear down of systemd-getty-generator

    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/lib/systemd/system-generators/systemd-getty-generator @ 0x1610 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) fcn.00001610 ()              | void fcn_00001610 () {
    0x00001610 lui gp, 2                 |     
    0x00001614 addiu gp, gp, -0x6610     |     
    0x00001618 addu gp, gp, t9           |     gp += t9;
    0x0000161c addiu sp, sp, -0x60       |     
    0x00001620 sw s4, 0x4c(sp)           |     *(var_4ch) = s4;
    0x00001624 lw s4, -0x7f78(gp)        |     s4 = *((gp - 8158));
    0x00001628 sw fp, 0x58(sp)           |     *(var_58h) = fp;
    0x0000162c sw ra, 0x5c(sp)           |     *(var_5ch) = ra;
    0x00001630 sw s6, 0x54(sp)           |     *(var_54h) = s6;
    0x00001634 sw s5, 0x50(sp)           |     *(var_50h) = s5;
    0x00001638 sw s3, 0x48(sp)           |     *(var_48h) = s3;
    0x0000163c sw s2, 0x44(sp)           |     *(var_44h) = s2;
    0x00001640 sw s1, 0x40(sp)           |     *(var_40h) = s1;
    0x00001644 sw s0, 0x3c(sp)           |     *(var_3ch) = s0;
    0x00001648 sw gp, 0x20(sp)           |     *(var_20h) = gp;
    0x0000164c move fp, sp               |     fp = sp;
    0x00001650 lw v0, (s4)               |     v0 = *(s4);
    0x00001654 sw v0, 0x34(fp)           |     *(arg_34h) = v0;
    0x00001658 lw t9, -0x7f68(gp)        |     t9 = sym.imp.strlen;
                                         |     if (a1 == 0) {
    0x0000165c beqz a1, 0x1850           |         goto label_1;
                                         |     }
    0x00001660 move s1, a0               |     s1 = a0;
    0x00001664 move s0, a1               |     s0 = a1;
    0x00001668 jalr t9                   |     t9 ();
    0x0000166c lui a0, 0x40              |     a0 = 0x400000;
    0x00001670 addiu v1, v0, 0x19        |     v1 = v0 + 0x19;
    0x00001674 addiu a0, a0, 1           |     a0++;
    0x00001678 sltu v1, v1, a0           |     v1 = (v1 < a0) ? 1 : 0;
    0x0000167c lw gp, 0x20(fp)           |     gp = *(arg_20h);
                                         |     if (v1 == 0) {
    0x00001680 beqz v1, 0x187c           |         goto label_2;
                                         |     }
    0x00001684 lw a0, -0x7fdc(gp)        |     a0 = *((gp - 8183));
    0x00001688 addiu v0, v0, 0x20        |     v0 += 0x20;
    0x0000168c srl v0, v0, 3             |     v0 >>= 3;
    0x00001690 addiu v1, a0, 0x1fb4      |     v1 = a0 + str._usr_lib_systemd_system_;
    0x00001694 sll v0, v0, 3             |     v0 <<= 3;
    0x00001698 subu sp, sp, v0           |     
    0x0000169c addiu s2, sp, 0x20        |     s2 = sp + 0x20;
    0x000016a0 lw t0, 0x1fb4(a0)         |     t0 = *(a0);
    0x000016a4 lw a1, 0xc(v1)            |     a1 = *((v1 + 3));
    0x000016a8 lw a0, 0x10(v1)           |     a0 = *((v1 + 4));
    0x000016ac lw a3, 4(v1)              |     a3 = *((v1 + 1));
    0x000016b0 lw a2, 8(v1)              |     a2 = *((v1 + 2));
    0x000016b4 lw v0, 0x14(v1)           |     v0 = *((v1 + 5));
    0x000016b8 lw t9, -0x7f74(gp)        |     t9 = sym.imp.strcpy
    0x000016bc sw a1, 0xc(s2)            |     *((s2 + 3)) = a1;
    0x000016c0 sw a0, 0x10(s2)           |     *((s2 + 4)) = a0;
    0x000016c4 move a1, s1               |     a1 = s1;
    0x000016c8 addiu a0, s2, 0x18        |     a0 = s2 + 0x18;
    0x000016cc sw t0, (s2)               |     *(s2) = t0;
    0x000016d0 sw a3, 4(s2)              |     *((s2 + 1)) = a3;
    0x000016d4 sw a2, 8(s2)              |     *((s2 + 2)) = a2;
    0x000016d8 sw v0, 0x14(s2)           |     *((s2 + 5)) = v0;
    0x000016dc jalr t9                   |     t9 ();
    0x000016e0 lw gp, 0x20(fp)           |     gp = *(arg_20h);
    0x000016e4 addiu s1, fp, 0x28        |     s1 = fp + 0x28;
    0x000016e8 sw s0, 0x30(fp)           |     *(arg_30h) = s0;
    0x000016ec lw v0, -0x7fd8(gp)        |     v0 = *((gp - 8182));
    0x000016f0 addiu s3, fp, 0x34        |     s3 = fp + 0x34;
    0x000016f4 move s5, s1               |     s5 = s1;
    0x000016f8 lw s6, 0x3110(v0)         |     s6 = *((v0 + 3140));
    0x000016fc lw v0, -0x7fdc(gp)        |     v0 = *((gp - 8183));
    0x00001700 move a0, s6               |     a0 = s6;
    0x00001704 addiu v0, v0, 0x1fd0      |     v0 += str._getty.target.wants_;
    0x00001708 sw s6, 0x28(fp)           |     *(arg_28h) = s6;
    0x0000170c sw v0, 0x2c(fp)           |     *(arg_2ch) = v0;
    0x00001710 move s0, zero             |     s0 = 0;
                                         |     if (a0 == 0) {
    0x00001714 beqz a0, 0x173c           |         goto label_3;
                                         |     }
    0x00001718 lw t9, -0x7f68(gp)        |     t9 = sym.imp.strlen;
                                         |     do {
    0x0000171c addiu s5, s5, 4           |         s5 += 4;
    0x00001720 jalr t9                   |         t9 ();
    0x00001724 addu s0, s0, v0           |         s0 += v0;
    0x00001728 lw gp, 0x20(fp)           |         gp = *(arg_20h);
                                         |         if (s3 == s5) {
    0x0000172c beq s3, s5, 0x173c        |             goto label_3;
                                         |         }
    0x00001730 lw a0, (s5)               |         a0 = *(s5);
    0x00001734 lw t9, -0x7f68(gp)        |         t9 = sym.imp.strlen;
    0x00001738 bnez a0, 0x171c           |         
                                         |     } while (a0 != 0);
                                         | label_3:
    0x0000173c lui v1, 0x40              |     v1 = 0x400000;
    0x00001740 addiu v0, s0, 1           |     v0 = s0 + 1;
    0x00001744 addiu v1, v1, 1           |     v1++;
    0x00001748 sltu v0, v0, v1           |     v0 = (v0 < v1) ? 1 : 0;
    0x0000174c addiu s0, s0, 8           |     s0 += 8;
                                         |     if (v0 == 0) {
    0x00001750 beqz v0, 0x18a8           |         goto label_4;
                                         |     }
    0x00001754 srl s0, s0, 3             |     s0 >>= 3;
    0x00001758 sll s0, s0, 3             |     s0 <<= 3;
    0x0000175c subu sp, sp, s0           |     
    0x00001760 addiu s0, sp, 0x20        |     s0 = sp + 0x20;
    0x00001764 move v0, s0               |     v0 = s0;
                                         |     if (s6 == 0) {
    0x00001768 beqz s6, 0x1794           |         goto label_5;
                                         |     }
    0x0000176c lw t9, -0x7f2c(gp)        |     t9 = sym.imp.stpcpy;
                                         |     do {
    0x00001770 move a0, v0               |         a0 = v0;
    0x00001774 move a1, s6               |         a1 = s6;
    0x00001778 addiu s1, s1, 4           |         s1 += 4;
    0x0000177c jalr t9                   |         t9 ();
    0x00001780 lw gp, 0x20(fp)           |         gp = *(arg_20h);
                                         |         if (s1 == s3) {
    0x00001784 beq s1, s3, 0x1794        |             goto label_5;
                                         |         }
    0x00001788 lw s6, (s1)               |         s6 = *(s1);
    0x0000178c lw t9, -0x7f2c(gp)        |         t9 = sym.imp.stpcpy;
    0x00001790 bnez s6, 0x1770           |         
                                         |     } while (s6 != 0);
                                         | label_5:
    0x00001794 lw t9, -0x7f18(gp)        |     t9 = sym.imp.mkdir_parents_label;
    0x00001798 addiu a1, zero, 0x1ed     |     a1 = 0x1ed;
    0x0000179c move a0, s0               |     a0 = s0;
    0x000017a0 sb zero, (v0)             |     *(v0) = 0;
    0x000017a4 jalr t9                   |     t9 ();
    0x000017a8 lw gp, 0x20(fp)           |     gp = *(arg_20h);
    0x000017ac move a1, s0               |     a1 = s0;
    0x000017b0 lw t9, -0x7f4c(gp)        |     t9 = sym.imp.symlink;
    0x000017b4 move a0, s2               |     a0 = s2;
    0x000017b8 jalr t9                   |     t9 ();
    0x000017bc lw gp, 0x20(fp)           |     gp = *(arg_20h);
    0x000017c0 bltz v0, 0x1808           |     
                                         |     while (s1 == v0) {
    0x000017c4 move v0, zero             |         v0 = 0;
                                         | label_0:
    0x000017c8 lw a0, 0x34(fp)           |         a0 = *(arg_34h);
    0x000017cc lw v1, (s4)               |         v1 = *(s4);
    0x000017d0 lw t9, -0x7f90(gp)        |         t9 = sym.imp.__stack_chk_fail;
                                         |         if (a0 != v1) {
    0x000017d4 bne a0, v1, 0x190c        |             goto label_6;
                                         |         }
    0x000017d8 move sp, fp               |         
    0x000017dc lw ra, 0x5c(sp)           |         ra = *(var_5ch);
    0x000017e0 lw fp, 0x58(sp)           |         fp = *(var_58h);
    0x000017e4 lw s6, 0x54(sp)           |         s6 = *(var_54h);
    0x000017e8 lw s5, 0x50(sp)           |         s5 = *(var_50h);
    0x000017ec lw s4, 0x4c(sp)           |         s4 = *(var_4ch);
    0x000017f0 lw s3, 0x48(sp)           |         s3 = *(var_48h);
    0x000017f4 lw s2, 0x44(sp)           |         s2 = *(var_44h);
    0x000017f8 lw s1, 0x40(sp)           |         s1 = *(var_40h);
    0x000017fc lw s0, 0x3c(sp)           |         s0 = *(var_3ch);
    0x00001800 addiu sp, sp, 0x60        |         
    0x00001804 jr ra                     |         return v0;
    0x00001808 lw t9, -0x7f14(gp)        |         t9 = sym.imp.__errno_location;
    0x0000180c jalr t9                   |         t9 ();
    0x00001810 nop                       |         
    0x00001814 lw s1, (v0)               |         s1 = *(v0);
    0x00001818 addiu v0, zero, 0x11      |         v0 = 0x11;
    0x0000181c lw gp, 0x20(fp)           |         gp = *(arg_20h);
    0x00001820 beq s1, v0, 0x17c4        |         
                                         |     }
    0x00001824 lw t9, -0x7fb4(gp)        |     t9 = sym.imp.log_get_max_level_realm;
    0x00001828 move a0, zero             |     a0 = 0;
    0x0000182c jalr t9                   |     t9 ();
    0x00001830 slti v0, v0, 3            |     v0 = (v0 < 3) ? 1 : 0;
    0x00001834 lw gp, 0x20(fp)           |     gp = *(arg_20h);
                                         |     if (v0 == 0) {
    0x00001838 beqz v0, 0x18c0           |         goto label_7;
                                         |     }
                                         |     if (s1 < 0) {
    0x0000183c bltzl s1, 0x1900          |         goto label_8;
                                         |     }
    0x00001840 negu s1, s1               |     __asm ("negu s1, s1");
    0x00001844 andi s1, s1, 0xff         |     s1 &= 0xff;
    0x00001848 negu v0, s1               |     __asm ("negu v0, s1");
    0x0000184c b 0x17c8                  |     goto label_0;
                                         | label_1:
    0x00001850 lw v0, -0x7fdc(gp)        |     v0 = *((gp - 8183));
    0x00001854 lw a2, -0x7fdc(gp)        |     a2 = *((gp - 8183));
    0x00001858 lw a1, -0x7fdc(gp)        |     a1 = *((gp - 8183));
    0x0000185c addiu v0, v0, 0x2250      |     v0 += str.add_symlink;
    0x00001860 lw t9, -0x7f34(gp)        |     t9 = sym.imp.log_assert_failed_realm;
    0x00001864 sw v0, 0x10(sp)           |     *(var_10h) = v0;
    0x00001868 addiu a3, zero, 0x1e      |     a3 = 0x1e;
    0x0000186c addiu a2, a2, 0x1f5f      |     a2 += 0x1f5f;
    0x00001870 addiu a1, a1, 0x1f88      |     a1 += str.tservice;
    0x00001874 move a0, zero             |     a0 = 0;
    0x00001878 jalr t9                   |     t9 ();
                                         | label_2:
    0x0000187c lw v0, -0x7fdc(gp)        |     v0 = *((gp - 8183));
    0x00001880 lw t9, -0x7f34(gp)        |     t9 = sym.imp.log_assert_failed_realm;
    0x00001884 addiu v0, v0, 0x2250      |     v0 += str.add_symlink;
    0x00001888 sw v0, 0x10(sp)           |     *(var_10h) = v0;
    0x0000188c addiu a3, zero, 0x20      |     a3 = 0x20;
                                         |     do {
    0x00001890 lw a2, -0x7fdc(gp)        |         a2 = *((gp - 8183));
    0x00001894 lw a1, -0x7fdc(gp)        |         a1 = *((gp - 8183));
    0x00001898 addiu a2, a2, 0x1f5f      |         a2 += 0x1f5f;
    0x0000189c addiu a1, a1, 0x1f94      |         a1 += str.sizeof_char__n____ALLOCA_MAX;
    0x000018a0 move a0, zero             |         a0 = 0;
    0x000018a4 jalr t9                   |         t9 ();
                                         | label_4:
    0x000018a8 lw v0, -0x7fdc(gp)        |         v0 = *((gp - 8183));
    0x000018ac lw t9, -0x7f34(gp)        |         t9 = sym.imp.log_assert_failed_realm;
    0x000018b0 addiu v0, v0, 0x2250      |         v0 += str.add_symlink;
    0x000018b4 sw v0, 0x10(sp)           |         *(var_10h) = v0;
    0x000018b8 addiu a3, zero, 0x21      |         a3 = 0x21;
    0x000018bc b 0x1890                  |         
                                         |     } while (1);
                                         | label_7:
    0x000018c0 lw v0, -0x7fdc(gp)        |     v0 = *((gp - 8183));
    0x000018c4 lw a2, -0x7fdc(gp)        |     a2 = *((gp - 8183));
    0x000018c8 addiu v0, v0, 0x1fe8      |     v0 += str.Failed_to_create_symlink__s:__m;
    0x000018cc sw v0, 0x14(sp)           |     *(var_14h_2) = v0;
    0x000018d0 lw v0, -0x7fdc(gp)        |     v0 = *((gp - 8183));
    0x000018d4 lw t9, -0x7f88(gp)        |     t9 = sym.imp.log_internal_realm;
    0x000018d8 addiu v0, v0, 0x2244      |     v0 += 0x2244;
    0x000018dc sw s0, 0x18(sp)           |     *(var_18h_4) = s0;
    0x000018e0 sw v0, 0x10(sp)           |     *(var_10h) = v0;
    0x000018e4 addiu a3, zero, 0x2b      |     a3 = 0x2b;
    0x000018e8 addiu a2, a2, 0x1f5f      |     a2 += 0x1f5f;
    0x000018ec move a1, s1               |     a1 = s1;
    0x000018f0 addiu a0, zero, 3         |     a0 = 3;
    0x000018f4 jalr t9                   |     t9 ();
    0x000018f8 lw gp, 0x20(fp)           |     gp = *(arg_20h);
    0x000018fc b 0x17c8                  |     goto label_0;
                                         | label_8:
    0x00001900 andi s1, s1, 0xff         |     s1 &= 0xff;
    0x00001904 negu v0, s1               |     __asm ("negu v0, s1");
    0x00001908 b 0x17c8                  |     goto label_0;
                                         | label_6:
    0x0000190c jalr t9                   |     t9 ();
    0x00001910 nop                       |     
                                         | }

[*] Function strcpy used 2 times systemd-getty-generator