Function at 0x18024ee30
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 [0x1804cd010]
xor rax, rsp
mov qword [rbp + 0xb0], rax
mov r14, rdx
mov rbx, rcx
lea rdi, [rcx + 0x10]
cmp qword [rdi], 0
jne 0x18024ee80
xor al, al
jmp 0x18024f2fa
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, [0x1803c0558]
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 0x18024eef9
lea r8d, [r15 + 3]
lea rdx, [0x1803cd240]
lea rcx, [rbp - 0x38]
call fcn.180004ea0
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x18024ef3d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18024ef38
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18024ef38
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180388460
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.18015d850
test al, al
jne 0x18024ef8b
xor dil, dil
jmp 0x18024f275
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 0x18024f04a
cmp qword [rbx + 0x18], 8
jb 0x18024f03b
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.180388424
mov rbx, rax
mov qword [rsp + 0x30], rax
mov qword [rax], r15
mov ecx, 0x28
call fcn.180388424
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.18015d490
test al, al
jne 0x18024f0bb
xor dil, dil
jmp 0x18024f1f0
mov ecx, 8
call fcn.180388424
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.180174650
mov rbx, qword [rsp + 0x30]
test al, al
je 0x18024f1c0
mov rdi, r15
test rbx, rbx
je 0x18024f149
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x18024f149
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp eax, 0xffffffff
jne 0x18024f13b
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x18024f149
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.18016b8d0
mov dword [rsp + 0x40], r15d
mov rdx, qword [r14]
test rbx, rbx
je 0x18024f1c0
test rdx, rdx
je 0x18024f1a6
cmp qword [rbx], 0xffffffffffffffff
je 0x18024f1c0
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 0x18024f1a6
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x18024f1a1
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x18024f1a1
mov qword [rbx], 0xffffffffffffffff
mov dil, 1
jmp 0x18024f1c3
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x18024f1c0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x18024f1c0
mov qword [rbx], 0xffffffffffffffff
xor dil, dil
test rbx, rbx
je 0x18024f1f0
mov rcx, qword [rbx]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x18024f1de
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], r15
mov edx, 8
mov rcx, rbx
call fcn.180388460
mov qword [rsp + 0x30], r15
mov rbx, qword [rsp + 0x38]
test rbx, rbx
je 0x18024f240
mov qword [rsp + 0x38], rbx
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x18024f220
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edx, 0x28
mov rcx, qword [rbx + 8]
call fcn.180388460
mov qword [rbx + 8], r15
mov rcx, qword [rbx]
test rcx, rcx
je 0x18024f22e
mov rax, qword [rcx]
call qword [rax + 8]
mov edx, 0x10
mov rcx, rbx
call fcn.180388460
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 0x18024f2ba
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18024f2b5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18024f2b5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180388460
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], 7
mov word [rsp + 0x50], r15w
cmp byte [rbp - 0x60], 0
je 0x18024f2e3
lea rcx, [rbp - 0x58]
call fcn.180175600
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.180388400
mov rbx, qword [rsp + 0x200]
add rsp, 0x1c0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret