Function at 0x1400054d0
Capabilities:
Enumerate pe sections
Get system information on windows
Parse pe header
Resolve function by parsing pe exports

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0xd0
mov qword [rsp + 0x20], 0
mov qword [rsp + 0x60], 0
mov dword [rsp + 0xa0], 0
lea rax, [rsp + 0xa4]
mov rdi, rax
xor eax, eax
mov ecx, 0x2c
rep stosb byte [rdi], al
mov qword [rsp + 0x30], 0
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0xe0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x48]
movzx eax, word [rax]
cmp eax, 0x5a4d
jne 0x140005560
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x140005575
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400059f9
mov eax, dword [rsp + 0xe8]
cmp rax, 0x40
jb 0x1400055af
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x54]
cmp dword [rsp + 0xe8], eax
jb 0x1400055af
mov eax, dword [rsp + 0xe8]
mov rcx, qword [rsp + 0x48]
movsxd rcx, dword [rcx + 0x3c]
add rcx, 0x108
cmp rax, rcx
jae 0x1400055c4
mov ecx, 0xd
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400059f9
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 4]
cmp eax, 0x8664
je 0x1400055e9
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400059f9
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x14]
mov rcx, qword [rsp + 0x28]
lea rax, [rcx + rax + 0x18]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], 0
jmp 0x140005623
mov eax, dword [rsp + 0x38]
inc eax
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x40]
add rax, 0x28
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 6]
cmp dword [rsp + 0x38], eax
jae 0x140005687
mov rax, qword [rsp + 0x40]
cmp dword [rax + 0x10], 0
jne 0x140005657
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x28]
mov ecx, dword [rcx + 0x38]
add rax, rcx
mov qword [rsp + 0x58], rax
jmp 0x14000566f
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x40]
mov ecx, dword [rcx + 0x10]
add rax, rcx
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x60]
cmp qword [rsp + 0x58], rax
jbe 0x140005685
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x60], rax
jmp 0x14000560b
lea rcx, [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x50]
mov ecx, dword [rsp + 0xa4]
lea eax, [rax + rcx - 1]
mov ecx, dword [rsp + 0xa4]
dec ecx
not ecx
and eax, ecx
mov eax, eax
mov qword [rsp + 0x68], rax
mov eax, dword [rsp + 0xa4]
mov rcx, qword [rsp + 0x60]
lea rax, [rcx + rax - 1]
mov ecx, dword [rsp + 0xa4]
dec ecx
not ecx
mov ecx, ecx
and rax, rcx
cmp qword [rsp + 0x68], rax
je 0x1400056f9
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400059f9
mov r9d, 4
mov r8d, 0x3000
mov rdx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x28]
mov rcx, qword [rax + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x140005761
mov r9d, 4
mov r8d, 0x3000
mov rdx, qword [rsp + 0x68]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x140005761
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400059f9
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, 0x28
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x14000579d
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400059f9
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x30]
mov qword [rax + 8], rcx
mov rax, qword [rsp + 0x20]
mov ecx, dword [rsp + 0xa4]
mov dword [rax + 0x24], ecx
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x54]
mov r9d, 4
mov r8d, 0x1000
mov edx, eax
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
jne 0x1400057fd
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400059f9
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x54]
mov r8d, eax
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x78]
call fcn.1401852f0
mov rax, qword [rsp + 0x48]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x78]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x20]
mov qword [rcx], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x30]
mov qword [rax + 0x30], rcx
mov eax, dword [rsp + 0xe8]
mov r9, qword [rsp + 0x20]
mov r8, qword [rsp + 0x28]
mov edx, eax
mov rcx, qword [rsp + 0xe0]
call fcn.1400043d0
test eax, eax
jne 0x140005872
jmp 0x1400059f9
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 0x30]
mov rax, qword [rax + 0x30]
sub rax, rcx
mov qword [rsp + 0x80], rax
cmp qword [rsp + 0x80], 0
je 0x1400058b9
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x20]
call fcn.140004b10
mov rcx, qword [rsp + 0x20]
mov dword [rcx + 0x20], eax
jmp 0x1400058c5
mov rax, qword [rsp + 0x20]
mov dword [rax + 0x20], 1
mov rcx, qword [rsp + 0x20]
call fcn.140003ff0
test eax, eax
jne 0x1400058dd
jmp 0x1400059f9
mov rcx, qword [rsp + 0x20]
call fcn.140004e80
test eax, eax
jne 0x1400058f5
jmp 0x1400059f9
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov ecx, 8
imul rcx, rcx, 9
lea rax, [rax + rcx + 0x88]
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x88]
cmp dword [rax], 0
je 0x14000598a
mov rax, qword [rsp + 0x88]
mov eax, dword [rax]
mov rcx, qword [rsp + 0x20]
add rax, qword [rcx + 8]
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x14000598a
mov rax, qword [rsp + 0x50]
cmp qword [rax], 0
je 0x14000598a
xor r8d, r8d
mov edx, 1
mov rax, qword [rsp + 0x20]
mov rcx, qword [rax + 8]
mov rax, qword [rsp + 0x50]
call qword [rax]
mov rax, qword [rsp + 0x50]
add rax, 8
mov qword [rsp + 0x50], rax
jmp 0x140005957
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
cmp dword [rax + 0x28], 0
je 0x1400059f2
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov eax, dword [rax + 0x28]
mov rcx, qword [rsp + 0x20]
add rax, qword [rcx + 8]
mov qword [rsp + 0x98], rax
xor r8d, r8d
mov edx, 1
mov rax, qword [rsp + 0x20]
mov rcx, qword [rax + 8]
call qword [rsp + 0x98]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
jne 0x1400059e6
mov ecx, 0x45a
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400059f9
mov rax, qword [rsp + 0x20]
mov dword [rax + 0x1c], 1
mov rax, qword [rsp + 0x20]
jmp 0x140005a34
cmp qword [rsp + 0x30], 0
je 0x140005a14
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
cmp qword [rsp + 0x20], 0
je 0x140005a32
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x20]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
add rsp, 0xd0
pop rdi
ret