Function at 0x140161060
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xf]
sub rsp, 0xe8
mov rax, qword [0x140351248]
xor rax, rsp
mov qword [rbp - 1], rax
mov rax, qword [rbp + 0x7f]
xorps xmm0, xmm0
mov rbx, qword [rbp + 0x77]
mov r15, r8
mov qword [rbp - 0x79], rax
mov r12, rdx
xor eax, eax
mov r14d, r9d
mov qword [rbp - 0x71], rax
mov r13, rcx
mov qword [rbp - 0x69], rax
mov qword [rbp - 0x59], rax
lea edi, [rax + 1]
movups xmmword [rbp - 0x51], xmm0
test r8, r8
jne 0x1401611ad
test rbx, rbx
je 0x1401611ad
lea r8, [rbp - 0x51]
xor edx, edx
mov rcx, rbx
call fcn.1401616c0
test eax, eax
je 0x14016119e
mov r14d, dword [rbp - 0x51]
test r14d, r14d
je 0x140161195
mov ecx, r14d
call fcn.1401c030c
mov qword [rbp - 0x49], rax
mov rsi, rax
test rax, rax
jne 0x14016116a
lea ecx, [rdi + 0x2f]
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x58], SafeArrayLock
call fcn.1400b88d0
movups xmm0, xmmword [str._AES256__prepareData__Not_enough_memory.]
mov qword [rsp + 0x50], 0x28
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x58], 0x2f
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x14027ad58]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x14027ad68]
movsd qword [rax + 0x20], xmm0
mov byte [rax + 0x28], r15b
mov qword [rsp + 0x40], rax
call fcn.140162100
mov edi, r15d
jmp 0x14016152b
lea r8, [rbp - 0x51]
mov rdx, rax
mov rcx, rbx
call fcn.1401616c0
mov rsi, qword [rbp - 0x49]
test eax, eax
jne 0x14016118c
xor r15d, r15d
mov edi, r15d
jmp 0x14016152b
mov r14d, dword [rbp - 0x51]
jmp 0x140161231
mov rsi, qword [rbp - 0x49]
jmp 0x140161231
mov rsi, qword [rbp - 0x49]
xor r15d, r15d
mov edi, r15d
jmp 0x14016152b
mov rcx, r14
call fcn.1401c030c
mov rsi, rax
test rax, rax
jne 0x140161223
xor r15d, r15d
mov qword [rbp - 0x39], SafeArrayLock
lea ecx, [rax + 0x30]
mov qword [rbp - 0x51], r15
mov qword [rbp - 0x41], r15
call fcn.1400b88d0
movups xmm0, xmmword [str._AES256__prepareData__Not_enough_memory.]
mov qword [rbp - 0x41], 0x28
lea rcx, [rbp - 0x51]
mov qword [rbp - 0x39], 0x2f
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x14027ad58]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x14027ad68]
movsd qword [rax + 0x20], xmm0
mov byte [rax + 0x28], r15b
mov qword [rbp - 0x51], rax
call fcn.140162100
mov edi, r15d
jmp 0x14016152b
mov r8, r14
mov rdx, r15
mov rcx, rax
call fcn.1401f7750
xor r15d, r15d
lea rcx, [rbp - 0x69]
xor r8d, r8d
mov dword [rsp + 0x20], r15d
xor edx, edx
lea r9d, [r15 + 0x18]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x1401612f6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x1401612f6
lea r9d, [r15 + 0x18]
mov dword [rsp + 0x20], 8
xor r8d, r8d
lea rcx, [rbp - 0x69]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x1401612f6
lea ecx, [rax + 0x40]
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x58], SafeArrayLock
call fcn.1400b88d0
movups xmm0, xmmword [str._AES256__AESEncrypt__Get_provider_context_failed_]
mov qword [rsp + 0x50], 0x31
mov qword [rsp + 0x58], 0x3f
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x14027ad88]
movups xmmword [rax + 0x10], xmm1
movups xmm0, xmmword [0x14027ad98]
movups xmmword [rax + 0x20], xmm0
movzx ecx, byte [0x14027ada8]
mov byte [rax + 0x30], cl
mov byte [rax + 0x31], r15b
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x40], rax
call fcn.140162100
mov edi, r15d
jmp 0x14016152b
movups xmm0, xmmword [r13]
mov rcx, qword [rbp - 0x69]
xor r9d, r9d
movups xmm1, xmmword [r13 + 0x10]
lea rax, [rbp - 0x71]
mov dword [rbp - 0x31], 0x208
mov qword [rsp + 0x28], rax
lea rdx, [rbp - 0x31]
lea r8d, [r9 + 0x2c]
mov dword [rbp - 0x2d], 0x6610
mov dword [rbp - 0x29], 0x20
movups xmmword [rbp - 0x25], xmm0
mov dword [rsp + 0x20], edi
movups xmmword [rbp - 0x15], xmm1
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x1401613ac
lea ecx, [rax + 0x30]
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x58], SafeArrayLock
call fcn.1400b88d0
movups xmm0, xmmword [str._AES256__AESEncrypt__Create_key_failed_]
mov qword [rsp + 0x50], 0x27
mov qword [rsp + 0x58], 0x2f
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x14027adc0]
movups xmmword [rax + 0x10], xmm1
mov ecx, dword [0x14027add0]
mov dword [rax + 0x20], ecx
movzx ecx, word [0x14027add4]
mov word [rax + 0x24], cx
movzx ecx, byte [0x14027add6]
mov byte [rax + 0x26], cl
mov byte [rax + 0x27], r15b
jmp 0x1401612df
mov rcx, qword [rbp - 0x71]
xor r9d, r9d
mov edx, edi
test r12, r12
jne 0x14016144f
mov r8, r13
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
jne 0x140161457
lea ecx, [rax + 0x40]
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x58], SafeArrayLock
call fcn.1400b88d0
movups xmm0, xmmword [str._AES256__AESEncrypt__Set_keys_IV_parameter_failed_]
mov qword [rsp + 0x50], 0x33
mov rdx, rax
mov qword [rsp + 0x58], 0x3f
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x14027ade8]
movups xmmword [rax + 0x10], xmm1
movups xmm0, xmmword [0x14027adf8]
movups xmmword [rax + 0x20], xmm0
movzx ecx, word [0x14027ae08]
mov word [rax + 0x30], cx
lea rcx, [rsp + 0x40]
movzx eax, byte [0x14027ae0a]
mov byte [rdx + 0x32], al
mov byte [rdx + 0x33], r15b
mov qword [rsp + 0x40], rdx
call fcn.140162100
mov edi, r15d
jmp 0x14016152b
mov r8, r12
jmp 0x1401613c1
mov eax, r14d
xorps xmm0, xmm0
shr eax, 4
inc eax
shl eax, 4
movups xmmword [rbp - 0x61], xmm0
mov ecx, eax
mov dword [rbp - 0x61], r14d
mov ebx, eax
call fcn.1401c030c
mov r8d, r14d
mov rdx, rsi
mov rcx, rax
mov qword [rbp - 0x59], rax
call fcn.1401f7750
mov rcx, qword [rbp - 0x71]
lea rax, [rbp - 0x61]
mov dword [rsp + 0x30], ebx
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov r8d, edi
mov rax, qword [rbp - 0x59]
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x14016150c
lea ecx, [rax + 0x30]
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x58], SafeArrayLock
call fcn.1400b88d0
movups xmm0, xmmword [str._AES256__AESEncrypt__AES_encrypt_failed_]
mov qword [rsp + 0x50], 0x28
mov qword [rsp + 0x58], 0x2f
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x14027ae20]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x14027ae30]
movsd qword [rax + 0x20], xmm0
mov byte [rax + 0x28], r15b
jmp 0x1401612df
mov rax, qword [rbp - 0x79]
test rax, rax
je 0x14016152b
mov r8d, dword [rbp - 0x61]
mov rcx, rax
mov rdx, qword [rbp - 0x59]
call fcn.140161b30
test eax, eax
cmove edi, r15d
test rsi, rsi
je 0x140161538
mov rcx, rsi
call fcn.1401c028c
mov rcx, qword [rbp - 0x59]
test rcx, rcx
je 0x14016154a
call fcn.1401c028c
mov qword [rbp - 0x59], r15
mov rcx, qword [rbp - 0x71]
test rcx, rcx
je 0x14016155d
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov qword [rbp - 0x71], r15
mov rcx, qword [rbp - 0x69]
test rcx, rcx
je 0x14016156e
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, edi
mov rcx, qword [rbp - 1]
xor rcx, rsp
call fcn.1401c0070
add rsp, 0xe8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret