Function at 0x180047500
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 0x180047540
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 0x18004757c
call fcn.18006265c
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 0x1800475b5
call fcn.18006265c
test rdi, rdi
je 0x1800475c3
cmp rdi, qword [r15 + 0xa8]
je 0x1800475c8
call fcn.18006265c
cmp rsi, rbx
je 0x180047987
test rdi, rdi
jne 0x1800475e0
call fcn.18006265c
xor r11d, r11d
jmp 0x1800475e3
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x1800475ee
call fcn.18006265c
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 0x180047617
call fcn.18006265c
xor r11d, r11d
jmp 0x18004761a
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x180047625
call fcn.18006265c
cmp qword [rsi + 8], 0
je 0x180047677
test rdi, rdi
jne 0x18004763b
call fcn.18006265c
xor r11d, r11d
jmp 0x18004763e
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x180047649
call fcn.18006265c
mov rcx, qword [rsi + 8]
call fcn.1800626bc
test rdi, rdi
jne 0x180047661
call fcn.18006265c
xor r11d, r11d
jmp 0x180047664
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18004766f
call fcn.18006265c
mov qword [rsi + 8], 0
movsxd rbp, r14d
lea rdx, [0x1800fee28]
mov rcx, rbp
call fcn.1800626b4
mov rbx, rax
test rdi, rdi
jne 0x18004769b
call fcn.18006265c
xor r11d, r11d
jmp 0x18004769e
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x1800476a9
call fcn.18006265c
mov qword [rsi + 8], rbx
test rdi, rdi
jne 0x1800476bc
call fcn.18006265c
xor r11d, r11d
jmp 0x1800476bf
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x1800476ca
call fcn.18006265c
cmp qword [rsi + 8], 0
je 0x180047980
test rdi, rdi
jne 0x1800476e4
call fcn.18006265c
xor r11d, r11d
jmp 0x1800476e7
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x1800476f2
call fcn.18006265c
mov rcx, qword [rsi + 8]
mov r8, rbp
xor edx, edx
call fcn.1800644c0
test rdi, rdi
jne 0x18004770f
call fcn.18006265c
xor r11d, r11d
jmp 0x180047712
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18004771d
call fcn.18006265c
test rdi, rdi
jne 0x18004772c
call fcn.18006265c
xor r11d, r11d
jmp 0x18004772f
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x18004773a
call fcn.18006265c
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 0x180047766
call fcn.18006265c
xor r11d, r11d
jmp 0x180047769
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x180047774
call fcn.18006265c
test rdi, rdi
jne 0x180047783
call fcn.18006265c
xor r11d, r11d
jmp 0x180047786
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x180047791
call fcn.18006265c
mov eax, dword [rsi + 0x28]
shr rbp, 2
lea ecx, [rbp + rax - 1]
mov dword [rsi + 0x2c], ecx
test rdi, rdi
jne 0x1800477ae
call fcn.18006265c
xor r11d, r11d
jmp 0x1800477b1
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x1800477bc
call fcn.18006265c
test rdi, rdi
jne 0x1800477cb
call fcn.18006265c
xor r11d, r11d
jmp 0x1800477ce
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x1800477d9
call fcn.18006265c
mov ecx, dword [rsi + 0x20]
mov eax, dword [rsi + 0x28]
lea rbx, [rcx + rax*4]
mov qword [rsp + 0x78], rbx
test rdi, rdi
jne 0x1800477f7
call fcn.18006265c
xor r11d, r11d
jmp 0x1800477fa
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x180047805
call fcn.18006265c
test rdi, rdi
jne 0x180047814
call fcn.18006265c
xor r11d, r11d
jmp 0x180047817
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x180047822
call fcn.18006265c
mov r12, qword [rsi + 8]
mov rbp, qword [rsi]
test r14d, r14d
je 0x18004794b
cmp rbp, 0xffffffffffffffff
je 0x180047979
test r12, r12
je 0x180047979
mov rax, rbx
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
jne 0x180047922
test r14d, 0x1ff
jne 0x180047922
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x18004788e
call fcn.1800030e0
jmp 0x180047942
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 0x18004794b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f8
je 0x1800478d7
cmp eax, 0x3e6
je 0x1800478d7
test eax, eax
jle 0x180047942
movzx eax, ax
or eax, 0x80070000
jmp 0x180047942
lea rcx, [r15 + 0x10]
mov edx, r14d
call fcn.180003cc0
test eax, eax
js 0x180047942
cmp eax, 1
je 0x180047942
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 0x180047911
call fcn.1800030e0
jmp 0x180047942
mov rdx, qword [r15 + 0x10]
mov r8d, r14d
mov rcx, r12
call fcn.180063290
jmp 0x18004794b
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.180003d30
test eax, eax
js 0x180047989
cmp eax, 1
je 0x180047989
test rdi, rdi
jne 0x18004795a
call fcn.18006265c
xor r11d, r11d
jmp 0x18004795d
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x20]
jb 0x180047968
call fcn.18006265c
mov rbp, qword [rsp + 0x80]
add rsi, 0x30
jmp 0x1800475a0
mov eax, 0x80070057
jmp 0x180047989
mov eax, 0x8007000e
jmp 0x180047989
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