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

Disassembly:
push rbp
push rsi
push rbx
mov byte [rsp - 0x210], 0
mov byte [rsp - 0x1210], 0
mov byte [rsp - 0x2210], 0
sub rsp, 0x2210
mov rbp, rsp
mov qword [rbp + 0x48], rcx
mov byte [rbp + 0x57], r8b
mov qword [rbp + 0x58], 0
mov qword [rbp + 0x2238], rdx
mov rcx, qword [rbp + 0x2238]
call fcn.0040b1f0
nop
mov rcx, qword [rbp + 0x48]
call fcn.0040b060
xor rsi, rsi
mov ebx, 0x8003
movzx rax, byte [rbp + 0x57]
sub al, 1
test al, al
je 0x51ba8e
sub al, 1
test al, al
je 0x51ba96
sub al, 1
test al, al
je 0x51ba9e
sub al, 1
test al, al
jne 0x51bae3
jmp 0x51baa6
mov ebx, 0x8003
jmp 0x51bae3
mov ebx, 0x8004
jmp 0x51bae3
mov ebx, 0x800c
jmp 0x51bae3
mov dword [rbp + 0x68], 0
mov rcx, qword [rbp + 0x2238]
lea rdx, [rbp + 0x68]
xor r8, r8
xor r9, r9
call fcn.0051b7e0
test al, al
je 0x51bddd
mov rcx, qword [rbp + 0x48]
mov edx, dword [rbp + 0x68]
mov r8d, 8
call fcn.004242c0
jmp 0x51bddd
lea rcx, [rbp + 0x2200]
xor rdx, rdx
xor r8, r8
mov r9d, 0x18
mov dword [rsp + 0x20], 0xf0000000
mov rax, qword [0x00637490]
call qword [rax]
test eax, eax
je 0x51bddc
mov rcx, qword [rbp + 0x2200]
mov edx, ebx
xor r8, r8
xor r9, r9
lea rax, [rbp + 0x21f8]
mov qword [rsp + 0x20], rax
mov rax, qword [0x006372a0]
call qword [rax]
test eax, eax
je 0x51bdc9
mov rcx, qword [rbp + 0x2238]
call fcn.0040c450
mov rcx, rax
mov edx, 0x80000000
mov r8d, 1
xor r9, r9
mov dword [rsp + 0x20], 3
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x30], 0
call sub.KERNEL32.DLL_CreateFileW
mov rbx, rax
cmp rbx, 0xffffffffffffffff
je 0x51bcad
mov rcx, rbx
lea rdx, [rbp + 0x2208]
call sub.KERNEL32.DLL_GetFileSizeEx
test al, al
je 0x51bca5
xor rsi, rsi
jmp 0x51bc97
mov rax, qword [rbp + 0x2208]
mov rcx, rsi
neg rcx
lea rcx, [rax + rcx]
mov edx, 0x2000
call fcn.0051b7d0
mov dword [rbp + 0x1f4], eax
lea rcx, [rbp + 0x1f8]
mov edx, 0x2000
xor r8, r8
call fcn.00407510
cmp dword [rbp + 0x1f4], 0x2000
jbe 0x51bc1c
mov dword [rbp + 0x1f4], 0x2000
mov eax, dword [rbp + 0x1f4]
mov rcx, qword [rbp + 0x2208]
mov rdx, rsi
neg rdx
lea rcx, [rcx + rdx]
cmp rax, rcx
jle 0x51bc1c
mov eax, dword [rbp + 0x2208]
sub eax, esi
mov dword [rbp + 0x1f4], eax
mov rcx, rbx
mov rdx, rsi
xor r8, r8
xor r9, r9
call sub.KERNEL32.DLL_SetFilePointerEx
test eax, eax
je 0x51bc8e
mov rcx, rbx
lea rdx, [rbp + 0x1f8]
mov r8d, dword [rbp + 0x1f4]
lea r9, [rbp + 0x1f0]
mov qword [rsp + 0x20], 0
call sub.KERNEL32.DLL_ReadFile
test eax, eax
je 0x51bc8e
mov eax, dword [rbp + 0x1f4]
cmp eax, dword [rbp + 0x1f0]
jne 0x51bc8e
mov rcx, qword [rbp + 0x21f8]
lea rdx, [rbp + 0x1f8]
mov r8d, dword [rbp + 0x1f4]
xor r9, r9
mov rax, qword [0x00637750]
call qword [rax]
test eax, eax
je 0x51bca4
mov eax, dword [rbp + 0x1f4]
add rsi, rax
cmp rsi, qword [rbp + 0x2208]
jl 0x51bba5
nop
mov rcx, rbx
call sub.KERNEL32.DLL_CloseHandle
cmp rsi, qword [rbp + 0x2208]
jne 0x51bdb9
mov dword [rbp + 0x1f4], 4
mov dword [rbp + 0x16c], 0
mov rcx, qword [rbp + 0x21f8]
mov edx, 4
lea r8, [rbp + 0x16c]
lea r9, [rbp + 0x1f4]
mov dword [rsp + 0x20], 0
mov rax, qword [0x006378a8]
call qword [rax]
test eax, eax
je 0x51bdb9
lea rcx, [rbp + 0x170]
mov edx, 0x80
xor r8, r8
call fcn.00407510
mov rcx, qword [rbp + 0x21f8]
mov edx, 2
lea r8, [rbp + 0x170]
lea r9, [rbp + 0x16c]
mov dword [rsp + 0x20], 0
add byte [rax - 0x75], cl
add eax, 0x11bb67