Function at 0x140021a50
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.14000bff0
nop
lea rdx, [rbp + 0x7f]
lea rcx, [rbp - 0x29]
call fcn.14000bff0
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.140019c10
nop
xor edx, edx
lea rcx, [rbp - 9]
call fcn.140019b20
nop
lea rdx, [rbp - 0x29]
lea rcx, [rbp - 9]
call fcn.1400103b0
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 0x140021b26
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 0x140021b59
mov eax, dword [rdx + 0x10]
cmp eax, 0xffffffff
je 0x140021b4f
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140021b59
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rbp + 0x7f]
add rdx, 0xffffffffffffffe8
mov eax, dword [rdx + 0x10]
cmp eax, 0x7ffffc17
je 0x140021b8c
mov eax, dword [rdx + 0x10]
cmp eax, 0xffffffff
je 0x140021b82
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140021b8c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov byte [rbp + 0x24], 1
lea rcx, [rbp - 9]
call fcn.1400460c0
test al, al
je 0x140021c70
cmp byte [rbp + 0x26], 0
jne 0x140021bb7
mov dl, 1
lea rcx, [rbp - 9]
call fcn.14001c070
mov rbx, rax
jmp 0x140021bd5
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 0x140021c0e
cmp rdx, rbx
jbe 0x140021bea
mov qword [rsi + 0x40], rbx
mov rdx, rbx
sub rbx, rdx
cmp byte [rbp + 0x26], 0
je 0x140021c0e
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 0x140021c25
cmp rbx, rax
jle 0x140021c25
mov rbx, rax
cmp byte [rsi + 0x38], 0
jne 0x140021c70
mov byte [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, r14
call fcn.140045f40
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 0x140021c62
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 0x140021c8e
mov rcx, qword [rbp + 0x2f]
cmp rcx, 0xffffffffffffffff
je 0x140021c8e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp + 0x2f], 0xffffffffffffffff
mov byte [rbp + 0x26], 0
lea rcx, [rbp - 9]
call fcn.140019ba0
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