[*] Binary protection state of send_cmd
Full RELRO Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of send_cmd
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/send_cmd @ 0x400e00 */
| #include <stdint.h>
|
; (fcn) aav.0x00400e00 () | void aav_0x00400e00 () {
0x00400e00 lui gp, 2 |
0x00400e04 addiu gp, gp, -0x5de0 |
0x00400e08 addu gp, gp, t9 | gp += t9;
0x00400e0c addiu sp, sp, -0xf0 |
0x00400e10 sw ra, 0xec(sp) | *(var_ech) = ra;
0x00400e14 sw fp, 0xe8(sp) | *(var_e8h) = fp;
0x00400e18 sw s0, 0xe4(sp) | *(var_e4h) = s0;
0x00400e1c move fp, sp | fp = sp;
0x00400e20 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00400e24 sw a0, 0x2c(fp) | *(arg_2ch) = a0;
0x00400e28 sw a1, 0x28(fp) | *(arg_28h) = a1;
0x00400e2c sw a2, 0x24(fp) | *(arg_24h) = a2;
0x00400e30 sw a3, 0x20(fp) | *(arg_20h) = a3;
0x00400e34 lw t8, -0x7f6c(gp) | t8 = *((gp - 8155));
0x00400e38 lw t8, (t8) | t8 = *(t8);
0x00400e3c sw t8, 0xdc(fp) | *(arg_dch) = t8;
0x00400e40 addiu t8, fp, 0x38 | t8 = fp + 0x38;
0x00400e44 move a0, t8 | a0 = t8;
0x00400e48 lw t8, -0x7fd8(gp) | t8 = *(gp);
0x00400e4c move t9, t8 | t9 = t8;
0x00400e50 jalr t9 | t9 ();
0x00400e54 nop |
0x00400e58 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00400e5c lw t8, 0x28(fp) | t8 = *(arg_28h);
0x00400e60 sw t8, 0x44(fp) | *(arg_44h) = t8;
0x00400e64 lw t8, 0x24(fp) | t8 = *(arg_24h);
0x00400e68 sw t8, 0x48(fp) | *(arg_48h) = t8;
0x00400e6c lw t8, 0x20(fp) | t8 = *(arg_20h);
0x00400e70 sw t8, 0x4c(fp) | *(arg_4ch) = t8;
0x00400e74 addiu v0, fp, 0x38 | v0 = fp + 0x38;
0x00400e78 addiu t8, fp, 0x44 | t8 = fp + 0x44;
0x00400e7c addiu v1, fp, 0x50 | v1 = fp + 0x50;
0x00400e80 sw v1, 0x10(sp) | *(var_10h) = v1;
0x00400e84 addiu v1, zero, 0x8c | v1 = 0x8c;
0x00400e88 sw v1, 0x14(sp) | *(var_14h) = v1;
0x00400e8c move a0, v0 | a0 = v0;
0x00400e90 lw a1, 0x2c(fp) | a1 = *(arg_2ch);
0x00400e94 move a2, t8 | a2 = t8;
0x00400e98 addiu a3, zero, 0xc | a3 = 0xc;
0x00400e9c lw t8, -0x7f7c(gp) | t8 = *(gp);
0x00400ea0 move t9, t8 | t9 = t8;
0x00400ea4 jalr t9 | t9 ();
0x00400ea8 nop |
0x00400eac lw gp, 0x18(fp) | gp = *(arg_18h);
0x00400eb0 move t8, v0 | t8 = v0;
0x00400eb4 sw t8, 0x34(fp) | *(arg_34h) = t8;
0x00400eb8 lw t8, 0x34(fp) | t8 = *(arg_34h);
| if (t8 < 0) {
0x00400ebc bgez t8, 0x400efc |
0x00400ec0 nop |
0x00400ec4 lw t8, -0x7f88(gp) | t8 = *((gp - 8162));
0x00400ec8 lw t8, (t8) | t8 = *(t8);
0x00400ecc move a0, t8 | a0 = t8;
0x00400ed0 lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str.OOPS___send_cmd_return__d_n */
0x00400ed4 addiu a1, t8, 0x2674 | a1 = t8 + 0x2674;
0x00400ed8 lw a2, 0x34(fp) | a2 = *(arg_34h);
0x00400edc lw t8, -0x7f9c(gp) | t8 = sym.imp.fprintf
0x00400ee0 move t9, t8 | t9 = t8;
0x00400ee4 jalr t9 | t9 ();
0x00400ee8 nop |
0x00400eec lw gp, 0x18(fp) | gp = *(arg_18h);
0x00400ef0 lw s0, 0x34(fp) | s0 = *(arg_34h);
0x00400ef4 b 0x400f94 | goto label_0;
0x00400ef8 nop |
| }
0x00400efc lw t8, 0x50(fp) | t8 = *(arg_50h);
| if (t8 != 0) {
0x00400f00 beqz t8, 0x400f44 |
0x00400f04 nop |
0x00400f08 lw t8, -0x7f88(gp) | t8 = *((gp - 8162));
0x00400f0c lw v0, (t8) | v0 = *(t8);
0x00400f10 lw t8, 0x50(fp) | t8 = *(arg_50h);
0x00400f14 move a0, v0 | a0 = v0;
0x00400f18 lw v0, -0x7fdc(gp) | v0 = *(gp);
| /* str.OOPS___send_cmd_result__d_n */
0x00400f1c addiu a1, v0, 0x2690 | a1 = v0 + 0x2690;
0x00400f20 move a2, t8 | a2 = t8;
0x00400f24 lw t8, -0x7f9c(gp) | t8 = sym.imp.fprintf
0x00400f28 move t9, t8 | t9 = t8;
0x00400f2c jalr t9 | t9 ();
0x00400f30 nop |
0x00400f34 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00400f38 addiu s0, zero, -1 | s0 = -1;
0x00400f3c b 0x400f94 | goto label_0;
0x00400f40 nop |
| }
0x00400f44 lw t8, 0x54(fp) | t8 = *(arg_54h);
0x00400f48 lw v0, -0x7fdc(gp) | v0 = *(gp);
| /* esilref: '&d' */
0x00400f4c addiu a0, v0, 0x26ac | a0 = v0 + 0x26ac;
0x00400f50 move a1, t8 | a1 = t8;
0x00400f54 lw t8, -0x7fb4(gp) | t8 = sym.imp.printf;
0x00400f58 move t9, t8 | t9 = t8;
0x00400f5c jalr t9 | t9 ();
0x00400f60 nop |
0x00400f64 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00400f68 addiu t8, fp, 0x50 | t8 = fp + 0x50;
0x00400f6c addiu t8, t8, 0xc | t8 += 0xc;
0x00400f70 lw v0, -0x7fdc(gp) | v0 = *(gp);
| /* str.__s_n */
0x00400f74 addiu a0, v0, 0x26b0 | a0 = v0 + 0x26b0;
0x00400f78 move a1, t8 | a1 = t8;
0x00400f7c lw t8, -0x7fb4(gp) | t8 = sym.imp.printf;
0x00400f80 move t9, t8 | t9 = t8;
0x00400f84 jalr t9 | t9 ();
0x00400f88 nop |
0x00400f8c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00400f90 lw s0, 0x34(fp) | s0 = *(arg_34h);
| label_0:
0x00400f94 addiu t8, fp, 0x38 | t8 = fp + 0x38;
0x00400f98 move a0, t8 | a0 = t8;
0x00400f9c lw t8, -0x7fd4(gp) | t8 = *(gp);
0x00400fa0 move t9, t8 | t9 = t8;
0x00400fa4 jalr t9 | t9 ();
0x00400fa8 nop |
0x00400fac lw gp, 0x18(fp) | gp = *(arg_18h);
0x00400fb0 move t8, s0 | t8 = s0;
0x00400fb4 move v0, t8 | v0 = t8;
0x00400fb8 lw t8, -0x7f6c(gp) | t8 = *((gp - 8155));
0x00400fbc lw v1, 0xdc(fp) | v1 = *(arg_dch);
0x00400fc0 lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x00400fc4 beq v1, t8, 0x401020 |
0x00400fc8 nop |
0x00400fcc b 0x401010 | goto label_1;
0x00400fd0 nop |
| label_1:
0x00401010 lw t8, -0x7f84(gp) | t8 = sym.imp.__stack_chk_fail;
0x00401014 move t9, t8 | t9 = t8;
0x00401018 jalr t9 | t9 ();
0x0040101c nop |
| }
0x00401020 move sp, fp |
0x00401024 lw ra, 0xec(sp) | ra = *(var_ech);
0x00401028 lw fp, 0xe8(sp) | fp = *(var_e8h);
0x0040102c lw s0, 0xe4(sp) | s0 = *(var_e4h);
0x00401030 addiu sp, sp, 0xf0 |
0x00401034 jr ra | return v1;
0x00401038 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/bin/send_cmd @ 0x40103c */
| #include <stdint.h>
|
; (fcn) aav.0x0040103c () | void aav_0x0040103c () {
0x0040103c lui gp, 2 |
0x00401040 addiu gp, gp, -0x601c |
0x00401044 addu gp, gp, t9 | gp += t9;
0x00401048 addiu sp, sp, -0x188 |
0x0040104c sw ra, 0x184(sp) | *(var_184h) = ra;
0x00401050 sw fp, 0x180(sp) | *(var_180h) = fp;
0x00401054 sw s0, 0x17c(sp) | *(var_17ch) = s0;
0x00401058 move fp, sp | fp = sp;
0x0040105c sw gp, 0x18(sp) | *(var_18h) = gp;
0x00401060 sw a0, 0x2c(fp) | *(arg_2ch) = a0;
0x00401064 sw a1, 0x28(fp) | *(arg_28h) = a1;
0x00401068 sw a2, 0x24(fp) | *(arg_24h) = a2;
0x0040106c lw t8, -0x7f6c(gp) | t8 = *((gp - 8155));
0x00401070 lw t8, (t8) | t8 = *(t8);
0x00401074 sw t8, 0x174(fp) | *(arg_174h) = t8;
0x00401078 addiu t8, fp, 0x4c | t8 = fp + 0x4c;
0x0040107c move a0, t8 | a0 = t8;
0x00401080 lw t8, -0x7fd8(gp) | t8 = *(gp);
0x00401084 move t9, t8 | t9 = t8;
0x00401088 jalr t9 | t9 ();
0x0040108c nop |
0x00401090 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401094 lw v0, 0x28(fp) | v0 = *(arg_28h);
0x00401098 addiu t8, zero, 0x192 | t8 = 0x192;
| if (v0 != t8) {
0x0040109c bne v0, t8, 0x401348 | goto label_0;
| }
0x004010a0 nop |
0x004010a4 addiu t8, zero, 0x194 | t8 = 0x194;
0x004010a8 sw t8, 0x64(fp) | *(arg_64h) = t8;
0x004010ac addiu v0, fp, 0x4c | v0 = fp + 0x4c;
0x004010b0 addiu t8, fp, 0x64 | t8 = fp + 0x64;
0x004010b4 addiu v1, fp, 0xe8 | v1 = fp + 0xe8;
0x004010b8 sw v1, 0x10(sp) | *(var_10h) = v1;
0x004010bc addiu v1, zero, 4 | v1 = 4;
0x004010c0 sw v1, 0x14(sp) | *(var_14h) = v1;
0x004010c4 move a0, v0 | a0 = v0;
0x004010c8 lw a1, 0x2c(fp) | a1 = *(arg_2ch);
0x004010cc move a2, t8 | a2 = t8;
0x004010d0 addiu a3, zero, 0x84 | a3 = 0x84;
0x004010d4 lw t8, -0x7f7c(gp) | t8 = *(gp);
0x004010d8 move t9, t8 | t9 = t8;
0x004010dc jalr t9 | t9 ();
0x004010e0 nop |
0x004010e4 lw gp, 0x18(fp) | gp = *(arg_18h);
0x004010e8 move t8, v0 | t8 = v0;
0x004010ec sw t8, 0x30(fp) | *(arg_30h) = t8;
0x004010f0 lw t8, 0x30(fp) | t8 = *(arg_30h);
| if (t8 < 0) {
0x004010f4 bgez t8, 0x401130 |
0x004010f8 nop |
0x004010fc lw t8, -0x7f88(gp) | t8 = *((gp - 8162));
0x00401100 lw t8, (t8) | t8 = *(t8);
0x00401104 move a0, t8 | a0 = t8;
0x00401108 lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str.OOPS___send_cmd_return__d_n */
0x0040110c addiu a1, t8, 0x2674 | a1 = t8 + 0x2674;
0x00401110 lw a2, 0x30(fp) | a2 = *(arg_30h);
0x00401114 lw t8, -0x7f9c(gp) | t8 = sym.imp.fprintf
0x00401118 move t9, t8 | t9 = t8;
0x0040111c jalr t9 | t9 ();
0x00401120 nop |
0x00401124 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401128 b 0x401500 | goto label_1;
0x0040112c nop |
| }
0x00401130 lw t8, 0xe8(fp) | t8 = *(arg_e8h);
| if (t8 == 0) {
0x00401134 beqz t8, 0x401340 | goto label_2;
| }
0x00401138 nop |
0x0040113c lw t8, 0xe8(fp) | t8 = *(arg_e8h);
0x00401140 addiu t8, t8, 4 | t8 += 4;
0x00401144 move a0, t8 | a0 = t8;
0x00401148 lw t8, -0x7f94(gp) | t8 = sym.imp.operator_new___unsigned_int_;
0x0040114c move t9, t8 | t9 = t8;
0x00401150 jalr t9 | t9 ();
0x00401154 nop |
0x00401158 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040115c move t8, v0 | t8 = v0;
0x00401160 sw t8, 0x38(fp) | *(arg_38h) = t8;
0x00401164 lw t8, 0x38(fp) | t8 = *(arg_38h);
| if (t8 == 0) {
0x00401168 bnez t8, 0x4011b4 |
0x0040116c nop |
0x00401170 lw t8, -0x7f88(gp) | t8 = *((gp - 8162));
0x00401174 lw t8, (t8) | t8 = *(t8);
0x00401178 move a0, t8 | a0 = t8;
0x0040117c lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str._s____memory_low_n */
0x00401180 addiu a1, t8, 0x26b8 | a1 = t8 + 0x26b8;
0x00401184 lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str.send_log_cmd */
0x00401188 addiu a2, t8, 0x2870 | a2 = t8 + 0x2870;
0x0040118c lw t8, -0x7f9c(gp) | t8 = sym.imp.fprintf
0x00401190 move t9, t8 | t9 = t8;
0x00401194 jalr t9 | t9 ();
0x00401198 nop |
0x0040119c lw gp, 0x18(fp) | gp = *(arg_18h);
0x004011a0 addiu a0, zero, 1 | a0 = 1;
0x004011a4 lw t8, -0x7fa4(gp) | t8 = sym.imp.exit;
0x004011a8 move t9, t8 | t9 = t8;
0x004011ac jalr t9 | t9 ();
0x004011b0 nop |
| }
0x004011b4 addiu t8, fp, 0x58 | t8 = fp + 0x58;
0x004011b8 move a0, t8 | a0 = t8;
0x004011bc lw t8, -0x7fd8(gp) | t8 = *(gp);
0x004011c0 move t9, t8 | t9 = t8;
0x004011c4 jalr t9 | t9 ();
0x004011c8 nop |
0x004011cc lw gp, 0x18(fp) | gp = *(arg_18h);
0x004011d0 lw t8, 0x38(fp) | t8 = *(arg_38h);
0x004011d4 sw t8, 0x3c(fp) | *(arg_3ch) = t8;
0x004011d8 lw t8, 0x28(fp) | t8 = *(arg_28h);
0x004011dc sw t8, 0x64(fp) | *(arg_64h) = t8;
0x004011e0 lw t8, 0xe8(fp) | t8 = *(arg_e8h);
0x004011e4 addiu v1, t8, 4 | v1 = t8 + 4;
0x004011e8 addiu v0, fp, 0x58 | v0 = fp + 0x58;
0x004011ec addiu t8, fp, 0x64 | t8 = fp + 0x64;
0x004011f0 lw a0, 0x3c(fp) | a0 = *(arg_3ch);
0x004011f4 sw a0, 0x10(sp) | *(var_10h) = a0;
0x004011f8 sw v1, 0x14(sp) | *(var_14h) = v1;
0x004011fc move a0, v0 | a0 = v0;
0x00401200 lw a1, 0x2c(fp) | a1 = *(arg_2ch);
0x00401204 move a2, t8 | a2 = t8;
0x00401208 addiu a3, zero, 0x84 | a3 = 0x84;
0x0040120c lw t8, -0x7f7c(gp) | t8 = *(gp);
0x00401210 move t9, t8 | t9 = t8;
0x00401214 jalr t9 | t9 ();
0x00401218 nop |
0x0040121c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401220 move t8, v0 | t8 = v0;
0x00401224 sw t8, 0x30(fp) | *(arg_30h) = t8;
0x00401228 lw t8, 0x30(fp) | t8 = *(arg_30h);
| if (t8 < 0) {
0x0040122c bgez t8, 0x401268 |
0x00401230 nop |
0x00401234 lw t8, -0x7f88(gp) | t8 = *((gp - 8162));
0x00401238 lw t8, (t8) | t8 = *(t8);
0x0040123c move a0, t8 | a0 = t8;
0x00401240 lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str.OOPS___send_cmd_return__d_n */
0x00401244 addiu a1, t8, 0x2674 | a1 = t8 + 0x2674;
0x00401248 lw a2, 0x30(fp) | a2 = *(arg_30h);
0x0040124c lw t8, -0x7f9c(gp) | t8 = sym.imp.fprintf
0x00401250 move t9, t8 | t9 = t8;
0x00401254 jalr t9 | t9 ();
0x00401258 nop |
0x0040125c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401260 b 0x4012f8 | goto label_3;
0x00401264 nop |
| }
0x00401268 addiu t8, zero, 0x80 | t8 = 0x80;
0x0040126c sw t8, 0x40(fp) | *(arg_40h) = t8;
0x00401270 lw t8, 0xe8(fp) | t8 = *(arg_e8h);
0x00401274 srl t8, t8, 7 | t8 >>= 7;
0x00401278 sw t8, 0x44(fp) | *(arg_44h) = t8;
0x0040127c sw zero, 0x34(fp) | *(arg_34h) = 0;
0x00401280 b 0x4012e4 | goto label_4;
0x00401284 nop |
| do {
0x00401288 lw t8, 0x3c(fp) | t8 = *(arg_3ch);
0x0040128c addiu v0, t8, 4 | v0 = t8 + 4;
0x00401290 lw t8, 0x34(fp) | t8 = *(arg_34h);
0x00401294 sll t8, t8, 7 | t8 <<= 7;
0x00401298 addu t8, v0, t8 | t8 = v0 + t8;
0x0040129c sw t8, 0x48(fp) | *(arg_48h) = t8;
0x004012a0 lw t8, 0x48(fp) | t8 = *(arg_48h);
0x004012a4 lb t8, (t8) | t8 = *(t8);
| if (t8 == 0) {
0x004012a8 bnez t8, 0x4012b8 |
0x004012ac nop |
0x004012b0 b 0x4012f8 | goto label_3;
0x004012b4 nop |
| }
0x004012b8 lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str._s_r_n */
0x004012bc addiu a0, t8, 0x26cc | a0 = t8 + 0x26cc;
0x004012c0 lw a1, 0x48(fp) | a1 = *(arg_48h);
0x004012c4 lw t8, -0x7fb4(gp) | t8 = sym.imp.printf;
0x004012c8 move t9, t8 | t9 = t8;
0x004012cc jalr t9 | t9 ();
0x004012d0 nop |
0x004012d4 lw gp, 0x18(fp) | gp = *(arg_18h);
0x004012d8 lw t8, 0x34(fp) | t8 = *(arg_34h);
0x004012dc addiu t8, t8, 1 | t8++;
0x004012e0 sw t8, 0x34(fp) | *(arg_34h) = t8;
| label_4:
0x004012e4 lw v0, 0x34(fp) | v0 = *(arg_34h);
0x004012e8 lw t8, 0x44(fp) | t8 = *(arg_44h);
0x004012ec sltu t8, v0, t8 | t8 = (v0 < t8) ? 1 : 0;
0x004012f0 bnez t8, 0x401288 |
| } while (t8 != 0);
0x004012f4 nop |
| label_3:
0x004012f8 lw t8, 0x38(fp) | t8 = *(arg_38h);
| if (t8 != 0) {
0x004012fc beqz t8, 0x40131c |
0x00401300 nop |
0x00401304 lw a0, 0x38(fp) | a0 = *(arg_38h);
0x00401308 lw t8, -0x7fa0(gp) | t8 = sym.imp.operator_delete___void_;
0x0040130c move t9, t8 | t9 = t8;
0x00401310 jalr t9 | t9 ();
0x00401314 nop |
0x00401318 lw gp, 0x18(fp) | gp = *(arg_18h);
| }
0x0040131c addiu t8, fp, 0x58 | t8 = fp + 0x58;
0x00401320 move a0, t8 | a0 = t8;
0x00401324 lw t8, -0x7fd4(gp) | t8 = *(gp);
0x00401328 move t9, t8 | t9 = t8;
0x0040132c jalr t9 | t9 ();
0x00401330 nop |
0x00401334 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401338 b 0x401500 | goto label_1;
0x0040133c nop |
| label_2:
0x00401340 b 0x401500 | goto label_1;
0x00401344 nop |
| label_0:
0x00401348 lw v0, 0x28(fp) | v0 = *(arg_28h);
0x0040134c addiu t8, zero, 0x194 | t8 = 0x194;
| if (v0 == t8) {
0x00401350 bne v0, t8, 0x40141c |
0x00401354 nop |
0x00401358 addiu t8, zero, 0x194 | t8 = 0x194;
0x0040135c sw t8, 0x64(fp) | *(arg_64h) = t8;
0x00401360 addiu v0, fp, 0x4c | v0 = fp + 0x4c;
0x00401364 addiu t8, fp, 0x64 | t8 = fp + 0x64;
0x00401368 addiu v1, fp, 0xe8 | v1 = fp + 0xe8;
0x0040136c sw v1, 0x10(sp) | *(var_10h) = v1;
0x00401370 addiu v1, zero, 4 | v1 = 4;
0x00401374 sw v1, 0x14(sp) | *(var_14h) = v1;
0x00401378 move a0, v0 | a0 = v0;
0x0040137c lw a1, 0x2c(fp) | a1 = *(arg_2ch);
0x00401380 move a2, t8 | a2 = t8;
0x00401384 addiu a3, zero, 0x84 | a3 = 0x84;
0x00401388 lw t8, -0x7f7c(gp) | t8 = *(gp);
0x0040138c move t9, t8 | t9 = t8;
0x00401390 jalr t9 | t9 ();
0x00401394 nop |
0x00401398 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040139c move t8, v0 | t8 = v0;
0x004013a0 sw t8, 0x30(fp) | *(arg_30h) = t8;
0x004013a4 lw t8, 0x30(fp) | t8 = *(arg_30h);
| if (t8 < 0) {
0x004013a8 bgez t8, 0x4013e4 |
0x004013ac nop |
0x004013b0 lw t8, -0x7f88(gp) | t8 = *((gp - 8162));
0x004013b4 lw t8, (t8) | t8 = *(t8);
0x004013b8 move a0, t8 | a0 = t8;
0x004013bc lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str.OOPS___send_cmd_return__d_n */
0x004013c0 addiu a1, t8, 0x2674 | a1 = t8 + 0x2674;
0x004013c4 lw a2, 0x30(fp) | a2 = *(arg_30h);
0x004013c8 lw t8, -0x7f9c(gp) | t8 = sym.imp.fprintf
0x004013cc move t9, t8 | t9 = t8;
0x004013d0 jalr t9 | t9 ();
0x004013d4 nop |
0x004013d8 lw gp, 0x18(fp) | gp = *(arg_18h);
0x004013dc b 0x401500 | goto label_1;
0x004013e0 nop |
| }
0x004013e4 lw t8, -0x7f88(gp) | t8 = *((gp - 8162));
0x004013e8 lw v0, (t8) | v0 = *(t8);
0x004013ec lw t8, 0xe8(fp) | t8 = *(arg_e8h);
0x004013f0 move a0, v0 | a0 = v0;
0x004013f4 lw v0, -0x7fdc(gp) | v0 = *(gp);
| /* str.size__u_n */
0x004013f8 addiu a1, v0, 0x26d4 | a1 = v0 + 0x26d4;
0x004013fc move a2, t8 | a2 = t8;
0x00401400 lw t8, -0x7f9c(gp) | t8 = sym.imp.fprintf
0x00401404 move t9, t8 | t9 = t8;
0x00401408 jalr t9 | t9 ();
0x0040140c nop |
0x00401410 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401414 b 0x401500 | goto label_1;
0x00401418 nop |
| }
0x0040141c lw t8, 0x28(fp) | t8 = *(arg_28h);
0x00401420 sw t8, 0x64(fp) | *(arg_64h) = t8;
0x00401424 addiu t8, fp, 0x64 | t8 = fp + 0x64;
0x00401428 addiu t8, t8, 4 | t8 += 4;
0x0040142c move a0, t8 | a0 = t8;
0x00401430 move a1, zero | a1 = 0;
0x00401434 addiu a2, zero, 0x80 | a2 = 0x80;
0x00401438 lw t8, -0x7f98(gp) | t8 = sym.imp.memset;
0x0040143c move t9, t8 | t9 = t8;
0x00401440 jalr t9 | t9 ();
0x00401444 nop |
0x00401448 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0040144c lw t8, 0x24(fp) | t8 = *(arg_24h);
| if (t8 != 0) {
0x00401450 beqz t8, 0x401484 |
0x00401454 nop |
0x00401458 addiu t8, zero, 0x7f | t8 = 0x7f;
0x0040145c addiu v0, fp, 0x64 | v0 = fp + 0x64;
0x00401460 addiu v0, v0, 4 | v0 += 4;
0x00401464 move a0, v0 | a0 = v0;
0x00401468 lw a1, 0x24(fp) | a1 = *(arg_24h);
0x0040146c move a2, t8 | a2 = t8;
0x00401470 lw t8, -0x7f90(gp) | t8 = sym.imp.strncpy;
0x00401474 move t9, t8 | t9 = t8;
0x00401478 jalr t9 | t9 ();
0x0040147c nop |
0x00401480 lw gp, 0x18(fp) | gp = *(arg_18h);
| }
0x00401484 addiu v0, fp, 0x4c | v0 = fp + 0x4c;
0x00401488 addiu t8, fp, 0x64 | t8 = fp + 0x64;
0x0040148c addiu v1, fp, 0xe8 | v1 = fp + 0xe8;
0x00401490 sw v1, 0x10(sp) | *(var_10h) = v1;
0x00401494 addiu v1, zero, 0x8c | v1 = 0x8c;
0x00401498 sw v1, 0x14(sp) | *(var_14h) = v1;
0x0040149c move a0, v0 | a0 = v0;
0x004014a0 lw a1, 0x2c(fp) | a1 = *(arg_2ch);
0x004014a4 move a2, t8 | a2 = t8;
0x004014a8 addiu a3, zero, 0x84 | a3 = 0x84;
0x004014ac lw t8, -0x7f7c(gp) | t8 = *(gp);
0x004014b0 move t9, t8 | t9 = t8;
0x004014b4 jalr t9 | t9 ();
0x004014b8 nop |
0x004014bc lw gp, 0x18(fp) | gp = *(arg_18h);
0x004014c0 move t8, v0 | t8 = v0;
0x004014c4 sw t8, 0x30(fp) | *(arg_30h) = t8;
0x004014c8 lw t8, 0x30(fp) | t8 = *(arg_30h);
| if (t8 < 0) {
0x004014cc bgez t8, 0x401500 |
0x004014d0 nop |
0x004014d4 lw t8, -0x7f88(gp) | t8 = *((gp - 8162));
0x004014d8 lw t8, (t8) | t8 = *(t8);
0x004014dc move a0, t8 | a0 = t8;
0x004014e0 lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str.OOPS___send_cmd_return__d_n */
0x004014e4 addiu a1, t8, 0x2674 | a1 = t8 + 0x2674;
0x004014e8 lw a2, 0x30(fp) | a2 = *(arg_30h);
0x004014ec lw t8, -0x7f9c(gp) | t8 = sym.imp.fprintf
0x004014f0 move t9, t8 | t9 = t8;
0x004014f4 jalr t9 | t9 ();
0x004014f8 nop |
0x004014fc lw gp, 0x18(fp) | gp = *(arg_18h);
| }
| label_1:
0x00401500 lw s0, 0x30(fp) | s0 = *(arg_30h);
0x00401504 addiu t8, fp, 0x4c | t8 = fp + 0x4c;
0x00401508 move a0, t8 | a0 = t8;
0x0040150c lw t8, -0x7fd4(gp) | t8 = *(gp);
0x00401510 move t9, t8 | t9 = t8;
0x00401514 jalr t9 | t9 ();
0x00401518 nop |
0x0040151c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00401520 move t8, s0 | t8 = s0;
0x00401524 move v0, t8 | v0 = t8;
0x00401528 lw t8, -0x7f6c(gp) | t8 = *((gp - 8155));
0x0040152c lw v1, 0x174(fp) | v1 = *(arg_174h);
0x00401530 lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x00401534 beq v1, t8, 0x4015bc |
0x00401538 nop |
0x0040153c b 0x4015ac | goto label_5;
0x00401540 nop |
| label_5:
0x004015ac lw t8, -0x7f84(gp) | t8 = sym.imp.__stack_chk_fail;
0x004015b0 move t9, t8 | t9 = t8;
0x004015b4 jalr t9 | t9 ();
0x004015b8 nop |
| }
0x004015bc move sp, fp |
0x004015c0 lw ra, 0x184(sp) | ra = *(var_184h);
0x004015c4 lw fp, 0x180(sp) | fp = *(var_180h);
0x004015c8 lw s0, 0x17c(sp) | s0 = *(var_17ch);
0x004015cc addiu sp, sp, 0x188 |
0x004015d0 jr ra | return v1;
0x004015d4 nop |
| }
[*] Function fprintf used 9 times send_cmd