Function at 0x140379168
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 0x14037950f
test r8, r8
je 0x14037950f
test r9, r9
je 0x14037950f
cmp dword [rcx + 0xc], 4
je 0x1403791ce
mov edi, 0x80049e2f
jmp 0x14037931e
cmp qword [rcx + 0x30], rdi
je 0x140379505
cmp qword [rcx + 0x38], rdi
je 0x140379505
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 0x14037923c
mov rcx, qword [r15 + 0x38]
lea rax, str._51_
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 0x14037923f
mov rsi, rdi
test rsi, rsi
jne 0x14037924e
mov edi, 0x8007000e
jmp 0x14037931e
mov rax, qword [r12]
mov rbx, qword [rax + 0x28]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp - 0x1c]
xor r8d, r8d
mov rcx, r12
call rax
mov edi, eax
test eax, eax
jne 0x1403792fe
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 0x1403792b9
mov edi, 0x8007000e
jmp 0x1403792fe
mov rax, qword [r12]
mov rbx, qword [rax + 0x28]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp - 0x1c]
mov r8, r13
mov rcx, r12
call rax
mov edi, eax
test eax, eax
jne 0x1403792fe
lea rdx, str.http:__www.w3.org_2001_04_xmlencrsa_oaep_mgf1p
mov rcx, r13
call sub.msvcrt.dll_wcscmp
test eax, eax
je 0x140379370
mov edi, 0x80049e5b
mov r13, qword [rbp - 0x10]
test rsi, rsi
je 0x14037931e
mov rax, qword [rsi]
mov rbx, qword [rax + 0x10]
mov rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
mov rcx, rsi
call rax
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 0x140379355
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 rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp - 0x20]
xor r8d, r8d
mov rcx, r12
call rax
mov edi, eax
test eax, eax
jne 0x1403792fa
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 0x1403793ce
mov edi, 0x8007000e
jmp 0x1403792fa
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 0x140379400
mov dword [r14 + 4], 0x660e
mov dword [rsi + 0xc], 1
jmp 0x14037944a
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes192_cbc
mov rcx, rbx
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140379424
mov dword [r14 + 4], 0x660f
mov dword [rsi + 0xc], 2
jmp 0x14037944a
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes256_cbc
mov rcx, rbx
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x1403792f5
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 rax, qword [0x1403c1610]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp - 0x20]
mov r8, r13
mov rcx, r12
call rax
mov edi, eax
test eax, eax
jne 0x1403792fa
test r13, r13
jne 0x14037948e
mov edi, 0x80070057
jmp 0x1403792fa
mov edx, dword [rbp - 0x20]
mov rcx, r13
call fcn.140378fb8
xor r13d, r13d
mov edi, eax
test eax, eax
jne 0x1403792fa
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 0x1403794e9
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x1403792fa
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 0x14037931e
mov edi, 0x80049e51
jmp 0x14037931e
mov edi, 0x80070057
jmp 0x1403792fe