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

Disassembly:
push rbp
push rdi
push rsi
sub rsp, 0x9a0
mov rbp, rsp
mov rsi, rcx
mov qword [rbp + 0x50], 0
mov qword [rbp + 0x48], 0
mov qword [rbp + 0x40], 0
mov qword [rbp + 0x60], 0
mov qword [rbp + 0x58], 0
mov qword [rbp + 0x70], 0
mov qword [rbp + 0x68], 0
mov qword [rbp + 0x88], 0
mov qword [rbp + 0x80], 0
mov qword [rbp + 0x78], 0
mov qword [rbp + 0x98], 0
mov qword [rbp + 0x90], 0
mov qword [rbp + 0xa8], 0
mov qword [rbp + 0xa0], 0
mov qword [rbp + 0xb8], 0
mov qword [rbp + 0xb0], 0
mov qword [rbp + 0xd0], 0
mov qword [rbp + 0xc8], 0
mov qword [rbp + 0xc0], 0
mov qword [rbp + 0xd8], rbp
lea rdi, [rbp + 0x168]
mov ecx, 0x105
rep movsq qword [rdi], qword [rsi]
nop
lea rcx, [rbp + 0x57c]
mov edx, 0x80000000
mov r8d, 1
xor r9, r9
mov dword [rsp + 0x20], 3
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x30], 0
call sub.kernel32.dll_CreateFileW_1
mov qword [rbp + 0x990], rax
cmp qword [rbp + 0x990], 0xffffffffffffffff
jne 0x65160f
call sub.kernel32.dll_GetLastError_2
mov dword [rbp + 0x154], eax
lea rcx, [rbp + 0xc8]
lea rdx, [rbp + 0x57c]
mov r8d, 0x105
call fcn.0040ffb0
lea rcx, [rbp + 0xc0]
mov edx, dword [rbp + 0x154]
call fcn.00435d20
lea rcx, [rbp + 0xd0]
mov edx, 4
lea r8, [0x00651bd4]
mov r9, qword [rbp + 0xc8]
lea rax, [0x00651c34]
mov qword [rsp + 0x20], rax
mov rax, qword [rbp + 0xc0]
mov qword [rsp + 0x28], rax
call fcn.00410420
mov cx, 1
mov rdx, qword [rbp + 0xd0]
call fcn.0047cfa0
jmp 0x651b1c
nop
mov rcx, qword [rbp + 0x990]
xor rdx, rdx
call sub.kernel32.dll_GetFileSize_1
mov dword [rbp + 0x15c], eax
cmp dword [rbp + 0x15c], 0x11
jae 0x651642
xor rcx, rcx
mov rdx, qword [rbp + 0xd8]
call fcn.00651b70
jmp 0x651b1c
mov ecx, 0x11
call fcn.00405da0
mov qword [rbp + 0x998], rax
nop
mov rcx, qword [rbp + 0x998]
mov edx, 0x11
xor r8, r8
call fcn.00408d50
mov rcx, qword [rbp + 0x990]
xor rdx, rdx
xor r8, r8
xor r9, r9
call sub.kernel32.dll_SetFilePointer_1
cmp eax, 0xffffffff
jne 0x6516ee
call sub.kernel32.dll_GetLastError_2
mov dword [rbp + 0x154], eax
lea rcx, [rbp + 0xb0]
mov edx, dword [rbp + 0x154]
call fcn.00435d20
lea rcx, [rbp + 0xb8]
lea rdx, [0x00651c48]
mov r8, qword [rbp + 0xb0]
call fcn.004102f0
mov cx, 1
mov rdx, qword [rbp + 0xb8]
call fcn.0047cfa0
xor rcx, rcx
mov rdx, qword [rbp + 0xd8]
call fcn.00651b40
xor rcx, rcx
mov rdx, qword [rbp + 0xd8]
call fcn.00651b70
jmp 0x651b1c
mov rcx, qword [rbp + 0x990]
mov rdx, qword [rbp + 0x998]
mov r8d, 0x11
lea r9, [rbp + 0x164]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_ReadFile_1
test eax, eax
setne al
test al, al
jne 0x65178b
call sub.kernel32.dll_GetLastError_2
mov dword [rbp + 0x154], eax
lea rcx, [rbp + 0xa0]
mov edx, dword [rbp + 0x154]
call fcn.00435d20
lea rcx, [rbp + 0xa8]
lea rdx, [0x00651ca4]
mov r8, qword [rbp + 0xa0]
call fcn.004102f0
mov cx, 1
mov rdx, qword [rbp + 0xa8]
call fcn.0047cfa0
xor rcx, rcx
mov rdx, qword [rbp + 0xd8]
call fcn.00651b40
xor rcx, rcx
mov rdx, qword [rbp + 0xd8]
call fcn.00651b70
jmp 0x651b1c
cmp dword [rbp + 0x164], 0x11
je 0x6517f3
lea rcx, [rbp + 0x90]
mov edx, dword [rbp + 0x164]
call fcn.0042bdf0
lea rcx, [rbp + 0x98]
lea rdx, [0x00651cf4]
mov r8, qword [rbp + 0x90]
call fcn.004102f0
mov cx, 1
mov rdx, qword [rbp + 0x98]
call fcn.0047cfa0
xor rcx, rcx
mov rdx, qword [rbp + 0xd8]
call fcn.00651b40
xor rcx, rcx
mov rdx, qword [rbp + 0xd8]
call fcn.00651b70
jmp 0x651b1c
mov rax, qword [rbp + 0x998]
cmp dword [rax], 0x10000
je 0x651825
xor rcx, rcx
mov rdx, qword [rbp + 0xd8]
call fcn.00651b40
xor rcx, rcx
mov rdx, qword [rbp + 0xd8]
call fcn.00651b70
jmp 0x651b1c
mov rax, qword [rbp + 0x998]
mov eax, dword [rax + 4]
mov dword [rbp + 0x158], eax
nop
mov rcx, qword [rbp + 0x998]
call fcn.00405dd0
mov eax, dword [rbp + 0x158]
mov dword [rbp + 0x160], eax
mov eax, dword [rbp + 0x160]
add eax, 8
cmp dword [rbp + 0x15c], eax
ja 0x651873
xor rcx, rcx
mov rdx, qword [rbp + 0xd8]
call fcn.00651b70
jmp 0x651b1c
mov rcx, qword [rbp + 0x990]
mov edx, dword [rbp + 0x160]
xor r8, r8
xor r9, r9
call sub.kernel32.dll_SetFilePointer_1
cmp eax, 0xffffffff
jne 0x651919
call sub.kernel32.dll_GetLastError_2
mov dword [rbp + 0x154], eax
lea rcx, [rbp + 0x80]
mov edx, dword [rbp + 0x160]
call fcn.0042bdf0
lea rcx, [rbp + 0x78]
mov edx, dword [rbp + 0x154]
call fcn.00435d20
lea rcx, [rbp + 0x88]
mov edx, 4
lea r8, [0x00651d48]
mov r9, qword [rbp + 0x80]
lea rax, [0x00651c34]
mov qword [rsp + 0x20], rax
mov rax, qword [rbp + 0x78]
mov qword [rsp + 0x28], rax
call fcn.00410420
mov cx, 1
mov rdx, qword [rbp + 0x88]
call fcn.0047cfa0
xor rcx, rcx
mov rdx, qword [rbp + 0xd8]
call fcn.00651b70
jmp 0x651b1c
mov rcx, qword [rbp + 0x990]
lea rdx, [rbp + 0xe8]
mov r8d, 8
lea r9, [rbp + 0x164]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_ReadFile_1
test eax, eax
setne al
test al, al
jne 0x65199b
call sub.kernel32.dll_GetLastError_2
mov dword [rbp + 0x154], eax
lea rcx, [rbp + 0x68]
mov edx, dword [rbp + 0x154]
call fcn.00435d20
lea rcx, [rbp + 0x70]
lea rdx, [0x00651db0]
mov r8, qword [rbp + 0x68]
call fcn.004102f0
mov cx, 1
mov rdx, qword [rbp + 0x70]
call fcn.0047cfa0
xor rcx, rcx
mov rdx, qword [rbp + 0xd8]
call fcn.00651b70
jmp 0x651b1c
cmp dword [rbp + 0x164], 8
je 0x6519fa
lea rcx, [rbp + 0x58]
mov edx, dword [rbp + 0x164]
call fcn.0042bdf0
lea rcx, [rbp + 0x60]
mov edx, 3
lea r8, [0x00651e00]
mov r9, qword [rbp + 0x58]
lea rax, [0x00651e54]
mov qword [rsp + 0x20], rax
call fcn.00410420
mov cx, 1
mov rdx, qword [rbp + 0x60]
call fcn.0047cfa0
xor rcx, rcx
mov rdx, qword [rbp + 0xd8]
call fcn.00651b70
jmp 0x651b1c
mov eax, dword [rbp + 0x160]
add eax, dword [rbp + 0xec]
add eax, 8
cmp dword [rbp + 0x15c], eax
jae 0x651a25
xor rcx, rcx
mov rdx, qword [rbp + 0xd8]
call fcn.00651b70
jmp 0x651b1c
cmp dword [rbp + 0xe8], 1
je 0x651a3b
cmp dword [rbp + 0xe8], 0xc
jne 0x651af4
mov rcx, qword [rbp + 0x990]
mov edx, dword [rbp + 0x160]
add edx, 8
xor r8, r8
xor r9, r9
call sub.kernel32.dll_SetFilePointer_1
cmp eax, 0xffffffff
jne 0x651ad1
call sub.kernel32.dll_GetLastError_2
mov dword [rbp + 0x154], eax
lea rcx, [rbp + 0x48]
mov edx, dword [rbp + 0x160]
call fcn.0042bdf0
lea rcx, [rbp + 0x40]
mov edx, dword [rbp + 0x154]
call fcn.00435d20
lea rcx, [rbp + 0x50]
mov edx, 4
lea r8, [0x00651e68]
mov r9, qword [rbp + 0x48]
lea rax, [0x00651c34]
mov qword [rsp + 0x20], rax
mov rax, qword [rbp + 0x40]
mov qword [rsp + 0x28], rax
call fcn.00410420
mov cx, 1
mov rdx, qword [rbp + 0x50]
call fcn.0047cfa0
xor rcx, rcx
mov rdx, qword [rbp + 0xd8]
call fcn.00651b70
jmp 0x651b1c
cmp dword [rbp + 0xec], 0x6c
jbe 0x651af4
lea rcx, [rbp + 0x168]
mov rdx, qword [rbp + 0x990]
mov r8d, dword [rbp + 0xec]
call fcn.00651070
mov eax, dword [rbp + 0x160]
add eax, dword [rbp + 0xec]
add eax, 8
mov dword [rbp + 0x160], eax
jmp 0x65184e
lea rcx, [rbp + 0x40]
mov edx, 0x13
call fcn.0040e160
lea rsp, [rbp + 0x9a0]
pop rsi
pop rdi
pop rbp
ret