[*] Binary protection state of libcrypto.so.1.0.0
No RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function popen tear down of libcrypto.so.1.0.0
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/13893632-15421440.squashfs_v4_le_extract/thirdlib/libcrypto.so.1.0.0 @ 0x12e780 */
| #include <stdint.h>
|
; (fcn) fcn.0012e780 () | void fcn_0012e780 () {
0x0012e780 lui gp, 0xa |
0x0012e784 addiu gp, gp, -0x1bc0 |
0x0012e788 addu gp, gp, t9 | gp += t9;
0x0012e78c lw v0, 8(a0) | v0 = *((a0 + 2));
0x0012e790 addiu sp, sp, -0x48 |
0x0012e794 sw gp, 0x18(sp) | *(var_18h_2) = gp;
0x0012e798 sw s3, 0x3c(sp) | *(var_24h) = s3;
0x0012e79c sw s2, 0x38(sp) | *(var_20h) = s2;
0x0012e7a0 sw ra, 0x44(sp) | *(var_2ch) = ra;
0x0012e7a4 sw s4, 0x40(sp) | *(var_28h) = s4;
0x0012e7a8 sw s1, 0x34(sp) | *(var_34h) = s1;
0x0012e7ac sw s0, 0x30(sp) | *(var_18h) = s0;
0x0012e7b0 move s3, a1 | s3 = a1;
0x0012e7b4 move s2, a2 | s2 = a2;
| if (v0 == 0) {
0x0012e7b8 beqz v0, 0x12e858 | goto label_0;
| }
0x0012e7bc lw t9, -0x78a4(gp) | t9 = *((gp - 7721));
0x0012e7c0 move a0, a3 | a0 = a3;
0x0012e7c4 addiu a1, sp, 0x24 | a1 = sp + 0x24;
0x0012e7c8 move a2, v0 | a2 = v0;
0x0012e7cc sw zero, 0x24(sp) | *(var_24h_2) = 0;
0x0012e7d0 jalr t9 | t9 ();
0x0012e7d4 move s1, v0 | s1 = v0;
0x0012e7d8 lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 < 0) {
0x0012e7dc bltz v0, 0x12e8bc | goto label_1;
| }
| do {
0x0012e7e0 lw t9, -0x7870(gp) | t9 = *((gp - 7708));
0x0012e7e4 addiu a0, zero, 4 | a0 = 4;
0x0012e7e8 bal 0x111d38 | sym_ASN1_STRING_type_new ();
0x0012e7ec move s0, v0 | s0 = v0;
0x0012e7f0 lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 == 0) {
0x0012e7f4 beqz v0, 0x12e8bc | goto label_1;
| }
0x0012e7f8 sw s1, (v0) | *(v0) = s1;
0x0012e7fc lw v0, 0x24(sp) | v0 = *(var_24h_2);
0x0012e800 lw t9, -0x6420(gp) | t9 = *((gp - 6408));
0x0012e804 move a0, zero | a0 = 0;
0x0012e808 sw v0, 8(s0) | *((s0 + 2)) = v0;
0x0012e80c move a1, s3 | a1 = s3;
0x0012e810 move a2, s2 | a2 = s2;
0x0012e814 move a3, s0 | a3 = s0;
0x0012e818 bal 0x126f84 | sym_X509_EXTENSION_create_by_NID ();
0x0012e81c move s1, v0 | s1 = v0;
0x0012e820 lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 == 0) {
0x0012e824 beqz v0, 0x12e8bc | goto label_1;
| }
0x0012e828 lw t9, -0x7744(gp) | t9 = *(gp);
0x0012e82c move a0, s0 | a0 = s0;
0x0012e830 bal 0x111de4 | sym_ASN1_STRING_free ();
0x0012e834 lw ra, 0x44(sp) | ra = *(var_2ch);
0x0012e838 move v0, s1 | v0 = s1;
0x0012e83c lw s4, 0x40(sp) | s4 = *(var_28h);
0x0012e840 lw s3, 0x3c(sp) | s3 = *(var_24h);
0x0012e844 lw s2, 0x38(sp) | s2 = *(var_20h);
0x0012e848 lw s1, 0x34(sp) | s1 = *(var_34h);
0x0012e84c lw s0, 0x30(sp) | s0 = *(var_18h);
0x0012e850 addiu sp, sp, 0x48 |
0x0012e854 jr ra | return v0;
| label_0:
0x0012e858 lw t9, 0x18(a0) | t9 = *((a0 + 6));
0x0012e85c move a1, zero | a1 = 0;
0x0012e860 sw a3, 0x28(sp) | *(var_10h) = a3;
0x0012e864 move s0, a0 | s0 = a0;
0x0012e868 lw s4, -0x7fd0(gp) | s4 = *((gp - 8180));
0x0012e86c move a0, a3 | a0 = a3;
0x0012e870 jalr t9 | t9 ();
0x0012e874 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x0012e878 move a0, v0 | a0 = v0;
0x0012e87c addiu a1, s4, -0x4e24 | a1 = s4 + -0x4e24;
0x0012e880 lw t9, -0x7f84(gp) | t9 = *((gp - 8161));
0x0012e884 addiu a2, zero, 0xc1 | a2 = 0xc1;
0x0012e888 move s1, v0 | s1 = v0;
0x0012e88c jalr t9 | t9 ();
0x0012e890 sw v0, 0x24(sp) | *(var_24h_2) = v0;
0x0012e894 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x0012e898 lw a3, 0x28(sp) | a3 = *(var_10h);
| if (v0 == 0) {
0x0012e89c beqz v0, 0x12e8c0 | goto label_2;
| }
0x0012e8a0 lw t9, 0x18(s0) | t9 = *((s0 + 6));
0x0012e8a4 sw v0, 0x20(sp) | *(var_20h_2) = v0;
0x0012e8a8 move a0, a3 | a0 = a3;
0x0012e8ac addiu a1, sp, 0x20 | a1 = sp + 0x20;
0x0012e8b0 jalr t9 | t9 ();
0x0012e8b4 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x0012e8b8 b 0x12e7e0 |
| } while (1);
| label_1:
0x0012e8bc lw s4, -0x7fd0(gp) | s4 = *((gp - 8180));
| label_2:
0x0012e8c0 lw t9, -0x7fb4(gp) | t9 = *((gp - 8173));
0x0012e8c4 addiu v0, zero, 0xd3 | v0 = 0xd3;
0x0012e8c8 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x0012e8cc addiu a3, s4, -0x4e24 | a3 = s4 + -0x4e24;
0x0012e8d0 addiu a0, zero, 0x22 | a0 = 0x22;
0x0012e8d4 addiu a1, zero, 0x87 | a1 = 0x87;
0x0012e8d8 addiu a2, zero, 0x41 | a2 = 0x41;
0x0012e8dc jalr t9 | t9 ();
0x0012e8e0 lw ra, 0x44(sp) | ra = *(var_2ch);
0x0012e8e4 move s1, zero | s1 = 0;
0x0012e8e8 move v0, s1 | v0 = s1;
0x0012e8ec lw s4, 0x40(sp) | s4 = *(var_28h);
0x0012e8f0 lw s3, 0x3c(sp) | s3 = *(var_24h);
0x0012e8f4 lw s2, 0x38(sp) | s2 = *(var_20h);
0x0012e8f8 lw s1, 0x34(sp) | s1 = *(var_34h);
0x0012e8fc lw s0, 0x30(sp) | s0 = *(var_18h);
0x0012e900 addiu sp, sp, 0x48 |
0x0012e904 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/13893632-15421440.squashfs_v4_le_extract/thirdlib/libcrypto.so.1.0.0 @ 0xb6a30 */
| #include <stdint.h>
|
; (fcn) sym.DSA_set_method () | void DSA_set_method () {
0x000b6a30 lui gp, 0x11 |
0x000b6a34 addiu gp, gp, 0x6190 |
0x000b6a38 addu gp, gp, t9 | gp += t9;
0x000b6a3c lw v0, 0x3c(a0) | v0 = *((a0 + 15));
0x000b6a40 addiu sp, sp, -0x28 |
0x000b6a44 sw gp, 0x10(sp) | *(var_10h) = gp;
0x000b6a48 lw t9, 0x1c(v0) | t9 = *((v0 + 7));
0x000b6a4c sw s1, 0x20(sp) | *(var_20h) = s1;
0x000b6a50 sw s0, 0x1c(sp) | *(var_1ch) = s0;
0x000b6a54 sw ra, 0x24(sp) | *(var_24h) = ra;
0x000b6a58 move s0, a0 | s0 = a0;
0x000b6a5c move s1, a1 | s1 = a1;
| if (t9 != 0) {
0x000b6a60 beqz t9, 0xb6a70 |
0x000b6a64 jalr t9 | t9 ();
0x000b6a68 nop |
0x000b6a6c lw gp, 0x10(sp) | gp = *(var_10h);
| }
0x000b6a70 lw a0, 0x40(s0) | a0 = *((s0 + 16));
0x000b6a74 lw t9, -0x767c(gp) | t9 = *((gp - 7583));
| if (a0 != 0) {
0x000b6a78 beqz a0, 0xb6a88 |
0x000b6a7c bal 0xc4d08 | sym_ENGINE_finish ();
0x000b6a80 nop |
0x000b6a84 sw zero, 0x40(s0) | *((s0 + 16)) = 0;
| }
0x000b6a88 lw t9, 0x18(s1) | t9 = *((s1 + 6));
0x000b6a8c sw s1, 0x3c(s0) | *((s0 + 15)) = s1;
| if (t9 != 0) {
0x000b6a90 beqz t9, 0xb6a9c |
0x000b6a94 move a0, s0 | a0 = s0;
0x000b6a98 jalr t9 | t9 ();
| }
0x000b6a9c lw ra, 0x24(sp) | ra = *(var_24h);
0x000b6aa0 lw s1, 0x20(sp) | s1 = *(var_20h);
0x000b6aa4 lw s0, 0x1c(sp) | s0 = *(var_1ch);
0x000b6aa8 addiu v0, zero, 1 | v0 = 1;
0x000b6aac addiu sp, sp, 0x28 |
0x000b6ab0 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/13893632-15421440.squashfs_v4_le_extract/thirdlib/libcrypto.so.1.0.0 @ 0xc3640 */
| #include <stdint.h>
|
; (fcn) sym.DSO_convert_filename () | void DSO_convert_filename () {
0x000c3640 lui gp, 0x11 |
0x000c3644 addiu gp, gp, -0x6a80 |
0x000c3648 addu gp, gp, t9 | gp += t9;
0x000c364c addiu sp, sp, -0x30 |
0x000c3650 sw gp, 0x18(sp) | *(var_18h) = gp;
0x000c3654 sw ra, 0x2c(sp) | *(var_2ch) = ra;
0x000c3658 sw s2, 0x28(sp) | *(var_28h) = s2;
0x000c365c sw s1, 0x24(sp) | *(var_24h) = s1;
0x000c3660 sw s0, 0x20(sp) | *(var_20h) = s0;
0x000c3664 addiu v0, zero, 0x186 | v0 = 0x186;
| if (a0 == 0) {
0x000c3668 beqz a0, 0xc3768 | goto label_2;
| }
0x000c366c move s0, a1 | s0 = a1;
| if (a1 == 0) {
0x000c3670 beqz a1, 0xc3730 | goto label_3;
| }
| label_1:
0x000c3674 lw v0, 0xc(a0) | v0 = *((a0 + 3));
0x000c3678 andi v0, v0, 1 | v0 &= 1;
0x000c367c lw t9, -0x5a18(gp) | t9 = *((gp - 5766));
| if (v0 != 0) {
0x000c3680 bnez v0, 0xc36d4 | goto label_4;
| }
0x000c3684 lw t9, 0x18(a0) | t9 = *((a0 + 6));
| if (t9 == 0) {
0x000c3688 beqz t9, 0xc36c0 | goto label_5;
| }
0x000c368c nop |
| do {
0x000c3690 move a1, s0 | a1 = s0;
0x000c3694 jalr t9 | t9 ();
0x000c3698 move s1, v0 | s1 = v0;
0x000c369c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x000c36a0 beqz v0, 0xc36d0 | goto label_6;
| }
0x000c36a4 lw ra, 0x2c(sp) | ra = *(var_2ch);
| label_0:
0x000c36a8 move v0, s1 | v0 = s1;
0x000c36ac lw s2, 0x28(sp) | s2 = *(var_28h);
0x000c36b0 lw s1, 0x24(sp) | s1 = *(var_24h);
0x000c36b4 lw s0, 0x20(sp) | s0 = *(var_20h);
0x000c36b8 addiu sp, sp, 0x30 |
0x000c36bc jr ra | return v0;
| label_5:
0x000c36c0 lw v0, (a0) | v0 = *(a0);
0x000c36c4 lw t9, 0x18(v0) | t9 = *((v0 + 6));
0x000c36c8 bnez t9, 0xc3690 |
| } while (t9 != 0);
0x000c36cc nop |
| label_6:
0x000c36d0 lw t9, -0x5a18(gp) | t9 = *((gp - 5766));
| label_4:
0x000c36d4 lw s2, -0x7f74(gp) | s2 = *((gp - 8157));
0x000c36d8 move a0, s0 | a0 = s0;
0x000c36dc jalr t9 | t9 ();
0x000c36e0 lw gp, 0x18(sp) | gp = *(var_18h);
0x000c36e4 addiu a0, v0, 1 | a0 = v0 + 1;
0x000c36e8 addiu a1, s2, 0x2f5c | a1 = s2 + 0x2f5c;
0x000c36ec lw t9, -0x7f84(gp) | t9 = *((gp - 8161));
0x000c36f0 addiu a2, zero, 0x196 | a2 = 0x196;
0x000c36f4 jalr t9 | t9 ();
0x000c36f8 move s1, v0 | s1 = v0;
0x000c36fc lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x000c3700 beqz v0, 0xc3780 | goto label_7;
| }
0x000c3704 lw t9, -0x5a18(gp) | t9 = *((gp - 5766));
0x000c3708 move a0, s0 | a0 = s0;
0x000c370c jalr t9 | t9 ();
0x000c3710 lw gp, 0x18(sp) | gp = *(var_18h);
0x000c3714 move a0, s1 | a0 = s1;
0x000c3718 move a1, s0 | a1 = s0;
0x000c371c lw t9, -0x7f5c(gp) | t9 = *((gp - 8151));
0x000c3720 addiu a2, v0, 1 | a2 = v0 + 1;
0x000c3724 bal 0xca404 | sym_BUF_strlcpy ();
0x000c3728 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x000c372c b 0xc36a8 | goto label_0;
| label_3:
0x000c3730 lw s0, 0x20(a0) | s0 = *((a0 + 8));
0x000c3734 lw t9, -0x7fb4(gp) | t9 = *((gp - 8173));
| if (s0 != 0) {
0x000c3738 bnez s0, 0xc3674 | goto label_1;
| }
0x000c373c addiu v0, zero, 0x18c | v0 = aav.0x0000018c;
0x000c3740 sw v0, 0x10(sp) | *(var_10h) = v0;
0x000c3744 addiu a0, zero, 0x25 | a0 = 0x25;
0x000c3748 addiu a1, zero, 0x7e | a1 = 0x7e;
0x000c374c addiu a2, zero, 0x6f | a2 = 0x6f;
| do {
0x000c3750 lw a3, -0x7f74(gp) | a3 = *((gp - 8157));
0x000c3754 move s1, zero | s1 = 0;
0x000c3758 addiu a3, a3, 0x2f5c | a3 += 0x2f5c;
0x000c375c bal 0xdc4bc | sym_ERR_put_error ();
0x000c3760 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x000c3764 b 0xc36a8 | goto label_0;
| label_2:
0x000c3768 lw t9, -0x7fb4(gp) | t9 = *((gp - 8173));
0x000c376c sw v0, 0x10(sp) | *(var_10h) = v0;
0x000c3770 addiu a0, zero, 0x25 | a0 = 0x25;
0x000c3774 addiu a1, zero, 0x7e | a1 = 0x7e;
0x000c3778 addiu a2, zero, 0x43 | a2 = 0x43;
0x000c377c b 0xc3750 |
| } while (1);
| label_7:
0x000c3780 lw t9, -0x7fb4(gp) | t9 = *((gp - 8173));
0x000c3784 addiu v0, zero, 0x198 | v0 = aav.0x00000198;
0x000c3788 sw v0, 0x10(sp) | *(var_10h) = v0;
0x000c378c addiu a0, zero, 0x25 | a0 = 0x25;
0x000c3790 addiu a1, zero, 0x7e | a1 = 0x7e;
0x000c3794 addiu a2, zero, 0x41 | a2 = 0x41;
0x000c3798 addiu a3, s2, 0x2f5c | a3 = s2 + 0x2f5c;
0x000c379c bal 0xdc4bc | sym_ERR_put_error ();
0x000c37a0 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x000c37a4 b 0xc36a8 | goto label_0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/13893632-15421440.squashfs_v4_le_extract/thirdlib/libcrypto.so.1.0.0 @ 0x15839c */
| #include <stdint.h>
|
; (fcn) sym.UI_set_result () | void UI_set_result () {
0x0015839c lui gp, 7 |
0x001583a0 addiu gp, gp, 0x4824 |
0x001583a4 addu gp, gp, t9 | gp += t9;
0x001583a8 lw t9, -0x5a18(gp) | t9 = *((gp - 5766));
0x001583ac addiu sp, sp, -0x58 |
0x001583b0 sw gp, 0x18(sp) | *(var_18h) = gp;
0x001583b4 sw s2, 0x48(sp) | *(var_48h) = s2;
0x001583b8 sw s1, 0x44(sp) | *(var_44h) = s1;
0x001583bc sw s0, 0x40(sp) | *(var_40h) = s0;
0x001583c0 sw ra, 0x54(sp) | *(var_54h) = ra;
0x001583c4 move s0, a0 | s0 = a0;
0x001583c8 sw s4, 0x50(sp) | *(var_50h) = s4;
0x001583cc move a0, a2 | a0 = a2;
0x001583d0 sw s3, 0x4c(sp) | *(var_4ch) = s3;
0x001583d4 move s1, a2 | s1 = a2;
0x001583d8 move s2, a1 | s2 = a1;
0x001583dc jalr t9 | t9 ();
0x001583e0 lw v1, 0x14(s0) | v1 = *((s0 + 5));
0x001583e4 addiu a0, zero, -2 | a0 = -2;
0x001583e8 lw gp, 0x18(sp) | gp = *(var_18h);
0x001583ec and v1, v1, a0 | v1 &= a0;
0x001583f0 sw v1, 0x14(s0) | *((s0 + 5)) = v1;
| if (s2 == 0) {
0x001583f4 beqz s2, 0x1585bc | goto label_3;
| }
0x001583f8 lw v1, (s2) | v1 = *(s2);
0x001583fc move s3, v0 | s3 = v0;
| if (v1 != 0) {
0x00158400 bnez v1, 0x158428 | goto label_4;
| }
0x00158404 move v0, zero | v0 = 0;
| do {
| label_0:
0x00158408 lw ra, 0x54(sp) | ra = *(var_54h);
0x0015840c lw s4, 0x50(sp) | s4 = *(var_50h);
0x00158410 lw s3, 0x4c(sp) | s3 = *(var_4ch);
0x00158414 lw s2, 0x48(sp) | s2 = *(var_48h);
0x00158418 lw s1, 0x44(sp) | s1 = *(var_44h);
0x0015841c lw s0, 0x40(sp) | s0 = *(var_40h);
0x00158420 addiu sp, sp, 0x58 |
0x00158424 jr ra | return v0;
| label_4:
0x00158428 sltiu v0, v1, 3 | v0 = (v1 < 3) ? 1 : 0;
0x0015842c lw s4, -0x7fd0(gp) | s4 = *((gp - 8180));
| if (v0 != 0) {
0x00158430 bnez v0, 0x1584d8 | goto label_5;
| }
0x00158434 addiu v0, zero, 3 | v0 = 3;
0x00158438 move v0, zero | v0 = 0;
0x0015843c bne v1, v0, 0x158408 |
| } while (v1 != v0);
0x00158440 lw v0, 0xc(s2) | v0 = *((s2 + 3));
0x00158444 lw t9, -0x7fb4(gp) | t9 = *((gp - 8173));
| if (v0 == 0) {
0x00158448 beqz v0, 0x15865c | goto label_6;
| }
0x0015844c sb zero, (v0) | *(v0) = 0;
0x00158450 lb s0, (s1) | s0 = *(s1);
0x00158454 move v0, zero | v0 = 0;
| if (s0 == 0) {
0x00158458 beqz s0, 0x158408 | goto label_0;
| }
0x0015845c lw s3, 0x14(s2) | s3 = *((s2 + 5));
0x00158460 b 0x158484 | goto label_7;
| label_1:
0x00158464 lw s0, 0x18(s2) | s0 = *((s2 + 6));
0x00158468 move a0, s0 | a0 = s0;
0x0015846c jalr t9 | t9 ();
0x00158470 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00158474 bnez v0, 0x158568 | goto label_8;
| }
0x00158478 lb s0, (s1) | s0 = *(s1);
0x0015847c move v0, zero | v0 = 0;
| if (s0 == 0) {
0x00158480 beqz s0, 0x158408 | goto label_0;
| }
| label_7:
0x00158484 lw t9, -0x593c(gp) | t9 = *((gp - 5711));
0x00158488 move a1, s0 | a1 = s0;
0x0015848c move a0, s3 | a0 = s3;
0x00158490 jalr t9 | t9 ();
0x00158494 lw gp, 0x18(sp) | gp = *(var_18h);
0x00158498 addiu s1, s1, 1 | s1++;
0x0015849c move a1, s0 | a1 = s0;
0x001584a0 lw t9, -0x593c(gp) | t9 = *((gp - 5711));
| if (v0 == 0) {
0x001584a4 beqz v0, 0x158464 | goto label_1;
| }
0x001584a8 lw v1, 0xc(s2) | v1 = *((s2 + 3));
0x001584ac lb a0, (s3) | a0 = *(s3);
0x001584b0 move v0, zero | v0 = 0;
0x001584b4 sb a0, (v1) | *(v1) = a0;
0x001584b8 lw ra, 0x54(sp) | ra = *(var_54h);
0x001584bc lw s4, 0x50(sp) | s4 = *(var_50h);
0x001584c0 lw s3, 0x4c(sp) | s3 = *(var_4ch);
0x001584c4 lw s2, 0x48(sp) | s2 = *(var_48h);
0x001584c8 lw s1, 0x44(sp) | s1 = *(var_44h);
0x001584cc lw s0, 0x40(sp) | s0 = *(var_40h);
0x001584d0 addiu sp, sp, 0x58 |
0x001584d4 jr ra | return v0;
| label_5:
0x001584d8 lw t9, -0x7f6c(gp) | t9 = *((gp - 8155));
0x001584dc lw a3, 0x10(s2) | a3 = *((s2 + 4));
0x001584e0 addiu a0, sp, 0x30 | a0 = sp + 0x30;
0x001584e4 addiu a1, zero, 0xd | a1 = 0xd;
0x001584e8 addiu a2, s4, -0x4004 | a2 = s4 + -aav.0x00004004;
0x001584ec jalr t9 | t9 ();
0x001584f0 lw gp, 0x18(sp) | gp = *(var_18h);
0x001584f4 lw a3, 0x14(s2) | a3 = *((s2 + 5));
0x001584f8 addiu a0, sp, 0x20 | a0 = sp + 0x20;
0x001584fc lw t9, -0x7f6c(gp) | t9 = *((gp - 8155));
0x00158500 addiu a1, zero, 0xd | a1 = 0xd;
0x00158504 addiu a2, s4, -0x4004 | a2 = s4 + -aav.0x00004004;
0x00158508 jalr t9 | t9 ();
0x0015850c lw v0, 0x10(s2) | v0 = *((s2 + 4));
0x00158510 slt v0, s3, v0 | v0 = (s3 < v0) ? 1 : 0;
0x00158514 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00158518 bnez v0, 0x1585c4 |
0x0015851c lw a2, 0x14(s2) | a2 = *((s2 + 5));
0x00158520 slt s3, a2, s3 | s3 = (a2 < s3) ? 1 : 0;
0x00158524 lw a3, -0x7fd0(gp) | a3 = *((gp - 8180));
| if (s3 != 0) {
0x00158528 bnez s3, 0x158634 | goto label_9;
| }
0x0015852c lw a0, 0xc(s2) | a0 = *((s2 + 3));
0x00158530 lw t9, -0x7f5c(gp) | t9 = *((gp - 8151));
| if (a0 != 0) {
0x00158534 beqz a0, 0x158598 |
0x00158538 move a1, s1 | a1 = s1;
0x0015853c addiu a2, a2, 1 | a2++;
0x00158540 jalr t9 | t9 ();
0x00158544 lw ra, 0x54(sp) | ra = *(var_54h);
0x00158548 lw s4, 0x50(sp) | s4 = *(var_50h);
0x0015854c lw s3, 0x4c(sp) | s3 = *(var_4ch);
0x00158550 lw s2, 0x48(sp) | s2 = *(var_48h);
0x00158554 lw s1, 0x44(sp) | s1 = *(var_44h);
0x00158558 lw s0, 0x40(sp) | s0 = *(var_40h);
0x0015855c move v0, zero | v0 = 0;
0x00158560 addiu sp, sp, 0x58 |
0x00158564 jr ra | return v0;
| label_8:
0x00158568 lw v1, 0xc(s2) | v1 = *((s2 + 3));
0x0015856c lb a0, (s0) | a0 = *(s0);
0x00158570 move v0, zero | v0 = 0;
0x00158574 sb a0, (v1) | *(v1) = a0;
0x00158578 lw ra, 0x54(sp) | ra = *(var_54h);
0x0015857c lw s4, 0x50(sp) | s4 = *(var_50h);
0x00158580 lw s3, 0x4c(sp) | s3 = *(var_4ch);
0x00158584 lw s2, 0x48(sp) | s2 = *(var_48h);
0x00158588 lw s1, 0x44(sp) | s1 = *(var_44h);
0x0015858c lw s0, 0x40(sp) | s0 = *(var_40h);
0x00158590 addiu sp, sp, 0x58 |
0x00158594 jr ra | return v0;
| }
0x00158598 lw t9, -0x7fb4(gp) | t9 = *((gp - 8173));
0x0015859c addiu v0, zero, 0x346 | v0 = 0x346;
| label_2:
0x001585a0 lw a3, -0x7fd0(gp) | a3 = *((gp - 8180));
0x001585a4 sw v0, 0x10(sp) | *(var_10h) = v0;
0x001585a8 addiu a0, zero, 0x28 | a0 = 0x28;
0x001585ac addiu a1, zero, 0x69 | a1 = 0x69;
0x001585b0 addiu a2, zero, 0x69 | a2 = 0x69;
0x001585b4 addiu a3, a3, -0x1524 | a3 += -0x1524;
0x001585b8 jalr t9 | t9 ();
| label_3:
0x001585bc addiu v0, zero, -1 | v0 = -1;
0x001585c0 b 0x158408 | goto label_0;
| }
0x001585c4 lw v0, 0x14(s0) | v0 = *((s0 + 5));
0x001585c8 lw a3, -0x7fd0(gp) | a3 = *((gp - 8180));
0x001585cc lw t9, -0x7fb4(gp) | t9 = *((gp - 8173));
0x001585d0 ori v0, v0, 1 | v0 |= 1;
0x001585d4 sw v0, 0x14(s0) | *((s0 + 5)) = v0;
0x001585d8 addiu a0, zero, 0x28 | a0 = 0x28;
0x001585dc addiu a1, zero, 0x69 | a1 = 0x69;
0x001585e0 addiu a2, zero, 0x65 | a2 = 0x65;
0x001585e4 addiu a3, a3, -0x1524 | a3 += -0x1524;
0x001585e8 addiu v0, zero, 0x337 | v0 = 0x337;
| do {
0x001585ec sw v0, 0x10(sp) | *(var_10h) = v0;
0x001585f0 jalr t9 | t9 ();
0x001585f4 lw gp, 0x18(sp) | gp = *(var_18h);
0x001585f8 addiu v0, sp, 0x20 | v0 = sp + 0x20;
0x001585fc sw v0, 0x10(sp) | *(var_10h) = v0;
0x00158600 lw v0, -0x7fd0(gp) | v0 = *((gp - 8180));
0x00158604 lw a1, -0x7fd0(gp) | a1 = *((gp - 8180));
0x00158608 lw a3, -0x7fd0(gp) | a3 = *((gp - 8180));
0x0015860c lw t9, -0x73e0(gp) | t9 = *((gp - 7416));
0x00158610 addiu v0, v0, -0x15a4 | v0 += -0x15a4;
0x00158614 sw v0, 0x14(sp) | *(var_14h) = v0;
0x00158618 addiu a0, zero, 5 | a0 = 5;
0x0015861c addiu a1, a1, -0x1518 | a1 += -0x1518;
0x00158620 addiu a2, sp, 0x30 | a2 = sp + 0x30;
0x00158624 addiu a3, a3, -0x1504 | a3 += -0x1504;
0x00158628 jalr t9 | t9 ();
0x0015862c addiu v0, zero, -1 | v0 = -1;
0x00158630 b 0x158408 | goto label_0;
| label_9:
0x00158634 lw v0, 0x14(s0) | v0 = *((s0 + 5));
0x00158638 lw t9, -0x7fb4(gp) | t9 = *((gp - 8173));
0x0015863c ori v0, v0, 1 | v0 |= 1;
0x00158640 sw v0, 0x14(s0) | *((s0 + 5)) = v0;
0x00158644 addiu a0, zero, 0x28 | a0 = 0x28;
0x00158648 addiu a1, zero, 0x69 | a1 = 0x69;
0x0015864c addiu a2, zero, 0x64 | a2 = 0x64;
0x00158650 addiu a3, a3, -0x1524 | a3 += -0x1524;
0x00158654 addiu v0, zero, 0x33e | v0 = 0x33e;
0x00158658 b 0x1585ec |
| } while (1);
| label_6:
0x0015865c addiu v0, zero, 0x352 | v0 = 0x352;
0x00158660 b 0x1585a0 | goto label_2;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/13893632-15421440.squashfs_v4_le_extract/thirdlib/libcrypto.so.1.0.0 @ 0xfb4f0 */
| #include <stdint.h>
|
; (fcn) sym.X509_PUBKEY_set () | void X509_PUBKEY_set () {
0x000fb4f0 invalid |
0x000fb4f4 sll s0, zero, 0 | s0 = 0;
0x000fb4f8 nop |
0x000fb4fc nop |
0x000fb500 nop |
0x000fb504 lw t9, -0x6b54(gp) | t9 = *((gp - 6869));
0x000fb508 addiu sp, sp, -0x30 |
0x000fb50c sw gp, 0x18(sp) | *(var_18h) = gp;
0x000fb510 sw s2, 0x28(sp) | *(var_28h) = s2;
0x000fb514 sw s1, 0x24(sp) | *(var_24h) = s1;
0x000fb518 sw s0, 0x20(sp) | *(var_20h) = s0;
0x000fb51c sw ra, 0x2c(sp) | *(var_2ch) = ra;
0x000fb520 move s1, a0 | s1 = a0;
0x000fb524 move s2, a1 | s2 = a1;
0x000fb528 bal 0xfb4c0 | sym_X509_PUBKEY_new ();
0x000fb52c move s0, v0 | s0 = v0;
0x000fb530 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x000fb534 beqz v0, 0xfb598 |
0x000fb538 lw v0, 0xc(s2) | v0 = *((s2 + 3));
0x000fb53c lw a3, -0x7f74(gp) | a3 = *((gp - 8157));
| if (v0 == 0) {
0x000fb540 beqz v0, 0xfb628 | goto label_1;
| }
0x000fb544 lw t9, 0x18(v0) | t9 = *((v0 + 6));
0x000fb548 addiu v0, zero, 0x6b | v0 = 0x6b;
| if (t9 == 0) {
0x000fb54c beqz t9, 0xfb604 | goto label_2;
| }
0x000fb550 move a0, s0 | a0 = s0;
0x000fb554 move a1, s2 | a1 = s2;
0x000fb558 jalr t9 | t9 ();
0x000fb55c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x000fb560 beqz v0, 0xfb5b4 | goto label_3;
| }
0x000fb564 lw a0, (s1) | a0 = *(s1);
0x000fb568 lw t9, -0x6b50(gp) | t9 = *((gp - 6868));
| if (a0 != 0) {
0x000fb56c beqz a0, 0xfb578 |
0x000fb570 bal 0xfb4d8 | sym_X509_PUBKEY_free ();
0x000fb574 nop |
| }
0x000fb578 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x000fb57c sw s0, (s1) | *(s1) = s0;
0x000fb580 lw s2, 0x28(sp) | s2 = *(var_28h);
0x000fb584 lw s1, 0x24(sp) | s1 = *(var_24h);
0x000fb588 lw s0, 0x20(sp) | s0 = *(var_20h);
0x000fb58c addiu v0, zero, 1 | v0 = 1;
0x000fb590 addiu sp, sp, 0x30 |
0x000fb594 jr ra | return v0;
| }
0x000fb598 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x000fb59c lw s2, 0x28(sp) | s2 = *(var_28h);
0x000fb5a0 lw s1, 0x24(sp) | s1 = *(var_24h);
0x000fb5a4 lw s0, 0x20(sp) | s0 = *(var_20h);
0x000fb5a8 move v0, zero | v0 = 0;
0x000fb5ac addiu sp, sp, 0x30 |
0x000fb5b0 jr ra | return v0;
| label_3:
0x000fb5b4 lw a3, -0x7f74(gp) | a3 = *((gp - 8157));
0x000fb5b8 lw t9, -0x7fb4(gp) | t9 = *((gp - 8173));
0x000fb5bc addiu v0, zero, 0x67 | v0 = 0x67;
0x000fb5c0 sw v0, 0x10(sp) | *(var_10h) = v0;
0x000fb5c4 addiu a0, zero, 0xb | a0 = 0xb;
0x000fb5c8 addiu a1, zero, 0x78 | a1 = 0x78;
0x000fb5cc addiu a2, zero, 0x7e | a2 = 0x7e;
0x000fb5d0 addiu a3, a3, 0x6acc | a3 += aav.0x00006acc;
0x000fb5d4 bal 0xdc4bc | sym_ERR_put_error ();
0x000fb5d8 lw gp, 0x18(sp) | gp = *(var_18h);
| do {
| label_0:
0x000fb5dc lw t9, -0x6b50(gp) | t9 = *((gp - 6868));
0x000fb5e0 move a0, s0 | a0 = s0;
0x000fb5e4 bal 0xfb4d8 | sym_X509_PUBKEY_free ();
0x000fb5e8 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x000fb5ec lw s2, 0x28(sp) | s2 = *(var_28h);
0x000fb5f0 lw s1, 0x24(sp) | s1 = *(var_24h);
0x000fb5f4 lw s0, 0x20(sp) | s0 = *(var_20h);
0x000fb5f8 move v0, zero | v0 = 0;
0x000fb5fc addiu sp, sp, 0x30 |
0x000fb600 jr ra | return v0;
| label_2:
0x000fb604 lw t9, -0x7fb4(gp) | t9 = *((gp - 8173));
0x000fb608 sw v0, 0x10(sp) | *(var_10h) = v0;
0x000fb60c addiu a0, zero, 0xb | a0 = 0xb;
0x000fb610 addiu a1, zero, 0x78 | a1 = 0x78;
0x000fb614 addiu a2, zero, 0x7c | a2 = 0x7c;
0x000fb618 addiu a3, a3, 0x6acc | a3 += aav.0x00006acc;
0x000fb61c bal 0xdc4bc | sym_ERR_put_error ();
0x000fb620 lw gp, 0x18(sp) | gp = *(var_18h);
0x000fb624 b 0xfb5dc |
| } while (1);
| label_1:
0x000fb628 lw t9, -0x7fb4(gp) | t9 = *((gp - 8173));
0x000fb62c addiu v0, zero, 0x6f | v0 = 0x6f;
0x000fb630 sw v0, 0x10(sp) | *(var_10h) = v0;
0x000fb634 addiu a0, zero, 0xb | a0 = 0xb;
0x000fb638 addiu a1, zero, 0x78 | a1 = 0x78;
0x000fb63c addiu a2, zero, 0x6f | a2 = 0x6f;
0x000fb640 addiu a3, a3, 0x6acc | a3 += aav.0x00006acc;
0x000fb644 bal 0xdc4bc | sym_ERR_put_error ();
0x000fb648 lw gp, 0x18(sp) | gp = *(var_18h);
0x000fb64c b 0xfb5dc | goto label_0;
0x000fb650 move v0, zero | v0 = 0;
0x000fb654 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/13893632-15421440.squashfs_v4_le_extract/thirdlib/libcrypto.so.1.0.0 @ 0xfbec0 */
| #include <stdint.h>
|
; (fcn) sym.X509_PUBKEY_set0_param () | void X509_PUBKEY_set0_param () {
0x000fbec0 lui gp, 0xd |
0x000fbec4 addiu gp, gp, 0xd00 |
0x000fbec8 addu gp, gp, t9 | gp += t9;
0x000fbecc addiu sp, sp, -0x28 |
0x000fbed0 lw t9, -0x7814(gp) | t9 = *((gp - 7685));
0x000fbed4 sw s0, 0x1c(sp) | *(var_1ch) = s0;
0x000fbed8 move s0, a0 | s0 = a0;
0x000fbedc lw a0, (a0) | a0 = *(a0);
0x000fbee0 sw gp, 0x10(sp) | *(var_10h) = gp;
0x000fbee4 sw s1, 0x20(sp) | *(var_20h) = s1;
0x000fbee8 sw ra, 0x24(sp) | *(var_24h) = ra;
0x000fbeec lw s1, 0x38(sp) | s1 = *(arg_38h);
0x000fbef0 bal 0xfb15c | sym_X509_ALGOR_set0 ();
0x000fbef4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000fbef8 move v1, zero | v1 = 0;
| if (v0 != 0) {
0x000fbefc beqz v0, 0xfbf48 |
0x000fbf00 addiu v1, zero, 1 | v1 = 1;
| if (s1 == 0) {
0x000fbf04 beqz s1, 0xfbf48 | goto label_0;
| }
0x000fbf08 lw v0, 4(s0) | v0 = *((s0 + 1));
0x000fbf0c lw a0, 8(v0) | a0 = *((v0 + 2));
0x000fbf10 lw t9, -0x7fb8(gp) | t9 = *((gp - 8174));
| if (a0 != 0) {
0x000fbf14 beqz a0, 0xfbf24 |
0x000fbf18 jalr t9 | t9 ();
0x000fbf1c nop |
0x000fbf20 lw v0, 4(s0) | v0 = *((s0 + 1));
| }
0x000fbf24 lw a0, 0xc(v0) | a0 = *((v0 + 3));
0x000fbf28 addiu v1, zero, -0x10 | v1 = -0x10;
0x000fbf2c sw s1, 8(v0) | *((v0 + 2)) = s1;
0x000fbf30 and v1, a0, v1 | v1 = a0 & v1;
0x000fbf34 lw a0, 0x3c(sp) | a0 = *(arg_3ch);
0x000fbf38 ori v1, v1, 8 | v1 |= 8;
0x000fbf3c sw v1, 0xc(v0) | *((v0 + 3)) = v1;
0x000fbf40 sw a0, (v0) | *(v0) = a0;
0x000fbf44 addiu v1, zero, 1 | v1 = 1;
| }
| label_0:
0x000fbf48 lw ra, 0x24(sp) | ra = *(var_24h);
0x000fbf4c lw s1, 0x20(sp) | s1 = *(var_20h);
0x000fbf50 lw s0, 0x1c(sp) | s0 = *(var_1ch);
0x000fbf54 move v0, v1 | v0 = v1;
0x000fbf58 addiu sp, sp, 0x28 |
0x000fbf5c jr ra | return v0;
| }
[*] Function popen used 1 times libcrypto.so.1.0.0