Function at 0x140358d78
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 0x1403590fc
test r8, r8
je 0x1403590fc
test r9, r9
je 0x1403590fc
cmp dword [rcx + 0xc], 4
je 0x140358dde
mov edi, 0x80049e2f
jmp 0x140358f18
cmp qword [rcx + 0x30], rdi
je 0x1403590f2
cmp qword [rcx + 0x38], rdi
je 0x1403590f2
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 0x140358e4c
mov rcx, qword [r15 + 0x38]
lea rax, [0x1403a0ba8]
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 0x140358e4f
mov rsi, rdi
test rsi, rsi
jne 0x140358e5e
mov edi, 0x8007000e
jmp 0x140358f18
mov rax, qword [r12]
mov rbx, qword [rax + 0x28]
mov rcx, rbx
call qword [0x1403a2250]
xor r8d, r8d
lea rdx, [rbp - 0x1c]
mov rcx, r12
call rbx
mov edi, eax
test eax, eax
jne 0x140358efe
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 0x140358ebf
mov edi, 0x8007000e
jmp 0x140358efe
mov rax, qword [r12]
mov rbx, qword [rax + 0x28]
mov rcx, rbx
call qword [0x1403a2250]
mov r8, r13
lea rdx, [rbp - 0x1c]
mov rcx, r12
call rbx
mov edi, eax
test eax, eax
jne 0x140358efe
lea rdx, str.http:__www.w3.org_2001_04_xmlencrsa_oaep_mgf1p
mov rcx, r13
call sub.msvcrt.dll_wcscmp
test eax, eax
je 0x140358f69
mov edi, 0x80049e5b
mov r13, qword [rbp - 0x10]
test rsi, rsi
je 0x140358f18
mov rax, qword [rsi]
mov rbx, qword [rax + 0x10]
mov rcx, rbx
call qword [0x1403a2250]
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 0x140358f4f
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, edi
mov rbx, qword [rsp + 0x90]
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 [0x1403a2250]
xor r8d, r8d
lea rdx, [rbp - 0x20]
mov rcx, r12
call rbx
mov edi, eax
test eax, eax
jne 0x140358efa
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 0x140358fc1
mov edi, 0x8007000e
jmp 0x140358efa
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 0x140358ff3
mov dword [r14 + 4], 0x660e
mov dword [rsi + 0xc], 1
jmp 0x14035903d
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes192_cbc
mov rcx, rbx
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140359017
mov dword [r14 + 4], 0x660f
mov dword [rsi + 0xc], 2
jmp 0x14035903d
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes256_cbc
mov rcx, rbx
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140358ef5
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 [0x1403a2250]
mov r8, r13
lea rdx, [rbp - 0x20]
mov rcx, r12
call rbx
mov edi, eax
test eax, eax
jne 0x140358efa
test r13, r13
jne 0x14035907b
mov edi, 0x80070057
jmp 0x140358efa
mov edx, dword [rbp - 0x20]
mov rcx, r13
call fcn.140358bd8
xor r13d, r13d
mov edi, eax
test eax, eax
jne 0x140358efa
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 0x1403590d6
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x140358efa
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 0x140358f18
mov edi, 0x80049e51
jmp 0x140358f18
mov edi, 0x80070057
jmp 0x140358efe