[*] Binary protection state of ifplugd_event

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


[*] Function system tear down of ifplugd_event

    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/ifplugd_event @ 0x401a80 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) main ()                          | int32_t main () {
    0x00401a80 lui gp, 2                     |     
    0x00401a84 addiu gp, gp, -0x6a60         |     
    0x00401a88 addu gp, gp, t9               |     gp += t9;
    0x00401a8c addiu sp, sp, -0x30           |     
    0x00401a90 sw ra, 0x2c(sp)               |     *(var_2ch) = ra;
    0x00401a94 sw fp, 0x28(sp)               |     *(var_28h) = fp;
    0x00401a98 move fp, sp                   |     fp = sp;
    0x00401a9c sw gp, 0x10(sp)               |     *(var_10h) = gp;
    0x00401aa0 sw a0, 0x1c(fp)               |     *(arg_1ch) = a0;
    0x00401aa4 sw a1, 0x18(fp)               |     *(arg_18h) = a1;
    0x00401aa8 lw t8, -0x7f00(gp)            |     t8 = *((gp - 8128));
    0x00401aac lw t8, (t8)                   |     t8 = *(t8);
    0x00401ab0 sw t8, 0x24(fp)               |     *(arg_24h) = t8;
    0x00401ab4 lw t8, -0x7fcc(gp)            |     t8 = *((gp - 8179));
    0x00401ab8 sw zero, 0x31c8(t8)           |     *((t8 + 12744)) = 0;
    0x00401abc lw t8, -0x7fcc(gp)            |     t8 = *((gp - 8179));
    0x00401ac0 sw zero, 0x31cc(t8)           |     *((t8 + 12748)) = 0;
    0x00401ac4 move a0, zero                 |     a0 = 0;
    0x00401ac8 move a1, zero                 |     a1 = 0;
    0x00401acc lw t8, -0x7f08(gp)            |     t8 = sym.imp.daemon;
    0x00401ad0 move t9, t8                   |     t9 = t8;
    0x00401ad4 jalr t9                       |     t9 ();
    0x00401ad8 nop                           |     
    0x00401adc lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00401ae0 move t8, v0                   |     t8 = v0;
    0x00401ae4 srl t8, t8, 0x1f              |     t8 >>= 0x1f;
    0x00401ae8 andi t8, t8, 0xff             |     t8 &= 0xff;
                                             |     if (t8 != 0) {
    0x00401aec beqz t8, 0x401b1c             |         
    0x00401af0 nop                           |         
    0x00401af4 lw t8, -0x7fdc(gp)            |         t8 = *(gp);
                                             |         /* str.Initialize_daemon_fail */
    0x00401af8 addiu a0, t8, 0x2664          |         a0 = t8 + 0x2664;
    0x00401afc lw t8, -0x7f68(gp)            |         t8 = sym.imp.perror;
    0x00401b00 move t9, t8                   |         t9 = t8;
    0x00401b04 jalr t9                       |         t9 ();
    0x00401b08 nop                           |         
    0x00401b0c lw gp, 0x10(fp)               |         gp = *(arg_10h);
    0x00401b10 addiu t8, zero, 1             |         t8 = 1;
    0x00401b14 b 0x401cf0                    |         goto label_1;
    0x00401b18 nop                           |         
                                             |     }
    0x00401b1c addiu a0, zero, 0x10          |     a0 = 0x10;
    0x00401b20 lw a1, -0x7fc0(gp)            |     a1 = sym.Sighandler_int_;
    0x00401b24 lw t8, -0x7f90(gp)            |     t8 = sym.imp.signal;
    0x00401b28 move t9, t8                   |     t9 = t8;
    0x00401b2c jalr t9                       |     t9 ();
    0x00401b30 nop                           |     
    0x00401b34 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00401b38 addiu a0, zero, 0x11          |     a0 = 0x11;
    0x00401b3c lw a1, -0x7fc0(gp)            |     a1 = sym.Sighandler_int_;
    0x00401b40 lw t8, -0x7f90(gp)            |     t8 = sym.imp.signal;
    0x00401b44 move t9, t8                   |     t9 = t8;
    0x00401b48 jalr t9                       |     t9 ();
    0x00401b4c nop                           |     
    0x00401b50 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00401b54 lw a0, -0x7fc8(gp)            |     a0 = *(gp);
    0x00401b58 addiu a1, zero, 0x50          |     a1 = 0x50;
    0x00401b5c lw t8, -0x7f6c(gp)            |     t8 = sym.imp.bzero;
    0x00401b60 move t9, t8                   |     t9 = t8;
    0x00401b64 jalr t9                       |     t9 ();
    0x00401b68 nop                           |     
    0x00401b6c lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00401b70 lw t8, -0x7fc8(gp)            |     t8 = *(gp);
    0x00401b74 lw v0, -0x7fdc(gp)            |     v0 = *(gp);
    0x00401b78 lw a2, 0x267c(v0)             |     a2 = *((v0 + 2463));
                                             |     /* str._var_tmp_watchdog */
    0x00401b7c addiu v1, v0, 0x267c          |     v1 = v0 + 0x267c;
    0x00401b80 lw a1, 4(v1)                  |     a1 = *((v1 + 1));
                                             |     /* str._var_tmp_watchdog */
    0x00401b84 addiu v1, v0, 0x267c          |     v1 = v0 + 0x267c;
    0x00401b88 lw a0, 8(v1)                  |     a0 = *((v1 + 2));
                                             |     /* str._var_tmp_watchdog */
    0x00401b8c addiu v1, v0, 0x267c          |     v1 = v0 + 0x267c;
    0x00401b90 lw v1, 0xc(v1)                |     v1 = *((v1 + 3));
    0x00401b94 sw a2, (t8)                   |     *(t8) = a2;
    0x00401b98 sw a1, 4(t8)                  |     *((t8 + 4)) = a1;
    0x00401b9c sw a0, 8(t8)                  |     *((t8 + 8)) = a0;
    0x00401ba0 sw v1, 0xc(t8)                |     *((t8 + 12)) = v1;
                                             |     /* str._var_tmp_watchdog */
    0x00401ba4 addiu v0, v0, 0x267c          |     v0 += 0x267c;
    0x00401ba8 lhu v0, 0x10(v0)              |     v0 = *((v0 + 8));
    0x00401bac sh v0, 0x10(t8)               |     *((t8 + 16)) = v0;
    0x00401bb0 lw t8, -0x7fdc(gp)            |     t8 = *(gp);
                                             |     /* str._tmp_ifplugd_event.pid */
    0x00401bb4 addiu a0, t8, 0x2690          |     a0 = t8 + 0x2690;
    0x00401bb8 lw t8, -0x7fbc(gp)            |     t8 = sym.create_pidfile_char_const_;
    0x00401bbc move t9, t8                   |     t9 = t8;
    0x00401bc0 jalr t9                       |     t9 ();
    0x00401bc4 nop                           |     
    0x00401bc8 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00401bcc move t8, v0                   |     t8 = v0;
    0x00401bd0 srl t8, t8, 0x1f              |     t8 >>= 0x1f;
    0x00401bd4 andi t8, t8, 0xff             |     t8 &= 0xff;
                                             |     if (t8 == 0) {
    0x00401bd8 beqz t8, 0x401bec             |         goto label_0;
                                             |     }
    0x00401bdc nop                           |     
    0x00401be0 addiu t8, zero, -1            |     t8 = -1;
    0x00401be4 b 0x401cf0                    |     goto label_1;
    0x00401be8 nop                           |     
                                             |     do {
                                             | label_0:
    0x00401bec lw t8, -0x7fcc(gp)            |         t8 = *((gp - 8179));
    0x00401bf0 lw v0, 0x31cc(t8)             |         v0 = *((t8 + 3187));
    0x00401bf4 addiu t8, zero, 1             |         t8 = 1;
                                             |         if (v0 != t8) {
    0x00401bf8 bne v0, t8, 0x401cd0          |             goto label_2;
                                             |         }
    0x00401bfc nop                           |         
    0x00401c00 lw t8, -0x7fdc(gp)            |         t8 = *(gp);
                                             |         /* str._tmp_network_setup.pid */
    0x00401c04 addiu a0, t8, 0x26a8          |         a0 = t8 + 0x26a8;
    0x00401c08 lw t8, -0x7fb8(gp)            |         t8 = sym.ps_exist_char_const_;
    0x00401c0c move t9, t8                   |         t9 = t8;
    0x00401c10 jalr t9                       |         t9 ();
    0x00401c14 nop                           |         
    0x00401c18 lw gp, 0x10(fp)               |         gp = *(arg_10h);
    0x00401c1c move t8, v0                   |         t8 = v0;
    0x00401c20 sltu t8, zero, t8             |         t8 = (0 < t8) ? 1 : 0;
    0x00401c24 andi t8, t8, 0xff             |         t8 &= 0xff;
                                             |         if (t8 == 0) {
    0x00401c28 beqz t8, 0x401c54             |             goto label_3;
                                             |         }
    0x00401c2c nop                           |         
    0x00401c30 addiu a0, zero, 1             |         a0 = 1;
    0x00401c34 lw t8, -0x7f10(gp)            |         t8 = sym.imp.sleep;
    0x00401c38 move t9, t8                   |         t9 = t8;
    0x00401c3c jalr t9                       |         t9 ();
    0x00401c40 nop                           |         
    0x00401c44 lw gp, 0x10(fp)               |         gp = *(arg_10h);
    0x00401c48 nop                           |         
    0x00401c4c b 0x401bec                    |         
                                             |     } while (1);
    0x00401c50 nop                           |     
                                             | label_3:
    0x00401c54 lw t8, -0x7fcc(gp)            |     t8 = *((gp - 8179));
    0x00401c58 sw zero, 0x31cc(t8)           |     *((t8 + 12748)) = 0;
    0x00401c5c lw a0, -0x7fd0(gp)            |     a0 = *(gp);
    0x00401c60 lw t8, -0x7fdc(gp)            |     t8 = *(gp);
                                             |     /* str._s__d__Execute_network_setup_n */
    0x00401c64 addiu a1, t8, 0x26c0          |     a1 = t8 + 0x26c0;
    0x00401c68 lw t8, -0x7fdc(gp)            |     t8 = *(gp);
                                             |     /* str.ifplugd_event.c */
    0x00401c6c addiu a2, t8, 0x2640          |     a2 = t8 + 0x2640;
    0x00401c70 addiu a3, zero, 0x8a          |     a3 = 0x8a;
    0x00401c74 lw t8, -0x7f3c(gp)            |     t8 = *(gp);
    0x00401c78 move t9, t8                   |     t9 = t8;
    0x00401c7c jalr t9                       |     t9 ();
    0x00401c80 nop                           |     
    0x00401c84 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00401c88 lw t8, -0x7fdc(gp)            |     t8 = *(gp);
                                             |     /* str.network_setup */
    0x00401c8c addiu a0, t8, 0x26e0          |     a0 = t8 + 0x26e0;
    0x00401c90 lw t8, -0x7f0c(gp)            |     t8 = sym.imp.system
    0x00401c94 move t9, t8                   |     t9 = t8;
    0x00401c98 jalr t9                       |     t9 ();
    0x00401c9c nop                           |     
    0x00401ca0 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00401ca4 lw a0, -0x7fd0(gp)            |     a0 = *(gp);
    0x00401ca8 lw t8, -0x7fdc(gp)            |     t8 = *(gp);
                                             |     /* str._s__d__network_setup_finished_n */
    0x00401cac addiu a1, t8, 0x26f0          |     a1 = t8 + 0x26f0;
    0x00401cb0 lw t8, -0x7fdc(gp)            |     t8 = *(gp);
                                             |     /* str.ifplugd_event.c */
    0x00401cb4 addiu a2, t8, 0x2640          |     a2 = t8 + 0x2640;
    0x00401cb8 addiu a3, zero, 0x8c          |     a3 = 0x8c;
    0x00401cbc lw t8, -0x7f3c(gp)            |     t8 = *(gp);
    0x00401cc0 move t9, t8                   |     t9 = t8;
    0x00401cc4 jalr t9                       |     t9 ();
    0x00401cc8 nop                           |     
    0x00401ccc lw gp, 0x10(fp)               |     gp = *(arg_10h);
                                             | label_2:
    0x00401cd0 addiu a0, zero, 1             |     a0 = 1;
    0x00401cd4 lw t8, -0x7f10(gp)            |     t8 = sym.imp.sleep;
    0x00401cd8 move t9, t8                   |     t9 = t8;
    0x00401cdc jalr t9                       |     t9 ();
    0x00401ce0 nop                           |     
    0x00401ce4 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00401ce8 b 0x401bec                    |     goto label_0;
    0x00401cec nop                           |     
                                             | label_1:
    0x00401cf0 move v0, t8                   |     v0 = t8;
    0x00401cf4 lw t8, -0x7f00(gp)            |     t8 = *((gp - 8128));
    0x00401cf8 lw v1, 0x24(fp)               |     v1 = *(arg_24h);
    0x00401cfc lw t8, (t8)                   |     t8 = *(t8);
                                             |     if (v1 != t8) {
    0x00401d00 beq v1, t8, 0x401d18          |         
    0x00401d04 nop                           |         
    0x00401d08 lw t8, -0x7f54(gp)            |         t8 = sym.imp.__stack_chk_fail;
    0x00401d0c move t9, t8                   |         t9 = t8;
    0x00401d10 jalr t9                       |         t9 ();
    0x00401d14 nop                           |         
                                             |     }
    0x00401d18 move sp, fp                   |     
    0x00401d1c lw ra, 0x2c(sp)               |     ra = *(var_2ch);
    0x00401d20 lw fp, 0x28(sp)               |     fp = *(var_28h);
    0x00401d24 addiu sp, sp, 0x30            |     
    0x00401d28 jr ra                         |     return v1;
    0x00401d2c nop                           |     
                                             | }

[*] Function system used 2 times ifplugd_event