[*] Binary protection state of libssl.so.1.0.0
No RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function mmap tear down of libssl.so.1.0.0
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/2097216-5451840.squashfs_v4_le_extract/thirdlib/libssl.so.1.0.0 @ 0x52ccc */
| #include <stdint.h>
|
; (fcn) fcn.00052ccc () | void fcn_00052ccc () {
0x00052ccc lui gp, 2 |
0x00052cd0 addiu gp, gp, -0x5d5c |
0x00052cd4 addu gp, gp, t9 | gp += t9;
| if (a0 == 0) {
0x00052cd8 beqz a0, 0x52ed0 | goto label_5;
| }
0x00052cdc nop |
0x00052ce0 addiu sp, sp, -0x48 |
0x00052ce4 addiu v0, zero, -1 | v0 = -1;
0x00052ce8 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00052cec sw fp, 0x40(sp) | *(var_40h) = fp;
0x00052cf0 sw s7, 0x3c(sp) | *(var_3ch) = s7;
0x00052cf4 sw s5, 0x34(sp) | *(var_34h) = s5;
0x00052cf8 sw ra, 0x44(sp) | *(var_44h) = ra;
0x00052cfc sw s6, 0x38(sp) | *(var_38h) = s6;
0x00052d00 sw s4, 0x30(sp) | *(var_30h) = s4;
0x00052d04 sw s3, 0x2c(sp) | *(var_2ch) = s3;
0x00052d08 sw s2, 0x28(sp) | *(var_28h) = s2;
0x00052d0c sw s1, 0x24(sp) | *(var_24h) = s1;
0x00052d10 sw s0, 0x20(sp) | *(var_20h) = s0;
0x00052d14 move s7, a0 | s7 = a0;
0x00052d18 move s5, a1 | s5 = a1;
0x00052d1c move fp, a2 | fp = a2;
| if (a1 != v0) {
0x00052d20 beq a1, v0, 0x52d3c |
0x00052d24 lb v0, (a0) | v0 = *(a0);
0x00052d28 addiu v1, zero, 0x2b | v1 = 0x2b;
0x00052d2c addiu v1, zero, 0x2d | v1 = 0x2d;
| if (v0 == v1) {
0x00052d30 beq v0, v1, 0x52ea8 | goto label_6;
| }
0x00052d34 addiu v1, zero, 1 | v1 = 1;
| if (v0 == v1) {
0x00052d38 beq v0, v1, 0x52ebc | goto label_7;
| }
| }
0x00052d3c sw zero, 0x18(sp) | *(var_18h) = 0;
0x00052d40 addiu s6, zero, 1 | s6 = 1;
| label_4:
0x00052d44 lw s4, 0x20(fp) | s4 = *(arg_20h);
0x00052d48 lw s0, 0x1c(fp) | s0 = *(arg_1ch);
| if (s4 == 0) {
0x00052d4c beqz s4, 0x52d88 | goto label_8;
| }
0x00052d50 lw s3, (fp) | s3 = *(fp);
0x00052d54 addiu v0, zero, -1 | v0 = -1;
0x00052d58 move s2, zero | s2 = 0;
0x00052d5c andi s3, s3, 0xc | s3 &= 0xc;
| if (s5 == v0) {
0x00052d60 beq s5, v0, 0x52dc4 | goto label_9;
| }
| do {
0x00052d64 lw s1, 8(s0) | s1 = *((s0 + 2));
0x00052d68 and v0, s3, s1 | v0 = s3 & s1;
0x00052d6c addiu s2, s2, 1 | s2++;
| if (v0 != 0) {
0x00052d70 beqz v0, 0x52d80 |
0x00052d74 lw v0, 4(s0) | v0 = *((s0 + 1));
0x00052d78 lw t9, -0x7680(gp) | t9 = *((gp - 7584));
| if (s5 == v0) {
0x00052d7c beq s5, v0, 0x52e74 | goto label_10;
| }
| }
| label_2:
0x00052d80 addiu s0, s0, 0x10 | s0 += 0x10;
0x00052d84 bne s2, s4, 0x52d64 |
| } while (s2 != s4);
| do {
| label_8:
0x00052d88 lw ra, 0x44(sp) | ra = *(var_44h);
0x00052d8c lw fp, 0x40(sp) | fp = *(var_40h);
0x00052d90 lw s7, 0x3c(sp) | s7 = *(var_3ch);
0x00052d94 lw s6, 0x38(sp) | s6 = *(var_38h);
0x00052d98 lw s5, 0x34(sp) | s5 = *(var_34h);
0x00052d9c lw s4, 0x30(sp) | s4 = *(var_30h);
0x00052da0 lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x00052da4 lw s2, 0x28(sp) | s2 = *(var_28h);
0x00052da8 lw s1, 0x24(sp) | s1 = *(var_24h);
0x00052dac lw s0, 0x20(sp) | s0 = *(var_20h);
0x00052db0 move v0, zero | v0 = 0;
0x00052db4 addiu sp, sp, 0x48 |
0x00052db8 jr ra | return v0;
| label_0:
0x00052dbc addiu s0, s0, 0x10 | s0 += 0x10;
0x00052dc0 beq s2, s4, 0x52d88 |
| } while (s2 == s4);
| label_9:
0x00052dc4 lw s1, 8(s0) | s1 = *((s0 + 2));
0x00052dc8 lw t9, -0x7504(gp) | t9 = *((gp - 7489));
0x00052dcc move a1, s7 | a1 = s7;
0x00052dd0 and v0, s3, s1 | v0 = s3 & s1;
0x00052dd4 addiu s2, s2, 1 | s2++;
| if (v0 == 0) {
0x00052dd8 beqz v0, 0x52dbc | goto label_0;
| }
0x00052ddc lw a0, (s0) | a0 = *(s0);
0x00052de0 jalr t9 | t9 ();
0x00052de4 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x00052de8 bnez v0, 0x52dbc | goto label_0;
| }
| label_1:
0x00052dec lw v0, 0x14(fp) | v0 = *(arg_14h);
0x00052df0 lw v1, 0x18(sp) | v1 = *(var_18h);
| if (v0 == 0) {
0x00052df4 beqz v0, 0x52e20 | goto label_3;
| }
0x00052df8 andi a0, s1, 1 | a0 = s1 & 1;
0x00052dfc andi s1, s1, 2 | s1 &= 2;
| if (a0 == 0) {
0x00052e00 movn s6, v1, a0 | s6 = v1;
| }
| if (s1 == 0) {
0x00052e04 beqz s1, 0x52e54 | goto label_11;
| }
0x00052e08 lw v0, 0x18(fp) | v0 = *(arg_18h);
0x00052e0c lw v1, 0xc(s0) | v1 = *((s0 + 3));
0x00052e10 lw a0, (v0) | a0 = *(v0);
| if (s6 == 0) {
0x00052e14 beqz s6, 0x52e64 | goto label_12;
| }
0x00052e18 or v1, a0, v1 | v1 = a0 | v1;
0x00052e1c sw v1, (v0) | *(v0) = v1;
| do {
| label_3:
0x00052e20 lw ra, 0x44(sp) | ra = *(var_44h);
0x00052e24 lw fp, 0x40(sp) | fp = *(var_40h);
0x00052e28 lw s7, 0x3c(sp) | s7 = *(var_3ch);
0x00052e2c lw s6, 0x38(sp) | s6 = *(var_38h);
0x00052e30 lw s5, 0x34(sp) | s5 = *(var_34h);
0x00052e34 lw s4, 0x30(sp) | s4 = *(var_30h);
0x00052e38 lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x00052e3c lw s2, 0x28(sp) | s2 = *(var_28h);
0x00052e40 lw s1, 0x24(sp) | s1 = *(var_24h);
0x00052e44 lw s0, 0x20(sp) | s0 = *(var_20h);
0x00052e48 addiu v0, zero, 1 | v0 = 1;
0x00052e4c addiu sp, sp, 0x48 |
0x00052e50 jr ra | return v0;
| if (s6 != 0) {
| label_11:
0x00052e54 bnez s6, 0x52e94 | goto label_13;
| }
0x00052e58 nop |
0x00052e5c lw v1, 0xc(s0) | v1 = *((s0 + 3));
0x00052e60 lw a0, (v0) | a0 = *(v0);
| label_12:
0x00052e64 nor v1, zero, v1 | __asm ("nor v1, zero, v1");
0x00052e68 and v1, a0, v1 | v1 = a0 & v1;
0x00052e6c sw v1, (v0) | *(v0) = v1;
0x00052e70 b 0x52e20 |
| } while (1);
| label_10:
0x00052e74 lw a0, (s0) | a0 = *(s0);
0x00052e78 move a1, s7 | a1 = s7;
0x00052e7c move a2, s5 | a2 = s5;
0x00052e80 jalr t9 | t9 ();
0x00052e84 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00052e88 beqz v0, 0x52dec | goto label_1;
| }
0x00052e8c b 0x52d80 | goto label_2;
0x00052e90 nop |
| label_13:
0x00052e94 lw a0, (v0) | a0 = *(v0);
0x00052e98 lw v1, 0xc(s0) | v1 = *((s0 + 3));
0x00052e9c or v1, a0, v1 | v1 = a0 | v1;
0x00052ea0 sw v1, (v0) | *(v0) = v1;
0x00052ea4 b 0x52e20 | goto label_3;
| label_6:
0x00052ea8 addiu s7, a0, 1 | s7 = a0 + 1;
0x00052eac addiu s5, a1, -1 | s5 = a1 + -1;
0x00052eb0 sw zero, 0x18(sp) | *(var_18h) = 0;
0x00052eb4 addiu s6, zero, 1 | s6 = 1;
0x00052eb8 b 0x52d44 | goto label_4;
| label_7:
0x00052ebc addiu s7, a0, 1 | s7 = a0 + 1;
0x00052ec0 addiu s5, a1, -1 | s5 = a1 + -1;
0x00052ec4 sw v1, 0x18(sp) | *(var_18h) = v1;
0x00052ec8 move s6, zero | s6 = 0;
0x00052ecc b 0x52d44 | goto label_4;
| label_5:
0x00052ed0 move v0, zero | v0 = 0;
0x00052ed4 jr ra | return v0;
| }
[*] Function mmap used 1 times libssl.so.1.0.0