Function at 0x1400585a0
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x190
lea rdi, [rsp + 0x30]
mov ecx, 0x58
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x1a0]
mov rax, qword [0x14014a1c0]
xor rax, rsp
mov qword [rsp + 0x188], rax
mov rax, qword [rsp + 0x1a0]
mov qword [rax], 0
mov rax, qword [rsp + 0x1a8]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140058619
lea rcx, str._error__Corrupted_magic_value_in_DOS_header_n
mov rax, qword [rsp + 0x30]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x1a8]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
cmp dword [rax], 0x4550
je 0x140058653
lea rcx, str._error__Corrupted_signature_value_in_NT_header_n
call fcn.1400584a0
jmp 0x140058fb5
mov rax, qword [rsp + 0x38]
add rax, 0x108
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x38]
movzx eax, word [rax + 4]
cmp eax, 0x8664
je 0x1400586a2
mov rax, qword [rsp + 0x38]
movzx eax, word [rax + 4]
cmp eax, 0x14c
jne 0x140058691
lea rcx, str._error__Tried_to_open_a_32_bit_executable_n
call fcn.1400584a0
jmp 0x14005869d
lea rcx, str._error__Unsupported_machine_type_n
call fcn.1400584a0
jmp 0x140058fb5
mov rax, qword [rsp + 0x38]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x1400586c3
lea rcx, str._error__Corrupted_magic_value_in_optional_header_n
call fcn.1400584a0
jmp 0x140058fb5
mov rax, qword [rsp + 0x38]
mov rax, qword [rax + 0x30]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x38]
mov eax, dword [rax + 0x50]
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0x38]
mov eax, dword [rax + 0x28]
mov dword [rsp + 0x54], eax
mov rax, qword [rsp + 0x38]
mov eax, dword [rax + 0x54]
mov dword [rsp + 0x58], eax
mov rax, qword [rsp + 0x38]
movzx eax, word [rax + 6]
mov word [rsp + 0x5c], ax
movzx eax, word [rsp + 0x5c]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x54]
mov r8d, dword [rsp + 0x50]
mov rdx, qword [rsp + 0x48]
lea rcx, str._info__hdr_image_base:0x_llx_n____________size_of_image:0x_lx_n____________entry_point_RVA:0x_lx_n____________size_of_headers:_lu_n____________num_of_sections:_i_n
call fcn.1400584a0
mov eax, dword [rsp + 0x50]
mov r9d, 4
mov r8d, 0x3000
mov edx, eax
xor ecx, ecx
call fcn.140061370
mov qword [0x14014b018], rax
cmp qword [0x14014b018], 0
jne 0x14005875e
jmp 0x140058fb5
mov eax, dword [rsp + 0x58]
mov r8d, eax
mov rdx, qword [rsp + 0x1a8]
mov rcx, qword [0x14014b018]
call fcn.1401139e0
mov dword [rsp + 0x60], 0
jmp 0x14005878d
mov eax, dword [rsp + 0x60]
inc eax
mov dword [rsp + 0x60], eax
movzx eax, word [rsp + 0x5c]
cmp dword [rsp + 0x60], eax
jge 0x140058839
movsxd rax, dword [rsp + 0x60]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x40]
mov eax, dword [rcx + rax + 0xc]
mov rcx, qword [0x14014b018]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x68], rax
movsxd rax, dword [rsp + 0x60]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x40]
mov eax, dword [rcx + rax + 0x10]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
jbe 0x140058813
mov eax, dword [rsp + 0x70]
movsxd rcx, dword [rsp + 0x60]
imul rcx, rcx, 0x28
mov rdx, qword [rsp + 0x40]
mov ecx, dword [rdx + rcx + 0x14]
mov rdx, qword [rsp + 0x1a8]
add rdx, rcx
mov rcx, rdx
mov r8d, eax
mov rdx, rcx
mov rcx, qword [rsp + 0x68]
call fcn.1401139e0
jmp 0x140058834
movsxd rax, dword [rsp + 0x60]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x40]
mov eax, dword [rcx + rax + 8]
mov r8d, eax
xor edx, edx
mov rcx, qword [rsp + 0x68]
call fcn.140114080
jmp 0x140058783
lea rcx, str._info__Handle_Import_Table_n
call fcn.1400584a0
mov rax, qword [rsp + 0x38]
add rax, 0x88
mov qword [rsp + 0x78], rax
mov eax, 8
imul rax, rax, 1
mov rcx, qword [rsp + 0x78]
mov eax, dword [rcx + rax]
mov rcx, qword [0x14014b018]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x80], rax
mov dword [rsp + 0x88], 0
jmp 0x140058898