Function at 0x1400046a8
Capabilities:
Get file size
Read file on windows
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0xa8
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0xffffffffffffffff
jne 0x14000470e
xor eax, eax
jmp 0x1400049c9
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x4c], eax
mov eax, dword [rsp + 0x4c]
mov qword [rsp + 0x88], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rsp + 0x88]
mov r8, rcx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
jne 0x140004769
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400049c9
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x4c]
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400047b8
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x78]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400049c9
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x68]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x1400047f9
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x78]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400049c9
mov rax, qword [rsp + 0x68]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x78]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
add rax, 4
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x68]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x78]
lea rax, [rcx + rax + 0x108]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x70], 0
mov rax, qword [rsp + 0xd8]
mov dword [rax], 0
mov dword [rsp + 0x80], 0
jmp 0x14000486f
mov eax, dword [rsp + 0x80]
inc eax
mov dword [rsp + 0x80], eax
mov rax, qword [rsp + 0x60]
movzx eax, word [rax + 2]
cmp dword [rsp + 0x80], eax
jge 0x1400049a3
movsxd rax, dword [rsp + 0x80]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x58]
add rcx, rax
mov rax, rcx
mov rdx, qword [rsp + 0xc8]
mov rcx, rax
call fcn.140004638
test eax, eax
je 0x14000499e
movsxd rax, dword [rsp + 0x80]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x58]
mov eax, dword [rcx + rax + 0x10]
mov qword [rsp + 0x90], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rsp + 0x90]
mov r8, rcx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0
je 0x14000499c
movsxd rax, dword [rsp + 0x80]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x58]
mov eax, dword [rcx + rax + 0x10]
movsxd rcx, dword [rsp + 0x80]
imul rcx, rcx, 0x28
mov rdx, qword [rsp + 0x58]
mov ecx, dword [rdx + rcx + 0x14]
mov rdx, qword [rsp + 0x78]
add rdx, rcx
mov rcx, rdx
mov rdi, qword [rsp + 0x70]
mov rsi, rcx
mov ecx, eax
rep movsb byte [rdi], byte [rsi]
movsxd rax, dword [rsp + 0x80]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0xd8]
mov rdx, qword [rsp + 0x58]
mov eax, dword [rdx + rax + 0x10]
mov dword [rcx], eax
xor eax, eax
mov rcx, 0xffffffffffffffff
mov rdi, qword [rsp + 0xd0]
repne scasb al, byte [rdi]
not rcx
dec rcx
mov rax, rcx
mov rcx, qword [rsp + 0xd8]
mov r9d, dword [rcx]
mov r8, qword [rsp + 0x70]
mov edx, eax
mov rcx, qword [rsp + 0xd0]
call fcn.140004418
jmp 0x1400049a3
jmp 0x14000485f
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x78]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x70]
add rsp, 0xa8
pop rdi
pop rsi
ret