[*] Binary protection state of image2d

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


[*] Function sprintf tear down of image2d

    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/image2d @ 0xf7988 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) sym.debug_output ()              | void debug_output () {
    0x000f7988 lui gp, 0x15                  |     
    0x000f798c addiu gp, gp, 0x7948          |     
    0x000f7990 addu gp, gp, t9               |     gp += t9;
    0x000f7994 lw v0, -0x5f08(gp)            |     v0 = *((gp - 6082));
    0x000f7998 addiu sp, sp, -0x60           |     
    0x000f799c lui v1, 0x4000                |     v1 = imp.g_str_equal;
    0x000f79a0 sw v0, 0x24(sp)               |     *(var_24h_2) = v0;
    0x000f79a4 lw v0, (v0)                   |     v0 = *(v0);
    0x000f79a8 sw gp, 0x10(sp)               |     *(var_10h_2) = gp;
    0x000f79ac sltu v1, a0, v1               |     v1 = (a0 < v1) ? 1 : 0;
    0x000f79b0 sw ra, 0x5c(sp)               |     *(var_5ch) = ra;
    0x000f79b4 sw fp, 0x58(sp)               |     *(var_58h) = fp;
    0x000f79b8 sw s7, 0x54(sp)               |     *(var_54h) = s7;
    0x000f79bc sw s6, 0x50(sp)               |     *(var_50h) = s6;
    0x000f79c0 sw s5, 0x4c(sp)               |     *(var_4ch) = s5;
    0x000f79c4 sw s4, 0x48(sp)               |     *(var_48h) = s4;
    0x000f79c8 sw s3, 0x44(sp)               |     *(var_44h_2) = s3;
    0x000f79cc sw s2, 0x40(sp)               |     *(var_40h_2) = s2;
    0x000f79d0 sw s1, 0x3c(sp)               |     *(var_3ch_2) = s1;
    0x000f79d4 sw s0, 0x38(sp)               |     *(var_38h) = s0;
    0x000f79d8 sw a3, 0x6c(sp)               |     *(var_6ch) = a3;
    0x000f79dc sw v0, 0x34(sp)               |     *(var_34h_2) = v0;
    0x000f79e0 addiu v0, zero, -1            |     v0 = -1;
                                             |     if (v1 == 0) {
    0x000f79e4 beqz v1, 0xf7bac              |         goto label_4;
                                             |     }
    0x000f79e8 sltiu v0, a1, 2               |     v0 = (a1 < 2) ? 1 : 0;
    0x000f79ec addiu v0, zero, -1            |     v0 = -1;
                                             |     if (v0 == 0) {
    0x000f79f0 beqz v0, 0xf7bac              |         goto label_4;
                                             |     }
    0x000f79f4 lw v0, -0x7e4c(gp)            |     v0 = *((gp - 8083));
    0x000f79f8 addiu v0, v0, -0x6500         |     v0 += -aav.0x00006500;
    0x000f79fc lbux v0, a1(v0)               |     __asm ("lbux v0, a1(v0)");
    0x000f7a00 lw s6, -0x7e4c(gp)            |     s6 = *((gp - 8083));
                                             |     if (v0 == 0) {
    0x000f7a04 beqz v0, 0xf7b54              |         goto label_5;
                                             |     }
    0x000f7a08 move s5, a0                   |     s5 = a0;
    0x000f7a0c addiu v0, s6, -0x65f0         |     v0 = s6 + -0x65f0;
    0x000f7a10 move s4, a2                   |     s4 = a2;
    0x000f7a14 sw zero, 0x1c(sp)             |     *(var_1ch_2) = 0;
    0x000f7a18 move s1, zero                 |     s1 = 0;
    0x000f7a1c sw v0, 0x20(sp)               |     *(var_20h_3) = v0;
    0x000f7a20 addiu s6, sp, 0x6c            |     s6 = sp + 0x6c;
    0x000f7a24 addiu fp, sp, 0x30            |     fp = sp + 0x30;
    0x000f7a28 b 0xf7a3c                     |     goto label_6;
                                             | label_0:
    0x000f7a2c addiu s1, s1, 1               |     s1++;
                                             |     do {
                                             | label_1:
    0x000f7a30 addiu v0, zero, 0x1e          |         v0 = 0x1e;
    0x000f7a34 lw v0, 0x24(sp)               |         v0 = *(var_24h_2);
                                             |         if (s1 == v0) {
    0x000f7a38 beq s1, v0, 0xf7b5c           |             goto label_7;
                                             |         }
                                             | label_6:
    0x000f7a3c srav v0, s5, s1               |         __asm ("srav v0, s5, s1");
    0x000f7a40 andi v0, v0, 1                |         v0 &= 1;
    0x000f7a44 beql v0, zero, 0xf7a30        |         
                                             |     } while (v0 == 0);
    0x000f7a48 addiu s1, s1, 1               |     s1++;
    0x000f7a4c lw v1, 0x20(sp)               |     v1 = *(var_20h_3);
    0x000f7a50 sll v0, s1, 3                 |     v0 = s1 << 3;
    0x000f7a54 addu v0, v1, v0               |     v0 = v1 + v0;
    0x000f7a58 lw v1, (v0)                   |     v1 = *(v0);
    0x000f7a5c lw t9, -0x60cc(gp)            |     t9 = sym.imp.g_list_first;
                                             |     if (v1 == 0) {
    0x000f7a60 beqz v1, 0xf7ba8              |         goto label_8;
                                             |     }
    0x000f7a64 lw a0, 4(v0)                  |     a0 = *((v0 + 1));
    0x000f7a68 jalr t9                       |     t9 ();
    0x000f7a6c move s0, v0                   |     s0 = v0;
    0x000f7a70 lw gp, 0x10(sp)               |     gp = *(var_10h_2);
                                             |     if (v0 == 0) {
    0x000f7a74 beqz v0, 0xf7a2c              |         goto label_0;
                                             |     }
    0x000f7a78 addiu s3, zero, 1             |     s3 = 1;
    0x000f7a7c addiu s2, zero, 2             |     s2 = 2;
    0x000f7a80 b 0xf7ab8                     |     goto label_9;
                                             | label_2:
    0x000f7a84 lw s0, 4(s0)                  |     s0 = *((s0 + 1));
                                             |     if (v0 == s2) {
    0x000f7a88 bnel v0, s2, 0xf7ab0          |         goto label_10;
                                             |     }
    0x000f7a8c lw t9, -0x5fac(gp)            |     t9 = sym.imp.__vsyslog_chk;
    0x000f7a90 lw a0, 8(s7)                  |     a0 = *((s7 + 2));
    0x000f7a94 sw s6, 0x2c(sp)               |     *(var_2ch_3) = s6;
    0x000f7a98 move a3, s6                   |     a3 = s6;
    0x000f7a9c move a2, s4                   |     a2 = s4;
    0x000f7aa0 addiu a1, zero, 1             |     a1 = 1;
    0x000f7aa4 jalr t9                       |     t9 ();
    0x000f7aa8 lw gp, 0x10(sp)               |     gp = *(var_10h_2);
                                             | label_3:
    0x000f7aac lw s0, 4(s0)                  |     s0 = *((s0 + 1));
                                             |     if (s0 == 0) {
                                             | label_10:
    0x000f7ab0 beql s0, zero, 0xf7a30        |         goto label_1;
                                             |     }
    0x000f7ab4 addiu s1, s1, 1               |     s1++;
                                             | label_9:
    0x000f7ab8 lw s7, (s0)                   |     s7 = *(s0);
    0x000f7abc lw v0, (s7)                   |     v0 = *(s7);
                                             |     if (v0 != s3) {
    0x000f7ac0 bne v0, s3, 0xf7a84           |         goto label_2;
                                             |     }
    0x000f7ac4 nop                           |     
    0x000f7ac8 lw v0, 4(s7)                  |     v0 = *((s7 + 1));
    0x000f7acc sw s6, 0x2c(sp)               |     *(var_2ch_3) = s6;
                                             |     if (v0 < 0) {
    0x000f7ad0 bltz v0, 0xf7b9c              |         goto label_11;
                                             |     }
    0x000f7ad4 lw t9, -0x61e4(gp)            |     t9 = sym.imp.__vasprintf_chk
    0x000f7ad8 move a3, s6                   |     a3 = s6;
    0x000f7adc move a2, s4                   |     a2 = s4;
    0x000f7ae0 addiu a1, zero, 1             |     a1 = 1;
    0x000f7ae4 move a0, fp                   |     a0 = fp;
    0x000f7ae8 sw zero, 0x30(sp)             |     *(var_30h_3) = 0;
    0x000f7aec jalr t9                       |     t9 ();
    0x000f7af0 lw gp, 0x10(sp)               |     gp = *(var_10h_2);
                                             |     if (v0 < 0) {
    0x000f7af4 bltz v0, 0xf7b9c              |         goto label_11;
                                             |     }
    0x000f7af8 lw a1, 0x30(sp)               |     a1 = *(var_30h_3);
                                             |     if (v0 == 0) {
    0x000f7afc bnez v0, 0xf7b14              |         
    0x000f7b00 lw t9, -0x5d90(gp)            |         t9 = sym.imp.free;
    0x000f7b04 move a0, a1                   |         a0 = a1;
    0x000f7b08 jalr t9                       |         t9 ();
    0x000f7b0c lw gp, 0x10(sp)               |         gp = *(var_10h_2);
    0x000f7b10 b 0xf7aac                     |         goto label_3;
                                             |     }
    0x000f7b14 lw t9, -0x5ca8(gp)            |     t9 = sym.imp.write;
    0x000f7b18 lw a0, 4(s7)                  |     a0 = *((s7 + 1));
    0x000f7b1c move a2, v0                   |     a2 = v0;
    0x000f7b20 sw v0, 0x18(sp)               |     *(var_18h_2) = v0;
    0x000f7b24 jalr t9                       |     t9 ();
    0x000f7b28 lw gp, 0x10(sp)               |     gp = *(var_10h_2);
    0x000f7b2c lw a3, 0x18(sp)               |     a3 = *(var_18h_2);
    0x000f7b30 lw a0, 0x30(sp)               |     a0 = *(var_30h_3);
    0x000f7b34 lw t9, -0x5d90(gp)            |     t9 = sym.imp.free;
                                             |     if (a3 != v0) {
    0x000f7b38 beq a3, v0, 0xf7b44           |         
    0x000f7b3c addiu v0, zero, -1            |         v0 = -1;
    0x000f7b40 sw v0, 0x1c(sp)               |         *(var_1ch_2) = v0;
                                             |     }
    0x000f7b44 jalr t9                       |     t9 ();
    0x000f7b48 nop                           |     
    0x000f7b4c lw gp, 0x10(sp)               |     gp = *(var_10h_2);
    0x000f7b50 b 0xf7aac                     |     goto label_3;
                                             | label_5:
    0x000f7b54 sw zero, 0x1c(sp)             |     *(var_1ch_2) = 0;
                                             |     do {
    0x000f7b58 lw v0, 0x24(sp)               |         v0 = *(var_24h_2);
                                             | label_7:
    0x000f7b5c lw a0, 0x34(sp)               |         a0 = *(var_34h_2);
    0x000f7b60 lw v1, (v0)                   |         v1 = *(v0);
    0x000f7b64 lw v0, 0x1c(sp)               |         v0 = *(var_1ch_2);
                                             |         if (a0 != v1) {
    0x000f7b68 bne a0, v1, 0xf7bb4           |             goto label_12;
                                             |         }
    0x000f7b6c lw ra, 0x5c(sp)               |         ra = *(var_5ch);
    0x000f7b70 lw fp, 0x58(sp)               |         fp = *(var_58h);
    0x000f7b74 lw s7, 0x54(sp)               |         s7 = *(var_54h);
    0x000f7b78 lw s6, 0x50(sp)               |         s6 = *(var_50h);
    0x000f7b7c lw s5, 0x4c(sp)               |         s5 = *(var_4ch);
    0x000f7b80 lw s4, 0x48(sp)               |         s4 = *(var_48h);
    0x000f7b84 lw s3, 0x44(sp)               |         s3 = *(var_44h_2);
    0x000f7b88 lw s2, 0x40(sp)               |         s2 = *(var_40h_2);
    0x000f7b8c lw s1, 0x3c(sp)               |         s1 = *(var_3ch_2);
    0x000f7b90 lw s0, 0x38(sp)               |         s0 = *(var_38h);
    0x000f7b94 addiu sp, sp, 0x60            |         
    0x000f7b98 jr ra                         |         return v0;
                                             | label_11:
    0x000f7b9c addiu v0, zero, -1            |         v0 = -1;
    0x000f7ba0 sw v0, 0x1c(sp)               |         *(var_1ch_2) = v0;
    0x000f7ba4 b 0xf7aac                     |         goto label_3;
                                             | label_8:
    0x000f7ba8 addiu v0, zero, -1            |         v0 = -1;
                                             | label_4:
    0x000f7bac sw v0, 0x1c(sp)               |         *(var_1ch_2) = v0;
    0x000f7bb0 b 0xf7b58                     |         
                                             |     } while (1);
                                             | label_12:
    0x000f7bb4 lw t9, -0x5fc0(gp)            |     t9 = sym.imp.__stack_chk_fail;
    0x000f7bb8 jalr t9                       |     t9 ();
    0x000f7bbc nop                           |     
                                             | }

[*] Function sprintf used 2 times image2d