Function at 0x1400f7c70
Capabilities:
Get file size
Read file on windows
Read file via mapping

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x40
xor r12d, r12d
mov r14, r8
mov qword [r8], r12
mov rsi, rdx
test rcx, rcx
jne 0x1400f7c9f
lea eax, [rcx + 0x21]
jmp 0x1400f7ee2
test rsi, rsi
jne 0x1400f7cac
lea eax, [rsi + 6]
jmp 0x1400f7ee2
mov eax, dword [rdx]
mov rbp, qword [rcx]
and eax, 7
cmp eax, 1
jne 0x1400f7cfe
lea r8, [rsp + 0x70]
mov rcx, rbp
lea edx, [rax + 0x47]
call fcn.1400fda14
mov edi, dword [rsp + 0x70]
mov rbx, rax
test edi, edi
jne 0x1400f7ee0
mov rcx, qword [rsi + 8]
mov edx, dword [rsi + 0x10]
mov qword [rax], rcx
mov dword [rax + 8], edx
mov dword [rax + 0xc], r12d
mov qword [rax + 0x38], r12
mov qword [rax + 0x20], r12
mov qword [rax + 0x28], r12
mov qword [rax + 0x30], rbp
jmp 0x1400f7ebd
cmp eax, 4
jne 0x1400f7ea8
lea r8, [rsp + 0x70]
mov rcx, rbp
lea edx, [rax + 0x44]
call fcn.1400fda14
mov edi, dword [rsp + 0x70]
mov rbx, rax
test edi, edi
jne 0x1400f7ee0
mov qword [rax + 0x30], rbp
lea r8d, [rdi + 1]
mov r15, qword [rsi + 0x18]
xor r9d, r9d
mov qword [rsp + 0x30], r12
mov rcx, r15
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400f7d69
lea edi, [rax + 2]
jmp 0x1400f7e9d
lea rdx, [rsp + 0x80]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1400f7e88
mov rax, qword [rsp + 0x80]
cmp rax, 0x7fffffff
jg 0x1400f7e88
test rax, rax
je 0x1400f7e88
xor r9d, r9d
mov qword [rsp + 0x28], r12
xor edx, edx
mov dword [rsp + 0x20], r12d
mov rcx, rsi
lea r8d, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov rdi, rax
test rax, rax
je 0x1400f7e88
mov ecx, dword [rsp + 0x80]
xor r9d, r9d
mov dword [rbx + 8], ecx
xor r8d, r8d
mov rcx, rax
mov dword [rbx + 0xc], r12d
mov qword [rsp + 0x20], r12
lea edx, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rcx, rdi
mov qword [rbx], rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rbx], r12
je 0x1400f7e07
lea rax, [0x14010afc8]
jmp 0x1400f7e58
mov rcx, qword [rbx + 0x30]
xor edx, edx
movsxd r8, dword [rbx + 8]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbx], rax
test rax, rax
je 0x1400f7e88
mov edi, r12d
mov r8d, dword [rbx + 8]
lea r9, [rsp + 0x70]
mov edx, edi
sub r8d, edi
add rdx, qword [rbx]
mov rcx, rsi
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400f7e76
add edi, dword [rsp + 0x70]
cmp edi, dword [rbx + 8]
jne 0x1400f7e25
lea rax, [0x14010aff0]
mov rcx, rsi
mov qword [rbx + 0x28], rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbx]
mov qword [rbx + 0x10], rax
mov qword [rbx + 0x18], r15
mov qword [rbx + 0x20], r12
jmp 0x1400f7eba
mov rcx, qword [rbx + 0x30]
xor edx, edx
mov r8, qword [rbx]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], r12
mov edi, 0x51
mov qword [rbx + 8], r12
mov rdx, rbx
mov rcx, rbp
call qword [rbp + reloc.WS2_32.dll_recv]
jmp 0x1400f7ee0
cmp eax, 2
jne 0x1400f7ec2
mov rbx, qword [rdx + 0x20]
test rbx, rbx
je 0x1400f7ec2
mov qword [rbx + 0x30], rbp
mov edi, r12d
mov qword [r14], rbx
jmp 0x1400f7ee0
test byte [rdx], 2
mov edi, 6
je 0x1400f7ee0
mov rcx, qword [rdx + 0x20]
test rcx, rcx
je 0x1400f7ee0
mov rax, qword [rcx + 0x28]
test rax, rax
je 0x1400f7ee0
call rax
mov eax, edi
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret