Function at 0x180006140
Capabilities:
Create new key via cryptacquirecontext
Encrypt or decrypt via wincrypt
Import public key

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
xor r15d, r15d
mov rdi, r9
mov ebx, r8d
mov dword [rsp + 0x20], r15d
mov rsi, rdx
lea r8, str.Microsoft_Base_Cryptographic_Provider_v1.0
mov r14, rcx
xor edx, edx
lea r9d, [r15 + 1]
lea rcx, [rbp - 0x10]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x1800061c8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x1800061ba
lea r9d, [r15 + 1]
mov dword [rsp + 0x20], 8
lea r8, str.Microsoft_Base_Cryptographic_Provider_v1.0
xor edx, edx
lea rcx, [rbp - 0x10]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x1800061c8
call qword [sym.imp.KERNEL32.dll_GetLastError]
or eax, 0xffffffff
jmp 0x18000637b
lea rax, [rbp - 0x1c]
mov dword [rbp - 0x1c], 0x30
mov qword [rsp + 0x38], rax
mov edx, 8
lea rax, [rbp - 8]
mov r9d, 0xa2
mov qword [rsp + 0x30], rax
mov r8, r14
mov qword [rsp + 0x28], r15
lea ecx, [rdx - 7]
mov dword [rsp + 0x20], 0x8000
call qword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
mov r8, qword [rbp - 8]
lea r9, [rbp - 0x18]
mov rcx, qword [rbp - 0x10]
mov edx, 1
call qword [sym.imp.CRYPT32.dll_CryptImportPublicKeyInfo]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp - 8]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x18]
lea r9, [rbp + 0x20]
xor r8d, r8d
mov dword [rbp + 0x20], r15d
mov dword [rsp + 0x20], r15d
lea edx, [r8 + 1]
call qword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
mov ecx, dword [rbp + 0x20]
call sub.msvcrt.dll_malloc
mov rcx, qword [rbp - 0x18]
lea r9, [rbp + 0x20]
mov r8, rax
mov dword [rsp + 0x20], r15d
mov edx, 1
call qword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
mov rcx, qword [rbp - 0x18]
lea r9, [rbp + 0x20]
xor r8d, r8d
mov dword [rsp + 0x20], r15d
lea edx, [r8 + 3]
call qword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
mov ecx, dword [rbp + 0x20]
call sub.msvcrt.dll_malloc
mov rcx, qword [rbp - 0x18]
lea r9, [rbp + 0x20]
mov r8, rax
mov dword [rsp + 0x20], r15d
mov edx, 3
call qword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
mov rcx, qword [rbp - 0x18]
lea r9, [rbp + 0x20]
xor r8d, r8d
mov dword [rsp + 0x20], r15d
lea edx, [r8 + 4]
call qword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
mov ecx, dword [rbp + 0x20]
call sub.msvcrt.dll_malloc
mov rcx, qword [rbp - 0x18]
lea r9, [rbp + 0x20]
mov r8, rax
mov dword [rsp + 0x20], r15d
mov edx, 4
call qword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
mov r14, qword [rbp + 0x40]
xor r9d, r9d
mov rcx, qword [rbp - 0x18]
xor edx, edx
mov dword [rbp - 0x20], ebx
mov eax, dword [r14]
lea r8d, [r9 + 1]
mov dword [rsp + 0x30], eax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x1800061ba
mov ebx, dword [rbp - 0x20]
mov rdx, rsi
mov r8d, ebx
mov rcx, rdi
call sub.msvcrt.dll_memcpy
mov r9, rdi
mov dword [r14], ebx
neg r9
lea r8, [rdi + 0x7f]
mov rax, rdi
nop
movzx ecx, byte [r8]
lea r8, [r8 - 1]
movzx edx, byte [rax]
mov byte [rax], cl
lea rax, [rax + 1]
mov byte [r8 + 1], dl
lea rcx, [r9 + r8]
lea rdx, [r9 + rax]
cmp rdx, rcx
jl 0x180006340
lea rcx, str._____rsa______r_n
call fcn.180004700
mov edx, dword [rbp - 0x20]
mov rcx, rdi
call fcn.180004600
xor eax, eax
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret