Function at 0x1012fcd0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
mov esi, dword [esp + 0x38]
xor ecx, ecx
push 0x1021ffe4
push esi
mov dword [esp + 0x2c], ecx
xor ebx, ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], ecx
call fcn.100ac2e8
mov ebp, eax
add esp, 8
mov dword [esp + 0x18], ebp
test ebp, ebp
jne 0x1012fd23
push esi
push str.Couldnt_open_file__s
push str.stream_secure_channel
push eax
call fcn.100db4d0
add esp, 0x10
xor eax, eax
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
push edi
push 2
push 0
push ebp
call fcn.100a6125
push ebp
call fcn.100abb12
push 0
push 0
push ebp
mov edi, eax
call fcn.100a6125
add esp, 0x1c
cmp edi, 1
jge 0x1012fd67
push esi
push str.Couldnt_determine_file_size_of__s
push str.stream_secure_channel
push 0
call fcn.100db4d0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
push edi
call fcn.100d2910
push dword [esp + 0x20]
mov ebp, eax
push edi
push 1
push ebp
call fcn.100a5cc7
push dword [esp + 0x30]
call fcn.100a50b7
push str._____BEGIN_CERTIFICATE_____
push ebp
call fcn.100a1000
push str._____BEGIN_ENCRYPTED_PRIVATE_KEY_____
push ebp
mov dword [esp + 0x44], eax
call fcn.100a1000
add esp, 0x28
test eax, eax
je 0x1012fdc1
push str.Detected_unsupported_encrypted_private_key
push str.stream_secure_channel
push 0
call fcn.100db4d0
add esp, 0xc
xor esi, esi
jmp 0x1013001f
push str._____BEGIN_RSA_PRIVATE_KEY_____
push ebp
call fcn.100a1000
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
jne 0x1012fe09
push str._____BEGIN_PRIVATE_KEY_____
push ebp
call fcn.100a1000
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
jne 0x1012fe09
push esi
push str.Cant_find_private_key_in__s
push str.stream_secure_channel
push 0
call fcn.100db4d0
add esp, 0x10
xor esi, esi
jmp 0x1013001f
mov ecx, dword [esp + 0x1c]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1012fe10
mov eax, dword [esp + 0x1c]
sub ecx, edx
mov dword [esp + 0x34], eax
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0xe
push 0x3ffe
lea eax, [esp + 0x54]
mov dword [esp + 0x54], ecx
push eax
push 2
call dword [sym.imp.CRYPT32.dll_CryptQueryObject]
cmp dword [esp + 0x18], ebx
jne 0x1012fe73
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.Failed_to_extract_public_key_from__s._Error_0x_.8X
push str.stream_secure_channel
push 0
call fcn.100db4d0
add esp, 0x14
xor esi, esi
jmp 0x1013001f
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x10]
push 0
push 0
push eax
push 0
push 0
push 0
push esi
call dword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
jne 0x1012fea2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_convert_base64_private_key._Error_0x_.8X
jmp 0x1012fdf3
push dword [esp + 0x10]
call fcn.100d2910
add esp, 4
mov ebx, eax
lea eax, [esp + 0x10]
push 0
push 0
push eax
push ebx
push 0
push 0
push esi
call dword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
jne 0x1012feda
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_convert_base64_private_key._Error_0x_.8X
jmp 0x1012fdf3
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 0
push dword [esp + 0x20]
push ebx
push 0x2b
push 0x10001
call dword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
test eax, eax
jne 0x1012ff4a
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push eax
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push eax
push 0
call esi
push eax
push 0
push 0x3100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
call esi
push eax
push dword [esp + 0x20]
push str.Failed_to_parse_private_key.__s__0x_.8X_
push str.stream_secure_channel
push 0
call fcn.100db4d0
add esp, 0x14
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
jmp 0x1013001f
push dword [esp + 0x14]
call fcn.100d2910
add esp, 4
mov esi, eax
lea eax, [esp + 0x14]
mov dword [esp + 0x28], esi
push eax
push esi
push 0
push 0
push dword [esp + 0x20]
push ebx
push 0x2b
push 0x10001
call dword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
test eax, eax
jne 0x1012ff8d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_parse_private_key._Error_0x_.8X
jmp 0x10130010
push 0xf0000000
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
push 0
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x1012ffb8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptAcquireContext_failed_with_error_0x_.8X
jmp 0x10130010
lea eax, [esp + 0x2c]
push eax
push 0
push 0
push dword [esp + 0x20]
push esi
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x1012ffe2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptImportKey_for_private_key_failed_with_error_0x_.8X
jmp 0x10130010
push dword [esp + 0x24]
push 0
push 1
push dword [esp + 0x24]
call dword [sym.imp.CRYPT32.dll_CertSetCertificateContextProperty]
test eax, eax
je 0x10130004
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Cant_associate_private_key_with_public_key:_0x_.8X
push str.stream_secure_channel
push 0
call fcn.100db4d0
add esp, 0x10
mov eax, ebp
mov byte [eax], 0
lea eax, [eax + 1]
sub edi, 1
jne 0x10130021
push ebp
call fcn.100d28c0
add esp, 4
test ebx, ebx
je 0x10130064
mov eax, dword [esp + 0x10]
mov edx, ebx
mov ecx, dword [esp + 0x28]
mov esi, ecx
test eax, eax
je 0x1013005b
nop dword [eax]
mov byte [ebx], 0
lea ebx, [ebx + 1]
sub eax, 1
jne 0x10130050
push edx
call fcn.100d28c0
add esp, 4
test esi, esi
je 0x10130086
mov ecx, dword [esp + 0x14]
mov eax, esi
test ecx, ecx
je 0x1013007d
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x10130072
push esi
call fcn.100d28c0
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x28
ret