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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov qword [rax + 0x10], rdx
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
xor esi, esi
xor r15d, r15d
mov r12, r9
and dword [rbp - 0x10], esi
and dword [rbp - 0xc], esi
mov r13, r8
xor ebx, ebx
mov r14, rcx
mov rcx, qword [str.___t_]
lea rax, str.___t_
lea edi, [rsi + 4]
cmp rcx, rax
je 0x14004a590
test byte [rcx + 0x1c], dil
je 0x14004a590
cmp byte [rcx + 0x19], 5
jb 0x14004a590
mov rcx, qword [rcx + 0x10]
lea r8, [0x140003b68]
mov edx, 0x139
call fcn.14000e618
xor r9d, r9d
xor r8d, r8d
mov edx, edi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x14004a5e3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [str.___t_]
lea rax, str.___t_
cmp rcx, rax
je 0x14004a8e1
test byte [rcx + 0x1c], dil
je 0x14004a8e1
cmp byte [rcx + 0x19], 2
jb 0x14004a8e1
mov edx, 0x13a
jmp 0x14004a87d
and qword [rsp + 0x20], rbx
lea r9, [rbp - 0xc]
lea rdx, [rbp - 0x10]
mov r8d, edi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14004a63d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [str.___t_]
lea rax, str.___t_
cmp rcx, rax
je 0x14004a8e1
test byte [rcx + 0x1c], dil
je 0x14004a8e1
cmp byte [rcx + 0x19], 2
jb 0x14004a8e1
mov edx, 0x13b
jmp 0x14004a87d
cmp dword [rbp - 0xc], edi
je 0x14004a690
mov r9d, 0x26
mov ebx, r9d
mov rcx, qword [str.___t_]
lea rax, str.___t_
cmp rcx, rax
je 0x14004a8ff
test byte [rcx + 0x1c], dil
je 0x14004a8ff
cmp byte [rcx + 0x19], 2
jb 0x14004a8ff
mov edx, 0x13c
mov rcx, qword [rcx + 0x10]
lea r8, [0x140003b68]
call fcn.14000e63c
jmp 0x14004a8ff
mov ecx, dword [rbp - 0x10]
call fcn.140072274
mov rsi, rax
test rax, rax
jne 0x14004a6d9
lea ebx, [rax + 8]
mov rcx, qword [str.___t_]
lea rax, str.___t_
cmp rcx, rax
je 0x14004a8ff
test byte [rcx + 0x1c], dil
je 0x14004a8ff
cmp byte [rcx + 0x19], 2
jb 0x14004a8ff
mov r9d, dword [rbp - 0x10]
mov edx, 0x13d
jmp 0x14004a67b
mov r8d, dword [rbp - 0x10]
and qword [rsp + 0x20], rbx
lea r9, [rbp - 0xc]
mov rdx, rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14004a733
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [str.___t_]
lea rax, str.___t_
cmp rcx, rax
je 0x14004a8e1
test byte [rcx + 0x1c], dil
je 0x14004a8e1
cmp byte [rcx + 0x19], 2
jb 0x14004a8e1
mov edx, 0x13e
jmp 0x14004a87d
mov eax, dword [rbp - 0xc]
cmp dword [rbp - 0x10], eax
je 0x14004a789
mov r9d, 0x26
mov ebx, r9d
mov rcx, qword [str.___t_]
lea rax, str.___t_
cmp rcx, rax
je 0x14004a8e5
test byte [rcx + 0x1c], dil
je 0x14004a8e5
cmp byte [rcx + 0x19], 2
jb 0x14004a8e5
mov edx, 0x13f
mov rcx, qword [rcx + 0x10]
lea r8, [0x140003b68]
call fcn.14000e63c
jmp 0x14004a8e5
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp eax, 0xffffffff
jne 0x14004a7d8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [str.___t_]
lea rax, str.___t_
cmp rcx, rax
je 0x14004a8e1
test byte [rcx + 0x1c], 4
je 0x14004a8e1
cmp byte [rcx + 0x19], 2
jb 0x14004a8e1
mov edx, 0x140
jmp 0x14004a87d
sub edi, dword [rbp - 0x10]
sub edi, 8
mov ecx, edi
call fcn.140072274
mov r15, rax
test rax, rax
jne 0x14004a835
lea ebx, [rax + 8]
mov rcx, qword [str.___t_]
lea rax, str.___t_
cmp rcx, rax
je 0x14004a8e5
test byte [rcx + 0x1c], 4
je 0x14004a8e5
cmp byte [rcx + 0x19], 2
jb 0x14004a8e5
mov rcx, qword [rcx + 0x10]
lea r8, [0x140003b68]
mov edx, 0x141
call fcn.14000e618
jmp 0x14004a8e5
and qword [rsp + 0x20], rbx
lea r9, [rbp - 0xc]
mov r8d, edi
mov rdx, rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14004a892
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [str.___t_]
lea rax, str.___t_
cmp rcx, rax
je 0x14004a8e1
test byte [rcx + 0x1c], 4
je 0x14004a8e1
cmp byte [rcx + 0x19], 2
jb 0x14004a8e1
mov edx, 0x142
mov rcx, qword [rcx + 0x10]
lea r8, [0x140003b68]
mov r9d, ebx
call fcn.14000e63c
jmp 0x14004a8e1
cmp edi, dword [rbp - 0xc]
je 0x14004a8c9
mov r9d, 0x26
mov ebx, r9d
mov rcx, qword [str.___t_]
lea rax, str.___t_
cmp rcx, rax
je 0x14004a8e5
test byte [rcx + 0x1c], 4
je 0x14004a8e5
cmp byte [rcx + 0x19], 2
jb 0x14004a8e5
mov edx, 0x143
jmp 0x14004a774
mov rax, qword [rbp + 0x38]
mov qword [r12], r15
mov qword [rax], rsi
mov eax, dword [rbp - 0x10]
mov dword [r13], eax
mov rax, qword [rbp + 0x50]
mov dword [rax], edi
test ebx, ebx
je 0x14004a8ff
test rsi, rsi
je 0x14004a8f2
mov rcx, rsi
call fcn.140072328
test r15, r15
je 0x14004a8ff
mov rcx, r15
call fcn.140072328
lea r11, [rsp + 0x40]
mov eax, ebx
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret