[*] Binary protection state of res_finder
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of res_finder
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/res_finder @ 0x2504 */
| #include <stdint.h>
|
; (fcn) sym.default_resolution () | void default_resolution () {
0x00002504 lui gp, 2 |
0x00002508 addiu gp, gp, -0x64f4 |
0x0000250c addu gp, gp, t9 | gp += t9;
0x00002510 addiu sp, sp, -0x28 |
0x00002514 slt v0, zero, a1 | v0 = (0 < a1) ? 1 : 0;
0x00002518 addiu v1, zero, 1 | v1 = 1;
| if (v0 == 0) {
0x0000251c movn v1, a1, v0 | v1 = a1;
| }
0x00002520 lw t9, -0x7f98(gp) | t9 = sym.read_default_res_video1;
0x00002524 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00002528 sw ra, 0x24(sp) | *(var_24h) = ra;
0x0000252c sw s2, 0x20(sp) | *(var_20h) = s2;
0x00002530 sw s1, 0x1c(sp) | *(var_1ch) = s1;
0x00002534 sw s0, 0x18(sp) | *(var_18h) = s0;
0x00002538 move s2, a0 | s2 = a0;
0x0000253c addiu a0, v1, -1 | a0 = v1 + -1;
0x00002540 move s1, a1 | s1 = a1;
0x00002544 bal 0x1ba0 | sym_read_default_res_video1 ();
0x00002548 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000254c move a1, v0 | a1 = v0;
0x00002550 move a0, s1 | a0 = s1;
0x00002554 lw t9, -0x7ec4(gp) | t9 = sym.imp.libs_resolution_is_resolution_available;
0x00002558 move s0, v0 | s0 = v0;
0x0000255c jalr t9 | t9 ();
0x00002560 lw gp, 0x10(sp) | gp = *(var_10h);
0x00002564 beqz v0, 0x25a8 |
| while (1) {
0x00002568 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x0000256c lw t9, -0x7ecc(gp) | t9 = sym.imp.__fprintf_chk
0x00002570 move a0, s2 | a0 = s2;
0x00002574 move a3, s0 | a3 = s0;
0x00002578 addiu a2, a2, 0x32a0 | a2 += 0x32a0;
0x0000257c addiu a1, zero, 1 | a1 = 1;
0x00002580 jalr t9 | t9 ();
0x00002584 lw gp, 0x10(sp) | gp = *(var_10h);
0x00002588 lw ra, 0x24(sp) | ra = *(var_24h);
0x0000258c lw s2, 0x20(sp) | s2 = *(var_20h);
0x00002590 lw s1, 0x1c(sp) | s1 = *(var_1ch);
0x00002594 move a0, s0 | a0 = s0;
0x00002598 lw t9, -0x7f0c(gp) | t9 = sym.imp.free;
0x0000259c lw s0, 0x18(sp) | s0 = *(var_18h);
0x000025a0 addiu sp, sp, 0x28 |
0x000025a4 jr t9 | t9 ();
0x000025a8 lw t9, -0x7f0c(gp) | t9 = sym.imp.free;
0x000025ac move a0, s0 | a0 = s0;
0x000025b0 jalr t9 | t9 ();
0x000025b4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000025b8 lw t9, -0x7f38(gp) | t9 = sym.imp.libs_resolution_default_resolution_name;
0x000025bc move a0, s1 | a0 = s1;
0x000025c0 jalr t9 | t9 ();
0x000025c4 move s0, v0 | s0 = v0;
0x000025c8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000025cc b 0x2568 |
| }
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/res_finder @ 0x2a18 */
| #include <stdint.h>
|
; (fcn) sym.do_write_capturemode_type () | void do_write_capturemode_type () {
0x00002a18 lui gp, 2 |
0x00002a1c addiu gp, gp, -0x6a08 |
0x00002a20 addu gp, gp, t9 | gp += t9;
0x00002a24 lw v0, -0x7f34(gp) | v0 = *((gp - 8141));
0x00002a28 addiu sp, sp, -0x78 |
0x00002a2c lw t9, -0x7ed8(gp) | t9 = sym.imp.g_key_file_new;
0x00002a30 sw v0, 0x2c(sp) | *(var_2ch) = v0;
0x00002a34 lw v0, (v0) | v0 = *(v0);
0x00002a38 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00002a3c sw ra, 0x74(sp) | *(var_74h) = ra;
0x00002a40 sw s6, 0x68(sp) | *(var_68h) = s6;
0x00002a44 sw s5, 0x64(sp) | *(var_64h) = s5;
0x00002a48 sw s4, 0x60(sp) | *(var_60h) = s4;
0x00002a4c sw s3, 0x5c(sp) | *(var_5ch) = s3;
0x00002a50 sw s0, 0x50(sp) | *(var_50h) = s0;
0x00002a54 sw fp, 0x70(sp) | *(var_70h) = fp;
0x00002a58 sw s7, 0x6c(sp) | *(var_6ch) = s7;
0x00002a5c sw s2, 0x58(sp) | *(var_58h) = s2;
0x00002a60 sw s1, 0x54(sp) | *(var_54h) = s1;
0x00002a64 sw v0, 0x4c(sp) | *(var_4ch) = v0;
0x00002a68 sw zero, 0x34(sp) | *(var_34h) = 0;
0x00002a6c move s3, a0 | s3 = a0;
0x00002a70 move s0, a1 | s0 = a1;
0x00002a74 move s6, a2 | s6 = a2;
0x00002a78 jalr t9 | t9 ();
0x00002a7c lw gp, 0x18(sp) | gp = *(var_18h);
0x00002a80 addiu s4, sp, 0x34 | s4 = sp + 0x34;
0x00002a84 move a3, s4 | a3 = s4;
0x00002a88 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00002a8c lw t9, -0x7f48(gp) | t9 = sym.imp.g_key_file_load_from_file;
0x00002a90 move a2, zero | a2 = 0;
0x00002a94 addiu a1, a1, 0x33c0 | a1 += str._usr_share_resolutions_resolution.conf;
0x00002a98 move a0, v0 | a0 = v0;
0x00002a9c move s5, v0 | s5 = v0;
0x00002aa0 jalr t9 | t9 ();
0x00002aa4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00002aa8 beqz v0, 0x2c18 | goto label_1;
| }
0x00002aac lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x00002ab0 lw t9, -0x7ecc(gp) | t9 = sym.imp.__fprintf_chk
0x00002ab4 addiu a2, a2, 0x3424 | a2 += str.enum:;
0x00002ab8 addiu a1, zero, 1 | a1 = 1;
0x00002abc move a0, s3 | a0 = s3;
0x00002ac0 jalr t9 | t9 ();
0x00002ac4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (s6 <= 0) {
0x00002ac8 blez s6, 0x2bd8 | goto label_2;
| }
0x00002acc lw a3, (s0) | a3 = *(s0);
0x00002ad0 addiu v0, a3, -1 | v0 = a3 + -1;
0x00002ad4 sltiu v0, v0, 6 | v0 = (v0 < 6) ? 1 : 0;
0x00002ad8 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| if (v0 == 0) {
0x00002adc beqz v0, 0x2bd8 | goto label_2;
| }
0x00002ae0 lw s7, -0x7fdc(gp) | s7 = *((gp - 8183));
0x00002ae4 sw v0, 0x20(sp) | *(var_20h_2) = v0;
0x00002ae8 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00002aec move s1, zero | s1 = 0;
0x00002af0 addiu v0, v0, 0x32f4 | v0 += 0x32f4;
0x00002af4 sw v0, 0x28(sp) | *(var_28h_2) = v0;
0x00002af8 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00002afc addiu s2, sp, 0x38 | s2 = sp + 0x38;
0x00002b00 addiu v0, v0, 0x3458 | v0 += str._d_s;
0x00002b04 addiu s7, s7, 0x342c | s7 += str.ResolutionSet_d;
0x00002b08 sw v0, 0x24(sp) | *(var_24h_2) = v0;
0x00002b0c b 0x2b7c |
| while (v0 != 0) {
0x00002b10 lw t9, -0x7ecc(gp) | t9 = sym.imp.__fprintf_chk
| if (s1 != 0) {
0x00002b14 beqz s1, 0x2b2c |
0x00002b18 lw a2, 0x28(sp) | a2 = *(var_28h_2);
0x00002b1c addiu a1, zero, 1 | a1 = 1;
0x00002b20 move a0, s3 | a0 = s3;
0x00002b24 jalr t9 | t9 ();
0x00002b28 lw gp, 0x18(sp) | gp = *(var_18h);
| }
0x00002b2c lw t9, -0x7ecc(gp) | t9 = sym.imp.__fprintf_chk
0x00002b30 lw a3, (s0) | a3 = *(s0);
0x00002b34 lw a2, 0x24(sp) | a2 = *(var_24h_2);
0x00002b38 addiu a1, zero, 1 | a1 = 1;
0x00002b3c move a0, s3 | a0 = s3;
0x00002b40 sw fp, 0x10(sp) | *(var_10h_2) = fp;
0x00002b44 jalr t9 | t9 ();
0x00002b48 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002b4c move a0, fp | a0 = fp;
0x00002b50 lw t9, -0x7ebc(gp) | t9 = sym.imp.g_free;
0x00002b54 addiu s1, s1, 1 | s1++;
0x00002b58 jalr t9 | t9 ();
0x00002b5c lw gp, 0x18(sp) | gp = *(var_18h);
| if (s6 == s1) {
0x00002b60 beq s6, s1, 0x2bd8 | goto label_2;
| }
0x00002b64 addiu s0, s0, 4 | s0 += 4;
0x00002b68 lw a3, (s0) | a3 = *(s0);
0x00002b6c addiu v0, a3, -1 | v0 = a3 + -1;
0x00002b70 sltiu v0, v0, 6 | v0 = (v0 < 6) ? 1 : 0;
0x00002b74 lw v0, 0x2c(sp) | v0 = *(var_2ch);
| if (v0 == 0) {
0x00002b78 beqz v0, 0x2bdc | goto label_3;
| }
0x00002b7c lw t9, -0x7f28(gp) | t9 = sym.imp.g_snprintf;
0x00002b80 move a2, s7 | a2 = s7;
0x00002b84 addiu a1, zero, 0x14 | a1 = 0x14;
0x00002b88 move a0, s2 | a0 = s2;
0x00002b8c jalr t9 | t9 ();
0x00002b90 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002b94 lw v0, 0x20(sp) | v0 = *(var_20h_2);
0x00002b98 move a3, s4 | a3 = s4;
0x00002b9c lw t9, -0x7ec8(gp) | t9 = sym.imp.g_key_file_get_string;
0x00002ba0 addiu a2, v0, 0x343c | a2 = v0 + str.Name;
0x00002ba4 move a1, s2 | a1 = s2;
0x00002ba8 move a0, s5 | a0 = s5;
0x00002bac jalr t9 | t9 ();
0x00002bb0 move fp, v0 | fp = v0;
0x00002bb4 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002bb8 bnez v0, 0x2b10 |
| }
0x00002bbc addiu s6, s6, -1 | s6 += -1;
0x00002bc0 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
| if (s6 == s1) {
0x00002bc4 beq s6, s1, 0x2c60 | goto label_4;
| }
| label_0:
0x00002bc8 lw t9, -0x7edc(gp) | t9 = sym.imp.g_clear_error;
0x00002bcc move a0, s4 | a0 = s4;
0x00002bd0 jalr t9 | t9 ();
0x00002bd4 lw gp, 0x18(sp) | gp = *(var_18h);
| do {
| label_2:
0x00002bd8 lw v0, 0x2c(sp) | v0 = *(var_2ch);
| label_3:
0x00002bdc lw v1, 0x4c(sp) | v1 = *(var_4ch);
0x00002be0 lw v0, (v0) | v0 = *(v0);
0x00002be4 lw ra, 0x74(sp) | ra = *(var_74h);
| if (v1 != v0) {
0x00002be8 bne v1, v0, 0x2c80 | goto label_5;
| }
0x00002bec lw fp, 0x70(sp) | fp = *(var_70h);
0x00002bf0 lw s7, 0x6c(sp) | s7 = *(var_6ch);
0x00002bf4 lw s6, 0x68(sp) | s6 = *(var_68h);
0x00002bf8 lw s5, 0x64(sp) | s5 = *(var_64h);
0x00002bfc lw s4, 0x60(sp) | s4 = *(var_60h);
0x00002c00 lw s3, 0x5c(sp) | s3 = *(var_5ch);
0x00002c04 lw s2, 0x58(sp) | s2 = *(var_58h);
0x00002c08 lw s1, 0x54(sp) | s1 = *(var_54h);
0x00002c0c lw s0, 0x50(sp) | s0 = *(var_50h);
0x00002c10 addiu sp, sp, 0x78 |
0x00002c14 jr ra | return v0;
| label_1:
0x00002c18 lw v0, 0x34(sp) | v0 = *(var_34h);
0x00002c1c lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x00002c20 lw t9, -0x7f3c(gp) | t9 = sym.imp.__syslog_chk;
0x00002c24 lw a3, 8(v0) | a3 = *((v0 + 2));
0x00002c28 addiu a2, a2, 0x33e8 | a2 += str.Failed_to_load__usr_share_resolutions_resolution.conf:__s;
0x00002c2c addiu a1, zero, 1 | a1 = 1;
0x00002c30 addiu a0, zero, 3 | a0 = 3;
0x00002c34 jalr t9 | t9 ();
0x00002c38 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002c3c lw t9, -0x7edc(gp) | t9 = sym.imp.g_clear_error;
0x00002c40 move a0, s4 | a0 = s4;
0x00002c44 jalr t9 | t9 ();
0x00002c48 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002c4c lw t9, -0x7f64(gp) | t9 = sym.imp.g_key_file_free;
0x00002c50 move a0, s5 | a0 = s5;
0x00002c54 jalr t9 | t9 ();
0x00002c58 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002c5c b 0x2bd8 |
| } while (1);
| label_4:
0x00002c60 lw t9, -0x7f3c(gp) | t9 = sym.imp.__syslog_chk;
0x00002c64 move a3, s2 | a3 = s2;
0x00002c68 addiu a2, a2, 0x3444 | a2 += str.Unable_to_read__s_n;
0x00002c6c addiu a1, zero, 1 | a1 = 1;
0x00002c70 addiu a0, zero, 4 | a0 = 4;
0x00002c74 jalr t9 | t9 ();
0x00002c78 lw gp, 0x18(sp) | gp = *(var_18h);
0x00002c7c b 0x2bc8 | goto label_0;
| label_5:
0x00002c80 lw t9, -0x7f4c(gp) | t9 = sym.imp.__stack_chk_fail;
0x00002c84 jalr t9 | t9 ();
0x00002c88 nop |
0x00002c8c nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/res_finder @ 0x1e3c */
| #include <stdint.h>
|
; (fcn) sym.get_max_zoom () | void get_max_zoom () {
0x00001e3c lui gp, 2 |
0x00001e40 addiu gp, gp, -0x5e2c |
0x00001e44 addu gp, gp, t9 | gp += t9;
0x00001e48 addiu sp, sp, -0x858 |
0x00001e4c sltiu v0, a1, 2 | v0 = (a1 < 2) ? 1 : 0;
0x00001e50 sw s6, 0x848(sp) | *(var_848h) = s6;
0x00001e54 lw s6, -0x7f34(gp) | s6 = *((gp - 8141));
0x00001e58 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00001e5c sw ra, 0x854(sp) | *(var_854h) = ra;
0x00001e60 lw v1, (s6) | v1 = *(s6);
0x00001e64 sw fp, 0x850(sp) | *(var_850h) = fp;
0x00001e68 sw s7, 0x84c(sp) | *(var_84ch) = s7;
0x00001e6c sw s5, 0x844(sp) | *(var_844h) = s5;
0x00001e70 sw s4, 0x840(sp) | *(var_840h) = s4;
0x00001e74 sw s3, 0x83c(sp) | *(var_83ch) = s3;
0x00001e78 sw s2, 0x838(sp) | *(var_838h) = s2;
0x00001e7c sw s1, 0x834(sp) | *(var_834h) = s1;
0x00001e80 sw s0, 0x830(sp) | *(var_830h) = s0;
0x00001e84 sw a0, 0x20(sp) | *(var_20h_2) = a0;
0x00001e88 sw v1, 0x82c(sp) | *(var_82ch) = v1;
0x00001e8c lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| if (v0 == 0) {
0x00001e90 bnez v0, 0x1ebc |
0x00001e94 lw a3, -0x7fdc(gp) | a3 = *((gp - 8183));
0x00001e98 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00001e9c addiu v0, v0, 0x32b8 | v0 += str.format__MAX_ZOOM_VALUES__format__MAX_ZOOM_RESOLUTIONS;
0x00001ea0 lw t9, -0x7f08(gp) | t9 = sym.imp.g_assertion_message_expr;
0x00001ea4 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x00001ea8 addiu a3, a3, 0x3460 | a3 += str.get_max_zoom;
0x00001eac addiu a2, zero, 0x83 | a2 = 0x83;
0x00001eb0 addiu a1, a1, 0x32a8 | a1 += str.res_finder.c;
0x00001eb4 move a0, zero | a0 = 0;
0x00001eb8 jalr t9 | t9 ();
| }
0x00001ebc lw t9, -0x7ee0(gp) | t9 = sym.imp.get_resolution_list_all;
0x00001ec0 move a0, a2 | a0 = a2;
0x00001ec4 sb zero, 0x2c(sp) | *(var_2ch_2) = 0;
0x00001ec8 move s1, a2 | s1 = a2;
0x00001ecc move s3, a1 | s3 = a1;
0x00001ed0 jalr t9 | t9 ();
0x00001ed4 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001ed8 move s0, v0 | s0 = v0;
0x00001edc move a0, s1 | a0 = s1;
0x00001ee0 lw t9, -0x7f54(gp) | t9 = sym.imp.get_default_aspect_ratio;
0x00001ee4 lui s1, 0xf | s1 = 0xf0000;
0x00001ee8 jalr t9 | t9 ();
0x00001eec lw v1, (s0) | v1 = *(s0);
0x00001ef0 ori s1, s1, 0xfc9c | s1 |= 0xfc9c;
0x00001ef4 lw gp, 0x18(sp) | gp = *(var_18h);
0x00001ef8 and s1, v0, s1 | s1 = v0 & s1;
0x00001efc addiu s2, sp, 0x2c | s2 = sp + 0x2c;
| if (v1 == 0) {
0x00001f00 beqz v1, 0x1fe4 | goto label_5;
| }
0x00001f04 lw s5, -0x7fdc(gp) | s5 = *((gp - 8183));
0x00001f08 lw s4, -0x7fdc(gp) | s4 = *((gp - 8183));
0x00001f0c addiu v0, s5, 0x32fc | v0 = s5 + str.__s_;
0x00001f10 lw s7, -0x7fdc(gp) | s7 = *((gp - 8183));
0x00001f14 move fp, zero | fp = 0;
0x00001f18 addiu a0, zero, 1 | a0 = 1;
0x00001f1c addiu s2, sp, 0x2c | s2 = sp + 0x2c;
0x00001f20 sw v0, 0x24(sp) | *(var_24h) = v0;
0x00001f24 addiu s4, s4, 0x32f8 | s4 += 0x32f8;
0x00001f28 b 0x1f44 |
| while (fp == 0) {
| if (v0 != 0) {
0x00001f2c beql v0, zero, 0x1f34 |
0x00001f30 lw fp, 4(s0) | fp = *((s0 + 1));
| }
0x00001f34 addiu s0, s0, 0x14 | s0 += 0x14;
| label_0:
0x00001f38 lw v0, (s0) | v0 = *(s0);
0x00001f3c lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
| if (v0 == 0) {
0x00001f40 beqz v0, 0x1fe8 | goto label_4;
| }
| label_1:
0x00001f44 lw v0, 0x10(s0) | v0 = *((s0 + 4));
0x00001f48 beqz fp, 0x1f2c |
| }
0x00001f4c addiu s0, s0, 0x14 | s0 += 0x14;
| if (v0 == 0) {
0x00001f50 bnel v0, zero, 0x1f38 | goto label_0;
| }
0x00001f54 lw v0, 0xc(s0) | v0 = *((s0 + 3));
0x00001f58 and v0, s1, v0 | v0 = s1 & v0;
| if (v0 == 0) {
0x00001f5c beql v0, zero, 0x1f38 | goto label_0;
| }
0x00001f60 addiu s0, s0, 0x14 | s0 += 0x14;
0x00001f64 lw t9, -0x7ee4(gp) | t9 = sym.imp.g_strlcat;
| if (a0 == 0) {
0x00001f68 beqz a0, 0x2040 | goto label_6;
| }
0x00001f6c lw v0, (s0) | v0 = *(s0);
| if (s3 == 0) {
0x00001f70 bnel s3, zero, 0x205c | goto label_7;
| }
| label_2:
0x00001f74 addiu v0, zero, 0x64 | v0 = 0x64;
0x00001f78 mul v0, fp, v0 | __asm ("mul v0, fp, v0");
0x00001f7c lw a0, 4(s0) | a0 = *((s0 + 1));
0x00001f80 lw t9, -0x7f68(gp) | t9 = sym.imp.__snprintf_chk;
0x00001f84 addiu s5, sp, 0x42c | s5 = sp + 0x42c;
0x00001f88 sw s4, 0x10(sp) | *(var_10h_2) = s4;
0x00001f8c divu zero, v0, a0 | __asm ("divu zero, v0, a0");
0x00001f90 teq a0, zero, 7 | __asm ("teq a0, zero, 7");
0x00001f94 addiu a3, zero, 0x400 | a3 = 0x400;
0x00001f98 addiu a2, zero, 1 | a2 = 1;
0x00001f9c addiu a1, zero, 0x400 | a1 = 0x400;
0x00001fa0 move a0, s5 | a0 = s5;
0x00001fa4 mflo v0 | __asm ("mflo v0");
0x00001fa8 sw v0, 0x14(sp) | *(var_14h) = v0;
0x00001fac jalr t9 | t9 ();
0x00001fb0 lw gp, 0x18(sp) | gp = *(var_18h);
| label_3:
0x00001fb4 lw t9, -0x7ee4(gp) | t9 = sym.imp.g_strlcat;
0x00001fb8 addiu a2, zero, 0x400 | a2 = 0x400;
0x00001fbc move a1, s5 | a1 = s5;
0x00001fc0 move a0, s2 | a0 = s2;
0x00001fc4 jalr t9 | t9 ();
0x00001fc8 sltiu v0, v0, 0x400 | v0 = (v0 < 0x400) ? 1 : 0;
0x00001fcc lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00001fd0 beqz v0, 0x1fe4 | goto label_5;
| }
0x00001fd4 addiu s0, s0, 0x14 | s0 += 0x14;
0x00001fd8 lw v0, (s0) | v0 = *(s0);
0x00001fdc move a0, zero | a0 = 0;
| if (v0 != 0) {
0x00001fe0 bnez v0, 0x1f44 | goto label_1;
| }
| label_5:
0x00001fe4 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
| label_4:
0x00001fe8 lw t9, -0x7ecc(gp) | t9 = sym.imp.__fprintf_chk
0x00001fec lw a0, 0x20(sp) | a0 = *(var_20h_2);
0x00001ff0 move a3, s2 | a3 = s2;
0x00001ff4 addiu a2, a2, 0x32a0 | a2 += 0x32a0;
0x00001ff8 addiu a1, zero, 1 | a1 = 1;
0x00001ffc jalr t9 | t9 ();
0x00002000 lw v1, 0x82c(sp) | v1 = *(var_82ch);
0x00002004 lw v0, (s6) | v0 = *(s6);
0x00002008 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v1 != v0) {
0x0000200c bne v1, v0, 0x2098 | goto label_8;
| }
0x00002010 lw ra, 0x854(sp) | ra = *(var_854h);
0x00002014 lw fp, 0x850(sp) | fp = *(var_850h);
0x00002018 lw s7, 0x84c(sp) | s7 = *(var_84ch);
0x0000201c lw s6, 0x848(sp) | s6 = *(var_848h);
0x00002020 lw s5, 0x844(sp) | s5 = *(var_844h);
0x00002024 lw s4, 0x840(sp) | s4 = *(var_840h);
0x00002028 lw s3, 0x83c(sp) | s3 = *(var_83ch);
0x0000202c lw s2, 0x838(sp) | s2 = *(var_838h);
0x00002030 lw s1, 0x834(sp) | s1 = *(var_834h);
0x00002034 lw s0, 0x830(sp) | s0 = *(var_830h);
0x00002038 addiu sp, sp, 0x858 |
0x0000203c jr ra | return v0;
| label_6:
0x00002040 addiu a2, zero, 0x400 | a2 = 0x400;
0x00002044 addiu a1, s7, 0x32f4 | a1 = s7 + 0x32f4;
0x00002048 move a0, s2 | a0 = s2;
0x0000204c jalr t9 | t9 ();
0x00002050 lw gp, 0x18(sp) | gp = *(var_18h);
| if (s3 == 0) {
0x00002054 beqz s3, 0x1f74 | goto label_2;
| }
0x00002058 lw v0, (s0) | v0 = *(s0);
| label_7:
0x0000205c lw t9, -0x7f68(gp) | t9 = sym.imp.__snprintf_chk;
0x00002060 sw v0, 0x14(sp) | *(var_14h) = v0;
0x00002064 lw v0, 0x24(sp) | v0 = *(var_24h);
0x00002068 addiu s5, sp, 0x42c | s5 = sp + 0x42c;
0x0000206c sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x00002070 addiu a3, zero, 0x400 | a3 = 0x400;
0x00002074 addiu a2, zero, 1 | a2 = 1;
0x00002078 addiu a1, zero, 0x400 | a1 = 0x400;
0x0000207c move a0, s5 | a0 = s5;
0x00002080 jalr t9 | t9 ();
0x00002084 sltiu v0, v0, 0x400 | v0 = (v0 < 0x400) ? 1 : 0;
0x00002088 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x0000208c bnez v0, 0x1fb4 | goto label_3;
| }
0x00002090 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x00002094 b 0x1fe8 | goto label_4;
| label_8:
0x00002098 lw t9, -0x7f4c(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000209c jalr t9 | t9 ();
0x000020a0 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/res_finder @ 0x20a4 */
| #include <stdint.h>
|
; (fcn) sym.get_parhand_resolutions () | void get_parhand_resolutions () {
0x000020a4 lui gp, 2 |
0x000020a8 addiu gp, gp, -0x6094 |
0x000020ac addu gp, gp, t9 | gp += t9;
0x000020b0 addiu sp, sp, -0x448 |
0x000020b4 sw s7, 0x43c(sp) | *(var_43ch) = s7;
0x000020b8 lw s7, -0x7f34(gp) | s7 = *((gp - 8141));
0x000020bc sw gp, 0x10(sp) | *(var_10h) = gp;
0x000020c0 sw fp, 0x440(sp) | *(var_440h) = fp;
0x000020c4 lw v0, (s7) | v0 = *(s7);
0x000020c8 move fp, a0 | fp = a0;
0x000020cc sw ra, 0x444(sp) | *(var_444h) = ra;
0x000020d0 sw s6, 0x438(sp) | *(var_438h) = s6;
0x000020d4 sw s5, 0x434(sp) | *(var_434h) = s5;
0x000020d8 sw s4, 0x430(sp) | *(var_430h) = s4;
0x000020dc sw s3, 0x42c(sp) | *(var_42ch) = s3;
0x000020e0 sw s2, 0x428(sp) | *(var_428h) = s2;
0x000020e4 sw s1, 0x424(sp) | *(var_424h) = s1;
0x000020e8 sw s0, 0x420(sp) | *(var_420h) = s0;
0x000020ec move a0, a2 | a0 = a2;
0x000020f0 sb zero, 0x1c(sp) | *(var_1ch) = 0;
0x000020f4 sw v0, 0x41c(sp) | *(var_41ch) = v0;
0x000020f8 lw t9, -0x7ee8(gp) | t9 = sym.imp.libs_resolution_resolution_names;
| if (a1 != 0) {
0x000020fc bnez a1, 0x2264 | goto label_1;
| }
0x00002100 lw t9, -0x7f7c(gp) | t9 = sym.imp.libs_resolution_resolution_names_all;
0x00002104 addiu a1, sp, 0x18 | a1 = sp + 0x18;
0x00002108 jalr t9 | t9 ();
0x0000210c lw gp, 0x10(sp) | gp = *(var_10h);
0x00002110 move s6, v0 | s6 = v0;
| label_0:
0x00002114 lw a1, (s6) | a1 = *(s6);
0x00002118 addiu s1, sp, 0x1c | s1 = sp + 0x1c;
| if (a1 == 0) {
0x0000211c beqz a1, 0x21e8 | goto label_2;
| }
0x00002120 lw s5, -0x7fdc(gp) | s5 = *((gp - 8183));
0x00002124 lw s4, -0x7fdc(gp) | s4 = *((gp - 8183));
0x00002128 addiu s3, zero, -4 | s3 = -4;
0x0000212c addiu s0, s6, 4 | s0 = s6 + 4;
0x00002130 addiu s1, sp, 0x1c | s1 = sp + 0x1c;
0x00002134 subu s3, s3, s6 | __asm ("subu s3, s3, s6");
0x00002138 addiu s5, s5, 0x3304 | s5 += 0x3304;
0x0000213c addiu s4, s4, 0x32f4 | s4 += 0x32f4;
0x00002140 b 0x2160 |
| while (v0 != 0) {
0x00002144 addiu s0, s0, 4 | s0 += 4;
0x00002148 move a1, s4 | a1 = s4;
0x0000214c addiu a2, zero, 0x400 | a2 = 0x400;
0x00002150 move a0, s1 | a0 = s1;
0x00002154 jalr t9 | t9 ();
0x00002158 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000215c lw a1, -4(s0) | a1 = *((s0 - 1));
0x00002160 lw t9, -0x7ee4(gp) | t9 = sym.imp.g_strlcat;
0x00002164 addiu a2, zero, 0x400 | a2 = 0x400;
0x00002168 move a0, s1 | a0 = s1;
0x0000216c jalr t9 | t9 ();
0x00002170 lw gp, 0x10(sp) | gp = *(var_10h);
0x00002174 lw a0, -4(s0) | a0 = *((s0 - 1));
0x00002178 lw t9, -0x7f0c(gp) | t9 = sym.imp.free;
0x0000217c addu s2, s3, s0 | s2 = s3 + s0;
0x00002180 jalr t9 | t9 ();
0x00002184 lw v0, 0x18(sp) | v0 = *(var_18h);
0x00002188 lwx v0, s2(v0) | __asm ("lwx v0, s2(v0)");
0x0000218c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x00002190 beqz v0, 0x21dc |
0x00002194 lw t9, -0x7ee4(gp) | t9 = sym.imp.g_strlcat;
0x00002198 addiu a2, zero, 0x400 | a2 = 0x400;
0x0000219c move a1, s5 | a1 = s5;
0x000021a0 move a0, s1 | a0 = s1;
0x000021a4 jalr t9 | t9 ();
0x000021a8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000021ac lw a1, 0x18(sp) | a1 = *(var_18h);
0x000021b0 addiu a2, zero, 0x400 | a2 = 0x400;
0x000021b4 lw t9, -0x7ee4(gp) | t9 = sym.imp.g_strlcat;
0x000021b8 lwx a1, s2(a1) | __asm ("lwx a1, s2(a1)");
0x000021bc move a0, s1 | a0 = s1;
0x000021c0 jalr t9 | t9 ();
0x000021c4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000021c8 lw a0, 0x18(sp) | a0 = *(var_18h);
0x000021cc lw t9, -0x7f0c(gp) | t9 = sym.imp.free;
0x000021d0 lwx a0, s2(a0) | __asm ("lwx a0, s2(a0)");
0x000021d4 jalr t9 | t9 ();
0x000021d8 lw gp, 0x10(sp) | gp = *(var_10h);
| }
0x000021dc lw v0, (s0) | v0 = *(s0);
0x000021e0 lw t9, -0x7ee4(gp) | t9 = sym.imp.g_strlcat;
0x000021e4 bnez v0, 0x2144 |
| }
| label_2:
0x000021e8 lw t9, -0x7f0c(gp) | t9 = sym.imp.free;
0x000021ec lw a0, 0x18(sp) | a0 = *(var_18h);
0x000021f0 jalr t9 | t9 ();
0x000021f4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000021f8 lw t9, -0x7f0c(gp) | t9 = sym.imp.free;
0x000021fc move a0, s6 | a0 = s6;
0x00002200 jalr t9 | t9 ();
0x00002204 lw gp, 0x10(sp) | gp = *(var_10h);
0x00002208 move a3, s1 | a3 = s1;
0x0000220c addiu a1, zero, 1 | a1 = 1;
0x00002210 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x00002214 lw t9, -0x7ecc(gp) | t9 = sym.imp.__fprintf_chk
0x00002218 addiu a2, a2, 0x32a0 | a2 += 0x32a0;
0x0000221c move a0, fp | a0 = fp;
0x00002220 jalr t9 | t9 ();
0x00002224 lw v1, 0x41c(sp) | v1 = *(var_41ch);
0x00002228 lw v0, (s7) | v0 = *(s7);
0x0000222c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v1 == v0) {
0x00002230 bne v1, v0, 0x2278 |
0x00002234 lw ra, 0x444(sp) | ra = *(var_444h);
0x00002238 lw fp, 0x440(sp) | fp = *(var_440h);
0x0000223c lw s7, 0x43c(sp) | s7 = *(var_43ch);
0x00002240 lw s6, 0x438(sp) | s6 = *(var_438h);
0x00002244 lw s5, 0x434(sp) | s5 = *(var_434h);
0x00002248 lw s4, 0x430(sp) | s4 = *(var_430h);
0x0000224c lw s3, 0x42c(sp) | s3 = *(var_42ch);
0x00002250 lw s2, 0x428(sp) | s2 = *(var_428h);
0x00002254 lw s1, 0x424(sp) | s1 = *(var_424h);
0x00002258 lw s0, 0x420(sp) | s0 = *(var_420h);
0x0000225c addiu sp, sp, 0x448 |
0x00002260 jr ra | return v1;
| label_1:
0x00002264 addiu a1, sp, 0x18 | a1 = sp + 0x18;
0x00002268 jalr t9 | t9 ();
0x0000226c move s6, v0 | s6 = v0;
0x00002270 lw gp, 0x10(sp) | gp = *(var_10h);
0x00002274 b 0x2114 | goto label_0;
| }
0x00002278 lw t9, -0x7f4c(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000227c jalr t9 | t9 ();
0x00002280 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/res_finder @ 0x2284 */
| #include <stdint.h>
|
; (fcn) sym.get_privacy_mask_resolution_ambarella () | void get_privacy_mask_resolution_ambarella () {
0x00002284 lui gp, 2 |
0x00002288 addiu gp, gp, -0x6274 |
0x0000228c addu gp, gp, t9 | gp += t9;
0x00002290 addiu sp, sp, -0x50 |
0x00002294 lw t9, -0x7f60(gp) | t9 = sym.imp.g_bus_get_sync;
0x00002298 sw s2, 0x40(sp) | *(var_40h) = s2;
0x0000229c lw s2, -0x7f34(gp) | s2 = *((gp - 8141));
0x000022a0 sw s1, 0x3c(sp) | *(var_3ch) = s1;
0x000022a4 addiu s1, sp, 0x28 | s1 = sp + 0x28;
0x000022a8 lw v0, (s2) | v0 = *(s2);
0x000022ac sw gp, 0x20(sp) | *(var_20h) = gp;
0x000022b0 sw s4, 0x48(sp) | *(var_48h) = s4;
0x000022b4 sw ra, 0x4c(sp) | *(var_4ch) = ra;
0x000022b8 sw s3, 0x44(sp) | *(var_44h) = s3;
0x000022bc sw s0, 0x38(sp) | *(var_38h) = s0;
0x000022c0 move s4, a0 | s4 = a0;
0x000022c4 move a2, s1 | a2 = s1;
0x000022c8 move a1, zero | a1 = 0;
0x000022cc addiu a0, zero, 1 | a0 = 1;
0x000022d0 sw v0, 0x34(sp) | *(var_34h) = v0;
0x000022d4 sw zero, 0x28(sp) | *(var_28h) = 0;
0x000022d8 jalr t9 | t9 ();
0x000022dc nop |
0x000022e0 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x000022e4 beqz v0, 0x2440 | goto label_2;
| }
0x000022e8 move s0, v0 | s0 = v0;
0x000022ec lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x000022f0 lw a3, -0x7fdc(gp) | a3 = *((gp - 8183));
0x000022f4 addiu v0, v0, 0x3318 | v0 += str.com.axis.Ambad.Iav;
0x000022f8 sw v0, 0x14(sp) | *(var_14h) = v0;
0x000022fc lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00002300 lw t9, -0x7efc(gp) | t9 = sym.imp.g_dbus_proxy_new_sync;
0x00002304 addiu v0, v0, 0x332c | v0 += str._com_axis_Ambad_Iav;
0x00002308 sw s1, 0x1c(sp) | *(var_1ch_3) = s1;
0x0000230c sw zero, 0x18(sp) | *(var_18h_2) = 0;
0x00002310 sw v0, 0x10(sp) | *(var_10h_3) = v0;
0x00002314 addiu a3, a3, 0x3308 | a3 += str.com.axis.Ambad;
0x00002318 move a2, zero | a2 = 0;
0x0000231c move a1, zero | a1 = 0;
0x00002320 move a0, s0 | a0 = s0;
0x00002324 jalr t9 | t9 ();
0x00002328 move s3, v0 | s3 = v0;
0x0000232c lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x00002330 beqz v0, 0x2438 | goto label_3;
| }
0x00002334 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00002338 lw t9, -0x7ef4(gp) | t9 = sym.imp.g_dbus_proxy_call_sync;
0x0000233c addiu v0, zero, -1 | v0 = -1;
0x00002340 sw s1, 0x18(sp) | *(var_18h_2) = s1;
0x00002344 sw zero, 0x14(sp) | *(var_14h) = 0;
0x00002348 sw v0, 0x10(sp) | *(var_10h_3) = v0;
0x0000234c move a3, zero | a3 = 0;
0x00002350 move a2, zero | a2 = 0;
0x00002354 addiu a1, a1, 0x3340 | a1 += str.GetPrivacyMaskResolution;
0x00002358 move a0, s3 | a0 = s3;
0x0000235c jalr t9 | t9 ();
0x00002360 move s1, v0 | s1 = v0;
0x00002364 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x00002368 beqz v0, 0x2448 | goto label_4;
| }
0x0000236c lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00002370 lw t9, -0x7f30(gp) | t9 = sym.imp.g_variant_get;
0x00002374 move a0, v0 | a0 = v0;
0x00002378 addiu a3, sp, 0x30 | a3 = sp + 0x30;
0x0000237c addiu a2, sp, 0x2c | a2 = sp + 0x2c;
0x00002380 addiu a1, a1, 0x335c | a1 += str._uu_;
0x00002384 sw zero, 0x2c(sp) | *(var_2ch) = 0;
0x00002388 sw zero, 0x30(sp) | *(var_30h) = 0;
0x0000238c jalr t9 | t9 ();
0x00002390 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002394 move a0, s1 | a0 = s1;
0x00002398 lw t9, -0x7f50(gp) | t9 = sym.imp.g_variant_unref;
0x0000239c addiu s1, zero, 1 | s1 = 1;
0x000023a0 jalr t9 | t9 ();
0x000023a4 lw gp, 0x20(sp) | gp = *(var_20h);
0x000023a8 lw v0, 0x30(sp) | v0 = *(var_30h);
0x000023ac lw a3, 0x2c(sp) | a3 = *(var_2ch);
0x000023b0 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x000023b4 lw t9, -0x7ecc(gp) | t9 = sym.imp.__fprintf_chk
0x000023b8 sw v0, 0x10(sp) | *(var_10h_3) = v0;
0x000023bc addiu a2, a2, 0x3364 | a2 += str._ux_u;
0x000023c0 addiu a1, zero, 1 | a1 = 1;
0x000023c4 move a0, s4 | a0 = s4;
0x000023c8 jalr t9 | t9 ();
0x000023cc lw gp, 0x20(sp) | gp = *(var_20h);
| label_1:
0x000023d0 lw t9, -0x7ed4(gp) | t9 = sym.imp.g_object_unref;
0x000023d4 move a0, s3 | a0 = s3;
0x000023d8 jalr t9 | t9 ();
0x000023dc lw gp, 0x20(sp) | gp = *(var_20h);
| do {
0x000023e0 lw t9, -0x7ed4(gp) | t9 = sym.imp.g_object_unref;
0x000023e4 move a0, s0 | a0 = s0;
0x000023e8 jalr t9 | t9 ();
0x000023ec lw gp, 0x20(sp) | gp = *(var_20h);
| label_0:
0x000023f0 lw a0, 0x28(sp) | a0 = *(var_28h);
0x000023f4 lw t9, -0x7f6c(gp) | t9 = sym.imp.g_error_free;
| if (a0 != 0) {
0x000023f8 beqz a0, 0x2408 |
0x000023fc jalr t9 | t9 ();
0x00002400 nop |
0x00002404 lw gp, 0x20(sp) | gp = *(var_20h);
| }
0x00002408 lw a0, 0x34(sp) | a0 = *(var_34h);
0x0000240c lw v1, (s2) | v1 = *(s2);
0x00002410 move v0, s1 | v0 = s1;
| if (a0 != v1) {
0x00002414 bne a0, v1, 0x2450 | goto label_5;
| }
0x00002418 lw ra, 0x4c(sp) | ra = *(var_4ch);
0x0000241c lw s4, 0x48(sp) | s4 = *(var_48h);
0x00002420 lw s3, 0x44(sp) | s3 = *(var_44h);
0x00002424 lw s2, 0x40(sp) | s2 = *(var_40h);
0x00002428 lw s1, 0x3c(sp) | s1 = *(var_3ch);
0x0000242c lw s0, 0x38(sp) | s0 = *(var_38h);
0x00002430 addiu sp, sp, 0x50 |
0x00002434 jr ra | return v0;
| label_3:
0x00002438 move s1, zero | s1 = 0;
0x0000243c b 0x23e0 |
| } while (1);
| label_2:
0x00002440 move s1, zero | s1 = 0;
0x00002444 b 0x23f0 | goto label_0;
| label_4:
0x00002448 move s1, zero | s1 = 0;
0x0000244c b 0x23d0 | goto label_1;
| label_5:
0x00002450 lw t9, -0x7f4c(gp) | t9 = sym.imp.__stack_chk_fail;
0x00002454 jalr t9 | t9 ();
0x00002458 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/res_finder @ 0x245c */
| #include <stdint.h>
|
; (fcn) sym.get_resolutions () | void get_resolutions () {
0x0000245c lui gp, 2 |
0x00002460 addiu gp, gp, -0x644c |
0x00002464 addu gp, gp, t9 | gp += t9;
0x00002468 addiu sp, sp, -0x28 |
0x0000246c lw t9, -0x7f24(gp) | t9 = sym.imp.get_resolutions_string;
0x00002470 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00002474 sw s1, 0x20(sp) | *(var_20h) = s1;
0x00002478 sw ra, 0x24(sp) | *(var_24h) = ra;
0x0000247c move s1, a0 | s1 = a0;
0x00002480 sw s0, 0x1c(sp) | *(var_1ch) = s0;
0x00002484 move a0, a1 | a0 = a1;
| if (a2 != 0) {
0x00002488 bnez a2, 0x24dc | goto label_0;
| }
0x0000248c addiu a1, zero, 3 | a1 = 3;
0x00002490 jalr t9 | t9 ();
0x00002494 move s0, v0 | s0 = v0;
0x00002498 lw gp, 0x10(sp) | gp = *(var_10h);
| if (s0 == 0) {
0x0000249c beqz s0, 0x24f0 | goto label_1;
| }
| do {
0x000024a0 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x000024a4 lw t9, -0x7ecc(gp) | t9 = sym.imp.__fprintf_chk
0x000024a8 move a0, s1 | a0 = s1;
0x000024ac move a3, s0 | a3 = s0;
0x000024b0 addiu a2, a2, 0x32a0 | a2 += 0x32a0;
0x000024b4 addiu a1, zero, 1 | a1 = 1;
0x000024b8 jalr t9 | t9 ();
0x000024bc lw gp, 0x10(sp) | gp = *(var_10h);
0x000024c0 lw ra, 0x24(sp) | ra = *(var_24h);
0x000024c4 lw s1, 0x20(sp) | s1 = *(var_20h);
0x000024c8 move a0, s0 | a0 = s0;
0x000024cc lw t9, -0x7f0c(gp) | t9 = sym.imp.free;
0x000024d0 lw s0, 0x1c(sp) | s0 = *(var_1ch);
0x000024d4 addiu sp, sp, 0x28 |
0x000024d8 jr t9 | t9 ();
| label_0:
0x000024dc addiu a1, zero, 1 | a1 = 1;
0x000024e0 jalr t9 | t9 ();
0x000024e4 move s0, v0 | s0 = v0;
0x000024e8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000024ec bnez s0, 0x24a0 |
| } while (s0 != 0);
| label_1:
0x000024f0 lw ra, 0x24(sp) | ra = *(var_24h);
0x000024f4 lw s1, 0x20(sp) | s1 = *(var_20h);
0x000024f8 lw s0, 0x1c(sp) | s0 = *(var_1ch);
0x000024fc addiu sp, sp, 0x28 |
0x00002500 jr ra | return;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/res_finder @ 0x28d0 */
| #include <stdint.h>
|
; (fcn) sym.motion_detection_resolution () | void motion_detection_resolution () {
0x000028d0 lui gp, 2 |
0x000028d4 addiu gp, gp, -0x68c0 |
0x000028d8 addu gp, gp, t9 | gp += t9;
0x000028dc addiu sp, sp, -0x28 |
0x000028e0 lw t9, -0x7ec0(gp) | t9 = sym.imp.resolution_motion_detection_resolution;
0x000028e4 sw gp, 0x10(sp) | *(var_10h) = gp;
0x000028e8 sw a0, 0x1c(sp) | *(var_1ch) = a0;
0x000028ec sw ra, 0x24(sp) | *(var_24h) = ra;
0x000028f0 sw s0, 0x20(sp) | *(var_20h) = s0;
0x000028f4 jalr t9 | t9 ();
0x000028f8 nop |
0x000028fc lw gp, 0x10(sp) | gp = *(var_10h);
0x00002900 lw a0, 0x1c(sp) | a0 = *(var_1ch);
| if (v0 != 0) {
0x00002904 beqz v0, 0x2940 |
0x00002908 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x0000290c lw t9, -0x7ecc(gp) | t9 = sym.imp.__fprintf_chk
0x00002910 move a3, v0 | a3 = v0;
0x00002914 addiu a2, a2, 0x32a0 | a2 += 0x32a0;
0x00002918 addiu a1, zero, 1 | a1 = 1;
0x0000291c move s0, v0 | s0 = v0;
0x00002920 jalr t9 | t9 ();
0x00002924 lw gp, 0x10(sp) | gp = *(var_10h);
0x00002928 lw ra, 0x24(sp) | ra = *(var_24h);
0x0000292c move a0, s0 | a0 = s0;
0x00002930 lw t9, -0x7f0c(gp) | t9 = sym.imp.free;
0x00002934 lw s0, 0x20(sp) | s0 = *(var_20h);
0x00002938 addiu sp, sp, 0x28 |
0x0000293c jr t9 | t9 ();
| }
0x00002940 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x00002944 lw ra, 0x24(sp) | ra = *(var_24h);
0x00002948 lw s0, 0x20(sp) | s0 = *(var_20h);
0x0000294c lw t9, -0x7ecc(gp) | t9 = sym.imp.__fprintf_chk
0x00002950 addiu a2, a2, 0x336c | a2 += str.Could_not_fetch_motion_detection_resolution_n;
0x00002954 addiu a1, zero, 1 | a1 = 1;
0x00002958 addiu sp, sp, 0x28 |
0x0000295c jr t9 | return t9 ();
| }
[*] Function fprintf used 11 times res_finder