Function at 0x1400964e8
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, [0x1400eaef8]
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.14000a838
cmp r14, rbx
je 0x140096690
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 0x140096673
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 0x140096923
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 0x14009664e
cmp dword [rdi + 0x1c], 0x2200
je 0x140096617
cmp dword [rdi + 0x1c], 0x2400
je 0x140096609
lea rax, [0x1400eb908]
lea rcx, str.keyx.rsa.pvk
cmp dword [rdi + 0x1c], 0xa400
cmove rax, rcx
mov qword [rsp + 0x50], rax
jmp 0x140096623
lea rax, str.sign.rsa.pvk
mov qword [rsp + 0x50], rax
jmp 0x140096623
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 0x140096923
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.14000a838
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdi, rax
jmp 0x140096923
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.14000a838
mov esi, dword [rsp + 0x40]
jmp 0x140096923
cmp r13, rbx
je 0x14009691f
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.1400052b4
cmp eax, ebx
je 0x140096904
mov esi, ebx
mov dword [rsp + 0x44], ebx
mov r15, qword [rsp + 0xc0]
cmp esi, 4
jae 0x14009670e
mov r14d, esi
shl r14, 5
lea rcx, [0x1400c83d0]
add r14, rcx
mov rdx, qword [r14]
mov rcx, r15
call qword [sym.imp.msvcrt.dll__wcsicmp]
cmp eax, ebx
jne 0x140096706
mov r12, r14
jmp 0x14009670e
inc esi
mov dword [rsp + 0x44], esi
jmp 0x1400966db
cmp r12, rbx
je 0x1400968de
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 0x1400968c4
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 0x1400968f1
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 0x14009689d
mov rax, qword [r12 + 0x10]
mov qword [rsp + 0x50], rax
cmp dword [r12 + 0x18], ebx
je 0x14009680b
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 0x1400968f1
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 0x14009685d
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.140011a88
jmp 0x14009685f
mov eax, ebx
cmp eax, ebx
je 0x140096887
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 0x1400968f1
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.14000a838
jmp 0x1400968f1
mov r8d, eax
mov rdx, qword [r12 + 8]
lea rcx, str.ERROR_kuhl_m_crypto_exportKeyToFile___NCryptExportKey__s____data_:_0x_08x_n
call fcn.14000a838
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdi, rax
mov qword [rsp + 0x48], rax
jmp 0x1400968f1
mov r8d, eax
mov rdx, qword [r12 + 8]
lea rcx, str.ERROR_kuhl_m_crypto_exportKeyToFile___NCryptExportKey__s____init_:_0x_08x_n
call fcn.14000a838
mov esi, dword [rsp + 0x40]
jmp 0x1400968f1
mov rdx, r15
lea rcx, str.ERROR_kuhl_m_crypto_exportKeyToFile___No_suitable_export_type_for_key_group:__s_n
call fcn.14000a838
mov esi, dword [rsp + 0x40]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r15, qword [rsp + 0xc8]
jmp 0x140096908
mov esi, dword [rsp + 0x40]
jmp 0x140096923
mov esi, dword [rsp + 0x40]
cmp rdi, rbx
je 0x1400969a3
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.140096b74
mov r12, rax
cmp rax, rbx
je 0x14009699a
mov r8d, esi
mov rdx, rdi
mov rcx, rax
call fcn.140008520
cmp eax, ebx
je 0x14009697d
mov rdx, r12
lea rcx, [0x1400f5018]
call fcn.14000a838
jmp 0x140096991
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.14000a838
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