Function at 0x140090b58
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Reference public rsa key

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], r9
mov dword [rax + 0x18], r8d
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x10], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov r15, rdx
mov rsi, rcx
and qword [rbp - 0x20], 0
and qword [rbp - 0x18], 0
and qword [rbp + 0x48], 0
xor edi, edi
mov r14, qword [rbp + 0x50]
cmp qword [r14], rdi
je 0x140090d29
mov dword [rax - 0x58], 0xf0000000
lea r9d, [rdi + 0x18]
xor r8d, r8d
xor edx, edx
lea rcx, [rbp - 0x20]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x140090be6
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140090bd3
mov ebx, 0x80004005
jmp 0x140090d2e
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140090d2e
lea r9, [rbp + 0x48]
mov edx, 0x6610
mov r8d, 1
mov rcx, qword [rbp - 0x20]
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x140090bbf
lea rax, [rbp - 0x18]
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], edi
xor r9d, r9d
mov r8d, 0x114
lea rdx, [0x1401d1060]
mov rcx, qword [rbp - 0x20]
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x140090bbf
and dword [rbp + 0x40], edi
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
and qword [rsp + 0x20], rdi
xor r9d, r9d
lea r8d, [r9 + 1]
mov rdx, qword [rbp - 0x18]
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
je 0x140090bbf
mov eax, dword [rbp + 0x40]
lea ebx, [rax + 0x14]
cmp ebx, eax
ja 0x140090c70
mov ebx, 0x80070216
jmp 0x140090d2e
mov edx, ebx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
jne 0x140090c8c
mov ebx, 0x8007000e
jmp 0x140090d2e
mov dword [rax], ebx
mov dword [rax + 4], 1
mov dword [rax + 8], 0x10000
mov eax, dword [rbp + 0x40]
mov dword [rdi + 0xc], eax
lea rax, [rdi + 0x10]
lea rcx, [rbp + 0x40]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8d, [r9 + 1]
mov rdx, qword [rbp - 0x18]
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
je 0x140090bbf
mov rax, qword [r14]
mov r8, rdi
mov edx, ebx
mov rcx, r15
mov rax, qword [rax + 0xa8]
call qword [case.0x140089b1f.8]
mov ebx, eax
test eax, eax
js 0x140090d2e
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x140090cfe
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rbp + 0x48]
mov qword [rsi + 8], rcx
and qword [rbp + 0x48], 0
mov rcx, qword [rsi]
test rcx, rcx
je 0x140090d1b
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rax, qword [rbp - 0x20]
mov qword [rsi], rax
and qword [rbp - 0x20], 0
jmp 0x140090d2e
mov ebx, 0x80070057
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x140090d3d
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rbp + 0x48]
test rcx, rcx
je 0x140090d4c
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x140090d5d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test rdi, rdi
je 0x140090d6c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop
mov rdi, qword [r14 + 8]
test rdi, rdi
je 0x140090dae
or esi, 0xffffffff
mov eax, esi
lock xadd dword [rdi + 8], eax
add eax, esi
jne 0x140090dae
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax]
call qword [case.0x140089b1f.8]
mov eax, esi
lock xadd dword [rdi + 0xc], eax
add eax, esi
jne 0x140090dae
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 8]
call qword [case.0x140089b1f.8]
nop
mov eax, ebx
mov rbx, qword [rsp + 0x80]
add rsp, 0x50
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret