Function at 0x18024d0a0
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 [0x1804e0010]
xor rax, rsp
mov qword [rbp + 0xb0], rax
mov r14, rdx
mov rbx, rcx
lea rdi, [rcx + 0x10]
cmp qword [rdi], 0
jne 0x18024d0f0
xor al, al
jmp 0x18024d56a
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, [0x1803cd4c0]
lea rcx, [rsp + 0x78]
call fcn.180005cd0
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.180005900
nop
cmp qword [rbp - 0x28], r15
jne 0x18024d169
lea r8d, [r15 + 3]
lea rdx, [0x1803db150]
lea rcx, [rbp - 0x38]
call fcn.180005cd0
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x18024d1ad
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18024d1a8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18024d1a8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180393fb0
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.180162e70
test al, al
jne 0x18024d1fb
xor dil, dil
jmp 0x18024d4e5
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 0x18024d2ba
cmp qword [rbx + 0x18], 8
jb 0x18024d2ab
mov rbx, qword [rbx]
mov r8, qword [rdi]
mov rdx, rbx
lea rcx, [rbp - 0x10]
call fcn.180005cd0
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.180005cd0
mov ecx, 0x10
call fcn.180393f74
mov rbx, rax
mov qword [rsp + 0x30], rax
mov qword [rax], r15
mov ecx, 0x28
call fcn.180393f74
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.180162ab0
test al, al
jne 0x18024d32b
xor dil, dil
jmp 0x18024d460
mov ecx, 8
call fcn.180393f74
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.180179420
mov rbx, qword [rsp + 0x30]
test al, al
je 0x18024d430
mov rdi, r15
test rbx, rbx
je 0x18024d3b9
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x18024d3b9
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp eax, 0xffffffff
jne 0x18024d3ab
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x18024d3b9
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.180170d10
mov dword [rsp + 0x40], r15d
mov rdx, qword [r14]
test rbx, rbx
je 0x18024d430
test rdx, rdx
je 0x18024d416
cmp qword [rbx], 0xffffffffffffffff
je 0x18024d430
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 0x18024d416
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x18024d411
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x18024d411
mov qword [rbx], 0xffffffffffffffff
mov dil, 1
jmp 0x18024d433
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x18024d430
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x18024d430
mov qword [rbx], 0xffffffffffffffff
xor dil, dil
test rbx, rbx
je 0x18024d460
mov rcx, qword [rbx]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x18024d44e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], r15
mov edx, 8
mov rcx, rbx
call fcn.180393fb0
mov qword [rsp + 0x30], r15
mov rbx, qword [rsp + 0x38]
test rbx, rbx
je 0x18024d4b0
mov qword [rsp + 0x38], rbx
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x18024d490
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edx, 0x28
mov rcx, qword [rbx + 8]
call fcn.180393fb0
mov qword [rbx + 8], r15
mov rcx, qword [rbx]
test rcx, rcx
je 0x18024d49e
mov rax, qword [rcx]
call qword [rax + 8]
mov edx, 0x10
mov rcx, rbx
call fcn.180393fb0
mov qword [rsp + 0x38], r15
lea rcx, [rbp + 0x88]
call fcn.180005c50
nop
lea rcx, [rbp + 0x50]
call fcn.180005c50
nop
lea rcx, [rbp + 0x30]
call fcn.180005c50
nop
lea rcx, [rbp + 0x10]
call fcn.180005c50
nop
lea rcx, [rbp - 0x10]
call fcn.180005c50
nop
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
jb 0x18024d52a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18024d525
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18024d525
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180393fb0
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], 7
mov word [rsp + 0x50], r15w
cmp byte [rbp - 0x60], 0
je 0x18024d553
lea rcx, [rbp - 0x58]
call fcn.18017a3d0
test al, al
sete byte [rbp - 0x60]
lea rcx, [rbp - 0x38]
call fcn.180005c50
nop
lea rcx, [rbp - 0x58]
call fcn.180005c50
movzx eax, dil
mov rcx, qword [rbp + 0xb0]
xor rcx, rsp
call fcn.180393f50
mov rbx, qword [rsp + 0x200]
add rsp, 0x1c0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret