Function at 0x14004faf0
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x78]
sub rsp, 0x178
mov rbx, r8
mov r13, rdx
mov r12, rcx
cmp rdx, 0x20
jbe 0x14004fe5c
mov rcx, qword [rcx]
add rdx, 0xffffffffffffffe0
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rcx, qword [r12]
lea r9, [rbp + 0xc8]
xor r14d, r14d
lea rdx, [rsp + 0x48]
mov dword [rbp + 0xc8], r14d
mov qword [rsp + 0x20], r14
lea r8d, [r14 + 0x20]
call qword [sym.imp.KERNEL32.dll_ReadFile]
movabs rdi, 0x5845474154455041
cmp qword [rsp + 0x48], rdi
jne 0x14004fe5c
test dword [rsp + 0x5c], 0x20000000
mov qword [rsp + 0x1b0], rsi
mov qword [rsp + 0x170], r15
jne 0x14004fb9b
mov eax, dword [rsp + 0x54]
sub r13, rax
mov qword [rbp + 0xb8], r13
mov rcx, qword [r12]
lea rdx, [rbp + 0xc8]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov edx, dword [rsp + 0x54]
mov rcx, r14
test eax, eax
cmovne rcx, qword [rbp + 0xc8]
add rdx, 0xffffffffffffffe0
add rdx, r13
mov qword [rsp + 0x40], rdx
cmp rdx, rcx
jl 0x14004fbf1
mov rcx, qword [r12]
lea rdx, [rbp + 0xc8]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
mov rdx, r14
cmovne rdx, qword [rbp + 0xc8]
mov qword [rsp + 0x40], rdx
mov rsi, r14
mov r15d, r14d
test rbx, rbx
je 0x14004fdf5
cmp r13, rdx
jge 0x14004fdf5
nop dword [rax]
mov rcx, qword [r12]
xor r9d, r9d
xor r8d, r8d
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rcx, qword [r12]
lea r9, [rbp + 0xc8]
mov r8d, 8
mov dword [rbp + 0xc8], r14d
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, r14d
mov rdi, r14
mov rcx, qword [r12]
lea rdx, [rsp + 0x70]
mov eax, ebx
lea r9, [rbp + 0xc8]
add rdx, rax
mov dword [rbp + 0xc8], r14d
mov r8d, 1
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [rsp + rdi + 0x70], 0
je 0x14004fc9d
inc ebx
inc rdi
cmp ebx, 0x100
jl 0x14004fc51
cmp byte [rsp + rdi + 0x70], 0
jne 0x14004fdd7
lea rax, [rsp + 0x70]
mov rdx, 0xffffffffffffffff
nop dword [rax]
cmp byte [rax + rdx + 1], 0
lea rdx, [rdx + 1]
jne 0x14004fcb0
mov rax, qword [rsp + 0x30]
mov ecx, eax
add rcx, r13
lea r13, [rdx + 9]
add r13, rcx
lea ecx, [rax - 1]
mov qword [rsp + 0x38], r13
cmp ecx, 0x1f9f
ja 0x14004fdcc
test byte [rsp + 0x34], 6
jne 0x14004fdcc
mov rax, qword [0x140140230]
test rax, rax
je 0x14004fdc9
mov r13, qword [rbp + 0xc0]
xor ebx, ebx
nop dword [rax]
nop dword [rax + rax]
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.140104fa4
test eax, eax
jne 0x14004fda6
mov rax, qword [rsp + 0x30]
test rsi, rsi
je 0x14004fd34
cmp r15d, eax
jae 0x14004fd66
mov r15d, 0x400
mov rdi, rsi
cmp eax, r15d
cmova r15d, eax
mov ecx, r15d
call fcn.1400b609c
mov rsi, rax
test rdi, rdi
je 0x14004fd5c
mov rcx, rdi
call fcn.1400b60a4
test rsi, rsi
je 0x14004fdc4
mov rax, qword [rsp + 0x30]
xor ecx, ecx
lea r9, [rbp + 0xc8]
mov dword [rbp + 0xc8], ecx
mov r8d, eax
mov qword [rsp + 0x20], rcx
mov rdx, rsi
mov rcx, qword [r12]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r9d, dword [rsp + 0x30]
lea rax, [0x140140230]
mov edx, dword [rbx + rax + 8]
lea rcx, [r13 + 0x58]
mov r8, rsi
call fcn.1400260d0
inc r14
lea rax, [0x140140230]
mov rbx, r14
shl rbx, 4
mov rax, qword [rbx + rax]
test rax, rax
jne 0x14004fd10
mov r13, qword [rsp + 0x38]
xor r14d, r14d
cmp r13, qword [rsp + 0x40]
jl 0x14004fc10
mov r13, qword [rbp + 0xb8]
test rsi, rsi
je 0x14004fdeb
mov rcx, rsi
call fcn.1400b60a4
movabs rdi, 0x5845474154455041
test dword [rsp + 0x5c], 0x20000000
mov r15, qword [rsp + 0x170]
mov rsi, qword [rsp + 0x1b0]
jne 0x14004fe5c
lea rbx, [r13 - 0x20]
test rbx, rbx
js 0x14004fe5c
mov rcx, qword [r12]
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rcx, qword [r12]
lea r9, [rbp + 0xb8]
mov r8d, 0x20
mov dword [rbp + 0xb8], r14d
lea rdx, [rsp + 0x48]
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp qword [rsp + 0x48], rdi
cmove r13, rbx
mov rax, r13
add rsp, 0x178
pop r14
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret