Function at 0x18003c530
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Parse pe header
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x2008
call fcn.180061240
sub rsp, rax
mov rax, qword [0x180084090]
xor rax, rsp
mov qword [rsp + 0x1ff8], rax
mov dword [rsp + 0x3c], 0
mov rax, qword [rsp + 0x2020]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x18003c582
mov rax, qword [rsp + 0x40]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x18003c587
jmp 0x18003c931
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 0x3c]
mov rax, qword [rsp + 0x2020]
add rax, rcx
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
cmp dword [rax], 0x4550
je 0x18003c5b2
jmp 0x18003c931
mov rax, qword [rsp + 0x58]
add rax, 4
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x58]
mov eax, dword [rax + 0x50]
mov dword [rsp + 0x24], eax
mov edx, dword [rsp + 0x24]
mov r9d, 0x40
mov r8d, 0x1000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x24]
mov dword [rsp + 0x68], eax
cmp qword [rsp + 0x30], 0
jne 0x18003c5fe
jmp 0x18003c931
mov ecx, dword [rsp + 0x24]
mov rdi, qword [rsp + 0x30]
xor eax, eax
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x58]
movzx eax, word [rax + 6]
mov word [rsp + 0x28], ax
mov rax, qword [rsp + 0x58]
movzx ecx, word [rax + 0x14]
mov rax, qword [rsp + 0x58]
lea rax, [rax + rcx + 0x18]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x50]
mov ecx, dword [rax + 0xc]
mov rdi, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x2020]
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x58]
mov eax, dword [rax + 0x3c]
sub eax, 1
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x58]
mov eax, dword [rax + 0x38]
sub eax, 1
mov dword [rsp + 0x20], eax
mov dword [rsp + 0x48], 0
jmp 0x18003c689
mov eax, dword [rsp + 0x48]
add eax, 1
mov dword [rsp + 0x48], eax
mov rax, qword [rsp + 0x50]
add rax, 0x28
mov qword [rsp + 0x50], rax
movzx eax, word [rsp + 0x28]
cmp dword [rsp + 0x48], eax
jge 0x18003c6c3
mov rax, qword [rsp + 0x50]
mov ecx, dword [rax + 0x10]
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x14]
mov rsi, qword [rsp + 0x2020]
add rsi, rax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0xc]
mov rdi, qword [rsp + 0x30]
add rdi, rax
rep movsb byte [rdi], byte [rsi]
jmp 0x18003c670
mov qword [rsp + 0x70], 0
mov dword [rsp + 0x78], 0
mov dword [rsp + 0x7c], 0
jmp 0x18003c6e9
mov eax, dword [rsp + 0x7c]
add eax, 1
mov dword [rsp + 0x7c], eax
mov rax, qword [rsp + 0x60]
movzx eax, word [rax + 2]
cmp dword [rsp + 0x7c], eax
jge 0x18003c773
movsxd rcx, dword [rsp + 0x7c]
imul rcx, rcx, 0x28
mov rax, qword [rsp + 0x58]
lea rax, [rax + rcx + 0xf8]
mov qword [rsp + 0x80], rax
mov rdx, qword [rsp + 0x80]
lea rcx, str..text
sub rcx, rdx
movzx eax, byte [rdx]
cmp al, byte [rdx + rcx]
jne 0x18003c73c
add rdx, 1
test al, al
jne 0x18003c728
xor eax, eax
jmp 0x18003c741
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x18003c76e
mov rax, qword [rsp + 0x80]
mov ecx, dword [rax + 0xc]
mov rax, qword [rsp + 0x30]
add rax, rcx
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x80]
mov eax, dword [rax + 8]
mov dword [rsp + 0x78], eax
jmp 0x18003c773
jmp 0x18003c6de
cmp qword [rsp + 0x70], 0
je 0x18003c927
cmp dword [rsp + 0x78], 0
jbe 0x18003c927
mov byte [rsp + 0x1fd8], 0xcc
mov byte [rsp + 0x1fd9], 0xcc
mov byte [rsp + 0x1fda], 0xcc
mov byte [rsp + 0x1fdb], 0x8b
mov byte [rsp + 0x1fdc], 0xff
mov byte [rsp + 0x1fdd], 0x55
mov byte [rsp + 0x1fde], 0x8b
mov byte [rsp + 0x1fdf], 0xec
mov byte [rsp + 0x1fe0], 0x90
mov byte [rsp + 0x1fe1], 0x90
mov byte [rsp + 0x1fe2], 0x90
mov byte [rsp + 0x1fe3], 0x8b
mov byte [rsp + 0x1fe4], 0xff
mov byte [rsp + 0x1fe5], 0x55
mov byte [rsp + 0x1fe6], 0x8b
mov byte [rsp + 0x1fe7], 0xec
mov dword [rsp + 0x1fe8], 0
mov dword [rsp + 0x1fec], 0
jmp 0x18003c833
mov eax, dword [rsp + 0x1fec]
add eax, 1
mov dword [rsp + 0x1fec], eax
mov ecx, dword [rsp + 0x1fec]
mov eax, dword [rsp + 0x78]
sub rax, 0x12
cmp rcx, rax
jae 0x18003c8de
mov eax, dword [rsp + 0x1fec]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov r8d, 8
lea rdx, [rsp + 0x1fd8]
call fcn.18005db00
test eax, eax
je 0x18003c897
mov eax, dword [rsp + 0x1fec]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov r8d, 8
lea rdx, [rsp + 0x1fe0]
call fcn.18005db00
test eax, eax
jne 0x18003c8d9
movsxd rax, dword [rsp + 0x1fe8]
cmp rax, 0x3e7
jae 0x18003c8d9
mov ecx, dword [rsp + 0x1fec]
mov rax, qword [rsp + 0x70]
lea rcx, [rax + rcx + 3]
movsxd rax, dword [rsp + 0x1fe8]
mov qword [rsp + rax*8 + 0x90], rcx
mov eax, dword [rsp + 0x1fe8]
add eax, 1
mov dword [rsp + 0x1fe8], eax
jmp 0x18003c822
call fcn.18000e540
mov edi, eax
call fcn.18005058c
mov ecx, edi
add ecx, eax
call fcn.180050574
call fcn.18005058c
mov ecx, dword [rsp + 0x1fe8]
sub ecx, 2
cdq
idiv ecx
movsxd rax, edx
mov eax, dword [rsp + rax*8 + 0x90]
mov dword [rsp + 0x88], eax
mov ecx, dword [rsp + 0x30]
mov eax, dword [rsp + 0x88]
sub eax, ecx
mov dword [rsp + 0x3c], eax
xor eax, eax
test eax, eax
jne 0x18003c55e
cmp qword [rsp + 0x30], 0
je 0x18003c953
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [rsp + 0x1ff0], eax
mov eax, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x1ff8]
xor rcx, rsp
call fcn.18004f770
add rsp, 0x2008
pop rdi
pop rsi
ret