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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], r9
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0x90
mov r14, r8
mov rsi, rcx
xor r15d, r15d
xor dil, dil
lea rcx, [rbp + 0x7f]
call fcn.14000a560
nop
lea rdx, [rbp + 0x7f]
lea rcx, [rbp - 0x29]
call fcn.14000a560
nop
lea rbx, vtable.JRPropertyMap.0
mov qword [rbp - 0x21], rbx
mov qword [rbp - 0x19], r15
mov byte [rbp - 0x11], 1
xor edx, edx
lea rcx, [rbp - 0x29]
call fcn.14004d810
nop
lea rax, [rbp - 9]
mov qword [rbp + 0x6f], rax
xor edx, edx
lea rcx, [rbp - 9]
call fcn.14000a4d0
nop
mov qword [rbp - 1], rbx
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], 1
xor edx, edx
lea rcx, [rbp - 9]
call fcn.14004d810
nop
lea rdx, [rbp - 0x29]
lea rcx, [rbp - 9]
call fcn.140037020
lea rdx, [rbp - 0x21]
lea rcx, [rbp - 1]
mov rax, qword [rbp - 1]
call qword [rax + 0x80]
movzx eax, byte [rbp - 0x11]
mov byte [rbp + 0xf], al
mov r12d, 1
mov dword [rbp + 0x17], r12d
mov dword [rbp + 0x1b], 3
mov qword [rbp + 0x1f], 3
mov byte [rbp + 0x27], dil
mov qword [rbp + 0x2f], 0xffffffffffffffff
mov qword [rbp - 0x21], rbx
mov rcx, qword [rbp - 0x19]
test rcx, rcx
je 0x140059de6
mov rax, qword [rcx]
mov edx, r12d
call qword [rax]
mov qword [rbp - 0x19], r15
mov rdx, qword [rbp - 0x29]
add rdx, 0xffffffffffffffe8
mov eax, dword [rdx + 0x10]
cmp eax, 0x7ffffc17
je 0x140059e19
mov eax, dword [rdx + 0x10]
cmp eax, 0xffffffff
je 0x140059e0f
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140059e19
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbp + 0x7f]
add rdx, 0xffffffffffffffe8
mov eax, dword [rdx + 0x10]
cmp eax, 0x7ffffc17
je 0x140059e4c
mov eax, dword [rdx + 0x10]
cmp eax, 0xffffffff
je 0x140059e42
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140059e4c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov byte [rbp + 0x24], 1
lea rcx, [rbp - 9]
call fcn.140056b10
test al, al
je 0x140059f30
cmp byte [rbp + 0x26], 0
jne 0x140059e77
mov dl, 1
lea rcx, [rbp - 9]
call fcn.14004fa60
mov rbx, rax
jmp 0x140059e95
mov dword [rbp + 0x7f], r15d
lea rdx, [rbp + 0x7f]
mov rcx, qword [rbp + 0x2f]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, dword [rbp + 0x7f]
shl rbx, 0x20
mov eax, eax
add rbx, rax
mov rdx, qword [rsi + 0x40]
test rdx, rdx
je 0x140059ece
cmp rdx, rbx
jbe 0x140059eaa
mov qword [rsi + 0x40], rbx
mov rdx, rbx
sub rbx, rdx
cmp byte [rbp + 0x26], 0
je 0x140059ece
mov rax, rdx
shr rax, 0x20
mov dword [rbp + 0x7f], eax
xor r9d, r9d
lea r8, [rbp + 0x7f]
mov rcx, qword [rbp + 0x2f]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rax, qword [rsi + 0x30]
test rax, rax
jle 0x140059ee5
cmp rbx, rax
jle 0x140059ee5
mov rbx, rax
cmp byte [rsi + 0x38], 0
jne 0x140059f30
mov byte [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, r14
call fcn.1400561b0
mov dword [rbp + 0x6f], r15d
mov qword [rsp + 0x20], r15
lea r9, [rbp + 0x6f]
mov r8d, ebx
mov rdx, rax
mov rcx, qword [rbp + 0x2f]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140059f22
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [rbp + 0x6f]
movzx edi, dil
cmp rax, rbx
cmove edi, r12d
cmp byte [rbp + 0x26], 0
je 0x140059f4e
mov rcx, qword [rbp + 0x2f]
cmp rcx, 0xffffffffffffffff
je 0x140059f4e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp + 0x2f], 0xffffffffffffffff
mov byte [rbp + 0x26], 0
lea rcx, [rbp - 9]
call fcn.14004d7a0
movzx eax, dil
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret