Function at 0x1800393b0
Capabilities:
Parse pe header
Read file via mapping

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x18036d060]
xor rax, rsp
mov qword [rsp + 0x70], rax
cmp qword [rcx + 0x18], 8
mov rbx, rcx
jb 0x1800393d9
mov rcx, qword [rcx]
xor edi, edi
xor r9d, r9d
mov qword [rsp + 0x30], rdi
mov edx, 0x80000000
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
lea r8d, [rdi + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbx + 0x20], rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x1800395d8
mov qword [rsp + 0x28], rdi
lea r8d, [rdi + 2]
xor r9d, r9d
mov dword [rsp + 0x20], edi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov qword [rbx + 0x28], rax
test rax, rax
jne 0x180039453
lea rdx, str.Failed_to_map_file_into_memory.
lea rcx, [0x180384e30]
call fcn.18003b820
mov rbx, rax
jmp 0x1800395fd
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor r8d, r8d
mov rcx, rax
lea edx, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rbx + 0x30], rax
test rax, rax
jne 0x18003948f
lea rdx, str.Failed_to_open_view.
lea rcx, [0x180384e30]
call fcn.18003b820
mov rbx, rax
jmp 0x1800395fd
xorps xmm0, xmm0
lea rdx, [rsp + 0x40]
mov r8d, gethostbyname
mov rcx, rax
movups xmmword [rsp + 0x40], xmm0
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x60], xmm0
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x1800394d5
lea rdx, str.Failed_to_query_view.
lea rcx, [0x180384e30]
call fcn.18003b820
mov rbx, rax
jmp 0x1800395fd
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x98], rsi
mov rsi, qword [rbx + 0x30]
mov qword [rbx + 0x38], rax
mov word [rbx + 0x48], 0x101
test rsi, rsi
je 0x1800395cc
mov edx, 0x40
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1800395cc
mov eax, 0x5a4d
cmp word [rsi], ax
jne 0x1800395cc
movsxd rdi, dword [rsi + 0x3c]
add rdi, rsi
je 0x1800395cc
mov edx, 4
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1800395cc
cmp dword [rdi], 0x4550
jne 0x1800395cc
lea rcx, [rdi + 4]
lea edx, [rax + 0x14]
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1800395cc
movzx edx, word [rdi + 0x14]
lea rcx, [rdi + 0x18]
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1800395cc
movzx eax, word [rdi + 0x14]
lea rcx, [rdi + 0x18]
add rcx, rax
movzx eax, word [rdi + 6]
lea rdx, [rax + rax*4]
shl rdx, 3
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1800395cc
movzx eax, word [rdi + 0x18]
mov ecx, 0x10b
cmp ax, cx
jne 0x1800395a2
xor al, al
jmp 0x1800395ae
mov ecx, 0x20b
cmp ax, cx
jne 0x1800395cc
mov al, 1
mov byte [rbx + 0x4c], al
mov rdx, rdi
mov rcx, rbx
mov byte [rbx + 0x4a], 1
call fcn.180039640
mov rsi, qword [rsp + 0x98]
mov al, 1
jmp 0x180039617
mov rsi, qword [rsp + 0x98]
xor al, al
jmp 0x180039617
lea rdx, str.Failed_to_open_file.
lea rcx, [0x180384e30]
call fcn.18003b820
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
call fcn.18000a6e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
call fcn.180039990
mov rcx, rax
call fcn.18003bab0
xor al, al
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.18007b140
mov rbx, qword [rsp + 0xa0]
add rsp, 0x80
pop rdi
ret