Function at 0x1400045d0
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
lea rbp, [rsp - 0x3f]
sub rsp, 0x88
mov rax, qword [0x140027008]
xor rax, rsp
mov qword [rbp + 0x27], rax
cmp qword [rcx], 0
mov rsi, rcx
je 0x140004966
mov ecx, 0x10
call fcn.14000c564
mov rdi, rax
test rax, rax
je 0x140004966
lea rax, [0x140027a5c]
mov dword [rdi + 8], 0xb5
mov qword [rdi], rax
mov dword [rdi + 0xc], 0x25
mov ebx, dword [rsi + 8]
sub ebx, 0xda
mov dword [rbp - 0x19], ebx
js 0x140004966
lea eax, [rbx + 1]
mov qword [rsp + 0xc8], r14
movsxd rcx, eax
mov edx, 1
call fcn.140009d98
mov r14, rax
test rax, rax
jne 0x140004673
mov rcx, rdi
call fcn.14000a2c4
mov rcx, qword [rsi]
call fcn.14000a2c4
xor eax, eax
jmp 0x1400048cb
mov edx, dword [rdi + 8]
mov rcx, r14
add rdx, qword [rsi]
movsxd r8, ebx
call fcn.1400098c0
mov rcx, qword [rsi]
call fcn.14000a2c4
mov rcx, qword [rdi]
lea r8, [rbp - 0x19]
mov rdx, r14
call fcn.140001300
mov r14, rax
test rax, rax
jne 0x1400046b2
mov rcx, rdi
call fcn.14000a2c4
xor eax, eax
jmp 0x1400048cb
mov ecx, dword [rbp - 0x19]
mov qword [rsp + 0xc0], r13
mov qword [rsp + 0x80], r15
cmp ecx, 0x10
jle 0x14000494f
mov eax, ecx
and eax, 0x8000000f
jge 0x1400046de
dec eax
or eax, 0xfffffff0
inc eax
test eax, eax
jne 0x14000494f
lea r13d, [rcx - 0x10]
mov ecx, r13d
lea edx, [rax + 1]
mov r15d, r13d
call fcn.140009d98
mov rbx, rax
test rax, rax
je 0x14000494f
mov r8d, r15d
mov rdx, r14
mov rcx, rax
call fcn.1400098c0
mov rcx, r14
call fcn.14000a2c4
lea ecx, [r13 + 0x10]
mov edx, 1
mov dword [rbp - 0x19], ecx
call fcn.140009d98
mov r14, rax
test rax, rax
je 0x140004938
mov r8d, r15d
mov rdx, rbx
mov rcx, rax
call fcn.1400098c0
mov rcx, rbx
call fcn.14000a2c4
movups xmm0, xmmword [0x14002bc38]
xor r15d, r15d
mov dword [rbp + 7], 0x208
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
mov dword [rbp + 0xb], 0x660e
xor edx, edx
mov dword [rbp + 0xf], 0x10
lea rcx, [rbp - 1]
mov qword [rbp - 1], r15
lea r9d, [r15 + 0x18]
mov qword [rbp - 0x11], r15
movups xmmword [rbp + 0x13], xmm0
mov dword [rbp - 9], 1
mov dword [rsp + 0x20], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140004938
mov rcx, qword [rbp - 1]
lea rax, [rbp - 0x11]
mov qword [rsp + 0x28], rax
lea r8d, [r15 + 0x1c]
xor r9d, r9d
mov dword [rsp + 0x20], r15d
lea rdx, [rbp + 7]
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x140004938
mov rcx, qword [rbp - 0x11]
lea r8, str.abcdefghijklmnop
xor r9d, r9d
lea edx, [r15 + 1]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140004938
mov rcx, qword [rbp - 0x11]
lea r8, [rbp - 9]
xor r9d, r9d
lea edx, [r15 + 4]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140004938
mov rcx, qword [rbp - 0x11]
lea rax, [rbp - 0x19]
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], r14
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x140004938
mov eax, dword [rbp - 0x19]
lea edx, [r15 + 1]
add eax, 0xfffffff0
mov qword [rsp + 0xb8], r12
mov ecx, eax
mov ebx, eax
call fcn.140009d98
mov r8d, ebx
mov rdx, r14
mov rcx, rax
mov r15, rax
call fcn.1400098c0
mov rcx, r14
call fcn.14000a2c4
mov rcx, qword [rbp - 0x11]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rbp - 1]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov ecx, dword [r15 + 4]
call qword [sym.imp.WS2_32.dll_ntohl]
mov ecx, eax
mov edx, 1
mov r12d, eax
call fcn.140009d98
mov r14, rax
test rax, rax
jne 0x1400048eb
mov rcx, rdi
call fcn.14000a2c4
mov rcx, r15
call fcn.14000a2c4
xor eax, eax
mov r12, qword [rsp + 0xb8]
mov r13, qword [rsp + 0xc0]
mov r15, qword [rsp + 0x80]
mov r14, qword [rsp + 0xc8]
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.140008040
add rsp, 0x88
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rdx, [r15 + 8]
mov r8, r12
mov rcx, r14
call fcn.1400098c0
mov rcx, r15
call fcn.14000a2c4
mov ecx, 0x10
call fcn.14000c564
mov rcx, rdi
mov rbx, rax
call fcn.14000a2c4
test rbx, rbx
jne 0x140004921
mov rcx, r14
jmp 0x1400048ac
mov rcx, rsi
mov qword [rbx], r14
mov dword [rbx + 8], r12d
call fcn.14000a2c4
mov rax, rbx
jmp 0x1400048b3
mov rcx, rdi
call fcn.14000a2c4
mov rcx, rbx
call fcn.14000a2c4
xor eax, eax
jmp 0x1400048bb
mov rcx, rdi
call fcn.14000a2c4
mov rcx, r14
call fcn.14000a2c4
xor eax, eax
jmp 0x1400048bb
xor eax, eax
jmp 0x1400048d3