Function at 0x180001400
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Parse pe header

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0x30
mov rax, qword [0x18003a518]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov r10d, r8d
mov rbx, rcx
mov dword [rcx], r10d
mov qword [rcx + 8], rdx
mov qword [rcx + 0x28], rdx
movsxd r9, dword [rdx + 0x3c]
add r9, rdx
mov qword [rcx + 0x20], r9
lea rdi, [r9 + 0x108]
mov qword [rcx + 0x30], rdi
cmp r8d, 0x40
jb 0x18000153a
mov eax, 0x5a4d
cmp word [rdx], ax
jne 0x18000153a
movsxd rcx, dword [rdx + 0x3c]
mov eax, r10d
add rcx, 0x108
cmp r10, rcx
jb 0x18000153a
cmp dword [r9], 0x4550
jne 0x18000153a
movzx eax, word [r9 + 0x16]
mov ecx, 0x2000
test cx, ax
je 0x18000153a
test al, 2
je 0x18000153a
mov eax, 0xf0
cmp word [r9 + 0x14], ax
jne 0x18000153a
movzx r8d, word [r9 + 6]
xor r14d, r14d
mov edx, r14d
test r8d, r8d
je 0x1800014d5
lea rcx, [rdi + 0x10]
nop word [rax + rax]
mov eax, dword [rcx + 4]
add eax, dword [rcx]
cmp eax, r10d
ja 0x18000153a
inc edx
add rcx, 0x28
cmp edx, r8d
jl 0x1800014c0
mov r11d, dword [r9 + 0x38]
xor edx, edx
mov r9d, dword [r9 + 0x54]
dec r9d
add r9d, r11d
mov eax, r9d
div r11d
sub r9d, edx
test r8d, r8d
je 0x180001535
lea r10, [rdi + 0x10]
mov rdi, r8
nop word [rax + rax]
mov ecx, dword [r10 - 8]
lea r8d, [r11 - 1]
cmp dword [r10], ecx
cmova ecx, dword [r10]
xor edx, edx
add ecx, dword [r10 - 4]
lea r10, [r10 + 0x28]
add r8d, ecx
mov eax, r8d
div r11d
sub r8d, edx
cmp r9d, r8d
cmovae r8d, r9d
mov r9d, r8d
sub rdi, 1
jne 0x180001500
test r9d, r9d
jne 0x180001541
xor eax, eax
jmp 0x180001686
mov qword [rsp + 0x58], rbp
mov r8d, 0x3000
mov ebp, r9d
xor ecx, ecx
mov edx, ebp
mov r9d, 0x40
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rbx + 0x10], rax
mov r9, rax
test rax, rax
je 0x180001637
mov rdx, qword [rbx + 0x20]
mov qword [rsp + 0x60], rsi
movzx eax, word [rdx + 6]
lea ecx, [rax + rax*4]
mov eax, dword [rdx + 0x54]
mov rdx, qword [rbx + 8]
lea r8d, [rax + rcx*8]
mov rcx, r9
call fcn.180016730
mov rax, qword [rbx + 0x20]
mov esi, r14d
cmp r14w, word [rax + 6]
jae 0x1800015ef
mov rdi, r14
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rbx + 0x30]
mov r9d, dword [rdi + rax + 0xc]
test r9d, r9d
je 0x1800015dd
mov ecx, dword [rdi + rax + 0x10]
test ecx, ecx
je 0x1800015dd
mov edx, dword [rdi + rax + 0x14]
mov r8d, ecx
add rdx, qword [rbx + 8]
mov ecx, r9d
add rcx, qword [rbx + 0x10]
call fcn.180016730
mov rax, qword [rbx + 0x20]
inc esi
add rdi, 0x28
movzx ecx, word [rax + 6]
cmp esi, ecx
jl 0x1800015b0
mov rcx, qword [rbx + 0x10]
mov qword [rbx + 0x28], rcx
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
mov rcx, rbx
mov qword [rbx + 0x20], rax
add rax, 0x108
mov qword [rbx + 0x30], rax
call fcn.1800018d0
mov rcx, rbx
call fcn.1800016a0
mov rsi, qword [rsp + 0x60]
mov rcx, qword [rbx + 0x10]
test eax, eax
jne 0x18000163b
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x180001681
lea r9, [rsp + 0x20]
mov dword [rsp + 0x20], r14d
mov r8d, 0x40
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rcx, qword [rbx + 0x20]
mov rax, qword [rbx + 0x10]
mov qword [rcx + 0x30], rax
mov rax, qword [rbx + 0x20]
mov rcx, qword [rbx + 0x10]
mov eax, dword [rax + 0x28]
add rax, rcx
mov qword [rbx + 0x18], rax
je 0x18000167d
xor r8d, r8d
lea edx, [r8 + 1]
call rax
mov rax, qword [rbx + 0x10]
mov rbp, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.180013ce0
add rsp, 0x30
pop r14
pop rdi
pop rbx
ret