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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x90]
sub rsp, 0x190
mov rax, qword [0x14015a010]
xor rax, rsp
mov qword [rbp + 0x88], rax
mov rsi, rdx
mov r14, rcx
mov dword [rsp + 0x20], 0xf0000040
mov r9d, 0x18
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
xor edx, edx
add rcx, 0x20
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x14005097e
xor r12d, r12d
mov qword [rbp + 8], r12
lea r9d, [r12 + 8]
lea r8, str.Microsoft_Primitive_Provider
lea rdx, [0x140126178]
lea rcx, [rbp + 8]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
js 0x14005099b
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x10], xmm1
mov qword [rbp], r12
lea ecx, [r12 + 0x20]
call fcn.1400c5c48
mov qword [rbp - 0x10], rax
lea rcx, [rax + 0x20]
mov qword [rbp], rcx
xorps xmm0, xmm0
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
mov qword [rbp - 8], rcx
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x28], xmm1
mov qword [rbp + 0x38], r12
lea ecx, [r12 + 0x10]
call fcn.1400c5c48
mov qword [rbp + 0x28], rax
lea rcx, [rax + 0x10]
mov qword [rbp + 0x38], rcx
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov qword [rbp + 0x30], rcx
mov rdi, qword [rbp - 8]
sub rdi, qword [rbp - 0x10]
sub rcx, qword [rbp + 0x28]
movdqu xmmword [rbp + 0x10], xmm0
mov qword [rbp + 0x20], r12
add rdi, rcx
je 0x140050766
movabs rax, 0x7fffffffffffffff
cmp rdi, rax
ja 0x1400509b8
cmp rdi, 0x1000
jb 0x14005073e
lea rcx, [rdi + 0x27]
cmp rcx, rdi
jbe 0x1400509be
lfence
call fcn.1400c5c48
mov rcx, rax
test rax, rax
je 0x1400509c4
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x140050749
lfence
mov rcx, rdi
call fcn.1400c5c48
mov qword [rbp + 0x10], rax
lea rbx, [rax + rdi]
mov qword [rbp + 0x20], rbx
mov r8, rdi
xor edx, edx
mov rcx, rax
call fcn.1400cb730
mov qword [rbp + 0x18], rbx
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x40], xmm0
mov qword [rbp + 0x50], rax
lea rcx, [rbp + 0x40]
call fcn.14004efa0
nop
mov r9, qword [rbp + 0x18]
mov r8, qword [rbp + 0x10]
sub r9, r8
mov eax, dword [rsi + 8]
mov rcx, qword [rbp + 0x48]
mov rdx, qword [rbp + 0x40]
sub rcx, rdx
mov dword [rsp + 0x40], r12d
mov dword [rsp + 0x38], r9d
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x28], 0xc350
mov dword [rsp + 0x20], eax
mov r9, qword [rsi]
mov r8d, ecx
mov rcx, qword [rbp + 8]
call qword [sym.imp.bcrypt.dll_BCryptDeriveKeyPBKDF2]
test eax, eax
js 0x1400509ca
lea rcx, [rbp + 0x40]
call fcn.140050be0
mov r8, qword [rbp - 8]
mov rax, qword [rbp - 0x10]
sub r8, rax
mov rdx, qword [rbp + 0x10]
je 0x140050811
test rax, rax
je 0x1400507fd
mov rcx, rax
test rdx, rdx
je 0x1400507f8
call fcn.1400cb9c0
jmp 0x14005080d
call fcn.1400cb730
call fcn.1400dbe44
mov dword [rax], 0x16
call fcn.1400da6d8
mov rax, qword [rbp - 0x10]
mov r8, qword [rbp + 0x30]
mov r9, qword [rbp + 0x28]
mov rdx, qword [rbp - 8]
sub rdx, rax
add rdx, qword [rbp + 0x10]
sub r8, r9
je 0x140050853
test r9, r9
je 0x140050842
mov rcx, r9
test rdx, rdx
je 0x14005083d
call fcn.1400cb9c0
jmp 0x140050853
call fcn.1400cb730
call fcn.1400dbe44
mov dword [rax], 0x16
call fcn.1400da6d8
nop
lea rcx, [rbp + 0x10]
call fcn.140050be0
mov dword [rbp + 0x58], 0x208
mov dword [rbp + 0x5c], 0x6610
mov dword [rbp + 0x60], 0x20
mov rax, qword [rbp - 8]
mov rcx, qword [rbp - 0x10]
sub rax, rcx
je 0x1400508cd
test rcx, rcx
je 0x14005089a
cmp rax, 0x20
ja 0x14005089a
mov r8, rax
mov rdx, rcx
lea rcx, [rbp + 0x64]
call fcn.1400cb9c0
jmp 0x1400508cd
xorps xmm0, xmm0
movups xmmword [rbp + 0x64], xmm0
movups xmmword [rbp + 0x74], xmm0
test rcx, rcx
jne 0x1400508b7
call fcn.1400dbe44
mov dword [rax], 0x16
jmp 0x1400508c8
cmp rax, 0x20
jbe 0x1400508cd
call fcn.1400dbe44
mov dword [rax], 0x22
call fcn.1400da6d8
lea rbx, [r14 + 0x28]
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 1
xor r9d, r9d
lea r8d, [r9 + 0x2c]
lea rdx, [rbp + 0x58]
mov rcx, qword [r14 + 0x20]
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x1400509e5
xor r9d, r9d
mov r8, qword [rbp + 0x28]
lea edx, [r9 + 1]
mov rcx, qword [rbx]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140050963
lea rcx, [rbp + 0x28]
call fcn.140050be0
nop
lea rcx, [rbp - 0x10]
call fcn.140050be0
nop
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x140050938
xor edx, edx
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
mov rcx, qword [rbp + 0x88]
xor rcx, rsp
call fcn.1400c5980
lea r11, [rsp + 0x190]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
lea rdx, str.Encrypt:_CryptSetKeyParam_IV__failed
lea rcx, [rbp - 0x30]
call fcn.14000c390
nop
lea rcx, [rbp - 0x30]
call fcn.14001e7f0
nop
lea rdx, str.CryptAcquireContext_failed
lea rcx, [rsp + 0x50]
call fcn.14000c390
nop
lea rcx, [rsp + 0x50]
call fcn.14001e7f0
nop
lea rdx, str.Error_opening_SHA512_provider
lea rcx, [rsp + 0x70]
call fcn.14000c390
nop
lea rcx, [rsp + 0x70]
call fcn.14001e7f0
nop
call fcn.140014430
int3
call fcn.140003fc0
int3
call fcn.1400da6f8
nop
lea rdx, str.Error_computing_PBKDF2_using_SHA512_provider
lea rcx, [rbp - 0x70]
call fcn.14000c390
nop
lea rcx, [rbp - 0x70]
call fcn.14001e7f0
nop
lea rdx, str.Encrypt:_CryptImportKey_failed
lea rcx, [rbp - 0x50]
call fcn.14000c390
nop
lea rcx, [rbp - 0x50]
call fcn.14001e7f0
int3