[*] Binary protection state of dbd

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


[*] Function system tear down of dbd

    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/dbd @ 0x4043b8 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) sym.XMLFlush__ ()                | void XMLFlush_ () {
                                             |     /* XMLFlush() */
    0x004043b8 lui gp, 2                     |     
    0x004043bc addiu gp, gp, -0x3388         |     
    0x004043c0 addu gp, gp, t9               |     gp += t9;
    0x004043c4 addiu sp, sp, -0xd0           |     
    0x004043c8 sw ra, 0xcc(sp)               |     *(var_cch) = ra;
    0x004043cc sw fp, 0xc8(sp)               |     *(var_c8h) = fp;
    0x004043d0 move fp, sp                   |     fp = sp;
    0x004043d4 sw gp, 0x10(sp)               |     *(var_10h) = gp;
    0x004043d8 lw t8, -0x7e74(gp)            |     t8 = *((gp - 8093));
    0x004043dc lw t8, (t8)                   |     t8 = *(t8);
    0x004043e0 sw t8, 0xc4(fp)               |     *(arg_c4h) = t8;
    0x004043e4 sw zero, 0x2c(fp)             |     *(arg_2ch) = 0;
    0x004043e8 sw zero, 0x30(fp)             |     *(arg_30h) = 0;
    0x004043ec sw zero, 0x34(fp)             |     *(arg_34h) = 0;
    0x004043f0 sw zero, 0x38(fp)             |     *(arg_38h) = 0;
    0x004043f4 sw zero, 0x3c(fp)             |     *(arg_3ch) = 0;
    0x004043f8 sw zero, 0x40(fp)             |     *(arg_40h) = 0;
    0x004043fc sw zero, 0x44(fp)             |     *(arg_44h) = 0;
    0x00404400 sw zero, 0x48(fp)             |     *(arg_48h) = 0;
    0x00404404 sw zero, 0x4c(fp)             |     *(arg_4ch) = 0;
    0x00404408 sw zero, 0x50(fp)             |     *(arg_50h) = 0;
    0x0040440c sw zero, 0x54(fp)             |     *(arg_54h) = 0;
    0x00404410 sw zero, 0x58(fp)             |     *(arg_58h) = 0;
    0x00404414 sh zero, 0x5c(fp)             |     *(arg_5ch) = 0;
    0x00404418 sw zero, 0x1c(fp)             |     *(arg_1ch) = 0;
    0x0040441c addiu v0, fp, 0x60            |     v0 = fp + 0x60;
    0x00404420 addiu t8, zero, 0x64          |     t8 = 0x64;
    0x00404424 move a0, v0                   |     a0 = v0;
    0x00404428 move a1, zero                 |     a1 = 0;
    0x0040442c move a2, t8                   |     a2 = t8;
    0x00404430 lw t8, -0x7f14(gp)            |     t8 = sym.imp.memset;
    0x00404434 move t9, t8                   |     t9 = t8;
    0x00404438 jalr t9                       |     t9 ();
    0x0040443c nop                           |     
    0x00404440 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00404444 addiu t8, fp, 0x2c            |     t8 = fp + 0x2c;
    0x00404448 move a0, t8                   |     a0 = t8;
    0x0040444c addiu a1, zero, 0x32          |     a1 = 0x32;
    0x00404450 lw t8, -0x7e9c(gp)            |     t8 = sym.imp.getcwd;
    0x00404454 move t9, t8                   |     t9 = t8;
    0x00404458 jalr t9                       |     t9 ();
    0x0040445c nop                           |     
    0x00404460 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00404464 lw t8, -0x7fdc(gp)            |     t8 = *(gp);
                                             |     /* str._tmp_ */
    0x00404468 addiu a0, t8, 0x7b6c          |     a0 = t8 + 0x7b6c;
    0x0040446c lw t8, -0x7f08(gp)            |     t8 = sym.imp.chdir;
    0x00404470 move t9, t8                   |     t9 = t8;
    0x00404474 jalr t9                       |     t9 ();
    0x00404478 nop                           |     
    0x0040447c lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00404480 lw t8, -0x7fdc(gp)            |     t8 = *(gp);
                                             |     /* str.tar_czf_db.xml.tgz_db */
    0x00404484 addiu a0, t8, 0x7b74          |     a0 = t8 + 0x7b74;
    0x00404488 lw t8, -0x7e7c(gp)            |     t8 = sym.imp.system
    0x0040448c move t9, t8                   |     t9 = t8;
    0x00404490 jalr t9                       |     t9 ();
    0x00404494 nop                           |     
    0x00404498 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x0040449c addiu t8, fp, 0x2c            |     t8 = fp + 0x2c;
    0x004044a0 move a0, t8                   |     a0 = t8;
    0x004044a4 lw t8, -0x7f08(gp)            |     t8 = sym.imp.chdir;
    0x004044a8 move t9, t8                   |     t9 = t8;
    0x004044ac jalr t9                       |     t9 ();
    0x004044b0 nop                           |     
    0x004044b4 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x004044b8 lw t8, -0x7fdc(gp)            |     t8 = *(gp);
                                             |     /* str._tmp_db.xml.tgz */
    0x004044bc addiu a0, t8, 0x7b8c          |     a0 = t8 + 0x7b8c;
    0x004044c0 move a1, zero                 |     a1 = 0;
    0x004044c4 lw t8, -0x7e78(gp)            |     t8 = sym.imp.open;
    0x004044c8 move t9, t8                   |     t9 = t8;
    0x004044cc jalr t9                       |     t9 ();
    0x004044d0 nop                           |     
    0x004044d4 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x004044d8 move t8, v0                   |     t8 = v0;
    0x004044dc sw t8, 0x20(fp)               |     *(arg_20h) = t8;
    0x004044e0 lw t8, 0x20(fp)               |     t8 = *(arg_20h);
    0x004044e4 addiu t8, t8, 1               |     t8++;
    0x004044e8 sltiu t8, t8, 1               |     t8 = (t8 < 1) ? 1 : 0;
    0x004044ec andi t8, t8, 0xff             |     t8 &= 0xff;
                                             |     if (t8 != 0) {
    0x004044f0 beqz t8, 0x404528             |         
    0x004044f4 nop                           |         
    0x004044f8 lw t8, -0x7fdc(gp)            |         t8 = *(gp);
                                             |         /* str.flush_error */
    0x004044fc addiu a0, t8, 0x7b9c          |         a0 = t8 + 0x7b9c;
    0x00404500 lw t8, -0x7f54(gp)            |         t8 = sym.imp.puts;
    0x00404504 move t9, t8                   |         t9 = t8;
    0x00404508 jalr t9                       |         t9 ();
    0x0040450c nop                           |         
    0x00404510 lw gp, 0x10(fp)               |         gp = *(arg_10h);
    0x00404514 addiu a0, zero, 1             |         a0 = 1;
    0x00404518 lw t8, -0x7f2c(gp)            |         t8 = sym.imp.exit;
    0x0040451c move t9, t8                   |         t9 = t8;
    0x00404520 jalr t9                       |         t9 ();
    0x00404524 nop                           |         
                                             |     }
    0x00404528 lw t8, -0x7fdc(gp)            |     t8 = *(gp);
                                             |     /* str._dev_mtd_xmldb */
    0x0040452c addiu a0, t8, 0x7ba8          |     a0 = t8 + 0x7ba8;
    0x00404530 addiu a1, zero, 2             |     a1 = 2;
    0x00404534 lw t8, -0x7e78(gp)            |     t8 = sym.imp.open;
    0x00404538 move t9, t8                   |     t9 = t8;
    0x0040453c jalr t9                       |     t9 ();
    0x00404540 nop                           |     
    0x00404544 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00404548 move t8, v0                   |     t8 = v0;
    0x0040454c sw t8, 0x24(fp)               |     *(arg_24h) = t8;
    0x00404550 lw t8, 0x24(fp)               |     t8 = *(arg_24h);
    0x00404554 addiu t8, t8, 1               |     t8++;
    0x00404558 sltiu t8, t8, 1               |     t8 = (t8 < 1) ? 1 : 0;
    0x0040455c andi t8, t8, 0xff             |     t8 &= 0xff;
                                             |     if (t8 != 0) {
    0x00404560 beqz t8, 0x404598             |         
    0x00404564 nop                           |         
    0x00404568 lw t8, -0x7fdc(gp)            |         t8 = *(gp);
                                             |         /* str.flush_error */
    0x0040456c addiu a0, t8, 0x7b9c          |         a0 = t8 + 0x7b9c;
    0x00404570 lw t8, -0x7f54(gp)            |         t8 = sym.imp.puts;
    0x00404574 move t9, t8                   |         t9 = t8;
    0x00404578 jalr t9                       |         t9 ();
    0x0040457c nop                           |         
    0x00404580 lw gp, 0x10(fp)               |         gp = *(arg_10h);
    0x00404584 addiu a0, zero, 1             |         a0 = 1;
    0x00404588 lw t8, -0x7f2c(gp)            |         t8 = sym.imp.exit;
    0x0040458c move t9, t8                   |         t9 = t8;
    0x00404590 jalr t9                       |         t9 ();
    0x00404594 nop                           |         
                                             |     }
    0x00404598 lw t8, -0x7fdc(gp)            |     t8 = *(gp);
                                             |     /* str._dev_mtd_xmldb_bak */
    0x0040459c addiu a0, t8, 0x7bb8          |     a0 = t8 + 0x7bb8;
    0x004045a0 addiu a1, zero, 2             |     a1 = 2;
    0x004045a4 lw t8, -0x7e78(gp)            |     t8 = sym.imp.open;
    0x004045a8 move t9, t8                   |     t9 = t8;
    0x004045ac jalr t9                       |     t9 ();
    0x004045b0 nop                           |     
    0x004045b4 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x004045b8 move t8, v0                   |     t8 = v0;
    0x004045bc sw t8, 0x28(fp)               |     *(arg_28h) = t8;
    0x004045c0 lw t8, 0x28(fp)               |     t8 = *(arg_28h);
    0x004045c4 addiu t8, t8, 1               |     t8++;
    0x004045c8 sltiu t8, t8, 1               |     t8 = (t8 < 1) ? 1 : 0;
    0x004045cc andi t8, t8, 0xff             |     t8 &= 0xff;
                                             |     if (t8 != 0) {
    0x004045d0 beqz t8, 0x404608             |         
    0x004045d4 nop                           |         
    0x004045d8 lw t8, -0x7fdc(gp)            |         t8 = *(gp);
                                             |         /* str.flush_error */
    0x004045dc addiu a0, t8, 0x7b9c          |         a0 = t8 + 0x7b9c;
    0x004045e0 lw t8, -0x7f54(gp)            |         t8 = sym.imp.puts;
    0x004045e4 move t9, t8                   |         t9 = t8;
    0x004045e8 jalr t9                       |         t9 ();
    0x004045ec nop                           |         
    0x004045f0 lw gp, 0x10(fp)               |         gp = *(arg_10h);
    0x004045f4 addiu a0, zero, 1             |         a0 = 1;
    0x004045f8 lw t8, -0x7f2c(gp)            |         t8 = sym.imp.exit;
    0x004045fc move t9, t8                   |         t9 = t8;
    0x00404600 jalr t9                       |         t9 ();
    0x00404604 nop                           |         
                                             |     }
    0x00404608 b 0x404684                    |     goto label_0;
    0x0040460c nop                           |     
                                             |     do {
    0x00404610 lw t8, 0x1c(fp)               |         t8 = *(arg_1ch);
    0x00404614 addiu v0, fp, 0x60            |         v0 = fp + 0x60;
    0x00404618 lw a0, 0x24(fp)               |         a0 = *(arg_24h);
    0x0040461c move a1, v0                   |         a1 = v0;
    0x00404620 move a2, t8                   |         a2 = t8;
    0x00404624 lw t8, -0x7ef0(gp)            |         t8 = sym.imp.write;
    0x00404628 move t9, t8                   |         t9 = t8;
    0x0040462c jalr t9                       |         t9 ();
    0x00404630 nop                           |         
    0x00404634 lw gp, 0x10(fp)               |         gp = *(arg_10h);
    0x00404638 lw t8, 0x1c(fp)               |         t8 = *(arg_1ch);
    0x0040463c addiu v0, fp, 0x60            |         v0 = fp + 0x60;
    0x00404640 lw a0, 0x28(fp)               |         a0 = *(arg_28h);
    0x00404644 move a1, v0                   |         a1 = v0;
    0x00404648 move a2, t8                   |         a2 = t8;
    0x0040464c lw t8, -0x7ef0(gp)            |         t8 = sym.imp.write;
    0x00404650 move t9, t8                   |         t9 = t8;
    0x00404654 jalr t9                       |         t9 ();
    0x00404658 nop                           |         
    0x0040465c lw gp, 0x10(fp)               |         gp = *(arg_10h);
    0x00404660 addiu t8, fp, 0x60            |         t8 = fp + 0x60;
    0x00404664 move a0, t8                   |         a0 = t8;
    0x00404668 move a1, zero                 |         a1 = 0;
    0x0040466c addiu a2, zero, 0x64          |         a2 = 0x64;
    0x00404670 lw t8, -0x7f14(gp)            |         t8 = sym.imp.memset;
    0x00404674 move t9, t8                   |         t9 = t8;
    0x00404678 jalr t9                       |         t9 ();
    0x0040467c nop                           |         
    0x00404680 lw gp, 0x10(fp)               |         gp = *(arg_10h);
                                             | label_0:
    0x00404684 addiu t8, fp, 0x60            |         t8 = fp + 0x60;
    0x00404688 lw a0, 0x20(fp)               |         a0 = *(arg_20h);
    0x0040468c move a1, t8                   |         a1 = t8;
    0x00404690 addiu a2, zero, 0x64          |         a2 = 0x64;
    0x00404694 lw t8, -0x7ec4(gp)            |         t8 = sym.imp.read;
    0x00404698 move t9, t8                   |         t9 = t8;
    0x0040469c jalr t9                       |         t9 ();
    0x004046a0 nop                           |         
    0x004046a4 lw gp, 0x10(fp)               |         gp = *(arg_10h);
    0x004046a8 move t8, v0                   |         t8 = v0;
    0x004046ac sw t8, 0x1c(fp)               |         *(arg_1ch) = t8;
    0x004046b0 lw t8, 0x1c(fp)               |         t8 = *(arg_1ch);
    0x004046b4 sltu t8, zero, t8             |         t8 = (0 < t8) ? 1 : 0;
    0x004046b8 andi t8, t8, 0xff             |         t8 &= 0xff;
    0x004046bc bnez t8, 0x404610             |         
                                             |     } while (t8 != 0);
    0x004046c0 nop                           |     
    0x004046c4 lw a0, 0x20(fp)               |     a0 = *(arg_20h);
    0x004046c8 lw t8, -0x7ef8(gp)            |     t8 = sym.imp.close;
    0x004046cc move t9, t8                   |     t9 = t8;
    0x004046d0 jalr t9                       |     t9 ();
    0x004046d4 nop                           |     
    0x004046d8 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x004046dc lw a0, 0x24(fp)               |     a0 = *(arg_24h);
    0x004046e0 lw t8, -0x7ef8(gp)            |     t8 = sym.imp.close;
    0x004046e4 move t9, t8                   |     t9 = t8;
    0x004046e8 jalr t9                       |     t9 ();
    0x004046ec nop                           |     
    0x004046f0 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x004046f4 lw a0, 0x28(fp)               |     a0 = *(arg_28h);
    0x004046f8 lw t8, -0x7ef8(gp)            |     t8 = sym.imp.close;
    0x004046fc move t9, t8                   |     t9 = t8;
    0x00404700 jalr t9                       |     t9 ();
    0x00404704 nop                           |     
    0x00404708 lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x0040470c lw t8, -0x7f0c(gp)            |     t8 = sym.imp.sync;
    0x00404710 move t9, t8                   |     t9 = t8;
    0x00404714 jalr t9                       |     t9 ();
    0x00404718 nop                           |     
    0x0040471c lw gp, 0x10(fp)               |     gp = *(arg_10h);
    0x00404720 lw t8, -0x7e74(gp)            |     t8 = *((gp - 8093));
    0x00404724 lw v0, 0xc4(fp)               |     v0 = *(arg_c4h);
    0x00404728 lw t8, (t8)                   |     t8 = *(t8);
                                             |     if (v0 != t8) {
    0x0040472c beq v0, t8, 0x404744          |         
    0x00404730 nop                           |         
    0x00404734 lw t8, -0x7ee4(gp)            |         t8 = sym.imp.__stack_chk_fail;
    0x00404738 move t9, t8                   |         t9 = t8;
    0x0040473c jalr t9                       |         t9 ();
    0x00404740 nop                           |         
                                             |     }
    0x00404744 move sp, fp                   |     
    0x00404748 lw ra, 0xcc(sp)               |     ra = *(var_cch);
    0x0040474c lw fp, 0xc8(sp)               |     fp = *(var_c8h);
    0x00404750 addiu sp, sp, 0xd0            |     
    0x00404754 jr ra                         |     return v0;
    0x00404758 nop                           |     
                                             | }
    ; assembly                                   | /* r2dec pseudo code output */
                                                 | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/dbd @ 0x404a98 */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) sym.cp_dbfile_char_const_ ()         | void cp_dbfile_char_const_ () {
                                                 |     /* cp_dbfile(char const*) */
    0x00404a98 lui gp, 2                         |     
    0x00404a9c addiu gp, gp, -0x3a68             |     
    0x00404aa0 addu gp, gp, t9                   |     gp += t9;
    0x00404aa4 addiu sp, sp, -0x78               |     
    0x00404aa8 sw ra, 0x74(sp)                   |     *(var_74h) = ra;
    0x00404aac sw fp, 0x70(sp)                   |     *(var_70h) = fp;
    0x00404ab0 sw s0, 0x6c(sp)                   |     *(var_6ch) = s0;
    0x00404ab4 move fp, sp                       |     fp = sp;
    0x00404ab8 sw gp, 0x10(sp)                   |     *(var_10h) = gp;
    0x00404abc sw a0, 0x1c(fp)                   |     *(arg_1ch) = a0;
    0x00404ac0 lw t8, -0x7e74(gp)                |     t8 = *((gp - 8093));
    0x00404ac4 lw t8, (t8)                       |     t8 = *(t8);
    0x00404ac8 sw t8, 0x64(fp)                   |     *(arg_64h) = t8;
    0x00404acc lw a0, 0x1c(fp)                   |     a0 = *(arg_1ch);
    0x00404ad0 move a1, zero                     |     a1 = 0;
    0x00404ad4 lw t8, -0x7ed0(gp)                |     t8 = sym.imp.access;
    0x00404ad8 move t9, t8                       |     t9 = t8;
    0x00404adc jalr t9                           |     t9 ();
    0x00404ae0 nop                               |     
    0x00404ae4 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00404ae8 move t8, v0                       |     t8 = v0;
    0x00404aec addiu t8, t8, 1                   |     t8++;
    0x00404af0 sltiu t8, t8, 1                   |     t8 = (t8 < 1) ? 1 : 0;
    0x00404af4 andi t8, t8, 0xff                 |     t8 &= 0xff;
                                                 |     if (t8 != 0) {
    0x00404af8 beqz t8, 0x404b0c                 |         
    0x00404afc nop                               |         
    0x00404b00 addiu t8, zero, -1                |         t8 = -1;
    0x00404b04 b 0x404d30                        |         goto label_0;
    0x00404b08 nop                               |         
                                                 |     }
    0x00404b0c addiu t8, fp, 0x24                |     t8 = fp + 0x24;
    0x00404b10 move a0, t8                       |     a0 = t8;
    0x00404b14 move a1, zero                     |     a1 = 0;
    0x00404b18 addiu a2, zero, 0x40              |     a2 = 0x40;
    0x00404b1c lw t8, -0x7f14(gp)                |     t8 = sym.imp.memset;
    0x00404b20 move t9, t8                       |     t9 = t8;
    0x00404b24 jalr t9                           |     t9 ();
    0x00404b28 nop                               |     
    0x00404b2c lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00404b30 addiu t8, fp, 0x24                |     t8 = fp + 0x24;
    0x00404b34 lui v0, 0x2d20                    |     v0 = 0x2d207063;
    0x00404b38 ori v0, v0, 0x7063                |     
    0x00404b3c sw v0, (t8)                       |     *(t8) = v0;
    0x00404b40 addiu v0, zero, 0x2066            |     v0 = 0x2066;
    0x00404b44 sh v0, 4(t8)                      |     *((t8 + 4)) = v0;
    0x00404b48 sb zero, 6(t8)                    |     *((t8 + 6)) = 0;
    0x00404b4c addiu t8, fp, 0x24                |     t8 = fp + 0x24;
    0x00404b50 move a0, t8                       |     a0 = t8;
    0x00404b54 lw t8, -0x7eb4(gp)                |     t8 = sym.imp.strlen;
    0x00404b58 move t9, t8                       |     t9 = t8;
    0x00404b5c jalr t9                           |     t9 ();
    0x00404b60 nop                               |     
    0x00404b64 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00404b68 move t8, v0                       |     t8 = v0;
    0x00404b6c addiu v0, fp, 0x24                |     v0 = fp + 0x24;
    0x00404b70 addu t8, v0, t8                   |     t8 = v0 + t8;
    0x00404b74 addiu v0, zero, 0x27              |     v0 = 0x27;
    0x00404b78 sb v0, (t8)                       |     *(t8) = v0;
    0x00404b7c sb zero, 1(t8)                    |     *((t8 + 1)) = 0;
    0x00404b80 addiu t8, fp, 0x20                |     t8 = fp + 0x20;
    0x00404b84 move a0, t8                       |     a0 = t8;
    0x00404b88 lw a1, 0x1c(fp)                   |     a1 = *(arg_1ch);
    0x00404b8c lw t8, -0x7f9c(gp)                |     t8 = sym.strongEncode_char_const_;
    0x00404b90 move t9, t8                       |     t9 = t8;
    0x00404b94 jalr t9                           |     t9 ();
    0x00404b98 nop                               |     
    0x00404b9c lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00404ba0 addiu t8, fp, 0x20                |     t8 = fp + 0x20;
    0x00404ba4 move a0, t8                       |     a0 = t8;
    0x00404ba8 lw t8, -0x7e88(gp)                |     t8 = *(gp);
    0x00404bac move t9, t8                       |     t9 = t8;
    0x00404bb0 jalr t9                           |     t9 ();
    0x00404bb4 nop                               |     
    0x00404bb8 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00404bbc move t8, v0                       |     t8 = v0;
    0x00404bc0 addiu v0, fp, 0x24                |     v0 = fp + 0x24;
    0x00404bc4 move a0, v0                       |     a0 = v0;
    0x00404bc8 move a1, t8                       |     a1 = t8;
    0x00404bcc lw t8, -0x7e98(gp)                |     t8 = sym.imp.strcat;
    0x00404bd0 move t9, t8                       |     t9 = t8;
    0x00404bd4 jalr t9                           |     t9 ();
    0x00404bd8 nop                               |     
    0x00404bdc lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00404be0 addiu t8, fp, 0x20                |     t8 = fp + 0x20;
    0x00404be4 move a0, t8                       |     a0 = t8;
    0x00404be8 lw t8, -0x7ec8(gp)                |     t8 = *(gp);
    0x00404bec move t9, t8                       |     t9 = t8;
    0x00404bf0 jalr t9                           |     t9 ();
    0x00404bf4 nop                               |     
    0x00404bf8 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00404bfc addiu t8, fp, 0x24                |     t8 = fp + 0x24;
    0x00404c00 move a0, t8                       |     a0 = t8;
    0x00404c04 lw t8, -0x7eb4(gp)                |     t8 = sym.imp.strlen;
    0x00404c08 move t9, t8                       |     t9 = t8;
    0x00404c0c jalr t9                           |     t9 ();
    0x00404c10 nop                               |     
    0x00404c14 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00404c18 move t8, v0                       |     t8 = v0;
    0x00404c1c addiu v0, fp, 0x24                |     v0 = fp + 0x24;
    0x00404c20 addu t8, v0, t8                   |     t8 = v0 + t8;
    0x00404c24 addiu v0, zero, 0x27              |     v0 = 0x27;
    0x00404c28 sb v0, (t8)                       |     *(t8) = v0;
    0x00404c2c sb zero, 1(t8)                    |     *((t8 + 1)) = 0;
    0x00404c30 addiu t8, fp, 0x24                |     t8 = fp + 0x24;
    0x00404c34 move a0, t8                       |     a0 = t8;
    0x00404c38 lw t8, -0x7eb4(gp)                |     t8 = sym.imp.strlen;
    0x00404c3c move t9, t8                       |     t9 = t8;
    0x00404c40 jalr t9                           |     t9 ();
    0x00404c44 nop                               |     
    0x00404c48 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00404c4c move t8, v0                       |     t8 = v0;
    0x00404c50 addiu v0, fp, 0x24                |     v0 = fp + 0x24;
    0x00404c54 addu t8, v0, t8                   |     t8 = v0 + t8;
    0x00404c58 addiu v0, zero, 0x20              |     v0 = 0x20;
    0x00404c5c sb v0, (t8)                       |     *(t8) = v0;
    0x00404c60 sb zero, 1(t8)                    |     *((t8 + 1)) = 0;
    0x00404c64 addiu t8, fp, 0x24                |     t8 = fp + 0x24;
    0x00404c68 move a0, t8                       |     a0 = t8;
    0x00404c6c lw t8, -0x7eb4(gp)                |     t8 = sym.imp.strlen;
    0x00404c70 move t9, t8                       |     t9 = t8;
    0x00404c74 jalr t9                           |     t9 ();
    0x00404c78 nop                               |     
    0x00404c7c lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00404c80 move t8, v0                       |     t8 = v0;
    0x00404c84 addiu v0, fp, 0x24                |     v0 = fp + 0x24;
    0x00404c88 addu t8, v0, t8                   |     t8 = v0 + t8;
    0x00404c8c lw v0, -0x7fdc(gp)                |     v0 = *(gp);
    0x00404c90 lw a1, 0x7c08(v0)                 |     a1 = *((v0 + 7938));
                                                 |     /* str._tmp_db_db.xml */
    0x00404c94 addiu v1, v0, 0x7c08              |     v1 = v0 + 0x7c08;
    0x00404c98 lw a0, 4(v1)                      |     a0 = *((v1 + 1));
                                                 |     /* str._tmp_db_db.xml */
    0x00404c9c addiu v1, v0, 0x7c08              |     v1 = v0 + 0x7c08;
    0x00404ca0 lw v1, 8(v1)                      |     v1 = *((v1 + 2));
    0x00404ca4 swl a1, 3(t8)                     |     __asm ("swl a1, 3(t8)");
    0x00404ca8 swr a1, (t8)                      |     __asm ("swr a1, (t8)");
    0x00404cac swl a0, 7(t8)                     |     __asm ("swl a0, 7(t8)");
    0x00404cb0 swr a0, 4(t8)                     |     __asm ("swr a0, 4(t8)");
    0x00404cb4 swl v1, 0xb(t8)                   |     __asm ("swl v1, 0xb(t8)");
    0x00404cb8 swr v1, 8(t8)                     |     __asm ("swr v1, 8(t8)");
                                                 |     /* str._tmp_db_db.xml */
    0x00404cbc addiu v0, v0, 0x7c08              |     v0 += 0x7c08;
    0x00404cc0 lbu v1, 0xc(v0)                   |     v1 = *((v0 + 12));
    0x00404cc4 sb v1, 0xc(t8)                    |     *((t8 + 12)) = v1;
    0x00404cc8 lbu v1, 0xd(v0)                   |     v1 = *((v0 + 13));
    0x00404ccc sb v1, 0xd(t8)                    |     *((t8 + 13)) = v1;
    0x00404cd0 lbu v0, 0xe(v0)                   |     v0 = *((v0 + 14));
    0x00404cd4 sb v0, 0xe(t8)                    |     *((t8 + 14)) = v0;
    0x00404cd8 addiu t8, fp, 0x24                |     t8 = fp + 0x24;
    0x00404cdc move a0, t8                       |     a0 = t8;
    0x00404ce0 lw t8, -0x7e7c(gp)                |     t8 = sym.imp.system
    0x00404ce4 move t9, t8                       |     t9 = t8;
    0x00404ce8 jalr t9                           |     t9 ();
    0x00404cec nop                               |     
    0x00404cf0 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00404cf4 move t8, v0                       |     t8 = v0;
    0x00404cf8 addiu t8, t8, 1                   |     t8++;
    0x00404cfc sltiu t8, t8, 1                   |     t8 = (t8 < 1) ? 1 : 0;
    0x00404d00 andi t8, t8, 0xff                 |     t8 &= 0xff;
                                                 |     if (t8 != 0) {
    0x00404d04 beqz t8, 0x404d18                 |         
    0x00404d08 nop                               |         
    0x00404d0c addiu t8, zero, -1                |         t8 = -1;
    0x00404d10 b 0x404d30                        |         goto label_0;
    0x00404d14 nop                               |         
                                                 |     }
    0x00404d18 lw t8, -0x7fa0(gp)                |     t8 = sym.XMLFlush__;
    0x00404d1c move t9, t8                       |     t9 = t8;
    0x00404d20 jalr t9                           |     t9 ();
    0x00404d24 nop                               |     
    0x00404d28 lw gp, 0x10(fp)                   |     gp = *(arg_10h);
    0x00404d2c move t8, zero                     |     t8 = 0;
                                                 | label_0:
    0x00404d30 move v0, t8                       |     v0 = t8;
    0x00404d34 lw t8, -0x7e74(gp)                |     t8 = *((gp - 8093));
    0x00404d38 lw v1, 0x64(fp)                   |     v1 = *(arg_64h);
    0x00404d3c lw t8, (t8)                       |     t8 = *(t8);
                                                 |     if (v1 != t8) {
    0x00404d40 beq v1, t8, 0x404d9c              |         
    0x00404d44 nop                               |         
    0x00404d48 b 0x404d8c                        |         goto label_1;
    0x00404d4c nop                               |         
                                                 | label_1:
    0x00404d8c lw t8, -0x7ee4(gp)                |         t8 = sym.imp.__stack_chk_fail;
    0x00404d90 move t9, t8                       |         t9 = t8;
    0x00404d94 jalr t9                           |         t9 ();
    0x00404d98 nop                               |         
                                                 |     }
    0x00404d9c move sp, fp                       |     
    0x00404da0 lw ra, 0x74(sp)                   |     ra = *(var_74h);
    0x00404da4 lw fp, 0x70(sp)                   |     fp = *(var_70h);
    0x00404da8 lw s0, 0x6c(sp)                   |     s0 = *(var_6ch);
    0x00404dac addiu sp, sp, 0x78                |     
    0x00404db0 jr ra                             |     return v1;
    0x00404db4 nop                               |     
                                                 | }

[*] Function system used 3 times dbd