[*] Binary protection state of addon-verify

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


[*] Function fprintf tear down of addon-verify

    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/addon-verify @ 0x900 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) main ()                      | int32_t main () {
                                         |     /* [13] -r-x section size 1424 named .text */
    0x00000900 lui gp, 2                 |     
    0x00000904 addiu gp, gp, -0x68f0     |     
    0x00000908 addu gp, gp, t9           |     gp += t9;
    0x0000090c addiu sp, sp, -0x40       |     
    0x00000910 slti a0, a0, 3            |     a0 = (a0 < 3) ? 1 : 0;
    0x00000914 sw s3, 0x2c(sp)           |     *(var_2ch) = s3;
    0x00000918 lw s3, -0x7f9c(gp)        |     s3 = *((gp - 8167));
    0x0000091c sw gp, 0x10(sp)           |     *(var_10h) = gp;
    0x00000920 sw s0, 0x20(sp)           |     *(var_20h) = s0;
    0x00000924 lw v0, (s3)               |     v0 = *(s3);
    0x00000928 sw ra, 0x3c(sp)           |     *(var_3ch) = ra;
    0x0000092c sw s6, 0x38(sp)           |     *(var_38h) = s6;
    0x00000930 sw s5, 0x34(sp)           |     *(var_34h) = s5;
    0x00000934 sw s4, 0x30(sp)           |     *(var_30h) = s4;
    0x00000938 sw s2, 0x28(sp)           |     *(var_28h) = s2;
    0x0000093c sw s1, 0x24(sp)           |     *(var_24h) = s1;
    0x00000940 move s0, a1               |     s0 = a1;
    0x00000944 sw zero, 0x18(sp)         |     *(var_18h) = 0;
    0x00000948 sw v0, 0x1c(sp)           |     *(var_1ch) = v0;
    0x0000094c lw t9, -0x7fb4(gp)        |     t9 = sym.imp.g_str_has_suffix;
                                         |     if (a0 == 0) {
    0x00000950 bnez a0, 0xa78            |         
    0x00000954 lw s1, 4(a1)              |         s1 = *((a1 + 1));
    0x00000958 lw a1, -0x7fdc(gp)        |         a1 = *((gp - 8183));
    0x0000095c addiu a1, a1, 0xfa4       |         a1 += str..sig;
    0x00000960 move a0, s1               |         a0 = s1;
    0x00000964 jalr t9                   |         t9 ();
    0x00000968 lw gp, 0x10(sp)           |         gp = *(var_10h);
                                         |         if (v0 != 0) {
    0x0000096c beqz v0, 0xa78            |             
    0x00000970 lw a1, -0x7fdc(gp)        |             a1 = *((gp - 8183));
    0x00000974 lw s2, 8(s0)              |             s2 = *((s0 + 2));
    0x00000978 lw t9, -0x7fb4(gp)        |             t9 = sym.imp.g_str_has_suffix;
    0x0000097c addiu a1, a1, 0xfac       |             a1 += str..tar.gz;
    0x00000980 move a0, s2               |             a0 = s2;
    0x00000984 jalr t9                   |             t9 ();
    0x00000988 lw gp, 0x10(sp)           |             gp = *(var_10h);
                                         |             if (v0 == 0) {
    0x0000098c beqz v0, 0xa78            |                 goto label_3;
                                         |             }
    0x00000990 lw t9, -0x7f7c(gp)        |             t9 = sym.imp.open;
    0x00000994 move a0, s1               |             a0 = s1;
    0x00000998 move a1, zero             |             a1 = 0;
    0x0000099c jalr t9                   |             t9 ();
    0x000009a0 move s1, v0               |             s1 = v0;
    0x000009a4 lw gp, 0x10(sp)           |             gp = *(var_10h);
                                         |             if (v0 < 0) {
    0x000009a8 bltz v0, 0xb54            |                 goto label_4;
                                         |             }
    0x000009ac lw t9, -0x7f7c(gp)        |             t9 = sym.imp.open;
    0x000009b0 move a0, s2               |             a0 = s2;
    0x000009b4 move a1, zero             |             a1 = 0;
    0x000009b8 jalr t9                   |             t9 ();
    0x000009bc move s2, v0               |             s2 = v0;
    0x000009c0 lw gp, 0x10(sp)           |             gp = *(var_10h);
                                         |             if (v0 < 0) {
    0x000009c4 bltz v0, 0xad0            |                 goto label_5;
                                         |             }
    0x000009c8 lw s5, -0x7fd8(gp)        |             s5 = *((gp - 8182));
    0x000009cc lw s4, -0x7fdc(gp)        |             s4 = *((gp - 8183));
                                         |             /* section..data.rel.ro */
    0x000009d0 addiu s5, s5, 0x1ff0      |             s5 += 0x1ff0;
    0x000009d4 addiu s4, s4, 0xf58       |             s4 += str._usr_etc_ssl_rsa_pub_1.pem;
    0x000009d8 addiu s6, sp, 0x18        |             s6 = sp + 0x18;
                                         | label_0:
    0x000009dc lw t9, -0x7f7c(gp)        |             t9 = sym.imp.open;
    0x000009e0 move a1, zero             |             a1 = 0;
    0x000009e4 move a0, s4               |             a0 = s4;
    0x000009e8 jalr t9                   |             t9 ();
    0x000009ec move s0, v0               |             s0 = v0;
    0x000009f0 lw gp, 0x10(sp)           |             gp = *(var_10h);
                                         |             if (v0 < 0) {
    0x000009f4 bltz v0, 0xb7c            |                 goto label_6;
                                         |             }
    0x000009f8 lw t9, -0x7f88(gp)        |             t9 = sym.imp.verify;
    0x000009fc move a3, s6               |             a3 = s6;
    0x00000a00 move a2, s2               |             a2 = s2;
    0x00000a04 move a1, s1               |             a1 = s1;
    0x00000a08 move a0, v0               |             a0 = v0;
    0x00000a0c jalr t9                   |             t9 ();
    0x00000a10 lw gp, 0x10(sp)           |             gp = *(var_10h);
    0x00000a14 move a0, s0               |             a0 = s0;
    0x00000a18 lw t9, -0x7fa0(gp)        |             t9 = sym.imp.close;
    0x00000a1c move s0, v0               |             s0 = v0;
    0x00000a20 jalr t9                   |             t9 ();
    0x00000a24 lw v0, 0x18(sp)           |             v0 = *(var_18h);
    0x00000a28 lw gp, 0x10(sp)           |             gp = *(var_10h);
                                         |             if (v0 != 0) {
    0x00000a2c bnez v0, 0xba0            |                 goto label_7;
                                         |             }
    0x00000a30 lw s4, 4(s5)              |             s4 = *((s5 + 1));
                                         |             if (s0 == 0) {
    0x00000a34 beqz s0, 0xb14            |                 goto label_8;
                                         |             }
    0x00000a38 lw v0, -0x7fa8(gp)        |             v0 = *((gp - 8170));
    0x00000a3c lw a1, -0x7fdc(gp)        |             a1 = *((gp - 8183));
    0x00000a40 lw t9, -0x7f94(gp)        |             t9 = sym.imp.g_fprintf
    0x00000a44 lw a0, (v0)               |             a0 = *(v0);
    0x00000a48 addiu a1, a1, 0x1078      |             a1 += str.Verify_Success_n;
    0x00000a4c jalr t9                   |             t9 ();
    0x00000a50 lw gp, 0x10(sp)           |             gp = *(var_10h);
    0x00000a54 lw a2, 0x18(sp)           |             a2 = *(var_18h);
    0x00000a58 move a1, s2               |             a1 = s2;
    0x00000a5c lw t9, -0x7fdc(gp)        |             t9 = *((gp - 8183));
    0x00000a60 addiu t9, t9, 0xd50       |             t9 += fcn.00000d50;
    0x00000a64 move a0, s1               |             a0 = s1;
    0x00000a68 bal 0xd50                 |             fcn_00000d50 ();
    0x00000a6c lw gp, 0x10(sp)           |             gp = *(var_10h);
    0x00000a70 move v0, zero             |             v0 = 0;
    0x00000a74 b 0xa9c                   |             
                                         |         }
                                         |     } else {
                                         | label_3:
    0x00000a78 lw v0, -0x7fa8(gp)        |         v0 = *((gp - 8170));
    0x00000a7c lw a1, -0x7fdc(gp)        |         a1 = *((gp - 8183));
    0x00000a80 lw t9, -0x7f94(gp)        |         t9 = sym.imp.g_fprintf
    0x00000a84 lw a2, (s0)               |         a2 = *(s0);
    0x00000a88 lw a0, (v0)               |         a0 = *(v0);
    0x00000a8c addiu a1, a1, 0xf74       |         a1 += str.Usage:__s__signature_file.sig___tar_file.tar___n;
    0x00000a90 jalr t9                   |         t9 ();
    0x00000a94 lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00000a98 addiu v0, zero, 1         |         v0 = 1;
                                         |     }
                                         |     do {
    0x00000a9c lw a0, 0x1c(sp)           |         a0 = *(var_1ch);
    0x00000aa0 lw v1, (s3)               |         v1 = *(s3);
    0x00000aa4 lw ra, 0x3c(sp)           |         ra = *(var_3ch);
                                         |         if (a0 != v1) {
    0x00000aa8 bne a0, v1, 0xbc8         |             goto label_9;
                                         |         }
    0x00000aac lw s6, 0x38(sp)           |         s6 = *(var_38h);
    0x00000ab0 lw s5, 0x34(sp)           |         s5 = *(var_34h);
    0x00000ab4 lw s4, 0x30(sp)           |         s4 = *(var_30h);
    0x00000ab8 lw s3, 0x2c(sp)           |         s3 = *(var_2ch);
    0x00000abc lw s2, 0x28(sp)           |         s2 = *(var_28h);
    0x00000ac0 lw s1, 0x24(sp)           |         s1 = *(var_24h);
    0x00000ac4 lw s0, 0x20(sp)           |         s0 = *(var_20h);
    0x00000ac8 addiu sp, sp, 0x40        |         
    0x00000acc jr ra                     |         return v0;
                                         | label_5:
    0x00000ad0 lw v0, -0x7fa8(gp)        |         v0 = *((gp - 8170));
    0x00000ad4 lw a1, -0x7fdc(gp)        |         a1 = *((gp - 8183));
    0x00000ad8 lw t9, -0x7f94(gp)        |         t9 = sym.imp.g_fprintf
    0x00000adc lw a0, (v0)               |         a0 = *(v0);
    0x00000ae0 move a2, s2               |         a2 = s2;
    0x00000ae4 addiu a1, a1, 0xfe8       |         a1 += str._ERROR__Failed_to_open_tar_file__fd_tar__d_n;
    0x00000ae8 jalr t9                   |         t9 ();
    0x00000aec lw gp, 0x10(sp)           |         gp = *(var_10h);
                                         | label_2:
    0x00000af0 lw t9, -0x7fdc(gp)        |         t9 = *((gp - 8183));
                                         | label_1:
    0x00000af4 lw a2, 0x18(sp)           |         a2 = *(var_18h);
    0x00000af8 move a1, s2               |         a1 = s2;
    0x00000afc addiu t9, t9, 0xd50       |         t9 += fcn.00000d50;
    0x00000b00 move a0, s1               |         a0 = s1;
    0x00000b04 bal 0xd50                 |         fcn_00000d50 ();
    0x00000b08 lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00000b0c addiu v0, zero, 1         |         v0 = 1;
    0x00000b10 b 0xa9c                   |         
                                         |     } while (1);
                                         | label_8:
    0x00000b14 lw t9, -0x7fac(gp)        |     t9 = sym.imp.lseek;
    0x00000b18 move a2, zero             |     a2 = 0;
    0x00000b1c move a1, zero             |     a1 = 0;
    0x00000b20 move a0, s1               |     a0 = s1;
    0x00000b24 jalr t9                   |     t9 ();
    0x00000b28 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x00000b2c move a2, zero             |     a2 = 0;
    0x00000b30 move a1, zero             |     a1 = 0;
    0x00000b34 lw t9, -0x7fac(gp)        |     t9 = sym.imp.lseek;
    0x00000b38 move a0, s2               |     a0 = s2;
    0x00000b3c jalr t9                   |     t9 ();
    0x00000b40 addiu s5, s5, 4           |     s5 += 4;
    0x00000b44 lw gp, 0x10(sp)           |     gp = *(var_10h);
                                         |     if (s4 != 0) {
    0x00000b48 bnez s4, 0x9dc            |         goto label_0;
                                         |     }
    0x00000b4c lw t9, -0x7fdc(gp)        |     t9 = *((gp - 8183));
    0x00000b50 b 0xaf4                   |     goto label_1;
                                         | label_4:
    0x00000b54 lw v0, -0x7fa8(gp)        |     v0 = *((gp - 8170));
    0x00000b58 lw a1, -0x7fdc(gp)        |     a1 = *((gp - 8183));
    0x00000b5c lw t9, -0x7f94(gp)        |     t9 = sym.imp.g_fprintf
    0x00000b60 lw a0, (v0)               |     a0 = *(v0);
    0x00000b64 move a2, s1               |     a2 = s1;
    0x00000b68 addiu a1, a1, 0xfb4       |     a1 += str._ERROR__Failed_to_open_signature_file__fd_sig__d_n;
    0x00000b6c jalr t9                   |     t9 ();
    0x00000b70 addiu s2, zero, -1        |     s2 = -1;
    0x00000b74 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x00000b78 b 0xaf0                   |     goto label_2;
                                         | label_6:
    0x00000b7c lw v0, -0x7fa8(gp)        |     v0 = *((gp - 8170));
    0x00000b80 lw a1, -0x7fdc(gp)        |     a1 = *((gp - 8183));
    0x00000b84 lw t9, -0x7f94(gp)        |     t9 = sym.imp.g_fprintf
    0x00000b88 lw a0, (v0)               |     a0 = *(v0);
    0x00000b8c move a2, s4               |     a2 = s4;
    0x00000b90 addiu a1, a1, 0x1014      |     a1 += str._ERROR__Could_not_open_public_key__s_n;
    0x00000b94 jalr t9                   |     t9 ();
    0x00000b98 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x00000b9c b 0xaf0                   |     goto label_2;
                                         | label_7:
    0x00000ba0 lw a3, 8(v0)              |     a3 = *((v0 + 2));
    0x00000ba4 lw a2, 4(v0)              |     a2 = *((v0 + 1));
    0x00000ba8 lw v0, -0x7fa8(gp)        |     v0 = *((gp - 8170));
    0x00000bac lw a1, -0x7fdc(gp)        |     a1 = *((gp - 8183));
    0x00000bb0 lw t9, -0x7f94(gp)        |     t9 = sym.imp.g_fprintf
    0x00000bb4 lw a0, (v0)               |     a0 = *(v0);
    0x00000bb8 addiu a1, a1, 0x103c      |     a1 += str._ERROR__Signature_verification_error:_code___d__msg:__s_n;
    0x00000bbc jalr t9                   |     t9 ();
    0x00000bc0 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x00000bc4 b 0xaf0                   |     goto label_2;
                                         | label_9:
    0x00000bc8 lw t9, -0x7fa4(gp)        |     t9 = sym.imp.__stack_chk_fail;
    0x00000bcc jalr t9                   |     t9 ();
    0x00000bd0 nop                       |     
    0x00000bd4 nop                       |     
    0x00000bd8 nop                       |     
    0x00000bdc nop                       |     
                                         | }

[*] Function fprintf used 7 times addon-verify