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

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0xc0]
sub rsp, 0x1c0
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x200], rbx
mov rax, qword [0x1804cc010]
xor rax, rsp
mov qword [rbp + 0xb0], rax
mov r14, rdx
mov rbx, rcx
lea rdi, [rcx + 0x10]
cmp qword [rdi], 0
jne 0x18024e3a0
xor al, al
jmp 0x18024e81a
xor r15d, r15d
mov qword [rbp - 0x78], r15
mov qword [rbp - 0x70], r15
mov qword [rbp - 0x78], r15
mov qword [rbp - 0x70], 7
mov word [rsp + 0x78], r15w
xor r8d, r8d
lea rdx, [0x1803bf568]
lea rcx, [rsp + 0x78]
call fcn.180004ea0
nop
mov byte [rbp - 0x60], r15b
mov qword [rbp - 0x48], r15
mov qword [rbp - 0x40], r15
mov qword [rbp - 0x48], r15
mov qword [rbp - 0x40], 7
mov word [rbp - 0x58], r15w
lea rdx, [rsp + 0x78]
lea rcx, [rbp - 0x38]
call fcn.180004ad0
nop
cmp qword [rbp - 0x28], r15
jne 0x18024e419
lea r8d, [r15 + 3]
lea rdx, [0x1803cc1d0]
lea rcx, [rbp - 0x38]
call fcn.180004ea0
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x18024e45d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18024e458
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18024e458
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180386950
mov qword [rbp - 0x78], r15
mov qword [rbp - 0x70], 7
mov word [rsp + 0x78], r15w
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], 7
mov word [rsp + 0x50], r15w
lea r8, [rsp + 0x50]
lea rdx, [rbp - 0x38]
lea rcx, [rbp - 0x60]
call fcn.18015d1a0
test al, al
jne 0x18024e4ab
xor dil, dil
jmp 0x18024e795
mov qword [rbp], r15
mov qword [rbp + 8], r15
mov qword [rbp], r15
mov qword [rbp + 8], 7
mov word [rbp - 0x10], r15w
mov qword [rbp + 0x20], r15
mov qword [rbp + 0x28], r15
mov qword [rbp + 0x20], r15
mov qword [rbp + 0x28], 7
mov word [rbp + 0x10], r15w
mov qword [rbp + 0x40], r15
mov qword [rbp + 0x48], r15
mov qword [rbp + 0x40], r15
mov qword [rbp + 0x48], 7
mov word [rbp + 0x30], r15w
mov qword [rbp + 0x60], r15
mov qword [rbp + 0x68], r15
mov qword [rbp + 0x60], r15
mov qword [rbp + 0x68], 7
mov word [rbp + 0x50], r15w
mov word [rbp + 0x70], 0x101
mov qword [rbp + 0x78], r15
mov qword [rbp + 0x80], r15
mov qword [rbp + 0x98], r15
mov qword [rbp + 0xa0], r15
mov qword [rbp + 0x98], r15
mov qword [rbp + 0xa0], 7
mov word [rbp + 0x88], r15w
lea rax, [rbp - 0x10]
cmp rax, rbx
je 0x18024e56a
cmp qword [rbx + 0x18], 8
jb 0x18024e55b
mov rbx, qword [rbx]
mov r8, qword [rdi]
mov rdx, rbx
lea rcx, [rbp - 0x10]
call fcn.180004ea0
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rdx, qword [rsp + 0x50]
mov r8, qword [rsp + 0x60]
lea rcx, [rbp + 0x10]
call fcn.180004ea0
mov ecx, 0x10
call fcn.180386914
mov rbx, rax
mov qword [rsp + 0x30], rax
mov qword [rax], r15
mov ecx, 0x28
call fcn.180386914
mov qword [rbx + 8], rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
nop
mov qword [rsp + 0x38], rbx
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x10]
lea rcx, [rsp + 0x38]
call fcn.18015cde0
test al, al
jne 0x18024e5db
xor dil, dil
jmp 0x18024e710
mov ecx, 8
call fcn.180386914
mov qword [rsp + 0x70], rax
mov qword [rax], 0xffffffffffffffff
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
mov r9d, 1
mov r8d, 0x80000000
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x30]
call fcn.180173fa0
mov rbx, qword [rsp + 0x30]
test al, al
je 0x18024e6e0
mov rdi, r15
test rbx, rbx
je 0x18024e669
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x18024e669
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp eax, 0xffffffff
jne 0x18024e65b
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x18024e669
mov edi, dword [rsp + 0x70]
shl rdi, 0x20
mov rax, rsi
add rdi, rsi
mov edi, edi
mov edx, edi
mov rcx, r14
call fcn.18016b220
mov dword [rsp + 0x40], r15d
mov rdx, qword [r14]
test rbx, rbx
je 0x18024e6e0
test rdx, rdx
je 0x18024e6c6
cmp qword [rbx], 0xffffffffffffffff
je 0x18024e6e0
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x40]
mov r8d, edi
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18024e6c6
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x18024e6c1
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x18024e6c1
mov qword [rbx], 0xffffffffffffffff
mov dil, 1
jmp 0x18024e6e3
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x18024e6e0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x18024e6e0
mov qword [rbx], 0xffffffffffffffff
xor dil, dil
test rbx, rbx
je 0x18024e710
mov rcx, qword [rbx]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x18024e6fe
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], r15
mov edx, 8
mov rcx, rbx
call fcn.180386950
mov qword [rsp + 0x30], r15
mov rbx, qword [rsp + 0x38]
test rbx, rbx
je 0x18024e760
mov qword [rsp + 0x38], rbx
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x18024e740
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edx, 0x28
mov rcx, qword [rbx + 8]
call fcn.180386950
mov qword [rbx + 8], r15
mov rcx, qword [rbx]
test rcx, rcx
je 0x18024e74e
mov rax, qword [rcx]
call qword [rax + 8]
mov edx, 0x10
mov rcx, rbx
call fcn.180386950
mov qword [rsp + 0x38], r15
lea rcx, [rbp + 0x88]
call fcn.180004e20
nop
lea rcx, [rbp + 0x50]
call fcn.180004e20
nop
lea rcx, [rbp + 0x30]
call fcn.180004e20
nop
lea rcx, [rbp + 0x10]
call fcn.180004e20
nop
lea rcx, [rbp - 0x10]
call fcn.180004e20
nop
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
jb 0x18024e7da
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18024e7d5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18024e7d5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180386950
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], 7
mov word [rsp + 0x50], r15w
cmp byte [rbp - 0x60], 0
je 0x18024e803
lea rcx, [rbp - 0x58]
call fcn.180174f50
test al, al
sete byte [rbp - 0x60]
lea rcx, [rbp - 0x38]
call fcn.180004e20
nop
lea rcx, [rbp - 0x58]
call fcn.180004e20
movzx eax, dil
mov rcx, qword [rbp + 0xb0]
xor rcx, rsp
call fcn.1803868f0
mov rbx, qword [rsp + 0x200]
add rsp, 0x1c0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret