[*] Binary protection state of param_upgrader

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


[*] Function printf tear down of param_upgrader

    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/param_upgrader @ 0x3510 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) fcn.00003510 ()              | void fcn_00003510 () {
    0x00003510 lui gp, 2                 |     
    0x00003514 addiu gp, gp, -0x3c90     |     
    0x00003518 addu gp, gp, t9           |     gp += t9;
    0x0000351c addiu sp, sp, -0x30       |     
    0x00003520 lw a3, 4(a1)              |     a3 = *((a1 + 1));
    0x00003524 sw s1, 0x28(sp)           |     *(var_28h) = s1;
    0x00003528 move s1, a0               |     s1 = a0;
    0x0000352c lw a0, -0x7fc0(gp)        |     a0 = *((gp - 8176));
    0x00003530 lw a2, 8(a1)              |     a2 = *((a1 + 2));
    0x00003534 lw t9, -0x7e8c(gp)        |     t9 = sym.imp.g_strdup_printf
    0x00003538 lw a1, (a1)               |     a1 = *(a1);
    0x0000353c sw ra, 0x2c(sp)           |     *(var_2ch) = ra;
    0x00003540 sw s0, 0x24(sp)           |     *(var_24h) = s0;
    0x00003544 sw gp, 0x10(sp)           |     *(var_10h) = gp;
    0x00003548 addiu a0, a0, 0x6638      |     a0 += str._s:_s:_s;
    0x0000354c jalr t9                   |     t9 ();
    0x00003550 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x00003554 move a1, v0               |     a1 = v0;
    0x00003558 move a0, s1               |     a0 = s1;
    0x0000355c lw t9, -0x7e54(gp)        |     t9 = sym.imp.g_hash_table_lookup;
    0x00003560 move s0, v0               |     s0 = v0;
    0x00003564 jalr t9                   |     t9 ();
    0x00003568 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x0000356c sw v0, 0x1c(sp)           |     *(var_1ch) = v0;
    0x00003570 lw t9, -0x7e20(gp)        |     t9 = *((gp - 8072));
    0x00003574 move a0, s0               |     a0 = s0;
    0x00003578 jalr t9                   |     t9 ();
    0x0000357c lw ra, 0x2c(sp)           |     ra = *(var_2ch);
    0x00003580 lw v0, 0x1c(sp)           |     v0 = *(var_1ch);
    0x00003584 lw s1, 0x28(sp)           |     s1 = *(var_28h);
    0x00003588 lw s0, 0x24(sp)           |     s0 = *(var_24h);
    0x0000358c addiu sp, sp, 0x30        |     
    0x00003590 jr ra                     |     return v0;
                                         | }
    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/param_upgrader @ 0x4188 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) sym.dbus_check_if_running ()     | void dbus_check_if_running () {
    0x00004188 lui gp, 2                     |     
    0x0000418c addiu gp, gp, -0x4908         |     
    0x00004190 addu gp, gp, t9               |     gp += t9;
    0x00004194 addiu sp, sp, -0x38           |     
    0x00004198 lw t9, -0x7e8c(gp)            |     t9 = sym.imp.g_strdup_printf
    0x0000419c sw s2, 0x30(sp)               |     *(var_30h) = s2;
    0x000041a0 move s2, a0                   |     s2 = a0;
    0x000041a4 lw a0, -0x7fc0(gp)            |     a0 = *((gp - 8176));
    0x000041a8 lw a3, 4(a1)                  |     a3 = *((a1 + 1));
    0x000041ac lw a2, 8(a1)                  |     a2 = *((a1 + 2));
    0x000041b0 sw s0, 0x28(sp)               |     *(var_28h) = s0;
    0x000041b4 move s0, a1                   |     s0 = a1;
    0x000041b8 lw a1, (a1)                   |     a1 = *(a1);
    0x000041bc sw gp, 0x20(sp)               |     *(var_20h) = gp;
    0x000041c0 sw ra, 0x34(sp)               |     *(var_34h) = ra;
    0x000041c4 sw s1, 0x2c(sp)               |     *(var_2ch) = s1;
    0x000041c8 addiu a0, a0, 0x6638          |     a0 += str._s:_s:_s;
    0x000041cc jalr t9                       |     t9 ();
    0x000041d0 lw gp, 0x20(sp)               |     gp = *(var_20h);
    0x000041d4 move a1, v0                   |     a1 = v0;
    0x000041d8 move a0, s2                   |     a0 = s2;
    0x000041dc lw t9, -0x7e54(gp)            |     t9 = sym.imp.g_hash_table_lookup;
    0x000041e0 move s1, v0                   |     s1 = v0;
    0x000041e4 jalr t9                       |     t9 ();
    0x000041e8 lw gp, 0x20(sp)               |     gp = *(var_20h);
                                             |     if (v0 == 0) {
    0x000041ec beqz v0, 0x423c               |         goto label_0;
                                             |     }
    0x000041f0 lw t9, -0x7e30(gp)            |     t9 = sym.imp.g_dbus_proxy_get_name_owner;
    0x000041f4 move a0, v0                   |     a0 = v0;
    0x000041f8 jalr t9                       |     t9 ();
    0x000041fc lw gp, 0x20(sp)               |     gp = *(var_20h);
    0x00004200 move a0, v0                   |     a0 = v0;
    0x00004204 lw t9, -0x7e20(gp)            |     t9 = *((gp - 8072));
    0x00004208 sltu s0, zero, v0             |     s0 = (0 < v0) ? 1 : 0;
    0x0000420c jalr t9                       |     t9 ();
    0x00004210 lw gp, 0x20(sp)               |     gp = *(var_20h);
                                             |     do {
    0x00004214 lw t9, -0x7e20(gp)            |         t9 = *((gp - 8072));
    0x00004218 move a0, s1                   |         a0 = s1;
    0x0000421c jalr t9                       |         t9 ();
    0x00004220 lw ra, 0x34(sp)               |         ra = *(var_34h);
    0x00004224 move v0, s0                   |         v0 = s0;
    0x00004228 lw s2, 0x30(sp)               |         s2 = *(var_30h);
    0x0000422c lw s1, 0x2c(sp)               |         s1 = *(var_2ch);
    0x00004230 lw s0, 0x28(sp)               |         s0 = *(var_28h);
    0x00004234 addiu sp, sp, 0x38            |         
    0x00004238 jr ra                         |         return v0;
                                             | label_0:
    0x0000423c lw a0, 8(s0)                  |         a0 = *((s0 + 2));
    0x00004240 lw v1, 4(s0)                  |         v1 = *((s0 + 1));
    0x00004244 lw v0, (s0)                   |         v0 = *(s0);
    0x00004248 lw a3, -0x7fc0(gp)            |         a3 = *((gp - 8176));
    0x0000424c lw a2, -0x7fc0(gp)            |         a2 = *((gp - 8176));
    0x00004250 lw t9, -0x7ec8(gp)            |         t9 = sym.imp.g_log;
    0x00004254 sw a0, 0x18(sp)               |         *(var_18h) = a0;
    0x00004258 sw v1, 0x14(sp)               |         *(var_14h) = v1;
    0x0000425c sw v0, 0x10(sp)               |         *(var_10h) = v0;
    0x00004260 addiu a3, a3, 0x65b4          |         a3 += 0x65b4;
    0x00004264 addiu a2, a2, 0x676c          |         a2 += str._sFailed_hashtable_lookup_for__s:_s:_s;
    0x00004268 addiu a1, zero, 0x10          |         a1 = 0x10;
    0x0000426c move a0, zero                 |         a0 = 0;
    0x00004270 jalr t9                       |         t9 ();
    0x00004274 move s0, zero                 |         s0 = 0;
    0x00004278 lw gp, 0x20(sp)               |         gp = *(var_20h);
    0x0000427c b 0x4214                      |         
                                             |     } while (1);
                                             | }
    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/param_upgrader @ 0x38dc */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) sym.dbus_create_proxy ()     | void dbus_create_proxy () {
    0x000038dc lui gp, 2                 |     
    0x000038e0 addiu gp, gp, -0x405c     |     
    0x000038e4 addu gp, gp, t9           |     gp += t9;
    0x000038e8 addiu sp, sp, -0x48       |     
    0x000038ec lw t9, -0x7e8c(gp)        |     t9 = sym.imp.g_strdup_printf
    0x000038f0 sw s0, 0x2c(sp)           |     *(var_2ch) = s0;
    0x000038f4 move s0, a1               |     s0 = a1;
    0x000038f8 sw s3, 0x38(sp)           |     *(var_38h) = s3;
    0x000038fc move s3, a0               |     s3 = a0;
    0x00003900 lw a0, -0x7fc0(gp)        |     a0 = *((gp - 8176));
    0x00003904 sw s5, 0x40(sp)           |     *(var_40h) = s5;
    0x00003908 sw s4, 0x3c(sp)           |     *(var_3ch) = s4;
    0x0000390c lw a1, (a1)               |     a1 = *(a1);
    0x00003910 move s4, a2               |     s4 = a2;
    0x00003914 move s5, a3               |     s5 = a3;
    0x00003918 lw a2, 8(s0)              |     a2 = *((s0 + 2));
    0x0000391c lw a3, 4(s0)              |     a3 = *((s0 + 1));
    0x00003920 sw gp, 0x20(sp)           |     *(var_20h) = gp;
    0x00003924 sw ra, 0x44(sp)           |     *(var_44h) = ra;
    0x00003928 sw s2, 0x34(sp)           |     *(var_34h) = s2;
    0x0000392c sw s1, 0x30(sp)           |     *(var_30h) = s1;
    0x00003930 addiu a0, a0, 0x6638      |     a0 += str._s:_s:_s;
    0x00003934 jalr t9                   |     t9 ();
    0x00003938 lw gp, 0x20(sp)           |     gp = *(var_20h);
    0x0000393c move a1, v0               |     a1 = v0;
    0x00003940 move a0, s3               |     a0 = s3;
    0x00003944 lw t9, -0x7e54(gp)        |     t9 = sym.imp.g_hash_table_lookup;
    0x00003948 move s2, v0               |     s2 = v0;
    0x0000394c jalr t9                   |     t9 ();
    0x00003950 move s1, v0               |     s1 = v0;
    0x00003954 lw gp, 0x20(sp)           |     gp = *(var_20h);
    0x00003958 beqz v0, 0x3990           |     
                                         |     while (v1 != 0) {
    0x0000395c lw t9, -0x7e20(gp)        |         t9 = *((gp - 8072));
    0x00003960 move a0, s2               |         a0 = s2;
    0x00003964 jalr t9                   |         t9 ();
    0x00003968 lw ra, 0x44(sp)           |         ra = *(var_44h);
    0x0000396c move v0, s1               |         v0 = s1;
    0x00003970 lw s5, 0x40(sp)           |         s5 = *(var_40h);
    0x00003974 lw s4, 0x3c(sp)           |         s4 = *(var_3ch);
    0x00003978 lw s3, 0x38(sp)           |         s3 = *(var_38h);
    0x0000397c lw s2, 0x34(sp)           |         s2 = *(var_34h);
    0x00003980 lw s1, 0x30(sp)           |         s1 = *(var_30h);
    0x00003984 lw s0, 0x2c(sp)           |         s0 = *(var_2ch);
    0x00003988 addiu sp, sp, 0x48        |         
    0x0000398c jr ra                     |         return v0;
    0x00003990 lw v1, 8(s0)              |         v1 = *((s0 + 2));
    0x00003994 lw v0, 4(s0)              |         v0 = *((s0 + 1));
    0x00003998 lw a3, (s0)               |         a3 = *(s0);
    0x0000399c lw t9, -0x7f08(gp)        |         t9 = sym.imp.g_dbus_proxy_new_for_bus_sync;
    0x000039a0 sw v1, 0x14(sp)           |         *(var_14h) = v1;
    0x000039a4 sw s4, 0x1c(sp)           |         *(var_1ch) = s4;
    0x000039a8 sw zero, 0x18(sp)         |         *(var_18h) = 0;
    0x000039ac sw v0, 0x10(sp)           |         *(var_10h) = v0;
    0x000039b0 move a2, zero             |         a2 = 0;
    0x000039b4 addiu a1, zero, 3         |         a1 = 3;
    0x000039b8 addiu a0, zero, 1         |         a0 = 1;
    0x000039bc jalr t9                   |         t9 ();
    0x000039c0 lw v1, (s4)               |         v1 = *(s4);
    0x000039c4 lw gp, 0x20(sp)           |         gp = *(var_20h);
    0x000039c8 move s0, v0               |         s0 = v0;
    0x000039cc bnez v1, 0x395c           |         
                                         |     }
    0x000039d0 lw a1, -0x7fc0(gp)        |     a1 = *((gp - 8176));
    0x000039d4 lw t9, -0x7efc(gp)        |     t9 = sym.imp.g_signal_connect_data;
    0x000039d8 lw a3, 0x58(sp)           |     a3 = *(arg_58h);
    0x000039dc move a2, s5               |     a2 = s5;
    0x000039e0 addiu a1, a1, 0x66ac      |     a1 += str.notify::g_name_owner;
    0x000039e4 move a0, v0               |     a0 = v0;
    0x000039e8 sw zero, 0x14(sp)         |     *(var_14h) = 0;
    0x000039ec sw zero, 0x10(sp)         |     *(var_10h) = 0;
    0x000039f0 jalr t9                   |     t9 ();
    0x000039f4 lw gp, 0x20(sp)           |     gp = *(var_20h);
    0x000039f8 move a2, s0               |     a2 = s0;
    0x000039fc move a1, s2               |     a1 = s2;
    0x00003a00 lw t9, -0x7ec4(gp)        |     t9 = sym.imp.g_hash_table_insert;
    0x00003a04 move a0, s3               |     a0 = s3;
    0x00003a08 jalr t9                   |     t9 ();
    0x00003a0c lw ra, 0x44(sp)           |     ra = *(var_44h);
    0x00003a10 move s1, s0               |     s1 = s0;
    0x00003a14 move v0, s1               |     v0 = s1;
    0x00003a18 lw s5, 0x40(sp)           |     s5 = *(var_40h);
    0x00003a1c lw s4, 0x3c(sp)           |     s4 = *(var_3ch);
    0x00003a20 lw s3, 0x38(sp)           |     s3 = *(var_38h);
    0x00003a24 lw s2, 0x34(sp)           |     s2 = *(var_34h);
    0x00003a28 lw s1, 0x30(sp)           |     s1 = *(var_30h);
    0x00003a2c lw s0, 0x2c(sp)           |     s0 = *(var_2ch);
    0x00003a30 addiu sp, sp, 0x48        |     
    0x00003a34 jr ra                     |     return v0;
                                         | }
    ; assembly                                           | /* r2dec pseudo code output */
                                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/param_upgrader @ 0x4fa0 */
                                                         | #include <stdint.h>
                                                         |  
    ; (fcn) sym.shellparser_get_param_from_line ()       | void shellparser_get_param_from_line () {
    0x00004fa0 lui gp, 2                                 |     
    0x00004fa4 addiu gp, gp, -0x5720                     |     
    0x00004fa8 addu gp, gp, t9                           |     gp += t9;
    0x00004fac addiu sp, sp, -0x50                       |     
    0x00004fb0 lw t9, -0x7e8c(gp)                        |     t9 = sym.imp.g_strdup_printf
    0x00004fb4 sw s2, 0x30(sp)                           |     *(var_30h) = s2;
    0x00004fb8 lw s2, -0x7e4c(gp)                        |     s2 = *((gp - 8083));
    0x00004fbc sw s7, 0x44(sp)                           |     *(var_44h) = s7;
    0x00004fc0 move s7, a0                               |     s7 = a0;
    0x00004fc4 lw v0, (s2)                               |     v0 = *(s2);
    0x00004fc8 lw a0, -0x7fc0(gp)                        |     a0 = *((gp - 8176));
    0x00004fcc sw gp, 0x10(sp)                           |     *(var_10h) = gp;
    0x00004fd0 sw ra, 0x4c(sp)                           |     *(var_4ch) = ra;
    0x00004fd4 sw s6, 0x40(sp)                           |     *(var_40h) = s6;
    0x00004fd8 sw s5, 0x3c(sp)                           |     *(var_3ch) = s5;
    0x00004fdc sw s4, 0x38(sp)                           |     *(var_38h) = s4;
    0x00004fe0 sw s3, 0x34(sp)                           |     *(var_34h) = s3;
    0x00004fe4 sw s1, 0x2c(sp)                           |     *(var_2ch) = s1;
    0x00004fe8 sw s0, 0x28(sp)                           |     *(var_28h) = s0;
    0x00004fec sw fp, 0x48(sp)                           |     *(var_48h) = fp;
    0x00004ff0 addiu a0, a0, 0x6d64                      |     a0 += str.s__s_________;
    0x00004ff4 sw zero, (a1)                             |     *(a1) = 0;
    0x00004ff8 sw v0, 0x24(sp)                           |     *(var_24h) = v0;
    0x00004ffc sw zero, (a2)                             |     *(a2) = 0;
    0x00005000 sw zero, 0x1c(sp)                         |     *(var_1ch) = 0;
    0x00005004 sw zero, 0x20(sp)                         |     *(var_20h) = 0;
    0x00005008 move s5, a1                               |     s5 = a1;
    0x0000500c move s4, a2                               |     s4 = a2;
    0x00005010 jalr t9                                   |     t9 ();
    0x00005014 lw gp, 0x10(sp)                           |     gp = *(var_10h);
    0x00005018 addiu s6, sp, 0x20                        |     s6 = sp + 0x20;
    0x0000501c move a3, s6                               |     a3 = s6;
    0x00005020 lw t9, -0x7e70(gp)                        |     t9 = sym.imp.g_regex_new;
    0x00005024 move a2, zero                             |     a2 = 0;
    0x00005028 move a1, zero                             |     a1 = 0;
    0x0000502c move a0, v0                               |     a0 = v0;
    0x00005030 move s1, v0                               |     s1 = v0;
    0x00005034 jalr t9                                   |     t9 ();
    0x00005038 lw v1, 0x20(sp)                           |     v1 = *(var_20h);
    0x0000503c lw gp, 0x10(sp)                           |     gp = *(var_10h);
    0x00005040 move s3, s1                               |     s3 = s1;
    0x00005044 move s0, v0                               |     s0 = v0;
    0x00005048 beqz v1, 0x50dc                           |     
                                                         |     while (v0 == 0) {
                                                         | label_0:
    0x0000504c lw t9, -0x7e20(gp)                        |         t9 = *((gp - 8072));
    0x00005050 move a0, s3                               |         a0 = s3;
    0x00005054 jalr t9                                   |         t9 ();
    0x00005058 lw gp, 0x10(sp)                           |         gp = *(var_10h);
                                                         |         if (s0 != 0) {
    0x0000505c beqz s0, 0x5070                           |             
    0x00005060 lw t9, -0x7e28(gp)                        |             t9 = sym.imp.g_regex_unref;
    0x00005064 move a0, s0                               |             a0 = s0;
    0x00005068 jalr t9                                   |             t9 ();
    0x0000506c lw gp, 0x10(sp)                           |             gp = *(var_10h);
                                                         |         }
    0x00005070 lw a0, 0x1c(sp)                           |         a0 = *(var_1ch);
    0x00005074 lw t9, -0x7e08(gp)                        |         t9 = sym.imp.g_match_info_free;
                                                         |         if (a0 != 0) {
    0x00005078 beqz a0, 0x5088                           |             
    0x0000507c jalr t9                                   |             t9 ();
    0x00005080 nop                                       |             
    0x00005084 lw gp, 0x10(sp)                           |             gp = *(var_10h);
                                                         |         }
    0x00005088 lw a0, 0x20(sp)                           |         a0 = *(var_20h);
    0x0000508c lw t9, -0x7f20(gp)                        |         t9 = sym.imp.g_error_free;
                                                         |         if (a0 != 0) {
    0x00005090 beqz a0, 0x50a0                           |             
    0x00005094 jalr t9                                   |             t9 ();
    0x00005098 nop                                       |             
    0x0000509c lw gp, 0x10(sp)                           |             gp = *(var_10h);
                                                         |         }
    0x000050a0 lw v1, 0x24(sp)                           |         v1 = *(var_24h);
    0x000050a4 lw v0, (s2)                               |         v0 = *(s2);
    0x000050a8 lw ra, 0x4c(sp)                           |         ra = *(var_4ch);
                                                         |         if (v1 != v0) {
    0x000050ac bne v1, v0, 0x51c4                        |             goto label_1;
                                                         |         }
    0x000050b0 lw fp, 0x48(sp)                           |         fp = *(var_48h);
    0x000050b4 lw s7, 0x44(sp)                           |         s7 = *(var_44h);
    0x000050b8 lw s6, 0x40(sp)                           |         s6 = *(var_40h);
    0x000050bc lw s5, 0x3c(sp)                           |         s5 = *(var_3ch);
    0x000050c0 lw s4, 0x38(sp)                           |         s4 = *(var_38h);
    0x000050c4 lw s3, 0x34(sp)                           |         s3 = *(var_34h);
    0x000050c8 lw s2, 0x30(sp)                           |         s2 = *(var_30h);
    0x000050cc lw s1, 0x2c(sp)                           |         s1 = *(var_2ch);
    0x000050d0 lw s0, 0x28(sp)                           |         s0 = *(var_28h);
    0x000050d4 addiu sp, sp, 0x50                        |         
    0x000050d8 jr ra                                     |         return v0;
    0x000050dc lw t9, -0x7e2c(gp)                        |         t9 = sym.imp.g_regex_match;
    0x000050e0 addiu fp, sp, 0x1c                        |         fp = sp + 0x1c;
    0x000050e4 move a3, fp                               |         a3 = fp;
    0x000050e8 move a2, zero                             |         a2 = 0;
    0x000050ec move a1, s7                               |         a1 = s7;
    0x000050f0 move a0, v0                               |         a0 = v0;
    0x000050f4 jalr t9                                   |         t9 ();
    0x000050f8 lw gp, 0x10(sp)                           |         gp = *(var_10h);
                                                         |         if (v0 != 0) {
    0x000050fc bnez v0, 0x5190                           |             goto label_2;
                                                         |         }
    0x00005100 lw t9, -0x7e20(gp)                        |         t9 = *((gp - 8072));
    0x00005104 move a0, s1                               |         a0 = s1;
    0x00005108 jalr t9                                   |         t9 ();
    0x0000510c lw gp, 0x10(sp)                           |         gp = *(var_10h);
    0x00005110 lw t9, -0x7e28(gp)                        |         t9 = sym.imp.g_regex_unref;
    0x00005114 move a0, s0                               |         a0 = s0;
    0x00005118 jalr t9                                   |         t9 ();
    0x0000511c lw a0, 0x1c(sp)                           |         a0 = *(var_1ch);
    0x00005120 lw gp, 0x10(sp)                           |         gp = *(var_10h);
                                                         |         if (a0 != 0) {
    0x00005124 beqz a0, 0x5138                           |             
    0x00005128 lw t9, -0x7e08(gp)                        |             t9 = sym.imp.g_match_info_free;
    0x0000512c jalr t9                                   |             t9 ();
    0x00005130 nop                                       |             
    0x00005134 lw gp, 0x10(sp)                           |             gp = *(var_10h);
                                                         |         }
    0x00005138 lw a0, -0x7fc0(gp)                        |         a0 = *((gp - 8176));
    0x0000513c lw t9, -0x7e8c(gp)                        |         t9 = sym.imp.g_strdup_printf
    0x00005140 addiu a0, a0, 0x6d7c                      |         a0 += str.s__s___S_;
    0x00005144 jalr t9                                   |         t9 ();
    0x00005148 lw gp, 0x10(sp)                           |         gp = *(var_10h);
    0x0000514c move a3, s6                               |         a3 = s6;
    0x00005150 move a2, zero                             |         a2 = 0;
    0x00005154 lw t9, -0x7e70(gp)                        |         t9 = sym.imp.g_regex_new;
    0x00005158 move a1, zero                             |         a1 = 0;
    0x0000515c move a0, v0                               |         a0 = v0;
    0x00005160 move s3, v0                               |         s3 = v0;
    0x00005164 jalr t9                                   |         t9 ();
    0x00005168 lw gp, 0x10(sp)                           |         gp = *(var_10h);
    0x0000516c move a3, fp                               |         a3 = fp;
    0x00005170 move a2, zero                             |         a2 = 0;
    0x00005174 lw t9, -0x7e2c(gp)                        |         t9 = sym.imp.g_regex_match;
    0x00005178 move a1, s7                               |         a1 = s7;
    0x0000517c move a0, v0                               |         a0 = v0;
    0x00005180 move s0, v0                               |         s0 = v0;
    0x00005184 jalr t9                                   |         t9 ();
    0x00005188 lw gp, 0x10(sp)                           |         gp = *(var_10h);
    0x0000518c beqz v0, 0x504c                           |         
                                                         |     }
                                                         | label_2:
    0x00005190 lw t9, -0x7e58(gp)                        |     t9 = sym.imp.g_match_info_fetch;
    0x00005194 lw a0, 0x1c(sp)                           |     a0 = *(var_1ch);
    0x00005198 addiu a1, zero, 1                         |     a1 = 1;
    0x0000519c jalr t9                                   |     t9 ();
    0x000051a0 lw gp, 0x10(sp)                           |     gp = *(var_10h);
    0x000051a4 lw a0, 0x1c(sp)                           |     a0 = *(var_1ch);
    0x000051a8 sw v0, (s5)                               |     *(s5) = v0;
    0x000051ac lw t9, -0x7e58(gp)                        |     t9 = sym.imp.g_match_info_fetch;
    0x000051b0 addiu a1, zero, 2                         |     a1 = 2;
    0x000051b4 jalr t9                                   |     t9 ();
    0x000051b8 lw gp, 0x10(sp)                           |     gp = *(var_10h);
    0x000051bc sw v0, (s4)                               |     *(s4) = v0;
    0x000051c0 b 0x504c                                  |     goto label_0;
                                                         | label_1:
    0x000051c4 lw t9, -0x7e5c(gp)                        |     t9 = sym.imp.__stack_chk_fail;
    0x000051c8 jalr t9                                   |     t9 ();
    0x000051cc nop                                       |     
                                                         | }
    ; assembly                                           | /* r2dec pseudo code output */
                                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/param_upgrader @ 0x5630 */
                                                         | #include <stdint.h>
                                                         |  
    ; (fcn) sym.std2parser_parse_param_from_line ()      | void std2parser_parse_param_from_line () {
    0x00005630 lui gp, 2                                 |     
    0x00005634 addiu gp, gp, -0x5db0                     |     
    0x00005638 addu gp, gp, t9                           |     gp += t9;
    0x0000563c addiu sp, sp, -0x50                       |     
    0x00005640 lw t9, -0x7e8c(gp)                        |     t9 = sym.imp.g_strdup_printf
    0x00005644 sw s2, 0x30(sp)                           |     *(var_30h) = s2;
    0x00005648 lw s2, -0x7e4c(gp)                        |     s2 = *((gp - 8083));
    0x0000564c sw s7, 0x44(sp)                           |     *(var_44h) = s7;
    0x00005650 move s7, a0                               |     s7 = a0;
    0x00005654 lw v0, (s2)                               |     v0 = *(s2);
    0x00005658 lw a0, -0x7fc0(gp)                        |     a0 = *((gp - 8176));
    0x0000565c sw gp, 0x10(sp)                           |     *(var_10h) = gp;
    0x00005660 sw ra, 0x4c(sp)                           |     *(var_4ch) = ra;
    0x00005664 sw s6, 0x40(sp)                           |     *(var_40h) = s6;
    0x00005668 sw s5, 0x3c(sp)                           |     *(var_3ch) = s5;
    0x0000566c sw s4, 0x38(sp)                           |     *(var_38h) = s4;
    0x00005670 sw s3, 0x34(sp)                           |     *(var_34h) = s3;
    0x00005674 sw s1, 0x2c(sp)                           |     *(var_2ch) = s1;
    0x00005678 sw s0, 0x28(sp)                           |     *(var_28h) = s0;
    0x0000567c sw fp, 0x48(sp)                           |     *(var_48h) = fp;
    0x00005680 addiu a0, a0, 0x6de0                      |     a0 += str.__t____s____t____t_________;
    0x00005684 sw zero, (a1)                             |     *(a1) = 0;
    0x00005688 sw v0, 0x24(sp)                           |     *(var_24h) = v0;
    0x0000568c sw zero, (a2)                             |     *(a2) = 0;
    0x00005690 sw zero, 0x1c(sp)                         |     *(var_1ch) = 0;
    0x00005694 sw zero, 0x20(sp)                         |     *(var_20h) = 0;
    0x00005698 move s5, a1                               |     s5 = a1;
    0x0000569c move s4, a2                               |     s4 = a2;
    0x000056a0 jalr t9                                   |     t9 ();
    0x000056a4 lw gp, 0x10(sp)                           |     gp = *(var_10h);
    0x000056a8 addiu s6, sp, 0x20                        |     s6 = sp + 0x20;
    0x000056ac move a3, s6                               |     a3 = s6;
    0x000056b0 lw t9, -0x7e70(gp)                        |     t9 = sym.imp.g_regex_new;
    0x000056b4 move a2, zero                             |     a2 = 0;
    0x000056b8 move a1, zero                             |     a1 = 0;
    0x000056bc move a0, v0                               |     a0 = v0;
    0x000056c0 move s1, v0                               |     s1 = v0;
    0x000056c4 jalr t9                                   |     t9 ();
    0x000056c8 lw v1, 0x20(sp)                           |     v1 = *(var_20h);
    0x000056cc lw gp, 0x10(sp)                           |     gp = *(var_10h);
    0x000056d0 move s3, s1                               |     s3 = s1;
    0x000056d4 move s0, v0                               |     s0 = v0;
    0x000056d8 beqz v1, 0x576c                           |     
                                                         |     while (v0 == 0) {
                                                         | label_0:
    0x000056dc lw t9, -0x7e20(gp)                        |         t9 = *((gp - 8072));
    0x000056e0 move a0, s3                               |         a0 = s3;
    0x000056e4 jalr t9                                   |         t9 ();
    0x000056e8 lw gp, 0x10(sp)                           |         gp = *(var_10h);
                                                         |         if (s0 != 0) {
    0x000056ec beqz s0, 0x5700                           |             
    0x000056f0 lw t9, -0x7e28(gp)                        |             t9 = sym.imp.g_regex_unref;
    0x000056f4 move a0, s0                               |             a0 = s0;
    0x000056f8 jalr t9                                   |             t9 ();
    0x000056fc lw gp, 0x10(sp)                           |             gp = *(var_10h);
                                                         |         }
    0x00005700 lw a0, 0x1c(sp)                           |         a0 = *(var_1ch);
    0x00005704 lw t9, -0x7e08(gp)                        |         t9 = sym.imp.g_match_info_free;
                                                         |         if (a0 != 0) {
    0x00005708 beqz a0, 0x5718                           |             
    0x0000570c jalr t9                                   |             t9 ();
    0x00005710 nop                                       |             
    0x00005714 lw gp, 0x10(sp)                           |             gp = *(var_10h);
                                                         |         }
    0x00005718 lw a0, 0x20(sp)                           |         a0 = *(var_20h);
    0x0000571c lw t9, -0x7f20(gp)                        |         t9 = sym.imp.g_error_free;
                                                         |         if (a0 != 0) {
    0x00005720 beqz a0, 0x5730                           |             
    0x00005724 jalr t9                                   |             t9 ();
    0x00005728 nop                                       |             
    0x0000572c lw gp, 0x10(sp)                           |             gp = *(var_10h);
                                                         |         }
    0x00005730 lw v1, 0x24(sp)                           |         v1 = *(var_24h);
    0x00005734 lw v0, (s2)                               |         v0 = *(s2);
    0x00005738 lw ra, 0x4c(sp)                           |         ra = *(var_4ch);
                                                         |         if (v1 != v0) {
    0x0000573c bne v1, v0, 0x5854                        |             goto label_1;
                                                         |         }
    0x00005740 lw fp, 0x48(sp)                           |         fp = *(var_48h);
    0x00005744 lw s7, 0x44(sp)                           |         s7 = *(var_44h);
    0x00005748 lw s6, 0x40(sp)                           |         s6 = *(var_40h);
    0x0000574c lw s5, 0x3c(sp)                           |         s5 = *(var_3ch);
    0x00005750 lw s4, 0x38(sp)                           |         s4 = *(var_38h);
    0x00005754 lw s3, 0x34(sp)                           |         s3 = *(var_34h);
    0x00005758 lw s2, 0x30(sp)                           |         s2 = *(var_30h);
    0x0000575c lw s1, 0x2c(sp)                           |         s1 = *(var_2ch);
    0x00005760 lw s0, 0x28(sp)                           |         s0 = *(var_28h);
    0x00005764 addiu sp, sp, 0x50                        |         
    0x00005768 jr ra                                     |         return v0;
    0x0000576c lw t9, -0x7e2c(gp)                        |         t9 = sym.imp.g_regex_match;
    0x00005770 addiu fp, sp, 0x1c                        |         fp = sp + 0x1c;
    0x00005774 move a3, fp                               |         a3 = fp;
    0x00005778 move a2, zero                             |         a2 = 0;
    0x0000577c move a1, s7                               |         a1 = s7;
    0x00005780 move a0, v0                               |         a0 = v0;
    0x00005784 jalr t9                                   |         t9 ();
    0x00005788 lw gp, 0x10(sp)                           |         gp = *(var_10h);
                                                         |         if (v0 != 0) {
    0x0000578c bnez v0, 0x5820                           |             goto label_2;
                                                         |         }
    0x00005790 lw t9, -0x7e20(gp)                        |         t9 = *((gp - 8072));
    0x00005794 move a0, s1                               |         a0 = s1;
    0x00005798 jalr t9                                   |         t9 ();
    0x0000579c lw gp, 0x10(sp)                           |         gp = *(var_10h);
    0x000057a0 lw t9, -0x7e28(gp)                        |         t9 = sym.imp.g_regex_unref;
    0x000057a4 move a0, s0                               |         a0 = s0;
    0x000057a8 jalr t9                                   |         t9 ();
    0x000057ac lw a0, 0x1c(sp)                           |         a0 = *(var_1ch);
    0x000057b0 lw gp, 0x10(sp)                           |         gp = *(var_10h);
                                                         |         if (a0 != 0) {
    0x000057b4 beqz a0, 0x57c8                           |             
    0x000057b8 lw t9, -0x7e08(gp)                        |             t9 = sym.imp.g_match_info_free;
    0x000057bc jalr t9                                   |             t9 ();
    0x000057c0 nop                                       |             
    0x000057c4 lw gp, 0x10(sp)                           |             gp = *(var_10h);
                                                         |         }
    0x000057c8 lw a0, -0x7fc0(gp)                        |         a0 = *((gp - 8176));
    0x000057cc lw t9, -0x7e8c(gp)                        |         t9 = sym.imp.g_strdup_printf
    0x000057d0 addiu a0, a0, 0x6e08                      |         a0 += str.__t____s____t____t___S_;
    0x000057d4 jalr t9                                   |         t9 ();
    0x000057d8 lw gp, 0x10(sp)                           |         gp = *(var_10h);
    0x000057dc move a3, s6                               |         a3 = s6;
    0x000057e0 move a2, zero                             |         a2 = 0;
    0x000057e4 lw t9, -0x7e70(gp)                        |         t9 = sym.imp.g_regex_new;
    0x000057e8 move a1, zero                             |         a1 = 0;
    0x000057ec move a0, v0                               |         a0 = v0;
    0x000057f0 move s3, v0                               |         s3 = v0;
    0x000057f4 jalr t9                                   |         t9 ();
    0x000057f8 lw gp, 0x10(sp)                           |         gp = *(var_10h);
    0x000057fc move a3, fp                               |         a3 = fp;
    0x00005800 move a2, zero                             |         a2 = 0;
    0x00005804 lw t9, -0x7e2c(gp)                        |         t9 = sym.imp.g_regex_match;
    0x00005808 move a1, s7                               |         a1 = s7;
    0x0000580c move a0, v0                               |         a0 = v0;
    0x00005810 move s0, v0                               |         s0 = v0;
    0x00005814 jalr t9                                   |         t9 ();
    0x00005818 lw gp, 0x10(sp)                           |         gp = *(var_10h);
    0x0000581c beqz v0, 0x56dc                           |         
                                                         |     }
                                                         | label_2:
    0x00005820 lw t9, -0x7e58(gp)                        |     t9 = sym.imp.g_match_info_fetch;
    0x00005824 lw a0, 0x1c(sp)                           |     a0 = *(var_1ch);
    0x00005828 addiu a1, zero, 1                         |     a1 = 1;
    0x0000582c jalr t9                                   |     t9 ();
    0x00005830 lw gp, 0x10(sp)                           |     gp = *(var_10h);
    0x00005834 lw a0, 0x1c(sp)                           |     a0 = *(var_1ch);
    0x00005838 sw v0, (s5)                               |     *(s5) = v0;
    0x0000583c lw t9, -0x7e58(gp)                        |     t9 = sym.imp.g_match_info_fetch;
    0x00005840 addiu a1, zero, 2                         |     a1 = 2;
    0x00005844 jalr t9                                   |     t9 ();
    0x00005848 lw gp, 0x10(sp)                           |     gp = *(var_10h);
    0x0000584c sw v0, (s4)                               |     *(s4) = v0;
    0x00005850 b 0x56dc                                  |     goto label_0;
                                                         | label_1:
    0x00005854 lw t9, -0x7e5c(gp)                        |     t9 = sym.imp.__stack_chk_fail;
    0x00005858 jalr t9                                   |     t9 ();
    0x0000585c nop                                       |     
                                                         | }

[*] Function printf used 8 times param_upgrader