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

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x80]
sub rsp, 0x180
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
movaps xmmword [rax - 0x48], xmm6
mov rax, qword [0x180106010]
xor rax, rsp
mov qword [rbp + 0x68], rax
mov r14, rdx
mov r13, rcx
xor r15d, r15d
mov byte [rcx + 0x10], r15b
lea rsi, [rcx + 0x18]
mov rcx, rsi
call fcn.180005c20
mov rdi, qword [rax + 8]
call fcn.180005c20
sub rdi, qword [rax]
sar rdi, 4
test rdi, rdi
je 0x1800594e3
call fcn.180005c20
mov rsi, rax
mov ebx, r15d
mov rcx, qword [rsi]
mov rcx, qword [rbx + rcx]
mov rcx, qword [rcx + 8]
mov rcx, qword [rcx]
call fcn.180088ea0
lea rbx, [rbx + 0x10]
sub rdi, 1
jne 0x1800594c2
lea rsi, [r13 + 0x18]
mov ecx, 8
call fcn.180086a58
mov qword [rsp + 0x38], rax
mov qword [rax], 0xffffffffffffffff
mov qword [rbp - 8], rax
mov r9d, 0x80
lea r8d, [r9 - 0x7d]
mov rdx, r14
lea rcx, [rbp - 8]
call fcn.1800598e0
test al, al
jne 0x180059564
lea rcx, [rbp + 8]
call fcn.18006b050
nop
cmp qword [r13 + 8], 0
je 0x180059552
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
lea rdx, [rbp + 8]
lea rcx, [rsp + 0x50]
call fcn.180006d90
nop
mov rcx, qword [r13 + 8]
mov r9, qword [rcx]
mov r8, rax
xor edx, edx
call qword [r9 + 8]
nop
lea rcx, [rbp + 8]
call fcn.180005bf4
mov rbx, qword [rbp - 8]
jmp 0x18005982e
mov rbx, qword [rbp - 8]
test rbx, rbx
je 0x1800597ec
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x1800597ec
lea rdx, [rbp]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp eax, 0xffffffff
jne 0x18005959d
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1800597ec
mov r12d, dword [rbp]
shl r12, 0x20
mov rax, rdi
add r12, rdi
mov qword [rsp + 0x38], r12
je 0x1800597ec
mov byte [rsp + 0x30], 1
xor edi, edi
mov dword [rbp - 0x10], edi
mov r14d, edi
mov ecx, 0x10000
call fcn.180086e04
mov r15, rax
movsd xmm6, qword [0x1800d8b08]
nop dword [rax + rax]
test r15, r15
je 0x180059727
cmp qword [rbx], 0xffffffffffffffff
je 0x180059741
mov dword [rbp - 0x10], edi
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x10]
mov r8d, 0x10000
mov rdx, r15
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180059727
movzx eax, byte [r13 + 0x10]
test al, al
jne 0x1800596da
mov edi, dword [rbp - 0x10]
test edi, edi
je 0x1800596d6
mov rcx, rsi
call fcn.180005c20
mov rdx, rax
call fcn.180005c20
mov rsi, qword [rdx + 8]
sub rsi, qword [rax]
sar rsi, 4
test rsi, rsi
je 0x18005968b
xor ebx, ebx
test edi, edi
je 0x180059679
mov r8, rdi
lea rcx, [r13 + 0x18]
call fcn.180005c20
mov rcx, qword [rax]
mov rax, qword [rcx + rbx]
mov rcx, qword [rax + 8]
mov rdx, r15
mov rcx, qword [rcx]
call fcn.180088ef0
add rbx, 0x10
sub rsi, 1
jne 0x180059653
mov edi, dword [rbp - 0x10]
mov r12, qword [rsp + 0x38]
mov eax, edi
add r14, rax
mov rcx, qword [r13 + 8]
test rcx, rcx
je 0x1800596c4
mov rax, qword [rcx]
xorps xmm1, xmm1
cvtsi2sd xmm1, r14
test r14, r14
jns 0x1800596ad
addsd xmm1, xmm6
xorps xmm0, xmm0
cvtsi2sd xmm0, r12
test r12, r12
jns 0x1800596be
addsd xmm0, xmm6
divsd xmm1, xmm0
call qword [rax]
xor edi, edi
mov dword [rbp - 0x10], edi
mov rbx, qword [rbp - 8]
lea rsi, [r13 + 0x18]
jmp 0x1800595e0
xor edi, edi
jmp 0x180059723
lea rcx, [rbp + 0x28]
call fcn.180005bfc
nop
cmp qword [r13 + 8], 0
je 0x180059714
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
lea rdx, [rbp + 0x28]
lea rcx, [rsp + 0x70]
call fcn.180006d90
nop
mov rcx, qword [r13 + 8]
mov r9, qword [rcx]
mov r8, rax
xor edx, edx
call qword [r9 + 8]
xor al, al
mov byte [rsp + 0x30], al
lea rcx, [rbp + 0x28]
call fcn.180005bf4
mov rbx, qword [rbp - 8]
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x180059741
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x180059741
mov qword [rbx], 0xffffffffffffffff
mov rcx, r15
call fcn.1800862a4
mov rcx, rsi
call fcn.180005c20
mov rdx, rax
call fcn.180005c20
mov rsi, qword [rdx + 8]
sub rsi, qword [rax]
sar rsi, 4
test rsi, rsi
je 0x1800597a1
lea rcx, [r13 + 0x18]
call fcn.180005c20
mov r14, rax
nop word [rax + rax]
mov rcx, qword [r14]
mov rcx, qword [rdi + rcx]
mov rdx, qword [rcx + 8]
lea rcx, [rdx + 8]
mov rdx, qword [rdx]
call fcn.180088d30
add rdi, 0x10
sub rsi, 1
jne 0x180059780
lea rcx, [rbp - 0x50]
call fcn.180005bfc
nop
cmp qword [r13 + 8], 0
je 0x1800597d9
lea rcx, [rbp - 0x70]
mov qword [rsp + 0x38], rcx
mov rdx, rax
lea rcx, [rbp - 0x70]
call fcn.180006d90
nop
mov rcx, qword [r13 + 8]
mov r9, qword [rcx]
mov r8, rax
mov dl, 1
call qword [r9 + 8]
nop
lea rcx, [rbp - 0x50]
call fcn.180005bf4
movzx edi, byte [rsp + 0x30]
xor r15d, r15d
jmp 0x180059831
lea rcx, [rbp + 0x48]
call fcn.180005bfc
nop
cmp qword [r13 + 8], 0
je 0x180059825
lea rax, [rbp - 0x30]
mov qword [rsp + 0x38], rax
lea rdx, [rbp + 0x48]
lea rcx, [rbp - 0x30]
call fcn.180006d90
nop
mov rcx, qword [r13 + 8]
mov r9, qword [rcx]
mov r8, rax
xor edx, edx
call qword [r9 + 8]
nop
lea rcx, [rbp + 0x48]
call fcn.180005bf4
xor dil, dil
test rbx, rbx
je 0x18005985d
mov rcx, qword [rbx]
lea r8, [rcx - 1]
cmp r8, 0xfffffffffffffffd
ja 0x18005984c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], r15
mov edx, 8
mov rcx, rbx
call fcn.1800862a4
mov qword [rbp - 8], r15
movzx eax, dil
mov rcx, qword [rbp + 0x68]
xor rcx, rsp
call fcn.180086280
mov rbx, qword [rsp + 0x1d0]
movaps xmm6, xmmword [rsp + 0x170]
add rsp, 0x180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret