Function at 0x18024c640
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 [0x1804ca010]
xor rax, rsp
mov qword [rbp + 0xb0], rax
mov r14, rdx
mov rbx, rcx
lea rdi, [rcx + 0x10]
cmp qword [rdi], 0
jne 0x18024c690
xor al, al
jmp 0x18024cb0a
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, [0x1803be558]
lea rcx, [rsp + 0x78]
call fcn.180004e70
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.180004aa0
nop
cmp qword [rbp - 0x28], r15
jne 0x18024c709
lea r8d, [r15 + 3]
lea rdx, [0x1803cb240]
lea rcx, [rbp - 0x38]
call fcn.180004e70
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x18024c74d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18024c748
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18024c748
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180385c70
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.18015d290
test al, al
jne 0x18024c79b
xor dil, dil
jmp 0x18024ca85
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 0x18024c85a
cmp qword [rbx + 0x18], 8
jb 0x18024c84b
mov rbx, qword [rbx]
mov r8, qword [rdi]
mov rdx, rbx
lea rcx, [rbp - 0x10]
call fcn.180004e70
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.180004e70
mov ecx, 0x10
call fcn.180385c34
mov rbx, rax
mov qword [rsp + 0x30], rax
mov qword [rax], r15
mov ecx, 0x28
call fcn.180385c34
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.18015ced0
test al, al
jne 0x18024c8cb
xor dil, dil
jmp 0x18024ca00
mov ecx, 8
call fcn.180385c34
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.180174090
mov rbx, qword [rsp + 0x30]
test al, al
je 0x18024c9d0
mov rdi, r15
test rbx, rbx
je 0x18024c959
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x18024c959
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp eax, 0xffffffff
jne 0x18024c94b
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x18024c959
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.18016b310
mov dword [rsp + 0x40], r15d
mov rdx, qword [r14]
test rbx, rbx
je 0x18024c9d0
test rdx, rdx
je 0x18024c9b6
cmp qword [rbx], 0xffffffffffffffff
je 0x18024c9d0
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 0x18024c9b6
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x18024c9b1
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x18024c9b1
mov qword [rbx], 0xffffffffffffffff
mov dil, 1
jmp 0x18024c9d3
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x18024c9d0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x18024c9d0
mov qword [rbx], 0xffffffffffffffff
xor dil, dil
test rbx, rbx
je 0x18024ca00
mov rcx, qword [rbx]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x18024c9ee
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], r15
mov edx, 8
mov rcx, rbx
call fcn.180385c70
mov qword [rsp + 0x30], r15
mov rbx, qword [rsp + 0x38]
test rbx, rbx
je 0x18024ca50
mov qword [rsp + 0x38], rbx
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x18024ca30
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edx, 0x28
mov rcx, qword [rbx + 8]
call fcn.180385c70
mov qword [rbx + 8], r15
mov rcx, qword [rbx]
test rcx, rcx
je 0x18024ca3e
mov rax, qword [rcx]
call qword [rax + 8]
mov edx, 0x10
mov rcx, rbx
call fcn.180385c70
mov qword [rsp + 0x38], r15
lea rcx, [rbp + 0x88]
call fcn.180004df0
nop
lea rcx, [rbp + 0x50]
call fcn.180004df0
nop
lea rcx, [rbp + 0x30]
call fcn.180004df0
nop
lea rcx, [rbp + 0x10]
call fcn.180004df0
nop
lea rcx, [rbp - 0x10]
call fcn.180004df0
nop
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
jb 0x18024caca
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18024cac5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18024cac5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180385c70
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], 7
mov word [rsp + 0x50], r15w
cmp byte [rbp - 0x60], 0
je 0x18024caf3
lea rcx, [rbp - 0x58]
call fcn.180175040
test al, al
sete byte [rbp - 0x60]
lea rcx, [rbp - 0x38]
call fcn.180004df0
nop
lea rcx, [rbp - 0x58]
call fcn.180004df0
movzx eax, dil
mov rcx, qword [rbp + 0xb0]
xor rcx, rsp
call fcn.180385c10
mov rbx, qword [rsp + 0x200]
add rsp, 0x1c0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret