Function at 0x18014d910
Capabilities:
Read file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x37]
sub rsp, 0xa0
xor ebx, ebx
lea rdx, [0x1801e882c]
mov r14d, ebx
mov qword [rbp + 0x7f], rbx
mov dword [rbp + 0x77], ebx
mov rdi, rcx
mov dword [rbp + 0x6f], ebx
call fcn.18016f820
mov rsi, rax
test rax, rax
jne 0x18014d971
mov r9, rdi
lea r8, str.Couldnt_open_file__s
lea rdx, str.stream_secure_channel
xor ecx, ecx
call fcn.1800f0e30
xor eax, eax
add rsp, 0xa0
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
xor edx, edx
mov qword [rsp + 0x90], r15
mov rcx, rsi
lea r8d, [rdx + 2]
call fcn.180168bf0
mov rcx, rsi
call fcn.18016f060
xor r8d, r8d
movsxd r15, eax
xor edx, edx
mov rcx, rsi
call fcn.180168bf0
cmp r15d, 1
jge 0x18014d9c4
mov r9, rdi
lea r8, str.Couldnt_determine_file_size_of__s
lea rdx, str.stream_secure_channel
xor ecx, ecx
call fcn.1800f0e30
xor eax, eax
jmp 0x18014dd6b
mov qword [rsp + 0xd0], r12
mov rcx, r15
mov qword [rsp + 0x98], r13
mov r13, r15
call fcn.180084f90
mov r9, rsi
mov r8, r15
mov edx, 1
mov rcx, rax
mov r12, rax
call fcn.180168820
mov rcx, rsi
call fcn.180167954
lea rdx, str._____BEGIN_CERTIFICATE_____
mov rcx, r12
call fcn.180161d3c
lea rdx, str._____BEGIN_ENCRYPTED_PRIVATE_KEY_____
mov rcx, r12
mov r15, rax
call fcn.180161d3c
test rax, rax
je 0x18014da3d
lea r8, str.Detected_unsupported_encrypted_private_key
xor ecx, ecx
lea rdx, str.stream_secure_channel
call fcn.1800f0e30
jmp 0x18014dd19
lea rdx, str._____BEGIN_RSA_PRIVATE_KEY_____
mov rcx, r12
call fcn.180161d3c
mov rsi, rax
test rax, rax
jne 0x18014da88
lea rdx, str._____BEGIN_PRIVATE_KEY_____
mov rcx, r12
call fcn.180161d3c
mov rsi, rax
test rax, rax
jne 0x18014da88
mov r9, rdi
lea r8, str.Cant_find_private_key_in__s
lea rdx, str.stream_secure_channel
xor ecx, ecx
call fcn.1800f0e30
jmp 0x18014dd19
mov rax, 0xffffffffffffffff
nop
inc rax
cmp byte [r15 + rax], bl
jne 0x18014da90
mov dword [rbp + 0xf], eax
lea rdx, [rbp + 0xf]
lea rax, [rbp + 0x7f]
mov qword [rbp + 0x17], r15
xor r15d, r15d
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], r15
mov r8d, 0x3ffe
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], r15
lea r9d, [r15 + 0xe]
mov qword [rsp + 0x28], r15
lea ecx, [r15 + 2]
mov dword [rsp + 0x20], r15d
call qword [sym.imp.CRYPT32.dll_CryptQueryObject]
cmp qword [rbp + 0x7f], rbx
jne 0x18014db0f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9, rdi
lea r8, str.Failed_to_extract_public_key_from__s._Error_0x_.8X
lea rdx, str.stream_secure_channel
mov dword [rsp + 0x20], eax
xor ecx, ecx
call fcn.1800f0e30
jmp 0x18014dd19
mov qword [rsp + 0x30], r15
lea rax, [rbp + 0x6f]
mov qword [rsp + 0x28], r15
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rsi
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
jne 0x18014db49
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.Failed_to_convert_base64_private_key._Error_0x_.8X
jmp 0x18014dd08
mov ecx, dword [rbp + 0x6f]
call fcn.180084f90
mov rbx, rax
mov qword [rsp + 0x30], r15
lea rax, [rbp + 0x6f]
mov qword [rsp + 0x28], r15
mov r9, rbx
mov qword [rsp + 0x20], rax
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
jne 0x18014db8e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.Failed_to_convert_base64_private_key._Error_0x_.8X
jmp 0x18014dd08
mov r9d, dword [rbp + 0x6f]
lea rax, [rbp + 0x77]
mov qword [rsp + 0x38], rax
mov r8, rbx
mov qword [rsp + 0x30], r15
mov edx, 0x2b
mov qword [rsp + 0x28], r15
mov ecx, 0x10001
mov dword [rsp + 0x20], r15d
call qword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
test eax, eax
jne 0x18014dc23
mov qword [rbp - 9], r15
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x30], r15
xor r9d, r9d
mov r8d, eax
mov dword [rsp + 0x28], r15d
lea rax, [rbp - 9]
xor edx, edx
mov ecx, 0x3100
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9, qword [rbp - 9]
lea r8, str.Failed_to_parse_private_key.__s__0x_.8X_
lea rdx, str.stream_secure_channel
mov dword [rsp + 0x20], eax
xor ecx, ecx
call fcn.1800f0e30
mov rcx, qword [rbp - 9]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x18014dd19
mov ecx, dword [rbp + 0x77]
call fcn.180084f90
mov r9d, dword [rbp + 0x6f]
mov r14, rax
lea rax, [rbp + 0x77]
mov r8, rbx
mov qword [rsp + 0x38], rax
mov edx, 0x2b
mov qword [rsp + 0x30], r14
mov ecx, 0x10001
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], r15d
call qword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
test eax, eax
jne 0x18014dc73
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.Failed_to_parse_private_key._Error_0x_.8X
jmp 0x18014dd08
mov r9d, 1
mov dword [rsp + 0x20], 0xf0000000
lea r8, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
xor edx, edx
lea rcx, [rbp - 1]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x18014dca7
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.CryptAcquireContext_failed_with_error_0x_.8X
jmp 0x18014dd08
mov r8d, dword [rbp + 0x77]
lea rax, [rbp + 7]
mov rcx, qword [rbp - 1]
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov rdx, r14
mov dword [rsp + 0x20], r15d
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x18014dcdc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.CryptImportKey_for_private_key_failed_with_error_0x_.8X
jmp 0x18014dd08
mov r9, qword [rbp - 1]
xor r8d, r8d
mov rcx, qword [rbp + 0x7f]
lea edx, [r8 + 1]
call qword [sym.imp.CRYPT32.dll_CertSetCertificateContextProperty]
test eax, eax
je 0x18014dcfb
mov rax, qword [rbp + 0x7f]
jmp 0x18014dd5b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.Cant_associate_private_key_with_public_key:_0x_.8X
mov r9d, eax
lea rdx, str.stream_secure_channel
xor ecx, ecx
call fcn.1800f0e30
xor eax, eax
mov rdi, r12
mov rcx, r13
rep stosb byte [rdi], al
mov rcx, r12
call fcn.180084f30
test rbx, rbx
je 0x18014dd42
mov ecx, dword [rbp + 0x6f]
xor eax, eax
mov rdi, rbx
rep stosb byte [rdi], al
mov rcx, rbx
call fcn.180084f30
test r14, r14
je 0x18014dd59
mov ecx, dword [rbp + 0x77]
xor eax, eax
mov rdi, r14
rep stosb byte [rdi], al
mov rcx, r14
call fcn.180084f30
xor eax, eax
mov r13, qword [rsp + 0x98]
mov r12, qword [rsp + 0xd0]
mov r15, qword [rsp + 0x90]
add rsp, 0xa0
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret