[*] Binary protection state of miio_client
No RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function fprintf 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 @ 0x40dfb8 */
| #include <stdint.h>
|
; (fcn) sym.log_printf () | void log_printf () {
0x0040dfb8 addiu sp, sp, -0x88 |
0x0040dfbc sw s1, 0x78(sp) | *(var_78h) = s1;
0x0040dfc0 lui s1, 0x43 | s1 = 0x430000;
0x0040dfc4 lui gp, 0x43 |
0x0040dfc8 lw v0, -0x6660(s1) | v0 = *((s1 - 6552));
0x0040dfcc addiu gp, gp, 0x1620 | gp += 0x1620;
0x0040dfd0 sw ra, 0x84(sp) | *(var_84h) = ra;
0x0040dfd4 sw s3, 0x80(sp) | *(var_80h) = s3;
0x0040dfd8 sw s2, 0x7c(sp) | *(var_7ch) = s2;
0x0040dfdc sw s0, 0x74(sp) | *(var_74h) = s0;
0x0040dfe0 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0040dfe4 sw a2, 0x90(sp) | *(arg_90h) = a2;
0x0040dfe8 sw a3, 0x94(sp) | *(arg_94h) = a3;
| if (v0 != 0) {
0x0040dfec beqz v0, 0x40e100 |
0x0040dff0 lui v0, 0x43 | v0 = 0x430000;
0x0040dff4 lw v0, -0x69f0(v0) | v0 = *((v0 - 6780));
0x0040dff8 sltu v0, v0, a0 | v0 = (v0 < a0) ? 1 : 0;
0x0040dffc sltiu v0, a0, 5 | v0 = (a0 < 5) ? 1 : 0;
| if (v0 != 0) {
0x0040e000 bnez v0, 0x40e100 | goto label_0;
| }
0x0040e004 lui v0, 0x42 | v0 = 0x420000;
| if (v0 != 0) {
0x0040e008 beqz v0, 0x40e054 |
0x0040e00c addiu v0, v0, -0x74f0 | v0 += -0x74f0;
0x0040e010 sll a0, a0, 2 | a0 <<= 2;
0x0040e014 addu a0, v0, a0 | a0 = v0 + a0;
0x0040e018 lw v0, (a0) | v0 = *(a0);
0x0040e01c jr v0 | v0 ();
0x0040e020 nop |
| }
0x0040e054 lui s0, 0x42 | s0 = 0x420000;
0x0040e058 j 0x40e068 | goto label_1;
| /* str._UNKNOWN_ */
0x0040e05c addiu s0, s0, -0x764c | s0 += -0x764c;
| label_1:
0x0040e068 lw t9, -0x7dec(gp) | t9 = sym.imp.time;
0x0040e06c move a0, zero | a0 = 0;
0x0040e070 move s2, a1 | s2 = a1;
0x0040e074 jalr t9 | t9 ();
0x0040e078 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040e07c addiu a0, sp, 0x6c | a0 = sp + 0x6c;
0x0040e080 lw t9, -0x7ddc(gp) | t9 = sym.imp.localtime;
0x0040e084 sw v0, 0x6c(sp) | *(var_6ch) = v0;
0x0040e088 jalr t9 | t9 ();
0x0040e08c lw gp, 0x10(sp) | gp = *(var_10h);
0x0040e090 addiu s3, sp, 0x18 | s3 = sp + 0x18;
0x0040e094 lw t9, -0x7e18(gp) | t9 = sym.imp.strftime;
0x0040e098 lui a2, 0x42 | a2 = 0x420000;
0x0040e09c move a0, s3 | a0 = s3;
0x0040e0a0 addiu a1, zero, 0x50 | a1 = 0x50;
| /* str.__Y_m_d__H:_M:_S_ */
0x0040e0a4 addiu a2, a2, -0x7640 | a2 += -0x7640;
0x0040e0a8 move a3, v0 | a3 = v0;
0x0040e0ac jalr t9 | t9 ();
0x0040e0b0 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040e0b4 addiu v0, sp, 0x90 | v0 = sp + 0x90;
0x0040e0b8 lw t9, -0x7d68(gp) | t9 = sym.imp.fprintf
0x0040e0bc lw a0, -0x6660(s1) | a0 = *((s1 - 6552));
0x0040e0c0 lui a1, 0x42 | a1 = 0x420000;
0x0040e0c4 move a3, s0 | a3 = s0;
| /* str._s__s_ */
0x0040e0c8 addiu a1, a1, -0x762c | a1 += -0x762c;
0x0040e0cc move a2, s3 | a2 = s3;
0x0040e0d0 sw v0, 0x68(sp) | *(var_68h) = v0;
0x0040e0d4 jalr t9 | t9 ();
0x0040e0d8 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040e0dc lw a0, -0x6660(s1) | a0 = *((s1 - 6552));
0x0040e0e0 lw t9, -0x7e68(gp) | t9 = sym.imp.vfprintf
0x0040e0e4 lw a2, 0x68(sp) | a2 = *(var_68h);
0x0040e0e8 move a1, s2 | a1 = s2;
0x0040e0ec jalr t9 | t9 ();
0x0040e0f0 lw gp, 0x10(sp) | gp = *(var_10h);
0x0040e0f4 lw t9, -0x7d38(gp) | t9 = sym.imp.fflush;
0x0040e0f8 lw a0, -0x6660(s1) | a0 = *((s1 - 6552));
0x0040e0fc jalr t9 | t9 ();
| }
| label_0:
0x0040e100 lw ra, 0x84(sp) | ra = *(var_84h);
0x0040e104 lw s3, 0x80(sp) | s3 = *(var_80h);
0x0040e108 lw s2, 0x7c(sp) | s2 = *(var_7ch);
0x0040e10c lw s1, 0x78(sp) | s1 = *(var_78h);
0x0040e110 lw s0, 0x74(sp) | s0 = *(var_74h);
0x0040e114 addiu sp, sp, 0x88 |
0x0040e118 jr ra | return v0;
| }
[*] Function fprintf used 3 times miio_client