[*] Binary protection state of focusd
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of focusd
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/focusd @ 0xb99c */
| #include <stdint.h>
|
; (fcn) fcn.0000b99c () | void fcn_0000b99c () {
0x0000b99c lui gp, 6 |
0x0000b9a0 addiu gp, gp, 0x31e4 |
0x0000b9a4 addu gp, gp, t9 | gp += t9;
0x0000b9a8 addiu sp, sp, -0xe8 |
0x0000b9ac lw t9, -0x7898(gp) | t9 = sym.imp.g_string_new;
0x0000b9b0 sw s3, 0xd4(sp) | *(var_d4h) = s3;
0x0000b9b4 lw s3, -0x7a04(gp) | s3 = *((gp - 7809));
0x0000b9b8 sw s1, 0xcc(sp) | *(var_cch) = s1;
0x0000b9bc lw s1, -0x7fd8(gp) | s1 = *(gp);
0x0000b9c0 lw v0, (s3) | v0 = *(s3);
0x0000b9c4 sw ra, 0xe4(sp) | *(var_e4h) = ra;
0x0000b9c8 sw gp, 0x28(sp) | *(var_28h) = gp;
0x0000b9cc sw s6, 0xe0(sp) | *(var_e0h) = s6;
0x0000b9d0 sw s5, 0xdc(sp) | *(var_dch) = s5;
0x0000b9d4 sw s4, 0xd8(sp) | *(var_d8h) = s4;
0x0000b9d8 sw s2, 0xd0(sp) | *(var_d0h) = s2;
0x0000b9dc sw s0, 0xc8(sp) | *(var_c8h) = s0;
0x0000b9e0 move s2, a0 | s2 = a0;
0x0000b9e4 sw v0, 0xc4(sp) | *(var_c4h) = v0;
0x0000b9e8 addiu a0, s1, -0x64a8 | a0 = s1 + -0x64a8;
0x0000b9ec move s0, a1 | s0 = a1;
0x0000b9f0 move s5, a2 | s5 = a2;
0x0000b9f4 move s4, a3 | s4 = a3;
0x0000b9f8 jalr t9 | t9 ();
0x0000b9fc lw gp, 0x28(sp) | gp = *(var_28h);
0x0000ba00 addiu a0, s1, -0x64a8 | a0 = s1 + -0x64a8;
0x0000ba04 move s1, v0 | s1 = v0;
0x0000ba08 lw t9, -0x7898(gp) | t9 = sym.imp.g_string_new;
0x0000ba0c addiu s6, sp, 0x34 | s6 = sp + 0x34;
0x0000ba10 jalr t9 | t9 ();
0x0000ba14 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000ba18 lw t3, (s0) | t3 = *(s0);
0x0000ba1c lw t2, 4(s0) | t2 = *((s0 + 1));
0x0000ba20 lw t1, 8(s0) | t1 = *((s0 + 2));
0x0000ba24 lw t0, 0xc(s0) | t0 = *((s0 + 3));
0x0000ba28 lw a3, 0x10(s0) | a3 = *((s0 + 4));
0x0000ba2c lw a2, 0x14(s0) | a2 = *((s0 + 5));
0x0000ba30 lw v1, 0x18(s0) | v1 = *((s0 + 6));
0x0000ba34 lw t9, -0x78d8(gp) | t9 = sym.imp.gettimeofday;
0x0000ba38 sw t3, 0x3c(sp) | *(var_3ch) = t3;
0x0000ba3c sw t2, 0x40(sp) | *(var_40h) = t2;
0x0000ba40 sw t1, 0x44(sp) | *(var_44h) = t1;
0x0000ba44 sw t0, 0x48(sp) | *(var_48h) = t0;
0x0000ba48 sw a3, 0x4c(sp) | *(var_4ch) = a3;
0x0000ba4c sw a2, 0x50(sp) | *(var_50h) = a2;
0x0000ba50 sw v1, 0x54(sp) | *(var_54h) = v1;
0x0000ba54 move a1, zero | a1 = 0;
0x0000ba58 move a0, s6 | a0 = s6;
0x0000ba5c move s0, v0 | s0 = v0;
0x0000ba60 jalr t9 | t9 ();
0x0000ba64 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000ba68 addiu a1, sp, 0x58 | a1 = sp + 0x58;
0x0000ba6c lw t9, -0x78c4(gp) | t9 = sym.imp.gmtime_r;
0x0000ba70 move a0, s6 | a0 = s6;
0x0000ba74 jalr t9 | t9 ();
0x0000ba78 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000ba7c lw t9, -0x7fd0(gp) | t9 = *(gp);
0x0000ba80 addiu t9, t9, -0x4800 | t9 += -0x4800;
0x0000ba84 addiu a0, sp, 0x3c | a0 = sp + 0x3c;
0x0000ba88 bal 0xb800 | fcn_0000b800 ();
0x0000ba8c lw gp, 0x28(sp) | gp = *(var_28h);
| if (s4 == 0) {
0x0000ba90 beqz s4, 0xbde0 | goto label_6;
| }
| label_4:
0x0000ba94 lw v1, 0x38(sp) | v1 = *(var_38h);
0x0000ba98 lui v0, 0x1062 | v0 = 0x10624dd3;
0x0000ba9c addiu v0, v0, 0x4dd3 |
0x0000baa0 mult v1, v0 | __asm ("mult v1, v0");
0x0000baa4 mfhi v0 | __asm ("mfhi v0");
0x0000baa8 sra v1, v1, 0x1f | v1 >>= 0x1f;
0x0000baac lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000bab0 lw a3, 0x6c(sp) | a3 = *(var_6ch);
0x0000bab4 lw t9, -0x7bd8(gp) | t9 = sym.imp.g_string_append_printf
0x0000bab8 sra v0, v0, 6 | v0 >>= 6;
0x0000babc subu v0, v0, v1 | __asm ("subu v0, v0, v1");
0x0000bac0 sw v0, 0x24(sp) | *(var_24h) = v0;
0x0000bac4 lw v0, 0x58(sp) | v0 = *(var_58h);
0x0000bac8 lw v1, 0x68(sp) | v1 = *(var_68h);
0x0000bacc sw v0, 0x20(sp) | *(var_20h) = v0;
0x0000bad0 lw v0, 0x5c(sp) | v0 = *(var_5ch);
0x0000bad4 addiu v1, v1, 1 | v1++;
0x0000bad8 sw v0, 0x1c(sp) | *(var_1ch) = v0;
0x0000badc lw v0, 0x60(sp) | v0 = *(var_60h);
0x0000bae0 sw v1, 0x10(sp) | *(var_10h) = v1;
0x0000bae4 sw v0, 0x18(sp) | *(var_18h) = v0;
0x0000bae8 lw v0, 0x64(sp) | v0 = *(var_64h);
0x0000baec addiu a3, a3, 0x76c | a3 += 0x76c;
0x0000baf0 sw v0, 0x14(sp) | *(var_14h) = v0;
0x0000baf4 addiu a2, zero, 1 | a2 = 1;
| /* str.__xml_version_1.0__encoding_iso_8859_1____r_n_devInfo__xmlns:xsi_http:__www.w3.org_2001_XMLSchema_instance__r_nxmlns_http:__www.axis.com_OpticsSetupSchema__r_nxsi:schemaLocation_http:__www.axis.com_OpticsSetupSchema_pub_opticssetup.xsd__r_nversion__d__timeStamp__04d__02d__02dT_02d:_02d:_02d__timeStampMS__03d___r_n_r_n */
0x0000baf8 addiu a1, a1, -0x68bc | a1 += -0x68bc;
0x0000bafc move a0, s0 | a0 = s0;
0x0000bb00 jalr t9 | t9 ();
0x0000bb04 lw v1, 0x40(sp) | v1 = *(var_40h);
0x0000bb08 lw v0, 0x3c(sp) | v0 = *(var_3ch);
0x0000bb0c or v0, v0, v1 | v0 |= v1;
0x0000bb10 lw v1, 0x44(sp) | v1 = *(var_44h);
0x0000bb14 or v0, v0, v1 | v0 |= v1;
0x0000bb18 lw v1, 0x48(sp) | v1 = *(var_48h);
0x0000bb1c or v0, v0, v1 | v0 |= v1;
0x0000bb20 lw v1, 0x4c(sp) | v1 = *(var_4ch);
0x0000bb24 or v0, v0, v1 | v0 |= v1;
0x0000bb28 lw v1, 0x50(sp) | v1 = *(var_50h);
0x0000bb2c or v0, v0, v1 | v0 |= v1;
0x0000bb30 lw v1, 0x54(sp) | v1 = *(var_54h);
0x0000bb34 or v0, v0, v1 | v0 |= v1;
0x0000bb38 lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 == 0) {
0x0000bb3c beqz v0, 0xbbe0 | goto label_7;
| }
0x0000bb40 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000bb44 lw t9, -0x7bc8(gp) | t9 = sym.imp.g_string_append;
| /* str._opticsSetupState_ */
0x0000bb48 addiu a1, a1, -0x6780 | a1 += -0x6780;
0x0000bb4c move a0, s0 | a0 = s0;
0x0000bb50 jalr t9 | t9 ();
0x0000bb54 lw v0, 0x3c(sp) | v0 = *(var_3ch);
0x0000bb58 lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 != 0) {
0x0000bb5c bnez v0, 0xbdfc | goto label_8;
| }
| label_5:
0x0000bb60 lw v0, 0x44(sp) | v0 = *(var_44h);
0x0000bb64 lw a1, -0x7fd8(gp) | a1 = *(gp);
| if (v0 != 0) {
0x0000bb68 bnez v0, 0xbcf4 | goto label_9;
| }
0x0000bb6c lw v0, 0x40(sp) | v0 = *(var_40h);
0x0000bb70 lw t9, -0x7f90(gp) | t9 = *(gp);
| if (v0 != 0) {
0x0000bb74 bnez v0, 0xbd1c | goto label_10;
| }
| label_1:
0x0000bb78 lw v0, 0x48(sp) | v0 = *(var_48h);
0x0000bb7c lw a1, -0x7fd8(gp) | a1 = *(gp);
| if (v0 != 0) {
0x0000bb80 bnez v0, 0xbd54 | goto label_11;
| }
| label_2:
0x0000bb84 lw v0, 0x4c(sp) | v0 = *(var_4ch);
0x0000bb88 lw v0, 0x54(sp) | v0 = *(var_54h);
| if (v0 != 0) {
0x0000bb8c beqz v0, 0xbbb4 |
0x0000bb90 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000bb94 lw a2, 0x10(s2) | a2 = *((s2 + 4));
0x0000bb98 lw t9, -0x7bd8(gp) | t9 = sym.imp.g_string_append_printf
0x0000bb9c sltu a2, zero, a2 | a2 = (0 < a2) ? 1 : 0;
| /* str.isDay__u__ */
0x0000bba0 addiu a1, a1, -0x6708 | a1 += -0x6708;
0x0000bba4 move a0, s0 | a0 = s0;
0x0000bba8 jalr t9 | t9 ();
0x0000bbac lw gp, 0x28(sp) | gp = *(var_28h);
0x0000bbb0 lw v0, 0x54(sp) | v0 = *(var_54h);
| }
0x0000bbb4 lw a1, -0x7fd8(gp) | a1 = *(gp);
| if (v0 != 0) {
0x0000bbb8 bnez v0, 0xbc9c | goto label_12;
| }
0x0000bbbc lw v0, 0x50(sp) | v0 = *(var_50h);
0x0000bbc0 lw t9, -0x7f90(gp) | t9 = *(gp);
| if (v0 != 0) {
0x0000bbc4 bnez v0, 0xbcc4 | goto label_13;
| }
| do {
| label_0:
0x0000bbc8 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000bbcc lw t9, -0x7bc8(gp) | t9 = sym.imp.g_string_append;
| /* esilref: '/>
' */
0x0000bbd0 addiu a1, a1, -0x64ac | a1 += -0x64ac;
0x0000bbd4 move a0, s0 | a0 = s0;
0x0000bbd8 jalr t9 | t9 ();
0x0000bbdc lw gp, 0x28(sp) | gp = *(var_28h);
| label_7:
0x0000bbe0 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000bbe4 lw t9, -0x7bc8(gp) | t9 = sym.imp.g_string_append;
| /* str.__devInfo__r_n_r_n */
0x0000bbe8 addiu a1, a1, -0x66c8 | a1 += -0x66c8;
0x0000bbec move a0, s0 | a0 = s0;
0x0000bbf0 jalr t9 | t9 ();
0x0000bbf4 lw gp, 0x28(sp) | gp = *(var_28h);
| if (s5 != 0) {
0x0000bbf8 bnez s5, 0xbdc4 | goto label_14;
| }
0x0000bbfc lw v0, -0x7fd8(gp) | v0 = *(gp);
| if (s4 == 0) {
0x0000bc00 bnel s4, zero, 0xbd70 | goto label_15;
| }
| label_3:
0x0000bc04 lw t9, -0x7bc8(gp) | t9 = sym.imp.g_string_append;
0x0000bc08 lw a1, (s0) | a1 = *(s0);
0x0000bc0c move a0, s1 | a0 = s1;
0x0000bc10 jalr t9 | t9 ();
0x0000bc14 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000bc18 move a0, s0 | a0 = s0;
0x0000bc1c lw t9, -0x7934(gp) | t9 = sym.imp.g_string_free;
0x0000bc20 addiu a1, zero, 1 | a1 = 1;
0x0000bc24 jalr t9 | t9 ();
0x0000bc28 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000bc2c lw a2, 4(s1) | a2 = *((s1 + 1));
0x0000bc30 lw a1, (s1) | a1 = *(s1);
0x0000bc34 lw t9, -0x7afc(gp) | t9 = sym.imp.send;
0x0000bc38 lw a0, 0xf8(sp) | a0 = *(arg_f8h);
0x0000bc3c addiu a3, zero, 0x4000 | a3 = 0x4000;
0x0000bc40 jalr t9 | t9 ();
0x0000bc44 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000bc48 move a0, s1 | a0 = s1;
0x0000bc4c addiu a1, zero, 1 | a1 = 1;
0x0000bc50 lw t9, -0x7934(gp) | t9 = sym.imp.g_string_free;
0x0000bc54 move s0, v0 | s0 = v0;
0x0000bc58 jalr t9 | t9 ();
0x0000bc5c lw a0, 0xc4(sp) | a0 = *(var_c4h);
0x0000bc60 lw v1, (s3) | v1 = *(s3);
0x0000bc64 nor v0, zero, s0 | __asm ("nor v0, zero, s0");
0x0000bc68 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000bc6c srl v0, v0, 0x1f | v0 >>= 0x1f;
| if (a0 != v1) {
0x0000bc70 bne a0, v1, 0xbe30 | goto label_16;
| }
0x0000bc74 lw ra, 0xe4(sp) | ra = *(var_e4h);
0x0000bc78 lw s6, 0xe0(sp) | s6 = *(var_e0h);
0x0000bc7c lw s5, 0xdc(sp) | s5 = *(var_dch);
0x0000bc80 lw s4, 0xd8(sp) | s4 = *(var_d8h);
0x0000bc84 lw s3, 0xd4(sp) | s3 = *(var_d4h);
0x0000bc88 lw s2, 0xd0(sp) | s2 = *(var_d0h);
0x0000bc8c lw s1, 0xcc(sp) | s1 = *(var_cch);
0x0000bc90 lw s0, 0xc8(sp) | s0 = *(var_c8h);
0x0000bc94 addiu sp, sp, 0xe8 |
0x0000bc98 jr ra | return v0;
| label_12:
0x0000bc9c lw a2, 0x18(s2) | a2 = *((s2 + 6));
0x0000bca0 lw t9, -0x7bd8(gp) | t9 = sym.imp.g_string_append_printf
0x0000bca4 sltu a2, zero, a2 | a2 = (0 < a2) ? 1 : 0;
| /* str.zoomOperationInProgress__u__ */
0x0000bca8 addiu a1, a1, -0x66fc | a1 += -0x66fc;
0x0000bcac move a0, s0 | a0 = s0;
0x0000bcb0 jalr t9 | t9 ();
0x0000bcb4 lw v0, 0x50(sp) | v0 = *(var_50h);
0x0000bcb8 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000bcbc beqz v0, 0xbbc8 |
| } while (v0 == 0);
0x0000bcc0 lw t9, -0x7f90(gp) | t9 = *(gp);
| label_13:
0x0000bcc4 lw a0, 0x14(s2) | a0 = *((s2 + 5));
0x0000bcc8 jalr t9 | t9 ();
0x0000bccc lw gp, 0x28(sp) | gp = *(var_28h);
0x0000bcd0 move a2, v0 | a2 = v0;
0x0000bcd4 move a3, v1 | a3 = v1;
0x0000bcd8 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000bcdc lw t9, -0x7bd8(gp) | t9 = sym.imp.g_string_append_printf
| /* str.zoomPosition__f__ */
0x0000bce0 addiu a1, a1, -0x66dc | a1 += -0x66dc;
0x0000bce4 move a0, s0 | a0 = s0;
0x0000bce8 jalr t9 | t9 ();
0x0000bcec lw gp, 0x28(sp) | gp = *(var_28h);
0x0000bcf0 b 0xbbc8 | goto label_0;
| label_9:
0x0000bcf4 lw a2, 8(s2) | a2 = *((s2 + 2));
0x0000bcf8 lw t9, -0x7bd8(gp) | t9 = sym.imp.g_string_append_printf
0x0000bcfc sltu a2, zero, a2 | a2 = (0 < a2) ? 1 : 0;
| /* str.focusOperationInProgress__u__ */
0x0000bd00 addiu a1, a1, -0x6758 | a1 += -0x6758;
0x0000bd04 move a0, s0 | a0 = s0;
0x0000bd08 jalr t9 | t9 ();
0x0000bd0c lw v0, 0x40(sp) | v0 = *(var_40h);
0x0000bd10 lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 == 0) {
0x0000bd14 beqz v0, 0xbb78 | goto label_1;
| }
0x0000bd18 lw t9, -0x7f90(gp) | t9 = *(gp);
| label_10:
0x0000bd1c lw a0, 4(s2) | a0 = *((s2 + 1));
0x0000bd20 jalr t9 | t9 ();
0x0000bd24 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000bd28 move a2, v0 | a2 = v0;
0x0000bd2c move a3, v1 | a3 = v1;
0x0000bd30 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000bd34 lw t9, -0x7bd8(gp) | t9 = sym.imp.g_string_append_printf
| /* str.focusPosition__f__ */
0x0000bd38 addiu a1, a1, -0x6738 | a1 += -0x6738;
0x0000bd3c move a0, s0 | a0 = s0;
0x0000bd40 jalr t9 | t9 ();
0x0000bd44 lw v0, 0x48(sp) | v0 = *(var_48h);
0x0000bd48 lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 == 0) {
0x0000bd4c beqz v0, 0xbb84 | goto label_2;
| }
0x0000bd50 lw a1, -0x7fd8(gp) | a1 = *(gp);
| label_11:
0x0000bd54 lw t9, -0x7bd8(gp) | t9 = sym.imp.g_string_append_printf
0x0000bd58 lw a2, 0xc(s2) | a2 = *((s2 + 3));
| /* str.focusAssistantRunning__d__ */
0x0000bd5c addiu a1, a1, -0x6724 | a1 += -0x6724;
0x0000bd60 move a0, s0 | a0 = s0;
0x0000bd64 jalr t9 | t9 ();
0x0000bd68 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000bd6c b 0xbb84 | goto label_2;
| label_15:
0x0000bd70 addiu a1, sp, 0x84 | a1 = sp + 0x84;
| /* str.HTTP_1.0_200_OK_r_nContent_Type:_text_xml_r_nContent_Length:__u_r_n_r_n */
0x0000bd74 addiu v0, v0, -0x6664 | v0 += -0x6664;
0x0000bd78 move v1, a1 | v1 = a1;
0x0000bd7c addiu t1, v0, 0x40 | t1 = v0 + 0x40;
| do {
0x0000bd80 lw t0, (v0) | t0 = *(v0);
0x0000bd84 lw a3, 4(v0) | a3 = *((v0 + 1));
0x0000bd88 lw a2, 8(v0) | a2 = *((v0 + 2));
0x0000bd8c lw a0, 0xc(v0) | a0 = *((v0 + 3));
0x0000bd90 addiu v0, v0, 0x10 | v0 += 0x10;
0x0000bd94 sw t0, (v1) | *(v1) = t0;
0x0000bd98 sw a3, 4(v1) | *(var_4h) = a3;
0x0000bd9c sw a2, 8(v1) | *(var_8h) = a2;
0x0000bda0 sw a0, 0xc(v1) | *(var_ch) = a0;
0x0000bda4 addiu v1, v1, 0x10 | v1 += 0x10;
0x0000bda8 bne v0, t1, 0xbd80 |
| } while (v0 != t1);
0x0000bdac lw t9, -0x7bd8(gp) | t9 = sym.imp.g_string_append_printf
0x0000bdb0 lw a2, 4(s0) | a2 = *((s0 + 1));
0x0000bdb4 move a0, s1 | a0 = s1;
0x0000bdb8 jalr t9 | t9 ();
0x0000bdbc lw gp, 0x28(sp) | gp = *(var_28h);
0x0000bdc0 b 0xbc04 | goto label_3;
| label_14:
0x0000bdc4 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000bdc8 lw t9, -0x7bc8(gp) | t9 = sym.imp.g_string_append;
| /* str.HTTP_1.0_200_OK_r_nContent_Type:_multipart_mixed__boundarydevice_monitor_entry_r_n_r_n */
0x0000bdcc addiu a1, a1, -0x66b8 | a1 += -0x66b8;
0x0000bdd0 move a0, s1 | a0 = s1;
0x0000bdd4 jalr t9 | t9 ();
0x0000bdd8 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000bddc b 0xbc04 | goto label_3;
| label_6:
0x0000bde0 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000bde4 lw t9, -0x7bc8(gp) | t9 = sym.imp.g_string_append;
| /* str.__device_monitor_entry_r_nContent_type:_text_xml_r_n_r_n */
0x0000bde8 addiu a1, a1, -0x68f0 | a1 += -0x68f0;
0x0000bdec move a0, s0 | a0 = s0;
0x0000bdf0 jalr t9 | t9 ();
0x0000bdf4 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000bdf8 b 0xba94 | goto label_4;
| label_8:
0x0000bdfc lw t9, -0x7f90(gp) | t9 = *(gp);
0x0000be00 lw a0, (s2) | a0 = *(s2);
0x0000be04 jalr t9 | t9 ();
0x0000be08 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000be0c move a2, v0 | a2 = v0;
0x0000be10 move a3, v1 | a3 = v1;
0x0000be14 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x0000be18 lw t9, -0x7bd8(gp) | t9 = sym.imp.g_string_append_printf
| /* str.focusMeasure__f__ */
0x0000be1c addiu a1, a1, -0x676c | a1 += -0x676c;
0x0000be20 move a0, s0 | a0 = s0;
0x0000be24 jalr t9 | t9 ();
0x0000be28 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000be2c b 0xbb60 | goto label_5;
| label_16:
0x0000be30 lw t9, -0x7a94(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000be34 jalr t9 | t9 ();
0x0000be38 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/focusd @ 0x18068 */
| #include <stdint.h>
|
; (fcn) sym.focusd_feature_freeze () | void focusd_feature_freeze () {
0x00018068 lui gp, 5 |
0x0001806c addiu gp, gp, 0x6b18 |
0x00018070 addu gp, gp, t9 | gp += t9;
0x00018074 addiu sp, sp, -0x38 |
0x00018078 lw t9, -0x79c8(gp) | t9 = sym.imp.g_rw_lock_writer_lock;
0x0001807c sw s0, 0x18(sp) | *(var_18h) = s0;
0x00018080 lw s0, -0x7fdc(gp) | s0 = *((gp - 8183));
0x00018084 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00018088 sw ra, 0x34(sp) | *(var_34h) = ra;
0x0001808c sw s5, 0x2c(sp) | *(var_2ch) = s5;
0x00018090 sw s6, 0x30(sp) | *(var_30h) = s6;
0x00018094 sw s4, 0x28(sp) | *(var_28h) = s4;
0x00018098 sw s3, 0x24(sp) | *(var_24h) = s3;
0x0001809c sw s2, 0x20(sp) | *(var_20h) = s2;
0x000180a0 sw s1, 0x1c(sp) | *(var_1ch) = s1;
0x000180a4 move s5, a0 | s5 = a0;
0x000180a8 addiu a0, s0, 0x7654 | a0 = s0 + 0x7654;
0x000180ac jalr t9 | t9 ();
0x000180b0 lw gp, 0x10(sp) | gp = *(var_10h);
0x000180b4 addiu v1, zero, 1 | v1 = 1;
0x000180b8 addiu a0, s0, 0x7654 | a0 = s0 + 0x7654;
0x000180bc lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x000180c0 lw t9, -0x7aec(gp) | t9 = sym.imp.g_rw_lock_writer_unlock;
0x000180c4 sw v1, 0x7650(v0) | *((v0 + 7572)) = v1;
0x000180c8 jalr t9 | t9 ();
0x000180cc lw gp, 0x10(sp) | gp = *(var_10h);
| if (s5 == 0) {
0x000180d0 beqz s5, 0x18218 | goto label_4;
| }
0x000180d4 lw a0, -0x7fd8(gp) | a0 = *(gp);
0x000180d8 lw t9, -0x7898(gp) | t9 = sym.imp.g_string_new;
0x000180dc addiu a0, a0, -0x64a8 | a0 += -0x64a8;
0x000180e0 jalr t9 | t9 ();
0x000180e4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000180e8 move s4, v0 | s4 = v0;
0x000180ec lw s0, -0x7fdc(gp) | s0 = *((gp - 8183));
0x000180f0 lw s3, -0x7fd8(gp) | s3 = *(gp);
0x000180f4 lw s2, -0x7fd8(gp) | s2 = *(gp);
0x000180f8 lw s1, -0x7fd8(gp) | s1 = *(gp);
| /* esilref: 'ASPECT_RATIO_CROP' */
0x000180fc addiu s0, s0, 0x6030 | s0 += 0x6030;
0x00018100 addiu s6, s0, 0xb40 | s6 = s0 + 0xb40;
| /* esilref: 'yes' */
0x00018104 addiu s3, s3, -0x7458 | s3 += -0x7458;
| /* esilref: 'no' */
0x00018108 addiu s2, s2, -0x7454 | s2 += -0x7454;
| /* str._s_s_n */
0x0001810c addiu s1, s1, -0x2d94 | s1 += -0x2d94;
| do {
0x00018110 lw a3, 0x9c(s0) | a3 = *((s0 + 39));
0x00018114 move v0, s2 | v0 = s2;
0x00018118 lw t9, -0x7bd8(gp) | t9 = sym.imp.g_string_append_printf
| if (a3 == 0) {
0x0001811c movn v0, s3, a3 | v0 = s3;
| }
0x00018120 lw a2, (s0) | a2 = *(s0);
0x00018124 move a3, v0 | a3 = v0;
0x00018128 move a1, s1 | a1 = s1;
0x0001812c move a0, s4 | a0 = s4;
0x00018130 addiu s0, s0, 0xa0 | s0 += 0xa0;
0x00018134 jalr t9 | t9 ();
0x00018138 lw gp, 0x10(sp) | gp = *(var_10h);
0x0001813c bne s0, s6, 0x18110 |
| } while (s0 != s6);
0x00018140 lw a1, -0x7fd8(gp) | a1 = *(gp);
0x00018144 lw t9, -0x7acc(gp) | t9 = sym.imp.fopen;
| /* esilref: 'w+' */
0x00018148 addiu a1, a1, -0x2d8c | a1 += -0x2d8c;
0x0001814c move a0, s5 | a0 = s5;
0x00018150 jalr t9 | t9 ();
0x00018154 move s0, v0 | s0 = v0;
0x00018158 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0001815c beqz v0, 0x18240 | goto label_5;
| }
0x00018160 lw t9, -0x76dc(gp) | t9 = sym.imp.fileno;
0x00018164 move a0, v0 | a0 = v0;
0x00018168 jalr t9 | t9 ();
0x0001816c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x00018170 bltz v0, 0x18298 | goto label_6;
| }
0x00018174 lw t9, -0x7be8(gp) | t9 = sym.imp.fchmod;
0x00018178 addiu a1, zero, 0x1a4 | a1 = segment.NOTE;
0x0001817c move a0, v0 | a0 = v0;
0x00018180 jalr t9 | t9 ();
0x00018184 addiu v1, zero, -1 | v1 = -1;
0x00018188 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == v1) {
0x0001818c beq v0, v1, 0x18338 | goto label_7;
| }
| do {
| label_3:
0x00018190 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x00018194 lw t9, -0x7798(gp) | t9 = sym.imp.__fprintf_chk
0x00018198 lw a3, (s4) | a3 = *(s4);
| /* esilref: '&s' */
0x0001819c addiu a2, a2, -0x2cfc | a2 += -0x2cfc;
0x000181a0 addiu a1, zero, 1 | a1 = 1;
0x000181a4 move a0, s0 | a0 = s0;
0x000181a8 jalr t9 | t9 ();
0x000181ac lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 < 0) {
0x000181b0 bltz v0, 0x182c0 | goto label_8;
| }
| label_0:
0x000181b4 lw t9, -0x7930(gp) | t9 = sym.imp.fflush;
0x000181b8 move a0, s0 | a0 = s0;
0x000181bc jalr t9 | t9 ();
0x000181c0 addiu v1, zero, -1 | v1 = -1;
0x000181c4 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == v1) {
0x000181c8 beq v0, v1, 0x18310 | goto label_9;
| }
| label_2:
0x000181cc lw t9, -0x797c(gp) | t9 = sym.imp.fclose;
0x000181d0 move a0, s0 | a0 = s0;
0x000181d4 jalr t9 | t9 ();
0x000181d8 addiu v1, zero, -1 | v1 = -1;
0x000181dc lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == v1) {
0x000181e0 beq v0, v1, 0x182e8 | goto label_10;
| }
| label_1:
0x000181e4 lw ra, 0x34(sp) | ra = *(var_34h);
0x000181e8 lw s6, 0x30(sp) | s6 = *(var_30h);
0x000181ec lw s5, 0x2c(sp) | s5 = *(var_2ch);
0x000181f0 lw s3, 0x24(sp) | s3 = *(var_24h);
0x000181f4 lw s2, 0x20(sp) | s2 = *(var_20h);
0x000181f8 lw s1, 0x1c(sp) | s1 = *(var_1ch);
0x000181fc lw s0, 0x18(sp) | s0 = *(var_18h);
0x00018200 move a0, s4 | a0 = s4;
0x00018204 lw t9, -0x7934(gp) | t9 = sym.imp.g_string_free;
0x00018208 lw s4, 0x28(sp) | s4 = *(var_28h);
0x0001820c addiu a1, zero, 1 | a1 = 1;
0x00018210 addiu sp, sp, 0x38 |
0x00018214 jr t9 | t9 ();
| label_4:
0x00018218 lw ra, 0x34(sp) | ra = *(var_34h);
0x0001821c lw s6, 0x30(sp) | s6 = *(var_30h);
0x00018220 lw s5, 0x2c(sp) | s5 = *(var_2ch);
0x00018224 lw s4, 0x28(sp) | s4 = *(var_28h);
0x00018228 lw s3, 0x24(sp) | s3 = *(var_24h);
0x0001822c lw s2, 0x20(sp) | s2 = *(var_20h);
0x00018230 lw s1, 0x1c(sp) | s1 = *(var_1ch);
0x00018234 lw s0, 0x18(sp) | s0 = *(var_18h);
0x00018238 addiu sp, sp, 0x38 |
0x0001823c jr ra | return v0;
| label_5:
0x00018240 lw v0, -0x7990(gp) | v0 = *((gp - 7780));
0x00018244 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x00018248 lw t9, -0x7798(gp) | t9 = sym.imp.__fprintf_chk
0x0001824c lw a0, (v0) | a0 = *(v0);
0x00018250 move a3, s5 | a3 = s5;
0x00018254 addiu a1, zero, 1 | a1 = 1;
| /* str._3_Could_not_open_feature_status_file__s:__m_n */
0x00018258 addiu a2, a2, -0x2d88 | a2 += -0x2d88;
0x0001825c jalr t9 | t9 ();
0x00018260 lw gp, 0x10(sp) | gp = *(var_10h);
0x00018264 lw ra, 0x34(sp) | ra = *(var_34h);
0x00018268 lw s6, 0x30(sp) | s6 = *(var_30h);
0x0001826c lw s5, 0x2c(sp) | s5 = *(var_2ch);
0x00018270 lw s3, 0x24(sp) | s3 = *(var_24h);
0x00018274 lw s2, 0x20(sp) | s2 = *(var_20h);
0x00018278 lw s1, 0x1c(sp) | s1 = *(var_1ch);
0x0001827c lw s0, 0x18(sp) | s0 = *(var_18h);
0x00018280 move a0, s4 | a0 = s4;
0x00018284 lw t9, -0x7934(gp) | t9 = sym.imp.g_string_free;
0x00018288 lw s4, 0x28(sp) | s4 = *(var_28h);
0x0001828c addiu a1, zero, 1 | a1 = 1;
0x00018290 addiu sp, sp, 0x38 |
0x00018294 jr t9 | t9 ();
| label_6:
0x00018298 lw v0, -0x7990(gp) | v0 = *((gp - 7780));
0x0001829c lw a2, -0x7fd8(gp) | a2 = *(gp);
0x000182a0 lw t9, -0x7798(gp) | t9 = sym.imp.__fprintf_chk
0x000182a4 lw a0, (v0) | a0 = *(v0);
0x000182a8 move a3, s5 | a3 = s5;
| /* str._3_Could_not_get_file_descriptor_for__s:__m_n */
0x000182ac addiu a2, a2, -0x2d58 | a2 += -0x2d58;
0x000182b0 addiu a1, zero, 1 | a1 = 1;
0x000182b4 jalr t9 | t9 ();
0x000182b8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000182bc b 0x18190 |
| } while (1);
| label_8:
0x000182c0 lw v0, -0x7990(gp) | v0 = *((gp - 7780));
0x000182c4 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x000182c8 lw t9, -0x7798(gp) | t9 = sym.imp.__fprintf_chk
0x000182cc lw a0, (v0) | a0 = *(v0);
0x000182d0 move a3, s5 | a3 = s5;
| /* str._3_Could_not_write__s:__m_n */
0x000182d4 addiu a2, a2, -0x2cf8 | a2 += -0x2cf8;
0x000182d8 addiu a1, zero, 1 | a1 = 1;
0x000182dc jalr t9 | t9 ();
0x000182e0 lw gp, 0x10(sp) | gp = *(var_10h);
0x000182e4 b 0x181b4 | goto label_0;
| label_10:
0x000182e8 lw v0, -0x7990(gp) | v0 = *((gp - 7780));
0x000182ec lw a2, -0x7fd8(gp) | a2 = *(gp);
0x000182f0 lw t9, -0x7798(gp) | t9 = sym.imp.__fprintf_chk
0x000182f4 lw a0, (v0) | a0 = *(v0);
0x000182f8 move a3, s5 | a3 = s5;
| /* str._3_Could_not_close__s:__m_n */
0x000182fc addiu a2, a2, -0x2cb8 | a2 += -0x2cb8;
0x00018300 addiu a1, zero, 1 | a1 = 1;
0x00018304 jalr t9 | t9 ();
0x00018308 lw gp, 0x10(sp) | gp = *(var_10h);
0x0001830c b 0x181e4 | goto label_1;
| label_9:
0x00018310 lw v0, -0x7990(gp) | v0 = *((gp - 7780));
0x00018314 lw a2, -0x7fd8(gp) | a2 = *(gp);
0x00018318 lw t9, -0x7798(gp) | t9 = sym.imp.__fprintf_chk
0x0001831c lw a0, (v0) | a0 = *(v0);
0x00018320 move a3, s5 | a3 = s5;
| /* str._3_Could_not_flush__s:__m_n */
0x00018324 addiu a2, a2, -0x2cd8 | a2 += -0x2cd8;
0x00018328 addiu a1, zero, 1 | a1 = 1;
0x0001832c jalr t9 | t9 ();
0x00018330 lw gp, 0x10(sp) | gp = *(var_10h);
0x00018334 b 0x181cc | goto label_2;
| label_7:
0x00018338 lw v0, -0x7990(gp) | v0 = *((gp - 7780));
0x0001833c lw a2, -0x7fd8(gp) | a2 = *(gp);
0x00018340 lw t9, -0x7798(gp) | t9 = sym.imp.__fprintf_chk
0x00018344 lw a0, (v0) | a0 = *(v0);
0x00018348 move a3, s5 | a3 = s5;
| /* str._3_Could_not_set_permissions_on__s:__m_n */
0x0001834c addiu a2, a2, -0x2d28 | a2 += -0x2d28;
0x00018350 addiu a1, zero, 1 | a1 = 1;
0x00018354 jalr t9 | t9 ();
0x00018358 lw gp, 0x10(sp) | gp = *(var_10h);
0x0001835c b 0x18190 | goto label_3;
| }
[*] Function printf used 18 times focusd