[*] Binary protection state of motion
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function strcat tear down of motion
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/motion @ 0x5f70 */
| #include <stdint.h>
|
; (fcn) fcn.00005f70 () | void fcn_00005f70 () {
0x00005f70 lui gp, 2 |
0x00005f74 addiu gp, gp, 0x6250 |
0x00005f78 addu gp, gp, t9 | gp += t9;
0x00005f7c addiu sp, sp, -0x178 |
0x00005f80 lw t9, -0x7ee8(gp) | t9 = sym.imp.__fdelt_chk;
0x00005f84 sw s0, 0x150(sp) | *(var_150h) = s0;
0x00005f88 lw s0, -0x7d80(gp) | s0 = *((gp - 8032));
0x00005f8c sw s6, 0x168(sp) | *(var_168h) = s6;
0x00005f90 lw s6, -0x7fdc(gp) | s6 = *((gp - 8183));
0x00005f94 lw v0, (s0) | v0 = *(s0);
0x00005f98 sw s4, 0x160(sp) | *(var_160h) = s4;
0x00005f9c move s4, a0 | s4 = a0;
0x00005fa0 lw a0, 0x4058(s6) | a0 = *((s6 + 4118));
0x00005fa4 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00005fa8 sw ra, 0x174(sp) | *(var_174h) = ra;
0x00005fac sw s3, 0x15c(sp) | *(var_15ch) = s3;
0x00005fb0 sw s2, 0x158(sp) | *(var_158h) = s2;
0x00005fb4 sw s1, 0x154(sp) | *(var_154h) = s1;
0x00005fb8 sw a1, 0x1c(sp) | *(var_1ch) = a1;
0x00005fbc sw fp, 0x170(sp) | *(var_170h) = fp;
0x00005fc0 sw s7, 0x16c(sp) | *(var_16ch) = s7;
0x00005fc4 sw s5, 0x164(sp) | *(var_164h) = s5;
0x00005fc8 sw v0, 0x14c(sp) | *(var_14ch) = v0;
0x00005fcc move s3, a2 | s3 = a2;
0x00005fd0 move s2, a3 | s2 = a3;
0x00005fd4 jalr t9 | t9 ();
0x00005fd8 lw gp, 0x10(sp) | gp = *(var_10h);
0x00005fdc addiu s1, sp, 0x4c | s1 = sp + 0x4c;
0x00005fe0 lw a0, 0x4058(s6) | a0 = *((s6 + 4118));
0x00005fe4 lw t9, -0x7c44(gp) | t9 = sym.imp.recv;
0x00005fe8 move a3, zero | a3 = 0;
0x00005fec addiu a2, zero, 0xff | a2 = 0xff;
0x00005ff0 move a1, s1 | a1 = s1;
0x00005ff4 jalr t9 | t9 ();
0x00005ff8 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x00005ffc bltz v0, 0x6290 | goto label_17;
| }
0x00006000 addiu v1, sp, 0x150 | v1 = sp + 0x150;
0x00006004 addu v0, v1, v0 | v0 = v1 + v0;
0x00006008 lw v1, -0x7fdc(gp) | v1 = *((gp - 8183));
0x0000600c sb zero, -0x104(v0) | *(v0) = 0;
| /* esilref: 'START' */
0x00006010 addiu v1, v1, 0x4030 | v1 += 0x4030;
0x00006014 addiu v0, sp, 0x24 | v0 = sp + 0x24;
0x00006018 addiu t0, v1, 0x20 | t0 = v1 + 0x20;
| do {
0x0000601c lw a3, (v1) | a3 = *(v1);
0x00006020 lw a2, 4(v1) | a2 = *((v1 + 1));
0x00006024 lw a1, 8(v1) | a1 = *((v1 + 2));
0x00006028 lw a0, 0xc(v1) | a0 = *((v1 + 3));
0x0000602c addiu v1, v1, 0x10 | v1 += 0x10;
0x00006030 sw a3, (v0) | *(v0) = a3;
0x00006034 sw a2, 4(v0) | *((v0 + 1)) = a2;
0x00006038 sw a1, 8(v0) | *((v0 + 2)) = a1;
0x0000603c sw a0, 0xc(v0) | *((v0 + 3)) = a0;
0x00006040 addiu v0, v0, 0x10 | v0 += 0x10;
0x00006044 bne v1, t0, 0x601c |
| } while (v1 != t0);
0x00006048 lw a0, (v1) | a0 = *(v1);
0x0000604c lw s7, -0x7fd8(gp) | s7 = *(gp);
0x00006050 lw v1, 4(v1) | v1 = *((v1 + 1));
0x00006054 lw t9, -0x7e24(gp) | t9 = sym.imp.strtok_r;
0x00006058 addiu s6, sp, 0x20 | s6 = sp + 0x20;
0x0000605c sw a0, (v0) | *(v0) = a0;
0x00006060 addiu a1, s7, 0xe88 | a1 = s7 + 0xe88;
0x00006064 sw v1, 4(v0) | *((v0 + 1)) = v1;
0x00006068 move a2, s6 | a2 = s6;
0x0000606c move a0, s1 | a0 = s1;
0x00006070 jalr t9 | t9 ();
0x00006074 lw a1, 0x24(sp) | a1 = *(var_24h_2);
0x00006078 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000607c move fp, v0 | fp = v0;
| if (a1 == 0) {
0x00006080 beqz a1, 0x65c4 | goto label_18;
| }
0x00006084 addiu s5, sp, 0x2c | s5 = sp + 0x2c;
0x00006088 move s1, zero | s1 = 0;
0x0000608c b 0x60a0 |
| while (v0 != 0) {
0x00006090 addiu s5, s5, 8 | s5 += 8;
0x00006094 lw a1, -8(s5) | a1 = *((s5 - 2));
0x00006098 addiu s1, s1, 1 | s1++;
| if (a1 == 0) {
0x0000609c beqz a1, 0x60d0 | goto label_10;
| }
0x000060a0 lw t9, -0x7d5c(gp) | t9 = sym.imp.strlen;
0x000060a4 move a0, a1 | a0 = a1;
0x000060a8 sw a1, 0x18(sp) | *(var_18h_3) = a1;
0x000060ac jalr t9 | t9 ();
0x000060b0 lw gp, 0x10(sp) | gp = *(var_10h);
0x000060b4 lw a1, 0x18(sp) | a1 = *(var_18h_3);
0x000060b8 move a2, v0 | a2 = v0;
0x000060bc lw t9, -0x7e7c(gp) | t9 = sym.imp.strncmp;
0x000060c0 move a0, fp | a0 = fp;
0x000060c4 jalr t9 | t9 ();
0x000060c8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000060cc bnez v0, 0x6090 |
| }
| label_10:
0x000060d0 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x000060d4 addiu v0, sp, 0x150 | v0 = sp + 0x150;
0x000060d8 sll s1, s1, 3 | s1 <<= 3;
0x000060dc lw t9, -0x7e24(gp) | t9 = sym.imp.strtok_r;
0x000060e0 addu s1, v0, s1 | s1 = v0 + s1;
0x000060e4 move a2, s6 | a2 = s6;
0x000060e8 addiu a1, a1, 0xe8c | a1 += 0xe8c;
0x000060ec move a0, zero | a0 = 0;
0x000060f0 lw s1, -0x128(s1) | s1 = *((s1 - 74));
0x000060f4 jalr t9 | t9 ();
0x000060f8 lw v1, 0x20(sp) | v1 = *(var_20h_3);
0x000060fc lw gp, 0x10(sp) | gp = *(var_10h);
0x00006100 move s5, v0 | s5 = v0;
| if (v1 != 0) {
0x00006104 beqz v1, 0x6124 |
0x00006108 lbu v0, (v1) | v0 = *(v1);
0x0000610c addiu a0, zero, 0x45 | a0 = 0x45;
0x00006110 lw a1, -0x7fd8(gp) | a1 = *(gp);
| if (v0 == a0) {
0x00006114 beq v0, a0, 0x62e0 | goto label_19;
| }
0x00006118 addiu v1, zero, 0x2a | v1 = 0x2a;
0x0000611c addiu v0, zero, 1 | v0 = 1;
| if (v0 == v1) {
0x00006120 beq v0, v1, 0x6254 | goto label_20;
| }
| }
0x00006124 lw a1, -0x7fd8(gp) | a1 = *(gp);
| if (s5 == 0) {
0x00006128 beqz s5, 0x61bc | goto label_21;
| }
0x0000612c lw t9, -0x7e7c(gp) | t9 = sym.imp.strncmp;
0x00006130 addiu a2, zero, 8 | a2 = 8;
| /* esilref: 'triggerd' */
0x00006134 addiu a1, a1, 0xe94 | a1 += 0xe94;
0x00006138 move a0, s5 | a0 = s5;
0x0000613c jalr t9 | t9 ();
0x00006140 move fp, v0 | fp = v0;
0x00006144 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00006148 beqz v0, 0x63b8 | goto label_22;
| }
0x0000614c lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00006150 lw t9, -0x7e7c(gp) | t9 = sym.imp.strncmp;
0x00006154 addiu a2, zero, 5 | a2 = 5;
| /* str.infod */
0x00006158 addiu a1, a1, 0xea0 | a1 += 0xea0;
0x0000615c move a0, s5 | a0 = s5;
0x00006160 jalr t9 | t9 ();
0x00006164 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x00006168 bnez v0, 0x61bc | goto label_21;
| }
0x0000616c lw v0, -0x7fb0(gp) | v0 = *(gp);
| label_2:
0x00006170 sltiu s1, s1, 1 | s1 = (s1 < 1) ? 1 : 0;
0x00006174 sb s1, (v0) | *(v0) = s1;
0x00006178 addiu v0, zero, 1 | v0 = 1;
0x0000617c sb v0, (s2) | *(s2) = v0;
| do {
| label_0:
0x00006180 lw v1, 0x14c(sp) | v1 = *(var_14ch);
0x00006184 lw v0, (s0) | v0 = *(s0);
0x00006188 lw ra, 0x174(sp) | ra = *(var_174h);
| if (v1 != v0) {
0x0000618c bne v1, v0, 0x65ec | goto label_23;
| }
0x00006190 lw fp, 0x170(sp) | fp = *(var_170h);
0x00006194 lw s7, 0x16c(sp) | s7 = *(var_16ch);
0x00006198 lw s6, 0x168(sp) | s6 = *(var_168h);
0x0000619c lw s5, 0x164(sp) | s5 = *(var_164h);
0x000061a0 lw s4, 0x160(sp) | s4 = *(var_160h);
0x000061a4 lw s3, 0x15c(sp) | s3 = *(var_15ch);
0x000061a8 lw s2, 0x158(sp) | s2 = *(var_158h);
0x000061ac lw s1, 0x154(sp) | s1 = *(var_154h);
0x000061b0 lw s0, 0x150(sp) | s0 = *(var_150h);
0x000061b4 addiu sp, sp, 0x178 |
0x000061b8 jr ra | return v0;
| label_21:
0x000061bc addiu v0, zero, 2 | v0 = 2;
0x000061c0 addiu v0, zero, 3 | v0 = 3;
| if (s1 == v0) {
0x000061c4 beq s1, v0, 0x6490 | goto label_24;
| }
0x000061c8 lw t9, -0x7e24(gp) | t9 = sym.imp.strtok_r;
0x000061cc bne s1, v0, 0x6180 |
| } while (s1 != v0);
0x000061d0 move a2, s6 | a2 = s6;
0x000061d4 addiu a1, s7, 0xe88 | a1 = s7 + 0xe88;
0x000061d8 move a0, s5 | a0 = s5;
0x000061dc jalr t9 | t9 ();
0x000061e0 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x000061e4 beqz v0, 0x6180 | goto label_0;
| }
0x000061e8 lw t9, -0x7cd8(gp) | t9 = sym.imp.strtol;
0x000061ec addiu a2, zero, 0xa | a2 = 0xa;
0x000061f0 move a1, zero | a1 = 0;
0x000061f4 move a0, v0 | a0 = v0;
0x000061f8 jalr t9 | t9 ();
0x000061fc lw gp, 0x10(sp) | gp = *(var_10h);
0x00006200 move a2, s6 | a2 = s6;
0x00006204 addiu a1, s7, 0xe88 | a1 = s7 + 0xe88;
0x00006208 lw t9, -0x7e24(gp) | t9 = sym.imp.strtok_r;
0x0000620c move a0, zero | a0 = 0;
0x00006210 move fp, v0 | fp = v0;
0x00006214 jalr t9 | t9 ();
0x00006218 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0000621c beqz v0, 0x6370 | goto label_25;
| }
0x00006220 lw t9, -0x7cd8(gp) | t9 = sym.imp.strtol;
0x00006224 addiu a2, zero, 0xa | a2 = 0xa;
0x00006228 move a1, zero | a1 = 0;
0x0000622c move a0, v0 | a0 = v0;
0x00006230 jalr t9 | t9 ();
0x00006234 move s6, v0 | s6 = v0;
0x00006238 lw gp, 0x10(sp) | gp = *(var_10h);
| if (fp >= 0) {
0x0000623c bgez fp, 0x6418 | goto label_26;
| }
0x00006240 addiu v0, zero, -1 | v0 = -1;
| label_1:
0x00006244 addiu v0, zero, -2 | v0 = -2;
| if (fp != v0) {
0x00006248 bne fp, v0, 0x6384 | goto label_27;
| }
0x0000624c addiu v0, zero, 1 | v0 = 1;
| if (s6 != fp) {
0x00006250 bne s6, fp, 0x6180 | goto label_0;
| }
| label_20:
0x00006254 lw s2, -0x7f4c(gp) | s2 = *(gp);
| if (s1 != v0) {
0x00006258 bne s1, v0, 0x6180 | goto label_0;
| }
0x0000625c lw a0, (s2) | a0 = *(s2);
0x00006260 addiu v0, zero, 1 | v0 = 1;
| if (a0 == 0) {
0x00006264 beqz a0, 0x6288 | goto label_5;
| }
| do {
0x00006268 lw v0, 4(a0) | v0 = *((a0 + 1));
0x0000626c lw t9, -0x7ce0(gp) | t9 = sym.imp.free;
0x00006270 sw v0, (s2) | *(s2) = v0;
0x00006274 jalr t9 | t9 ();
0x00006278 lw a0, (s2) | a0 = *(s2);
0x0000627c lw gp, 0x10(sp) | gp = *(var_10h);
0x00006280 bnez a0, 0x6268 |
| } while (a0 != 0);
| label_4:
0x00006284 addiu v0, zero, 1 | v0 = 1;
| label_5:
0x00006288 sb v0, (s4) | *(s4) = v0;
0x0000628c b 0x6180 | goto label_0;
| label_17:
0x00006290 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x00006294 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00006298 lw a0, -0x7fd8(gp) | a0 = *(gp);
0x0000629c lw t9, -0x7f48(gp) | t9 = sym.dbg_add;
0x000062a0 addiu a3, zero, 0x2db | a3 = 0x2db;
| /* str.read_request */
0x000062a4 addiu a2, a2, 0x11b4 | a2 += 0x11b4;
| /* str.motiondata.c */
0x000062a8 addiu a1, a1, 0xe58 | a1 += 0xe58;
| /* str._s:_s__:_d:_ */
0x000062ac addiu a0, a0, 0xe68 | a0 += 0xe68;
0x000062b0 bal 0x5e50 | sym_dbg_add ();
0x000062b4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000062b8 lw a0, -0x7fd8(gp) | a0 = *(gp);
0x000062bc lw t9, -0x7f48(gp) | t9 = sym.dbg_add;
| /* str.recv___failed */
0x000062c0 addiu a0, a0, 0xe78 | a0 += 0xe78;
0x000062c4 bal 0x5e50 | sym_dbg_add ();
0x000062c8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000062cc lw t9, -0x7f44(gp) | t9 = sym.dbg_print;
0x000062d0 addiu a0, zero, 2 | a0 = 2;
0x000062d4 bal 0x5f18 | sym_dbg_print ();
0x000062d8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000062dc b 0x6180 | goto label_0;
| label_19:
0x000062e0 lw t9, -0x7e24(gp) | t9 = sym.imp.strtok_r;
0x000062e4 addiu v1, v1, 1 | v1++;
0x000062e8 move a2, s6 | a2 = s6;
0x000062ec addiu a1, a1, 0xe90 | a1 += 0xe90;
0x000062f0 move a0, zero | a0 = 0;
0x000062f4 sw v1, 0x20(sp) | *(var_20h_3) = v1;
0x000062f8 jalr t9 | t9 ();
0x000062fc lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00006300 beqz v0, 0x6580 | goto label_28;
| }
0x00006304 lw t9, -0x7cd8(gp) | t9 = sym.imp.strtol;
0x00006308 addiu a2, zero, 0xa | a2 = 0xa;
0x0000630c move a1, zero | a1 = 0;
0x00006310 move a0, v0 | a0 = v0;
0x00006314 jalr t9 | t9 ();
0x00006318 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000631c move a2, s6 | a2 = s6;
0x00006320 move a0, zero | a0 = 0;
0x00006324 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00006328 lw t9, -0x7e24(gp) | t9 = sym.imp.strtok_r;
0x0000632c addiu a1, a1, 0x1160 | a1 += 0x1160;
0x00006330 move fp, v0 | fp = v0;
0x00006334 jalr t9 | t9 ();
0x00006338 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x0000633c beqz v0, 0x6368 |
0x00006340 lw t9, -0x7cd8(gp) | t9 = sym.imp.strtol;
0x00006344 addiu a2, zero, 0xa | a2 = 0xa;
0x00006348 move a1, zero | a1 = 0;
0x0000634c move a0, v0 | a0 = v0;
0x00006350 jalr t9 | t9 ();
0x00006354 move s6, v0 | s6 = v0;
0x00006358 lw gp, 0x10(sp) | gp = *(var_10h);
| if (fp >= 0) {
0x0000635c bgez fp, 0x63f8 | goto label_9;
| }
0x00006360 addiu v0, zero, -1 | v0 = -1;
0x00006364 b 0x6244 | goto label_1;
| }
0x00006368 move s6, zero | s6 = 0;
| if (fp >= 0) {
0x0000636c bgez fp, 0x63f8 | goto label_9;
| }
| label_25:
0x00006370 addiu v0, zero, -1 | v0 = -1;
| if (fp == v0) {
0x00006374 beq fp, v0, 0x6180 | goto label_0;
| }
0x00006378 nop |
0x0000637c move s6, zero | s6 = 0;
| label_11:
0x00006380 addiu v0, zero, -2 | v0 = -2;
| label_27:
0x00006384 addiu v0, zero, -3 | v0 = -3;
| if (fp == v0) {
0x00006388 bne fp, v0, 0x63a8 |
| label_3:
0x0000638c lw v0, -0x7fac(gp) | v0 = *(gp);
0x00006390 sltiu s1, s1, 1 | s1 = (s1 < 1) ? 1 : 0;
0x00006394 addu v0, v0, s6 | v0 += s6;
0x00006398 sb s1, (v0) | *(v0) = s1;
0x0000639c addiu v0, zero, 1 | v0 = 1;
0x000063a0 sb v0, (s3) | *(s3) = v0;
0x000063a4 b 0x6180 | goto label_0;
| }
0x000063a8 lw v0, -0x7fb0(gp) | v0 = *(gp);
| if (fp == v0) {
0x000063ac beq fp, v0, 0x6170 | goto label_2;
| }
0x000063b0 b 0x6180 | goto label_0;
0x000063b4 nop |
| label_22:
0x000063b8 lw t9, -0x7e24(gp) | t9 = sym.imp.strtok_r;
0x000063bc move a0, s5 | a0 = s5;
0x000063c0 move a2, s6 | a2 = s6;
0x000063c4 addiu a1, s7, 0xe88 | a1 = s7 + 0xe88;
0x000063c8 jalr t9 | t9 ();
0x000063cc lw a0, 0x20(sp) | a0 = *(var_20h_3);
0x000063d0 lw gp, 0x10(sp) | gp = *(var_10h);
| if (a0 != 0) {
0x000063d4 beqz a0, 0x63f4 |
0x000063d8 lw t9, -0x7cd8(gp) | t9 = sym.imp.strtol;
0x000063dc addiu a2, zero, 0xa | a2 = 0xa;
0x000063e0 move a1, zero | a1 = 0;
0x000063e4 jalr t9 | t9 ();
0x000063e8 move s6, v0 | s6 = v0;
0x000063ec lw gp, 0x10(sp) | gp = *(var_10h);
0x000063f0 b 0x638c | goto label_3;
| }
0x000063f4 move s6, zero | s6 = 0;
| label_9:
0x000063f8 addiu v0, zero, 1 | v0 = 1;
| if (s1 == 0) {
0x000063fc beqz s1, 0x6460 | goto label_29;
| }
0x00006400 addiu v0, zero, 2 | v0 = 2;
| if (s1 == v0) {
0x00006404 beq s1, v0, 0x64e0 | goto label_30;
| }
0x00006408 addiu v0, zero, 3 | v0 = 3;
| if (s1 == v0) {
0x0000640c beq s1, v0, 0x64b0 | goto label_31;
| }
| if (s1 != v0) {
0x00006410 bne s1, v0, 0x6180 | goto label_0;
| }
0x00006414 nop |
| label_26:
0x00006418 sll s1, fp, 1 | s1 = fp << 1;
0x0000641c lw s2, -0x7fb4(gp) | s2 = *(gp);
0x00006420 addu s1, s1, fp | s1 += fp;
0x00006424 sll s1, s1, 2 | s1 <<= 2;
0x00006428 lw t9, -0x7cd0(gp) | t9 = sym.imp.gettimeofday;
0x0000642c addiu a0, s1, 4 | a0 = s1 + 4;
0x00006430 addu s1, s2, s1 | s1 = s2 + s1;
0x00006434 move a1, zero | a1 = 0;
0x00006438 addu a0, s2, a0 | a0 = s2 + a0;
0x0000643c jalr t9 | t9 ();
0x00006440 lw v0, 4(s1) | v0 = *((s1 + 1));
0x00006444 lw v1, 0x1c(sp) | v1 = *(var_1ch);
0x00006448 addu v0, v0, s6 | v0 += s6;
0x0000644c lw gp, 0x10(sp) | gp = *(var_10h);
0x00006450 sw v0, 4(s1) | *((s1 + 1)) = v0;
0x00006454 addiu v0, zero, 1 | v0 = 1;
0x00006458 sb v0, (v1) | *(v1) = v0;
0x0000645c b 0x6180 | goto label_0;
| label_29:
0x00006460 lw t9, -0x7dd4(gp) | t9 = sym.imp.malloc;
0x00006464 addiu a0, zero, 8 | a0 = 8;
0x00006468 jalr t9 | t9 ();
0x0000646c lw gp, 0x10(sp) | gp = *(var_10h);
0x00006470 sw fp, (v0) | *(v0) = fp;
0x00006474 lw v1, -0x7f4c(gp) | v1 = *(gp);
0x00006478 lw a0, (v1) | a0 = *(v1);
0x0000647c sw v0, (v1) | *(v1) = v0;
0x00006480 sw a0, 4(v0) | *((v0 + 1)) = a0;
0x00006484 addiu v0, zero, 1 | v0 = 1;
0x00006488 sb v0, (s4) | *(s4) = v0;
0x0000648c b 0x6180 | goto label_0;
| label_24:
0x00006490 lw t9, -0x7cd8(gp) | t9 = sym.imp.strtol;
0x00006494 addiu a2, zero, 0xa | a2 = 0xa;
0x00006498 move a1, zero | a1 = 0;
0x0000649c move a0, s5 | a0 = s5;
0x000064a0 jalr t9 | t9 ();
0x000064a4 move fp, v0 | fp = v0;
0x000064a8 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x000064ac bltz v0, 0x65d8 | goto label_32;
| }
| label_31:
0x000064b0 sll v0, fp, 1 | v0 = fp << 1;
0x000064b4 addu fp, v0, fp | fp = v0 + fp;
0x000064b8 lw v0, -0x7fb4(gp) | v0 = *(gp);
0x000064bc sll fp, fp, 2 | fp <<= 2;
0x000064c0 addu v0, v0, fp | v0 += fp;
0x000064c4 addiu v1, zero, 1 | v1 = 1;
0x000064c8 sb v1, (v0) | *(v0) = v1;
0x000064cc sw zero, 4(v0) | *((v0 + 1)) = 0;
0x000064d0 sw zero, 8(v0) | *((v0 + 2)) = 0;
0x000064d4 lw v0, 0x1c(sp) | v0 = *(var_1ch);
0x000064d8 sb v1, (v0) | *(v0) = v1;
0x000064dc b 0x6180 | goto label_0;
| label_30:
0x000064e0 lw s2, -0x7f4c(gp) | s2 = *(gp);
0x000064e4 lw v0, (s2) | v0 = *(s2);
0x000064e8 move s3, zero | s3 = 0;
| if (v0 == 0) {
0x000064ec beqz v0, 0x6284 | goto label_4;
| }
0x000064f0 lw v1, (v0) | v1 = *(v0);
0x000064f4 lw s1, 4(v0) | s1 = *((v0 + 1));
| if (v1 == fp) {
0x000064f8 beq v1, fp, 0x6518 | goto label_33;
| }
| label_6:
0x000064fc move s3, v0 | s3 = v0;
0x00006500 move v0, s1 | v0 = s1;
| if (s1 == 0) {
| label_7:
0x00006504 beql s1, zero, 0x6288 | goto label_5;
| }
0x00006508 addiu v0, zero, 1 | v0 = 1;
0x0000650c lw v1, (v0) | v1 = *(v0);
0x00006510 lw s1, 4(v0) | s1 = *((v0 + 1));
| if (v1 != fp) {
0x00006514 bne v1, fp, 0x64fc | goto label_6;
| }
| label_33:
0x00006518 lw t9, -0x7ce0(gp) | t9 = sym.imp.free;
| if (s3 != 0) {
0x0000651c beqz s3, 0x6544 |
0x00006520 lw v0, 4(s3) | v0 = *((s3 + 1));
0x00006524 move a0, v0 | a0 = v0;
0x00006528 lw v0, 4(v0) | v0 = *((v0 + 1));
0x0000652c sw v0, 4(s3) | *((s3 + 1)) = v0;
0x00006530 jalr t9 | t9 ();
0x00006534 lw gp, 0x10(sp) | gp = *(var_10h);
0x00006538 move v0, s1 | v0 = s1;
0x0000653c b 0x6504 | goto label_7;
| label_8:
0x00006540 move s1, v1 | s1 = v1;
| }
0x00006544 lw a0, (s2) | a0 = *(s2);
0x00006548 lw t9, -0x7ce0(gp) | t9 = sym.imp.free;
| if (a0 != 0) {
0x0000654c beqz a0, 0x6558 |
0x00006550 lw v0, 4(a0) | v0 = *((a0 + 1));
0x00006554 sw v0, (s2) | *(s2) = v0;
| }
0x00006558 jalr t9 | t9 ();
0x0000655c nop |
0x00006560 lw gp, 0x10(sp) | gp = *(var_10h);
| if (s1 == 0) {
0x00006564 beqz s1, 0x6284 | goto label_4;
| }
0x00006568 lw v0, (s1) | v0 = *(s1);
0x0000656c lw v1, 4(s1) | v1 = *((s1 + 1));
| if (v0 == fp) {
0x00006570 beq v0, fp, 0x6540 | goto label_8;
| }
0x00006574 move v0, s1 | v0 = s1;
0x00006578 move s1, v1 | s1 = v1;
0x0000657c b 0x64fc | goto label_6;
| label_28:
0x00006580 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00006584 lw t9, -0x7e24(gp) | t9 = sym.imp.strtok_r;
0x00006588 move a2, s6 | a2 = s6;
0x0000658c addiu a1, a1, 0x1160 | a1 += 0x1160;
0x00006590 move a0, zero | a0 = 0;
0x00006594 jalr t9 | t9 ();
0x00006598 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x0000659c beqz v0, 0x65cc |
0x000065a0 lw t9, -0x7cd8(gp) | t9 = sym.imp.strtol;
0x000065a4 addiu a2, zero, 0xa | a2 = 0xa;
0x000065a8 move a1, zero | a1 = 0;
0x000065ac move a0, v0 | a0 = v0;
0x000065b0 jalr t9 | t9 ();
0x000065b4 move s6, v0 | s6 = v0;
0x000065b8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000065bc move fp, zero | fp = 0;
0x000065c0 b 0x63f8 | goto label_9;
| label_18:
0x000065c4 move s1, zero | s1 = 0;
0x000065c8 b 0x60d0 | goto label_10;
| }
0x000065cc move s6, zero | s6 = 0;
0x000065d0 move fp, zero | fp = 0;
0x000065d4 b 0x63f8 | goto label_9;
| label_32:
0x000065d8 addiu v0, zero, -1 | v0 = -1;
| if (fp == v0) {
0x000065dc beq fp, v0, 0x6180 | goto label_0;
| }
0x000065e0 nop |
0x000065e4 addiu s6, zero, -1 | s6 = -1;
0x000065e8 b 0x6380 | goto label_11;
| label_23:
0x000065ec lw t9, -0x7df4(gp) | t9 = sym.imp.__stack_chk_fail;
0x000065f0 jalr t9 | t9 ();
0x000065f4 nop |
0x000065f8 lui gp, 2 |
0x000065fc addiu gp, gp, 0x5bc8 |
0x00006600 addu gp, gp, t9 | gp += t9;
0x00006604 addiu sp, sp, -0x1080 |
0x00006608 lw t9, -0x7f40(gp) | t9 = sym.get_http_response;
0x0000660c sw s5, 0x106c(sp) | *(var_106ch) = s5;
0x00006610 lw s5, -0x7d80(gp) | s5 = *((gp - 8032));
0x00006614 sw gp, 0x20(sp) | *(var_20h) = gp;
0x00006618 sw ra, 0x107c(sp) | *(var_107ch) = ra;
0x0000661c lw v0, (s5) | v0 = *(s5);
0x00006620 sw s6, 0x1070(sp) | *(var_1070h) = s6;
0x00006624 sw s4, 0x1068(sp) | *(var_1068h) = s4;
0x00006628 sw s3, 0x1064(sp) | *(var_1064h) = s3;
0x0000662c sw s2, 0x1060(sp) | *(var_1060h) = s2;
0x00006630 move s3, a0 | s3 = a0;
0x00006634 sw s1, 0x105c(sp) | *(var_105ch) = s1;
0x00006638 sw s0, 0x1058(sp) | *(var_1058h) = s0;
0x0000663c addiu a0, zero, 5 | a0 = 5;
0x00006640 sw fp, 0x1078(sp) | *(var_1078h) = fp;
0x00006644 sw s7, 0x1074(sp) | *(var_1074h) = s7;
0x00006648 sw v0, 0x1054(sp) | *(var_1054h) = v0;
0x0000664c sb zero, 0x54(sp) | *(var_54h) = 0;
0x00006650 move s0, a1 | s0 = a1;
0x00006654 bal 0x7ef8 | sym_get_http_response ();
0x00006658 lw gp, 0x20(sp) | gp = *(var_20h);
0x0000665c addiu s2, sp, 0x54 | s2 = sp + 0x54;
0x00006660 move a1, v0 | a1 = v0;
0x00006664 lw t9, -0x7cc8(gp) | t9 = sym.imp.__strcat_chk
0x00006668 move a0, s2 | a0 = s2;
0x0000666c addiu a2, zero, 0x1000 | a2 = 0x1000;
0x00006670 jalr t9 | t9 ();
0x00006674 lw gp, 0x20(sp) | gp = *(var_20h);
0x00006678 sll s6, s3, 1 | s6 = s3 << 1;
0x0000667c addu s6, s6, s3 | s6 += s3;
0x00006680 sll v0, s6, 2 | v0 = s6 << 2;
0x00006684 lw s6, -0x7fdc(gp) | s6 = *((gp - 8183));
0x00006688 lw s4, -0x7fd8(gp) | s4 = *(gp);
0x0000668c addiu s6, s6, 0x4758 | s6 += 0x4758;
0x00006690 addiu s0, s0, 0xc | s0 += 0xc;
0x00006694 move s1, zero | s1 = 0;
0x00006698 move a0, zero | a0 = 0;
0x0000669c move a1, zero | a1 = 0;
0x000066a0 addu s6, s6, v0 | s6 += v0;
| /* str.group_d_level_d_threshold_d__r_n */
0x000066a4 addiu s4, s4, 0xeec | s4 += 0xeec;
| do {
| label_12:
0x000066a8 lbu v0, 0x44(s0) | v0 = *((s0 + 68));
| if (v0 != 0) {
0x000066ac beql v0, zero, 0x6748 |
0x000066b0 addiu s1, s1, 1 | s1++;
0x000066b4 lw v1, 8(s6) | v1 = *((s6 + 2));
0x000066b8 srlv v0, v1, s1 | v0 = v1 >> s1;
0x000066bc andi v0, v0, 1 | v0 &= 1;
| if (v0 == 0) {
0x000066c0 beql v0, zero, 0x6748 | goto label_34;
| }
0x000066c4 addiu s1, s1, 1 | s1++;
0x000066c8 lbu s7, 0x24(s0) | s7 = *((s0 + 36));
| if (s7 == 0) {
0x000066cc beql s7, zero, 0x6748 | goto label_34;
| }
0x000066d0 addiu s1, s1, 1 | s1++;
0x000066d4 lw v0, 0x48(s0) | v0 = *((s0 + 18));
0x000066d8 addiu s1, s1, 1 | s1++;
| if (v0 == 0) {
0x000066dc bnel v0, zero, 0x67a4 | goto label_35;
| }
0x000066e0 srl v1, v1, 0xa | v1 >>= 0xa;
0x000066e4 lw v0, 0x34(s0) | v0 = *((s0 + 13));
0x000066e8 lw a0, 0x38(s0) | a0 = *((s0 + 14));
| if (v1 != 0) {
0x000066ec bnez v1, 0x67bc | goto label_36;
| }
0x000066f0 lw v1, (s0) | v1 = *(s0);
0x000066f4 lw t9, -0x7e84(gp) | t9 = sym.imp.__snprintf_chk;
0x000066f8 addiu fp, sp, 0x2c | fp = sp + 0x2c;
0x000066fc sw a0, 0x1c(sp) | *(var_1ch_3) = a0;
0x00006700 sw v0, 0x18(sp) | *(var_18h_2) = v0;
0x00006704 sw v1, 0x14(sp) | *(var_14h) = v1;
0x00006708 sw s4, 0x10(sp) | *(var_10h_3) = s4;
0x0000670c addiu a3, zero, 0x28 | a3 = 0x28;
0x00006710 addiu a2, zero, 1 | a2 = 1;
0x00006714 addiu a1, zero, 0x28 | a1 = 0x28;
0x00006718 move a0, fp | a0 = fp;
0x0000671c jalr t9 | t9 ();
0x00006720 lw gp, 0x20(sp) | gp = *(var_20h);
| label_14:
0x00006724 lw t9, -0x7cc8(gp) | t9 = sym.imp.__strcat_chk
0x00006728 move a1, fp | a1 = fp;
0x0000672c move a0, s2 | a0 = s2;
0x00006730 addiu a2, zero, 0x1000 | a2 = 0x1000;
0x00006734 jalr t9 | t9 ();
0x00006738 lw gp, 0x20(sp) | gp = *(var_20h);
0x0000673c move a0, s7 | a0 = s7;
0x00006740 move a1, s7 | a1 = s7;
0x00006744 addiu s1, s1, 1 | s1++;
| }
| label_34:
0x00006748 addiu v0, zero, 0xf | v0 = 0xf;
0x0000674c addiu s0, s0, 0x64 | s0 += 0x64;
0x00006750 bne s1, v0, 0x66a8 |
| } while (s1 != v0);
| label_13:
0x00006754 addiu s0, zero, -1 | s0 = -1;
| if (a0 != 0) {
0x00006758 beqz a0, 0x6764 |
0x0000675c move s0, zero | s0 = 0;
| if (a1 != 0) {
0x00006760 bnez a1, 0x67f4 | goto label_37;
| }
| }
| label_15:
0x00006764 lw a0, 0x1054(sp) | a0 = *(var_1054h);
0x00006768 lw v1, (s5) | v1 = *(s5);
0x0000676c move v0, s0 | v0 = s0;
| if (a0 != v1) {
0x00006770 bne a0, v1, 0x688c | goto label_38;
| }
0x00006774 lw ra, 0x107c(sp) | ra = *(var_107ch);
0x00006778 lw fp, 0x1078(sp) | fp = *(var_1078h);
0x0000677c lw s7, 0x1074(sp) | s7 = *(var_1074h);
0x00006780 lw s6, 0x1070(sp) | s6 = *(var_1070h);
0x00006784 lw s5, 0x106c(sp) | s5 = *(var_106ch);
0x00006788 lw s4, 0x1068(sp) | s4 = *(var_1068h);
0x0000678c lw s3, 0x1064(sp) | s3 = *(var_1064h);
0x00006790 lw s2, 0x1060(sp) | s2 = *(var_1060h);
0x00006794 lw s1, 0x105c(sp) | s1 = *(var_105ch);
0x00006798 lw s0, 0x1058(sp) | s0 = *(var_1058h);
0x0000679c addiu sp, sp, 0x1080 |
0x000067a0 jr ra | return v0;
| label_35:
0x000067a4 addiu v0, zero, 0xf | v0 = 0xf;
0x000067a8 move a0, s7 | a0 = s7;
0x000067ac addiu s0, s0, 0x64 | s0 += 0x64;
| if (s1 != v0) {
0x000067b0 bne s1, v0, 0x66a8 | goto label_12;
| }
0x000067b4 b 0x6754 | goto label_13;
0x000067b8 nop |
| label_36:
0x000067bc sw v0, 0x14(sp) | *(var_14h) = v0;
0x000067c0 lw v0, -0x7fd8(gp) | v0 = *(gp);
0x000067c4 lw t9, -0x7e84(gp) | t9 = sym.imp.__snprintf_chk;
| /* str.groupX_level_d_threshold_d__r_n */
0x000067c8 addiu v0, v0, 0xec8 | v0 += 0xec8;
0x000067cc addiu fp, sp, 0x2c | fp = sp + 0x2c;
0x000067d0 sw a0, 0x18(sp) | *(var_18h_2) = a0;
0x000067d4 sw v0, 0x10(sp) | *(var_10h_3) = v0;
0x000067d8 addiu a3, zero, 0x28 | a3 = 0x28;
0x000067dc addiu a2, zero, 1 | a2 = 1;
0x000067e0 addiu a1, zero, 0x28 | a1 = 0x28;
0x000067e4 move a0, fp | a0 = fp;
0x000067e8 jalr t9 | t9 ();
0x000067ec lw gp, 0x20(sp) | gp = *(var_20h);
0x000067f0 b 0x6724 | goto label_14;
| label_37:
0x000067f4 lw t9, -0x7f40(gp) | t9 = sym.get_http_response;
0x000067f8 addiu a0, zero, 6 | a0 = 6;
0x000067fc bal 0x7ef8 | sym_get_http_response ();
0x00006800 lw gp, 0x20(sp) | gp = *(var_20h);
0x00006804 addiu a2, zero, 0x1000 | a2 = 0x1000;
0x00006808 move a1, v0 | a1 = v0;
0x0000680c lw t9, -0x7cc8(gp) | t9 = sym.imp.__strcat_chk
0x00006810 move a0, s2 | a0 = s2;
0x00006814 jalr t9 | t9 ();
0x00006818 lw gp, 0x20(sp) | gp = *(var_20h);
0x0000681c sll s1, s3, 1 | s1 = s3 << 1;
0x00006820 addu s3, s1, s3 | s3 = s1 + s3;
0x00006824 lw s1, -0x7fdc(gp) | s1 = *((gp - 8183));
0x00006828 sll s3, s3, 2 | s3 <<= 2;
0x0000682c addiu s1, s1, 0x4758 | s1 += 0x4758;
0x00006830 addu s1, s1, s3 | s1 += s3;
0x00006834 addiu s3, zero, 4 | s3 = 4;
0x00006838 b 0x6854 | goto label_39;
| label_16:
0x0000683c lw t9, -0x7ba8(gp) | t9 = sym.imp.__errno_location;
0x00006840 jalr t9 | t9 ();
0x00006844 nop |
0x00006848 lw v0, (v0) | v0 = *(v0);
0x0000684c lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != s3) {
0x00006850 bne v0, s3, 0x6764 | goto label_15;
| }
| label_39:
0x00006854 lw t9, -0x7d5c(gp) | t9 = sym.imp.strlen;
0x00006858 move a0, s2 | a0 = s2;
0x0000685c jalr t9 | t9 ();
0x00006860 lw gp, 0x20(sp) | gp = *(var_20h);
0x00006864 lw a0, (s1) | a0 = *(s1);
0x00006868 move a2, v0 | a2 = v0;
0x0000686c lw t9, -0x7c58(gp) | t9 = sym.imp.write;
0x00006870 move a1, s2 | a1 = s2;
0x00006874 jalr t9 | t9 ();
0x00006878 move s0, v0 | s0 = v0;
0x0000687c lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 < 0) {
0x00006880 bltz v0, 0x683c | goto label_16;
| }
0x00006884 b 0x6764 | goto label_15;
0x00006888 nop |
| label_38:
0x0000688c lw t9, -0x7df4(gp) | t9 = sym.imp.__stack_chk_fail;
0x00006890 jalr t9 | t9 ();
0x00006894 nop |
| }
[*] Function strcat used 4 times motion