Function at 0x1401e33b4
Capabilities:
Parse pe header
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x140]
sub rsp, 0x240
mov rax, qword [0x14044e770]
xor rax, rsp
mov qword [rbp + 0x130], rax
mov rsi, rdx
xor edi, edi
mov rdx, qword [rdx]
mov r14, rcx
test rdx, rdx
jne 0x1401e33f8
call fcn.140298678
mov rdx, qword [rsi]
mov rbx, qword [rdx + 0x128]
lea rcx, [rsp + 0x58]
add rdx, 0xe0
call fcn.14004a36c
mov rax, qword [rsi]
mov dword [rax + 0x150], edi
mov rax, qword [rsi]
mov dword [rax + 0x154], edi
mov rax, qword [rsi]
mov dword [rax + 0x15c], edi
cmp rbx, 0x40
jb 0x1401e3730
cmp qword [rsp + 0x68], rdi
je 0x1401e3730
xor edx, edx
lea rcx, [rsp + 0x38]
lea r8d, [rdx + 0x20]
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov rcx, qword [r14]
lea rax, [rsp + 0x38]
lea r9, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r8d, 0x40
lea rdx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_ReadFile]
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
lea r15, [0x14030cae0]
mov ebx, eax
test eax, eax
je 0x1401e3490
cmp eax, 0x3e5
jne 0x1401e366e
mov rcx, qword [r14]
lea r8, [rsp + 0x30]
or r9d, 0xffffffff
mov dword [rsp + 0x20], edi
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResultEx]
test eax, eax
je 0x1401e3666
cmp dword [rsp + 0x30], 0x40
jne 0x1401e3666
mov eax, 0x5a4d
cmp word [rbp - 0x80], ax
jne 0x1401e3730
mov ebx, pe_nt_image_headers64
lea rcx, [rbp - 0x40]
mov r8d, ebx
xor edx, edx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov eax, dword [rbp - 0x44]
lea r9, [rsp + 0x30]
mov rcx, qword [r14]
lea rdx, [rbp - 0x40]
mov dword [rsp + 0x48], eax
mov r8d, ebx
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
test eax, eax
je 0x1401e351d
cmp eax, 0x3e5
jne 0x1401e366e
mov rcx, qword [r14]
lea r8, [rsp + 0x30]
or r9d, 0xffffffff
mov dword [rsp + 0x20], edi
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResultEx]
test eax, eax
je 0x1401e358a
mov eax, dword [rsp + 0x30]
add eax, 0xffffff08
test eax, 0xffffffef
jne 0x1401e358a
cmp dword [rbp - 0x40], 0x4550
mov eax, 0x14c
jne 0x1401e3730
mov eax, dword [rbp - 0x38]
mov rcx, qword [rsi]
mov dword [rcx + 0x150], eax
mov rcx, qword [rsi]
mov eax, dword [rbp + 0x18]
mov dword [rcx + 0x154], eax
mov rax, qword [rsi]
movzx ecx, word [rbp - 0x3c]
mov dword [rax + 0x15c], ecx
mov al, 1
jmp 0x1401e3732
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
call fcn.14004acb4
mov rsi, qword [rax + 8]
cmp dword [rsi], 3
jbe 0x1401e366e
cmp qword [rsp + 0x70], 8
lea rax, str.Failed_to_read_the_file_image_header._Cant_decide_if_the_file_is_PE.
mov qword [rbp + 0xf0], rax
mov rdx, r15
lea rax, [rsp + 0x58]
mov qword [rbp + 0xf8], 0x8c
cmovae rax, qword [rsp + 0x58]
mov rcx, rdi
test rax, rax
je 0x1401e35e9
mov rdx, rax
or rcx, 0xffffffffffffffff
inc rcx
cmp word [rax + rcx*2], di
jne 0x1401e35e0
lea eax, [rcx*2 + 2]
mov qword [rbp + 0x100], rdx
mov dword [rbp + 0x108], eax
lea rax, [rsp + 0x30]
mov qword [rbp + 0x110], rax
mov dword [rbp + 0x10c], edi
mov qword [rbp + 0x118], 4
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov dword [rsp + 0x34], eax
lea rax, [rsp + 0x34]
mov qword [rbp + 0x120], rax
mov qword [rbp + 0x128], 4
lea rax, [rbp + 0xd0]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rdx, [0x14039da3a]
xor r8d, r8d
mov dword [rsp + 0x20], 6
mov rcx, rsi
call fcn.140001158
jmp 0x1401e366e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
test ebx, ebx
je 0x1401e3735
call fcn.14004acb4
mov rbx, qword [rax + 8]
cmp dword [rbx], 3
jbe 0x1401e3735
cmp qword [rsp + 0x70], 8
lea rax, str.Failed_to_read_the_file_header._Cant_decide_if_the_file_is_PE.
lea rcx, [rsp + 0x58]
mov qword [rbp + 0xf0], rax
cmovae rcx, qword [rsp + 0x58]
mov rax, rdi
mov qword [rbp + 0xf8], 0x80
test rcx, rcx
je 0x1401e36ca
mov r15, rcx
or rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], di
jne 0x1401e36c1
lea eax, [rax*2 + 2]
mov qword [rbp + 0x100], r15
mov dword [rbp + 0x108], eax
mov dword [rbp + 0x10c], edi
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov dword [rsp + 0x34], eax
lea rax, [rsp + 0x34]
mov qword [rbp + 0x110], rax
mov qword [rbp + 0x118], 4
lea rax, [rbp + 0xd0]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rdx, [0x14039d81a]
xor r8d, r8d
mov dword [rsp + 0x20], 5
mov rcx, rbx
call fcn.140001158
jmp 0x1401e3735
mov al, 2
mov dil, al
lea rcx, [rsp + 0x58]
call fcn.14004b500
mov al, dil
mov rcx, qword [rbp + 0x130]
xor rcx, rsp
call fcn.1402ae860
mov rbx, qword [rsp + 0x280]
add rsp, 0x240
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret