Function at 0x1403870c0
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x30
xor r12d, r12d
mov rdi, r8
mov rbp, rdx
mov rsi, rcx
test rdx, rdx
je 0x14038729e
test r8, r8
je 0x14038729e
mov rbx, qword [rcx + 0x20]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rsi + 0x10]
mov qword [rsi + 0x20], r12
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea r15, [rsi + 0x30]
mov qword [rsi + 0x10], r12
mov rcx, qword [r15]
mov dword [rsi + 0x18], r12d
test rcx, rcx
je 0x14038714c
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov qword [r15], r12
lea r14, [rsi + 0x38]
cmp qword [r14], r12
jne 0x14038719a
mov r9d, reloc.OLEAUT32.dll_SafeArrayGetElement
mov dword [rsp + 0x20], 0xf0000000
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
xor edx, edx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x14038719a
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
jns 0x1403872df
jmp 0x1403872a3
mov rbx, qword [rsi + 0x10]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
or r8, 0xffffffffffffffff
mov qword [rsi + 0x10], r12
mov rax, r8
inc rax
cmp word [rdi + rax*2], r12w
jne 0x1403871bd
mov dword [rsi + 0x18], eax
lea ecx, [rax + 1]
mov eax, 2
mul rcx
mov rbx, rax
cmovo rbx, r8
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsi + 0x10], rax
mov rcx, rax
test rax, rax
jne 0x140387206
mov edi, 0x8007000e
jmp 0x1403872a3
mov edx, dword [rsi + 0x18]
mov ebx, 1
add edx, ebx
mov r8, rdi
call fcn.14008165c
mov edi, eax
test eax, eax
jne 0x14038718d
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes128_cbc
mov rcx, rbp
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x14038723f
mov edx, 0x660e
mov dword [rsi + 0xc], ebx
jmp 0x14038727f
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes192_cbc
mov rcx, rbp
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140387260
mov edx, 0x660f
mov dword [rsi + 0xc], 2
jmp 0x14038727f
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes256_cbc
mov rcx, rbp
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140387297
mov edx, 0x6610
mov dword [rsi + 0xc], 3
mov rcx, qword [r14]
mov r9, r15
mov r8d, ebx
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x1403872df
jmp 0x140387179
mov edi, 0x80049e2e
jmp 0x1403872a3
mov edi, 0x80070057
mov rbx, qword [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rsi + 0x10]
mov qword [rsi + 0x20], r12
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rsi + 0x10], r12
mov dword [rsi + 0x18], r12d
mov rbx, qword [rsp + 0x50]
mov eax, edi
mov rdi, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop r14
pop r12
ret