[*] Binary protection state of libpthread-0.9.33.2.so

  
  	No RELRO       No Canary found   NX disabled  DSO          No RPATH     No RUNPATH   No Symbols


[*] Function fprintf tear down of libpthread-0.9.33.2.so

    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/lib/libpthread-0.9.33.2.so @ 0x5700 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) fcn.00005700 ()              | void fcn_00005700 () {
    0x00005700 lui gp, 2                 |     
    0x00005704 addiu gp, gp, 0x4dc0      |     
    0x00005708 addu gp, gp, t9           |     gp += t9;
    0x0000570c addiu sp, sp, -0x28       |     
    0x00005710 sw gp, 0x10(sp)           |     *(var_10h) = gp;
    0x00005714 sw ra, 0x24(sp)           |     *(var_24h) = ra;
    0x00005718 sw s2, 0x20(sp)           |     *(var_20h) = s2;
    0x0000571c sw s1, 0x1c(sp)           |     *(var_1ch) = s1;
    0x00005720 sw s0, 0x18(sp)           |     *(var_18h) = s0;
    0x00005724 lw a1, 0xc(a0)            |     a1 = *((a0 + 3));
    0x00005728 andi v0, a1, 0x7c         |     v0 = a1 & 0x7c;
    0x0000572c andi a2, a1, 0x7f         |     a2 = a1 & 0x7f;
                                         |     if (v0 != 0) {
    0x00005730 beqz v0, 0x5754           |         
    0x00005734 lw t9, -0x7fe4(gp)        |         t9 = *((gp - 8185));
    0x00005738 lw ra, 0x24(sp)           |         ra = *(var_24h);
    0x0000573c lw s2, 0x20(sp)           |         s2 = *(var_20h);
    0x00005740 lw s1, 0x1c(sp)           |         s1 = *(var_1ch);
    0x00005744 lw s0, 0x18(sp)           |         s0 = *(var_18h);
    0x00005748 addiu t9, t9, 0x3f80      |         t9 += entry0;
    0x0000574c addiu sp, sp, 0x28        |         
    0x00005750 b 0x3f80                  |         void (*0x3f80)() ();
                                         |     }
    0x00005754 move s0, a0               |     s0 = a0;
    0x00005758 rdhwr v1, 29              |     __asm ("rdhwr v1, 29");
    0x0000575c lw s1, -0x73f8(v1)        |     s1 = *((v1 - 7422));
                                         |     if (a2 != 0) {
    0x00005760 bnez a2, 0x57ac           |         goto label_2;
                                         |     }
    0x00005764 addiu v1, zero, 2         |     v1 = 2;
                                         | label_0:
    0x00005768 move v0, zero             |     v0 = 0;
                                         |     do {
    0x0000576c ll a2, (s0)               |         __asm ("ll a2, (s0)");
    0x00005770 move a0, zero             |         a0 = 0;
                                         |         if (a2 != v0) {
    0x00005774 bne a2, v0, 0x578c        |             goto label_3;
                                         |         }
    0x00005778 move a0, v1               |         a0 = v1;
    0x0000577c sc a0, (s0)               |         __asm ("sc a0, (s0)");
    0x00005780 beqz a0, 0x576c           |         
                                         |     } while (a0 == 0);
    0x00005784 nop                       |     
    0x00005788 sync                      |     __asm ("sync");
                                         | label_3:
    0x0000578c sw s1, 8(s0)              |     *((s0 + 2)) = s1;
                                         |     if (a0 == 0) {
    0x00005790 bnel a0, zero, 0x593c     |         goto label_4;
                                         |     }
    0x00005794 lw t9, -0x7fe0(gp)        |     t9 = *((gp - 8184));
    0x00005798 move a0, s0               |     a0 = s0;
    0x0000579c andi a1, a1, 0x80         |     a1 &= 0x80;
    0x000057a0 bal 0x6cb8                |     fcn_00006cb8 ();
    0x000057a4 sw s1, 8(s0)              |     *((s0 + 2)) = s1;
    0x000057a8 b 0x593c                  |     goto label_4;
                                         | label_2:
    0x000057ac addiu v1, zero, 1         |     v1 = 1;
    0x000057b0 addiu v1, zero, 3         |     v1 = 3;
                                         |     if (a2 != v1) {
    0x000057b4 bne a2, v1, 0x5820        |         goto label_5;
                                         |     }
    0x000057b8 lw v1, 8(a0)              |     v1 = *((a0 + 2));
    0x000057bc addiu v1, zero, 2         |     v1 = 2;
                                         |     if (v1 != s1) {
    0x000057c0 bne v1, s1, 0x57e0        |         goto label_6;
                                         |     }
    0x000057c4 lw v0, 4(a0)              |     v0 = *((a0 + 1));
    0x000057c8 addiu v1, zero, -1        |     v1 = -1;
                                         |     if (v0 == v1) {
    0x000057cc beql v0, v1, 0x5940       |         goto label_7;
                                         |     }
    0x000057d0 addiu v0, zero, 0xb       |     v0 = 0xb;
    0x000057d4 addiu v0, v0, 1           |     v0++;
    0x000057d8 sw v0, 4(a0)              |     *((a0 + 1)) = v0;
    0x000057dc b 0x593c                  |     goto label_4;
                                         |     do {
                                         | label_6:
    0x000057e0 ll a3, (a0)               |         __asm ("ll a3, (a0)");
    0x000057e4 move a2, zero             |         a2 = 0;
                                         |         if (a3 != v0) {
    0x000057e8 bne a3, v0, 0x5800        |             goto label_8;
                                         |         }
    0x000057ec move a2, v1               |         a2 = v1;
    0x000057f0 sc a2, (a0)               |         __asm ("sc a2, (a0)");
    0x000057f4 beqz a2, 0x57e0           |         
                                         |     } while (a2 == 0);
    0x000057f8 nop                       |     
    0x000057fc sync                      |     __asm ("sync");
                                         | label_8:
    0x00005800 addiu v0, zero, 1         |     v0 = 1;
                                         |     if (a2 != 0) {
    0x00005804 bnel a2, zero, 0x5818     |         
    0x00005808 lw t9, -0x7fe0(gp)        |         t9 = *((gp - 8184));
    0x0000580c andi a1, a1, 0x80         |         a1 &= 0x80;
    0x00005810 bal 0x6cb8                |         fcn_00006cb8 ();
    0x00005814 addiu v0, zero, 1         |         v0 = 1;
                                         |     }
    0x00005818 sw v0, 4(s0)              |     *((s0 + 1)) = v0;
    0x0000581c b 0x5938                  |     goto label_9;
                                         | label_5:
    0x00005820 lw v1, -0x7fdc(gp)        |     v1 = *((gp - 8183));
                                         |     if (a2 != v1) {
    0x00005824 bne a2, v1, 0x5924        |         goto label_10;
                                         |     }
    0x00005828 lw v1, (v1)               |     v1 = *(v1);
    0x0000582c addiu v1, zero, 2         |     v1 = 2;
                                         |     if (v1 == 0) {
    0x00005830 beqz v1, 0x5768           |         goto label_0;
                                         |     }
                                         |     do {
    0x00005834 ll a0, (s0)               |         __asm ("ll a0, (s0)");
    0x00005838 move a1, zero             |         a1 = 0;
                                         |         if (a0 != v0) {
    0x0000583c bne a0, v0, 0x5854        |             goto label_11;
                                         |         }
    0x00005840 move a1, v1               |         a1 = v1;
    0x00005844 sc a1, (s0)               |         __asm ("sc a1, (s0)");
    0x00005848 beqz a1, 0x5834           |         
                                         |     } while (a1 == 0);
    0x0000584c nop                       |     
    0x00005850 sync                      |     __asm ("sync");
                                         |     if (a0 == 0) {
                                         | label_11:
    0x00005854 beql a0, zero, 0x593c     |         goto label_4;
                                         |     }
    0x00005858 sw s1, 8(s0)              |     *((s0 + 2)) = s1;
    0x0000585c lw v0, 0x14(s0)           |     v0 = *((s0 + 5));
    0x00005860 addiu v1, zero, 0x64      |     v1 = 0x64;
    0x00005864 addiu a1, zero, 2         |     a1 = 2;
    0x00005868 addiu v0, v0, 5           |     v0 += 5;
    0x0000586c sll v0, v0, 1             |     v0 <<= 1;
    0x00005870 slti a0, v0, 0x65         |     a0 = (v0 < 0x65) ? 1 : 0;
                                         |     if (a0 != 0) {
    0x00005874 movz v0, v1, a0           |         v0 = v1;
                                         |     }
    0x00005878 move v1, zero             |     v1 = 0;
    0x0000587c move a0, zero             |     a0 = 0;
                                         | label_1:
    0x00005880 addiu s2, v1, 1           |     s2 = v1 + 1;
    0x00005884 slt v1, v1, v0            |     v1 = (v1 < v0) ? 1 : 0;
                                         |     if (v1 != 0) {
    0x00005888 bnez v1, 0x58d8           |         goto label_12;
                                         |     }
    0x0000588c nop                       |     
    0x00005890 lw a1, 0xc(s0)            |     a1 = *((s0 + 3));
    0x00005894 addiu a0, zero, 2         |     a0 = 2;
    0x00005898 andi a1, a1, 0x80         |     a1 &= 0x80;
                                         |     do {
    0x0000589c ll a2, (s0)               |         __asm ("ll a2, (s0)");
    0x000058a0 move v0, zero             |         v0 = 0;
                                         |         if (a2 != v1) {
    0x000058a4 bne a2, v1, 0x58bc        |             goto label_13;
                                         |         }
    0x000058a8 move v0, a0               |         v0 = a0;
    0x000058ac sc v0, (s0)               |         __asm ("sc v0, (s0)");
    0x000058b0 beqz v0, 0x589c           |         
                                         |     } while (v0 == 0);
    0x000058b4 nop                       |     
    0x000058b8 sync                      |     __asm ("sync");
                                         | label_13:
    0x000058bc lw v1, 0x14(s0)           |     v1 = *((s0 + 5));
                                         |     if (v0 == 0) {
    0x000058c0 bnel v0, zero, 0x5904     |         goto label_14;
                                         |     }
    0x000058c4 lw t9, -0x7fe0(gp)        |     t9 = *((gp - 8184));
    0x000058c8 move a0, s0               |     a0 = s0;
    0x000058cc bal 0x6cb8                |     fcn_00006cb8 ();
    0x000058d0 lw v1, 0x14(s0)           |     v1 = *((s0 + 5));
    0x000058d4 b 0x5904                  |     goto label_14;
                                         |     do {
                                         | label_12:
    0x000058d8 ll a2, (s0)               |         __asm ("ll a2, (s0)");
    0x000058dc move v1, zero             |         v1 = 0;
                                         |         if (a2 != a0) {
    0x000058e0 bne a2, a0, 0x58f8        |             goto label_15;
                                         |         }
    0x000058e4 move v1, a1               |         v1 = a1;
    0x000058e8 sc v1, (s0)               |         __asm ("sc v1, (s0)");
    0x000058ec beqz v1, 0x58d8           |         
                                         |     } while (v1 == 0);
    0x000058f0 nop                       |     
    0x000058f4 sync                      |     __asm ("sync");
                                         | label_15:
    0x000058f8 move v1, s2               |     v1 = s2;
                                         |     if (a2 != 0) {
    0x000058fc bnez a2, 0x5880           |         goto label_1;
                                         |     }
    0x00005900 lw v1, 0x14(s0)           |     v1 = *((s0 + 5));
                                         | label_14:
    0x00005904 subu v0, s2, v1           |     __asm ("subu v0, s2, v1");
    0x00005908 addiu a0, v0, 7           |     a0 = v0 + 7;
    0x0000590c slti a1, v0, 0            |     a1 = (v0 < 0) ? 1 : 0;
                                         |     if (a1 == 0) {
    0x00005910 movn v0, a0, a1           |         v0 = a0;
                                         |     }
    0x00005914 sra v0, v0, 3             |     v0 >>= 3;
    0x00005918 addu v1, v1, v0           |     v1 += v0;
    0x0000591c sw v1, 0x14(s0)           |     *((s0 + 5)) = v1;
    0x00005920 b 0x5938                  |     goto label_9;
                                         | label_10:
    0x00005924 lw v0, 8(a0)              |     v0 = *((a0 + 2));
    0x00005928 addiu v1, zero, 2         |     v1 = 2;
                                         |     if (v0 != s1) {
    0x0000592c bne v0, s1, 0x5768        |         goto label_0;
                                         |     }
    0x00005930 addiu v0, zero, 0x2d      |     v0 = 0x2d;
    0x00005934 b 0x5940                  |     goto label_7;
                                         | label_9:
    0x00005938 sw s1, 8(s0)              |     *((s0 + 2)) = s1;
                                         | label_4:
    0x0000593c move v0, zero             |     v0 = 0;
                                         | label_7:
    0x00005940 lw ra, 0x24(sp)           |     ra = *(var_24h);
    0x00005944 lw s2, 0x20(sp)           |     s2 = *(var_20h);
    0x00005948 lw s1, 0x1c(sp)           |     s1 = *(var_1ch);
    0x0000594c lw s0, 0x18(sp)           |     s0 = *(var_18h);
    0x00005950 addiu sp, sp, 0x28        |     
    0x00005954 jr ra                     |     return v0;
                                         | }

[*] Function fprintf used 1 times libpthread-0.9.33.2.so