Function at 0x180047ae0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get system information on windows
Link function at runtime on windows
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push rbp
sub rsp, 0x70
mov rbp, rcx
test rcx, rcx
jne 0x180047af7
lea eax, [rcx + 1]
add rsp, 0x70
pop rbp
ret
mov edx, 0x40
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
cmp eax, 1
je 0x180047ed4
mov eax, 0x5a4d
cmp ax, word [rbp]
jne 0x180047ed4
mov qword [rsp + 0x90], rdi
movsxd rdi, dword [rbp + 0x3c]
mov edx, 0x108
add rdi, rbp
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
cmp eax, 1
je 0x180047ec1
cmp dword [rdi], 0x4550
jne 0x180047ec1
mov eax, 0xf0
cmp word [rdi + 0x14], ax
jne 0x180047eae
mov eax, 0x20b
cmp word [rdi + 0x18], ax
jne 0x180047eae
movzx eax, word [rdi + 6]
cmp ax, 1
jae 0x180047b87
mov eax, 5
mov rdi, qword [rsp + 0x90]
add rsp, 0x70
pop rbp
ret
mov qword [rsp + 0x80], rbx
mov qword [rsp + 0x88], rsi
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x60], r13
movzx r10d, ax
mov qword [rsp + 0x58], r14
xor r14d, r14d
lea r12, [r10 + r10*4]
lea r13, [rdi + 0x108]
shl r12, 3
mov qword [rsp + 0x50], r15
mov r15d, r14d
sub r12, rbp
mov r8d, r14d
add r12, r13
mov rbx, r12
test r10, r10
jle 0x180047c02
mov r11d, dword [rdi + 0x98]
lea r9, [r13 + 0xc]
mov ecx, dword [r9 + 4]
add ecx, dword [r9]
cmp rbx, rcx
cmovl rbx, rcx
cmp r11d, dword [r9]
jne 0x180047bf6
movsxd r15, r8d
inc r8
add r9, 0x28
cmp r8, r10
jl 0x180047be0
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [rsp + 0x24]
mov rax, rbx
cqo
idiv rcx
test rdx, rdx
je 0x180047c21
inc rax
imul rcx, rax
mov r9d, 0x40
mov r8d, 0x1000
mov rdx, rcx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
jne 0x180047c79
lea eax, [rsi + 6]
mov r14, qword [rsp + 0x58]
mov r13, qword [rsp + 0x60]
mov r12, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x80]
mov rsi, qword [rsp + 0x88]
mov r15, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x90]
add rsp, 0x70
pop rbp
ret
mov r8, r12
mov rdx, rbp
mov rcx, rax
call fcn.18004f540
cmp r14w, word [rdi + 6]
jae 0x180047cc4
lea rbx, [r13 + 0x14]
nop dword [rax]
nop word [rax + rax]
mov edx, dword [rbx]
mov ecx, dword [rbx - 8]
mov r8d, dword [rbx - 4]
add rdx, rbp
add rcx, rsi
call fcn.18004f540
movzx eax, word [rdi + 6]
inc r14
lea rbx, [rbx + 0x28]
cmp r14, rax
jl 0x180047ca0
movsxd r13, dword [rsi + 0x3c]
mov qword [0x18028c8b0], rsi
add r13, rsi
test r15, r15
je 0x180047cf5
call fcn.180047010
cmp eax, 1
jne 0x180047cf5
lea rax, [r15 + r15*4]
add dword [r13 + rax*8 + 0x114], ebp
add dword [r13 + rax*8 + 0x11c], ebp
mov eax, dword [r13 + 0x90]
test eax, eax
jne 0x180047d1b
xor edx, edx
mov r8d, 0x8000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 7
jmp 0x180047c47
mov r14, rax
test eax, eax
je 0x180047e93
add r14, rsi
movabs r15, 0x8000000000000000
cmp dword [r14 + 4], 0
jne 0x180047d41
cmp dword [r14 + 0xc], 0
je 0x180047db7
mov edx, dword [r14 + 0xc]
xor ecx, ecx
add rdx, qword [0x18028c8b0]
call fcn.1800422b0
mov rbp, rax
test rax, rax
je 0x180047dae
mov eax, dword [r14]
test eax, eax
je 0x180047d68
lea rbx, [rsi + rax]
jmp 0x180047d6f
mov ebx, dword [r14 + 0x10]
add rbx, rsi
mov edi, dword [r14 + 0x10]
mov rax, qword [rbx]
add rdi, rsi
test rax, rax
je 0x180047dae
nop
mov rcx, rbp
test r15, rax
je 0x180047d8d
movzx edx, ax
jmp 0x180047d94
lea rdx, [rax + 2]
add rdx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
add rbx, 8
add rdi, 8
mov qword [rdi - 8], rax
mov rax, qword [rbx]
test rax, rax
jne 0x180047d80
add r14, 0x14
jmp 0x180047d33
mov edx, dword [r13 + 0xb0]
test rdx, rdx
je 0x180047e6b
add rdx, rsi
cmp dword [rdx], 0
je 0x180047e6b
mov ebx, 0xa000
mov r11d, 0xf000
mov r10d, 0x3000
nop dword [rax]
nop dword [rax + rax]
mov eax, dword [rdx + 4]
lea r8, [rdx + 8]
add rax, rdx
cmp r8, rax
jae 0x180047e60
nop
movzx r9d, word [r8]
movzx eax, r9w
and ax, r11w
cmp ax, bx
je 0x180047e37
cmp ax, r10w
je 0x180047e37
test ax, ax
je 0x180047e51
xor edx, edx
mov r8d, 0x8000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 0xa
jmp 0x180047c47
mov ecx, dword [rdx]
and r9d, 0xfff
lea rax, [rsi + r9]
add rcx, rax
mov rax, rsi
sub rax, qword [r13 + 0x30]
add qword [rcx], rax
mov eax, dword [rdx + 4]
add r8, 2
add rax, rdx
cmp r8, rax
jb 0x180047e00
mov eax, dword [rdx + 4]
add rdx, rax
cmp dword [rdx], 0
jne 0x180047df0
mov eax, dword [r13 + 0x28]
xor r8d, r8d
mov rcx, rsi
add rax, rsi
lea edx, [r8 + 1]
mov qword [0x18028c910], rax
call rax
mov qword [0x18028c908], rsi
xor eax, eax
jmp 0x180047c47
xor edx, edx
mov r8d, 0x8000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 8
jmp 0x180047c47
mov eax, 4
mov rdi, qword [rsp + 0x90]
add rsp, 0x70
pop rbp
ret
mov eax, 3
mov rdi, qword [rsp + 0x90]
add rsp, 0x70
pop rbp
ret
mov eax, 2
add rsp, 0x70
pop rbp
ret