[*] Binary protection state of network_setup

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


[*] Function sprintf tear down of network_setup

    ; assembly                                               | /* r2dec pseudo code output */
                                                             | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/network_setup @ 0x408a84 */
                                                             | #include <stdint.h>
                                                             |  
    ; (fcn) sym.echo_data_char_const__char_const_ ()         | void echo_data_char_const_char_const_ () {
                                                             |     /* echo_data(char const*, char const*) */
    0x00408a84 lui gp, 2                                     |     
    0x00408a88 addiu gp, gp, 0x35bc                          |     
    0x00408a8c addu gp, gp, t9                               |     gp += t9;
    0x00408a90 addiu sp, sp, -0x38                           |     
    0x00408a94 sw ra, 0x34(sp)                               |     *(var_34h) = ra;
    0x00408a98 sw fp, 0x30(sp)                               |     *(var_30h) = fp;
    0x00408a9c move fp, sp                                   |     fp = sp;
    0x00408aa0 sw gp, 0x10(sp)                               |     *(var_10h) = gp;
    0x00408aa4 sw a0, 0x1c(fp)                               |     *(arg_1ch) = a0;
    0x00408aa8 sw a1, 0x18(fp)                               |     *(arg_18h) = a1;
    0x00408aac lw t8, -0x7dd0(gp)                            |     t8 = *((gp - 8052));
    0x00408ab0 lw t8, (t8)                                   |     t8 = *(t8);
    0x00408ab4 sw t8, 0x2c(fp)                               |     *(arg_2ch) = t8;
    0x00408ab8 lw a0, 0x1c(fp)                               |     a0 = *(arg_1ch);
    0x00408abc addiu a1, zero, 0x102                         |     a1 = 0x102;
    0x00408ac0 addiu a2, zero, 0x1a4                         |     a2 = 0x1a4;
    0x00408ac4 lw t8, -0x7ee0(gp)                            |     t8 = sym.imp.open64;
    0x00408ac8 move t9, t8                                   |     t9 = t8;
    0x00408acc jalr t9                                       |     t9 ();
    0x00408ad0 nop                                           |     
    0x00408ad4 lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00408ad8 move t8, v0                                   |     t8 = v0;
    0x00408adc sw t8, 0x20(fp)                               |     *(arg_20h) = t8;
    0x00408ae0 lw t8, 0x20(fp)                               |     t8 = *(arg_20h);
                                                             |     if (t8 < 0) {
    0x00408ae4 bgez t8, 0x408b54                             |         
    0x00408ae8 nop                                           |         
    0x00408aec lw t8, -0x7dcc(gp)                            |         t8 = sym.imp.__errno_location;
    0x00408af0 move t9, t8                                   |         t9 = t8;
    0x00408af4 jalr t9                                       |         t9 ();
    0x00408af8 nop                                           |         
    0x00408afc lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x00408b00 move t8, v0                                   |         t8 = v0;
    0x00408b04 lw t8, (t8)                                   |         t8 = *(t8);
    0x00408b08 move a0, t8                                   |         a0 = t8;
    0x00408b0c lw t8, -0x7efc(gp)                            |         t8 = sym.imp.strerror;
    0x00408b10 move t9, t8                                   |         t9 = t8;
    0x00408b14 jalr t9                                       |         t9 ();
    0x00408b18 nop                                           |         
    0x00408b1c lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x00408b20 move t8, v0                                   |         t8 = v0;
    0x00408b24 lw v0, -0x7fdc(gp)                            |         v0 = *((gp - 8183));
                                                             |         /* str.Open__s_fail:__s_n */
    0x00408b28 addiu a0, v0, 0x1cb4                          |         a0 = v0 + 0x1cb4;
    0x00408b2c lw a1, 0x1c(fp)                               |         a1 = *(arg_1ch);
    0x00408b30 move a2, t8                                   |         a2 = t8;
    0x00408b34 lw t8, -0x7f04(gp)                            |         t8 = sym.imp.printf;
    0x00408b38 move t9, t8                                   |         t9 = t8;
    0x00408b3c jalr t9                                       |         t9 ();
    0x00408b40 nop                                           |         
    0x00408b44 lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x00408b48 addiu t8, zero, -1                            |         t8 = -1;
    0x00408b4c b 0x408dc4                                    |         goto label_0;
    0x00408b50 nop                                           |         
                                                             |     }
    0x00408b54 lw a0, 0x20(fp)                               |     a0 = *(arg_20h);
    0x00408b58 addiu a1, zero, 2                             |     a1 = 2;
    0x00408b5c lw t8, -0x7ea4(gp)                            |     t8 = sym.imp.flock;
    0x00408b60 move t9, t8                                   |     t9 = t8;
    0x00408b64 jalr t9                                       |     t9 ();
    0x00408b68 nop                                           |     
    0x00408b6c lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00408b70 lw a0, 0x18(fp)                               |     a0 = *(arg_18h);
    0x00408b74 lw t8, -0x7e10(gp)                            |     t8 = sym.imp.strlen;
    0x00408b78 move t9, t8                                   |     t9 = t8;
    0x00408b7c jalr t9                                       |     t9 ();
    0x00408b80 nop                                           |     
    0x00408b84 lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00408b88 move t8, v0                                   |     t8 = v0;
    0x00408b8c addiu t8, t8, 1                               |     t8++;
    0x00408b90 move a0, t8                                   |     a0 = t8;
    0x00408b94 lw t8, -0x7df8(gp)                            |     t8 = sym.imp.malloc;
    0x00408b98 move t9, t8                                   |     t9 = t8;
    0x00408b9c jalr t9                                       |     t9 ();
    0x00408ba0 nop                                           |     
    0x00408ba4 lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00408ba8 move t8, v0                                   |     t8 = v0;
    0x00408bac sw t8, 0x24(fp)                               |     *(arg_24h) = t8;
    0x00408bb0 lw t8, 0x24(fp)                               |     t8 = *(arg_24h);
                                                             |     if (t8 == 0) {
    0x00408bb4 bnez t8, 0x408c20                             |         
    0x00408bb8 nop                                           |         
    0x00408bbc lw t8, -0x7dcc(gp)                            |         t8 = sym.imp.__errno_location;
    0x00408bc0 move t9, t8                                   |         t9 = t8;
    0x00408bc4 jalr t9                                       |         t9 ();
    0x00408bc8 nop                                           |         
    0x00408bcc lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x00408bd0 move t8, v0                                   |         t8 = v0;
    0x00408bd4 lw t8, (t8)                                   |         t8 = *(t8);
    0x00408bd8 move a0, t8                                   |         a0 = t8;
    0x00408bdc lw t8, -0x7efc(gp)                            |         t8 = sym.imp.strerror;
    0x00408be0 move t9, t8                                   |         t9 = t8;
    0x00408be4 jalr t9                                       |         t9 ();
    0x00408be8 nop                                           |         
    0x00408bec lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x00408bf0 move t8, v0                                   |         t8 = v0;
    0x00408bf4 lw v0, -0x7fdc(gp)                            |         v0 = *((gp - 8183));
                                                             |         /* str.Mallocation_fail:__s_n */
    0x00408bf8 addiu a0, v0, 0x1cc8                          |         a0 = v0 + 0x1cc8;
    0x00408bfc move a1, t8                                   |         a1 = t8;
    0x00408c00 lw t8, -0x7f04(gp)                            |         t8 = sym.imp.printf;
    0x00408c04 move t9, t8                                   |         t9 = t8;
    0x00408c08 jalr t9                                       |         t9 ();
    0x00408c0c nop                                           |         
    0x00408c10 lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x00408c14 addiu t8, zero, -1                            |         t8 = -1;
    0x00408c18 b 0x408dc4                                    |         goto label_0;
    0x00408c1c nop                                           |         
                                                             |     }
    0x00408c20 lw a0, 0x24(fp)                               |     a0 = *(arg_24h);
    0x00408c24 lw t8, -0x7fdc(gp)                            |     t8 = *((gp - 8183));
                                                             |     /* esilref: '&s
' */
    0x00408c28 addiu a1, t8, 0x1ce0                          |     a1 = t8 + 0x1ce0;
    0x00408c2c lw a2, 0x18(fp)                               |     a2 = *(arg_18h);
    0x00408c30 lw t8, -0x7eb8(gp)                            |     t8 = sym.imp.sprintf
    0x00408c34 move t9, t8                                   |     t9 = t8;
    0x00408c38 jalr t9                                       |     t9 ();
    0x00408c3c nop                                           |     
    0x00408c40 lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00408c44 lw a0, 0x18(fp)                               |     a0 = *(arg_18h);
    0x00408c48 lw t8, -0x7e10(gp)                            |     t8 = sym.imp.strlen;
    0x00408c4c move t9, t8                                   |     t9 = t8;
    0x00408c50 jalr t9                                       |     t9 ();
    0x00408c54 nop                                           |     
    0x00408c58 lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00408c5c move t8, v0                                   |     t8 = v0;
    0x00408c60 addiu t8, t8, 1                               |     t8++;
    0x00408c64 lw a0, 0x20(fp)                               |     a0 = *(arg_20h);
    0x00408c68 lw a1, 0x24(fp)                               |     a1 = *(arg_24h);
    0x00408c6c move a2, t8                                   |     a2 = t8;
    0x00408c70 lw t8, -0x7e6c(gp)                            |     t8 = sym.imp.write;
    0x00408c74 move t9, t8                                   |     t9 = t8;
    0x00408c78 jalr t9                                       |     t9 ();
    0x00408c7c nop                                           |     
    0x00408c80 lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00408c84 lw a0, 0x20(fp)                               |     a0 = *(arg_20h);
    0x00408c88 addiu a1, zero, 8                             |     a1 = 8;
    0x00408c8c lw t8, -0x7ea4(gp)                            |     t8 = sym.imp.flock;
    0x00408c90 move t9, t8                                   |     t9 = t8;
    0x00408c94 jalr t9                                       |     t9 ();
    0x00408c98 nop                                           |     
    0x00408c9c lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00408ca0 lw a0, 0x20(fp)                               |     a0 = *(arg_20h);
    0x00408ca4 lw t8, -0x7e7c(gp)                            |     t8 = sym.imp.close;
    0x00408ca8 move t9, t8                                   |     t9 = t8;
    0x00408cac jalr t9                                       |     t9 ();
    0x00408cb0 nop                                           |     
    0x00408cb4 lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00408cb8 lw a0, 0x24(fp)                               |     a0 = *(arg_24h);
    0x00408cbc lw t8, -0x7ef0(gp)                            |     t8 = sym.imp.free;
    0x00408cc0 move t9, t8                                   |     t9 = t8;
    0x00408cc4 jalr t9                                       |     t9 ();
    0x00408cc8 nop                                           |     
    0x00408ccc lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00408cd0 lw t8, -0x7f98(gp)                            |     t8 = *((gp - 8166));
    0x00408cd4 lw v0, 0x4a94(t8)                             |     v0 = *((t8 + 4773));
    0x00408cd8 addiu t8, zero, 1                             |     t8 = 1;
                                                             |     if (v0 == t8) {
    0x00408cdc bne v0, t8, 0x408dc0                          |         
    0x00408ce0 nop                                           |         
    0x00408ce4 lw t8, -0x7fdc(gp)                            |         t8 = *((gp - 8183));
                                                             |         /* str._dev_console */
    0x00408ce8 addiu a0, t8, 0x1ce4                          |         a0 = t8 + 0x1ce4;
    0x00408cec lw t8, -0x7fdc(gp)                            |         t8 = *((gp - 8183));
                                                             |         /* esilref: 'w+' */
    0x00408cf0 addiu a1, t8, 0x1cf4                          |         a1 = t8 + 0x1cf4;
    0x00408cf4 lw t8, -0x7e08(gp)                            |         t8 = sym.imp.fopen64;
    0x00408cf8 move t9, t8                                   |         t9 = t8;
    0x00408cfc jalr t9                                       |         t9 ();
    0x00408d00 nop                                           |         
    0x00408d04 lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x00408d08 move t8, v0                                   |         t8 = v0;
    0x00408d0c sw t8, 0x28(fp)                               |         *(arg_28h) = t8;
    0x00408d10 lw t8, 0x28(fp)                               |         t8 = *(arg_28h);
                                                             |         if (t8 == 0) {
    0x00408d14 bnez t8, 0x408d80                             |             
    0x00408d18 nop                                           |             
    0x00408d1c lw t8, -0x7dcc(gp)                            |             t8 = sym.imp.__errno_location;
    0x00408d20 move t9, t8                                   |             t9 = t8;
    0x00408d24 jalr t9                                       |             t9 ();
    0x00408d28 nop                                           |             
    0x00408d2c lw gp, 0x10(fp)                               |             gp = *(arg_10h);
    0x00408d30 move t8, v0                                   |             t8 = v0;
    0x00408d34 lw t8, (t8)                                   |             t8 = *(t8);
    0x00408d38 move a0, t8                                   |             a0 = t8;
    0x00408d3c lw t8, -0x7efc(gp)                            |             t8 = sym.imp.strerror;
    0x00408d40 move t9, t8                                   |             t9 = t8;
    0x00408d44 jalr t9                                       |             t9 ();
    0x00408d48 nop                                           |             
    0x00408d4c lw gp, 0x10(fp)                               |             gp = *(arg_10h);
    0x00408d50 move t8, v0                                   |             t8 = v0;
    0x00408d54 lw v0, -0x7fdc(gp)                            |             v0 = *((gp - 8183));
                                                             |             /* str.Open__dev_console_fail:__s_n */
    0x00408d58 addiu a0, v0, 0x1cf8                          |             a0 = v0 + 0x1cf8;
    0x00408d5c move a1, t8                                   |             a1 = t8;
    0x00408d60 lw t8, -0x7f04(gp)                            |             t8 = sym.imp.printf;
    0x00408d64 move t9, t8                                   |             t9 = t8;
    0x00408d68 jalr t9                                       |             t9 ();
    0x00408d6c nop                                           |             
    0x00408d70 lw gp, 0x10(fp)                               |             gp = *(arg_10h);
    0x00408d74 addiu t8, zero, -1                            |             t8 = -1;
    0x00408d78 b 0x408dc4                                    |             goto label_0;
    0x00408d7c nop                                           |             
                                                             |         }
    0x00408d80 lw a0, 0x28(fp)                               |         a0 = *(arg_28h);
    0x00408d84 lw t8, -0x7fdc(gp)                            |         t8 = *((gp - 8183));
                                                             |         /* str.e_1_31m_echo__s_in__s_e_0m_n */
    0x00408d88 addiu a1, t8, 0x1d14                          |         a1 = t8 + 0x1d14;
    0x00408d8c lw a2, 0x18(fp)                               |         a2 = *(arg_18h);
    0x00408d90 lw a3, 0x1c(fp)                               |         a3 = *(arg_1ch);
    0x00408d94 lw t8, -0x7eac(gp)                            |         t8 = sym.imp.fprintf;
    0x00408d98 move t9, t8                                   |         t9 = t8;
    0x00408d9c jalr t9                                       |         t9 ();
    0x00408da0 nop                                           |         
    0x00408da4 lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x00408da8 lw a0, 0x28(fp)                               |         a0 = *(arg_28h);
    0x00408dac lw t8, -0x7e54(gp)                            |         t8 = sym.imp.fclose;
    0x00408db0 move t9, t8                                   |         t9 = t8;
    0x00408db4 jalr t9                                       |         t9 ();
    0x00408db8 nop                                           |         
    0x00408dbc lw gp, 0x10(fp)                               |         gp = *(arg_10h);
                                                             |     }
    0x00408dc0 move t8, zero                                 |     t8 = 0;
                                                             | label_0:
    0x00408dc4 move v0, t8                                   |     v0 = t8;
    0x00408dc8 lw t8, -0x7dd0(gp)                            |     t8 = *((gp - 8052));
    0x00408dcc lw v1, 0x2c(fp)                               |     v1 = *(arg_2ch);
    0x00408dd0 lw t8, (t8)                                   |     t8 = *(t8);
                                                             |     if (v1 != t8) {
    0x00408dd4 beq v1, t8, 0x408dec                          |         
    0x00408dd8 nop                                           |         
    0x00408ddc lw t8, -0x7e5c(gp)                            |         t8 = sym.imp.__stack_chk_fail;
    0x00408de0 move t9, t8                                   |         t9 = t8;
    0x00408de4 jalr t9                                       |         t9 ();
    0x00408de8 nop                                           |         
                                                             |     }
    0x00408dec move sp, fp                                   |     
    0x00408df0 lw ra, 0x34(sp)                               |     ra = *(var_34h);
    0x00408df4 lw fp, 0x30(sp)                               |     fp = *(var_30h);
    0x00408df8 addiu sp, sp, 0x38                            |     
    0x00408dfc jr ra                                         |     return v1;
    0x00408e00 nop                                           |     
                                                             | }

[*] Function sprintf used 2 times network_setup