Function at 0x18002cd20
Capabilities:
Read file on windows

Disassembly:
push r15
sub rsp, 0x60
mov rdx, qword [rcx + 0xc8]
movabs rax, 0x2aaaaaaaaaaaaaab
mov r15, rcx
sub rdx, qword [rcx + 0xc0]
imul rdx
sar rdx, 3
mov rax, rdx
shr rax, 0x3f
add rdx, rax
jne 0x18002cd60
mov eax, 0x80004005
add rsp, 0x60
pop r15
ret
mov qword [rsp + 0x88], rbx
mov qword [rsp + 0x58], rbp
mov rbp, qword [rcx + 0x30]
mov qword [rsp + 0x50], rsi
mov rsi, qword [rcx + 0xc0]
shr rbp, 9
mov qword [rsp + 0x80], rbp
mov qword [rsp + 0x48], rdi
cmp rsi, qword [rcx + 0xc8]
jbe 0x18002cd9c
call fcn.18006aa4c
mov rdi, qword [r15 + 0xa8]
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r14
nop word [rax + rax]
mov rbx, qword [r15 + 0xc8]
cmp qword [r15 + 0xc0], rbx
jbe 0x18002cdd5
call fcn.18006aa4c
test rdi, rdi
je 0x18002cde3
cmp rdi, qword [r15 + 0xa8]
je 0x18002cde8
call fcn.18006aa4c
cmp rsi, rbx
je 0x18002d1a7
test rdi, rdi
jne 0x18002ce00
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002ce03
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002ce0e
call fcn.18006aa4c
xor edx, edx
mov eax, ebp
div dword [rsi + 0x18]
lea r14d, [rax*4 + 0x1ff]
shr r14d, 9
inc r14d
shl r14d, 9
test rdi, rdi
jne 0x18002ce37
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002ce3a
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002ce45
call fcn.18006aa4c
cmp qword [rsi + 8], 0
je 0x18002ce97
test rdi, rdi
jne 0x18002ce5b
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002ce5e
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002ce69
call fcn.18006aa4c
mov rcx, qword [rsi + 8]
call fcn.18006aaac
test rdi, rdi
jne 0x18002ce81
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002ce84
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002ce8f
call fcn.18006aa4c
mov qword [rsi + 8], 0
movsxd rbp, r14d
lea rdx, [0x180106f48]
mov rcx, rbp
call fcn.18006aaa4
mov rbx, rax
test rdi, rdi
jne 0x18002cebb
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002cebe
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002cec9
call fcn.18006aa4c
mov qword [rsi + 8], rbx
test rdi, rdi
jne 0x18002cedc
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002cedf
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002ceea
call fcn.18006aa4c
cmp qword [rsi + 8], 0
je 0x18002d1a0
test rdi, rdi
jne 0x18002cf04
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002cf07
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002cf12
call fcn.18006aa4c
mov rcx, qword [rsi + 8]
mov r8, rbp
xor edx, edx
call fcn.18006cf60
test rdi, rdi
jne 0x18002cf2f
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002cf32
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002cf3d
call fcn.18006aa4c
test rdi, rdi
jne 0x18002cf4c
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002cf4f
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002cf5a
call fcn.18006aa4c
mov eax, dword [r15 + 0x38]
xor edx, edx
div dword [rsi + 0x18]
mov ecx, eax
shl rcx, 2
and rcx, 0xfffffffffffffe00
shr rcx, 2
mov dword [rsi + 0x28], ecx
test rdi, rdi
jne 0x18002cf86
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002cf89
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002cf94
call fcn.18006aa4c
test rdi, rdi
jne 0x18002cfa3
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002cfa6
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002cfb1
call fcn.18006aa4c
mov eax, dword [rsi + 0x28]
shr rbp, 2
lea ecx, [rbp + rax - 1]
mov dword [rsi + 0x2c], ecx
test rdi, rdi
jne 0x18002cfce
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002cfd1
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002cfdc
call fcn.18006aa4c
test rdi, rdi
jne 0x18002cfeb
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002cfee
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002cff9
call fcn.18006aa4c
mov ecx, dword [rsi + 0x20]
mov eax, dword [rsi + 0x28]
lea rbx, [rcx + rax*4]
mov qword [rsp + 0x78], rbx
test rdi, rdi
jne 0x18002d017
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002d01a
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002d025
call fcn.18006aa4c
test rdi, rdi
jne 0x18002d034
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002d037
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002d042
call fcn.18006aa4c
mov r12, qword [rsi + 8]
mov rbp, qword [rsi]
test r14d, r14d
je 0x18002d16b
cmp rbp, 0xffffffffffffffff
je 0x18002d199
test r12, r12
je 0x18002d199
mov rax, rbx
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
jne 0x18002d142
test r14d, 0x1ff
jne 0x18002d142
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x18002d0ae
call fcn.180003180
jmp 0x18002d162
xor ebx, ebx
lea r9, [rsp + 0x70]
mov r8d, r14d
mov rdx, r12
mov rcx, rbp
mov dword [rsp + 0x70], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18002d16b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f8
je 0x18002d0f7
cmp eax, 0x3e6
je 0x18002d0f7
test eax, eax
jle 0x18002d162
movzx eax, ax
or eax, 0x80070000
jmp 0x18002d162
lea rcx, [r15 + 0x10]
mov edx, r14d
call fcn.180003da0
test eax, eax
js 0x18002d162
cmp eax, 1
je 0x18002d162
mov rdx, qword [r15 + 0x10]
lea r9, [rsp + 0x70]
mov r8d, r14d
mov rcx, rbp
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18002d131
call fcn.180003180
jmp 0x18002d162
mov rdx, qword [r15 + 0x10]
mov r8d, r14d
mov rcx, r12
call fcn.18006c2d0
jmp 0x18002d16b
xor ebx, ebx
lea r8, [rsp + 0x78]
lea rcx, [r15 + 0x10]
mov r9, r12
mov rdx, rbp
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], r14d
call fcn.180003e10
test eax, eax
js 0x18002d1a9
cmp eax, 1
je 0x18002d1a9
test rdi, rdi
jne 0x18002d17a
call fcn.18006aa4c
xor r11d, r11d
jmp 0x18002d17d
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18002d188
call fcn.18006aa4c
mov rbp, qword [rsp + 0x80]
add rsi, 0x30
jmp 0x18002cdc0
mov eax, 0x80070057
jmp 0x18002d1a9
mov eax, 0x8007000e
jmp 0x18002d1a9
xor eax, eax
mov r13, qword [rsp + 0x38]
mov r12, qword [rsp + 0x40]
mov r14, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x88]
mov rdi, qword [rsp + 0x48]
add rsp, 0x60
pop r15
ret