[*] Binary protection state of res_finder

  
  	Full RELRO     Canary found      NX disabled  PIE enabled  No RPATH     No RUNPATH   No Symbols


[*] Function printf 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 @ 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                  |     
                                         |     if (v0 != 0) {
                                         |         while (fp == 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                       |     
                                         | }

[*] Function printf used 4 times res_finder