Function at 0x180023550
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, [rax - 0x5f]
sub rsp, 0x100
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
movaps xmmword [rax - 0x48], xmm6
mov rax, qword [0x18008d0c0]
xor rax, rsp
mov qword [rbp + 7], rax
mov rbx, rdx
mov rdi, rcx
xor r13d, r13d
mov byte [rcx + 0x10], r13b
mov rax, qword [rcx]
call qword [rax]
mov qword [rbp - 0x69], r13
lea ecx, [r13 + 8]
call fcn.18003762c
mov qword [rbp - 0x79], rax
mov qword [rax], 0xffffffffffffffff
mov qword [rbp - 0x69], rax
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
lea r9d, [r13 + 1]
mov r8d, 0x80000000
mov rdx, rbx
lea rcx, [rbp - 0x69]
call fcn.180014430
test al, al
jne 0x180023659
lea rcx, [rbp - 0x19]
call fcn.180024610
nop
cmp qword [rdi + 8], r13
je 0x1800235ff
lea r8, [rbp - 0x19]
xor edx, edx
mov rcx, rdi
call fcn.1800239a0
nop
mov rdx, qword [rbp - 1]
cmp rdx, 8
jb 0x18002363f
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x19]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18002363a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180023989
call fcn.180037624
mov qword [rbp - 9], r13
mov qword [rbp - 1], 7
mov word [rbp - 0x19], r13w
mov rbx, qword [rbp - 0x69]
jmp 0x180023921
mov rbx, qword [rbp - 0x69]
test rbx, rbx
je 0x1800238a5
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x1800238a5
lea rdx, [rbp - 0x61]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp eax, 0xffffffff
jne 0x180023692
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1800238a5
mov r14d, dword [rbp - 0x61]
shl r14, 0x20
add r14, rsi
je 0x1800238a5
mov r12b, 1
mov dword [rbp - 0x71], r13d
mov rsi, r13
mov ecx, 0x10000
call fcn.18003829c
mov r15, rax
movsd xmm6, qword [0x180079870]
test r15, r15
je 0x1800237ea
cmp qword [rbx], 0xffffffffffffffff
je 0x180023804
mov dword [rbp - 0x71], r13d
mov qword [rsp + 0x20], r13
lea r9, [rbp - 0x71]
mov r8d, 0x10000
mov rdx, r15
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1800237ea
movzx eax, byte [rdi + 0x10]
test al, al
jne 0x180023764
mov r8d, dword [rbp - 0x71]
test r8d, r8d
je 0x1800237e6
mov rax, qword [rdi]
mov rdx, r15
mov rcx, rdi
call qword [rax + 8]
mov eax, dword [rbp - 0x71]
add rsi, rax
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x180023757
mov rax, qword [rcx]
xorps xmm1, xmm1
cvtsi2sd xmm1, rsi
test rsi, rsi
jns 0x180023740
addsd xmm1, xmm6
xorps xmm0, xmm0
cvtsi2sd xmm0, r14
test r14, r14
jns 0x180023751
addsd xmm0, xmm6
divsd xmm1, xmm0
call qword [rax]
mov dword [rbp - 0x71], r13d
mov rbx, qword [rbp - 0x69]
jmp 0x1800236c2
mov qword [rbp - 0x49], r13
mov qword [rbp - 0x41], r13
mov qword [rbp - 0x49], r13
mov qword [rbp - 0x41], 7
mov word [rbp - 0x59], r13w
cmp qword [rdi + 8], 0
je 0x180023792
lea r8, [rbp - 0x59]
xor edx, edx
mov rcx, rdi
call fcn.1800239a0
xor r12b, r12b
mov rdx, qword [rbp - 0x41]
cmp rdx, 8
jb 0x1800237d5
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x59]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800237d0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18002398f
call fcn.180037624
mov qword [rbp - 0x49], r13
mov qword [rbp - 0x41], 7
mov word [rbp - 0x59], r13w
mov rbx, qword [rbp - 0x69]
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x180023804
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x180023804
mov qword [rbx], 0xffffffffffffffff
mov rcx, r15
call fcn.180037624
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x10]
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x48], 7
mov word [rsp + 0x30], r13w
cmp qword [rdi + 8], 0
je 0x18002384a
lea r8, [rsp + 0x30]
mov dl, 1
mov rcx, rdi
call fcn.1800239a0
nop
mov rdx, qword [rsp + 0x48]
cmp rdx, 8
jb 0x18002388c
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180023887
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180023995
call fcn.180037624
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x48], 7
mov word [rsp + 0x30], r13w
jmp 0x180023924
mov qword [rbp - 0x29], r13
mov qword [rbp - 0x21], r13
mov qword [rbp - 0x29], r13
mov qword [rbp - 0x21], 7
mov word [rbp - 0x39], r13w
cmp qword [rdi + 8], 0
je 0x1800238d4
lea r8, [rbp - 0x39]
xor edx, edx
mov rcx, rdi
call fcn.1800239a0
nop
mov rdx, qword [rbp - 0x21]
cmp rdx, 8
jb 0x180023910
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x39]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18002390b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180023983
call fcn.180037624
mov qword [rbp - 0x29], r13
mov qword [rbp - 0x21], 7
mov word [rbp - 0x39], r13w
xor r12b, r12b
test rbx, rbx
je 0x180023950
mov rcx, qword [rbx]
lea r8, [rcx - 1]
cmp r8, 0xfffffffffffffffd
ja 0x18002393f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], r13
mov edx, 8
mov rcx, rbx
call fcn.180037624
mov qword [rbp - 0x69], r13
movzx eax, r12b
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.180037600
mov rbx, qword [rsp + 0x150]
movaps xmm6, xmmword [rsp + 0xf0]
add rsp, 0x100
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.180042954
nop
call fcn.180042954
int3
call fcn.180042954
int3
call fcn.180042954
int3