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

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov rbp, r8
mov rsi, rdx
mov rbx, rcx
mov rdx, qword [rdx]
lea rcx, [0x01009530]
call fcn.01012d38
mov rdx, qword [rbp]
lea rcx, [0x01009578]
call fcn.01012d38
xor edi, edi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea r15d, [rdi + 1]
mov r8d, r15d
mov edx, 0x80000000
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x1015984
lea rcx, [0x010095c0]
call fcn.01012d38
nop
mov rcx, rsi
call fcn.01010940
nop
mov rcx, rbp
call fcn.01010940
xor eax, eax
jmp 0x1015bf6
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r13d, eax
cmp eax, 0xffffffff
jne 0x10159c5
lea rcx, [0x01009610]
call fcn.01012d38
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, rsi
call fcn.01010940
nop
mov rcx, rbp
call fcn.01010940
xor eax, eax
jmp 0x1015bf6
mov rcx, qword [rbx + 0x48]
cmp rcx, rdi
je 0x10159df
call fcn.01029de4
mov qword [rbx + 0x48], rdi
mov qword [rbx + 0x50], rdi
mov qword [rbx + 0x58], rdi
lea eax, [r13 + 1]
mov r14d, eax
mov ecx, eax
call fcn.01029e1c
mov qword [rbx + 0x48], rax
cmp rax, rdi
jne 0x1015a24
lea rcx, [0x01009660]
call fcn.01012d38
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, rsi
call fcn.01010940
nop
mov rcx, rbp
call fcn.01010940
xor eax, eax
jmp 0x1015bf6
mov r8, r14
xor edx, edx
mov rcx, rax
call fcn.01035300
mov dword [rsp + 0x40], edi
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x40]
mov r8d, r13d
mov rdx, qword [rbx + 0x48]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, edi
jne 0x1015a8d
lea rcx, [0x010096b0]
call fcn.01012d38
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x48]
call fcn.01029de4
mov qword [rbx + 0x48], rdi
mov rcx, rsi
call fcn.01010940
nop
mov rcx, rbp
call fcn.01010940
xor eax, eax
jmp 0x1015bf6
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x40], r13d
je 0x1015ace
lea rcx, [0x01009700]
call fcn.01012d38
mov rcx, qword [rbx + 0x48]
call fcn.01029de4
mov qword [rbx + 0x48], rdi
mov rcx, rsi
call fcn.01010940
nop
mov rcx, rbp
call fcn.01010940
xor eax, eax
jmp 0x1015bf6
mov rax, qword [rbx + 0x48]
mov qword [rbx + 0x50], rax
mov qword [rbx + 0x58], rax
mov rax, qword [rbp]
cmp qword [rax - 0x10], rdi
jne 0x1015b0e
lea rdx, [0x01009744]
lea rcx, [rsp + 0xb8]
call fcn.010109f8
xor r8d, r8d
mov rdx, rax
mov rcx, rbx
call fcn.01015f44
mov r12d, eax
jmp 0x1015ba2
mov rax, qword [0x01046880]
mov qword [rsp + 0x48], rax
mov eax, 0x5b
mov word [rsp + 0xb8], ax
lea r8, [rsp + 0xb8]
mov rdx, r15
lea rcx, [rsp + 0x48]
call fcn.01010a70
mov rdx, qword [rbp]
mov r8, rdx
mov rdx, qword [rdx - 0x10]
lea rcx, [rsp + 0x48]
call fcn.01010dac
mov r11d, 0x5d
mov word [rsp + 0xb8], r11w
lea r8, [rsp + 0xb8]
mov rdx, r15
lea rcx, [rsp + 0x48]
call fcn.01010dac
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0xb8]
call fcn.0101074c
xor r8d, r8d
mov rdx, rax
mov rcx, rbx
call fcn.01015f44
mov r12d, eax
lea rcx, [rsp + 0x48]
call fcn.01010940
cmp r12d, edi
jne 0x1015bd3
lea rcx, [0x01009750]
call fcn.01012d38
mov rcx, qword [rbx + 0x48]
call fcn.01029de4
mov qword [rbx + 0x48], rdi
mov qword [rbx + 0x50], rdi
mov qword [rbx + 0x58], rdi
mov rcx, rsi
call fcn.01010940
nop
jmp 0x1015bec
lea rcx, [0x010097a8]
call fcn.01012d38
nop
mov rcx, rsi
call fcn.01010940
nop
mov edi, r15d
mov rcx, rbp
call fcn.01010940
mov eax, edi
mov rbx, qword [rsp + 0xa0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret