Function at 0x18002c910
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
sub rsp, 0x40
mov r10, qword [rcx + 0xc8]
mov ebp, edx
mov edi, r8d
sub r10, qword [rcx + 0xc0]
movabs r8, 0x2aaaaaaaaaaaaaab
mov esi, r9d
mov rax, r8
mov r12, rcx
imul r10
sar rdx, 3
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rbp, rdx
jb 0x18002c968
mov eax, 0x80004005
jmp 0x18002cbf2
mov rcx, qword [rcx + 0xc8]
mov rax, r8
sub rcx, qword [r12 + 0xc0]
imul rcx
sar rdx, 3
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rbp, rdx
jb 0x18002c995
call fcn.18006aa4c
lea rbx, [rbp + rbp*2]
mov dword [rsp + 0x68], 0xffffffff
shl rbx, 4
add rbx, qword [r12 + 0xc0]
mov edx, dword [rbx + 0x28]
cmp edi, edx
jb 0x18002c9d5
cmp edi, dword [rbx + 0x2c]
ja 0x18002c9d5
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x18002c9d5
mov eax, edi
sub eax, edx
shl eax, 2
mov r8d, dword [rax + rcx]
mov dword [rsp + 0x68], r8d
jmp 0x18002ca2a
mov ecx, dword [rbx + 0x20]
mov rdx, qword [rbx]
lea rcx, [rcx + rdi*4]
mov qword [rsp + 0x30], rcx
lea rcx, [r12 + 0x10]
cmp rdx, 0xffffffffffffffff
je 0x18002cbed
lea rax, [rsp + 0x60]
lea r9, [rsp + 0x68]
lea r8, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 4
call fcn.180003e10
test eax, eax
js 0x18002cbf2
cmp eax, 1
je 0x18002cbf2
mov r8d, dword [rsp + 0x68]
cmp r8d, 0xffffffff
jne 0x18002ca5c
mov edx, dword [rbx + 0x18]
mov r9, qword [rsp + 0x88]
mov r8d, dword [rsp + 0x80]
imul edx, edi
lea eax, [rbp + 1]
mov rcx, r12
add edx, esi
mov dword [rsp + 0x20], eax
call fcn.18002c7a0
jmp 0x18002cbf2
cmp r8d, 0xfffffffe
jne 0x18002ca84
mov r8d, dword [rsp + 0x80]
mov rcx, qword [rsp + 0x88]
xor edx, edx
shl r8d, 9
call fcn.18006cf60
xor eax, eax
jmp 0x18002cbf2
mov edx, dword [rbx + 0x1c]
mov ecx, dword [rbx + 0x14]
mov edi, dword [rsp + 0x80]
mov rbp, qword [rbx]
add ecx, edx
mov eax, r8d
shl esi, 9
shl edi, 9
imul rcx, rax
mov eax, esi
add rcx, rax
mov eax, dword [rbx + 0x24]
add rcx, rax
add rcx, rdx
mov qword [rsp + 0x30], rcx
test edi, edi
jne 0x18002cac3
xor ebx, ebx
mov eax, ebx
jmp 0x18002cbf2
cmp rbp, 0xffffffffffffffff
je 0x18002cbe4
mov rsi, qword [rsp + 0x88]
test rsi, rsi
je 0x18002cbe4
mov rax, rcx
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
jne 0x18002cbc0
test edi, 0x1ff
jne 0x18002cbc0
mov rdx, rcx
xor r9d, r9d
xor r8d, r8d
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x18002cb28
call fcn.180003180
mov ebx, eax
jmp 0x18002cbf2
xor ebx, ebx
lea r9, [rsp + 0x60]
mov r8d, edi
mov rdx, rsi
mov rcx, rbp
mov dword [rsp + 0x60], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18002cbe9
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f8
je 0x18002cb74
cmp eax, 0x3e6
je 0x18002cb74
test eax, eax
jle 0x18002cbe0
movzx ebx, ax
or ebx, 0x80070000
mov eax, ebx
jmp 0x18002cbf2
lea rcx, [r12 + 0x10]
mov edx, edi
call fcn.180003da0
test eax, eax
js 0x18002cbe0
cmp eax, 1
je 0x18002cbe0
mov rdx, qword [r12 + 0x10]
lea r9, [rsp + 0x60]
mov r8d, edi
mov rcx, rbp
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18002cb1c
mov rdx, qword [r12 + 0x10]
mov r8d, edi
mov rcx, rsi
call fcn.18006c2d0
mov eax, ebx
jmp 0x18002cbf2
xor ebx, ebx
lea r8, [rsp + 0x30]
lea rcx, [r12 + 0x10]
mov r9, rsi
mov rdx, rbp
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], edi
call fcn.180003e10
mov ebx, eax
jmp 0x18002cbf2
mov ebx, 0x80070057
mov eax, ebx
jmp 0x18002cbf2
mov eax, 0x80070057
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
add rsp, 0x40
pop r12
pop rdi
pop rsi
ret