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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
xor r12d, r12d
mov ebp, r9d
mov r15, r8
mov r14, rdx
mov rdi, rcx
mov ebx, r12d
mov esi, r12d
test rdx, rdx
je 0x140333d87
cmp qword [rsp + 0x80], r12
je 0x140333d87
mov rcx, qword [rcx + 0x20]
call fcn.14010bc98
mov rcx, qword [rdi + 0x10]
mov qword [rdi + 0x20], r12
call fcn.14010bc98
lea r13, [rdi + 0x30]
mov qword [rdi + 0x10], r12
mov rcx, qword [r13]
mov dword [rdi + 0x18], r12d
test rcx, rcx
je 0x140333be9
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov qword [r13], r12
lea r12, [rdi + 0x38]
xor eax, eax
cmp qword [r12], rax
jne 0x140333c2f
lea r9d, [rax + 0x18]
mov dword [rsp + 0x20], 0xf0000000
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
xor edx, edx
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x140333c2f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x140333d8c
movzx ebx, bx
jmp 0x140333d78
test r15, r15
je 0x140333c8f
mov rcx, qword [rdi + 0x10]
call fcn.14010bc98
or r8, 0xffffffffffffffff
mov qword [rdi + 0x10], rbx
mov rax, r8
inc rax
cmp word [r15 + rax*2], bx
jne 0x140333c48
lea ecx, [rax + 1]
mov dword [rdi + 0x18], eax
mov eax, 2
mul rcx
cmovo rax, r8
mov rcx, rax
call fcn.1400b74d4
mov qword [rdi + 0x10], rax
mov rcx, rax
test rax, rax
je 0x140333ca3
mov edx, dword [rdi + 0x18]
mov r8, r15
inc edx
call fcn.140079ed4
mov ebx, eax
test eax, eax
jne 0x140333d8c
lea r15d, [rbp + 0xc]
mov ecx, r15d
call fcn.1400b74d4
mov rsi, rax
test rax, rax
jne 0x140333cad
mov ebx, 0x8007000e
jmp 0x140333d8c
mov dword [rax], 0x208
cmp ebp, 0x10
jne 0x140333cdb
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes128_cbc
mov rcx, r14
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140333d1b
mov dword [rsi + 4], 0x660e
mov dword [rdi + 0xc], 1
jmp 0x140333d30
cmp ebp, 0x18
jne 0x140333d03
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes192_cbc
mov rcx, r14
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140333d1b
mov dword [rsi + 4], 0x660f
mov dword [rdi + 0xc], 2
jmp 0x140333d30
cmp ebp, 0x20
jne 0x140333d80
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes256_cbc
mov rcx, r14
call sub.msvcrt.dll_wcscmp
test eax, eax
je 0x140333d22
mov ebx, 0x80049e2f
jmp 0x140333d8c
mov dword [rsi + 4], 0x6610
mov dword [rdi + 0xc], 3
mov rdx, qword [rsp + 0x80]
lea rcx, [rsi + 0xc]
mov r8, rbp
mov dword [rsi + 8], ebp
call sub.msvcrt.dll_memcpy
mov rcx, qword [r12]
xor edi, edi
xor r9d, r9d
mov qword [rsp + 0x28], r13
mov r8d, r15d
mov dword [rsp + 0x20], edi
mov rdx, rsi
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x140333d8c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x140333d8c
movzx ebx, ax
or ebx, 0x80070000
jmp 0x140333d8c
mov ebx, 0x80049e2e
jmp 0x140333d8c
mov ebx, 0x80070057
mov rcx, rsi
call fcn.14010bc98
mov rbp, qword [rsp + 0x68]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret