Function at 0x140102800
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 [0x140293028]
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 0x140102b8e
xor r12d, r12d
mov qword [rbp + 8], r12
lea r9d, [r12 + 8]
lea r8, str.Microsoft_Primitive_Provider
lea rdx, str.SHA512
lea rcx, [rbp + 8]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
js 0x140102bab
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x10], xmm1
mov qword [rbp], r12
lea ecx, [r12 + 0x20]
call fcn.140185648
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.140185648
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 0x140102976
movabs rax, 0x7fffffffffffffff
cmp rdi, rax
ja 0x140102bc8
cmp rdi, 0x1000
jb 0x14010294e
lea rcx, [rdi + 0x27]
cmp rcx, rdi
jbe 0x140102bce
lfence
call fcn.140185648
mov rcx, rax
test rax, rax
je 0x140102bd4
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x140102959
lfence
mov rcx, rdi
call fcn.140185648
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.1401a8d80
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.1401011b0
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 0x140102bda
lea rcx, [rbp + 0x40]
call fcn.140102e20
mov r8, qword [rbp - 8]
mov rax, qword [rbp - 0x10]
sub r8, rax
mov rdx, qword [rbp + 0x10]
je 0x140102a21
test rax, rax
je 0x140102a0d
mov rcx, rax
test rdx, rdx
je 0x140102a08
call fcn.1401a9040
jmp 0x140102a1d
call fcn.1401a8d80
call fcn.1401ba450
mov dword [rax], 0x16
call fcn.1401b3be0
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 0x140102a63
test r9, r9
je 0x140102a52
mov rcx, r9
test rdx, rdx
je 0x140102a4d
call fcn.1401a9040
jmp 0x140102a63
call fcn.1401a8d80
call fcn.1401ba450
mov dword [rax], 0x16
call fcn.1401b3be0
nop
lea rcx, [rbp + 0x10]
call fcn.140102e20
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 0x140102add
test rcx, rcx
je 0x140102aaa
cmp rax, 0x20
ja 0x140102aaa
mov r8, rax
mov rdx, rcx
lea rcx, [rbp + 0x64]
call fcn.1401a9040
jmp 0x140102add
xorps xmm0, xmm0
movups xmmword [rbp + 0x64], xmm0
movups xmmword [rbp + 0x74], xmm0
test rcx, rcx
jne 0x140102ac7
call fcn.1401ba450
mov dword [rax], 0x16
jmp 0x140102ad8
cmp rax, 0x20
jbe 0x140102add
call fcn.1401ba450
mov dword [rax], 0x22
call fcn.1401b3be0
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 0x140102bf5
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 0x140102b73
lea rcx, [rbp + 0x28]
call fcn.140102e20
nop
lea rcx, [rbp - 0x10]
call fcn.140102e20
nop
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x140102b48
xor edx, edx
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
mov rcx, qword [rbp + 0x88]
xor rcx, rsp
call fcn.140185380
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.140010040
nop
lea rcx, [rbp - 0x30]
call fcn.140030650
nop
lea rdx, str.CryptAcquireContext_failed
lea rcx, [rsp + 0x50]
call fcn.140010040
nop
lea rcx, [rsp + 0x50]
call fcn.140030650
nop
lea rdx, str.Error_opening_SHA512_provider
lea rcx, [rsp + 0x70]
call fcn.140010040
nop
lea rcx, [rsp + 0x70]
call fcn.140030650
nop
call fcn.140013c60
int3
call fcn.140008770
int3
call fcn.1401b3c00
nop
lea rdx, str.Error_computing_PBKDF2_using_SHA512_provider
lea rcx, [rbp - 0x70]
call fcn.140010040
nop
lea rcx, [rbp - 0x70]
call fcn.140030650
nop
lea rdx, str.Encrypt:_CryptImportKey_failed
lea rcx, [rbp - 0x50]
call fcn.140010040
nop
lea rcx, [rbp - 0x50]
call fcn.140030650
int3