Function at 0x180143090
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, [0x18016b2b8]
mov r14d, ebx
mov qword [rbp + 0x7f], rbx
mov dword [rbp + 0x77], ebx
mov rdi, rcx
mov dword [rbp + 0x6f], ebx
call fcn.1800c313c
mov rsi, rax
test rax, rax
jne 0x1801430f1
mov r9, rdi
lea r8, str.Couldnt_open_file__s
lea rdx, str.stream_secure_channel
xor ecx, ecx
call fcn.1800e3570
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.18003f4c4
mov rcx, rsi
call fcn.18005013c
xor r8d, r8d
movsxd r15, eax
xor edx, edx
mov rcx, rsi
call fcn.18003f4c4
cmp r15d, 1
jge 0x180143144
mov r9, rdi
lea r8, str.Couldnt_determine_file_size_of__s
lea rdx, str.stream_secure_channel
xor ecx, ecx
call fcn.1800e3570
xor eax, eax
jmp 0x1801434eb
mov qword [rsp + 0xd0], r12
mov rcx, r15
mov qword [rsp + 0x98], r13
mov r13, r15
call fcn.1800d9f00
mov r9, rsi
mov r8, r15
mov edx, 1
mov rcx, rax
mov r12, rax
call fcn.18003f0bc
mov rcx, rsi
call fcn.18003e610
lea rdx, str._____BEGIN_CERTIFICATE_____
mov rcx, r12
call fcn.1800bff80
lea rdx, str._____BEGIN_ENCRYPTED_PRIVATE_KEY_____
mov rcx, r12
mov r15, rax
call fcn.1800bff80
test rax, rax
je 0x1801431bd
lea r8, str.Detected_unsupported_encrypted_private_key
xor ecx, ecx
lea rdx, str.stream_secure_channel
call fcn.1800e3570
jmp 0x180143499
lea rdx, str._____BEGIN_RSA_PRIVATE_KEY_____
mov rcx, r12
call fcn.1800bff80
mov rsi, rax
test rax, rax
jne 0x180143208
lea rdx, str._____BEGIN_PRIVATE_KEY_____
mov rcx, r12
call fcn.1800bff80
mov rsi, rax
test rax, rax
jne 0x180143208
mov r9, rdi
lea r8, str.Cant_find_private_key_in__s
lea rdx, str.stream_secure_channel
xor ecx, ecx
call fcn.1800e3570
jmp 0x180143499
mov rax, 0xffffffffffffffff
nop
inc rax
cmp byte [r15 + rax], bl
jne 0x180143210
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 0x18014328f
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.1800e3570
jmp 0x180143499
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 0x1801432c9
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.Failed_to_convert_base64_private_key._Error_0x_.8X
jmp 0x180143488
mov ecx, dword [rbp + 0x6f]
call fcn.1800d9f00
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 0x18014330e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.Failed_to_convert_base64_private_key._Error_0x_.8X
jmp 0x180143488
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 0x1801433a3
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.1800e3570
mov rcx, qword [rbp - 9]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x180143499
mov ecx, dword [rbp + 0x77]
call fcn.1800d9f00
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 0x1801433f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.Failed_to_parse_private_key._Error_0x_.8X
jmp 0x180143488
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 0x180143427
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.CryptAcquireContext_failed_with_error_0x_.8X
jmp 0x180143488
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 0x18014345c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.CryptImportKey_for_private_key_failed_with_error_0x_.8X
jmp 0x180143488
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 0x18014347b
mov rax, qword [rbp + 0x7f]
jmp 0x1801434db
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.1800e3570
xor eax, eax
mov rdi, r12
mov rcx, r13
rep stosb byte [rdi], al
mov rcx, r12
call fcn.1800d9ea0
test rbx, rbx
je 0x1801434c2
mov ecx, dword [rbp + 0x6f]
xor eax, eax
mov rdi, rbx
rep stosb byte [rdi], al
mov rcx, rbx
call fcn.1800d9ea0
test r14, r14
je 0x1801434d9
mov ecx, dword [rbp + 0x77]
xor eax, eax
mov rdi, r14
rep stosb byte [rdi], al
mov rcx, r14
call fcn.1800d9ea0
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