Function at 0x14009ab68
Capabilities:
Encode data using base64 via winapi

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], r9
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
mov r14, rdx
mov r13, rcx
xor ebx, ebx
mov rdi, rbx
mov qword [rax - 0x70], rbx
mov dword [rax - 0x58], 0xb0b5f11e
mov dword [rax - 0x54], ebx
mov dword [rax - 0x50], r8d
mov dword [rax - 0x4c], ebx
mov dword [rax - 0x48], ebx
mov dword [rax - 0x44], ebx
lea rax, [0x1400f9738]
lea r15, str.capi
cmp rcx, rbx
cmovne r15, rax
mov qword [rsp + 0xc8], r15
mov r12, rbx
lea rcx, str._tPrivate_export_:
call fcn.14000c020
cmp r14, rbx
je 0x14009ad10
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
xor r9d, r9d
lea r12d, [rbx + 7]
mov r8d, r12d
xor edx, edx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CryptExportKey]
cmp eax, ebx
je 0x14009acf3
mov esi, dword [rsp + 0xd0]
add esi, 0x18
mov edx, esi
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
cmp rax, rbx
je 0x14009afa3
lea rcx, [rax + 0x18]
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
xor r9d, r9d
mov r8d, r12d
xor edx, edx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CryptExportKey]
cmp eax, ebx
je 0x14009acce
cmp dword [rdi + 0x1c], 0x2200
je 0x14009ac97
cmp dword [rdi + 0x1c], 0x2400
je 0x14009ac89
lea rax, [0x1400fa278]
lea rcx, str.keyx.rsa.pvk
cmp dword [rdi + 0x1c], 0xa400
cmove rax, rcx
mov qword [rsp + 0x50], rax
jmp 0x14009aca3
lea rax, str.sign.rsa.pvk
mov qword [rsp + 0x50], rax
jmp 0x14009aca3
lea rax, str.sign.dsa.pvk
mov qword [rsp + 0x50], rax
mov eax, dword [rsp + 0xd0]
mov dword [rsp + 0x74], eax
lea rcx, [rsp + 0x60]
mov rax, qword [rcx]
mov qword [rdi], rax
mov rax, qword [rcx + 8]
mov qword [rdi + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [rdi + 0x10], rax
jmp 0x14009afa3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kuhl_m_crypto_exportKeyToFile___CryptExportKey_data___0x_08x__n
call fcn.14000c020
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdi, rax
jmp 0x14009afa3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kuhl_m_crypto_exportKeyToFile___CryptExportKey_init___0x_08x__n
call fcn.14000c020
mov esi, dword [rsp + 0x40]
jmp 0x14009afa3
cmp r13, rbx
je 0x14009af9f
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0xc0]
mov r8d, 1
lea rdx, str.Algorithm_Group
mov rcx, r13
call fcn.1400052a4
cmp eax, ebx
je 0x14009af84
mov esi, ebx
mov dword [rsp + 0x44], ebx
mov r15, qword [rsp + 0xc0]
cmp esi, 4
jae 0x14009ad8e
mov r14d, esi
shl r14, 5
lea rcx, [0x1400d3a50]
add r14, rcx
mov rdx, qword [r14]
mov rcx, r15
call qword [sym.imp.ntdll.dll__wcsicmp]
cmp eax, ebx
jne 0x14009ad86
mov r12, r14
jmp 0x14009ad8e
inc esi
mov dword [rsp + 0x44], esi
jmp 0x14009ad5b
cmp r12, rbx
je 0x14009af5e
mov dword [rsp + 0x38], ebx
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
mov r8, qword [r12 + 8]
xor edx, edx
mov rcx, r13
call sub.ncrypt.dll_NCryptExportKey
cmp eax, ebx
jne 0x14009af44
mov eax, dword [r12 + 0x18]
neg eax
sbb rsi, rsi
and esi, 0x18
mov eax, dword [rsp + 0xd0]
add rsi, rax
mov dword [rsp + 0x40], esi
mov edx, esi
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
mov qword [rsp + 0x48], rax
cmp rax, rbx
je 0x14009af71
mov eax, dword [r12 + 0x18]
neg eax
sbb rcx, rcx
and ecx, 0x18
add rcx, rdi
mov dword [rsp + 0x38], ebx
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0xd0]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
xor r9d, r9d
mov r8, qword [r12 + 8]
xor edx, edx
mov rcx, r13
call sub.ncrypt.dll_NCryptExportKey
cmp eax, ebx
jne 0x14009af1d
mov rax, qword [r12 + 0x10]
mov qword [rsp + 0x50], rax
cmp dword [r12 + 0x18], ebx
je 0x14009ae8b
mov eax, dword [rsp + 0xd0]
mov dword [rsp + 0x74], eax
lea rcx, [rsp + 0x60]
mov rax, qword [rcx]
mov qword [rdi], rax
mov rax, qword [rcx + 8]
mov qword [rdi + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [rdi + 0x10], rax
jmp 0x14009af71
mov dword [rsp + 0xc0], ebx
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 0x80000001
mov edx, esi
mov rcx, rdi
call qword [sym.imp.CRYPT32.dll_CryptBinaryToStringA]
cmp eax, ebx
je 0x14009aedd
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
mov r8d, esi
mov rdx, rdi
lea rcx, str.PRIVATE_KEY
call fcn.140013768
jmp 0x14009aedf
mov eax, ebx
cmp eax, ebx
je 0x14009af07
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdi, qword [rsp + 0x58]
mov qword [rsp + 0x48], rdi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
mov dword [rsp + 0x40], eax
jmp 0x14009af71
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kuhl_m_crypto_exportKeyToFile___kull_m_string_EncodeB64_headers__0x_08x__n
call fcn.14000c020
jmp 0x14009af71
mov r8d, eax
mov rdx, qword [r12 + 8]
lea rcx, str.ERROR_kuhl_m_crypto_exportKeyToFile___NCryptExportKey__s____data_:_0x_08x_n
call fcn.14000c020
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdi, rax
mov qword [rsp + 0x48], rax
jmp 0x14009af71
mov r8d, eax
mov rdx, qword [r12 + 8]
lea rcx, str.ERROR_kuhl_m_crypto_exportKeyToFile___NCryptExportKey__s____init_:_0x_08x_n
call fcn.14000c020
mov esi, dword [rsp + 0x40]
jmp 0x14009af71
mov rdx, r15
lea rcx, str.ERROR_kuhl_m_crypto_exportKeyToFile___No_suitable_export_type_for_key_group:__s_n
call fcn.14000c020
mov esi, dword [rsp + 0x40]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r15, qword [rsp + 0xc8]
jmp 0x14009af88
mov esi, dword [rsp + 0x40]
jmp 0x14009afa3
mov esi, dword [rsp + 0x40]
cmp rdi, rbx
je 0x14009b023
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0xe8]
mov r8d, dword [rsp + 0xe0]
mov rdx, r15
mov rcx, qword [rsp + 0xd8]
call fcn.14009b1f4
mov r12, rax
cmp rax, rbx
je 0x14009b01a
mov r8d, esi
mov rdx, rdi
mov rcx, rax
call fcn.140009ce8
cmp eax, ebx
je 0x14009affd
mov rdx, r12
lea rcx, [0x140105c98]
call fcn.14000c020
jmp 0x14009b011
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kuhl_m_crypto_exportKeyToFile___kull_m_file_writeData__0x_08x__n
call fcn.14000c020
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret