Function at 0x140366f44
Capabilities:
Encrypt data using aes via winapi

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
xor edi, edi
mov r12, r8
mov dword [rbp - 0x1c], edi
mov r15, rcx
mov dword [rbp - 0x20], edi
mov esi, edi
mov qword [rbp - 8], rdi
mov r13d, edi
mov r14d, edi
test rdx, rdx
je 0x1403672c8
test r8, r8
je 0x1403672c8
test r9, r9
je 0x1403672c8
cmp dword [rcx + 0xc], 4
je 0x140366faa
mov edi, 0x80049e2f
jmp 0x1403670e4
cmp qword [rcx + 0x30], rdi
je 0x1403672be
cmp qword [rcx + 0x38], rdi
je 0x1403672be
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 0x48]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
mov edx, 1
test rax, rax
je 0x140367018
mov rcx, qword [r15 + 0x38]
lea rax, [0x1403add70]
mov qword [rsi], rax
test rcx, rcx
mov eax, edx
mov dword [rsi + 8], edx
cmovne eax, edi
mov dword [rsi + 0xc], edi
mov dword [rsi + 0x40], eax
mov qword [rsi + 0x10], rdi
mov dword [rsi + 0x18], edi
mov qword [rsi + 0x20], rdi
mov qword [rsi + 0x28], rdi
mov qword [rsi + 0x30], rdi
mov qword [rsi + 0x38], rcx
jmp 0x14036701b
mov rsi, rdi
test rsi, rsi
jne 0x14036702a
mov edi, 0x8007000e
jmp 0x1403670e4
mov rax, qword [r12]
mov rbx, qword [rax + 0x28]
mov rcx, rbx
call qword [0x1403af620]
xor r8d, r8d
lea rdx, [rbp - 0x1c]
mov rcx, r12
call rbx
mov edi, eax
test eax, eax
jne 0x1403670ca
mov ecx, dword [rbp - 0x1c]
lea eax, [rdi + 2]
mul rcx
mov rbx, rax
mov rax, 0xffffffffffffffff
cmovo rbx, rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbp - 0x10], rax
mov r13, rax
test rax, rax
jne 0x14036708b
mov edi, 0x8007000e
jmp 0x1403670ca
mov rax, qword [r12]
mov rbx, qword [rax + 0x28]
mov rcx, rbx
call qword [0x1403af620]
mov r8, r13
lea rdx, [rbp - 0x1c]
mov rcx, r12
call rbx
mov edi, eax
test eax, eax
jne 0x1403670ca
lea rdx, str.http:__www.w3.org_2001_04_xmlencrsa_oaep_mgf1p
mov rcx, r13
call sub.msvcrt.dll_wcscmp
test eax, eax
je 0x140367135
mov edi, 0x80049e5b
mov r13, qword [rbp - 0x10]
test rsi, rsi
je 0x1403670e4
mov rax, qword [rsi]
mov rbx, qword [rax + 0x10]
mov rcx, rbx
call qword [0x1403af620]
mov rcx, rsi
call rbx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r13
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x14036711b
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rbx, qword [rsp + 0x90]
mov eax, edi
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rax, qword [r12]
mov rbx, qword [rax + 0x38]
mov rcx, rbx
call qword [0x1403af620]
xor r8d, r8d
lea rdx, [rbp - 0x20]
mov rcx, r12
call rbx
mov edi, eax
test eax, eax
jne 0x1403670c6
mov eax, dword [rbp - 0x20]
add eax, 0xc
mov dword [rbp - 0x18], eax
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
jne 0x14036718d
mov edi, 0x8007000e
jmp 0x1403670c6
mov rbx, qword [rbp + 0x48]
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes128_cbc
mov rcx, rbx
mov dword [rax], 0x201
lea r13, [rax + 0xc]
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x1403671bf
mov dword [r14 + 4], 0x660e
mov dword [rsi + 0xc], 1
jmp 0x140367209
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes192_cbc
mov rcx, rbx
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x1403671e3
mov dword [r14 + 4], 0x660f
mov dword [rsi + 0xc], 2
jmp 0x140367209
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes256_cbc
mov rcx, rbx
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x1403670c1
mov dword [r14 + 4], 0x6610
mov dword [rsi + 0xc], 3
mov dword [r14 + 8], 0xa400
mov rax, qword [r12]
mov rbx, qword [rax + 0x38]
mov rcx, rbx
call qword [0x1403af620]
mov r8, r13
lea rdx, [rbp - 0x20]
mov rcx, r12
call rbx
mov edi, eax
test eax, eax
jne 0x1403670c6
test r13, r13
jne 0x140367247
mov edi, 0x80070057
jmp 0x1403670c6
mov edx, dword [rbp - 0x20]
mov rcx, r13
call fcn.140366d94
xor r13d, r13d
mov edi, eax
test eax, eax
jne 0x1403670c6
mov r9, qword [r15 + 0x30]
lea rax, [rbp - 8]
mov r8d, dword [rbp - 0x18]
mov rdx, r14
mov rcx, qword [r15 + 0x38]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x40
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x1403672a2
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x1403670c6
mov rax, qword [rbp - 8]
mov qword [rsi + 0x30], rax
mov rax, qword [rbp + 0x58]
mov qword [rbp - 8], r13
mov r13, qword [rbp - 0x10]
mov qword [rax], rsi
jmp 0x1403670e4
mov edi, 0x80049e51
jmp 0x1403670e4
mov edi, 0x80070057
jmp 0x1403670ca