Function at 0x140003500
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Parse pe header
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov rsi, rcx
lea rdx, [0x14000e428]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rdi, rax
xor edx, edx
lea r8d, [rdx + 2]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
movsxd rbx, eax
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_rewind]
lea rcx, [rbx + 1]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbp, rax
mov r9, rdi
mov r8d, 1
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test rbp, rbp
je 0x140003868
mov r15d, 0x5a4d
cmp word [rbp], r15w
jne 0x140003868
movsxd rax, dword [rbp + 0x3c]
cmp eax, 0x400
jg 0x140003868
lea r13, [rax + rbp]
mov qword [rsp + 0x40], r13
cmp dword [r13], 0x4550
jne 0x140003868
lea rbx, [r13 + 0xb0]
xor eax, eax
cmp dword [rbx], eax
cmove rbx, rax
mov r14, qword [r13 + 0x30]
mov qword [rsp + 0x20], r14
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea rdx, str.NtUnmapViewOfSection
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdx, qword [r13 + 0x30]
mov rcx, 0xffffffffffffffff
call rax
mov edx, dword [r13 + 0x50]
mov r9d, 0x40
mov r8d, 0x3000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdi, rax
test rax, rax
jne 0x140003670
test rbx, rbx
jne 0x140003635
mov rdx, r14
lea rcx, str.____Allocation_failure_at__x._n
jmp 0x140003872
lea rcx, str.___Attempting_to_allocate_memory_n
call fcn.140001080
mov edx, dword [r13 + 0x50]
xor ecx, ecx
lea r9d, [rcx + 0x40]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdi, rax
test rax, rax
jne 0x140003670
lea rcx, str.____Failed_to_allocate_memory._n
call fcn.140001080
jmp 0x140003877
lea rcx, str.___Mapping_sections...
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
mov qword [r13 + 0x30], rdi
mov r8d, dword [r13 + 0x54]
mov rdx, rbp
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
xor ebx, ebx
mov esi, ebx
cmp bx, word [r13 + 6]
jae 0x1400036ec
lea rbx, [r13 + 0x11c]
movsxd rax, esi
lea rcx, [rax*4 + 0x21]
add rcx, rax
lea rdx, [rcx*8]
add rdx, r13
lea rcx, str._______Mapping_section__s_n
call fcn.140001080
mov r8d, dword [rbx - 4]
mov edx, dword [rbx]
add rdx, rbp
mov ecx, dword [rbx - 8]
add rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
inc esi
lea rbx, [rbx + 0x28]
movzx eax, word [r13 + 6]
cmp esi, eax
jl 0x1400036a2
xor ebx, ebx
mov rcx, rdi
call fcn.1400031a0
cmp rdi, r14
je 0x140003859
mov r8d, dword [r13 + 0x50]
mov qword [rsp + 0x28], r8
test rdi, rdi
je 0x140003859
cmp word [rdi], r15w
jne 0x140003859
movsxd rax, dword [rdi + 0x3c]
cmp eax, 0x400
jg 0x140003859
cmp dword [rax + rdi], 0x4550
jne 0x140003859
mov ecx, dword [rax + rdi + 0xb0]
test ecx, ecx
je 0x140003859
mov eax, dword [rax + rdi + 0xb4]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rcx
mov r12, rbx
test rax, rax
je 0x140003859
lea r15, [r12 + rcx]
add r15, rdi
mov eax, dword [r15]
test eax, eax
je 0x140003847
mov ecx, dword [r15 + 4]
test ecx, ecx
je 0x140003847
lea r14, [rcx - 8]
shr r14, 1
mov r13d, eax
lea rbp, [r15 + 8]
mov rsi, rbx
je 0x1400037f4
nop dword [rax]
nop word [rax + rax]
movzx edx, word [rbp]
mov eax, edx
shr rax, 0xc
and edx, 0xfff
add rdx, r13
test rax, rax
je 0x1400037f2
cmp rax, 3
jne 0x140003827
cmp rdx, r8
jae 0x14000380c
lea rbx, [rdx + rdi]
mov rdx, rbx
lea rcx, str._____V__Apply_Reloc_Field_at__x_n
call fcn.140001080
mov rax, rdi
sub rax, qword [rsp + 0x20]
add qword [rbx], rax
add rbp, 2
inc rsi
cmp rsi, r14
mov r8, qword [rsp + 0x28]
jb 0x1400037a0
xor ebx, ebx
mov eax, dword [r15 + 4]
add r12, rax
cmp r12, qword [rsp + 0x30]
jae 0x140003847
mov rcx, qword [rsp + 0x38]
jmp 0x140003761
lea rcx, str.________Out_of_Bound_Field:__lx_n
call fcn.140001080
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x28]
add rax, rdi
call rax
jmp 0x140003879
mov r8d, eax
mov edx, esi
lea rcx, str.________Not_supported_relocations_format_at__d:__d_n
call fcn.140001080
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x28]
add rax, rdi
call rax
jmp 0x140003879
test r12, r12
je 0x140003859
lea rcx, str.___Relocation_fixed.
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x28]
add rax, rdi
call rax
jmp 0x140003879
mov rdx, rsi
lea rcx, str._____s_isnt_a_PE_file.
call fcn.140001080
xor al, al
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret