[*] Binary protection state of miio_client
No RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function sprintf tear down of miio_client
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x4044ec */
| #include <stdint.h>
|
; (fcn) fcn.004044ec () | void fcn_004044ec () {
0x004044ec lui gp, 0x43 |
0x004044f0 addiu sp, sp, -0x1038 |
0x004044f4 addiu gp, gp, 0x1620 | gp += 0x1620;
0x004044f8 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x004044fc sw s1, 0x1028(sp) | *(var_1028h) = s1;
0x00404500 lui a1, 0x41 | a1 = 0x410000;
0x00404504 lui s1, 0x41 | s1 = 0x410000;
0x00404508 sw s0, 0x1024(sp) | *(var_1024h) = s0;
0x0040450c sw gp, 0x18(sp) | *(var_18h) = gp;
0x00404510 sw ra, 0x1034(sp) | *(var_1034h) = ra;
0x00404514 sw s3, 0x1030(sp) | *(var_1030h) = s3;
0x00404518 sw s2, 0x102c(sp) | *(var_102ch) = s2;
0x0040451c move s0, a0 | s0 = a0;
| /* esilref: '&s
' */
0x00404520 addiu a1, a1, 0x6510 | a1 += 0x6510;
0x00404524 addiu a0, zero, 3 | a0 = 3;
| /* str.cmd_internal_request_dinfo */
0x00404528 addiu a2, s1, 0x7e20 | a2 = s1 + 0x7e20;
0x0040452c jalr t9 | t9 ();
0x00404530 lw gp, 0x18(sp) | gp = *(var_18h);
| if (s0 == 0) {
0x00404534 bnez s0, 0x404558 |
0x00404538 lui a1, 0x41 | a1 = 0x410000;
0x0040453c lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00404540 addiu a0, zero, 3 | a0 = 3;
| /* str._s:_dir_null_n */
0x00404544 addiu a1, a1, 0x5038 | a1 += 0x5038;
| /* str.cmd_internal_request_dinfo */
0x00404548 addiu a2, s1, 0x7e20 | a2 = s1 + 0x7e20;
0x0040454c jalr t9 | t9 ();
0x00404550 j 0x404654 | goto label_0;
0x00404554 addiu s1, zero, -1 | s1 = -1;
| }
0x00404558 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040455c move a0, s0 | a0 = s0;
0x00404560 jalr t9 | t9 ();
0x00404564 addiu v0, v0, 0x32 | v0 += 0x32;
0x00404568 sltiu v0, v0, 0xfff | v0 = (v0 < 0xfff) ? 1 : 0;
0x0040456c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00404570 bnez v0, 0x404598 |
0x00404574 lui a1, 0x41 | a1 = 0x410000;
0x00404578 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040457c addiu a0, zero, 3 | a0 = 3;
| /* str._s:_dir_too_long:__s_n */
0x00404580 addiu a1, a1, 0x5048 | a1 += 0x5048;
| /* str.cmd_internal_request_dinfo */
0x00404584 addiu a2, s1, 0x7e20 | a2 = s1 + 0x7e20;
0x00404588 move a3, s0 | a3 = s0;
0x0040458c jalr t9 | t9 ();
0x00404590 j 0x404654 | goto label_0;
0x00404594 addiu s1, zero, -1 | s1 = -1;
| }
0x00404598 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040459c addiu s2, sp, 0x20 | s2 = sp + 0x20;
0x004045a0 move a2, s0 | a2 = s0;
0x004045a4 lui a1, 0x41 | a1 = 0x410000;
0x004045a8 lui s0, 0x43 | s0 = 0x430000;
0x004045ac move a0, s2 | a0 = s2;
| /* str._method_:__internal.request_dinfo___params_:__s_ */
0x004045b0 addiu a1, a1, 0x5060 | a1 += 0x5060;
| /* obj.miio */
0x004045b4 addiu s0, s0, -0x6dd0 | s0 += -0x6dd0;
0x004045b8 jalr t9 | t9 ();
0x004045bc lw s3, 0x2d4(s0) | s3 = *((s0 + 181));
0x004045c0 addu v0, s2, v0 | v0 = s2 + v0;
0x004045c4 lw gp, 0x18(sp) | gp = *(var_18h);
0x004045c8 sb zero, (v0) | *(v0) = 0;
| if (s3 > 0) {
0x004045cc blez s3, 0x404618 |
0x004045d0 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x004045d4 move a0, s2 | a0 = s2;
0x004045d8 jalr t9 | t9 ();
0x004045dc lw gp, 0x18(sp) | gp = *(var_18h);
0x004045e0 move a0, s3 | a0 = s3;
0x004045e4 lw t9, -0x7fc4(gp) | t9 = sym.general_send_one;
0x004045e8 move a1, s2 | a1 = s2;
0x004045ec move a2, v0 | a2 = v0;
0x004045f0 jalr t9 | t9 ();
0x004045f4 move s1, v0 | s1 = v0;
0x004045f8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 >= 0) {
0x004045fc bgez v0, 0x404654 | goto label_0;
| }
0x00404600 lw t9, -0x7fc0(gp) | t9 = sym.ot_agent_fd_close;
0x00404604 lw a1, 0x2d4(s0) | a1 = *((s0 + 181));
0x00404608 move a0, s0 | a0 = s0;
0x0040460c jalr t9 | t9 ();
0x00404610 j 0x404654 | goto label_0;
0x00404614 sw zero, 0x2d4(s0) | *((s0 + 181)) = 0;
| }
0x00404618 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040461c lui a1, 0x41 | a1 = 0x410000;
0x00404620 addiu a0, zero, 1 | a0 = 1;
| /* str._s:_d__ot_agent_internalfd:__d_n */
0x00404624 addiu a1, a1, 0x5094 | a1 += 0x5094;
0x00404628 sw s3, 0x10(sp) | *(var_10h) = s3;
| /* str.cmd_internal_request_dinfo */
0x0040462c addiu a2, s1, 0x7e20 | a2 = s1 + 0x7e20;
0x00404630 addiu a3, zero, 0x464 | a3 = 0x464;
0x00404634 jalr t9 | t9 ();
0x00404638 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040463c lui a1, 0x41 | a1 = 0x410000;
0x00404640 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00404644 addiu a0, zero, 1 | a0 = 1;
| /* str.No_helper_script__n */
0x00404648 addiu a1, a1, 0x50b4 | a1 += 0x50b4;
0x0040464c jalr t9 | t9 ();
0x00404650 addiu s1, zero, -1 | s1 = -1;
| label_0:
0x00404654 lw ra, 0x1034(sp) | ra = *(var_1034h);
0x00404658 move v0, s1 | v0 = s1;
0x0040465c lw s3, 0x1030(sp) | s3 = *(var_1030h);
0x00404660 lw s2, 0x102c(sp) | s2 = *(var_102ch);
0x00404664 lw s1, 0x1028(sp) | s1 = *(var_1028h);
0x00404668 lw s0, 0x1024(sp) | s0 = *(var_1024h);
0x0040466c addiu sp, sp, 0x1038 |
0x00404670 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x4046e0 */
| #include <stdint.h>
|
; (fcn) fcn.004046e0 () | void fcn_004046e0 () {
0x004046e0 addiu sp, sp, -0x1028 |
0x004046e4 sw s0, 0x1018(sp) | *(var_1018h) = s0;
0x004046e8 lui s0, 0x43 | s0 = 0x430000;
0x004046ec lui gp, 0x43 |
| /* obj.miio */
0x004046f0 addiu s0, s0, -0x6dd0 | s0 += -0x6dd0;
0x004046f4 addiu gp, gp, 0x1620 | gp += 0x1620;
0x004046f8 sw s2, 0x1020(sp) | *(var_1020h) = s2;
0x004046fc lw s2, 0x268(s0) | s2 = *((s0 + 154));
0x00404700 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x00404704 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00404708 sw ra, 0x1024(sp) | *(var_1024h) = ra;
0x0040470c sw s1, 0x101c(sp) | *(var_101ch) = s1;
0x00404710 move a0, s2 | a0 = s2;
0x00404714 jalr t9 | t9 ();
0x00404718 addiu v0, v0, 0x32 | v0 += 0x32;
0x0040471c sltiu v0, v0, 0xfff | v0 = (v0 < 0xfff) ? 1 : 0;
0x00404720 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00404724 bnez v0, 0x404750 |
0x00404728 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040472c lui a1, 0x41 | a1 = 0x410000;
0x00404730 lui a2, 0x41 | a2 = 0x410000;
0x00404734 addiu a0, zero, 3 | a0 = 3;
| /* str._s:_dir_too_long:__s_n */
0x00404738 addiu a1, a1, 0x5048 | a1 += 0x5048;
| /* str.cmd_internal_request_didkeymac */
0x0040473c addiu a2, a2, 0x7dec | a2 += 0x7dec;
0x00404740 move a3, s2 | a3 = s2;
0x00404744 jalr t9 | t9 ();
0x00404748 j 0x4047c4 | goto label_0;
0x0040474c lw ra, 0x1024(sp) | ra = *(var_1024h);
| }
0x00404750 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x00404754 addiu s1, sp, 0x18 | s1 = sp + 0x18;
0x00404758 lui a1, 0x41 | a1 = 0x410000;
0x0040475c move a2, s2 | a2 = s2;
0x00404760 move a0, s1 | a0 = s1;
| /* str._method_:__internal.req_didkeymac___params_:__s_ */
0x00404764 addiu a1, a1, 0x5104 | a1 += 0x5104;
0x00404768 jalr t9 | t9 ();
0x0040476c lw s2, 0x2d4(s0) | s2 = *((s0 + 181));
0x00404770 addu v0, s1, v0 | v0 = s1 + v0;
0x00404774 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404778 sb zero, (v0) | *(v0) = 0;
| if (s2 > 0) {
0x0040477c blez s2, 0x4047c0 |
0x00404780 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x00404784 move a0, s1 | a0 = s1;
0x00404788 jalr t9 | t9 ();
0x0040478c lw gp, 0x10(sp) | gp = *(var_10h);
0x00404790 move a0, s2 | a0 = s2;
0x00404794 lw t9, -0x7fc4(gp) | t9 = sym.general_send_one;
0x00404798 move a1, s1 | a1 = s1;
0x0040479c move a2, v0 | a2 = v0;
0x004047a0 jalr t9 | t9 ();
0x004047a4 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 >= 0) {
0x004047a8 bgez v0, 0x4047c0 | goto label_1;
| }
0x004047ac lw t9, -0x7fc0(gp) | t9 = sym.ot_agent_fd_close;
0x004047b0 lw a1, 0x2d4(s0) | a1 = *((s0 + 181));
0x004047b4 move a0, s0 | a0 = s0;
0x004047b8 jalr t9 | t9 ();
0x004047bc sw zero, 0x2d4(s0) | *((s0 + 181)) = 0;
| }
| label_1:
0x004047c0 lw ra, 0x1024(sp) | ra = *(var_1024h);
| label_0:
0x004047c4 lw s2, 0x1020(sp) | s2 = *(var_1020h);
0x004047c8 lw s1, 0x101c(sp) | s1 = *(var_101ch);
0x004047cc lw s0, 0x1018(sp) | s0 = *(var_1018h);
0x004047d0 addiu sp, sp, 0x1028 |
0x004047d4 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x404854 */
| #include <stdint.h>
|
; (fcn) fcn.00404854 () | void fcn_00404854 () {
0x00404854 addiu sp, sp, -0x1028 |
0x00404858 sw s0, 0x1018(sp) | *(var_1018h) = s0;
0x0040485c lui s0, 0x43 | s0 = 0x430000;
0x00404860 lui gp, 0x43 |
| /* obj.miio */
0x00404864 addiu s0, s0, -0x6dd0 | s0 += -0x6dd0;
0x00404868 addiu gp, gp, 0x1620 | gp += 0x1620;
0x0040486c sw s2, 0x1020(sp) | *(var_1020h) = s2;
0x00404870 lw s2, 0x268(s0) | s2 = *((s0 + 154));
0x00404874 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x00404878 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040487c sw ra, 0x1024(sp) | *(var_1024h) = ra;
0x00404880 sw s1, 0x101c(sp) | *(var_101ch) = s1;
0x00404884 move a0, s2 | a0 = s2;
0x00404888 jalr t9 | t9 ();
0x0040488c addiu v0, v0, 0x33 | v0 += 0x33;
0x00404890 sltiu v0, v0, 0xfff | v0 = (v0 < 0xfff) ? 1 : 0;
0x00404894 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00404898 bnez v0, 0x4048c4 |
0x0040489c lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x004048a0 lui a1, 0x41 | a1 = 0x410000;
0x004048a4 lui a2, 0x41 | a2 = 0x410000;
0x004048a8 addiu a0, zero, 3 | a0 = 3;
| /* str._s:_dir_too_long:__s_n */
0x004048ac addiu a1, a1, 0x5048 | a1 += 0x5048;
| /* str.cmd_internal_request_didkeymac2 */
0x004048b0 addiu a2, a2, 0x7db8 | a2 += 0x7db8;
0x004048b4 move a3, s2 | a3 = s2;
0x004048b8 jalr t9 | t9 ();
0x004048bc j 0x404938 | goto label_0;
0x004048c0 lw ra, 0x1024(sp) | ra = *(var_1024h);
| }
0x004048c4 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x004048c8 addiu s1, sp, 0x18 | s1 = sp + 0x18;
0x004048cc lui a1, 0x41 | a1 = 0x410000;
0x004048d0 move a2, s2 | a2 = s2;
0x004048d4 move a0, s1 | a0 = s1;
| /* str._method_:__internal.req_didkeymac2___params_:__s_ */
0x004048d8 addiu a1, a1, 0x5158 | a1 += 0x5158;
0x004048dc jalr t9 | t9 ();
0x004048e0 lw s2, 0x2d4(s0) | s2 = *((s0 + 181));
0x004048e4 addu v0, s1, v0 | v0 = s1 + v0;
0x004048e8 lw gp, 0x10(sp) | gp = *(var_10h);
0x004048ec sb zero, (v0) | *(v0) = 0;
| if (s2 > 0) {
0x004048f0 blez s2, 0x404934 |
0x004048f4 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x004048f8 move a0, s1 | a0 = s1;
0x004048fc jalr t9 | t9 ();
0x00404900 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404904 move a0, s2 | a0 = s2;
0x00404908 lw t9, -0x7fc4(gp) | t9 = sym.general_send_one;
0x0040490c move a1, s1 | a1 = s1;
0x00404910 move a2, v0 | a2 = v0;
0x00404914 jalr t9 | t9 ();
0x00404918 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 >= 0) {
0x0040491c bgez v0, 0x404934 | goto label_1;
| }
0x00404920 lw t9, -0x7fc0(gp) | t9 = sym.ot_agent_fd_close;
0x00404924 lw a1, 0x2d4(s0) | a1 = *((s0 + 181));
0x00404928 move a0, s0 | a0 = s0;
0x0040492c jalr t9 | t9 ();
0x00404930 sw zero, 0x2d4(s0) | *((s0 + 181)) = 0;
| }
| label_1:
0x00404934 lw ra, 0x1024(sp) | ra = *(var_1024h);
| label_0:
0x00404938 lw s2, 0x1020(sp) | s2 = *(var_1020h);
0x0040493c lw s1, 0x101c(sp) | s1 = *(var_101ch);
0x00404940 lw s0, 0x1018(sp) | s0 = *(var_1018h);
0x00404944 addiu sp, sp, 0x1028 |
0x00404948 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x4049c8 */
| #include <stdint.h>
|
; (fcn) fcn.004049c8 () | void fcn_004049c8 () {
0x004049c8 lui gp, 0x43 |
0x004049cc addiu sp, sp, -0x1048 |
0x004049d0 addiu gp, gp, 0x1620 | gp += 0x1620;
0x004049d4 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x004049d8 sw s1, 0x1038(sp) | *(var_1038h) = s1;
0x004049dc lui a1, 0x41 | a1 = 0x410000;
0x004049e0 lui s1, 0x41 | s1 = 0x410000;
0x004049e4 sw s2, 0x103c(sp) | *(var_103ch) = s2;
0x004049e8 sw gp, 0x10(sp) | *(var_10h) = gp;
0x004049ec sw ra, 0x1044(sp) | *(var_1044h) = ra;
0x004049f0 sw s3, 0x1040(sp) | *(var_1040h) = s3;
0x004049f4 sw s0, 0x1034(sp) | *(var_1034h) = s0;
0x004049f8 move s2, a0 | s2 = a0;
| /* esilref: '&s
' */
0x004049fc addiu a1, a1, 0x6510 | a1 += 0x6510;
0x00404a00 addiu a0, zero, 3 | a0 = 3;
| /* str.cmd_internal_request_dtoken */
0x00404a04 addiu a2, s1, 0x7d9c | a2 = s1 + 0x7d9c;
0x00404a08 jalr t9 | t9 ();
0x00404a0c lw gp, 0x10(sp) | gp = *(var_10h);
| if (s2 == 0) {
0x00404a10 bnez s2, 0x404a34 |
0x00404a14 lui a1, 0x41 | a1 = 0x410000;
0x00404a18 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00404a1c addiu a0, zero, 3 | a0 = 3;
| /* str._s:_dir_null_n */
0x00404a20 addiu a1, a1, 0x5038 | a1 += 0x5038;
| /* str.cmd_internal_request_dtoken */
0x00404a24 addiu a2, s1, 0x7d9c | a2 = s1 + 0x7d9c;
0x00404a28 jalr t9 | t9 ();
0x00404a2c j 0x404b44 | goto label_0;
0x00404a30 addiu s1, zero, -1 | s1 = -1;
| }
0x00404a34 lw t9, -0x7fbc(gp) | t9 = sym.rand_str;
0x00404a38 addiu s3, sp, 0x1018 | s3 = sp + 0x1018;
0x00404a3c addiu a1, zero, 0x10 | a1 = 0x10;
0x00404a40 move a0, s3 | a0 = s3;
0x00404a44 jalr t9 | t9 ();
0x00404a48 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404a4c move a0, s2 | a0 = s2;
0x00404a50 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x00404a54 sb zero, 0x1028(sp) | *(var_1028h) = 0;
0x00404a58 jalr t9 | t9 ();
0x00404a5c lw gp, 0x10(sp) | gp = *(var_10h);
0x00404a60 move a0, s3 | a0 = s3;
0x00404a64 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x00404a68 move s0, v0 | s0 = v0;
0x00404a6c jalr t9 | t9 ();
0x00404a70 addu v0, s0, v0 | v0 = s0 + v0;
0x00404a74 addiu v0, v0, 0x48 | v0 += 0x48;
0x00404a78 sltiu v0, v0, 0xfff | v0 = (v0 < 0xfff) ? 1 : 0;
0x00404a7c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00404a80 bnez v0, 0x404aa8 |
0x00404a84 lui a1, 0x41 | a1 = 0x410000;
0x00404a88 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00404a8c addiu a0, zero, 3 | a0 = 3;
| /* str._s:_dir__token_too_long:__s_n */
0x00404a90 addiu a1, a1, 0x518c | a1 += 0x518c;
| /* str.cmd_internal_request_dtoken */
0x00404a94 addiu a2, s1, 0x7d9c | a2 = s1 + 0x7d9c;
0x00404a98 move a3, s2 | a3 = s2;
0x00404a9c jalr t9 | t9 ();
0x00404aa0 j 0x404b44 | goto label_0;
0x00404aa4 addiu s1, zero, -1 | s1 = -1;
| }
0x00404aa8 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x00404aac addiu s1, sp, 0x18 | s1 = sp + 0x18;
0x00404ab0 lui a1, 0x41 | a1 = 0x410000;
0x00404ab4 lui s0, 0x43 | s0 = 0x430000;
0x00404ab8 move a2, s2 | a2 = s2;
0x00404abc move a0, s1 | a0 = s1;
| /* str._method_:__internal.request_dtoken___params_:_dir_:__s___ntoken_:__s_ */
0x00404ac0 addiu a1, a1, 0x51ac | a1 += 0x51ac;
0x00404ac4 move a3, s3 | a3 = s3;
| /* obj.miio */
0x00404ac8 addiu s0, s0, -0x6dd0 | s0 += -0x6dd0;
0x00404acc jalr t9 | t9 ();
0x00404ad0 lw s2, 0x2d4(s0) | s2 = *((s0 + 181));
0x00404ad4 addu v0, s1, v0 | v0 = s1 + v0;
0x00404ad8 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404adc sb zero, (v0) | *(v0) = 0;
| if (s2 > 0) {
0x00404ae0 blez s2, 0x404b2c |
0x00404ae4 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x00404ae8 move a0, s1 | a0 = s1;
0x00404aec jalr t9 | t9 ();
0x00404af0 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404af4 move a1, s1 | a1 = s1;
0x00404af8 lw t9, -0x7fc4(gp) | t9 = sym.general_send_one;
0x00404afc move a0, s2 | a0 = s2;
0x00404b00 move a2, v0 | a2 = v0;
0x00404b04 jalr t9 | t9 ();
0x00404b08 move s1, v0 | s1 = v0;
0x00404b0c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 >= 0) {
0x00404b10 bgez v0, 0x404b44 | goto label_0;
| }
0x00404b14 lw t9, -0x7fc0(gp) | t9 = sym.ot_agent_fd_close;
0x00404b18 lw a1, 0x2d4(s0) | a1 = *((s0 + 181));
0x00404b1c move a0, s0 | a0 = s0;
0x00404b20 jalr t9 | t9 ();
0x00404b24 j 0x404b44 | goto label_0;
0x00404b28 sw zero, 0x2d4(s0) | *((s0 + 181)) = 0;
| }
0x00404b2c lui a1, 0x41 | a1 = 0x410000;
0x00404b30 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00404b34 addiu a0, zero, 1 | a0 = 1;
| /* str.No_helper_script__n */
0x00404b38 addiu a1, a1, 0x50b4 | a1 += 0x50b4;
0x00404b3c jalr t9 | t9 ();
0x00404b40 addiu s1, zero, -1 | s1 = -1;
| label_0:
0x00404b44 lw ra, 0x1044(sp) | ra = *(var_1044h);
0x00404b48 move v0, s1 | v0 = s1;
0x00404b4c lw s3, 0x1040(sp) | s3 = *(var_1040h);
0x00404b50 lw s2, 0x103c(sp) | s2 = *(var_103ch);
0x00404b54 lw s1, 0x1038(sp) | s1 = *(var_1038h);
0x00404b58 lw s0, 0x1034(sp) | s0 = *(var_1034h);
0x00404b5c addiu sp, sp, 0x1048 |
0x00404b60 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x404b64 */
| #include <stdint.h>
|
; (fcn) fcn.00404b64 () | void fcn_00404b64 () {
0x00404b64 lui v0, 0x43 | v0 = 0x430000;
0x00404b68 addiu sp, sp, -0x430 |
0x00404b6c lui gp, 0x43 |
0x00404b70 lw a3, -0x6dd0(v0) | a3 = *((v0 - 7028));
0x00404b74 addiu gp, gp, 0x1620 | gp += 0x1620;
0x00404b78 sw s2, 0x428(sp) | *(var_428h) = s2;
0x00404b7c move s2, a0 | s2 = a0;
0x00404b80 addiu a0, zero, 8 | a0 = 8;
0x00404b84 sw s1, 0x424(sp) | *(var_424h) = s1;
0x00404b88 sw ra, 0x42c(sp) | *(var_42ch) = ra;
0x00404b8c sw s0, 0x420(sp) | *(var_420h) = s0;
0x00404b90 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00404b94 move s1, a2 | s1 = a2;
| if (a3 != a0) {
0x00404b98 beq a3, a0, 0x404bb4 |
0x00404b9c lui a1, 0x41 | a1 = 0x410000;
0x00404ba0 lui a2, 0x41 | a2 = 0x410000;
0x00404ba4 addiu a0, zero, 3 | a0 = 3;
| /* str._s____miio_state_not_CLOUD_CONNECTED:__d_n */
0x00404ba8 addiu a1, a1, 0x51f8 | a1 += 0x51f8;
0x00404bac j 0x404bd8 | goto label_0;
| /* str.handle_local_msg_suspend */
0x00404bb0 addiu a2, a2, 0x7b64 | a2 += 0x7b64;
| }
0x00404bb4 slti a0, a1, 2 | a0 = (a1 < 2) ? 1 : 0;
0x00404bb8 move v1, a1 | v1 = a1;
| if (a0 != 0) {
0x00404bbc bnez a0, 0x404bf0 | goto label_1;
| }
0x00404bc0 lui a1, 0x41 | a1 = 0x410000;
0x00404bc4 lui a2, 0x41 | a2 = 0x410000;
0x00404bc8 addiu a0, zero, 3 | a0 = 3;
| /* str._s____poll:__d_n */
0x00404bcc addiu a1, a1, 0x5224 | a1 += 0x5224;
| /* str.handle_local_msg_suspend */
0x00404bd0 addiu a2, a2, 0x7b64 | a2 += 0x7b64;
0x00404bd4 move a3, v1 | a3 = v1;
| label_0:
0x00404bd8 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00404bdc jalr t9 | t9 ();
0x00404be0 nop |
0x00404be4 lw gp, 0x10(sp) | gp = *(var_10h);
| do {
0x00404be8 j 0x404c54 | goto label_2;
0x00404bec move s0, zero | s0 = 0;
| /* obj.miio */
| label_1:
0x00404bf0 addiu v0, v0, -0x6dd0 | v0 += -0x6dd0;
0x00404bf4 lw v1, 0x3ac(v0) | v1 = *((v0 + 235));
0x00404bf8 lui a1, 0x41 | a1 = 0x410000;
| if (v1 != 0) {
0x00404bfc beqz v1, 0x404c0c |
0x00404c00 addiu a0, zero, 3 | a0 = 3;
0x00404c04 j 0x404c20 | goto label_3;
| /* str._s____miio.data_queue_not_NULL_n */
0x00404c08 addiu a1, a1, 0x5234 | a1 += 0x5234;
| }
0x00404c0c lw v1, 0x3b0(v0) | v1 = *((v0 + 236));
0x00404c10 lui a1, 0x41 | a1 = 0x410000;
| if (v1 == 0) {
0x00404c14 beqz v1, 0x404c34 | goto label_4;
| }
0x00404c18 addiu a0, zero, 3 | a0 = 3;
| /* str._s____miio.data_queue_noack_not_NULL_n */
0x00404c1c addiu a1, a1, 0x5254 | a1 += 0x5254;
| label_3:
0x00404c20 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00404c24 jalr t9 | t9 ();
0x00404c28 nop |
0x00404c2c j 0x404be8 |
| } while (1);
0x00404c30 lw gp, 0x10(sp) | gp = *(var_10h);
| label_4:
0x00404c34 lw t9, -0x7d9c(gp) | t9 = sym.imp.timerfd_gettime;
0x00404c38 lw a0, 0x1f0(v0) | a0 = *((v0 + 124));
0x00404c3c addiu a1, sp, 0x18 | a1 = sp + 0x18;
0x00404c40 jalr t9 | t9 ();
0x00404c44 lw s0, 0x20(sp) | s0 = *(var_20h);
0x00404c48 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404c4c slti v0, s0, 2 | v0 = (s0 < 2) ? 1 : 0;
| if (v0 == 0) {
0x00404c50 movn s0, zero, v0 | s0 = 0;
| }
| label_2:
0x00404c54 lw t9, -0x7fb8(gp) | t9 = sym.json_verify_get_int;
0x00404c58 lui a1, 0x41 | a1 = 0x410000;
0x00404c5c move a0, s1 | a0 = s1;
| /* esilref: 'id' */
0x00404c60 addiu a1, a1, 0x527c | a1 += 0x527c;
0x00404c64 addiu a2, sp, 0x418 | a2 = sp + 0x418;
0x00404c68 jalr t9 | t9 ();
0x00404c6c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x00404c70 bgez v0, 0x404c9c |
0x00404c74 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00404c78 lui a1, 0x41 | a1 = 0x410000;
0x00404c7c lui a2, 0x41 | a2 = 0x410000;
0x00404c80 addiu a0, zero, 3 | a0 = 3;
| /* str._s____msg_does_not_have_id:__s_n */
0x00404c84 addiu a1, a1, 0x5280 | a1 += 0x5280;
| /* str.handle_local_msg_suspend */
0x00404c88 addiu a2, a2, 0x7b64 | a2 += 0x7b64;
0x00404c8c move a3, s1 | a3 = s1;
0x00404c90 jalr t9 | t9 ();
0x00404c94 j 0x404d00 | goto label_5;
0x00404c98 addiu v0, zero, -1 | v0 = -1;
| }
0x00404c9c addiu s1, sp, 0x18 | s1 = sp + 0x18;
0x00404ca0 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x00404ca4 move a0, s1 | a0 = s1;
0x00404ca8 move a1, zero | a1 = 0;
0x00404cac addiu a2, zero, 0x400 | a2 = 0x400;
0x00404cb0 jalr t9 | t9 ();
0x00404cb4 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404cb8 lw a2, 0x418(sp) | a2 = *(var_418h);
0x00404cbc lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x00404cc0 lui a1, 0x41 | a1 = "{\"id\":%d,\"method\":\"local.resp_suspend\",\"params\":{\"wakeup_time\":%d}}";
| /* str._id_:_d__method_:_local.resp_suspend___params_:_wakeup_time_:_d */
0x00404cc4 addiu a1, a1, 0x52a4 |
0x00404cc8 move a3, s0 | a3 = s0;
0x00404ccc move a0, s1 | a0 = s1;
0x00404cd0 jalr t9 | t9 ();
0x00404cd4 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404cd8 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x00404cdc move a0, s1 | a0 = s1;
0x00404ce0 jalr t9 | t9 ();
0x00404ce4 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404ce8 move a0, s2 | a0 = s2;
0x00404cec lw t9, -0x7fc4(gp) | t9 = sym.general_send_one;
0x00404cf0 move a1, s1 | a1 = s1;
0x00404cf4 move a2, v0 | a2 = v0;
0x00404cf8 jalr t9 | t9 ();
0x00404cfc move v0, zero | v0 = 0;
| label_5:
0x00404d00 lw ra, 0x42c(sp) | ra = *(var_42ch);
0x00404d04 lw s2, 0x428(sp) | s2 = *(var_428h);
0x00404d08 lw s1, 0x424(sp) | s1 = *(var_424h);
0x00404d0c lw s0, 0x420(sp) | s0 = *(var_420h);
0x00404d10 addiu sp, sp, 0x430 |
0x00404d14 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x404e6c */
| #include <stdint.h>
|
; (fcn) fcn.00404e6c () | void fcn_00404e6c () {
0x00404e6c addiu sp, sp, -0x1028 |
0x00404e70 sw s0, 0x1018(sp) | *(var_1018h) = s0;
0x00404e74 lui s0, 0x43 | s0 = 0x430000;
0x00404e78 lui gp, 0x43 |
| /* obj.miio */
0x00404e7c addiu s0, s0, -0x6dd0 | s0 += -0x6dd0;
0x00404e80 addiu gp, gp, 0x1620 | gp += 0x1620;
0x00404e84 sw s2, 0x1020(sp) | *(var_1020h) = s2;
0x00404e88 lw s2, 0x268(s0) | s2 = *((s0 + 154));
0x00404e8c lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x00404e90 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00404e94 sw ra, 0x1024(sp) | *(var_1024h) = ra;
0x00404e98 sw s1, 0x101c(sp) | *(var_101ch) = s1;
0x00404e9c move a0, s2 | a0 = s2;
0x00404ea0 jalr t9 | t9 ();
0x00404ea4 addiu v0, v0, 0x39 | v0 += 0x39;
0x00404ea8 sltiu v0, v0, 0xfff | v0 = (v0 < 0xfff) ? 1 : 0;
0x00404eac lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00404eb0 bnez v0, 0x404edc |
0x00404eb4 lui a1, 0x41 | a1 = 0x410000;
0x00404eb8 lui a2, 0x41 | a2 = 0x410000;
0x00404ebc lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00404ec0 addiu a0, zero, 3 | a0 = 3;
| /* str._s:_dir_too_long:__s_n */
0x00404ec4 addiu a1, a1, 0x5048 | a1 += 0x5048;
| /* str.cmd_internal_req_wifi_conf_status */
0x00404ec8 addiu a2, a2, 0x7d78 | a2 += 0x7d78;
0x00404ecc move a3, s2 | a3 = s2;
0x00404ed0 jalr t9 | t9 ();
0x00404ed4 j 0x404f64 | goto label_0;
0x00404ed8 nop |
| }
0x00404edc lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x00404ee0 addiu s1, sp, 0x18 | s1 = sp + 0x18;
0x00404ee4 lui a1, 0x41 | a1 = 0x410000;
0x00404ee8 move a2, s2 | a2 = s2;
0x00404eec move a0, s1 | a0 = s1;
| /* str._method_:__internal.req_wifi_conf_status___params_:__s_ */
0x00404ef0 addiu a1, a1, 0x5328 | a1 += 0x5328;
0x00404ef4 jalr t9 | t9 ();
0x00404ef8 lw s2, 0x2d4(s0) | s2 = *((s0 + 181));
0x00404efc addu v0, s1, v0 | v0 = s1 + v0;
0x00404f00 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404f04 sb zero, (v0) | *(v0) = 0;
| if (s2 > 0) {
0x00404f08 blez s2, 0x404f50 |
0x00404f0c lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x00404f10 move a0, s1 | a0 = s1;
0x00404f14 jalr t9 | t9 ();
0x00404f18 lw gp, 0x10(sp) | gp = *(var_10h);
0x00404f1c move a0, s2 | a0 = s2;
0x00404f20 lw t9, -0x7fc4(gp) | t9 = sym.general_send_one;
0x00404f24 move a1, s1 | a1 = s1;
0x00404f28 move a2, v0 | a2 = v0;
0x00404f2c jalr t9 | t9 ();
0x00404f30 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 >= 0) {
0x00404f34 bgez v0, 0x404f64 | goto label_0;
| }
0x00404f38 lw t9, -0x7fc0(gp) | t9 = sym.ot_agent_fd_close;
0x00404f3c lw a1, 0x2d4(s0) | a1 = *((s0 + 181));
0x00404f40 move a0, s0 | a0 = s0;
0x00404f44 jalr t9 | t9 ();
0x00404f48 j 0x404f64 | goto label_0;
0x00404f4c sw zero, 0x2d4(s0) | *((s0 + 181)) = 0;
| }
0x00404f50 lui a1, 0x41 | a1 = 0x410000;
0x00404f54 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00404f58 addiu a0, zero, 1 | a0 = 1;
| /* str.No_helper_script__n */
0x00404f5c addiu a1, a1, 0x50b4 | a1 += 0x50b4;
0x00404f60 jalr t9 | t9 ();
| label_0:
0x00404f64 lw ra, 0x1024(sp) | ra = *(var_1024h);
0x00404f68 lw s2, 0x1020(sp) | s2 = *(var_1020h);
0x00404f6c lw s1, 0x101c(sp) | s1 = *(var_101ch);
0x00404f70 lw s0, 0x1018(sp) | s0 = *(var_1018h);
0x00404f74 addiu sp, sp, 0x1028 |
0x00404f78 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x4053e8 */
| #include <stdint.h>
|
; (fcn) fcn.004053e8 () | void fcn_004053e8 () {
0x004053e8 lui gp, 0x43 |
0x004053ec addiu sp, sp, -0x430 |
0x004053f0 addiu gp, gp, 0x1620 | gp += 0x1620;
0x004053f4 lw t9, -0x7fb8(gp) | t9 = sym.json_verify_get_int;
0x004053f8 sw s1, 0x428(sp) | *(var_428h) = s1;
0x004053fc sw s0, 0x424(sp) | *(var_424h) = s0;
0x00405400 move s1, a0 | s1 = a0;
0x00405404 move s0, a1 | s0 = a1;
0x00405408 move a0, a1 | a0 = a1;
0x0040540c lui a1, 0x41 | a1 = 0x410000;
0x00405410 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00405414 sw ra, 0x42c(sp) | *(var_42ch) = ra;
| /* esilref: 'id' */
0x00405418 addiu a1, a1, 0x527c | a1 += 0x527c;
0x0040541c addiu a2, sp, 0x418 | a2 = sp + 0x418;
0x00405420 jalr t9 | t9 ();
0x00405424 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x00405428 bgez v0, 0x405454 |
0x0040542c lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00405430 lui a1, 0x41 | a1 = 0x410000;
0x00405434 lui a2, 0x41 | a2 = 0x410000;
0x00405438 addiu a0, zero, 3 | a0 = 3;
| /* str._s____msg_does_not_have_id:__s_n */
0x0040543c addiu a1, a1, 0x5280 | a1 += 0x5280;
| /* str.handle_local_msg_state */
0x00405440 addiu a2, a2, 0x7b4c | a2 += 0x7b4c;
0x00405444 move a3, s0 | a3 = s0;
0x00405448 jalr t9 | t9 ();
0x0040544c j 0x4054d0 | goto label_0;
0x00405450 addiu v0, zero, -1 | v0 = -1;
| }
0x00405454 addiu s0, sp, 0x18 | s0 = sp + 0x18;
0x00405458 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040545c move a0, s0 | a0 = s0;
0x00405460 move a1, zero | a1 = 0;
0x00405464 addiu a2, zero, 0x400 | a2 = 0x400;
0x00405468 jalr t9 | t9 ();
0x0040546c lui v0, 0x43 | v0 = 0x430000;
0x00405470 lw v0, -0x6dd0(v0) | v0 = *((v0 - 7028));
0x00405474 lw gp, 0x10(sp) | gp = *(var_10h);
0x00405478 sll v1, v0, 2 | v1 = v0 << 2;
0x0040547c lui v0, 0x43 | v0 = 0x4295e8;
| /* esilref: 'device_init' */
0x00405480 addiu v0, v0, -0x6a18 |
0x00405484 addu v0, v1, v0 | v0 = v1 + v0;
0x00405488 lw a2, 0x418(sp) | a2 = *(var_418h);
0x0040548c lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x00405490 lw a3, (v0) | a3 = *(v0);
0x00405494 lui a1, 0x41 | a1 = "{\"id\":%d,\"method\":\"local.status\",\"params\":\"%s\"}";
| /* str._id_:_d__method_:_local.status___params_:__s_ */
0x00405498 addiu a1, a1, 0x548c |
0x0040549c move a0, s0 | a0 = s0;
0x004054a0 jalr t9 | t9 ();
0x004054a4 lw gp, 0x10(sp) | gp = *(var_10h);
0x004054a8 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x004054ac move a0, s0 | a0 = s0;
0x004054b0 jalr t9 | t9 ();
0x004054b4 lw gp, 0x10(sp) | gp = *(var_10h);
0x004054b8 move a0, s1 | a0 = s1;
0x004054bc lw t9, -0x7fc4(gp) | t9 = sym.general_send_one;
0x004054c0 move a1, s0 | a1 = s0;
0x004054c4 move a2, v0 | a2 = v0;
0x004054c8 jalr t9 | t9 ();
0x004054cc move v0, zero | v0 = 0;
| label_0:
0x004054d0 lw ra, 0x42c(sp) | ra = *(var_42ch);
0x004054d4 lw s1, 0x428(sp) | s1 = *(var_428h);
0x004054d8 lw s0, 0x424(sp) | s0 = *(var_424h);
0x004054dc addiu sp, sp, 0x430 |
0x004054e0 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x4054e4 */
| #include <stdint.h>
|
; (fcn) fcn.004054e4 () | void fcn_004054e4 () {
0x004054e4 lui gp, 0x43 |
0x004054e8 addiu sp, sp, -0x438 |
0x004054ec addiu gp, gp, 0x1620 | gp += 0x1620;
0x004054f0 lw t9, -0x7fb8(gp) | t9 = sym.json_verify_get_int;
0x004054f4 sw s1, 0x428(sp) | *(var_428h) = s1;
0x004054f8 sw s0, 0x424(sp) | *(var_424h) = s0;
0x004054fc move s1, a0 | s1 = a0;
0x00405500 move s0, a1 | s0 = a1;
0x00405504 move a0, a1 | a0 = a1;
0x00405508 lui a1, 0x41 | a1 = 0x410000;
0x0040550c sw gp, 0x10(sp) | *(var_10h) = gp;
0x00405510 sw ra, 0x434(sp) | *(var_434h) = ra;
0x00405514 sw s3, 0x430(sp) | *(var_430h) = s3;
0x00405518 sw s2, 0x42c(sp) | *(var_42ch) = s2;
| /* esilref: 'id' */
0x0040551c addiu a1, a1, 0x527c | a1 += 0x527c;
0x00405520 addiu a2, sp, 0x418 | a2 = sp + 0x418;
0x00405524 jalr t9 | t9 ();
0x00405528 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x0040552c bgez v0, 0x405558 |
0x00405530 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00405534 lui a1, 0x41 | a1 = 0x410000;
0x00405538 lui a2, 0x41 | a2 = 0x410000;
0x0040553c addiu a0, zero, 3 | a0 = 3;
| /* str._s____msg_does_not_have_id:__s_n */
0x00405540 addiu a1, a1, 0x5280 | a1 += 0x5280;
| /* str.handle_local_msg_time */
0x00405544 addiu a2, a2, 0x7b34 | a2 += 0x7b34;
0x00405548 move a3, s0 | a3 = s0;
0x0040554c jalr t9 | t9 ();
0x00405550 j 0x4055d4 | goto label_0;
0x00405554 addiu v0, zero, -1 | v0 = -1;
| }
0x00405558 addiu s0, sp, 0x18 | s0 = sp + 0x18;
0x0040555c lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x00405560 move a0, s0 | a0 = s0;
0x00405564 move a1, zero | a1 = 0;
0x00405568 addiu a2, zero, 0x400 | a2 = 0x400;
0x0040556c jalr t9 | t9 ();
0x00405570 lw gp, 0x10(sp) | gp = *(var_10h);
0x00405574 lui v0, 0x43 | v0 = 0x430000;
0x00405578 lw t9, -0x7fcc(gp) | t9 = sym.timestamp;
0x0040557c lw s3, 0x418(sp) | s3 = *(var_418h);
0x00405580 lw s2, -0x6bbc(v0) | s2 = *((v0 - 6895));
0x00405584 jalr t9 | t9 ();
0x00405588 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040558c lui a1, 0x41 | a1 = 0x410000;
0x00405590 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
| /* str._id_:_d__method_:_local.time___params_:_d */
0x00405594 addiu a1, a1, 0x54bc | a1 += 0x54bc;
0x00405598 move a2, s3 | a2 = s3;
0x0040559c addu a3, v0, s2 | a3 = v0 + s2;
0x004055a0 move a0, s0 | a0 = s0;
0x004055a4 jalr t9 | t9 ();
0x004055a8 lw gp, 0x10(sp) | gp = *(var_10h);
0x004055ac lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x004055b0 move a0, s0 | a0 = s0;
0x004055b4 jalr t9 | t9 ();
0x004055b8 lw gp, 0x10(sp) | gp = *(var_10h);
0x004055bc move a0, s1 | a0 = s1;
0x004055c0 lw t9, -0x7fc4(gp) | t9 = sym.general_send_one;
0x004055c4 move a1, s0 | a1 = s0;
0x004055c8 move a2, v0 | a2 = v0;
0x004055cc jalr t9 | t9 ();
0x004055d0 move v0, zero | v0 = 0;
| label_0:
0x004055d4 lw ra, 0x434(sp) | ra = *(var_434h);
0x004055d8 lw s3, 0x430(sp) | s3 = *(var_430h);
0x004055dc lw s2, 0x42c(sp) | s2 = *(var_42ch);
0x004055e0 lw s1, 0x428(sp) | s1 = *(var_428h);
0x004055e4 lw s0, 0x424(sp) | s0 = *(var_424h);
0x004055e8 addiu sp, sp, 0x438 |
0x004055ec jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x4055f0 */
| #include <stdint.h>
|
; (fcn) fcn.004055f0 () | void fcn_004055f0 () {
0x004055f0 lui gp, 0x43 |
0x004055f4 addiu sp, sp, -0x430 |
0x004055f8 addiu gp, gp, 0x1620 | gp += 0x1620;
0x004055fc lw t9, -0x7fb8(gp) | t9 = sym.json_verify_get_int;
0x00405600 sw s1, 0x428(sp) | *(var_428h) = s1;
0x00405604 sw s0, 0x424(sp) | *(var_424h) = s0;
0x00405608 move s1, a0 | s1 = a0;
0x0040560c move s0, a1 | s0 = a1;
0x00405610 move a0, a1 | a0 = a1;
0x00405614 lui a1, 0x41 | a1 = 0x410000;
0x00405618 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040561c sw ra, 0x42c(sp) | *(var_42ch) = ra;
| /* esilref: 'id' */
0x00405620 addiu a1, a1, 0x527c | a1 += 0x527c;
0x00405624 addiu a2, sp, 0x418 | a2 = sp + 0x418;
0x00405628 jalr t9 | t9 ();
0x0040562c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x00405630 bgez v0, 0x40565c |
0x00405634 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00405638 lui a1, 0x41 | a1 = 0x410000;
0x0040563c lui a2, 0x41 | a2 = 0x410000;
0x00405640 addiu a0, zero, 3 | a0 = 3;
| /* str._s____msg_does_not_have_id:__s_n */
0x00405644 addiu a1, a1, 0x5280 | a1 += 0x5280;
| /* str.handle_local_msg_country */
0x00405648 addiu a2, a2, 0x7af4 | a2 += 0x7af4;
0x0040564c move a3, s0 | a3 = s0;
0x00405650 jalr t9 | t9 ();
0x00405654 j 0x4056dc | goto label_0;
0x00405658 addiu v0, zero, -1 | v0 = -1;
| }
0x0040565c lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x00405660 addiu s0, sp, 0x18 | s0 = sp + 0x18;
0x00405664 addiu a2, zero, 0x400 | a2 = 0x400;
0x00405668 move a0, s0 | a0 = s0;
0x0040566c move a1, zero | a1 = 0;
0x00405670 jalr t9 | t9 ();
0x00405674 lui v0, 0x43 | v0 = 0x430000;
0x00405678 lb v0, -0x6bb4(v0) | v0 = *((v0 - 27572));
0x0040567c lw gp, 0x10(sp) | gp = *(var_10h);
0x00405680 lw a2, 0x418(sp) | a2 = *(var_418h);
| if (v0 != 0) {
0x00405684 beqz v0, 0x405694 |
0x00405688 lui a3, 0x43 | a3 = 0x430000;
0x0040568c j 0x40569c | goto label_1;
0x00405690 addiu a3, a3, -0x6bb4 | a3 += -0x6bb4;
| }
0x00405694 lui a3, 0x41 | a3 = 0x4154e8;
| /* esilref: 'prc' */
0x00405698 addiu a3, a3, 0x54e8 |
| label_1:
0x0040569c lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x004056a0 lui a1, 0x41 | a1 = "{\"id\":%d,\"method\":\"local.country\",\"params\":\"%s\"}";
| /* str._id_:_d__method_:_local.country___params_:__s_ */
0x004056a4 addiu a1, a1, 0x54ec |
0x004056a8 move a0, s0 | a0 = s0;
0x004056ac jalr t9 | t9 ();
0x004056b0 lw gp, 0x10(sp) | gp = *(var_10h);
0x004056b4 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x004056b8 move a0, s0 | a0 = s0;
0x004056bc jalr t9 | t9 ();
0x004056c0 lw gp, 0x10(sp) | gp = *(var_10h);
0x004056c4 move a0, s1 | a0 = s1;
0x004056c8 lw t9, -0x7fc4(gp) | t9 = sym.general_send_one;
0x004056cc move a1, s0 | a1 = s0;
0x004056d0 move a2, v0 | a2 = v0;
0x004056d4 jalr t9 | t9 ();
0x004056d8 move v0, zero | v0 = 0;
| label_0:
0x004056dc lw ra, 0x42c(sp) | ra = *(var_42ch);
0x004056e0 lw s1, 0x428(sp) | s1 = *(var_428h);
0x004056e4 lw s0, 0x424(sp) | s0 = *(var_424h);
0x004056e8 addiu sp, sp, 0x430 |
0x004056ec jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x4058a0 */
| #include <stdint.h>
|
; (fcn) fcn.004058a0 () | void fcn_004058a0 () {
0x004058a0 lui gp, 0x43 |
0x004058a4 addiu gp, gp, 0x1620 |
0x004058a8 addiu sp, sp, -0x430 |
0x004058ac lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x004058b0 sw ra, 0x42c(sp) | *(var_42ch) = ra;
0x004058b4 sw s2, 0x428(sp) | *(var_428h) = s2;
0x004058b8 sw s1, 0x424(sp) | *(var_424h) = s1;
0x004058bc sw s0, 0x420(sp) | *(var_420h) = s0;
0x004058c0 sw gp, 0x10(sp) | *(var_10h) = gp;
0x004058c4 move s2, a0 | s2 = a0;
0x004058c8 sw zero, 0x418(sp) | *(var_418h) = 0;
0x004058cc move a0, a1 | a0 = a1;
0x004058d0 move s1, a1 | s1 = a1;
0x004058d4 jalr t9 | t9 ();
0x004058d8 lw gp, 0x10(sp) | gp = *(var_10h);
0x004058dc lui a1, 0x41 | a1 = 0x410000;
0x004058e0 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x004058e4 lui s0, 0x41 | s0 = 0x410000;
0x004058e8 addiu a0, zero, 3 | a0 = 3;
| /* str._s____strlen:__d_n */
0x004058ec addiu a1, a1, 0x555c | a1 += 0x555c;
| /* str.handle_local_msg_ble_config_router */
0x004058f0 addiu a2, s0, 0x7b10 | a2 = s0 + 0x7b10;
0x004058f4 move a3, v0 | a3 = v0;
0x004058f8 jalr t9 | t9 ();
0x004058fc lw gp, 0x10(sp) | gp = *(var_10h);
0x00405900 lui a1, 0x41 | a1 = 0x410000;
0x00405904 lw t9, -0x7fb8(gp) | t9 = sym.json_verify_get_int;
0x00405908 move a0, s1 | a0 = s1;
| /* esilref: 'id' */
0x0040590c addiu a1, a1, 0x527c | a1 += 0x527c;
0x00405910 addiu a2, sp, 0x418 | a2 = sp + 0x418;
0x00405914 jalr t9 | t9 ();
0x00405918 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x0040591c bgez v0, 0x405944 |
0x00405920 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00405924 lui a1, 0x41 | a1 = 0x410000;
0x00405928 addiu a0, zero, 3 | a0 = 3;
| /* str._s____msg_does_not_have_id:__s_n */
0x0040592c addiu a1, a1, 0x5280 | a1 += 0x5280;
| /* str.handle_local_msg_ble_config_router */
0x00405930 addiu a2, s0, 0x7b10 | a2 = s0 + 0x7b10;
0x00405934 move a3, s1 | a3 = s1;
0x00405938 jalr t9 | t9 ();
0x0040593c j 0x4059e0 | goto label_0;
0x00405940 addiu v0, zero, -1 | v0 = -1;
| }
0x00405944 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x00405948 addiu s0, sp, 0x18 | s0 = sp + 0x18;
0x0040594c move a0, s0 | a0 = s0;
0x00405950 move a1, zero | a1 = 0;
0x00405954 addiu a2, zero, 0x400 | a2 = 0x400;
0x00405958 jalr t9 | t9 ();
0x0040595c lw gp, 0x10(sp) | gp = *(var_10h);
0x00405960 move a0, s1 | a0 = s1;
0x00405964 lw t9, -0x7fa8(gp) | t9 = sym.method_miio_config_router;
0x00405968 move a1, s0 | a1 = s0;
0x0040596c addiu a2, zero, 0x400 | a2 = 0x400;
0x00405970 jalr t9 | t9 ();
0x00405974 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x00405978 bgez v0, 0x4059b8 |
0x0040597c lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00405980 lui a1, 0x41 | a1 = 0x410000;
0x00405984 move a0, zero | a0 = 0;
| /* str.ble_config_router_fail_n */
0x00405988 addiu a1, a1, 0x5570 | a1 += 0x5570;
0x0040598c jalr t9 | t9 ();
0x00405990 lw gp, 0x10(sp) | gp = *(var_10h);
0x00405994 lui a1, 0x41 | a1 = 0x410000;
0x00405998 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040599c lw a2, 0x418(sp) | a2 = *(var_418h);
0x004059a0 lui a3, 0x41 | a3 = 0x410000;
0x004059a4 move a0, s0 | a0 = s0;
| /* str._id_:_d__error_:_code_:_33020__message_:__s_ */
0x004059a8 addiu a1, a1, 0x5588 | a1 += 0x5588;
| /* str.ble_config_router_fail. */
0x004059ac addiu a3, a3, 0x55bc | a3 += 0x55bc;
0x004059b0 jalr t9 | t9 ();
0x004059b4 lw gp, 0x10(sp) | gp = *(var_10h);
| }
0x004059b8 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x004059bc move a0, s0 | a0 = s0;
0x004059c0 jalr t9 | t9 ();
0x004059c4 lw gp, 0x10(sp) | gp = *(var_10h);
0x004059c8 move a0, s2 | a0 = s2;
0x004059cc lw t9, -0x7fc4(gp) | t9 = sym.general_send_one;
0x004059d0 move a1, s0 | a1 = s0;
0x004059d4 move a2, v0 | a2 = v0;
0x004059d8 jalr t9 | t9 ();
0x004059dc move v0, zero | v0 = 0;
| label_0:
0x004059e0 lw ra, 0x42c(sp) | ra = *(var_42ch);
0x004059e4 lw s2, 0x428(sp) | s2 = *(var_428h);
0x004059e8 lw s1, 0x424(sp) | s1 = *(var_424h);
0x004059ec lw s0, 0x420(sp) | s0 = *(var_420h);
0x004059f0 addiu sp, sp, 0x430 |
0x004059f4 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x405c84 */
| #include <stdint.h>
|
; (fcn) fcn.00405c84 () | void fcn_00405c84 () {
0x00405c84 lui gp, 0x43 |
0x00405c88 addiu gp, gp, 0x1620 |
0x00405c8c addiu sp, sp, -0x1058 |
0x00405c90 lw t9, -0x7d40(gp) | t9 = sym.imp.json_tokener_parse;
0x00405c94 sw ra, 0x1054(sp) | *(var_1054h) = ra;
0x00405c98 sw s4, 0x104c(sp) | *(var_104ch) = s4;
0x00405c9c sw gp, 0x28(sp) | *(var_28h) = gp;
0x00405ca0 sw s5, 0x1050(sp) | *(var_1050h) = s5;
0x00405ca4 sw s3, 0x1048(sp) | *(var_1048h) = s3;
0x00405ca8 sw s2, 0x1044(sp) | *(var_1044h) = s2;
0x00405cac sw s1, 0x1040(sp) | *(var_1040h) = s1;
0x00405cb0 sw s0, 0x103c(sp) | *(var_103ch) = s0;
0x00405cb4 jalr t9 | t9 ();
0x00405cb8 lw gp, 0x28(sp) | gp = *(var_28h);
0x00405cbc lui a1, 0x41 | a1 = 0x410000;
0x00405cc0 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x00405cc4 move a0, v0 | a0 = v0;
| /* str.params */
0x00405cc8 addiu a1, a1, 0x56c4 | a1 += 0x56c4;
0x00405ccc addiu a2, sp, 0x1030 | a2 = sp + 0x1030;
0x00405cd0 move s4, v0 | s4 = v0;
0x00405cd4 jalr t9 | t9 ();
0x00405cd8 lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 == 0) {
0x00405cdc bnez v0, 0x405cf0 |
0x00405ce0 lui a1, 0x41 | a1 = 0x410000;
0x00405ce4 move a0, zero | a0 = 0;
0x00405ce8 j 0x405d14 | goto label_0;
| /* str.msg_does_not_have__params_._n */
0x00405cec addiu a1, a1, 0x56cc | a1 += 0x56cc;
| }
0x00405cf0 lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x00405cf4 lw a0, 0x1030(sp) | a0 = *(var_1030h);
0x00405cf8 addiu a1, zero, 6 | a1 = 6;
0x00405cfc jalr t9 | t9 ();
0x00405d00 lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 == 0) {
0x00405d04 bnez v0, 0x405d28 |
0x00405d08 lui a1, 0x41 | a1 = 0x410000;
0x00405d0c move a0, zero | a0 = 0;
| /* str.debug_param_is_not_string_n */
0x00405d10 addiu a1, a1, 0x56ec | a1 += 0x56ec;
| label_0:
0x00405d14 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00405d18 jalr t9 | t9 ();
0x00405d1c nop |
0x00405d20 j 0x405fa4 | goto label_1;
0x00405d24 lw gp, 0x28(sp) | gp = *(var_28h);
| }
0x00405d28 lw t9, -0x7dfc(gp) | t9 = sym.imp.json_object_get_string;
0x00405d2c lw a0, 0x1030(sp) | a0 = *(var_1030h);
0x00405d30 addiu s1, sp, 0x30 | s1 = sp + 0x30;
0x00405d34 jalr t9 | t9 ();
0x00405d38 lw gp, 0x28(sp) | gp = *(var_28h);
0x00405d3c move a0, s1 | a0 = s1;
0x00405d40 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x00405d44 move a1, zero | a1 = 0;
0x00405d48 addiu a2, zero, 0x1000 | a2 = 0x1000;
0x00405d4c move s0, v0 | s0 = v0;
0x00405d50 jalr t9 | t9 ();
0x00405d54 lw gp, 0x28(sp) | gp = *(var_28h);
0x00405d58 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x00405d5c move a0, s0 | a0 = s0;
0x00405d60 jalr t9 | t9 ();
0x00405d64 addiu v1, zero, 4 | v1 = 4;
0x00405d68 lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 == v1) {
0x00405d6c bne v0, v1, 0x405e10 |
0x00405d70 lw t9, -0x7df4(gp) | t9 = sym.imp.strcmp;
0x00405d74 lui a1, 0x41 | a1 = 0x410000;
0x00405d78 move a0, s0 | a0 = s0;
| /* str.ping */
0x00405d7c addiu a1, a1, 0x5708 | a1 += 0x5708;
0x00405d80 jalr t9 | t9 ();
0x00405d84 lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 == 0) {
0x00405d88 bnez v0, 0x405d9c |
0x00405d8c lui a1, 0x41 | a1 = 0x410000;
0x00405d90 move a0, s1 | a0 = s1;
0x00405d94 j 0x405f78 | goto label_2;
| /* str._result_:_debug:_pong_ */
0x00405d98 addiu a1, a1, 0x5710 | a1 += 0x5710;
| }
0x00405d9c lw t9, -0x7df4(gp) | t9 = sym.imp.strcmp;
0x00405da0 lui a1, 0x41 | a1 = 0x410000;
0x00405da4 move a0, s0 | a0 = s0;
| /* str.miio */
0x00405da8 addiu a1, a1, 0x572c | a1 += 0x572c;
0x00405dac jalr t9 | t9 ();
0x00405db0 lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 != 0) {
0x00405db4 bnez v0, 0x405f6c | goto label_3;
| }
0x00405db8 lui v1, 0x43 | v1 = 0x430000;
0x00405dbc lui v0, 0x43 | v0 = 0x430000;
0x00405dc0 lw a2, -0x6dd0(v1) | a2 = *((v1 - 7028));
0x00405dc4 addiu v0, v0, -0x6bac | v0 += -0x6bac;
| /* obj.miio */
0x00405dc8 addiu v1, v1, -0x6dd0 | v1 += -0x6dd0;
0x00405dcc lw a3, 0x194(v1) | a3 = *((v1 + 101));
0x00405dd0 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00405dd4 lw a0, 0x2e0(v1) | a0 = *((v1 + 184));
0x00405dd8 lw a1, 0x2e4(v1) | a1 = *((v1 + 185));
0x00405ddc sw a0, 0x18(sp) | *(var_18h) = a0;
0x00405de0 sw a1, 0x1c(sp) | *(var_1ch) = a1;
0x00405de4 lw v0, 0x2c4(v1) | v0 = *((v1 + 177));
0x00405de8 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x00405dec sw v0, 0x20(sp) | *(var_20h) = v0;
0x00405df0 lw v0, 0x2c8(v1) | v0 = *((v1 + 178));
0x00405df4 lui a1, 0x41 | a1 = 0x410000;
0x00405df8 sw v0, 0x24(sp) | *(var_24h) = v0;
0x00405dfc move a0, s1 | a0 = s1;
| /* str._result_:_debug:_state:__d__count_pollfds:__d__host:__s__did:__llu__retry:__d__d_ */
0x00405e00 addiu a1, a1, 0x5734 | a1 += 0x5734;
0x00405e04 jalr t9 | t9 ();
0x00405e08 j 0x405f88 | goto label_4;
0x00405e0c lw gp, 0x28(sp) | gp = *(var_28h);
| }
0x00405e10 addiu v1, zero, 5 | v1 = 5;
0x00405e14 lw t9, -0x7df4(gp) | t9 = sym.imp.strcmp;
| if (v0 != v1) {
0x00405e18 bne v0, v1, 0x405f6c | goto label_3;
| }
0x00405e1c lui a1, 0x41 | a1 = 0x410000;
0x00405e20 move a0, s0 | a0 = s0;
| /* str.queue */
0x00405e24 addiu a1, a1, 0x5788 | a1 += 0x5788;
0x00405e28 jalr t9 | t9 ();
0x00405e2c lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 != 0) {
0x00405e30 bnez v0, 0x405f6c | goto label_3;
| }
0x00405e34 lui s2, 0x43 | s2 = miio;
| /* obj.miio */
0x00405e38 addiu s2, s2, -0x6dd0 |
0x00405e3c lw v0, 0x3ac(s2) | v0 = *((s2 + 235));
0x00405e40 lui a2, 0x41 | a2 = 0x410000;
| if (v0 != 0) {
0x00405e44 beqz v0, 0x405e50 |
0x00405e48 j 0x405e58 | goto label_5;
| /* str.not_null:_ */
0x00405e4c addiu a2, a2, 0x56b0 | a2 += 0x56b0;
| }
0x00405e50 lui a2, 0x41 | a2 = "NULL;";
| /* str.NULL_ */
0x00405e54 addiu a2, a2, 0x56a8 |
| label_5:
0x00405e58 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x00405e5c lui a1, 0x41 | a1 = 0x410000;
0x00405e60 move a0, s1 | a0 = s1;
| /* str._result_:_debug:_data_queue:__s */
0x00405e64 addiu a1, a1, 0x5790 | a1 += 0x5790;
0x00405e68 jalr t9 | t9 ();
0x00405e6c lw s3, 0x3ac(s2) | s3 = *((s2 + 235));
0x00405e70 lw gp, 0x28(sp) | gp = *(var_28h);
0x00405e74 move s0, v0 | s0 = v0;
| if (s3 == 0) {
0x00405e78 beqz s3, 0x405ecc | goto label_6;
| }
0x00405e7c lui s5, 0x41 | s5 = "id:%d, size:%d, retry:%d, ack_timeout:%llu;";
| /* str.id:_d__size:_d__retry:_d__ack_timeout:_llu_ */
0x00405e80 addiu s5, s5, 0x57b4 |
| do {
0x00405e84 sltiu v0, s0, 0x1000 | v0 = (s0 < 0x1000) ? 1 : 0;
0x00405e88 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
| if (v0 == 0) {
0x00405e8c beqz v0, 0x405ecc | goto label_6;
| }
0x00405e90 lw v0, 0xc(s3) | v0 = *((s3 + 3));
0x00405e94 lw a2, (s3) | a2 = *(s3);
0x00405e98 lw a3, 8(s3) | a3 = *((s3 + 2));
0x00405e9c sw v0, 0x10(sp) | *(var_10h) = v0;
0x00405ea0 lw v0, 0x10(s3) | v0 = *((s3 + 4));
0x00405ea4 lw v1, 0x14(s3) | v1 = *((s3 + 5));
0x00405ea8 addu a0, s1, s0 | a0 = s1 + s0;
0x00405eac sw v0, 0x18(sp) | *(var_18h) = v0;
0x00405eb0 sw v1, 0x1c(sp) | *(var_1ch) = v1;
0x00405eb4 move a1, s5 | a1 = s5;
0x00405eb8 jalr t9 | t9 ();
0x00405ebc lw s3, 0x18(s3) | s3 = *((s3 + 6));
0x00405ec0 lw gp, 0x28(sp) | gp = *(var_28h);
0x00405ec4 addu s0, s0, v0 | s0 += v0;
0x00405ec8 bnez s3, 0x405e84 |
| } while (s3 != 0);
| label_6:
0x00405ecc lw v0, 0x3b0(s2) | v0 = *((s2 + 236));
0x00405ed0 addu a0, s1, s0 | a0 = s1 + s0;
| if (v0 != 0) {
0x00405ed4 beqz v0, 0x405ee4 |
0x00405ed8 lui a2, 0x41 | a2 = 0x410000;
0x00405edc j 0x405eec | goto label_7;
| /* str.not_null:_ */
0x00405ee0 addiu a2, a2, 0x56b0 | a2 += 0x56b0;
| }
0x00405ee4 lui a2, 0x41 | a2 = "NULL";
| /* str.NULL */
0x00405ee8 addiu a2, a2, 0x56bc |
| label_7:
0x00405eec lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x00405ef0 lui a1, 0x41 | a1 = " data_queue_noack: %s";
| /* str._data_queue_noack:__s */
0x00405ef4 addiu a1, a1, 0x57e0 |
0x00405ef8 jalr t9 | t9 ();
0x00405efc lw s2, 0x3b0(s2) | s2 = *((s2 + 236));
0x00405f00 lw gp, 0x28(sp) | gp = *(var_28h);
0x00405f04 addu s0, s0, v0 | s0 += v0;
| if (s2 == 0) {
0x00405f08 beqz s2, 0x405f5c | goto label_8;
| }
0x00405f0c lui s3, 0x41 | s3 = "id:%d, size:%d, retry:%d, ack_timeout:%llu;";
| /* str.id:_d__size:_d__retry:_d__ack_timeout:_llu_ */
0x00405f10 addiu s3, s3, 0x57b4 |
| do {
0x00405f14 sltiu v0, s0, 0x1000 | v0 = (s0 < 0x1000) ? 1 : 0;
0x00405f18 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
| if (v0 == 0) {
0x00405f1c beqz v0, 0x405f5c | goto label_8;
| }
0x00405f20 lw v0, 0xc(s2) | v0 = *((s2 + 3));
0x00405f24 lw a2, (s2) | a2 = *(s2);
0x00405f28 lw a3, 8(s2) | a3 = *((s2 + 2));
0x00405f2c sw v0, 0x10(sp) | *(var_10h) = v0;
0x00405f30 lw v0, 0x10(s2) | v0 = *((s2 + 4));
0x00405f34 lw v1, 0x14(s2) | v1 = *((s2 + 5));
0x00405f38 addu a0, s1, s0 | a0 = s1 + s0;
0x00405f3c sw v0, 0x18(sp) | *(var_18h) = v0;
0x00405f40 sw v1, 0x1c(sp) | *(var_1ch) = v1;
0x00405f44 move a1, s3 | a1 = s3;
0x00405f48 jalr t9 | t9 ();
0x00405f4c lw s2, 0x18(s2) | s2 = *((s2 + 6));
0x00405f50 lw gp, 0x28(sp) | gp = *(var_28h);
0x00405f54 addu s0, s0, v0 | s0 += v0;
0x00405f58 bnez s2, 0x405f14 |
| } while (s2 != 0);
| label_8:
0x00405f5c lui a1, 0x41 | a1 = 0x410000;
0x00405f60 addu a0, s1, s0 | a0 = s1 + s0;
0x00405f64 j 0x405f78 | goto label_2;
| /* esilref: '"}' */
0x00405f68 addiu a1, a1, 0x605c | a1 += 0x605c;
| label_3:
0x00405f6c lui a1, 0x41 | a1 = 0x410000;
0x00405f70 move a0, s1 | a0 = s1;
| /* str._result_:_debug:_unknown_ */
0x00405f74 addiu a1, a1, 0x57f8 | a1 += 0x57f8;
| label_2:
0x00405f78 lw t9, -0x7cd4(gp) | t9 = sym.imp.strcpy;
0x00405f7c jalr t9 | t9 ();
0x00405f80 nop |
0x00405f84 lw gp, 0x28(sp) | gp = *(var_28h);
| label_4:
0x00405f88 lui a1, 0x41 | a1 = 0x410000;
0x00405f8c lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00405f90 addiu a0, zero, 3 | a0 = 3;
| /* str._internal.debug:__s_n */
0x00405f94 addiu a1, a1, 0x5814 | a1 += 0x5814;
0x00405f98 move a2, s1 | a2 = s1;
0x00405f9c jalr t9 | t9 ();
0x00405fa0 lw gp, 0x28(sp) | gp = *(var_28h);
| label_1:
0x00405fa4 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x00405fa8 move a0, s4 | a0 = s4;
0x00405fac jalr t9 | t9 ();
0x00405fb0 lw ra, 0x1054(sp) | ra = *(var_1054h);
0x00405fb4 lw s5, 0x1050(sp) | s5 = *(var_1050h);
0x00405fb8 lw s4, 0x104c(sp) | s4 = *(var_104ch);
0x00405fbc lw s3, 0x1048(sp) | s3 = *(var_1048h);
0x00405fc0 lw s2, 0x1044(sp) | s2 = *(var_1044h);
0x00405fc4 lw s1, 0x1040(sp) | s1 = *(var_1040h);
0x00405fc8 lw s0, 0x103c(sp) | s0 = *(var_103ch);
0x00405fcc addiu sp, sp, 0x1058 |
0x00405fd0 jr ra | return v1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40989c */
| #include <stdint.h>
|
; (fcn) fcn.0040989c () | void fcn_0040989c () {
0x0040989c addiu sp, sp, -0x280 |
0x004098a0 sw s1, 0x260(sp) | *(var_260h) = s1;
0x004098a4 lui s1, 0x43 | s1 = 0x430000;
0x004098a8 sw s0, 0x25c(sp) | *(var_25ch) = s0;
0x004098ac lui gp, 0x43 |
| /* obj.miio */
0x004098b0 addiu s0, s1, -0x6dd0 | s0 = s1 + -0x6dd0;
0x004098b4 addiu gp, gp, 0x1620 | gp += 0x1620;
0x004098b8 lw a0, 0x2a0(s0) | a0 = *((s0 + 168));
0x004098bc lw t9, -0x7fac(gp) | t9 = sym.get_port;
0x004098c0 sw ra, 0x27c(sp) | *(var_27ch) = ra;
0x004098c4 sw s3, 0x268(sp) | *(var_268h) = s3;
0x004098c8 sw s2, 0x264(sp) | *(var_264h) = s2;
0x004098cc sw gp, 0x20(sp) | *(var_20h) = gp;
0x004098d0 addiu a0, a0, 4 | a0 += 4;
0x004098d4 sw s7, 0x278(sp) | *(var_278h) = s7;
0x004098d8 sw s6, 0x274(sp) | *(var_274h) = s6;
0x004098dc sw s5, 0x270(sp) | *(var_270h) = s5;
0x004098e0 sw s4, 0x26c(sp) | *(var_26ch) = s4;
0x004098e4 sb zero, 0x228(sp) | *(var_228h) = 0;
0x004098e8 jalr t9 | t9 ();
0x004098ec lw gp, 0x20(sp) | gp = *(var_20h);
0x004098f0 lw a0, 0x2a0(s0) | a0 = *((s0 + 168));
0x004098f4 addiu s2, sp, 0x228 | s2 = sp + 0x228;
0x004098f8 lw t9, -0x7fb0(gp) | t9 = sym.get_ip_str;
0x004098fc addiu a0, a0, 4 | a0 += 4;
0x00409900 move a1, s2 | a1 = s2;
0x00409904 addiu a2, zero, 0x2e | a2 = 0x2e;
0x00409908 move s3, v0 | s3 = v0;
0x0040990c jalr t9 | t9 ();
0x00409910 lw gp, 0x20(sp) | gp = *(var_20h);
0x00409914 lw v0, 0x2c0(s0) | v0 = *((s0 + 176));
0x00409918 lui a1, 0x41 | a1 = 0x410000;
0x0040991c lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00409920 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00409924 addiu a0, zero, 3 | a0 = 3;
0x00409928 move a2, s2 | a2 = s2;
| /* str.OT_server:__s__port:__d_not_response__close__socket__d__n */
0x0040992c addiu a1, a1, 0x6a24 | a1 += 0x6a24;
0x00409930 move a3, s3 | a3 = s3;
0x00409934 jalr t9 | t9 ();
0x00409938 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040993c move a0, zero | a0 = 0;
0x00409940 move v0, zero | v0 = 0;
0x00409944 move a2, s0 | a2 = s0;
| label_0:
0x00409948 lw v1, 0x194(s0) | v1 = *((s0 + 101));
| do {
0x0040994c slt a1, v0, v1 | a1 = (v0 < v1) ? 1 : 0;
0x00409950 sll a3, v0, 3 | a3 = v0 << 3;
| if (a1 == 0) {
0x00409954 beqz a1, 0x4099a8 | goto label_4;
| }
0x00409958 addu a1, a3, a2 | a1 = a3 + a2;
0x0040995c lw t0, 4(a1) | t0 = *((a1 + 1));
0x00409960 lw a1, 0x2c0(a2) | a1 = *((a2 + 176));
0x00409964 addiu v0, v0, 1 | v0++;
0x00409968 bnel t0, a1, 0x40994c |
| } while (t0 == a1);
0x0040996c subu v0, v1, v0 | __asm ("subu v0, v1, v0");
0x00409970 sll v0, v0, 3 | v0 <<= 3;
0x00409974 move a1, zero | a1 = 0;
| do {
0x00409978 addu a0, a1, a3 | a0 = a1 + a3;
0x0040997c addu a0, s0, a0 | a0 = s0 + a0;
0x00409980 lw t0, 0xc(a0) | t0 = *((a0 + 3));
0x00409984 addiu a1, a1, 8 | a1 += 8;
0x00409988 sw t0, 4(a0) | *((a0 + 1)) = t0;
0x0040998c lw t0, 0x10(a0) | t0 = *((a0 + 4));
0x00409990 sw t0, 8(a0) | *((a0 + 2)) = t0;
0x00409994 bne a1, v0, 0x409978 |
| } while (a1 != v0);
0x00409998 move v0, v1 | v0 = v1;
0x0040999c addiu a0, zero, 1 | a0 = 1;
0x004099a0 j 0x409948 | goto label_0;
0x004099a4 addiu v0, v0, 1 | v0++;
| label_4:
0x004099a8 addiu v1, v1, -1 | v1 += -1;
| if (a0 != 0) {
0x004099ac beqz a0, 0x4099b8 |
0x004099b0 j 0x4099d4 | goto label_5;
0x004099b4 sw v1, 0x194(a2) | *((a2 + 101)) = v1;
| }
0x004099b8 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x004099bc lui a1, 0x41 | a1 = 0x410000;
0x004099c0 lw a2, 0x2c0(a2) | a2 = *((a2 + 176));
0x004099c4 addiu a0, zero, 1 | a0 = 1;
| /* str.miio.cloud_sockfd___d__not_in_pollfds._n */
0x004099c8 addiu a1, a1, 0x6a60 | a1 += 0x6a60;
0x004099cc jalr t9 | t9 ();
0x004099d0 lw gp, 0x20(sp) | gp = *(var_20h);
| label_5:
0x004099d4 lw t9, -0x7e64(gp) | t9 = sym.imp.close;
0x004099d8 lw a0, 0x2c0(s0) | a0 = *((s0 + 176));
0x004099dc jalr t9 | t9 ();
0x004099e0 sw zero, 0x2c0(s0) | *((s0 + 176)) = 0;
0x004099e4 jal 0x404d18 | fcn_00404d18 ();
0x004099e8 lw v0, 0x2c4(s0) | v0 = *((s0 + 177));
0x004099ec addiu a1, zero, 0xa | a1 = 0xa;
0x004099f0 slti v1, v0, 0xb | v1 = (v0 < 0xb) ? 1 : 0;
| if (v1 != 0) {
0x004099f4 movz v0, a1, v1 | v0 = a1;
| }
0x004099f8 addiu v0, v0, 1 | v0++;
0x004099fc addiu a1, zero, 0x2710 | a1 = 0x2710;
0x00409a00 lw gp, 0x20(sp) | gp = *(var_20h);
0x00409a04 mul a1, v0, a1 | __asm ("mul a1, v0, a1");
0x00409a08 addiu v1, zero, 9 | v1 = 9;
0x00409a0c lw t9, -0x7f5c(gp) | t9 = sym.timer_start;
0x00409a10 lw a0, 0x1f0(s0) | a0 = *((s0 + 124));
0x00409a14 sw v1, -0x6dd0(s1) | *((s1 - 7028)) = v1;
0x00409a18 move a2, zero | a2 = 0;
0x00409a1c jalr t9 | t9 ();
0x00409a20 lw s1, 0x3ac(s0) | s1 = *((s0 + 235));
0x00409a24 lw gp, 0x20(sp) | gp = *(var_20h);
| if (s1 == 0) {
0x00409a28 bnez s1, 0x409a5c |
0x00409a2c lw s0, 0x3b0(s0) | s0 = *((s0 + 236));
| label_1:
0x00409a30 lui s1, 0x41 | s1 = 0x410000;
| if (s0 == 0) {
0x00409a34 beqz s0, 0x409bcc | goto label_6;
| }
0x00409a38 lui s2, 0x41 | s2 = 0x410000;
0x00409a3c lui s3, 0x43 | s3 = 0x430000;
0x00409a40 lui s4, 0x41 | s4 = 0x410000;
| /* str.data_queue_noack:_id:_d__size:_d__retry:_d__ack_timeout:_llu_n */
0x00409a44 addiu s1, s1, 0x6ac8 | s1 += 0x6ac8;
| /* str._id_:_d__error_:_code_:_30011__message_:_OT_server_disconnected_ */
0x00409a48 addiu s2, s2, 0x6b08 | s2 += 0x6b08;
| /* obj.miio_callback_queue */
0x00409a4c addiu s3, s3, -0x6680 | s3 += -0x6680;
| /* str.callback_queue_issue___id:__d__ret:__d_n */
0x00409a50 addiu s4, s4, 0x5680 | s4 += 0x5680;
0x00409a54 j 0x409b00 | goto label_7;
0x00409a58 lui s7, 0x41 | s7 = 0x410000;
| }
0x00409a5c lui s2, 0x41 | s2 = "data_queue desc: id:%d, size:%d, retry:%d, ack_timeout:%llu\n";
| /* str.data_queue_desc:_id:_d__size:_d__retry:_d__ack_timeout:_llu_n */
0x00409a60 addiu s2, s2, 0x6a88 |
| do {
0x00409a64 lw v0, 0xc(s1) | v0 = *((s1 + 3));
0x00409a68 lw a2, (s1) | a2 = *(s1);
0x00409a6c lw a3, 8(s1) | a3 = *((s1 + 2));
0x00409a70 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00409a74 lw v0, 0x10(s1) | v0 = *((s1 + 4));
0x00409a78 lw v1, 0x14(s1) | v1 = *((s1 + 5));
0x00409a7c lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00409a80 sw v0, 0x18(sp) | *(var_18h) = v0;
0x00409a84 sw v1, 0x1c(sp) | *(var_1ch) = v1;
0x00409a88 addiu a0, zero, 3 | a0 = 3;
0x00409a8c move a1, s2 | a1 = s2;
0x00409a90 jalr t9 | t9 ();
0x00409a94 lw s1, 0x18(s1) | s1 = *((s1 + 6));
0x00409a98 lw gp, 0x20(sp) | gp = *(var_20h);
0x00409a9c bnez s1, 0x409a64 |
| } while (s1 != 0);
0x00409aa0 lw s1, 0x3ac(s0) | s1 = *((s0 + 235));
0x00409aa4 addiu s2, zero, -1 | s2 = -1;
| if (s1 == 0) {
| label_2:
0x00409aa8 beql s1, zero, 0x409a30 | goto label_1;
| }
0x00409aac lw s0, 0x3b0(s0) | s0 = *((s0 + 236));
0x00409ab0 lw v0, 0x18(s1) | v0 = *((s1 + 6));
0x00409ab4 sw v0, 0x3ac(s0) | *((s0 + 235)) = v0;
0x00409ab8 lw v0, 0xc(s1) | v0 = *((s1 + 3));
0x00409abc lw v0, 0x3b0(s0) | v0 = *((s0 + 236));
| if (v0 != s2) {
0x00409ac0 bnel v0, s2, 0x409ae8 |
0x00409ac4 lw t9, -0x7e6c(gp) | t9 = sym.imp.free;
0x00409ac8 lw a0, 4(s1) | a0 = *((s1 + 1));
0x00409acc jalr t9 | t9 ();
0x00409ad0 lw gp, 0x20(sp) | gp = *(var_20h);
0x00409ad4 lw t9, -0x7e6c(gp) | t9 = sym.imp.free;
0x00409ad8 move a0, s1 | a0 = s1;
0x00409adc jalr t9 | t9 ();
0x00409ae0 j 0x409af0 | goto label_8;
0x00409ae4 lw gp, 0x20(sp) | gp = *(var_20h);
| }
0x00409ae8 sw v0, 0x18(s1) | *((s1 + 6)) = v0;
0x00409aec sw s1, 0x3b0(s0) | *((s0 + 236)) = s1;
| label_8:
0x00409af0 j 0x409aa8 | goto label_2;
0x00409af4 lw s1, 0x3ac(s0) | s1 = *((s0 + 235));
| do {
| label_3:
0x00409af8 move s0, s6 | s0 = s6;
| if (s6 == 0) {
0x00409afc beqz s6, 0x409bcc | goto label_6;
| }
| label_7:
0x00409b00 lw v0, 0xc(s0) | v0 = *((s0 + 3));
0x00409b04 lw a3, 8(s0) | a3 = *((s0 + 2));
0x00409b08 lw a2, (s0) | a2 = *(s0);
0x00409b0c lw s6, 0x18(s0) | s6 = *((s0 + 6));
0x00409b10 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00409b14 lw v1, 0x14(s0) | v1 = *((s0 + 5));
0x00409b18 lw v0, 0x10(s0) | v0 = *((s0 + 4));
0x00409b1c lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00409b20 sw v1, 0x1c(sp) | *(var_1ch) = v1;
0x00409b24 sw v0, 0x18(sp) | *(var_18h) = v0;
0x00409b28 addiu a0, zero, 3 | a0 = 3;
0x00409b2c move a1, s1 | a1 = s1;
0x00409b30 jalr t9 | t9 ();
0x00409b34 lw gp, 0x20(sp) | gp = *(var_20h);
0x00409b38 addiu s5, sp, 0x28 | s5 = sp + 0x28;
0x00409b3c lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x00409b40 move a0, s5 | a0 = s5;
0x00409b44 move a1, zero | a1 = 0;
0x00409b48 addiu a2, zero, 0x200 | a2 = 0x200;
0x00409b4c jalr t9 | t9 ();
0x00409b50 lw gp, 0x20(sp) | gp = *(var_20h);
0x00409b54 lw a2, (s0) | a2 = *(s0);
0x00409b58 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x00409b5c move a0, s5 | a0 = s5;
0x00409b60 move a1, s2 | a1 = s2;
0x00409b64 jalr t9 | t9 ();
0x00409b68 lw gp, 0x20(sp) | gp = *(var_20h);
0x00409b6c lw a1, (s0) | a1 = *(s0);
0x00409b70 lw t9, -0x7f9c(gp) | t9 = sym.callback_queue_issue;
0x00409b74 move a2, s5 | a2 = s5;
0x00409b78 move a0, s3 | a0 = s3;
0x00409b7c jalr t9 | t9 ();
0x00409b80 lw gp, 0x20(sp) | gp = *(var_20h);
0x00409b84 lw a2, (s0) | a2 = *(s0);
0x00409b88 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00409b8c move s5, v0 | s5 = v0;
0x00409b90 addiu a0, zero, 3 | a0 = 3;
0x00409b94 move a1, s4 | a1 = s4;
0x00409b98 move a3, v0 | a3 = v0;
0x00409b9c jalr t9 | t9 ();
0x00409ba0 lw gp, 0x20(sp) | gp = *(var_20h);
0x00409ba4 bgez s5, 0x409af8 |
| } while (s5 >= 0);
0x00409ba8 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x00409bac lw a2, (s0) | a2 = *(s0);
0x00409bb0 addiu a0, zero, 1 | a0 = 1;
| /* str.callback_queue_issue___ret___0__discard_data_desc:__d_n */
0x00409bb4 addiu a1, s7, 0x6b50 | a1 = s7 + 0x6b50;
0x00409bb8 jalr t9 | t9 ();
0x00409bbc lw a0, (s0) | a0 = *(s0);
0x00409bc0 jal 0x4097d8 | sym_queue_ack ();
0x00409bc4 j 0x409af8 | goto label_3;
0x00409bc8 lw gp, 0x20(sp) | gp = *(var_20h);
| label_6:
0x00409bcc lw ra, 0x27c(sp) | ra = *(var_27ch);
0x00409bd0 lw s7, 0x278(sp) | s7 = *(var_278h);
0x00409bd4 lw s6, 0x274(sp) | s6 = *(var_274h);
0x00409bd8 lw s5, 0x270(sp) | s5 = *(var_270h);
0x00409bdc lw s4, 0x26c(sp) | s4 = *(var_26ch);
0x00409be0 lw s3, 0x268(sp) | s3 = *(var_268h);
0x00409be4 lw s2, 0x264(sp) | s2 = *(var_264h);
0x00409be8 lw s1, 0x260(sp) | s1 = *(var_260h);
0x00409bec lw s0, 0x25c(sp) | s0 = *(var_25ch);
0x00409bf0 addiu sp, sp, 0x280 |
0x00409bf4 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40a590 */
| #include <stdint.h>
|
; (fcn) fcn.0040a590 () | void fcn_0040a590 () {
0x0040a590 lui gp, 0x43 |
0x0040a594 addiu gp, gp, 0x1620 |
0x0040a598 addiu sp, sp, -0x470 |
0x0040a59c lw t9, -0x7f6c(gp) | t9 = sym.get_micro_second;
0x0040a5a0 move v0, zero | v0 = 0;
0x0040a5a4 move v1, zero | v1 = 0;
0x0040a5a8 sw ra, 0x46c(sp) | *(var_46ch) = ra;
0x0040a5ac sw s5, 0x45c(sp) | *(var_45ch) = s5;
0x0040a5b0 sw s4, 0x458(sp) | *(var_458h) = s4;
0x0040a5b4 sw s3, 0x454(sp) | *(var_454h) = s3;
0x0040a5b8 sw s2, 0x450(sp) | *(var_450h) = s2;
0x0040a5bc sw s1, 0x44c(sp) | *(var_44ch) = s1;
0x0040a5c0 sw s0, 0x448(sp) | *(var_448h) = s0;
0x0040a5c4 sw gp, 0x30(sp) | *(var_30h) = gp;
0x0040a5c8 sw fp, 0x468(sp) | *(var_468h) = fp;
0x0040a5cc sw s7, 0x464(sp) | *(var_464h) = s7;
0x0040a5d0 sw s6, 0x460(sp) | *(var_460h) = s6;
0x0040a5d4 sw v0, 0x438(sp) | *(var_438h) = v0;
0x0040a5d8 sw v1, 0x43c(sp) | *(var_43ch) = v1;
0x0040a5dc move s5, a0 | s5 = a0;
0x0040a5e0 jalr t9 | t9 ();
0x0040a5e4 lw gp, 0x30(sp) | gp = *(var_30h);
0x0040a5e8 move a0, v0 | a0 = v0;
0x0040a5ec lw t9, -0x7f68(gp) | t9 = sym.__udivdi3;
0x0040a5f0 move a1, v1 | a1 = v1;
0x0040a5f4 addiu a2, zero, 0x3e8 | a2 = 0x3e8;
0x0040a5f8 move a3, zero | a3 = 0;
0x0040a5fc lui s3, 0x43 | s3 = 0x430000;
0x0040a600 jalr t9 | t9 ();
| /* obj.miio */
0x0040a604 addiu s2, s3, -0x6dd0 | s2 = s3 + -0x6dd0;
0x0040a608 move s1, v0 | s1 = v0;
0x0040a60c lw v0, 0x2a0(s2) | v0 = *((s2 + 168));
0x0040a610 lw gp, 0x30(sp) | gp = *(var_30h);
0x0040a614 lw v0, (v0) | v0 = *(v0);
0x0040a618 move s0, v1 | s0 = v1;
0x0040a61c xori v0, v0, 1 | v0 ^= 1;
0x0040a620 addiu v1, zero, 3 | v1 = 3;
| if (v0 != 0) {
0x0040a624 movz v1, zero, v0 | v1 = 0;
| }
0x0040a628 lw t9, -0x7d98(gp) | t9 = sym.imp.read;
0x0040a62c sw v1, 0x440(sp) | *(var_440h) = v1;
0x0040a630 move a0, s5 | a0 = s5;
0x0040a634 addiu a1, sp, 0x438 | a1 = sp + 0x438;
0x0040a638 addiu a2, zero, 8 | a2 = 8;
0x0040a63c lw s4, 0x3b0(s2) | s4 = *((s2 + 236));
0x0040a640 jalr t9 | t9 ();
0x0040a644 lw v1, -0x6dd0(s3) | v1 = *((s3 - 7028));
0x0040a648 lw gp, 0x30(sp) | gp = *(var_30h);
0x0040a64c addiu v1, v1, -7 | v1 += -7;
0x0040a650 sltiu v1, v1, 2 | v1 = (v1 < 2) ? 1 : 0;
0x0040a654 addiu v0, zero, -1 | v0 = -1;
| if (v1 == 0) {
0x0040a658 beqz v1, 0x40a868 | goto label_2;
| }
0x0040a65c move v0, zero | v0 = 0;
| if (s4 == 0) {
0x0040a660 beqz s4, 0x40a868 | goto label_2;
| }
0x0040a664 lui s5, 0x41 | s5 = 0x410000;
0x0040a668 lui s6, 0x41 | s6 = 0x410000;
0x0040a66c addiu s3, zero, 0xbb8 | s3 = 0xbb8;
| /* str.ack_timer_handler */
0x0040a670 addiu s5, s5, 0x7d14 | s5 += 0x7d14;
| /* str._id_:_d__error_:_code_:_30011__message_:_OT_server_noack_ */
0x0040a674 addiu s6, s6, 0x6dc8 | s6 += 0x6dc8;
0x0040a678 lui fp, 0x43 | fp = 0x430000;
0x0040a67c lw v1, 0x18(s4) | v1 = *((s4 + 6));
| label_1:
0x0040a680 sw s4, 0x10(sp) | *(var_10h) = s4;
0x0040a684 lw v0, (s4) | v0 = *(s4);
0x0040a688 sw s1, 0x18(sp) | *(var_18h) = s1;
0x0040a68c sw v0, 0x14(sp) | *(var_14h) = v0;
0x0040a690 sw s0, 0x1c(sp) | *(var_1ch) = s0;
0x0040a694 lw v0, 0x10(s4) | v0 = *((s4 + 4));
0x0040a698 sw v1, 0x444(sp) | *(var_444h) = v1;
0x0040a69c lw v1, 0x14(s4) | v1 = *((s4 + 5));
0x0040a6a0 sw v0, 0x20(sp) | *(var_20h) = v0;
0x0040a6a4 sw v1, 0x24(sp) | *(var_24h) = v1;
0x0040a6a8 lw v0, 8(s4) | v0 = *((s4 + 2));
0x0040a6ac lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040a6b0 sw v0, 0x28(sp) | *(var_28h) = v0;
0x0040a6b4 lw v0, 0xc(s4) | v0 = *((s4 + 3));
0x0040a6b8 lui a1, 0x41 | a1 = 0x410000;
0x0040a6bc sw v0, 0x2c(sp) | *(var_2ch) = v0;
0x0040a6c0 addiu a0, zero, 3 | a0 = 3;
| /* str._s__d:_tmpd:_p__id:__d__curr_time:__llu__ack_timeout:__llu__size:__d__tmpd__retry:__d_n */
0x0040a6c4 addiu a1, a1, 0x6d70 | a1 += 0x6d70;
0x0040a6c8 move a2, s5 | a2 = s5;
0x0040a6cc addiu a3, zero, 0xe33 | a3 = 0xe33;
0x0040a6d0 jalr t9 | t9 ();
0x0040a6d4 lw v1, 0x14(s4) | v1 = *((s4 + 5));
0x0040a6d8 lw gp, 0x30(sp) | gp = *(var_30h);
0x0040a6dc sltu a0, s0, v1 | a0 = (s0 < v1) ? 1 : 0;
0x0040a6e0 lw v0, 0x10(s4) | v0 = *((s4 + 4));
| if (a0 != 0) {
0x0040a6e4 bnez a0, 0x40a748 | goto label_3;
| }
0x0040a6e8 lw a0, 0xc(s4) | a0 = *((s4 + 3));
| if (v1 != s0) {
0x0040a6ec bnel v1, s0, 0x40a700 |
0x0040a6f0 sltu v1, s1, v0 | v1 = (s1 < v0) ? 1 : 0;
0x0040a6f4 subu s3, v0, s1 | __asm ("subu s3, v0, s1");
| if (v1 == 0) {
0x0040a6f8 bnel v1, zero, 0x40a834 | goto label_4;
| }
0x0040a6fc lw a0, 0xc(s4) | a0 = *((s4 + 3));
| }
0x0040a700 addiu a0, a0, 1 | a0++;
0x0040a704 sw a0, 0xc(s4) | *((s4 + 3)) = a0;
| do {
0x0040a708 lw v1, 0x14(s4) | v1 = *((s4 + 5));
0x0040a70c sltu a1, s0, v1 | a1 = (s0 < v1) ? 1 : 0;
0x0040a710 lw v0, 0x10(s4) | v0 = *((s4 + 4));
| if (a1 != 0) {
0x0040a714 bnez a1, 0x40a750 | goto label_5;
| }
0x0040a718 sltu a1, s1, v0 | a1 = (s1 < v0) ? 1 : 0;
| if (v1 == s0) {
0x0040a71c beq v1, s0, 0x40a738 | goto label_6;
| }
0x0040a720 addiu a1, v0, 0xbb8 | a1 = v0 + 0xbb8;
| label_0:
0x0040a724 sltu v0, a1, v0 | v0 = (a1 < v0) ? 1 : 0;
0x0040a728 addu v0, v0, v1 | v0 += v1;
0x0040a72c sw a1, 0x10(s4) | *((s4 + 4)) = a1;
0x0040a730 j 0x40a708 |
| } while (1);
0x0040a734 sw v0, 0x14(s4) | *((s4 + 5)) = v0;
| if (a1 == 0) {
| label_6:
0x0040a738 beql a1, zero, 0x40a724 | goto label_0;
| }
0x0040a73c addiu a1, v0, 0xbb8 | a1 = v0 + 0xbb8;
0x0040a740 j 0x40a754 | goto label_7;
0x0040a744 subu a1, v0, s1 | __asm ("subu a1, v0, s1");
| label_3:
0x0040a748 j 0x40a834 | goto label_4;
0x0040a74c subu s3, v0, s1 | __asm ("subu s3, v0, s1");
| label_5:
0x0040a750 subu a1, v0, s1 | __asm ("subu a1, v0, s1");
| label_7:
0x0040a754 subu v1, v1, s0 | __asm ("subu v1, v1, s0");
0x0040a758 sltu v0, v0, a1 | v0 = (v0 < a1) ? 1 : 0;
0x0040a75c sra a2, s3, 0x1f | a2 = s3 >> 0x1f;
0x0040a760 subu v0, v1, v0 | __asm ("subu v0, v1, v0");
0x0040a764 sltu v1, v0, a2 | v1 = (v0 < a2) ? 1 : 0;
0x0040a768 move s3, a1 | s3 = a1;
| if (v1 != 0) {
0x0040a76c bnel v1, zero, 0x40a788 |
0x0040a770 lw v1, 0x440(sp) | v1 = *(var_440h);
| if (a2 != v0) {
0x0040a774 bne a2, v0, 0x40a78c | goto label_8;
| }
0x0040a778 sltu v0, a1, s3 | v0 = (a1 < s3) ? 1 : 0;
| if (v0 == 0) {
0x0040a77c beql v0, zero, 0x40a790 | goto label_9;
| }
0x0040a780 slt a0, a0, v1 | a0 = (a0 < v1) ? 1 : 0;
0x0040a784 move s3, a1 | s3 = a1;
| }
0x0040a788 lw v1, 0x440(sp) | v1 = *(var_440h);
| label_8:
0x0040a78c slt a0, a0, v1 | a0 = (a0 < v1) ? 1 : 0;
| label_9:
0x0040a790 lw s4, 0x444(sp) | s4 = *(var_444h);
| if (a0 != 0) {
0x0040a794 bnel a0, zero, 0x40a838 |
0x0040a798 addiu s7, sp, 0x38 | s7 = sp + 0x38;
0x0040a79c lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040a7a0 move a0, s7 | a0 = s7;
0x0040a7a4 move a1, zero | a1 = 0;
0x0040a7a8 addiu a2, zero, 0x400 | a2 = 0x400;
0x0040a7ac lw s4, (s4) | s4 = *(s4);
0x0040a7b0 jalr t9 | t9 ();
0x0040a7b4 lw gp, 0x30(sp) | gp = *(var_30h);
0x0040a7b8 move a0, s7 | a0 = s7;
0x0040a7bc lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040a7c0 move a1, s6 | a1 = s6;
0x0040a7c4 move a2, s4 | a2 = s4;
0x0040a7c8 jalr t9 | t9 ();
0x0040a7cc lw gp, 0x30(sp) | gp = *(var_30h);
0x0040a7d0 move a2, s7 | a2 = s7;
0x0040a7d4 lw t9, -0x7f9c(gp) | t9 = sym.callback_queue_issue;
| /* obj.miio_callback_queue */
0x0040a7d8 addiu a0, fp, -0x6680 | a0 = fp + -0x6680;
0x0040a7dc move a1, s4 | a1 = s4;
0x0040a7e0 jalr t9 | t9 ();
0x0040a7e4 lw gp, 0x30(sp) | gp = *(var_30h);
0x0040a7e8 lui a1, 0x41 | a1 = 0x410000;
0x0040a7ec lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040a7f0 move s7, v0 | s7 = v0;
0x0040a7f4 addiu a0, zero, 3 | a0 = 3;
| /* str.callback_queue_issue___id:__d__ret:__d_n */
0x0040a7f8 addiu a1, a1, 0x5680 | a1 += 0x5680;
0x0040a7fc move a2, s4 | a2 = s4;
0x0040a800 move a3, v0 | a3 = v0;
0x0040a804 jalr t9 | t9 ();
0x0040a808 lw gp, 0x30(sp) | gp = *(var_30h);
| if (s7 < 0) {
0x0040a80c bgez s7, 0x40a834 |
0x0040a810 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040a814 lui a1, 0x41 | a1 = 0x410000;
0x0040a818 addiu a0, zero, 1 | a0 = 1;
| /* str.callback_queue_issue___ret___0__discard_data_desc:__d_n */
0x0040a81c addiu a1, a1, 0x6b50 | a1 += 0x6b50;
0x0040a820 move a2, s4 | a2 = s4;
0x0040a824 jalr t9 | t9 ();
0x0040a828 move a0, s4 | a0 = s4;
0x0040a82c jal 0x4097d8 | sym_queue_ack ();
0x0040a830 lw gp, 0x30(sp) | gp = *(var_30h);
| }
| label_4:
0x0040a834 lw s4, 0x444(sp) | s4 = *(var_444h);
| }
0x0040a838 lw v1, 0x18(s4) | v1 = *((s4 + 6));
| if (s4 == 0) {
0x0040a83c bnel s4, zero, 0x40a680 | goto label_1;
| }
0x0040a840 lw a0, 0x2c0(s2) | a0 = *((s2 + 176));
0x0040a844 addiu a1, zero, 4 | a1 = 4;
0x0040a848 jal 0x406dec | fcn_00406dec ();
0x0040a84c lw gp, 0x30(sp) | gp = *(var_30h);
0x0040a850 lw a0, 0x1fc(s2) | a0 = *((s2 + 127));
0x0040a854 lw t9, -0x7f5c(gp) | t9 = sym.timer_start;
0x0040a858 move a1, s3 | a1 = s3;
0x0040a85c move a2, zero | a2 = 0;
0x0040a860 jalr t9 | t9 ();
0x0040a864 move v0, zero | v0 = 0;
| label_2:
0x0040a868 lw ra, 0x46c(sp) | ra = *(var_46ch);
0x0040a86c lw fp, 0x468(sp) | fp = *(var_468h);
0x0040a870 lw s7, 0x464(sp) | s7 = *(var_464h);
0x0040a874 lw s6, 0x460(sp) | s6 = *(var_460h);
0x0040a878 lw s5, 0x45c(sp) | s5 = *(var_45ch);
0x0040a87c lw s4, 0x458(sp) | s4 = *(var_458h);
0x0040a880 lw s3, 0x454(sp) | s3 = *(var_454h);
0x0040a884 lw s2, 0x450(sp) | s2 = *(var_450h);
0x0040a888 lw s1, 0x44c(sp) | s1 = *(var_44ch);
0x0040a88c lw s0, 0x448(sp) | s0 = *(var_448h);
0x0040a890 addiu sp, sp, 0x470 |
0x0040a894 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40abb0 */
| #include <stdint.h>
|
; (fcn) fcn.0040abb0 () | void fcn_0040abb0 () {
0x0040abb0 lui gp, 0x43 |
0x0040abb4 addiu gp, gp, 0x1620 |
0x0040abb8 addiu sp, sp, -0x90 |
0x0040abbc lw t9, -0x7f74(gp) | t9 = sym.generate_random_id;
0x0040abc0 sw ra, 0x8c(sp) | *(var_8ch) = ra;
0x0040abc4 sw s5, 0x84(sp) | *(var_84h) = s5;
0x0040abc8 sw s3, 0x7c(sp) | *(var_7ch) = s3;
0x0040abcc sw s2, 0x78(sp) | *(var_78h) = s2;
0x0040abd0 sw s0, 0x70(sp) | *(var_70h) = s0;
0x0040abd4 sw gp, 0x20(sp) | *(var_20h) = gp;
0x0040abd8 sw s6, 0x88(sp) | *(var_88h) = s6;
0x0040abdc sw s4, 0x80(sp) | *(var_80h) = s4;
0x0040abe0 sw s1, 0x74(sp) | *(var_74h) = s1;
0x0040abe4 move s5, a0 | s5 = a0;
0x0040abe8 jalr t9 | t9 ();
0x0040abec lw gp, 0x20(sp) | gp = *(var_20h);
0x0040abf0 lui a1, 0x41 | a1 = 0x410000;
0x0040abf4 lw s0, -0x7f28(gp) | s0 = *(gp);
0x0040abf8 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040abfc lw a2, 0x1ec(s0) | a2 = *((s0 + 123));
0x0040ac00 addiu a0, zero, 2 | a0 = 2;
| /* str.report_otcinfo_flag:__u_n */
0x0040ac04 addiu a1, a1, 0x7e90 | a1 += 0x7e90;
0x0040ac08 move s3, v0 | s3 = v0;
0x0040ac0c jalr t9 | t9 ();
0x0040ac10 lw v0, 0x1ec(s0) | v0 = *((s0 + 123));
0x0040ac14 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ac18 move s2, s0 | s2 = s0;
| if (v0 == 0) {
0x0040ac1c beqz v0, 0x40acd0 | goto label_1;
| }
0x0040ac20 lw s0, 0x3ac(s0) | s0 = *((s0 + 235));
0x0040ac24 lui s1, 0x41 | s1 = 0x410000;
| if (s0 == 0) {
0x0040ac28 bnez s0, 0x40ac40 |
0x0040ac2c lw s0, 0x3b0(s2) | s0 = *((s2 + 236));
| label_0:
0x0040ac30 lui s1, 0x41 | s1 = 0x410000;
| if (s0 != 0) {
0x0040ac34 bnez s0, 0x40ac88 | goto label_2;
| }
0x0040ac38 j 0x40b018 | goto label_3;
0x0040ac3c move v0, zero | v0 = 0;
| }
| /* str.data_queue_desc:_id:_d__size:_d__retry:_d__ack_timeout:_llu_n */
0x0040ac40 addiu s1, s1, 0x6a88 | s1 += 0x6a88;
| do {
0x0040ac44 lw v0, 0xc(s0) | v0 = *((s0 + 3));
0x0040ac48 lw a2, (s0) | a2 = *(s0);
0x0040ac4c lw a3, 8(s0) | a3 = *((s0 + 2));
0x0040ac50 sw v0, 0x10(sp) | *(var_10h) = v0;
0x0040ac54 lw v0, 0x10(s0) | v0 = *((s0 + 4));
0x0040ac58 lw v1, 0x14(s0) | v1 = *((s0 + 5));
0x0040ac5c lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040ac60 sw v0, 0x18(sp) | *(var_18h) = v0;
0x0040ac64 sw v1, 0x1c(sp) | *(var_1ch) = v1;
0x0040ac68 addiu a0, zero, 3 | a0 = 3;
0x0040ac6c move a1, s1 | a1 = s1;
0x0040ac70 jalr t9 | t9 ();
0x0040ac74 lw s0, 0x18(s0) | s0 = *((s0 + 6));
0x0040ac78 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ac7c bnez s0, 0x40ac44 |
| } while (s0 != 0);
0x0040ac80 j 0x40ac30 | goto label_0;
0x0040ac84 lw s0, 0x3b0(s2) | s0 = *((s2 + 236));
| /* str.data_queue_noack:_id:_d__size:_d__retry:_d__ack_timeout:_llu_n */
| label_2:
0x0040ac88 addiu s1, s1, 0x6ac8 | s1 += 0x6ac8;
| do {
0x0040ac8c lw v0, 0xc(s0) | v0 = *((s0 + 3));
0x0040ac90 lw a2, (s0) | a2 = *(s0);
0x0040ac94 lw a3, 8(s0) | a3 = *((s0 + 2));
0x0040ac98 sw v0, 0x10(sp) | *(var_10h) = v0;
0x0040ac9c lw v0, 0x10(s0) | v0 = *((s0 + 4));
0x0040aca0 lw v1, 0x14(s0) | v1 = *((s0 + 5));
0x0040aca4 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040aca8 sw v0, 0x18(sp) | *(var_18h) = v0;
0x0040acac sw v1, 0x1c(sp) | *(var_1ch) = v1;
0x0040acb0 addiu a0, zero, 3 | a0 = 3;
0x0040acb4 move a1, s1 | a1 = s1;
0x0040acb8 jalr t9 | t9 ();
0x0040acbc lw s0, 0x18(s0) | s0 = *((s0 + 6));
0x0040acc0 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040acc4 bnez s0, 0x40ac8c |
| } while (s0 != 0);
0x0040acc8 j 0x40b018 | goto label_3;
0x0040accc move v0, zero | v0 = 0;
| label_1:
0x0040acd0 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040acd4 addiu s4, sp, 0x28 | s4 = sp + 0x28;
0x0040acd8 move a0, s4 | a0 = s4;
0x0040acdc move a1, zero | a1 = 0;
0x0040ace0 addiu a2, zero, 0x21 | a2 = 0x21;
0x0040ace4 jalr t9 | t9 ();
0x0040ace8 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040acec addiu a1, s5, 0x60 | a1 = s5 + 0x60;
0x0040acf0 lw t9, -0x7f24(gp) | t9 = sym.str2hex;
0x0040acf4 addiu a2, zero, 0x10 | a2 = 0x10;
0x0040acf8 move a0, s4 | a0 = s4;
0x0040acfc jalr t9 | t9 ();
0x0040ad00 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ad04 lw t9, -0x7d40(gp) | t9 = sym.imp.json_tokener_parse;
0x0040ad08 lw a0, 0x3a8(s0) | a0 = *((s0 + 234));
0x0040ad0c jalr t9 | t9 ();
0x0040ad10 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ad14 move a0, s3 | a0 = s3;
0x0040ad18 lw t9, -0x7d88(gp) | t9 = sym.imp.json_object_new_int;
0x0040ad1c move s1, v0 | s1 = v0;
0x0040ad20 jalr t9 | t9 ();
0x0040ad24 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ad28 lui a1, 0x41 | a1 = 0x410000;
0x0040ad2c lw t9, -0x7e1c(gp) | t9 = sym.imp.json_object_object_add;
| /* esilref: 'id' */
0x0040ad30 addiu a1, a1, 0x527c | a1 += 0x527c;
0x0040ad34 move a2, v0 | a2 = v0;
0x0040ad38 move a0, s1 | a0 = s1;
0x0040ad3c jalr t9 | t9 ();
0x0040ad40 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ad44 lui a0, 0x41 | a0 = 0x410000;
0x0040ad48 lw t9, -0x7dd8(gp) | t9 = sym.imp.json_object_new_string;
| /* str._otc.info */
0x0040ad4c addiu a0, a0, 0x7eac | a0 += 0x7eac;
0x0040ad50 jalr t9 | t9 ();
0x0040ad54 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ad58 lui a1, 0x41 | a1 = 0x410000;
0x0040ad5c lw t9, -0x7e1c(gp) | t9 = sym.imp.json_object_object_add;
0x0040ad60 move a2, v0 | a2 = v0;
0x0040ad64 move a0, s1 | a0 = s1;
| /* str.method */
0x0040ad68 addiu a1, a1, 0x55d4 | a1 += 0x55d4;
0x0040ad6c jalr t9 | t9 ();
0x0040ad70 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ad74 lui a1, 0x41 | a1 = 0x410000;
0x0040ad78 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040ad7c move a0, s1 | a0 = s1;
| /* str.params */
0x0040ad80 addiu a1, a1, 0x56c4 | a1 += 0x56c4;
0x0040ad84 addiu a2, sp, 0x6c | a2 = sp + 0x6c;
0x0040ad88 jalr t9 | t9 ();
0x0040ad8c lw s6, 0x6c(sp) | s6 = *(var_6ch);
0x0040ad90 lw gp, 0x20(sp) | gp = *(var_20h);
| if (s6 == 0) {
0x0040ad94 bnez s6, 0x40add0 |
0x0040ad98 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040ad9c move a0, s1 | a0 = s1;
0x0040ada0 jalr t9 | t9 ();
0x0040ada4 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ada8 lui a1, 0x41 | a1 = 0x410000;
0x0040adac lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040adb0 lw a2, 0x3a8(s0) | a2 = *((s0 + 234));
0x0040adb4 move a0, zero | a0 = 0;
| /* str.into_str_does_not_have__params_:__s_n */
0x0040adb8 addiu a1, a1, 0x7eb8 | a1 += 0x7eb8;
0x0040adbc jalr t9 | t9 ();
0x0040adc0 addiu v0, zero, 1 | v0 = 1;
0x0040adc4 sb v0, 0x20a(s0) | *((s0 + 522)) = v0;
0x0040adc8 j 0x40b018 | goto label_3;
0x0040adcc addiu v0, zero, -1 | v0 = -1;
| }
0x0040add0 lw t9, -0x7dd8(gp) | t9 = sym.imp.json_object_new_string;
0x0040add4 addiu a0, s5, 0x80 | a0 = s5 + 0x80;
0x0040add8 jalr t9 | t9 ();
0x0040addc lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ade0 lui a1, 0x41 | a1 = 0x410000;
0x0040ade4 lw t9, -0x7e1c(gp) | t9 = sym.imp.json_object_object_add;
| /* str.model */
0x0040ade8 addiu a1, a1, 0x65c8 | a1 += 0x65c8;
0x0040adec move a2, v0 | a2 = v0;
0x0040adf0 move a0, s6 | a0 = s6;
0x0040adf4 jalr t9 | t9 ();
0x0040adf8 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040adfc addiu a0, s5, 0x98 | a0 = s5 + 0x98;
0x0040ae00 lw t9, -0x7dd8(gp) | t9 = sym.imp.json_object_new_string;
0x0040ae04 lw s0, 0x6c(sp) | s0 = *(var_6ch);
0x0040ae08 jalr t9 | t9 ();
0x0040ae0c lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ae10 lui a1, 0x41 | a1 = 0x410000;
0x0040ae14 lw t9, -0x7e1c(gp) | t9 = sym.imp.json_object_object_add;
0x0040ae18 move a0, s0 | a0 = s0;
| /* esilref: 'mac' */
0x0040ae1c addiu a1, a1, 0x62f4 | a1 += 0x62f4;
0x0040ae20 move a2, v0 | a2 = v0;
0x0040ae24 jalr t9 | t9 ();
0x0040ae28 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ae2c move a0, s4 | a0 = s4;
0x0040ae30 lw t9, -0x7dd8(gp) | t9 = sym.imp.json_object_new_string;
0x0040ae34 lw s0, 0x6c(sp) | s0 = *(var_6ch);
0x0040ae38 jalr t9 | t9 ();
0x0040ae3c lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ae40 lui a1, 0x41 | a1 = 0x410000;
0x0040ae44 lw t9, -0x7e1c(gp) | t9 = sym.imp.json_object_object_add;
0x0040ae48 move a0, s0 | a0 = s0;
| /* esilref: 'token' */
0x0040ae4c addiu a1, a1, 0x6668 | a1 += 0x6668;
0x0040ae50 move a2, v0 | a2 = v0;
0x0040ae54 jalr t9 | t9 ();
0x0040ae58 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ae5c lw t9, -0x7f20(gp) | t9 = sym.get_uptime;
0x0040ae60 lw s0, 0x6c(sp) | s0 = *(var_6ch);
0x0040ae64 jalr t9 | t9 ();
0x0040ae68 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ae6c lw t9, -0x7d88(gp) | t9 = sym.imp.json_object_new_int;
0x0040ae70 move a0, v0 | a0 = v0;
0x0040ae74 jalr t9 | t9 ();
0x0040ae78 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040ae7c lui a1, 0x41 | a1 = 0x410000;
0x0040ae80 lw t9, -0x7e1c(gp) | t9 = sym.imp.json_object_object_add;
0x0040ae84 move a2, v0 | a2 = v0;
0x0040ae88 move a0, s0 | a0 = s0;
| /* str.life */
0x0040ae8c addiu a1, a1, 0x7ee0 | a1 += 0x7ee0;
0x0040ae90 jalr t9 | t9 ();
0x0040ae94 lw s5, 0x2e8(s2) | s5 = *((s2 + 186));
0x0040ae98 lw s4, 0x2ec(s2) | s4 = *((s2 + 187));
0x0040ae9c or v0, s5, s4 | v0 = s5 | s4;
0x0040aea0 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x0040aea4 beqz v0, 0x40af14 |
0x0040aea8 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040aeac addiu s0, sp, 0x4c | s0 = sp + 0x4c;
0x0040aeb0 move a0, s0 | a0 = s0;
0x0040aeb4 move a1, zero | a1 = 0;
0x0040aeb8 addiu a2, zero, 0x20 | a2 = 0x20;
0x0040aebc jalr t9 | t9 ();
0x0040aec0 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040aec4 lui a1, 0x42 | a1 = 0x420000;
0x0040aec8 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040aecc move a3, s4 | a3 = s4;
| /* esilref: '&llu' */
0x0040aed0 addiu a1, a1, -0x7f94 | a1 += -0x7f94;
0x0040aed4 move a2, s5 | a2 = s5;
0x0040aed8 move a0, s0 | a0 = s0;
0x0040aedc jalr t9 | t9 ();
0x0040aee0 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040aee4 move a0, s0 | a0 = s0;
0x0040aee8 lw t9, -0x7dd8(gp) | t9 = sym.imp.json_object_new_string;
0x0040aeec lw s4, 0x6c(sp) | s4 = *(var_6ch);
0x0040aef0 jalr t9 | t9 ();
0x0040aef4 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040aef8 lui a1, 0x41 | a1 = 0x410000;
0x0040aefc lw t9, -0x7e1c(gp) | t9 = sym.imp.json_object_object_add;
0x0040af00 move a0, s4 | a0 = s4;
| /* esilref: 'uid' */
0x0040af04 addiu a1, a1, 0x7ee8 | a1 += 0x7ee8;
0x0040af08 move a2, v0 | a2 = v0;
0x0040af0c jalr t9 | t9 ();
0x0040af10 lw gp, 0x20(sp) | gp = *(var_20h);
| }
0x0040af14 lw t9, -0x7d08(gp) | t9 = sym.imp.json_object_to_json_string_ext;
0x0040af18 move a0, s1 | a0 = s1;
0x0040af1c move a1, zero | a1 = 0;
0x0040af20 jalr t9 | t9 ();
0x0040af24 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040af28 move a0, v0 | a0 = v0;
0x0040af2c lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040af30 move s0, v0 | s0 = v0;
0x0040af34 jalr t9 | t9 ();
0x0040af38 sltiu v0, v0, 0x400 | v0 = (v0 < 0x400) ? 1 : 0;
0x0040af3c lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x0040af40 bnez v0, 0x40af6c |
0x0040af44 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040af48 lui a1, 0x41 | a1 = 0x410000;
0x0040af4c lui a2, 0x41 | a2 = 0x410000;
0x0040af50 move a0, zero | a0 = 0;
| /* str.json_string_too_long.__s__line__d_n */
0x0040af54 addiu a1, a1, 0x7eec | a1 += 0x7eec;
| /* str.miio_misc.c */
0x0040af58 addiu a2, a2, 0x7f10 | a2 += 0x7f10;
0x0040af5c addiu a3, zero, 0x3e7 | a3 = 0x3e7;
0x0040af60 jalr t9 | t9 ();
0x0040af64 j 0x40af9c | goto label_4;
0x0040af68 lw gp, 0x20(sp) | gp = *(var_20h);
| }
0x0040af6c lw t9, -0x7d14(gp) | t9 = sym.imp.malloc;
0x0040af70 addiu a0, zero, 0x10 | a0 = 0x10;
0x0040af74 jalr t9 | t9 ();
0x0040af78 move a1, v0 | a1 = v0;
0x0040af7c lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x0040af80 bnez v0, 0x40afa4 |
0x0040af84 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040af88 lui a1, 0x41 | a1 = 0x410000;
0x0040af8c move a0, zero | a0 = 0;
| /* esilref: 'malloc fail
' */
0x0040af90 addiu a1, a1, 0x544c | a1 += 0x544c;
0x0040af94 jalr t9 | t9 ();
0x0040af98 lw gp, 0x20(sp) | gp = *(var_20h);
| label_4:
0x0040af9c j 0x40b008 | goto label_5;
0x0040afa0 addiu s0, zero, -1 | s0 = -1;
| }
0x0040afa4 sw s3, (v0) | *(v0) = s3;
0x0040afa8 lui v0, 0x41 | v0 = 0x40b628;
0x0040afac addiu v0, v0, -0x49d8 |
0x0040afb0 lw t9, -0x7f70(gp) | t9 = sym.callback_queue_add;
0x0040afb4 lw a0, -0x7f1c(gp) | a0 = *(gp);
0x0040afb8 sw v0, 4(a1) | *((a1 + 1)) = v0;
0x0040afbc sw zero, 8(a1) | *((a1 + 2)) = 0;
0x0040afc0 jalr t9 | t9 ();
0x0040afc4 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040afc8 lui a1, 0x41 | a1 = 0x410000;
0x0040afcc lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040afd0 move a2, s0 | a2 = s0;
0x0040afd4 addiu a0, zero, 3 | a0 = 3;
| /* str.report_to_cloud__otc.info:__s_n */
0x0040afd8 addiu a1, a1, 0x7f1c | a1 += 0x7f1c;
0x0040afdc jalr t9 | t9 ();
0x0040afe0 lw gp, 0x20(sp) | gp = *(var_20h);
0x0040afe4 move a0, s0 | a0 = s0;
0x0040afe8 lw t9, -0x7f18(gp) | t9 = sym.report_to_cloud;
0x0040afec move a1, s3 | a1 = s3;
0x0040aff0 addiu a2, zero, 1 | a2 = 1;
0x0040aff4 jalr t9 | t9 ();
0x0040aff8 move s0, zero | s0 = 0;
0x0040affc lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x0040b000 bnez v0, 0x40b008 |
0x0040b004 sw s3, 0x1ec(s2) | *((s2 + 123)) = s3;
| }
| label_5:
0x0040b008 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040b00c move a0, s1 | a0 = s1;
0x0040b010 jalr t9 | t9 ();
0x0040b014 move v0, s0 | v0 = s0;
| label_3:
0x0040b018 lw ra, 0x8c(sp) | ra = *(var_8ch);
0x0040b01c lw s6, 0x88(sp) | s6 = *(var_88h);
0x0040b020 lw s5, 0x84(sp) | s5 = *(var_84h);
0x0040b024 lw s4, 0x80(sp) | s4 = *(var_80h);
0x0040b028 lw s3, 0x7c(sp) | s3 = *(var_7ch);
0x0040b02c lw s2, 0x78(sp) | s2 = *(var_78h);
0x0040b030 lw s1, 0x74(sp) | s1 = *(var_74h);
0x0040b034 lw s0, 0x70(sp) | s0 = *(var_70h);
0x0040b038 addiu sp, sp, 0x90 |
0x0040b03c jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40b040 */
| #include <stdint.h>
|
; (fcn) fcn.0040b040 () | void fcn_0040b040 () {
0x0040b040 lui gp, 0x43 |
0x0040b044 addiu gp, gp, 0x1620 |
0x0040b048 addiu sp, sp, -0x450 |
0x0040b04c lw t9, -0x7f74(gp) | t9 = sym.generate_random_id;
0x0040b050 sw ra, 0x44c(sp) | *(var_44ch) = ra;
0x0040b054 sw s1, 0x448(sp) | *(var_448h) = s1;
0x0040b058 sw s0, 0x444(sp) | *(var_444h) = s0;
0x0040b05c sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040b060 addiu s1, sp, 0x418 | s1 = sp + 0x418;
0x0040b064 jalr t9 | t9 ();
0x0040b068 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040b06c lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040b070 move a0, s1 | a0 = s1;
0x0040b074 move a1, zero | a1 = 0;
0x0040b078 addiu a2, zero, 0x21 | a2 = 0x21;
0x0040b07c move s0, v0 | s0 = v0;
0x0040b080 jalr t9 | t9 ();
0x0040b084 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040b088 move a0, s1 | a0 = s1;
0x0040b08c lw a1, -0x7f28(gp) | a1 = *(gp);
0x0040b090 lw t9, -0x7f24(gp) | t9 = sym.str2hex;
0x0040b094 addiu a1, a1, 0x340 | a1 += 0x340;
0x0040b098 addiu a2, zero, 0x10 | a2 = 0x10;
0x0040b09c jalr t9 | t9 ();
0x0040b0a0 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040b0a4 addiu s1, sp, 0x18 | s1 = sp + 0x18;
0x0040b0a8 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040b0ac move a0, s1 | a0 = s1;
0x0040b0b0 move a1, zero | a1 = 0;
0x0040b0b4 addiu a2, zero, 0x400 | a2 = 0x400;
0x0040b0b8 jalr t9 | t9 ();
0x0040b0bc lw gp, 0x10(sp) | gp = *(var_10h);
0x0040b0c0 lui a1, 0x41 | a1 = 0x410000;
0x0040b0c4 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040b0c8 move a0, s1 | a0 = s1;
| /* str._id_:_u__method_:_props___params_:_ota_state_:_idle_ */
0x0040b0cc addiu a1, a1, 0x7f3c | a1 += 0x7f3c;
0x0040b0d0 move a2, s0 | a2 = s0;
0x0040b0d4 jalr t9 | t9 ();
0x0040b0d8 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040b0dc lw t9, -0x7d14(gp) | t9 = sym.imp.malloc;
0x0040b0e0 addiu a0, zero, 0x10 | a0 = 0x10;
0x0040b0e4 jalr t9 | t9 ();
0x0040b0e8 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0040b0ec bnez v0, 0x40b10c |
0x0040b0f0 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040b0f4 lui a1, 0x41 | a1 = 0x410000;
0x0040b0f8 move a0, zero | a0 = 0;
| /* esilref: 'malloc fail
' */
0x0040b0fc addiu a1, a1, 0x544c | a1 += 0x544c;
0x0040b100 jalr t9 | t9 ();
0x0040b104 j 0x40b168 | goto label_0;
0x0040b108 addiu v0, zero, -1 | v0 = -1;
| }
0x0040b10c lui v1, 0x41 | v1 = 0x40b2e4;
0x0040b110 addiu v1, v1, -0x4d1c |
0x0040b114 lw t9, -0x7f70(gp) | t9 = sym.callback_queue_add;
0x0040b118 lw a0, -0x7f1c(gp) | a0 = *(gp);
0x0040b11c move a1, v0 | a1 = v0;
0x0040b120 sw s0, (v0) | *(v0) = s0;
0x0040b124 sw v1, 4(v0) | *((v0 + 1)) = v1;
0x0040b128 sw zero, 8(v0) | *((v0 + 2)) = 0;
0x0040b12c jalr t9 | t9 ();
0x0040b130 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040b134 lui a1, 0x41 | a1 = 0x410000;
0x0040b138 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040b13c lui a2, 0x42 | a2 = 0x420000;
0x0040b140 addiu a0, zero, 2 | a0 = 2;
| /* esilref: '&s
' */
0x0040b144 addiu a1, a1, 0x6510 | a1 += 0x6510;
| /* str.report_ota_state_idle */
0x0040b148 addiu a2, a2, -0x77b4 | a2 += -0x77b4;
0x0040b14c jalr t9 | t9 ();
0x0040b150 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040b154 move a0, s1 | a0 = s1;
0x0040b158 lw t9, -0x7f18(gp) | t9 = sym.report_to_cloud;
0x0040b15c move a1, s0 | a1 = s0;
0x0040b160 addiu a2, zero, 1 | a2 = 1;
0x0040b164 jalr t9 | t9 ();
| label_0:
0x0040b168 lw ra, 0x44c(sp) | ra = *(var_44ch);
0x0040b16c lw s1, 0x448(sp) | s1 = *(var_448h);
0x0040b170 lw s0, 0x444(sp) | s0 = *(var_444h);
0x0040b174 addiu sp, sp, 0x450 |
0x0040b178 jr ra | return v1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40b17c */
| #include <stdint.h>
|
; (fcn) fcn.0040b17c () | void fcn_0040b17c () {
0x0040b17c lui gp, 0x43 |
0x0040b180 addiu gp, gp, 0x1620 |
0x0040b184 addiu sp, sp, -0x450 |
0x0040b188 lw t9, -0x7f74(gp) | t9 = sym.generate_random_id;
0x0040b18c sw s2, 0x448(sp) | *(var_448h) = s2;
0x0040b190 sw s1, 0x444(sp) | *(var_444h) = s1;
0x0040b194 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040b198 sw ra, 0x44c(sp) | *(var_44ch) = ra;
0x0040b19c sw s0, 0x440(sp) | *(var_440h) = s0;
0x0040b1a0 jalr t9 | t9 ();
0x0040b1a4 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040b1a8 move s1, v0 | s1 = v0;
0x0040b1ac lw s2, -0x7f28(gp) | s2 = *(gp);
0x0040b1b0 lw v0, 0x39c(s2) | v0 = *((s2 + 231));
0x0040b1b4 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
| if (v0 == 0) {
0x0040b1b8 bnez v0, 0x40b1cc |
0x0040b1bc lui a1, 0x41 | a1 = 0x410000;
0x0040b1c0 addiu a0, zero, 3 | a0 = 3;
0x0040b1c4 j 0x40b258 | goto label_0;
| /* str.no_bind_key_to_report_n */
0x0040b1c8 addiu a1, a1, 0x7f78 | a1 += 0x7f78;
| }
0x0040b1cc addiu s0, sp, 0x418 | s0 = sp + 0x418;
0x0040b1d0 move a0, s0 | a0 = s0;
0x0040b1d4 move a1, zero | a1 = 0;
0x0040b1d8 addiu a2, zero, 0x21 | a2 = 0x21;
0x0040b1dc jalr t9 | t9 ();
0x0040b1e0 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040b1e4 move a0, s0 | a0 = s0;
0x0040b1e8 lw t9, -0x7f24(gp) | t9 = sym.str2hex;
0x0040b1ec addiu a1, s2, 0x340 | a1 = s2 + 0x340;
0x0040b1f0 addiu a2, zero, 0x10 | a2 = 0x10;
0x0040b1f4 jalr t9 | t9 ();
0x0040b1f8 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040b1fc addiu s0, sp, 0x18 | s0 = sp + 0x18;
0x0040b200 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040b204 move a0, s0 | a0 = s0;
0x0040b208 move a1, zero | a1 = 0;
0x0040b20c addiu a2, zero, 0x400 | a2 = 0x400;
0x0040b210 jalr t9 | t9 ();
0x0040b214 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040b218 lw a3, 0x39c(s2) | a3 = *((s2 + 231));
0x0040b21c lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040b220 lui a1, 0x41 | a1 = 0x410000;
0x0040b224 move a0, s0 | a0 = s0;
| /* str._id_:_u__method_:_props___params_:_bind_key_:__s_ */
0x0040b228 addiu a1, a1, 0x7f90 | a1 += 0x7f90;
0x0040b22c move a2, s1 | a2 = s1;
0x0040b230 jalr t9 | t9 ();
0x0040b234 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040b238 lw t9, -0x7d14(gp) | t9 = sym.imp.malloc;
0x0040b23c addiu a0, zero, 0x10 | a0 = 0x10;
0x0040b240 jalr t9 | t9 ();
0x0040b244 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0040b248 bnez v0, 0x40b26c |
0x0040b24c lui a1, 0x41 | a1 = 0x410000;
0x0040b250 move a0, zero | a0 = 0;
| /* esilref: 'malloc fail
' */
0x0040b254 addiu a1, a1, 0x544c | a1 += 0x544c;
| label_0:
0x0040b258 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040b25c jalr t9 | t9 ();
0x0040b260 nop |
0x0040b264 j 0x40b2cc | goto label_1;
0x0040b268 addiu v0, zero, -1 | v0 = -1;
| }
0x0040b26c lui v1, 0x41 | v1 = 0x40b38c;
0x0040b270 addiu v1, v1, -0x4c74 |
0x0040b274 lw t9, -0x7f70(gp) | t9 = sym.callback_queue_add;
0x0040b278 lw a0, -0x7f1c(gp) | a0 = *(gp);
0x0040b27c move a1, v0 | a1 = v0;
0x0040b280 sw s1, (v0) | *(v0) = s1;
0x0040b284 sw v1, 4(v0) | *((v0 + 1)) = v1;
0x0040b288 sw zero, 8(v0) | *((v0 + 2)) = 0;
0x0040b28c jalr t9 | t9 ();
0x0040b290 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040b294 lui a1, 0x41 | a1 = 0x410000;
0x0040b298 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040b29c lui a2, 0x42 | a2 = 0x420000;
0x0040b2a0 addiu a0, zero, 2 | a0 = 2;
| /* str._s:__s_n */
0x0040b2a4 addiu a1, a1, 0x7fc8 | a1 += 0x7fc8;
| /* str.report_bind_key */
0x0040b2a8 addiu a2, a2, -0x77e4 | a2 += -0x77e4;
0x0040b2ac move a3, s0 | a3 = s0;
0x0040b2b0 jalr t9 | t9 ();
0x0040b2b4 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040b2b8 move a0, s0 | a0 = s0;
0x0040b2bc lw t9, -0x7f18(gp) | t9 = sym.report_to_cloud;
0x0040b2c0 move a1, s1 | a1 = s1;
0x0040b2c4 addiu a2, zero, 1 | a2 = 1;
0x0040b2c8 jalr t9 | t9 ();
| label_1:
0x0040b2cc lw ra, 0x44c(sp) | ra = *(var_44ch);
0x0040b2d0 lw s2, 0x448(sp) | s2 = *(var_448h);
0x0040b2d4 lw s1, 0x444(sp) | s1 = *(var_444h);
0x0040b2d8 lw s0, 0x440(sp) | s0 = *(var_440h);
0x0040b2dc addiu sp, sp, 0x450 |
0x0040b2e0 jr ra | return v1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40b440 */
| #include <stdint.h>
|
; (fcn) fcn.0040b440 () | void fcn_0040b440 () {
0x0040b440 lui gp, 0x43 |
0x0040b444 addiu gp, gp, 0x1620 |
0x0040b448 addiu sp, sp, -0x258 |
0x0040b44c lw t9, -0x7f10(gp) | t9 = sym.mdnsd_start;
0x0040b450 sw s2, 0x24c(sp) | *(var_24ch) = s2;
0x0040b454 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0040b458 sw ra, 0x254(sp) | *(var_254h) = ra;
0x0040b45c sw s3, 0x250(sp) | *(var_250h) = s3;
0x0040b460 sw s1, 0x248(sp) | *(var_248h) = s1;
0x0040b464 sw s0, 0x244(sp) | *(var_244h) = s0;
0x0040b468 jalr t9 | t9 ();
0x0040b46c move s2, v0 | s2 = v0;
0x0040b470 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040b474 bnez v0, 0x40b488 |
0x0040b478 lui a0, 0x42 | a0 = "mdnsd_start() error";
| /* str.mdnsd_start___error */
0x0040b47c addiu a0, a0, -0x7fcc |
0x0040b480 j 0x40b604 | goto label_0;
0x0040b484 lw t9, -0x7d10(gp) | t9 = sym.imp.perror;
| }
0x0040b488 lw s0, -0x7f28(gp) | s0 = *(gp);
0x0040b48c lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
0x0040b490 addiu s1, sp, 0x220 | s1 = sp + 0x220;
0x0040b494 move a0, s1 | a0 = s1;
0x0040b498 addiu a1, s0, 0x360 | a1 = s0 + 0x360;
0x0040b49c sw v0, 0x26c(s0) | *((s0 + 155)) = v0;
0x0040b4a0 addiu a2, zero, 0x18 | a2 = 0x18;
0x0040b4a4 jalr t9 | t9 ();
0x0040b4a8 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040b4ac move v1, s1 | v1 = s1;
0x0040b4b0 addiu a0, zero, 0x2e | a0 = 0x2e;
0x0040b4b4 addiu a1, zero, 0x2d | a1 = 0x2d;
| do {
0x0040b4b8 lb v0, (v1) | v0 = *(v1);
0x0040b4bc lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
| if (v0 == 0) {
0x0040b4c0 beqz v0, 0x40b4d4 | goto label_1;
| }
| if (v0 != a0) {
0x0040b4c4 beql v0, a0, 0x40b4cc |
0x0040b4c8 sb a1, (v1) | *(v1) = a1;
| }
0x0040b4cc j 0x40b4b8 |
| } while (1);
0x0040b4d0 addiu v1, v1, 1 | v1++;
| label_1:
0x0040b4d4 move a0, s1 | a0 = s1;
0x0040b4d8 jalr t9 | t9 ();
0x0040b4dc addiu v0, v0, 0x19 | v0 += 0x19;
0x0040b4e0 sltiu v1, v0, 0x200 | v1 = (v0 < 0x200) ? 1 : 0;
0x0040b4e4 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040b4e8 addiu s3, sp, 0x20 | s3 = sp + 0x20;
| if (v1 == 0) {
0x0040b4ec bnez v1, 0x40b518 |
0x0040b4f0 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040b4f4 lui a1, 0x42 | a1 = 0x420000;
0x0040b4f8 lui a2, 0x41 | a2 = 0x410000;
0x0040b4fc move a0, zero | a0 = 0;
| /* str.string_too_long.__s__line__d_n */
0x0040b500 addiu a1, a1, -0x7fb8 | a1 += -0x7fb8;
| /* str.miio_misc.c */
0x0040b504 addiu a2, a2, 0x7f10 | a2 += 0x7f10;
0x0040b508 addiu a3, zero, 0x29c | a3 = 0x29c;
0x0040b50c jalr t9 | t9 ();
0x0040b510 j 0x40b54c | goto label_2;
0x0040b514 lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x0040b518 lw v0, 0x2e0(s0) | v0 = *((s0 + 184));
0x0040b51c lw v1, 0x2e4(s0) | v1 = *((s0 + 185));
0x0040b520 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040b524 lui a1, 0x42 | a1 = 0x420000;
0x0040b528 lui a3, 0x42 | a3 = 0x420000;
0x0040b52c sw v0, 0x10(sp) | *(var_10h) = v0;
0x0040b530 sw v1, 0x14(sp) | *(var_14h) = v1;
0x0040b534 move a0, s3 | a0 = s3;
| /* str._s_s_llu */
0x0040b538 addiu a1, a1, -0x7f98 | a1 += -0x7f98;
0x0040b53c move a2, s1 | a2 = s1;
| /* str._miio */
0x0040b540 addiu a3, a3, -0x7f8c | a3 += -0x7f8c;
0x0040b544 jalr t9 | t9 ();
0x0040b548 lw gp, 0x18(sp) | gp = *(var_18h);
| label_2:
0x0040b54c lw t9, -0x7d70(gp) | t9 = sym.imp.inet_addr;
0x0040b550 addiu a0, s0, 0x38a | a0 = s0 + 0x38a;
0x0040b554 jalr t9 | t9 ();
0x0040b558 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040b55c move a2, v0 | a2 = v0;
0x0040b560 lw t9, -0x7f0c(gp) | t9 = sym.mdnsd_set_hostname;
0x0040b564 move a1, s3 | a1 = s3;
0x0040b568 move a0, s2 | a0 = s2;
0x0040b56c jalr t9 | t9 ();
0x0040b570 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040b574 lw t9, -0x7f08(gp) | t9 = sym.create_nlabel;
0x0040b578 move a0, s3 | a0 = s3;
0x0040b57c jalr t9 | t9 ();
0x0040b580 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040b584 addiu a0, s0, 0x38a | a0 = s0 + 0x38a;
0x0040b588 lw t9, -0x7d70(gp) | t9 = sym.imp.inet_addr;
0x0040b58c move s1, v0 | s1 = v0;
0x0040b590 jalr t9 | t9 ();
0x0040b594 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040b598 move a0, s1 | a0 = s1;
0x0040b59c lw t9, -0x7f04(gp) | t9 = sym.rr_create_a;
0x0040b5a0 move a1, v0 | a1 = v0;
0x0040b5a4 jalr t9 | t9 ();
0x0040b5a8 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040b5ac move a1, v0 | a1 = v0;
0x0040b5b0 lw t9, -0x7f00(gp) | t9 = sym.mdnsd_add_rr;
0x0040b5b4 move a0, s2 | a0 = s2;
0x0040b5b8 jalr t9 | t9 ();
0x0040b5bc lw gp, 0x18(sp) | gp = *(var_18h);
0x0040b5c0 lui v1, 0x42 | v1 = "path=/mydevice";
| /* str.path_mydevice */
0x0040b5c4 addiu v1, v1, -0x7f84 |
0x0040b5c8 lw t9, -0x7efc(gp) | t9 = sym.mdnsd_register_svc;
0x0040b5cc addiu v0, sp, 0x238 | v0 = sp + 0x238;
0x0040b5d0 lui a2, 0x42 | a2 = 0x420000;
0x0040b5d4 move a0, s2 | a0 = s2;
0x0040b5d8 sw v1, 0x238(sp) | *(var_238h) = v1;
0x0040b5dc sw zero, 0x23c(sp) | *(var_23ch) = 0;
0x0040b5e0 sw zero, 0x10(sp) | *(var_10h) = 0;
0x0040b5e4 sw v0, 0x14(sp) | *(var_14h) = v0;
0x0040b5e8 move a1, s3 | a1 = s3;
| /* str._miio._udp.local */
0x0040b5ec addiu a2, a2, -0x7f74 | a2 += -0x7f74;
0x0040b5f0 ori a3, zero, 0xd431 | a3 = 0xd431;
0x0040b5f4 jalr t9 | t9 ();
0x0040b5f8 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040b5fc move a0, v0 | a0 = v0;
0x0040b600 lw t9, -0x7ef8(gp) | t9 = sym.mdns_service_destroy;
| label_0:
0x0040b604 jalr t9 | t9 ();
0x0040b608 nop |
0x0040b60c lw ra, 0x254(sp) | ra = *(var_254h);
0x0040b610 lw s3, 0x250(sp) | s3 = *(var_250h);
0x0040b614 lw s2, 0x24c(sp) | s2 = *(var_24ch);
0x0040b618 lw s1, 0x248(sp) | s1 = *(var_248h);
0x0040b61c lw s0, 0x244(sp) | s0 = *(var_244h);
0x0040b620 addiu sp, sp, 0x258 |
0x0040b624 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40bbbc */
| #include <stdint.h>
|
; (fcn) fcn.0040bbbc () | void fcn_0040bbbc () {
0x0040bbbc lui gp, 0x43 |
0x0040bbc0 addiu sp, sp, -0x1060 |
0x0040bbc4 addiu gp, gp, 0x1620 | gp += 0x1620;
0x0040bbc8 sw s1, 0x1040(sp) | *(var_1040h) = s1;
0x0040bbcc lw s1, -0x7f28(gp) | s1 = *(gp);
0x0040bbd0 sw s5, 0x1050(sp) | *(var_1050h) = s5;
0x0040bbd4 lw s5, 0x268(s1) | s5 = *((s1 + 154));
0x0040bbd8 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040bbdc sw a2, 0x1030(sp) | *(var_1030h) = a2;
0x0040bbe0 sw a3, 0x1034(sp) | *(var_1034h) = a3;
0x0040bbe4 sw ra, 0x105c(sp) | *(var_105ch) = ra;
0x0040bbe8 sw s7, 0x1058(sp) | *(var_1058h) = s7;
0x0040bbec sw s6, 0x1054(sp) | *(var_1054h) = s6;
0x0040bbf0 sw s4, 0x104c(sp) | *(var_104ch) = s4;
0x0040bbf4 sw s3, 0x1048(sp) | *(var_1048h) = s3;
0x0040bbf8 sw s2, 0x1044(sp) | *(var_1044h) = s2;
0x0040bbfc sw s0, 0x103c(sp) | *(var_103ch) = s0;
0x0040bc00 sw gp, 0x28(sp) | *(var_28h) = gp;
0x0040bc04 move s2, a0 | s2 = a0;
0x0040bc08 move a0, s5 | a0 = s5;
0x0040bc0c move s4, a1 | s4 = a1;
0x0040bc10 lw s3, 0x1070(sp) | s3 = *(arg_1070h);
0x0040bc14 jalr t9 | t9 ();
0x0040bc18 lw gp, 0x28(sp) | gp = *(var_28h);
0x0040bc1c move a0, s2 | a0 = s2;
0x0040bc20 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040bc24 move s0, v0 | s0 = v0;
0x0040bc28 jalr t9 | t9 ();
0x0040bc2c lw gp, 0x28(sp) | gp = *(var_28h);
0x0040bc30 move a0, s4 | a0 = s4;
0x0040bc34 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040bc38 move s7, v0 | s7 = v0;
0x0040bc3c jalr t9 | t9 ();
0x0040bc40 lw gp, 0x28(sp) | gp = *(var_28h);
0x0040bc44 addu s0, s0, s7 | s0 += s7;
0x0040bc48 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040bc4c move s6, v0 | s6 = v0;
0x0040bc50 move a0, s3 | a0 = s3;
0x0040bc54 addiu s0, s0, 0x96 | s0 += 0x96;
0x0040bc58 jalr t9 | t9 ();
0x0040bc5c addu s0, s0, s6 | s0 += s6;
0x0040bc60 addu v0, s0, v0 | v0 = s0 + v0;
0x0040bc64 sltiu s0, v0, 0xfff | s0 = (v0 < 0xfff) ? 1 : 0;
0x0040bc68 lw gp, 0x28(sp) | gp = *(var_28h);
0x0040bc6c lw a2, 0x1030(sp) | a2 = *(var_1030h);
0x0040bc70 lw a3, 0x1034(sp) | a3 = *(var_1034h);
| if (s0 == 0) {
0x0040bc74 bnez s0, 0x40bca0 |
0x0040bc78 lui a1, 0x41 | a1 = 0x410000;
0x0040bc7c lui a2, 0x42 | a2 = 0x420000;
0x0040bc80 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040bc84 addiu a0, zero, 3 | a0 = 3;
| /* str._s:_dir_too_long:__s_n */
0x0040bc88 addiu a1, a1, 0x5048 | a1 += 0x5048;
| /* str.cmd_internal_wifi_start */
0x0040bc8c addiu a2, a2, -0x7764 | a2 += -0x7764;
0x0040bc90 move a3, s5 | a3 = s5;
0x0040bc94 jalr t9 | t9 ();
0x0040bc98 j 0x40bd44 | goto label_0;
0x0040bc9c nop |
| }
0x0040bca0 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040bca4 addiu v0, s1, 0x21c | v0 = s1 + 0x21c;
0x0040bca8 addiu s0, sp, 0x30 | s0 = sp + 0x30;
0x0040bcac lui a1, 0x42 | a1 = 0x420000;
0x0040bcb0 sw a2, 0x18(sp) | *(var_18h) = a2;
0x0040bcb4 sw a3, 0x1c(sp) | *(var_1ch) = a3;
0x0040bcb8 sw s4, 0x10(sp) | *(var_10h) = s4;
0x0040bcbc move a3, s2 | a3 = s2;
0x0040bcc0 sw v0, 0x20(sp) | *(var_20h) = v0;
0x0040bcc4 sw s3, 0x24(sp) | *(var_24h) = s3;
0x0040bcc8 move a0, s0 | a0 = s0;
| /* str._method_:__internal.wifi_start___params_:_datadir_:__s___ssid_:__s___passwd_:__s___uid_:__llu___country_domain_:__s___tz_:__s_ */
0x0040bccc addiu a1, a1, -0x7dd4 | a1 += -0x7dd4;
0x0040bcd0 move a2, s5 | a2 = s5;
0x0040bcd4 jalr t9 | t9 ();
0x0040bcd8 lw s2, 0x2d4(s1) | s2 = *((s1 + 181));
0x0040bcdc addu v0, s0, v0 | v0 = s0 + v0;
0x0040bce0 lw gp, 0x28(sp) | gp = *(var_28h);
0x0040bce4 sb zero, (v0) | *(v0) = 0;
| if (s2 > 0) {
0x0040bce8 blez s2, 0x40bd30 |
0x0040bcec lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040bcf0 move a0, s0 | a0 = s0;
0x0040bcf4 jalr t9 | t9 ();
0x0040bcf8 lw gp, 0x28(sp) | gp = *(var_28h);
0x0040bcfc move a0, s2 | a0 = s2;
0x0040bd00 lw t9, -0x7fc4(gp) | t9 = sym.general_send_one;
0x0040bd04 move a1, s0 | a1 = s0;
0x0040bd08 move a2, v0 | a2 = v0;
0x0040bd0c jalr t9 | t9 ();
0x0040bd10 lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 >= 0) {
0x0040bd14 bgez v0, 0x40bd44 | goto label_0;
| }
0x0040bd18 lw t9, -0x7fc0(gp) | t9 = sym.ot_agent_fd_close;
0x0040bd1c lw a1, 0x2d4(s1) | a1 = *((s1 + 181));
0x0040bd20 move a0, s1 | a0 = s1;
0x0040bd24 jalr t9 | t9 ();
0x0040bd28 j 0x40bd44 | goto label_0;
0x0040bd2c sw zero, 0x2d4(s1) | *((s1 + 181)) = 0;
| }
0x0040bd30 lui a1, 0x41 | a1 = 0x410000;
0x0040bd34 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040bd38 addiu a0, zero, 1 | a0 = 1;
| /* str.No_helper_script__n */
0x0040bd3c addiu a1, a1, 0x50b4 | a1 += 0x50b4;
0x0040bd40 jalr t9 | t9 ();
| label_0:
0x0040bd44 lw ra, 0x105c(sp) | ra = *(var_105ch);
0x0040bd48 lw s7, 0x1058(sp) | s7 = *(var_1058h);
0x0040bd4c lw s6, 0x1054(sp) | s6 = *(var_1054h);
0x0040bd50 lw s5, 0x1050(sp) | s5 = *(var_1050h);
0x0040bd54 lw s4, 0x104c(sp) | s4 = *(var_104ch);
0x0040bd58 lw s3, 0x1048(sp) | s3 = *(var_1048h);
0x0040bd5c lw s2, 0x1044(sp) | s2 = *(var_1044h);
0x0040bd60 lw s1, 0x1040(sp) | s1 = *(var_1040h);
0x0040bd64 lw s0, 0x103c(sp) | s0 = *(var_103ch);
0x0040bd68 addiu sp, sp, 0x1060 |
0x0040bd6c jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40bd70 */
| #include <stdint.h>
|
; (fcn) sym.method_miio_config_router () | void method_miio_config_router () {
0x0040bd70 lui gp, 0x43 |
0x0040bd74 addiu gp, gp, 0x1620 |
0x0040bd78 addiu sp, sp, -0x140 |
0x0040bd7c lw t9, -0x7d40(gp) | t9 = sym.imp.json_tokener_parse;
0x0040bd80 sw ra, 0x13c(sp) | *(var_13ch) = ra;
0x0040bd84 sw s7, 0x134(sp) | *(var_134h) = s7;
0x0040bd88 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0040bd8c sw a0, 0x140(sp) | *(arg_140h) = a0;
0x0040bd90 sw a1, 0x144(sp) | *(arg_144h) = a1;
0x0040bd94 sw a2, 0x148(sp) | *(arg_148h) = a2;
0x0040bd98 sw fp, 0x138(sp) | *(var_138h) = fp;
0x0040bd9c sw s6, 0x130(sp) | *(var_130h) = s6;
0x0040bda0 sw s5, 0x12c(sp) | *(var_12ch) = s5;
0x0040bda4 sw s4, 0x128(sp) | *(var_128h) = s4;
0x0040bda8 sw s3, 0x124(sp) | *(var_124h) = s3;
0x0040bdac sw s2, 0x120(sp) | *(var_120h) = s2;
0x0040bdb0 sw s1, 0x11c(sp) | *(var_11ch) = s1;
0x0040bdb4 sw s0, 0x118(sp) | *(var_118h) = s0;
0x0040bdb8 jalr t9 | t9 ();
0x0040bdbc lw gp, 0x18(sp) | gp = *(var_18h);
0x0040bdc0 lui a1, 0x41 | a1 = 0x410000;
0x0040bdc4 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040bdc8 move a0, v0 | a0 = v0;
| /* str.params */
0x0040bdcc addiu a1, a1, 0x56c4 | a1 += 0x56c4;
0x0040bdd0 addiu a2, sp, 0x104 | a2 = sp + 0x104;
0x0040bdd4 move s7, v0 | s7 = v0;
0x0040bdd8 jalr t9 | t9 ();
0x0040bddc lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040bde0 bnez v0, 0x40bdf8 |
0x0040bde4 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040bde8 move a0, s7 | a0 = s7;
0x0040bdec jalr t9 | t9 ();
0x0040bdf0 j 0x40c560 | goto label_0;
0x0040bdf4 addiu v0, zero, -1 | v0 = -1;
| }
0x0040bdf8 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040bdfc addiu s5, sp, 0xa0 | s5 = sp + 0xa0;
0x0040be00 move a0, s5 | a0 = s5;
0x0040be04 move a1, zero | a1 = 0;
0x0040be08 addiu a2, zero, 0x40 | a2 = 0x40;
0x0040be0c jalr t9 | t9 ();
0x0040be10 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040be14 addiu v0, sp, 0x60 | v0 = sp + 0x60;
0x0040be18 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040be1c move a0, v0 | a0 = v0;
0x0040be20 move a1, zero | a1 = 0;
0x0040be24 addiu a2, zero, 0x40 | a2 = 0x40;
0x0040be28 sw v0, 0x10c(sp) | *(var_10ch) = v0;
0x0040be2c jalr t9 | t9 ();
0x0040be30 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040be34 addiu v1, sp, 0x20 | v1 = sp + 0x20;
0x0040be38 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040be3c move a0, v1 | a0 = v1;
0x0040be40 sw v1, 0x108(sp) | *(var_108h) = v1;
0x0040be44 move a1, zero | a1 = 0;
0x0040be48 addiu a2, zero, 0x40 | a2 = 0x40;
0x0040be4c jalr t9 | t9 ();
0x0040be50 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040be54 lw a0, 0x104(sp) | a0 = *(var_104h);
0x0040be58 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040be5c addiu s4, sp, 0x100 | s4 = sp + 0x100;
0x0040be60 lui a1, 0x42 | a1 = "ssid";
| /* str.ssid */
0x0040be64 addiu a1, a1, -0x7d50 |
0x0040be68 move a2, s4 | a2 = s4;
0x0040be6c jalr t9 | t9 ();
0x0040be70 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040be74 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040be78 lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040be7c addiu a1, zero, 6 | a1 = 6;
0x0040be80 jalr t9 | t9 ();
0x0040be84 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040be88 bnez v0, 0x40be9c |
0x0040be8c lui a1, 0x42 | a1 = 0x420000;
0x0040be90 move a0, zero | a0 = 0;
0x0040be94 j 0x40bfe8 | goto label_1;
| /* str.ssid_is_not_a_string_n */
0x0040be98 addiu a1, a1, -0x7d48 | a1 += -0x7d48;
| }
0x0040be9c lw t9, -0x7dfc(gp) | t9 = sym.imp.json_object_get_string;
0x0040bea0 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040bea4 jalr t9 | t9 ();
0x0040bea8 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040beac move a0, v0 | a0 = v0;
0x0040beb0 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040beb4 move s0, v0 | s0 = v0;
0x0040beb8 jalr t9 | t9 ();
0x0040bebc sltiu v1, v0, 0x40 | v1 = (v0 < 0x40) ? 1 : 0;
0x0040bec0 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040bec4 move a2, v0 | a2 = v0;
| if (v1 == 0) {
0x0040bec8 bnez v1, 0x40bee8 |
0x0040becc lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040bed0 lui a1, 0x42 | a1 = 0x420000;
0x0040bed4 addiu a0, zero, 1 | a0 = 1;
| /* str.ssid_too_long._n */
0x0040bed8 addiu a1, a1, -0x7d30 | a1 += -0x7d30;
0x0040bedc jalr t9 | t9 ();
0x0040bee0 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040bee4 addiu a2, zero, 0x3f | a2 = 0x3f;
| }
0x0040bee8 lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
0x0040beec move a0, s5 | a0 = s5;
0x0040bef0 move a1, s0 | a1 = s0;
0x0040bef4 jalr t9 | t9 ();
0x0040bef8 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040befc lui a1, 0x42 | a1 = 0x420000;
0x0040bf00 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040bf04 addiu a0, zero, 3 | a0 = 3;
| /* str.ssid_s_n */
0x0040bf08 addiu a1, a1, -0x7d20 | a1 += -0x7d20;
0x0040bf0c move a2, s5 | a2 = s5;
0x0040bf10 jalr t9 | t9 ();
0x0040bf14 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040bf18 lw a0, 0x104(sp) | a0 = *(var_104h);
0x0040bf1c lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040bf20 lui a1, 0x41 | a1 = 0x417ee8;
| /* esilref: 'uid' */
0x0040bf24 addiu a1, a1, 0x7ee8 |
0x0040bf28 move a2, s4 | a2 = s4;
0x0040bf2c jalr t9 | t9 ();
0x0040bf30 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0040bf34 beqz v0, 0x40bf90 |
0x0040bf38 lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040bf3c lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040bf40 addiu a1, zero, 3 | a1 = 3;
0x0040bf44 jalr t9 | t9 ();
0x0040bf48 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040bf4c beqz v0, 0x40bf90 | goto label_2;
| }
0x0040bf50 lw t9, -0x7d34(gp) | t9 = sym.imp.json_object_get_int64;
0x0040bf54 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040bf58 jalr t9 | t9 ();
0x0040bf5c lw gp, 0x18(sp) | gp = *(var_18h);
0x0040bf60 lui a1, 0x42 | a1 = 0x420000;
0x0040bf64 lw a0, -0x7f28(gp) | a0 = *(gp);
0x0040bf68 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040bf6c sw v0, 0x2e8(a0) | *((a0 + 186)) = v0;
0x0040bf70 sw v1, 0x2ec(a0) | *((a0 + 187)) = v1;
| /* str.uid_llu_n */
0x0040bf74 addiu a1, a1, -0x7d14 | a1 += -0x7d14;
0x0040bf78 addiu a0, zero, 3 | a0 = 3;
0x0040bf7c move a2, v0 | a2 = v0;
0x0040bf80 move a3, v1 | a3 = v1;
0x0040bf84 jalr t9 | t9 ();
0x0040bf88 j 0x40bfa8 | goto label_3;
0x0040bf8c lw gp, 0x18(sp) | gp = *(var_18h);
| }
| label_2:
0x0040bf90 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040bf94 lui a1, 0x42 | a1 = 0x420000;
0x0040bf98 addiu a0, zero, 1 | a0 = 1;
| /* str.uid_not_found__or_uid_not_int._n */
0x0040bf9c addiu a1, a1, -0x7d08 | a1 += -0x7d08;
0x0040bfa0 jalr t9 | t9 ();
0x0040bfa4 lw gp, 0x18(sp) | gp = *(var_18h);
| label_3:
0x0040bfa8 lw a0, 0x104(sp) | a0 = *(var_104h);
0x0040bfac lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040bfb0 lui a1, 0x42 | a1 = "passwd";
| /* str.passwd */
0x0040bfb4 addiu a1, a1, -0x7ce8 |
0x0040bfb8 move a2, s4 | a2 = s4;
0x0040bfbc jalr t9 | t9 ();
0x0040bfc0 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040bfc4 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040bfc8 lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040bfcc addiu a1, zero, 6 | a1 = 6;
0x0040bfd0 jalr t9 | t9 ();
0x0040bfd4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0040bfd8 bnez v0, 0x40c000 | goto label_4;
| }
0x0040bfdc lui a1, 0x42 | a1 = 0x420000;
0x0040bfe0 addiu a0, zero, 3 | a0 = 3;
| /* str.passwd_is_not_a_string_n */
0x0040bfe4 addiu a1, a1, -0x7ce0 | a1 += -0x7ce0;
| label_1:
0x0040bfe8 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040bfec jalr t9 | t9 ();
0x0040bff0 nop |
0x0040bff4 lw gp, 0x18(sp) | gp = *(var_18h);
| do {
0x0040bff8 j 0x40c550 | goto label_5;
0x0040bffc addiu s0, zero, -1 | s0 = -1;
| label_4:
0x0040c000 lw t9, -0x7dfc(gp) | t9 = sym.imp.json_object_get_string;
0x0040c004 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040c008 jalr t9 | t9 ();
0x0040c00c lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c010 move a0, v0 | a0 = v0;
0x0040c014 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040c018 move s0, v0 | s0 = v0;
0x0040c01c jalr t9 | t9 ();
0x0040c020 sltiu v1, v0, 0x40 | v1 = (v0 < 0x40) ? 1 : 0;
0x0040c024 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c028 move a2, v0 | a2 = v0;
| if (v1 == 0) {
0x0040c02c bnez v1, 0x40c04c |
0x0040c030 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c034 lui a1, 0x42 | a1 = 0x420000;
0x0040c038 addiu a0, zero, 1 | a0 = 1;
| /* str.passwd_too_long._n */
0x0040c03c addiu a1, a1, -0x7cc8 | a1 += -0x7cc8;
0x0040c040 jalr t9 | t9 ();
0x0040c044 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c048 addiu a2, zero, 0x3f | a2 = 0x3f;
| }
0x0040c04c lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
0x0040c050 addiu a0, sp, 0x60 | a0 = sp + 0x60;
0x0040c054 move a1, s0 | a1 = s0;
0x0040c058 jalr t9 | t9 ();
0x0040c05c lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c060 lw a0, 0x104(sp) | a0 = *(var_104h);
0x0040c064 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040c068 lui a1, 0x42 | a1 = "bind_key";
| /* str.bind_key */
0x0040c06c addiu a1, a1, -0x7cb4 |
0x0040c070 move a2, s4 | a2 = s4;
0x0040c074 jalr t9 | t9 ();
0x0040c078 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c07c lw s2, -0x7f28(gp) | s2 = *(gp);
| if (v0 == 0) {
0x0040c080 beqz v0, 0x40c11c | goto label_6;
| }
0x0040c084 lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040c088 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040c08c addiu a1, zero, 6 | a1 = 6;
0x0040c090 jalr t9 | t9 ();
0x0040c094 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040c098 beqz v0, 0x40c11c | goto label_6;
| }
0x0040c09c lw t9, -0x7dfc(gp) | t9 = sym.imp.json_object_get_string;
0x0040c0a0 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040c0a4 jalr t9 | t9 ();
0x0040c0a8 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c0ac move a0, v0 | a0 = v0;
0x0040c0b0 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040c0b4 move s1, v0 | s1 = v0;
0x0040c0b8 jalr t9 | t9 ();
0x0040c0bc lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c0c0 addiu s3, v0, 1 | s3 = v0 + 1;
0x0040c0c4 lw t9, -0x7d14(gp) | t9 = sym.imp.malloc;
0x0040c0c8 move a0, s3 | a0 = s3;
0x0040c0cc move s0, v0 | s0 = v0;
0x0040c0d0 jalr t9 | t9 ();
0x0040c0d4 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c0d8 sw v0, 0x39c(s2) | *((s2 + 231)) = v0;
| if (v0 != 0) {
0x0040c0dc bnez v0, 0x40c100 | goto label_7;
| }
0x0040c0e0 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c0e4 lui a1, 0x42 | a1 = 0x420000;
0x0040c0e8 move a0, zero | a0 = 0;
| /* str.malloc_length__d__error:__m_n */
0x0040c0ec addiu a1, a1, -0x7ca8 | a1 += -0x7ca8;
0x0040c0f0 move a2, s3 | a2 = s3;
0x0040c0f4 jalr t9 | t9 ();
0x0040c0f8 j 0x40bff8 |
| } while (1);
0x0040c0fc lw gp, 0x18(sp) | gp = *(var_18h);
| label_7:
0x0040c100 lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
0x0040c104 move a0, v0 | a0 = v0;
0x0040c108 move a1, s1 | a1 = s1;
0x0040c10c move a2, s0 | a2 = s0;
0x0040c110 jalr t9 | t9 ();
0x0040c114 j 0x40c134 | goto label_8;
0x0040c118 lw gp, 0x18(sp) | gp = *(var_18h);
| label_6:
0x0040c11c lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c120 lui a1, 0x42 | a1 = 0x420000;
0x0040c124 addiu a0, zero, 3 | a0 = 3;
| /* str.bind_key_is_not_a_string_n */
0x0040c128 addiu a1, a1, -0x7c88 | a1 += -0x7c88;
0x0040c12c jalr t9 | t9 ();
0x0040c130 lw gp, 0x18(sp) | gp = *(var_18h);
| label_8:
0x0040c134 lw a0, 0x104(sp) | a0 = *(var_104h);
0x0040c138 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040c13c lui a1, 0x42 | a1 = "country_domain";
| /* str.country_domain */
0x0040c140 addiu a1, a1, -0x7c6c |
0x0040c144 move a2, s4 | a2 = s4;
0x0040c148 jalr t9 | t9 ();
0x0040c14c lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c150 move s6, v0 | s6 = v0;
0x0040c154 lw v0, -0x7f28(gp) | v0 = *(gp);
0x0040c158 addiu s1, s2, 0x224 | s1 = s2 + 0x224;
0x0040c15c lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040c160 sw zero, 0x21c(s2) | *((s2 + 135)) = 0;
0x0040c164 move a0, s1 | a0 = s1;
0x0040c168 move a1, zero | a1 = 0;
0x0040c16c addiu a2, zero, 0x20 | a2 = 0x20;
0x0040c170 sw zero, 0x220(v0) | *((v0 + 136)) = 0;
0x0040c174 jalr t9 | t9 ();
0x0040c178 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c17c addiu s0, s2, 0x244 | s0 = s2 + 0x244;
0x0040c180 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040c184 move a0, s0 | a0 = s0;
0x0040c188 move a1, zero | a1 = 0;
0x0040c18c addiu a2, zero, 0x20 | a2 = 0x20;
0x0040c190 jalr t9 | t9 ();
0x0040c194 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c198 lui a1, 0x41 | a1 = 0x410000;
0x0040c19c lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
0x0040c1a0 move a0, s1 | a0 = s1;
| /* str.ott.io.mi.com */
0x0040c1a4 addiu a1, a1, 0x67a4 | a1 += 0x67a4;
0x0040c1a8 addiu a2, zero, 0xd | a2 = 0xd;
0x0040c1ac jalr t9 | t9 ();
0x0040c1b0 lui v1, 0x41 | v1 = 0x410000;
0x0040c1b4 lw v0, 0x67b4(v1) | v0 = *((v1 + 6637));
| /* str.ot.io.mi.com */
0x0040c1b8 addiu v1, v1, 0x67b4 | v1 += 0x67b4;
0x0040c1bc lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c1c0 sw v0, 0x244(s2) | *((s2 + 145)) = v0;
0x0040c1c4 lw v0, 4(v1) | v0 = *((v1 + 1));
0x0040c1c8 addiu s3, sp, 0xe0 | s3 = sp + 0xe0;
0x0040c1cc sw v0, 4(s0) | *((s0 + 1)) = v0;
0x0040c1d0 lw v0, 8(v1) | v0 = *((v1 + 2));
0x0040c1d4 sw v0, 8(s0) | *((s0 + 2)) = v0;
| if (s6 != 0) {
0x0040c1d8 beqz s6, 0x40c38c |
0x0040c1dc lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040c1e0 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040c1e4 addiu a1, zero, 6 | a1 = 6;
0x0040c1e8 jalr t9 | t9 ();
0x0040c1ec lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040c1f0 beqz v0, 0x40c38c | goto label_9;
| }
0x0040c1f4 lw t9, -0x7dfc(gp) | t9 = sym.imp.json_object_get_string;
0x0040c1f8 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040c1fc jalr t9 | t9 ();
0x0040c200 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c204 move a0, v0 | a0 = v0;
0x0040c208 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040c20c move s6, v0 | s6 = v0;
0x0040c210 jalr t9 | t9 ();
0x0040c214 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c218 move a0, s1 | a0 = s1;
0x0040c21c lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040c220 move fp, v0 | fp = v0;
0x0040c224 jalr t9 | t9 ();
0x0040c228 move a3, v0 | a3 = v0;
0x0040c22c sltiu v0, fp, 8 | v0 = (fp < 8) ? 1 : 0;
0x0040c230 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040c234 bnez v0, 0x40c25c |
0x0040c238 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c23c lui a1, 0x42 | a1 = 0x420000;
0x0040c240 addiu a0, zero, 1 | a0 = 1;
| /* str.country_domain_too_long:__d___8_n */
0x0040c244 addiu a1, a1, -0x7c5c | a1 += -0x7c5c;
0x0040c248 move a2, fp | a2 = fp;
0x0040c24c sw a3, 0x110(sp) | *(var_110h) = a3;
0x0040c250 jalr t9 | t9 ();
0x0040c254 j 0x40c28c | goto label_10;
0x0040c258 lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x0040c25c lw a0, -0x7f28(gp) | a0 = *(gp);
| if (fp > 0) {
0x0040c260 blez fp, 0x40c290 |
0x0040c264 lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
0x0040c268 addiu a0, a0, 0x21c | a0 += 0x21c;
0x0040c26c move a1, s6 | a1 = s6;
0x0040c270 move a2, fp | a2 = fp;
0x0040c274 sw a3, 0x110(sp) | *(var_110h) = a3;
0x0040c278 jalr t9 | t9 ();
0x0040c27c lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c280 lw v0, -0x7f28(gp) | v0 = *(gp);
0x0040c284 addu v0, v0, fp | v0 += fp;
0x0040c288 sb zero, 0x21c(v0) | *((v0 + 540)) = 0;
| label_10:
0x0040c28c lw a3, 0x110(sp) | a3 = *(var_110h);
| }
0x0040c290 addu v0, fp, a3 | v0 = fp + a3;
0x0040c294 sltiu v0, v0, 0x20 | v0 = (v0 < 0x20) ? 1 : 0;
0x0040c298 lw t9, -0x7d04(gp) | t9 = sym.imp.snprintf;
| if (v0 == 0) {
0x0040c29c bnez v0, 0x40c2c0 |
0x0040c2a0 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c2a4 lui a1, 0x42 | a1 = 0x420000;
0x0040c2a8 move a0, zero | a0 = 0;
| /* str.host_length_too_long:__d___d___32_n */
0x0040c2ac addiu a1, a1, -0x7c38 | a1 += -0x7c38;
0x0040c2b0 move a2, fp | a2 = fp;
0x0040c2b4 jalr t9 | t9 ();
0x0040c2b8 j 0x40c3a4 | goto label_11;
0x0040c2bc lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x0040c2c0 lui fp, 0x41 | fp = 0x410000;
0x0040c2c4 move a3, s6 | a3 = s6;
0x0040c2c8 addiu a1, zero, 0x20 | a1 = 0x20;
| /* str._s._s */
0x0040c2cc addiu a2, fp, 0x679c | a2 = fp + 0x679c;
0x0040c2d0 move a0, s3 | a0 = s3;
0x0040c2d4 sw s1, 0x10(sp) | *(var_10h) = s1;
0x0040c2d8 jalr t9 | t9 ();
0x0040c2dc lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c2e0 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040c2e4 move a0, s3 | a0 = s3;
0x0040c2e8 jalr t9 | t9 ();
0x0040c2ec lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c2f0 move a0, s1 | a0 = s1;
0x0040c2f4 lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
0x0040c2f8 move a1, s3 | a1 = s3;
0x0040c2fc move a2, v0 | a2 = v0;
0x0040c300 jalr t9 | t9 ();
0x0040c304 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c308 lui a1, 0x42 | a1 = 0x420000;
0x0040c30c lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c310 addiu a0, zero, 2 | a0 = 2;
| /* str.Add_country_domain_to_tcp_host:__s_n */
0x0040c314 addiu a1, a1, -0x7c10 | a1 += -0x7c10;
0x0040c318 move a2, s1 | a2 = s1;
0x0040c31c jalr t9 | t9 ();
0x0040c320 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c324 move a3, s6 | a3 = s6;
0x0040c328 lw t9, -0x7d04(gp) | t9 = sym.imp.snprintf;
0x0040c32c addiu a1, zero, 0x20 | a1 = 0x20;
| /* str._s._s */
0x0040c330 addiu a2, fp, 0x679c | a2 = fp + 0x679c;
0x0040c334 move a0, s3 | a0 = s3;
0x0040c338 sw s0, 0x10(sp) | *(var_10h) = s0;
0x0040c33c jalr t9 | t9 ();
0x0040c340 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c344 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040c348 move a0, s3 | a0 = s3;
0x0040c34c jalr t9 | t9 ();
0x0040c350 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c354 move a0, s0 | a0 = s0;
0x0040c358 lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
0x0040c35c move a1, s3 | a1 = s3;
0x0040c360 move a2, v0 | a2 = v0;
0x0040c364 jalr t9 | t9 ();
0x0040c368 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c36c lui a1, 0x42 | a1 = 0x420000;
0x0040c370 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c374 addiu a0, zero, 2 | a0 = 2;
| /* str.Add_country_domain_to_udp_host:__s_n */
0x0040c378 addiu a1, a1, -0x7bec | a1 += -0x7bec;
0x0040c37c move a2, s0 | a2 = s0;
0x0040c380 jalr t9 | t9 ();
0x0040c384 j 0x40c3a4 | goto label_11;
0x0040c388 lw gp, 0x18(sp) | gp = *(var_18h);
| }
| label_9:
0x0040c38c lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c390 lui a1, 0x42 | a1 = 0x420000;
0x0040c394 addiu a0, zero, 3 | a0 = 3;
| /* str.country_domain_is_not_a_string_n */
0x0040c398 addiu a1, a1, -0x7bc8 | a1 += -0x7bc8;
0x0040c39c jalr t9 | t9 ();
0x0040c3a0 lw gp, 0x18(sp) | gp = *(var_18h);
| label_11:
0x0040c3a4 lw a0, 0x104(sp) | a0 = *(var_104h);
0x0040c3a8 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040c3ac lui a1, 0x41 | a1 = 0x415bf8;
| /* esilref: 'tz' */
0x0040c3b0 addiu a1, a1, 0x5bf8 |
0x0040c3b4 move a2, s4 | a2 = s4;
0x0040c3b8 jalr t9 | t9 ();
0x0040c3bc lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0040c3c0 beqz v0, 0x40c484 |
0x0040c3c4 lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040c3c8 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040c3cc addiu a1, zero, 6 | a1 = 6;
0x0040c3d0 jalr t9 | t9 ();
0x0040c3d4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040c3d8 beqz v0, 0x40c484 | goto label_12;
| }
0x0040c3dc lw t9, -0x7dfc(gp) | t9 = sym.imp.json_object_get_string;
0x0040c3e0 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040c3e4 jalr t9 | t9 ();
0x0040c3e8 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c3ec move a0, v0 | a0 = v0;
0x0040c3f0 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040c3f4 move s0, v0 | s0 = v0;
0x0040c3f8 jalr t9 | t9 ();
0x0040c3fc move s1, v0 | s1 = v0;
0x0040c400 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040c404 bnez v0, 0x40c424 |
0x0040c408 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c40c lui a1, 0x42 | a1 = 0x420000;
0x0040c410 addiu a0, zero, 1 | a0 = 1;
| /* str.tz_is_NULL._n */
0x0040c414 addiu a1, a1, -0x7ba8 | a1 += -0x7ba8;
0x0040c418 jalr t9 | t9 ();
0x0040c41c j 0x40c44c | goto label_13;
0x0040c420 lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x0040c424 sltiu v0, v0, 0x40 | v0 = (v0 < 0x40) ? 1 : 0;
0x0040c428 lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
| if (v0 == 0) {
0x0040c42c bnez v0, 0x40c450 |
0x0040c430 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c434 lui a1, 0x42 | a1 = 0x420000;
0x0040c438 addiu a0, zero, 1 | a0 = 1;
| /* str.tz_too_long._n */
0x0040c43c addiu a1, a1, -0x7b98 | a1 += -0x7b98;
0x0040c440 jalr t9 | t9 ();
0x0040c444 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c448 addiu s1, zero, 0x3f | s1 = 0x3f;
| label_13:
0x0040c44c lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
| }
0x0040c450 addiu a0, sp, 0x20 | a0 = sp + 0x20;
0x0040c454 move a1, s0 | a1 = s0;
0x0040c458 move a2, s1 | a2 = s1;
0x0040c45c jalr t9 | t9 ();
0x0040c460 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c464 lui a1, 0x42 | a1 = 0x420000;
0x0040c468 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c46c addiu a0, zero, 3 | a0 = 3;
| /* str.tz_s_n */
0x0040c470 addiu a1, a1, -0x7b88 | a1 += -0x7b88;
0x0040c474 addiu a2, sp, 0x20 | a2 = sp + 0x20;
0x0040c478 jalr t9 | t9 ();
0x0040c47c j 0x40c49c | goto label_14;
0x0040c480 lw gp, 0x18(sp) | gp = *(var_18h);
| }
| label_12:
0x0040c484 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c488 lui a1, 0x42 | a1 = 0x420000;
0x0040c48c move a0, zero | a0 = 0;
| /* str.tz_is_not_a_string_n */
0x0040c490 addiu a1, a1, -0x7b80 | a1 += -0x7b80;
0x0040c494 jalr t9 | t9 ();
0x0040c498 lw gp, 0x18(sp) | gp = *(var_18h);
| label_14:
0x0040c49c lw a0, -0x7f28(gp) | a0 = *(gp);
0x0040c4a0 lw t9, -0x7f58(gp) | t9 = sym.method_local_broadcast_msg;
0x0040c4a4 lui a1, 0x42 | a1 = "{\"method\": \"local.status\", \"params\": \"wifi_connecting\"}";
| /* str._method_:__local.status____params_:__wifi_connecting_ */
0x0040c4a8 addiu a1, a1, -0x7b6c |
0x0040c4ac jalr t9 | t9 ();
0x0040c4b0 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c4b4 lw a0, 0x140(sp) | a0 = *(arg_140h);
0x0040c4b8 lw t9, -0x7fb8(gp) | t9 = sym.json_verify_get_int;
0x0040c4bc lui a1, 0x41 | a1 = 0x41527c;
| /* esilref: 'id' */
0x0040c4c0 addiu a1, a1, 0x527c |
0x0040c4c4 move a2, s3 | a2 = s3;
0x0040c4c8 jalr t9 | t9 ();
0x0040c4cc move s0, v0 | s0 = v0;
0x0040c4d0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 >= 0) {
0x0040c4d4 bltz v0, 0x40c52c |
0x0040c4d8 lw v1, 0x148(sp) | v1 = *(arg_148h);
0x0040c4dc sltiu v0, v1, 0x24 | v0 = (v1 < 0x24) ? 1 : 0;
| if (v0 != 0) {
0x0040c4e0 beql v0, zero, 0x40c510 |
0x0040c4e4 lui a1, 0x42 | a1 = 0x420000;
0x0040c4e8 lui a1, 0x41 | a1 = 0x410000;
0x0040c4ec lui a2, 0x41 | a2 = 0x410000;
0x0040c4f0 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c4f4 move a0, zero | a0 = 0;
| /* str.json_string_too_long.__s__line__d_n */
0x0040c4f8 addiu a1, a1, 0x7eec | a1 += 0x7eec;
| /* str.miio_misc.c */
0x0040c4fc addiu a2, a2, 0x7f10 | a2 += 0x7f10;
0x0040c500 addiu a3, zero, 0x104 | a3 = 0x104;
0x0040c504 jalr t9 | t9 ();
0x0040c508 j 0x40c524 | goto label_15;
0x0040c50c nop |
| }
0x0040c510 lw a0, 0x144(sp) | a0 = *(arg_144h);
0x0040c514 lw a2, 0xe0(sp) | a2 = *(var_e0h);
0x0040c518 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
| /* str._id_:_d__result_:__OK__ */
0x0040c51c addiu a1, a1, -0x7b34 | a1 += -0x7b34;
0x0040c520 jalr t9 | t9 ();
| label_15:
0x0040c524 j 0x40c534 | goto label_16;
0x0040c528 lw a2, 0x2e8(s2) | a2 = *((s2 + 186));
| }
0x0040c52c move s0, zero | s0 = 0;
0x0040c530 lw a2, 0x2e8(s2) | a2 = *((s2 + 186));
| label_16:
0x0040c534 lw a3, 0x2ec(s2) | a3 = *((s2 + 187));
0x0040c538 addiu v0, sp, 0x20 | v0 = sp + 0x20;
0x0040c53c sw v0, 0x10(sp) | *(var_10h) = v0;
0x0040c540 move a0, s5 | a0 = s5;
0x0040c544 addiu a1, sp, 0x60 | a1 = sp + 0x60;
0x0040c548 jal 0x40bbbc | fcn_0040bbbc ();
0x0040c54c lw gp, 0x18(sp) | gp = *(var_18h);
| label_5:
0x0040c550 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040c554 move a0, s7 | a0 = s7;
0x0040c558 jalr t9 | t9 ();
0x0040c55c move v0, s0 | v0 = s0;
| label_0:
0x0040c560 lw ra, 0x13c(sp) | ra = *(var_13ch);
0x0040c564 lw fp, 0x138(sp) | fp = *(var_138h);
0x0040c568 lw s7, 0x134(sp) | s7 = *(var_134h);
0x0040c56c lw s6, 0x130(sp) | s6 = *(var_130h);
0x0040c570 lw s5, 0x12c(sp) | s5 = *(var_12ch);
0x0040c574 lw s4, 0x128(sp) | s4 = *(var_128h);
0x0040c578 lw s3, 0x124(sp) | s3 = *(var_124h);
0x0040c57c lw s2, 0x120(sp) | s2 = *(var_120h);
0x0040c580 lw s1, 0x11c(sp) | s1 = *(var_11ch);
0x0040c584 lw s0, 0x118(sp) | s0 = *(var_118h);
0x0040c588 addiu sp, sp, 0x140 |
0x0040c58c jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40c6e0 */
| #include <stdint.h>
|
; (fcn) sym.method_miio_config () | void method_miio_config () {
0x0040c6e0 lui gp, 0x43 |
0x0040c6e4 addiu gp, gp, 0x1620 |
0x0040c6e8 addiu sp, sp, -0x1048 |
0x0040c6ec lw t9, -0x7d40(gp) | t9 = sym.imp.json_tokener_parse;
0x0040c6f0 sw ra, 0x1044(sp) | *(var_1044h) = ra;
0x0040c6f4 sw s5, 0x1040(sp) | *(var_1040h) = s5;
0x0040c6f8 sw s4, 0x103c(sp) | *(var_103ch) = s4;
0x0040c6fc sw s3, 0x1038(sp) | *(var_1038h) = s3;
0x0040c700 sw s1, 0x1030(sp) | *(var_1030h) = s1;
0x0040c704 sw s0, 0x102c(sp) | *(var_102ch) = s0;
0x0040c708 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0040c70c sw s2, 0x1034(sp) | *(var_1034h) = s2;
0x0040c710 move s5, a0 | s5 = a0;
0x0040c714 move s4, a1 | s4 = a1;
0x0040c718 move s3, a2 | s3 = a2;
0x0040c71c jalr t9 | t9 ();
0x0040c720 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c724 addiu s0, sp, 0x1020 | s0 = sp + 0x1020;
0x0040c728 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040c72c lui a1, 0x41 | a1 = 0x410000;
0x0040c730 move a0, v0 | a0 = v0;
| /* str.params */
0x0040c734 addiu a1, a1, 0x56c4 | a1 += 0x56c4;
0x0040c738 move a2, s0 | a2 = s0;
0x0040c73c move s1, v0 | s1 = v0;
0x0040c740 jalr t9 | t9 ();
0x0040c744 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0040c748 beqz v0, 0x40c86c |
0x0040c74c lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040c750 lw a0, 0x1020(sp) | a0 = *(var_1020h);
0x0040c754 lui a1, 0x42 | a1 = "enauth";
| /* str.enauth */
0x0040c758 addiu a1, a1, -0x7a64 |
0x0040c75c move a2, s0 | a2 = s0;
0x0040c760 jalr t9 | t9 ();
0x0040c764 addiu s2, sp, 0x20 | s2 = sp + 0x20;
0x0040c768 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040c76c beqz v0, 0x40c890 | goto label_0;
| }
0x0040c770 lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040c774 lw a0, 0x1020(sp) | a0 = *(var_1020h);
0x0040c778 addiu a1, zero, 3 | a1 = 3;
0x0040c77c jalr t9 | t9 ();
0x0040c780 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040c784 bnez v0, 0x40c7a4 |
0x0040c788 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c78c lui a1, 0x42 | a1 = 0x420000;
0x0040c790 addiu a0, zero, 1 | a0 = 1;
| /* str.enauth_param_is_not_int_n */
0x0040c794 addiu a1, a1, -0x7a5c | a1 += -0x7a5c;
0x0040c798 jalr t9 | t9 ();
0x0040c79c j 0x40c890 | goto label_0;
0x0040c7a0 lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x0040c7a4 lw t9, -0x7d84(gp) | t9 = sym.imp.json_object_get_int;
0x0040c7a8 lw a0, 0x1020(sp) | a0 = *(var_1020h);
0x0040c7ac jalr t9 | t9 ();
0x0040c7b0 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c7b4 lui a1, 0x42 | a1 = 0x420000;
0x0040c7b8 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c7bc sltu a2, zero, v0 | a2 = (0 < v0) ? 1 : 0;
0x0040c7c0 addiu a0, zero, 3 | a0 = 3;
| /* str.miIO.config__enauth:__d_n */
0x0040c7c4 addiu a1, a1, -0x7a40 | a1 += -0x7a40;
0x0040c7c8 jalr t9 | t9 ();
0x0040c7cc lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c7d0 lui a2, 0x41 | a2 = 0x410000;
0x0040c7d4 lw v0, -0x7f28(gp) | v0 = *(gp);
0x0040c7d8 lw t9, -0x7d04(gp) | t9 = sym.imp.snprintf;
0x0040c7dc sb zero, 0x20b(v0) | *((v0 + 523)) = 0;
0x0040c7e0 lw a3, 0x268(v0) | a3 = *((v0 + 154));
0x0040c7e4 lui v0, 0x41 | v0 = "otd_donot_trust_peer";
| /* str.otd_donot_trust_peer */
0x0040c7e8 addiu v0, v0, 0x5fc4 |
0x0040c7ec sw v0, 0x10(sp) | *(var_10h) = v0;
0x0040c7f0 move a0, s2 | a0 = s2;
0x0040c7f4 addiu a1, zero, 0x1000 | a1 = 0x1000;
| /* str._s_s */
0x0040c7f8 addiu a2, a2, 0x5fbc | a2 += 0x5fbc;
0x0040c7fc jalr t9 | t9 ();
0x0040c800 move s0, v0 | s0 = v0;
0x0040c804 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 < 0) {
0x0040c808 bgez v0, 0x40c820 |
0x0040c80c lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040c810 move a0, s1 | a0 = s1;
0x0040c814 jalr t9 | t9 ();
0x0040c818 j 0x40c90c | goto label_1;
0x0040c81c move v0, s0 | v0 = s0;
| }
0x0040c820 slti v0, v0, 0x1000 | v0 = (v0 < 0x1000) ? 1 : 0;
0x0040c824 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
| if (v0 == 0) {
0x0040c828 beqz v0, 0x40c870 | goto label_2;
| }
0x0040c82c lw t9, -0x7e78(gp) | t9 = sym.imp.fopen64;
0x0040c830 addu s0, s2, s0 | s0 = s2 + s0;
0x0040c834 lui a1, 0x42 | a1 = 0x420000;
0x0040c838 sb zero, (s0) | *(s0) = 0;
0x0040c83c move a0, s2 | a0 = s2;
| /* esilref: 'w+' */
0x0040c840 addiu a1, a1, -0x7a24 | a1 += -0x7a24;
0x0040c844 jalr t9 | t9 ();
0x0040c848 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0040c84c bnez v0, 0x40c880 | goto label_3;
| }
0x0040c850 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c854 lui a1, 0x42 | a1 = 0x420000;
0x0040c858 move a0, zero | a0 = 0;
| /* str.cant_create__s:__m_n */
0x0040c85c addiu a1, a1, -0x7a20 | a1 += -0x7a20;
0x0040c860 move a2, s2 | a2 = s2;
0x0040c864 jalr t9 | t9 ();
0x0040c868 lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x0040c86c lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
| label_2:
0x0040c870 move a0, s1 | a0 = s1;
0x0040c874 jalr t9 | t9 ();
0x0040c878 j 0x40c90c | goto label_1;
0x0040c87c addiu v0, zero, -1 | v0 = -1;
| label_3:
0x0040c880 lw t9, -0x7de8(gp) | t9 = sym.imp.fclose;
0x0040c884 move a0, v0 | a0 = v0;
0x0040c888 jalr t9 | t9 ();
0x0040c88c lw gp, 0x18(sp) | gp = *(var_18h);
| label_0:
0x0040c890 lw t9, -0x7fb8(gp) | t9 = sym.json_verify_get_int;
0x0040c894 lui a1, 0x41 | a1 = 0x410000;
0x0040c898 move a0, s5 | a0 = s5;
| /* esilref: 'id' */
0x0040c89c addiu a1, a1, 0x527c | a1 += 0x527c;
0x0040c8a0 move a2, s2 | a2 = s2;
0x0040c8a4 jalr t9 | t9 ();
0x0040c8a8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 >= 0) {
0x0040c8ac bltz v0, 0x40c8fc |
0x0040c8b0 sltiu s3, s3, 0x24 | s3 = (s3 < 0x24) ? 1 : 0;
0x0040c8b4 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
| if (s3 != 0) {
0x0040c8b8 beqz s3, 0x40c8e4 |
0x0040c8bc lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c8c0 lui a1, 0x41 | a1 = 0x410000;
0x0040c8c4 lui a2, 0x41 | a2 = 0x410000;
0x0040c8c8 move a0, zero | a0 = 0;
| /* str.json_string_too_long.__s__line__d_n */
0x0040c8cc addiu a1, a1, 0x7eec | a1 += 0x7eec;
| /* str.miio_misc.c */
0x0040c8d0 addiu a2, a2, 0x7f10 | a2 += 0x7f10;
0x0040c8d4 addiu a3, zero, 0x179 | a3 = 0x179;
0x0040c8d8 jalr t9 | t9 ();
0x0040c8dc j 0x40c8fc | goto label_4;
0x0040c8e0 lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x0040c8e4 lui a1, 0x42 | a1 = 0x420000;
0x0040c8e8 lw a2, 0x20(sp) | a2 = *(var_20h);
0x0040c8ec move a0, s4 | a0 = s4;
| /* str._id_:_d__result_:__OK__ */
0x0040c8f0 addiu a1, a1, -0x7b34 | a1 += -0x7b34;
0x0040c8f4 jalr t9 | t9 ();
0x0040c8f8 lw gp, 0x18(sp) | gp = *(var_18h);
| }
| label_4:
0x0040c8fc lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040c900 move a0, s1 | a0 = s1;
0x0040c904 jalr t9 | t9 ();
0x0040c908 move v0, zero | v0 = 0;
| label_1:
0x0040c90c lw ra, 0x1044(sp) | ra = *(var_1044h);
0x0040c910 lw s5, 0x1040(sp) | s5 = *(var_1040h);
0x0040c914 lw s4, 0x103c(sp) | s4 = *(var_103ch);
0x0040c918 lw s3, 0x1038(sp) | s3 = *(var_1038h);
0x0040c91c lw s2, 0x1034(sp) | s2 = *(var_1034h);
0x0040c920 lw s1, 0x1030(sp) | s1 = *(var_1030h);
0x0040c924 lw s0, 0x102c(sp) | s0 = *(var_102ch);
0x0040c928 addiu sp, sp, 0x1048 |
0x0040c92c jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40ccec */
| #include <stdint.h>
|
; (fcn) sym.method_miio_config_tz () | void method_miio_config_tz () {
0x0040ccec lui gp, 0x43 |
0x0040ccf0 lui v0, 0x42 | v0 = 0x420000;
0x0040ccf4 addiu gp, gp, 0x1620 | gp += 0x1620;
0x0040ccf8 lhu v0, -0x7840(v0) | v0 = *((v0 - 15392));
0x0040ccfc addiu sp, sp, -0x88 |
0x0040cd00 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040cd04 sw ra, 0x84(sp) | *(var_84h) = ra;
0x0040cd08 sw s4, 0x7c(sp) | *(var_7ch) = s4;
0x0040cd0c sw s2, 0x74(sp) | *(var_74h) = s2;
0x0040cd10 sw s1, 0x70(sp) | *(var_70h) = s1;
0x0040cd14 sw s0, 0x6c(sp) | *(var_6ch) = s0;
0x0040cd18 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040cd1c move s4, a0 | s4 = a0;
0x0040cd20 sw s5, 0x80(sp) | *(var_80h) = s5;
0x0040cd24 addiu a0, sp, 0x1a | a0 = sp + 0x1a;
0x0040cd28 sw s3, 0x78(sp) | *(var_78h) = s3;
0x0040cd2c move s2, a1 | s2 = a1;
0x0040cd30 move s1, a2 | s1 = a2;
0x0040cd34 move a1, zero | a1 = 0;
0x0040cd38 addiu a2, zero, 0x3e | a2 = 0x3e;
0x0040cd3c sh v0, 0x18(sp) | *(var_18h) = v0;
0x0040cd40 jalr t9 | t9 ();
0x0040cd44 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cd48 lui a1, 0x41 | a1 = 0x410000;
0x0040cd4c lw t9, -0x7fb8(gp) | t9 = sym.json_verify_get_int;
0x0040cd50 sw zero, 0x58(sp) | *(var_58h) = 0;
0x0040cd54 move a0, s4 | a0 = s4;
| /* esilref: 'id' */
0x0040cd58 addiu a1, a1, 0x527c | a1 += 0x527c;
0x0040cd5c addiu a2, sp, 0x58 | a2 = sp + 0x58;
0x0040cd60 jalr t9 | t9 ();
0x0040cd64 move s0, v0 | s0 = v0;
0x0040cd68 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x0040cd6c bgez v0, 0x40cd8c |
0x0040cd70 lui a1, 0x41 | a1 = 0x410000;
0x0040cd74 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040cd78 move a0, zero | a0 = 0;
| /* str.json_verify_get_int_fail_n */
0x0040cd7c addiu a1, a1, 0x5aa4 | a1 += 0x5aa4;
0x0040cd80 jalr t9 | t9 ();
0x0040cd84 j 0x40d064 | goto label_0;
0x0040cd88 move v0, s0 | v0 = s0;
| }
0x0040cd8c sltiu s1, s1, 0x2a | s1 = (s1 < 0x2a) ? 1 : 0;
0x0040cd90 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
| if (s1 != 0) {
0x0040cd94 beqz s1, 0x40cdc0 |
0x0040cd98 lui a1, 0x41 | a1 = 0x410000;
0x0040cd9c lui a2, 0x41 | a2 = 0x410000;
0x0040cda0 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040cda4 move a0, zero | a0 = 0;
| /* str.json_string_too_long.__s__line__d_n */
0x0040cda8 addiu a1, a1, 0x7eec | a1 += 0x7eec;
| /* str.miio_misc.c */
0x0040cdac addiu a2, a2, 0x7f10 | a2 += 0x7f10;
0x0040cdb0 addiu a3, zero, 0x1d8 | a3 = 0x1d8;
0x0040cdb4 jalr t9 | t9 ();
0x0040cdb8 j 0x40cf5c | goto label_1;
0x0040cdbc nop |
| }
0x0040cdc0 lw a2, 0x58(sp) | a2 = *(var_58h);
0x0040cdc4 lui s3, 0x42 | s3 = 0x420000;
0x0040cdc8 lui a3, 0x42 | a3 = 0x420000;
| /* str._id_:_d__result_:___s__ */
0x0040cdcc addiu a1, s3, -0x79c4 | a1 = s3 + -0x79c4;
| /* str.ERROR */
0x0040cdd0 addiu a3, a3, -0x79a8 | a3 += -0x79a8;
0x0040cdd4 move a0, s2 | a0 = s2;
0x0040cdd8 jalr t9 | t9 ();
0x0040cddc lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cde0 addu v0, s2, v0 | v0 = s2 + v0;
0x0040cde4 lw t9, -0x7d40(gp) | t9 = sym.imp.json_tokener_parse;
0x0040cde8 move a0, s4 | a0 = s4;
0x0040cdec sb zero, (v0) | *(v0) = 0;
0x0040cdf0 jalr t9 | t9 ();
0x0040cdf4 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cdf8 lui a1, 0x41 | a1 = 0x410000;
0x0040cdfc lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040ce00 move a0, v0 | a0 = v0;
| /* str.params */
0x0040ce04 addiu a1, a1, 0x56c4 | a1 += 0x56c4;
0x0040ce08 addiu a2, sp, 0x60 | a2 = sp + 0x60;
0x0040ce0c move s1, v0 | s1 = v0;
0x0040ce10 jalr t9 | t9 ();
0x0040ce14 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x0040ce18 beqz v0, 0x40cf50 |
0x0040ce1c lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040ce20 lw a0, 0x60(sp) | a0 = *(var_60h);
0x0040ce24 lui a1, 0x41 | a1 = 0x415bf8;
| /* esilref: 'tz' */
0x0040ce28 addiu a1, a1, 0x5bf8 |
0x0040ce2c addiu a2, sp, 0x5c | a2 = sp + 0x5c;
0x0040ce30 jalr t9 | t9 ();
0x0040ce34 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040ce38 lw a0, 0x5c(sp) | a0 = *(var_5ch);
0x0040ce3c lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040ce40 addiu a1, zero, 6 | a1 = 6;
0x0040ce44 jalr t9 | t9 ();
0x0040ce48 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x0040ce4c beqz v0, 0x40cf38 |
0x0040ce50 lw t9, -0x7dfc(gp) | t9 = sym.imp.json_object_get_string;
0x0040ce54 lw a0, 0x5c(sp) | a0 = *(var_5ch);
0x0040ce58 jalr t9 | t9 ();
0x0040ce5c lw gp, 0x10(sp) | gp = *(var_10h);
0x0040ce60 move a0, v0 | a0 = v0;
0x0040ce64 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040ce68 move s4, v0 | s4 = v0;
0x0040ce6c jalr t9 | t9 ();
0x0040ce70 move a2, v0 | a2 = v0;
0x0040ce74 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0040ce78 bnez v0, 0x40ce98 |
0x0040ce7c lui a1, 0x42 | a1 = 0x420000;
0x0040ce80 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040ce84 move a0, zero | a0 = 0;
| /* str.tz_is_NULL._n */
0x0040ce88 addiu a1, a1, -0x7ba8 | a1 += -0x7ba8;
0x0040ce8c jalr t9 | t9 ();
0x0040ce90 j 0x40cf5c | goto label_1;
0x0040ce94 nop |
| }
0x0040ce98 sltiu v0, v0, 0x40 | v0 = (v0 < 0x40) ? 1 : 0;
0x0040ce9c lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
| if (v0 == 0) {
0x0040cea0 bnez v0, 0x40cec4 |
0x0040cea4 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040cea8 lui a1, 0x42 | a1 = 0x420000;
0x0040ceac addiu a0, zero, 1 | a0 = 1;
| /* str.tz_too_long._n */
0x0040ceb0 addiu a1, a1, -0x7b98 | a1 += -0x7b98;
0x0040ceb4 jalr t9 | t9 ();
0x0040ceb8 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cebc addiu a2, zero, 0x3f | a2 = 0x3f;
0x0040cec0 lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
| }
0x0040cec4 addiu s0, sp, 0x18 | s0 = sp + 0x18;
0x0040cec8 move a0, s0 | a0 = s0;
0x0040cecc move a1, s4 | a1 = s4;
0x0040ced0 jalr t9 | t9 ();
0x0040ced4 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040ced8 lui a1, 0x42 | a1 = 0x420000;
0x0040cedc lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
| /* str.tz_s_n */
0x0040cee0 addiu a1, a1, -0x7b88 | a1 += -0x7b88;
0x0040cee4 move a2, s0 | a2 = s0;
0x0040cee8 addiu a0, zero, 3 | a0 = 3;
0x0040ceec jalr t9 | t9 ();
0x0040cef0 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cef4 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040cef8 move a0, s1 | a0 = s1;
0x0040cefc jalr t9 | t9 ();
0x0040cf00 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cf04 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040cf08 move a0, s0 | a0 = s0;
0x0040cf0c jalr t9 | t9 ();
0x0040cf10 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cf14 lw t9, -0x7d14(gp) | t9 = sym.imp.malloc;
0x0040cf18 addiu a0, v0, 0x35 | a0 = v0 + 0x35;
0x0040cf1c jalr t9 | t9 ();
0x0040cf20 move s1, v0 | s1 = v0;
0x0040cf24 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cf28 addiu v0, zero, -1 | v0 = -1;
| if (s1 != 0) {
0x0040cf2c bnez s1, 0x40cf64 | goto label_2;
| }
0x0040cf30 j 0x40d068 | goto label_3;
0x0040cf34 lw ra, 0x84(sp) | ra = *(var_84h);
| }
0x0040cf38 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040cf3c lui a1, 0x42 | a1 = 0x420000;
0x0040cf40 move a0, zero | a0 = 0;
| /* str.tz_is_not_a_string_n */
0x0040cf44 addiu a1, a1, -0x7b80 | a1 += -0x7b80;
0x0040cf48 jalr t9 | t9 ();
0x0040cf4c lw gp, 0x10(sp) | gp = *(var_10h);
| }
0x0040cf50 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040cf54 move a0, s1 | a0 = s1;
0x0040cf58 jalr t9 | t9 ();
| label_1:
0x0040cf5c j 0x40d064 | goto label_0;
0x0040cf60 addiu v0, zero, -1 | v0 = -1;
| label_2:
0x0040cf64 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040cf68 lui a1, 0x42 | a1 = 0x420000;
0x0040cf6c move a2, s0 | a2 = s0;
0x0040cf70 move a0, s1 | a0 = s1;
| /* str._method_:__internal.config_tz___params_:_tz_:__s_ */
0x0040cf74 addiu a1, a1, -0x79a0 | a1 += -0x79a0;
0x0040cf78 jalr t9 | t9 ();
0x0040cf7c lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cf80 addu v0, s1, v0 | v0 = s1 + v0;
0x0040cf84 lw s4, -0x7f28(gp) | s4 = *(gp);
0x0040cf88 sb zero, (v0) | *(v0) = 0;
0x0040cf8c lw s0, 0x2d4(s4) | s0 = *((s4 + 181));
0x0040cf90 lui s5, 0x42 | s5 = 0x420000;
| if (s0 > 0) {
0x0040cf94 blez s0, 0x40d034 |
0x0040cf98 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040cf9c move a0, s1 | a0 = s1;
0x0040cfa0 jalr t9 | t9 ();
0x0040cfa4 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cfa8 move a0, s0 | a0 = s0;
0x0040cfac lw t9, -0x7fc4(gp) | t9 = sym.general_send_one;
0x0040cfb0 move a1, s1 | a1 = s1;
0x0040cfb4 move a2, v0 | a2 = v0;
0x0040cfb8 jalr t9 | t9 ();
0x0040cfbc lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cfc0 lui a1, 0x42 | a1 = 0x420000;
0x0040cfc4 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040cfc8 move s0, v0 | s0 = v0;
0x0040cfcc addiu a0, zero, 2 | a0 = 2;
| /* str._s__:ret_is__d_n */
0x0040cfd0 addiu a1, a1, -0x7968 | a1 += -0x7968;
| /* str.method_miio_config_tz */
0x0040cfd4 addiu a2, s5, -0x777c | a2 = s5 + -0x777c;
0x0040cfd8 move a3, v0 | a3 = v0;
0x0040cfdc jalr t9 | t9 ();
0x0040cfe0 lw gp, 0x10(sp) | gp = *(var_10h);
| if (s0 < 0) {
0x0040cfe4 bgez s0, 0x40d004 |
0x0040cfe8 lw t9, -0x7fc0(gp) | t9 = sym.ot_agent_fd_close;
0x0040cfec lw a1, 0x2d4(s4) | a1 = *((s4 + 181));
0x0040cff0 move a0, s4 | a0 = s4;
0x0040cff4 jalr t9 | t9 ();
0x0040cff8 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cffc j 0x40d054 | goto label_4;
0x0040d000 sw zero, 0x2d4(s4) | *((s4 + 181)) = 0;
| }
0x0040d004 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040d008 lw a2, 0x58(sp) | a2 = *(var_58h);
0x0040d00c lui a3, 0x42 | a3 = 0x420000;
0x0040d010 move a0, s2 | a0 = s2;
| /* str._id_:_d__result_:___s__ */
0x0040d014 addiu a1, s3, -0x79c4 | a1 = s3 + -0x79c4;
| /* esilref: 'OK' */
0x0040d018 addiu a3, a3, -0x7958 | a3 += -0x7958;
0x0040d01c jalr t9 | t9 ();
0x0040d020 addu s2, s2, v0 | s2 += v0;
0x0040d024 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d028 move s0, v0 | s0 = v0;
0x0040d02c j 0x40d054 | goto label_4;
0x0040d030 sb zero, (s2) | *(s2) = 0;
| }
0x0040d034 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040d038 lui a1, 0x42 | a1 = 0x420000;
0x0040d03c addiu a0, zero, 1 | a0 = 1;
| /* str._s__:No_helper_script__n */
0x0040d040 addiu a1, a1, -0x7954 | a1 += -0x7954;
| /* str.method_miio_config_tz */
0x0040d044 addiu a2, s5, -0x777c | a2 = s5 + -0x777c;
0x0040d048 jalr t9 | t9 ();
0x0040d04c lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d050 addiu s0, zero, -1 | s0 = -1;
| label_4:
0x0040d054 lw t9, -0x7e6c(gp) | t9 = sym.imp.free;
0x0040d058 move a0, s1 | a0 = s1;
0x0040d05c jalr t9 | t9 ();
0x0040d060 move v0, s0 | v0 = s0;
| label_0:
0x0040d064 lw ra, 0x84(sp) | ra = *(var_84h);
| label_3:
0x0040d068 lw s5, 0x80(sp) | s5 = *(var_80h);
0x0040d06c lw s4, 0x7c(sp) | s4 = *(var_7ch);
0x0040d070 lw s3, 0x78(sp) | s3 = *(var_78h);
0x0040d074 lw s2, 0x74(sp) | s2 = *(var_74h);
0x0040d078 lw s1, 0x70(sp) | s1 = *(var_70h);
0x0040d07c lw s0, 0x6c(sp) | s0 = *(var_6ch);
0x0040d080 addiu sp, sp, 0x88 |
0x0040d084 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40d088 */
| #include <stdint.h>
|
; (fcn) sym.method_miio_config_loglevel () | void method_miio_config_loglevel () {
0x0040d088 lui gp, 0x43 |
0x0040d08c addiu sp, sp, -0x40 |
0x0040d090 addiu gp, gp, 0x1620 | gp += 0x1620;
0x0040d094 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040d098 sw s4, 0x38(sp) | *(var_38h) = s4;
0x0040d09c lui a3, 0x42 | a3 = 0x420000;
0x0040d0a0 lui s4, 0x42 | s4 = 0x420000;
0x0040d0a4 sw ra, 0x3c(sp) | *(var_3ch) = ra;
0x0040d0a8 sw s3, 0x34(sp) | *(var_34h) = s3;
0x0040d0ac sw s2, 0x30(sp) | *(var_30h) = s2;
0x0040d0b0 sw s1, 0x2c(sp) | *(var_2ch) = s1;
0x0040d0b4 sw s0, 0x28(sp) | *(var_28h) = s0;
0x0040d0b8 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040d0bc move s2, a0 | s2 = a0;
0x0040d0c0 move s1, a1 | s1 = a1;
0x0040d0c4 move a0, a1 | a0 = a1;
| /* str.ERROR */
0x0040d0c8 addiu a3, a3, -0x79a8 | a3 += -0x79a8;
| /* str._id_:_d__result_:___s__ */
0x0040d0cc addiu a1, s4, -0x79c4 | a1 = s4 + -0x79c4;
0x0040d0d0 move s3, a2 | s3 = a2;
0x0040d0d4 sw zero, 0x18(sp) | *(var_18h) = 0;
0x0040d0d8 move a2, zero | a2 = 0;
0x0040d0dc jalr t9 | t9 ();
0x0040d0e0 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d0e4 addu v0, s1, v0 | v0 = s1 + v0;
0x0040d0e8 lw t9, -0x7fb8(gp) | t9 = sym.json_verify_get_int;
0x0040d0ec lui a1, 0x41 | a1 = 0x410000;
0x0040d0f0 sb zero, (v0) | *(v0) = 0;
0x0040d0f4 move a0, s2 | a0 = s2;
| /* esilref: 'id' */
0x0040d0f8 addiu a1, a1, 0x527c | a1 += 0x527c;
0x0040d0fc addiu a2, sp, 0x18 | a2 = sp + 0x18;
0x0040d100 jalr t9 | t9 ();
0x0040d104 move s0, v0 | s0 = v0;
0x0040d108 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x0040d10c bgez v0, 0x40d12c |
0x0040d110 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040d114 lui a1, 0x41 | a1 = 0x410000;
0x0040d118 move a0, zero | a0 = 0;
| /* str.json_verify_get_int_fail_n */
0x0040d11c addiu a1, a1, 0x5aa4 | a1 += 0x5aa4;
0x0040d120 jalr t9 | t9 ();
0x0040d124 j 0x40d250 | goto label_1;
0x0040d128 move v0, s0 | v0 = s0;
| }
0x0040d12c sltiu s3, s3, 0x2a | s3 = (s3 < 0x2a) ? 1 : 0;
0x0040d130 lw t9, -0x7d40(gp) | t9 = sym.imp.json_tokener_parse;
| if (s3 != 0) {
0x0040d134 beqz s3, 0x40d160 |
0x0040d138 lui a1, 0x41 | a1 = 0x410000;
0x0040d13c lui a2, 0x41 | a2 = 0x410000;
0x0040d140 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040d144 move a0, zero | a0 = 0;
| /* str.json_string_too_long.__s__line__d_n */
0x0040d148 addiu a1, a1, 0x7eec | a1 += 0x7eec;
| /* str.miio_misc.c */
0x0040d14c addiu a2, a2, 0x7f10 | a2 += 0x7f10;
0x0040d150 addiu a3, zero, 0x22c | a3 = 0x22c;
0x0040d154 jalr t9 | t9 ();
0x0040d158 j 0x40d19c | goto label_0;
0x0040d15c nop |
| }
0x0040d160 move a0, s2 | a0 = s2;
0x0040d164 jalr t9 | t9 ();
0x0040d168 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d16c lui a1, 0x41 | a1 = 0x410000;
0x0040d170 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040d174 move a0, v0 | a0 = v0;
| /* str.params */
0x0040d178 addiu a1, a1, 0x56c4 | a1 += 0x56c4;
0x0040d17c addiu a2, sp, 0x20 | a2 = sp + 0x20;
0x0040d180 move s0, v0 | s0 = v0;
0x0040d184 jalr t9 | t9 ();
0x0040d188 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d18c bnez v0, 0x40d1a4 |
| while (v0 == 0) {
0x0040d190 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040d194 move a0, s0 | a0 = s0;
0x0040d198 jalr t9 | t9 ();
| label_0:
0x0040d19c j 0x40d250 | goto label_1;
0x0040d1a0 addiu v0, zero, -1 | v0 = -1;
0x0040d1a4 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040d1a8 lw a0, 0x20(sp) | a0 = *(var_20h);
0x0040d1ac lui a1, 0x41 | a1 = 0x416d2c;
| /* esilref: 'loglevel' */
0x0040d1b0 addiu a1, a1, 0x6d2c |
0x0040d1b4 addiu a2, sp, 0x1c | a2 = sp + 0x1c;
0x0040d1b8 jalr t9 | t9 ();
0x0040d1bc lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d1c0 beqz v0, 0x40d190 |
| }
0x0040d1c4 lw t9, -0x7d84(gp) | t9 = sym.imp.json_object_get_int;
0x0040d1c8 lw a0, 0x1c(sp) | a0 = *(var_1ch);
0x0040d1cc jalr t9 | t9 ();
0x0040d1d0 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d1d4 move s3, v0 | s3 = v0;
0x0040d1d8 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040d1dc move a0, s0 | a0 = s0;
0x0040d1e0 jalr t9 | t9 ();
0x0040d1e4 sltiu v0, s3, 5 | v0 = (s3 < 5) ? 1 : 0;
0x0040d1e8 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0040d1ec bnez v0, 0x40d210 |
0x0040d1f0 lui a1, 0x42 | a1 = 0x420000;
0x0040d1f4 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040d1f8 move a0, zero | a0 = 0;
| /* str.json_verify_get_int_fail:d_n */
0x0040d1fc addiu a1, a1, -0x793c | a1 += -0x793c;
0x0040d200 move a2, s3 | a2 = s3;
0x0040d204 jalr t9 | t9 ();
0x0040d208 j 0x40d19c | goto label_0;
0x0040d20c nop |
| }
0x0040d210 lw v0, -0x7f34(gp) | v0 = *(gp);
0x0040d214 lw t9, -0x7f58(gp) | t9 = sym.method_local_broadcast_msg;
0x0040d218 lw a0, -0x7f28(gp) | a0 = *(gp);
0x0040d21c sw s3, (v0) | *(v0) = s3;
0x0040d220 move a1, s2 | a1 = s2;
0x0040d224 jalr t9 | t9 ();
0x0040d228 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d22c lw a2, 0x18(sp) | a2 = *(var_18h);
0x0040d230 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040d234 lui a3, 0x42 | a3 = 0x420000;
0x0040d238 move a0, s1 | a0 = s1;
| /* str._id_:_d__result_:___s__ */
0x0040d23c addiu a1, s4, -0x79c4 | a1 = s4 + -0x79c4;
| /* esilref: 'OK' */
0x0040d240 addiu a3, a3, -0x7958 | a3 += -0x7958;
0x0040d244 jalr t9 | t9 ();
0x0040d248 addu s1, s1, v0 | s1 += v0;
0x0040d24c sb zero, (s1) | *(s1) = 0;
| label_1:
0x0040d250 lw ra, 0x3c(sp) | ra = *(var_3ch);
0x0040d254 lw s4, 0x38(sp) | s4 = *(var_38h);
0x0040d258 lw s3, 0x34(sp) | s3 = *(var_34h);
0x0040d25c lw s2, 0x30(sp) | s2 = *(var_30h);
0x0040d260 lw s1, 0x2c(sp) | s1 = *(var_2ch);
0x0040d264 lw s0, 0x28(sp) | s0 = *(var_28h);
0x0040d268 addiu sp, sp, 0x40 |
0x0040d26c jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40d088 */
| #include <stdint.h>
|
; (fcn) sym.method_miio_config_loglevel () | void method_miio_config_loglevel () {
0x0040d088 lui gp, 0x43 |
0x0040d08c addiu sp, sp, -0x40 |
0x0040d090 addiu gp, gp, 0x1620 | gp += 0x1620;
0x0040d094 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040d098 sw s4, 0x38(sp) | *(var_38h) = s4;
0x0040d09c lui a3, 0x42 | a3 = 0x420000;
0x0040d0a0 lui s4, 0x42 | s4 = 0x420000;
0x0040d0a4 sw ra, 0x3c(sp) | *(var_3ch) = ra;
0x0040d0a8 sw s3, 0x34(sp) | *(var_34h) = s3;
0x0040d0ac sw s2, 0x30(sp) | *(var_30h) = s2;
0x0040d0b0 sw s1, 0x2c(sp) | *(var_2ch) = s1;
0x0040d0b4 sw s0, 0x28(sp) | *(var_28h) = s0;
0x0040d0b8 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040d0bc move s2, a0 | s2 = a0;
0x0040d0c0 move s1, a1 | s1 = a1;
0x0040d0c4 move a0, a1 | a0 = a1;
| /* str.ERROR */
0x0040d0c8 addiu a3, a3, -0x79a8 | a3 += -0x79a8;
| /* str._id_:_d__result_:___s__ */
0x0040d0cc addiu a1, s4, -0x79c4 | a1 = s4 + -0x79c4;
0x0040d0d0 move s3, a2 | s3 = a2;
0x0040d0d4 sw zero, 0x18(sp) | *(var_18h) = 0;
0x0040d0d8 move a2, zero | a2 = 0;
0x0040d0dc jalr t9 | t9 ();
0x0040d0e0 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d0e4 addu v0, s1, v0 | v0 = s1 + v0;
0x0040d0e8 lw t9, -0x7fb8(gp) | t9 = sym.json_verify_get_int;
0x0040d0ec lui a1, 0x41 | a1 = 0x410000;
0x0040d0f0 sb zero, (v0) | *(v0) = 0;
0x0040d0f4 move a0, s2 | a0 = s2;
| /* esilref: 'id' */
0x0040d0f8 addiu a1, a1, 0x527c | a1 += 0x527c;
0x0040d0fc addiu a2, sp, 0x18 | a2 = sp + 0x18;
0x0040d100 jalr t9 | t9 ();
0x0040d104 move s0, v0 | s0 = v0;
0x0040d108 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x0040d10c bgez v0, 0x40d12c |
0x0040d110 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040d114 lui a1, 0x41 | a1 = 0x410000;
0x0040d118 move a0, zero | a0 = 0;
| /* str.json_verify_get_int_fail_n */
0x0040d11c addiu a1, a1, 0x5aa4 | a1 += 0x5aa4;
0x0040d120 jalr t9 | t9 ();
0x0040d124 j 0x40d250 | goto label_1;
0x0040d128 move v0, s0 | v0 = s0;
| }
0x0040d12c sltiu s3, s3, 0x2a | s3 = (s3 < 0x2a) ? 1 : 0;
0x0040d130 lw t9, -0x7d40(gp) | t9 = sym.imp.json_tokener_parse;
| if (s3 != 0) {
0x0040d134 beqz s3, 0x40d160 |
0x0040d138 lui a1, 0x41 | a1 = 0x410000;
0x0040d13c lui a2, 0x41 | a2 = 0x410000;
0x0040d140 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040d144 move a0, zero | a0 = 0;
| /* str.json_string_too_long.__s__line__d_n */
0x0040d148 addiu a1, a1, 0x7eec | a1 += 0x7eec;
| /* str.miio_misc.c */
0x0040d14c addiu a2, a2, 0x7f10 | a2 += 0x7f10;
0x0040d150 addiu a3, zero, 0x22c | a3 = 0x22c;
0x0040d154 jalr t9 | t9 ();
0x0040d158 j 0x40d19c | goto label_0;
0x0040d15c nop |
| }
0x0040d160 move a0, s2 | a0 = s2;
0x0040d164 jalr t9 | t9 ();
0x0040d168 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d16c lui a1, 0x41 | a1 = 0x410000;
0x0040d170 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040d174 move a0, v0 | a0 = v0;
| /* str.params */
0x0040d178 addiu a1, a1, 0x56c4 | a1 += 0x56c4;
0x0040d17c addiu a2, sp, 0x20 | a2 = sp + 0x20;
0x0040d180 move s0, v0 | s0 = v0;
0x0040d184 jalr t9 | t9 ();
0x0040d188 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d18c bnez v0, 0x40d1a4 |
| while (v0 == 0) {
0x0040d190 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040d194 move a0, s0 | a0 = s0;
0x0040d198 jalr t9 | t9 ();
| label_0:
0x0040d19c j 0x40d250 | goto label_1;
0x0040d1a0 addiu v0, zero, -1 | v0 = -1;
0x0040d1a4 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040d1a8 lw a0, 0x20(sp) | a0 = *(var_20h);
0x0040d1ac lui a1, 0x41 | a1 = 0x416d2c;
| /* esilref: 'loglevel' */
0x0040d1b0 addiu a1, a1, 0x6d2c |
0x0040d1b4 addiu a2, sp, 0x1c | a2 = sp + 0x1c;
0x0040d1b8 jalr t9 | t9 ();
0x0040d1bc lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d1c0 beqz v0, 0x40d190 |
| }
0x0040d1c4 lw t9, -0x7d84(gp) | t9 = sym.imp.json_object_get_int;
0x0040d1c8 lw a0, 0x1c(sp) | a0 = *(var_1ch);
0x0040d1cc jalr t9 | t9 ();
0x0040d1d0 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d1d4 move s3, v0 | s3 = v0;
0x0040d1d8 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040d1dc move a0, s0 | a0 = s0;
0x0040d1e0 jalr t9 | t9 ();
0x0040d1e4 sltiu v0, s3, 5 | v0 = (s3 < 5) ? 1 : 0;
0x0040d1e8 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0040d1ec bnez v0, 0x40d210 |
0x0040d1f0 lui a1, 0x42 | a1 = 0x420000;
0x0040d1f4 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040d1f8 move a0, zero | a0 = 0;
| /* str.json_verify_get_int_fail:d_n */
0x0040d1fc addiu a1, a1, -0x793c | a1 += -0x793c;
0x0040d200 move a2, s3 | a2 = s3;
0x0040d204 jalr t9 | t9 ();
0x0040d208 j 0x40d19c | goto label_0;
0x0040d20c nop |
| }
0x0040d210 lw v0, -0x7f34(gp) | v0 = *(gp);
0x0040d214 lw t9, -0x7f58(gp) | t9 = sym.method_local_broadcast_msg;
0x0040d218 lw a0, -0x7f28(gp) | a0 = *(gp);
0x0040d21c sw s3, (v0) | *(v0) = s3;
0x0040d220 move a1, s2 | a1 = s2;
0x0040d224 jalr t9 | t9 ();
0x0040d228 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d22c lw a2, 0x18(sp) | a2 = *(var_18h);
0x0040d230 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040d234 lui a3, 0x42 | a3 = 0x420000;
0x0040d238 move a0, s1 | a0 = s1;
| /* str._id_:_d__result_:___s__ */
0x0040d23c addiu a1, s4, -0x79c4 | a1 = s4 + -0x79c4;
| /* esilref: 'OK' */
0x0040d240 addiu a3, a3, -0x7958 | a3 += -0x7958;
0x0040d244 jalr t9 | t9 ();
0x0040d248 addu s1, s1, v0 | s1 += v0;
0x0040d24c sb zero, (s1) | *(s1) = 0;
| label_1:
0x0040d250 lw ra, 0x3c(sp) | ra = *(var_3ch);
0x0040d254 lw s4, 0x38(sp) | s4 = *(var_38h);
0x0040d258 lw s3, 0x34(sp) | s3 = *(var_34h);
0x0040d25c lw s2, 0x30(sp) | s2 = *(var_30h);
0x0040d260 lw s1, 0x2c(sp) | s1 = *(var_2ch);
0x0040d264 lw s0, 0x28(sp) | s0 = *(var_28h);
0x0040d268 addiu sp, sp, 0x40 |
0x0040d26c jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40bd70 */
| #include <stdint.h>
|
; (fcn) sym.method_miio_config_router () | void method_miio_config_router () {
0x0040bd70 lui gp, 0x43 |
0x0040bd74 addiu gp, gp, 0x1620 |
0x0040bd78 addiu sp, sp, -0x140 |
0x0040bd7c lw t9, -0x7d40(gp) | t9 = sym.imp.json_tokener_parse;
0x0040bd80 sw ra, 0x13c(sp) | *(var_13ch) = ra;
0x0040bd84 sw s7, 0x134(sp) | *(var_134h) = s7;
0x0040bd88 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0040bd8c sw a0, 0x140(sp) | *(arg_140h) = a0;
0x0040bd90 sw a1, 0x144(sp) | *(arg_144h) = a1;
0x0040bd94 sw a2, 0x148(sp) | *(arg_148h) = a2;
0x0040bd98 sw fp, 0x138(sp) | *(var_138h) = fp;
0x0040bd9c sw s6, 0x130(sp) | *(var_130h) = s6;
0x0040bda0 sw s5, 0x12c(sp) | *(var_12ch) = s5;
0x0040bda4 sw s4, 0x128(sp) | *(var_128h) = s4;
0x0040bda8 sw s3, 0x124(sp) | *(var_124h) = s3;
0x0040bdac sw s2, 0x120(sp) | *(var_120h) = s2;
0x0040bdb0 sw s1, 0x11c(sp) | *(var_11ch) = s1;
0x0040bdb4 sw s0, 0x118(sp) | *(var_118h) = s0;
0x0040bdb8 jalr t9 | t9 ();
0x0040bdbc lw gp, 0x18(sp) | gp = *(var_18h);
0x0040bdc0 lui a1, 0x41 | a1 = 0x410000;
0x0040bdc4 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040bdc8 move a0, v0 | a0 = v0;
| /* str.params */
0x0040bdcc addiu a1, a1, 0x56c4 | a1 += 0x56c4;
0x0040bdd0 addiu a2, sp, 0x104 | a2 = sp + 0x104;
0x0040bdd4 move s7, v0 | s7 = v0;
0x0040bdd8 jalr t9 | t9 ();
0x0040bddc lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040bde0 bnez v0, 0x40bdf8 |
0x0040bde4 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040bde8 move a0, s7 | a0 = s7;
0x0040bdec jalr t9 | t9 ();
0x0040bdf0 j 0x40c560 | goto label_0;
0x0040bdf4 addiu v0, zero, -1 | v0 = -1;
| }
0x0040bdf8 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040bdfc addiu s5, sp, 0xa0 | s5 = sp + 0xa0;
0x0040be00 move a0, s5 | a0 = s5;
0x0040be04 move a1, zero | a1 = 0;
0x0040be08 addiu a2, zero, 0x40 | a2 = 0x40;
0x0040be0c jalr t9 | t9 ();
0x0040be10 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040be14 addiu v0, sp, 0x60 | v0 = sp + 0x60;
0x0040be18 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040be1c move a0, v0 | a0 = v0;
0x0040be20 move a1, zero | a1 = 0;
0x0040be24 addiu a2, zero, 0x40 | a2 = 0x40;
0x0040be28 sw v0, 0x10c(sp) | *(var_10ch) = v0;
0x0040be2c jalr t9 | t9 ();
0x0040be30 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040be34 addiu v1, sp, 0x20 | v1 = sp + 0x20;
0x0040be38 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040be3c move a0, v1 | a0 = v1;
0x0040be40 sw v1, 0x108(sp) | *(var_108h) = v1;
0x0040be44 move a1, zero | a1 = 0;
0x0040be48 addiu a2, zero, 0x40 | a2 = 0x40;
0x0040be4c jalr t9 | t9 ();
0x0040be50 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040be54 lw a0, 0x104(sp) | a0 = *(var_104h);
0x0040be58 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040be5c addiu s4, sp, 0x100 | s4 = sp + 0x100;
0x0040be60 lui a1, 0x42 | a1 = "ssid";
| /* str.ssid */
0x0040be64 addiu a1, a1, -0x7d50 |
0x0040be68 move a2, s4 | a2 = s4;
0x0040be6c jalr t9 | t9 ();
0x0040be70 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040be74 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040be78 lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040be7c addiu a1, zero, 6 | a1 = 6;
0x0040be80 jalr t9 | t9 ();
0x0040be84 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040be88 bnez v0, 0x40be9c |
0x0040be8c lui a1, 0x42 | a1 = 0x420000;
0x0040be90 move a0, zero | a0 = 0;
0x0040be94 j 0x40bfe8 | goto label_1;
| /* str.ssid_is_not_a_string_n */
0x0040be98 addiu a1, a1, -0x7d48 | a1 += -0x7d48;
| }
0x0040be9c lw t9, -0x7dfc(gp) | t9 = sym.imp.json_object_get_string;
0x0040bea0 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040bea4 jalr t9 | t9 ();
0x0040bea8 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040beac move a0, v0 | a0 = v0;
0x0040beb0 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040beb4 move s0, v0 | s0 = v0;
0x0040beb8 jalr t9 | t9 ();
0x0040bebc sltiu v1, v0, 0x40 | v1 = (v0 < 0x40) ? 1 : 0;
0x0040bec0 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040bec4 move a2, v0 | a2 = v0;
| if (v1 == 0) {
0x0040bec8 bnez v1, 0x40bee8 |
0x0040becc lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040bed0 lui a1, 0x42 | a1 = 0x420000;
0x0040bed4 addiu a0, zero, 1 | a0 = 1;
| /* str.ssid_too_long._n */
0x0040bed8 addiu a1, a1, -0x7d30 | a1 += -0x7d30;
0x0040bedc jalr t9 | t9 ();
0x0040bee0 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040bee4 addiu a2, zero, 0x3f | a2 = 0x3f;
| }
0x0040bee8 lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
0x0040beec move a0, s5 | a0 = s5;
0x0040bef0 move a1, s0 | a1 = s0;
0x0040bef4 jalr t9 | t9 ();
0x0040bef8 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040befc lui a1, 0x42 | a1 = 0x420000;
0x0040bf00 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040bf04 addiu a0, zero, 3 | a0 = 3;
| /* str.ssid_s_n */
0x0040bf08 addiu a1, a1, -0x7d20 | a1 += -0x7d20;
0x0040bf0c move a2, s5 | a2 = s5;
0x0040bf10 jalr t9 | t9 ();
0x0040bf14 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040bf18 lw a0, 0x104(sp) | a0 = *(var_104h);
0x0040bf1c lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040bf20 lui a1, 0x41 | a1 = 0x417ee8;
| /* esilref: 'uid' */
0x0040bf24 addiu a1, a1, 0x7ee8 |
0x0040bf28 move a2, s4 | a2 = s4;
0x0040bf2c jalr t9 | t9 ();
0x0040bf30 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0040bf34 beqz v0, 0x40bf90 |
0x0040bf38 lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040bf3c lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040bf40 addiu a1, zero, 3 | a1 = 3;
0x0040bf44 jalr t9 | t9 ();
0x0040bf48 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040bf4c beqz v0, 0x40bf90 | goto label_2;
| }
0x0040bf50 lw t9, -0x7d34(gp) | t9 = sym.imp.json_object_get_int64;
0x0040bf54 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040bf58 jalr t9 | t9 ();
0x0040bf5c lw gp, 0x18(sp) | gp = *(var_18h);
0x0040bf60 lui a1, 0x42 | a1 = 0x420000;
0x0040bf64 lw a0, -0x7f28(gp) | a0 = *(gp);
0x0040bf68 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040bf6c sw v0, 0x2e8(a0) | *((a0 + 186)) = v0;
0x0040bf70 sw v1, 0x2ec(a0) | *((a0 + 187)) = v1;
| /* str.uid_llu_n */
0x0040bf74 addiu a1, a1, -0x7d14 | a1 += -0x7d14;
0x0040bf78 addiu a0, zero, 3 | a0 = 3;
0x0040bf7c move a2, v0 | a2 = v0;
0x0040bf80 move a3, v1 | a3 = v1;
0x0040bf84 jalr t9 | t9 ();
0x0040bf88 j 0x40bfa8 | goto label_3;
0x0040bf8c lw gp, 0x18(sp) | gp = *(var_18h);
| }
| label_2:
0x0040bf90 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040bf94 lui a1, 0x42 | a1 = 0x420000;
0x0040bf98 addiu a0, zero, 1 | a0 = 1;
| /* str.uid_not_found__or_uid_not_int._n */
0x0040bf9c addiu a1, a1, -0x7d08 | a1 += -0x7d08;
0x0040bfa0 jalr t9 | t9 ();
0x0040bfa4 lw gp, 0x18(sp) | gp = *(var_18h);
| label_3:
0x0040bfa8 lw a0, 0x104(sp) | a0 = *(var_104h);
0x0040bfac lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040bfb0 lui a1, 0x42 | a1 = "passwd";
| /* str.passwd */
0x0040bfb4 addiu a1, a1, -0x7ce8 |
0x0040bfb8 move a2, s4 | a2 = s4;
0x0040bfbc jalr t9 | t9 ();
0x0040bfc0 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040bfc4 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040bfc8 lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040bfcc addiu a1, zero, 6 | a1 = 6;
0x0040bfd0 jalr t9 | t9 ();
0x0040bfd4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0040bfd8 bnez v0, 0x40c000 | goto label_4;
| }
0x0040bfdc lui a1, 0x42 | a1 = 0x420000;
0x0040bfe0 addiu a0, zero, 3 | a0 = 3;
| /* str.passwd_is_not_a_string_n */
0x0040bfe4 addiu a1, a1, -0x7ce0 | a1 += -0x7ce0;
| label_1:
0x0040bfe8 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040bfec jalr t9 | t9 ();
0x0040bff0 nop |
0x0040bff4 lw gp, 0x18(sp) | gp = *(var_18h);
| do {
0x0040bff8 j 0x40c550 | goto label_5;
0x0040bffc addiu s0, zero, -1 | s0 = -1;
| label_4:
0x0040c000 lw t9, -0x7dfc(gp) | t9 = sym.imp.json_object_get_string;
0x0040c004 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040c008 jalr t9 | t9 ();
0x0040c00c lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c010 move a0, v0 | a0 = v0;
0x0040c014 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040c018 move s0, v0 | s0 = v0;
0x0040c01c jalr t9 | t9 ();
0x0040c020 sltiu v1, v0, 0x40 | v1 = (v0 < 0x40) ? 1 : 0;
0x0040c024 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c028 move a2, v0 | a2 = v0;
| if (v1 == 0) {
0x0040c02c bnez v1, 0x40c04c |
0x0040c030 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c034 lui a1, 0x42 | a1 = 0x420000;
0x0040c038 addiu a0, zero, 1 | a0 = 1;
| /* str.passwd_too_long._n */
0x0040c03c addiu a1, a1, -0x7cc8 | a1 += -0x7cc8;
0x0040c040 jalr t9 | t9 ();
0x0040c044 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c048 addiu a2, zero, 0x3f | a2 = 0x3f;
| }
0x0040c04c lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
0x0040c050 addiu a0, sp, 0x60 | a0 = sp + 0x60;
0x0040c054 move a1, s0 | a1 = s0;
0x0040c058 jalr t9 | t9 ();
0x0040c05c lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c060 lw a0, 0x104(sp) | a0 = *(var_104h);
0x0040c064 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040c068 lui a1, 0x42 | a1 = "bind_key";
| /* str.bind_key */
0x0040c06c addiu a1, a1, -0x7cb4 |
0x0040c070 move a2, s4 | a2 = s4;
0x0040c074 jalr t9 | t9 ();
0x0040c078 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c07c lw s2, -0x7f28(gp) | s2 = *(gp);
| if (v0 == 0) {
0x0040c080 beqz v0, 0x40c11c | goto label_6;
| }
0x0040c084 lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040c088 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040c08c addiu a1, zero, 6 | a1 = 6;
0x0040c090 jalr t9 | t9 ();
0x0040c094 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040c098 beqz v0, 0x40c11c | goto label_6;
| }
0x0040c09c lw t9, -0x7dfc(gp) | t9 = sym.imp.json_object_get_string;
0x0040c0a0 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040c0a4 jalr t9 | t9 ();
0x0040c0a8 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c0ac move a0, v0 | a0 = v0;
0x0040c0b0 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040c0b4 move s1, v0 | s1 = v0;
0x0040c0b8 jalr t9 | t9 ();
0x0040c0bc lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c0c0 addiu s3, v0, 1 | s3 = v0 + 1;
0x0040c0c4 lw t9, -0x7d14(gp) | t9 = sym.imp.malloc;
0x0040c0c8 move a0, s3 | a0 = s3;
0x0040c0cc move s0, v0 | s0 = v0;
0x0040c0d0 jalr t9 | t9 ();
0x0040c0d4 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c0d8 sw v0, 0x39c(s2) | *((s2 + 231)) = v0;
| if (v0 != 0) {
0x0040c0dc bnez v0, 0x40c100 | goto label_7;
| }
0x0040c0e0 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c0e4 lui a1, 0x42 | a1 = 0x420000;
0x0040c0e8 move a0, zero | a0 = 0;
| /* str.malloc_length__d__error:__m_n */
0x0040c0ec addiu a1, a1, -0x7ca8 | a1 += -0x7ca8;
0x0040c0f0 move a2, s3 | a2 = s3;
0x0040c0f4 jalr t9 | t9 ();
0x0040c0f8 j 0x40bff8 |
| } while (1);
0x0040c0fc lw gp, 0x18(sp) | gp = *(var_18h);
| label_7:
0x0040c100 lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
0x0040c104 move a0, v0 | a0 = v0;
0x0040c108 move a1, s1 | a1 = s1;
0x0040c10c move a2, s0 | a2 = s0;
0x0040c110 jalr t9 | t9 ();
0x0040c114 j 0x40c134 | goto label_8;
0x0040c118 lw gp, 0x18(sp) | gp = *(var_18h);
| label_6:
0x0040c11c lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c120 lui a1, 0x42 | a1 = 0x420000;
0x0040c124 addiu a0, zero, 3 | a0 = 3;
| /* str.bind_key_is_not_a_string_n */
0x0040c128 addiu a1, a1, -0x7c88 | a1 += -0x7c88;
0x0040c12c jalr t9 | t9 ();
0x0040c130 lw gp, 0x18(sp) | gp = *(var_18h);
| label_8:
0x0040c134 lw a0, 0x104(sp) | a0 = *(var_104h);
0x0040c138 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040c13c lui a1, 0x42 | a1 = "country_domain";
| /* str.country_domain */
0x0040c140 addiu a1, a1, -0x7c6c |
0x0040c144 move a2, s4 | a2 = s4;
0x0040c148 jalr t9 | t9 ();
0x0040c14c lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c150 move s6, v0 | s6 = v0;
0x0040c154 lw v0, -0x7f28(gp) | v0 = *(gp);
0x0040c158 addiu s1, s2, 0x224 | s1 = s2 + 0x224;
0x0040c15c lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040c160 sw zero, 0x21c(s2) | *((s2 + 135)) = 0;
0x0040c164 move a0, s1 | a0 = s1;
0x0040c168 move a1, zero | a1 = 0;
0x0040c16c addiu a2, zero, 0x20 | a2 = 0x20;
0x0040c170 sw zero, 0x220(v0) | *((v0 + 136)) = 0;
0x0040c174 jalr t9 | t9 ();
0x0040c178 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c17c addiu s0, s2, 0x244 | s0 = s2 + 0x244;
0x0040c180 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040c184 move a0, s0 | a0 = s0;
0x0040c188 move a1, zero | a1 = 0;
0x0040c18c addiu a2, zero, 0x20 | a2 = 0x20;
0x0040c190 jalr t9 | t9 ();
0x0040c194 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c198 lui a1, 0x41 | a1 = 0x410000;
0x0040c19c lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
0x0040c1a0 move a0, s1 | a0 = s1;
| /* str.ott.io.mi.com */
0x0040c1a4 addiu a1, a1, 0x67a4 | a1 += 0x67a4;
0x0040c1a8 addiu a2, zero, 0xd | a2 = 0xd;
0x0040c1ac jalr t9 | t9 ();
0x0040c1b0 lui v1, 0x41 | v1 = 0x410000;
0x0040c1b4 lw v0, 0x67b4(v1) | v0 = *((v1 + 6637));
| /* str.ot.io.mi.com */
0x0040c1b8 addiu v1, v1, 0x67b4 | v1 += 0x67b4;
0x0040c1bc lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c1c0 sw v0, 0x244(s2) | *((s2 + 145)) = v0;
0x0040c1c4 lw v0, 4(v1) | v0 = *((v1 + 1));
0x0040c1c8 addiu s3, sp, 0xe0 | s3 = sp + 0xe0;
0x0040c1cc sw v0, 4(s0) | *((s0 + 1)) = v0;
0x0040c1d0 lw v0, 8(v1) | v0 = *((v1 + 2));
0x0040c1d4 sw v0, 8(s0) | *((s0 + 2)) = v0;
| if (s6 != 0) {
0x0040c1d8 beqz s6, 0x40c38c |
0x0040c1dc lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040c1e0 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040c1e4 addiu a1, zero, 6 | a1 = 6;
0x0040c1e8 jalr t9 | t9 ();
0x0040c1ec lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040c1f0 beqz v0, 0x40c38c | goto label_9;
| }
0x0040c1f4 lw t9, -0x7dfc(gp) | t9 = sym.imp.json_object_get_string;
0x0040c1f8 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040c1fc jalr t9 | t9 ();
0x0040c200 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c204 move a0, v0 | a0 = v0;
0x0040c208 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040c20c move s6, v0 | s6 = v0;
0x0040c210 jalr t9 | t9 ();
0x0040c214 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c218 move a0, s1 | a0 = s1;
0x0040c21c lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040c220 move fp, v0 | fp = v0;
0x0040c224 jalr t9 | t9 ();
0x0040c228 move a3, v0 | a3 = v0;
0x0040c22c sltiu v0, fp, 8 | v0 = (fp < 8) ? 1 : 0;
0x0040c230 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040c234 bnez v0, 0x40c25c |
0x0040c238 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c23c lui a1, 0x42 | a1 = 0x420000;
0x0040c240 addiu a0, zero, 1 | a0 = 1;
| /* str.country_domain_too_long:__d___8_n */
0x0040c244 addiu a1, a1, -0x7c5c | a1 += -0x7c5c;
0x0040c248 move a2, fp | a2 = fp;
0x0040c24c sw a3, 0x110(sp) | *(var_110h) = a3;
0x0040c250 jalr t9 | t9 ();
0x0040c254 j 0x40c28c | goto label_10;
0x0040c258 lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x0040c25c lw a0, -0x7f28(gp) | a0 = *(gp);
| if (fp > 0) {
0x0040c260 blez fp, 0x40c290 |
0x0040c264 lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
0x0040c268 addiu a0, a0, 0x21c | a0 += 0x21c;
0x0040c26c move a1, s6 | a1 = s6;
0x0040c270 move a2, fp | a2 = fp;
0x0040c274 sw a3, 0x110(sp) | *(var_110h) = a3;
0x0040c278 jalr t9 | t9 ();
0x0040c27c lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c280 lw v0, -0x7f28(gp) | v0 = *(gp);
0x0040c284 addu v0, v0, fp | v0 += fp;
0x0040c288 sb zero, 0x21c(v0) | *((v0 + 540)) = 0;
| label_10:
0x0040c28c lw a3, 0x110(sp) | a3 = *(var_110h);
| }
0x0040c290 addu v0, fp, a3 | v0 = fp + a3;
0x0040c294 sltiu v0, v0, 0x20 | v0 = (v0 < 0x20) ? 1 : 0;
0x0040c298 lw t9, -0x7d04(gp) | t9 = sym.imp.snprintf;
| if (v0 == 0) {
0x0040c29c bnez v0, 0x40c2c0 |
0x0040c2a0 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c2a4 lui a1, 0x42 | a1 = 0x420000;
0x0040c2a8 move a0, zero | a0 = 0;
| /* str.host_length_too_long:__d___d___32_n */
0x0040c2ac addiu a1, a1, -0x7c38 | a1 += -0x7c38;
0x0040c2b0 move a2, fp | a2 = fp;
0x0040c2b4 jalr t9 | t9 ();
0x0040c2b8 j 0x40c3a4 | goto label_11;
0x0040c2bc lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x0040c2c0 lui fp, 0x41 | fp = 0x410000;
0x0040c2c4 move a3, s6 | a3 = s6;
0x0040c2c8 addiu a1, zero, 0x20 | a1 = 0x20;
| /* str._s._s */
0x0040c2cc addiu a2, fp, 0x679c | a2 = fp + 0x679c;
0x0040c2d0 move a0, s3 | a0 = s3;
0x0040c2d4 sw s1, 0x10(sp) | *(var_10h) = s1;
0x0040c2d8 jalr t9 | t9 ();
0x0040c2dc lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c2e0 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040c2e4 move a0, s3 | a0 = s3;
0x0040c2e8 jalr t9 | t9 ();
0x0040c2ec lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c2f0 move a0, s1 | a0 = s1;
0x0040c2f4 lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
0x0040c2f8 move a1, s3 | a1 = s3;
0x0040c2fc move a2, v0 | a2 = v0;
0x0040c300 jalr t9 | t9 ();
0x0040c304 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c308 lui a1, 0x42 | a1 = 0x420000;
0x0040c30c lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c310 addiu a0, zero, 2 | a0 = 2;
| /* str.Add_country_domain_to_tcp_host:__s_n */
0x0040c314 addiu a1, a1, -0x7c10 | a1 += -0x7c10;
0x0040c318 move a2, s1 | a2 = s1;
0x0040c31c jalr t9 | t9 ();
0x0040c320 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c324 move a3, s6 | a3 = s6;
0x0040c328 lw t9, -0x7d04(gp) | t9 = sym.imp.snprintf;
0x0040c32c addiu a1, zero, 0x20 | a1 = 0x20;
| /* str._s._s */
0x0040c330 addiu a2, fp, 0x679c | a2 = fp + 0x679c;
0x0040c334 move a0, s3 | a0 = s3;
0x0040c338 sw s0, 0x10(sp) | *(var_10h) = s0;
0x0040c33c jalr t9 | t9 ();
0x0040c340 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c344 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040c348 move a0, s3 | a0 = s3;
0x0040c34c jalr t9 | t9 ();
0x0040c350 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c354 move a0, s0 | a0 = s0;
0x0040c358 lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
0x0040c35c move a1, s3 | a1 = s3;
0x0040c360 move a2, v0 | a2 = v0;
0x0040c364 jalr t9 | t9 ();
0x0040c368 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c36c lui a1, 0x42 | a1 = 0x420000;
0x0040c370 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c374 addiu a0, zero, 2 | a0 = 2;
| /* str.Add_country_domain_to_udp_host:__s_n */
0x0040c378 addiu a1, a1, -0x7bec | a1 += -0x7bec;
0x0040c37c move a2, s0 | a2 = s0;
0x0040c380 jalr t9 | t9 ();
0x0040c384 j 0x40c3a4 | goto label_11;
0x0040c388 lw gp, 0x18(sp) | gp = *(var_18h);
| }
| label_9:
0x0040c38c lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c390 lui a1, 0x42 | a1 = 0x420000;
0x0040c394 addiu a0, zero, 3 | a0 = 3;
| /* str.country_domain_is_not_a_string_n */
0x0040c398 addiu a1, a1, -0x7bc8 | a1 += -0x7bc8;
0x0040c39c jalr t9 | t9 ();
0x0040c3a0 lw gp, 0x18(sp) | gp = *(var_18h);
| label_11:
0x0040c3a4 lw a0, 0x104(sp) | a0 = *(var_104h);
0x0040c3a8 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040c3ac lui a1, 0x41 | a1 = 0x415bf8;
| /* esilref: 'tz' */
0x0040c3b0 addiu a1, a1, 0x5bf8 |
0x0040c3b4 move a2, s4 | a2 = s4;
0x0040c3b8 jalr t9 | t9 ();
0x0040c3bc lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0040c3c0 beqz v0, 0x40c484 |
0x0040c3c4 lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040c3c8 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040c3cc addiu a1, zero, 6 | a1 = 6;
0x0040c3d0 jalr t9 | t9 ();
0x0040c3d4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040c3d8 beqz v0, 0x40c484 | goto label_12;
| }
0x0040c3dc lw t9, -0x7dfc(gp) | t9 = sym.imp.json_object_get_string;
0x0040c3e0 lw a0, 0x100(sp) | a0 = *(var_100h);
0x0040c3e4 jalr t9 | t9 ();
0x0040c3e8 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c3ec move a0, v0 | a0 = v0;
0x0040c3f0 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040c3f4 move s0, v0 | s0 = v0;
0x0040c3f8 jalr t9 | t9 ();
0x0040c3fc move s1, v0 | s1 = v0;
0x0040c400 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x0040c404 bnez v0, 0x40c424 |
0x0040c408 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c40c lui a1, 0x42 | a1 = 0x420000;
0x0040c410 addiu a0, zero, 1 | a0 = 1;
| /* str.tz_is_NULL._n */
0x0040c414 addiu a1, a1, -0x7ba8 | a1 += -0x7ba8;
0x0040c418 jalr t9 | t9 ();
0x0040c41c j 0x40c44c | goto label_13;
0x0040c420 lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x0040c424 sltiu v0, v0, 0x40 | v0 = (v0 < 0x40) ? 1 : 0;
0x0040c428 lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
| if (v0 == 0) {
0x0040c42c bnez v0, 0x40c450 |
0x0040c430 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c434 lui a1, 0x42 | a1 = 0x420000;
0x0040c438 addiu a0, zero, 1 | a0 = 1;
| /* str.tz_too_long._n */
0x0040c43c addiu a1, a1, -0x7b98 | a1 += -0x7b98;
0x0040c440 jalr t9 | t9 ();
0x0040c444 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c448 addiu s1, zero, 0x3f | s1 = 0x3f;
| label_13:
0x0040c44c lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
| }
0x0040c450 addiu a0, sp, 0x20 | a0 = sp + 0x20;
0x0040c454 move a1, s0 | a1 = s0;
0x0040c458 move a2, s1 | a2 = s1;
0x0040c45c jalr t9 | t9 ();
0x0040c460 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c464 lui a1, 0x42 | a1 = 0x420000;
0x0040c468 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c46c addiu a0, zero, 3 | a0 = 3;
| /* str.tz_s_n */
0x0040c470 addiu a1, a1, -0x7b88 | a1 += -0x7b88;
0x0040c474 addiu a2, sp, 0x20 | a2 = sp + 0x20;
0x0040c478 jalr t9 | t9 ();
0x0040c47c j 0x40c49c | goto label_14;
0x0040c480 lw gp, 0x18(sp) | gp = *(var_18h);
| }
| label_12:
0x0040c484 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c488 lui a1, 0x42 | a1 = 0x420000;
0x0040c48c move a0, zero | a0 = 0;
| /* str.tz_is_not_a_string_n */
0x0040c490 addiu a1, a1, -0x7b80 | a1 += -0x7b80;
0x0040c494 jalr t9 | t9 ();
0x0040c498 lw gp, 0x18(sp) | gp = *(var_18h);
| label_14:
0x0040c49c lw a0, -0x7f28(gp) | a0 = *(gp);
0x0040c4a0 lw t9, -0x7f58(gp) | t9 = sym.method_local_broadcast_msg;
0x0040c4a4 lui a1, 0x42 | a1 = "{\"method\": \"local.status\", \"params\": \"wifi_connecting\"}";
| /* str._method_:__local.status____params_:__wifi_connecting_ */
0x0040c4a8 addiu a1, a1, -0x7b6c |
0x0040c4ac jalr t9 | t9 ();
0x0040c4b0 lw gp, 0x18(sp) | gp = *(var_18h);
0x0040c4b4 lw a0, 0x140(sp) | a0 = *(arg_140h);
0x0040c4b8 lw t9, -0x7fb8(gp) | t9 = sym.json_verify_get_int;
0x0040c4bc lui a1, 0x41 | a1 = 0x41527c;
| /* esilref: 'id' */
0x0040c4c0 addiu a1, a1, 0x527c |
0x0040c4c4 move a2, s3 | a2 = s3;
0x0040c4c8 jalr t9 | t9 ();
0x0040c4cc move s0, v0 | s0 = v0;
0x0040c4d0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 >= 0) {
0x0040c4d4 bltz v0, 0x40c52c |
0x0040c4d8 lw v1, 0x148(sp) | v1 = *(arg_148h);
0x0040c4dc sltiu v0, v1, 0x24 | v0 = (v1 < 0x24) ? 1 : 0;
| if (v0 != 0) {
0x0040c4e0 beql v0, zero, 0x40c510 |
0x0040c4e4 lui a1, 0x42 | a1 = 0x420000;
0x0040c4e8 lui a1, 0x41 | a1 = 0x410000;
0x0040c4ec lui a2, 0x41 | a2 = 0x410000;
0x0040c4f0 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c4f4 move a0, zero | a0 = 0;
| /* str.json_string_too_long.__s__line__d_n */
0x0040c4f8 addiu a1, a1, 0x7eec | a1 += 0x7eec;
| /* str.miio_misc.c */
0x0040c4fc addiu a2, a2, 0x7f10 | a2 += 0x7f10;
0x0040c500 addiu a3, zero, 0x104 | a3 = 0x104;
0x0040c504 jalr t9 | t9 ();
0x0040c508 j 0x40c524 | goto label_15;
0x0040c50c nop |
| }
0x0040c510 lw a0, 0x144(sp) | a0 = *(arg_144h);
0x0040c514 lw a2, 0xe0(sp) | a2 = *(var_e0h);
0x0040c518 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
| /* str._id_:_d__result_:__OK__ */
0x0040c51c addiu a1, a1, -0x7b34 | a1 += -0x7b34;
0x0040c520 jalr t9 | t9 ();
| label_15:
0x0040c524 j 0x40c534 | goto label_16;
0x0040c528 lw a2, 0x2e8(s2) | a2 = *((s2 + 186));
| }
0x0040c52c move s0, zero | s0 = 0;
0x0040c530 lw a2, 0x2e8(s2) | a2 = *((s2 + 186));
| label_16:
0x0040c534 lw a3, 0x2ec(s2) | a3 = *((s2 + 187));
0x0040c538 addiu v0, sp, 0x20 | v0 = sp + 0x20;
0x0040c53c sw v0, 0x10(sp) | *(var_10h) = v0;
0x0040c540 move a0, s5 | a0 = s5;
0x0040c544 addiu a1, sp, 0x60 | a1 = sp + 0x60;
0x0040c548 jal 0x40bbbc | fcn_0040bbbc ();
0x0040c54c lw gp, 0x18(sp) | gp = *(var_18h);
| label_5:
0x0040c550 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040c554 move a0, s7 | a0 = s7;
0x0040c558 jalr t9 | t9 ();
0x0040c55c move v0, s0 | v0 = s0;
| label_0:
0x0040c560 lw ra, 0x13c(sp) | ra = *(var_13ch);
0x0040c564 lw fp, 0x138(sp) | fp = *(var_138h);
0x0040c568 lw s7, 0x134(sp) | s7 = *(var_134h);
0x0040c56c lw s6, 0x130(sp) | s6 = *(var_130h);
0x0040c570 lw s5, 0x12c(sp) | s5 = *(var_12ch);
0x0040c574 lw s4, 0x128(sp) | s4 = *(var_128h);
0x0040c578 lw s3, 0x124(sp) | s3 = *(var_124h);
0x0040c57c lw s2, 0x120(sp) | s2 = *(var_120h);
0x0040c580 lw s1, 0x11c(sp) | s1 = *(var_11ch);
0x0040c584 lw s0, 0x118(sp) | s0 = *(var_118h);
0x0040c588 addiu sp, sp, 0x140 |
0x0040c58c jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40ccec */
| #include <stdint.h>
|
; (fcn) sym.method_miio_config_tz () | void method_miio_config_tz () {
0x0040ccec lui gp, 0x43 |
0x0040ccf0 lui v0, 0x42 | v0 = 0x420000;
0x0040ccf4 addiu gp, gp, 0x1620 | gp += 0x1620;
0x0040ccf8 lhu v0, -0x7840(v0) | v0 = *((v0 - 15392));
0x0040ccfc addiu sp, sp, -0x88 |
0x0040cd00 lw t9, -0x7de0(gp) | t9 = sym.imp.memset;
0x0040cd04 sw ra, 0x84(sp) | *(var_84h) = ra;
0x0040cd08 sw s4, 0x7c(sp) | *(var_7ch) = s4;
0x0040cd0c sw s2, 0x74(sp) | *(var_74h) = s2;
0x0040cd10 sw s1, 0x70(sp) | *(var_70h) = s1;
0x0040cd14 sw s0, 0x6c(sp) | *(var_6ch) = s0;
0x0040cd18 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040cd1c move s4, a0 | s4 = a0;
0x0040cd20 sw s5, 0x80(sp) | *(var_80h) = s5;
0x0040cd24 addiu a0, sp, 0x1a | a0 = sp + 0x1a;
0x0040cd28 sw s3, 0x78(sp) | *(var_78h) = s3;
0x0040cd2c move s2, a1 | s2 = a1;
0x0040cd30 move s1, a2 | s1 = a2;
0x0040cd34 move a1, zero | a1 = 0;
0x0040cd38 addiu a2, zero, 0x3e | a2 = 0x3e;
0x0040cd3c sh v0, 0x18(sp) | *(var_18h) = v0;
0x0040cd40 jalr t9 | t9 ();
0x0040cd44 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cd48 lui a1, 0x41 | a1 = 0x410000;
0x0040cd4c lw t9, -0x7fb8(gp) | t9 = sym.json_verify_get_int;
0x0040cd50 sw zero, 0x58(sp) | *(var_58h) = 0;
0x0040cd54 move a0, s4 | a0 = s4;
| /* esilref: 'id' */
0x0040cd58 addiu a1, a1, 0x527c | a1 += 0x527c;
0x0040cd5c addiu a2, sp, 0x58 | a2 = sp + 0x58;
0x0040cd60 jalr t9 | t9 ();
0x0040cd64 move s0, v0 | s0 = v0;
0x0040cd68 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x0040cd6c bgez v0, 0x40cd8c |
0x0040cd70 lui a1, 0x41 | a1 = 0x410000;
0x0040cd74 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040cd78 move a0, zero | a0 = 0;
| /* str.json_verify_get_int_fail_n */
0x0040cd7c addiu a1, a1, 0x5aa4 | a1 += 0x5aa4;
0x0040cd80 jalr t9 | t9 ();
0x0040cd84 j 0x40d064 | goto label_0;
0x0040cd88 move v0, s0 | v0 = s0;
| }
0x0040cd8c sltiu s1, s1, 0x2a | s1 = (s1 < 0x2a) ? 1 : 0;
0x0040cd90 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
| if (s1 != 0) {
0x0040cd94 beqz s1, 0x40cdc0 |
0x0040cd98 lui a1, 0x41 | a1 = 0x410000;
0x0040cd9c lui a2, 0x41 | a2 = 0x410000;
0x0040cda0 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040cda4 move a0, zero | a0 = 0;
| /* str.json_string_too_long.__s__line__d_n */
0x0040cda8 addiu a1, a1, 0x7eec | a1 += 0x7eec;
| /* str.miio_misc.c */
0x0040cdac addiu a2, a2, 0x7f10 | a2 += 0x7f10;
0x0040cdb0 addiu a3, zero, 0x1d8 | a3 = 0x1d8;
0x0040cdb4 jalr t9 | t9 ();
0x0040cdb8 j 0x40cf5c | goto label_1;
0x0040cdbc nop |
| }
0x0040cdc0 lw a2, 0x58(sp) | a2 = *(var_58h);
0x0040cdc4 lui s3, 0x42 | s3 = 0x420000;
0x0040cdc8 lui a3, 0x42 | a3 = 0x420000;
| /* str._id_:_d__result_:___s__ */
0x0040cdcc addiu a1, s3, -0x79c4 | a1 = s3 + -0x79c4;
| /* str.ERROR */
0x0040cdd0 addiu a3, a3, -0x79a8 | a3 += -0x79a8;
0x0040cdd4 move a0, s2 | a0 = s2;
0x0040cdd8 jalr t9 | t9 ();
0x0040cddc lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cde0 addu v0, s2, v0 | v0 = s2 + v0;
0x0040cde4 lw t9, -0x7d40(gp) | t9 = sym.imp.json_tokener_parse;
0x0040cde8 move a0, s4 | a0 = s4;
0x0040cdec sb zero, (v0) | *(v0) = 0;
0x0040cdf0 jalr t9 | t9 ();
0x0040cdf4 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cdf8 lui a1, 0x41 | a1 = 0x410000;
0x0040cdfc lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040ce00 move a0, v0 | a0 = v0;
| /* str.params */
0x0040ce04 addiu a1, a1, 0x56c4 | a1 += 0x56c4;
0x0040ce08 addiu a2, sp, 0x60 | a2 = sp + 0x60;
0x0040ce0c move s1, v0 | s1 = v0;
0x0040ce10 jalr t9 | t9 ();
0x0040ce14 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x0040ce18 beqz v0, 0x40cf50 |
0x0040ce1c lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040ce20 lw a0, 0x60(sp) | a0 = *(var_60h);
0x0040ce24 lui a1, 0x41 | a1 = 0x415bf8;
| /* esilref: 'tz' */
0x0040ce28 addiu a1, a1, 0x5bf8 |
0x0040ce2c addiu a2, sp, 0x5c | a2 = sp + 0x5c;
0x0040ce30 jalr t9 | t9 ();
0x0040ce34 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040ce38 lw a0, 0x5c(sp) | a0 = *(var_5ch);
0x0040ce3c lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040ce40 addiu a1, zero, 6 | a1 = 6;
0x0040ce44 jalr t9 | t9 ();
0x0040ce48 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x0040ce4c beqz v0, 0x40cf38 |
0x0040ce50 lw t9, -0x7dfc(gp) | t9 = sym.imp.json_object_get_string;
0x0040ce54 lw a0, 0x5c(sp) | a0 = *(var_5ch);
0x0040ce58 jalr t9 | t9 ();
0x0040ce5c lw gp, 0x10(sp) | gp = *(var_10h);
0x0040ce60 move a0, v0 | a0 = v0;
0x0040ce64 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040ce68 move s4, v0 | s4 = v0;
0x0040ce6c jalr t9 | t9 ();
0x0040ce70 move a2, v0 | a2 = v0;
0x0040ce74 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0040ce78 bnez v0, 0x40ce98 |
0x0040ce7c lui a1, 0x42 | a1 = 0x420000;
0x0040ce80 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040ce84 move a0, zero | a0 = 0;
| /* str.tz_is_NULL._n */
0x0040ce88 addiu a1, a1, -0x7ba8 | a1 += -0x7ba8;
0x0040ce8c jalr t9 | t9 ();
0x0040ce90 j 0x40cf5c | goto label_1;
0x0040ce94 nop |
| }
0x0040ce98 sltiu v0, v0, 0x40 | v0 = (v0 < 0x40) ? 1 : 0;
0x0040ce9c lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
| if (v0 == 0) {
0x0040cea0 bnez v0, 0x40cec4 |
0x0040cea4 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040cea8 lui a1, 0x42 | a1 = 0x420000;
0x0040ceac addiu a0, zero, 1 | a0 = 1;
| /* str.tz_too_long._n */
0x0040ceb0 addiu a1, a1, -0x7b98 | a1 += -0x7b98;
0x0040ceb4 jalr t9 | t9 ();
0x0040ceb8 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cebc addiu a2, zero, 0x3f | a2 = 0x3f;
0x0040cec0 lw t9, -0x7d0c(gp) | t9 = sym.imp.memcpy;
| }
0x0040cec4 addiu s0, sp, 0x18 | s0 = sp + 0x18;
0x0040cec8 move a0, s0 | a0 = s0;
0x0040cecc move a1, s4 | a1 = s4;
0x0040ced0 jalr t9 | t9 ();
0x0040ced4 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040ced8 lui a1, 0x42 | a1 = 0x420000;
0x0040cedc lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
| /* str.tz_s_n */
0x0040cee0 addiu a1, a1, -0x7b88 | a1 += -0x7b88;
0x0040cee4 move a2, s0 | a2 = s0;
0x0040cee8 addiu a0, zero, 3 | a0 = 3;
0x0040ceec jalr t9 | t9 ();
0x0040cef0 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cef4 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040cef8 move a0, s1 | a0 = s1;
0x0040cefc jalr t9 | t9 ();
0x0040cf00 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cf04 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040cf08 move a0, s0 | a0 = s0;
0x0040cf0c jalr t9 | t9 ();
0x0040cf10 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cf14 lw t9, -0x7d14(gp) | t9 = sym.imp.malloc;
0x0040cf18 addiu a0, v0, 0x35 | a0 = v0 + 0x35;
0x0040cf1c jalr t9 | t9 ();
0x0040cf20 move s1, v0 | s1 = v0;
0x0040cf24 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cf28 addiu v0, zero, -1 | v0 = -1;
| if (s1 != 0) {
0x0040cf2c bnez s1, 0x40cf64 | goto label_2;
| }
0x0040cf30 j 0x40d068 | goto label_3;
0x0040cf34 lw ra, 0x84(sp) | ra = *(var_84h);
| }
0x0040cf38 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040cf3c lui a1, 0x42 | a1 = 0x420000;
0x0040cf40 move a0, zero | a0 = 0;
| /* str.tz_is_not_a_string_n */
0x0040cf44 addiu a1, a1, -0x7b80 | a1 += -0x7b80;
0x0040cf48 jalr t9 | t9 ();
0x0040cf4c lw gp, 0x10(sp) | gp = *(var_10h);
| }
0x0040cf50 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040cf54 move a0, s1 | a0 = s1;
0x0040cf58 jalr t9 | t9 ();
| label_1:
0x0040cf5c j 0x40d064 | goto label_0;
0x0040cf60 addiu v0, zero, -1 | v0 = -1;
| label_2:
0x0040cf64 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040cf68 lui a1, 0x42 | a1 = 0x420000;
0x0040cf6c move a2, s0 | a2 = s0;
0x0040cf70 move a0, s1 | a0 = s1;
| /* str._method_:__internal.config_tz___params_:_tz_:__s_ */
0x0040cf74 addiu a1, a1, -0x79a0 | a1 += -0x79a0;
0x0040cf78 jalr t9 | t9 ();
0x0040cf7c lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cf80 addu v0, s1, v0 | v0 = s1 + v0;
0x0040cf84 lw s4, -0x7f28(gp) | s4 = *(gp);
0x0040cf88 sb zero, (v0) | *(v0) = 0;
0x0040cf8c lw s0, 0x2d4(s4) | s0 = *((s4 + 181));
0x0040cf90 lui s5, 0x42 | s5 = 0x420000;
| if (s0 > 0) {
0x0040cf94 blez s0, 0x40d034 |
0x0040cf98 lw t9, -0x7e48(gp) | t9 = sym.imp.strlen;
0x0040cf9c move a0, s1 | a0 = s1;
0x0040cfa0 jalr t9 | t9 ();
0x0040cfa4 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cfa8 move a0, s0 | a0 = s0;
0x0040cfac lw t9, -0x7fc4(gp) | t9 = sym.general_send_one;
0x0040cfb0 move a1, s1 | a1 = s1;
0x0040cfb4 move a2, v0 | a2 = v0;
0x0040cfb8 jalr t9 | t9 ();
0x0040cfbc lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cfc0 lui a1, 0x42 | a1 = 0x420000;
0x0040cfc4 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040cfc8 move s0, v0 | s0 = v0;
0x0040cfcc addiu a0, zero, 2 | a0 = 2;
| /* str._s__:ret_is__d_n */
0x0040cfd0 addiu a1, a1, -0x7968 | a1 += -0x7968;
| /* str.method_miio_config_tz */
0x0040cfd4 addiu a2, s5, -0x777c | a2 = s5 + -0x777c;
0x0040cfd8 move a3, v0 | a3 = v0;
0x0040cfdc jalr t9 | t9 ();
0x0040cfe0 lw gp, 0x10(sp) | gp = *(var_10h);
| if (s0 < 0) {
0x0040cfe4 bgez s0, 0x40d004 |
0x0040cfe8 lw t9, -0x7fc0(gp) | t9 = sym.ot_agent_fd_close;
0x0040cfec lw a1, 0x2d4(s4) | a1 = *((s4 + 181));
0x0040cff0 move a0, s4 | a0 = s4;
0x0040cff4 jalr t9 | t9 ();
0x0040cff8 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040cffc j 0x40d054 | goto label_4;
0x0040d000 sw zero, 0x2d4(s4) | *((s4 + 181)) = 0;
| }
0x0040d004 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040d008 lw a2, 0x58(sp) | a2 = *(var_58h);
0x0040d00c lui a3, 0x42 | a3 = 0x420000;
0x0040d010 move a0, s2 | a0 = s2;
| /* str._id_:_d__result_:___s__ */
0x0040d014 addiu a1, s3, -0x79c4 | a1 = s3 + -0x79c4;
| /* esilref: 'OK' */
0x0040d018 addiu a3, a3, -0x7958 | a3 += -0x7958;
0x0040d01c jalr t9 | t9 ();
0x0040d020 addu s2, s2, v0 | s2 += v0;
0x0040d024 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d028 move s0, v0 | s0 = v0;
0x0040d02c j 0x40d054 | goto label_4;
0x0040d030 sb zero, (s2) | *(s2) = 0;
| }
0x0040d034 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040d038 lui a1, 0x42 | a1 = 0x420000;
0x0040d03c addiu a0, zero, 1 | a0 = 1;
| /* str._s__:No_helper_script__n */
0x0040d040 addiu a1, a1, -0x7954 | a1 += -0x7954;
| /* str.method_miio_config_tz */
0x0040d044 addiu a2, s5, -0x777c | a2 = s5 + -0x777c;
0x0040d048 jalr t9 | t9 ();
0x0040d04c lw gp, 0x10(sp) | gp = *(var_10h);
0x0040d050 addiu s0, zero, -1 | s0 = -1;
| label_4:
0x0040d054 lw t9, -0x7e6c(gp) | t9 = sym.imp.free;
0x0040d058 move a0, s1 | a0 = s1;
0x0040d05c jalr t9 | t9 ();
0x0040d060 move v0, s0 | v0 = s0;
| label_0:
0x0040d064 lw ra, 0x84(sp) | ra = *(var_84h);
| label_3:
0x0040d068 lw s5, 0x80(sp) | s5 = *(var_80h);
0x0040d06c lw s4, 0x7c(sp) | s4 = *(var_7ch);
0x0040d070 lw s3, 0x78(sp) | s3 = *(var_78h);
0x0040d074 lw s2, 0x74(sp) | s2 = *(var_74h);
0x0040d078 lw s1, 0x70(sp) | s1 = *(var_70h);
0x0040d07c lw s0, 0x6c(sp) | s0 = *(var_6ch);
0x0040d080 addiu sp, sp, 0x88 |
0x0040d084 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40c590 */
| #include <stdint.h>
|
; (fcn) sym.method_miio_wifi_assoc_state () | void method_miio_wifi_assoc_state () {
0x0040c590 lui gp, 0x43 |
0x0040c594 addiu gp, gp, 0x1620 |
0x0040c598 addiu sp, sp, -0x38 |
0x0040c59c lw v0, -0x7f28(gp) | v0 = *(gp);
0x0040c5a0 sw s3, 0x30(sp) | *(var_30h) = s3;
0x0040c5a4 sw s2, 0x2c(sp) | *(var_2ch) = s2;
0x0040c5a8 sw ra, 0x34(sp) | *(var_34h) = ra;
0x0040c5ac sw s1, 0x28(sp) | *(var_28h) = s1;
0x0040c5b0 sw s0, 0x24(sp) | *(var_24h) = s0;
0x0040c5b4 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040c5b8 lbu v0, 0x3a0(v0) | v0 = *((v0 + 928));
0x0040c5bc move s3, a1 | s3 = a1;
0x0040c5c0 move s2, a2 | s2 = a2;
| if (v0 == 0) {
0x0040c5c4 bnez v0, 0x40c5d4 |
0x0040c5c8 lui s0, 0x42 | s0 = 0x420000;
0x0040c5cc j 0x40c5dc | goto label_0;
| /* str.CONNECTING */
0x0040c5d0 addiu s0, s0, -0x7b10 | s0 += -0x7b10;
| }
0x0040c5d4 lui s0, 0x42 | s0 = "ONLINE";
| /* str.ONLINE */
0x0040c5d8 addiu s0, s0, -0x7b18 |
| label_0:
0x0040c5dc lw t9, -0x7d40(gp) | t9 = sym.imp.json_tokener_parse;
0x0040c5e0 jalr t9 | t9 ();
0x0040c5e4 nop |
0x0040c5e8 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040c5ec lui a1, 0x41 | a1 = 0x410000;
0x0040c5f0 lw t9, -0x7db8(gp) | t9 = sym.imp.json_object_object_get_ex;
0x0040c5f4 move a0, v0 | a0 = v0;
| /* esilref: 'id' */
0x0040c5f8 addiu a1, a1, 0x527c | a1 += 0x527c;
0x0040c5fc addiu a2, sp, 0x18 | a2 = sp + 0x18;
0x0040c600 move s1, v0 | s1 = v0;
0x0040c604 jalr t9 | t9 ();
0x0040c608 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040c60c lw a0, 0x18(sp) | a0 = *(var_18h);
0x0040c610 lw t9, -0x7e24(gp) | t9 = sym.imp.json_object_is_type;
0x0040c614 addiu a1, zero, 3 | a1 = 3;
0x0040c618 jalr t9 | t9 ();
0x0040c61c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0040c620 bnez v0, 0x40c644 |
0x0040c624 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c628 lui a1, 0x42 | a1 = 0x420000;
0x0040c62c move a0, zero | a0 = 0;
| /* str.can_not_get_id_n */
0x0040c630 addiu a1, a1, -0x7b04 | a1 += -0x7b04;
0x0040c634 jalr t9 | t9 ();
0x0040c638 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040c63c j 0x40c654 | goto label_1;
0x0040c640 addiu v0, zero, -1 | v0 = -1;
| }
0x0040c644 lw t9, -0x7d84(gp) | t9 = sym.imp.json_object_get_int;
0x0040c648 lw a0, 0x18(sp) | a0 = *(var_18h);
0x0040c64c jalr t9 | t9 ();
0x0040c650 lw gp, 0x10(sp) | gp = *(var_10h);
| label_1:
0x0040c654 sltiu s2, s2, 0xa1 | s2 = (s2 < 0xa1) ? 1 : 0;
0x0040c658 lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
| if (s2 != 0) {
0x0040c65c beqz s2, 0x40c698 |
0x0040c660 lw t9, -0x7fc8(gp) | t9 = sym.log_printf;
0x0040c664 lui a1, 0x41 | a1 = 0x410000;
0x0040c668 lui a2, 0x41 | a2 = 0x410000;
0x0040c66c move a0, zero | a0 = 0;
| /* str.json_string_too_long.__s__line__d_n */
0x0040c670 addiu a1, a1, 0x7eec | a1 += 0x7eec;
| /* str.miio_misc.c */
0x0040c674 addiu a2, a2, 0x7f10 | a2 += 0x7f10;
0x0040c678 addiu a3, zero, 0x133 | a3 = 0x133;
0x0040c67c jalr t9 | t9 ();
0x0040c680 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040c684 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040c688 move a0, s1 | a0 = s1;
0x0040c68c jalr t9 | t9 ();
0x0040c690 j 0x40c6c4 | goto label_2;
0x0040c694 addiu v0, zero, -1 | v0 = -1;
| }
0x0040c698 lui a1, 0x42 | a1 = 0x420000;
0x0040c69c move a0, s3 | a0 = s3;
| /* str._id_:_d__code_:0__message_:_ok___result_:_state_:__s___auth_fail_count_:0__conn_success_count_:1__conn_fail_count_:0__dhcp_fail_count_:0 */
0x0040c6a0 addiu a1, a1, -0x7af4 | a1 += -0x7af4;
0x0040c6a4 move a2, v0 | a2 = v0;
0x0040c6a8 move a3, s0 | a3 = s0;
0x0040c6ac jalr t9 | t9 ();
0x0040c6b0 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040c6b4 lw t9, -0x7e34(gp) | t9 = sym.imp.json_object_put;
0x0040c6b8 move a0, s1 | a0 = s1;
0x0040c6bc jalr t9 | t9 ();
0x0040c6c0 move v0, zero | v0 = 0;
| label_2:
0x0040c6c4 lw ra, 0x34(sp) | ra = *(var_34h);
0x0040c6c8 lw s3, 0x30(sp) | s3 = *(var_30h);
0x0040c6cc lw s2, 0x2c(sp) | s2 = *(var_2ch);
0x0040c6d0 lw s1, 0x28(sp) | s1 = *(var_28h);
0x0040c6d4 lw s0, 0x24(sp) | s0 = *(var_24h);
0x0040c6d8 addiu sp, sp, 0x38 |
0x0040c6dc jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/6225984-11075644.jffs2_new_extract/etc/miio_client/miio_client @ 0x40db84 */
| #include <stdint.h>
|
; (fcn) sym.str2hex () | void str2hex () {
0x0040db84 addiu sp, sp, -0x30 |
0x0040db88 lui gp, 0x43 |
0x0040db8c addiu gp, gp, 0x1620 |
0x0040db90 sw s1, 0x1c(sp) | *(var_1ch) = s1;
0x0040db94 lui s1, 0x42 | s1 = 0x420000;
0x0040db98 sw s4, 0x28(sp) | *(var_28h) = s4;
0x0040db9c sw s3, 0x24(sp) | *(var_24h) = s3;
0x0040dba0 sw s2, 0x20(sp) | *(var_20h) = s2;
0x0040dba4 sw s0, 0x18(sp) | *(var_18h) = s0;
0x0040dba8 sw ra, 0x2c(sp) | *(var_2ch) = ra;
0x0040dbac sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040dbb0 move s3, a0 | s3 = a0;
0x0040dbb4 move s4, a1 | s4 = a1;
0x0040dbb8 move s2, a2 | s2 = a2;
0x0040dbbc move s0, zero | s0 = 0;
| /* str._02x */
0x0040dbc0 addiu s1, s1, -0x7690 | s1 += -0x7690;
| do {
0x0040dbc4 addu v0, s4, s0 | v0 = s4 + s0;
| if (s0 == s2) {
0x0040dbc8 beq s0, s2, 0x40dbf0 | goto label_0;
| }
0x0040dbcc lw t9, -0x7e00(gp) | t9 = sym.imp.sprintf
0x0040dbd0 sll a0, s0, 1 | a0 = s0 << 1;
0x0040dbd4 lbu a2, (v0) | a2 = *(v0);
0x0040dbd8 addu a0, s3, a0 | a0 = s3 + a0;
0x0040dbdc move a1, s1 | a1 = s1;
0x0040dbe0 jalr t9 | t9 ();
0x0040dbe4 addiu s0, s0, 1 | s0++;
0x0040dbe8 j 0x40dbc4 |
| } while (1);
0x0040dbec lw gp, 0x10(sp) | gp = *(var_10h);
| label_0:
0x0040dbf0 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x0040dbf4 lw s4, 0x28(sp) | s4 = *(var_28h);
0x0040dbf8 lw s3, 0x24(sp) | s3 = *(var_24h);
0x0040dbfc lw s2, 0x20(sp) | s2 = *(var_20h);
0x0040dc00 lw s1, 0x1c(sp) | s1 = *(var_1ch);
0x0040dc04 lw s0, 0x18(sp) | s0 = *(var_18h);
0x0040dc08 addiu sp, sp, 0x30 |
0x0040dc0c jr ra | return v0;
| }
[*] Function sprintf used 38 times miio_client