Function at 0x140001990
Capabilities:
Allocate or change rwx memory
Get file size
Parse pe header
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x70
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov rax, rdx
mov rbx, rcx
mov qword [rsp + 0x50], rcx
xor r12d, r12d
mov edi, r12d
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x60], r12d
mov qword [rcx + 0x10], rdx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r14d, eax
test eax, eax
jne 0x140001a02
lea rcx, [rbx + 0x10a0]
lea rdx, [0x1400036d0]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x140001be3
mov r15d, 0x1000
cmp r14d, r15d
cmova r14d, r15d
lea rsi, [rbx + 0xa0]
mov r8d, r15d
xor edx, edx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memset
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x60]
mov r8d, r14d
mov rdx, rsi
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, eax
mov dword [rsp + 0x30], eax
test eax, eax
jne 0x140001a64
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x1400036e0]
mov rcx, rbx
call fcn.140001c30
jmp 0x140001be3
mov qword [rbx + 0x30], rsi
mov eax, 0x5a4d
cmp word [rsi], ax
mov eax, r12d
jne 0x140001a89
movsxd rcx, dword [rsi + 0x3c]
add rcx, rsi
mov qword [rbx + 0x38], rcx
cmp dword [rcx], 0x4550
sete al
test eax, eax
jne 0x140001aa6
lea rcx, [rbx + 0x10a0]
lea rdx, [0x1400036f0]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x140001be3
mov rdx, rsi
mov rcx, rbx
call fcn.140001cc0
mov r14, qword [rbx + 0x58]
mov qword [rsp + 0x40], r14
mov edx, dword [rbx + 0x90]
mov r9d, 0x40
mov r8d, r15d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r15, rax
mov qword [rbx + 0x28], rax
mov qword [rsp + 0x38], rax
test rax, rax
jne 0x140001afb
lea rcx, [rbx + 0x10a0]
lea rdx, [0x140003708]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x140001be3
mov rax, qword [rbx + 0x48]
mov r8d, dword [rax + 0x3c]
mov rdx, rsi
mov rcx, r15
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rbx + 0x48]
mov ecx, dword [rax + 0x20]
mov eax, dword [rax + 0x3c]
dec eax
add eax, ecx
neg ecx
and eax, ecx
add r15, rax
mov qword [rsp + 0x38], r15
movzx esi, r12w
mov word [rsp + 0x34], r12w
cmp si, word [rbx + 0x20]
jae 0x140001bce
mov edx, dword [r14 + 0x14]
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov edi, eax
mov dword [rsp + 0x30], eax
test eax, eax
jne 0x140001b74
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003720]
mov rcx, rbx
call fcn.140001c30
jmp 0x140001be3
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x60]
mov r8d, dword [r14 + 0x10]
mov rdx, r15
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, eax
mov dword [rsp + 0x30], eax
test eax, eax
je 0x140001a47
mov rax, qword [rbx + 0x48]
mov ecx, dword [rax + 0x20]
mov eax, dword [r14 + 8]
dec eax
add eax, ecx
neg ecx
and eax, ecx
add r15, rax
mov qword [rsp + 0x38], r15
add r14, 0x28
mov qword [rsp + 0x40], r14
inc si
mov word [rsp + 0x34], si
jmp 0x140001b32
mov rdx, qword [rbx + 0x28]
mov rcx, rbx
call fcn.140001cc0
mov edi, 1
mov dword [rsp + 0x30], edi
test edi, edi
jne 0x140001bff
mov rcx, qword [rbx + 0x10]
cmp rcx, 0xffffffffffffffff
je 0x140001bff
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x10], 0xffffffffffffffff
mov rax, qword [rbx + 0x28]
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.140001ff0
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
ret