Function at 0x140153430
Capabilities:
Read file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x128
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0x90], xmm6
mov rsi, rdx
mov r12, rcx
mov r13, qword [rcx]
lea rcx, [rbp - 0x30]
mov rdx, r13
call fcn.140151080
cmp dword [rbp - 0x30], 2
jne 0x1401534bd
mov rax, qword [rbp - 0x28]
mov ecx, eax
and ecx, 3
cmp ecx, 1
jne 0x140153577
lea r14, [rax - 1]
mov r15, qword [rax - 1]
mov rdi, qword [rax + 7]
mov rax, qword [rdi]
test rax, rax
je 0x140153498
mov rcx, r15
call rax
cmp qword [rdi + 8], 0
je 0x1401534ab
mov rdx, qword [rdi + 0x10]
mov rcx, r15
call fcn.140019a50
mov edx, 8
mov rcx, r14
call fcn.140019a50
jmp 0x140153577
mov rbx, qword [rbp + 8]
mov qword [rbp - 0x30], 0
lea r8, [rbp - 0x30]
mov rcx, r13
xor edx, edx
mov r9d, 1
call sub.kernel32.dll_SetFilePointerEx
test eax, eax
je 0x140153572
mov r15, qword [rbp - 0x30]
xor edi, edi
mov rax, rbx
sub rax, r15
cmovae rdi, rax
mov rcx, qword [rsi]
mov r14, qword [rsi + 0x10]
mov rax, rcx
sub rax, r14
cmp rax, rdi
jae 0x1401537ba
mov rdx, r14
movabs r14, 0x2600000003
mov qword [rbp + 0x70], rdx
mov eax, 1
add rdx, rdi
jb 0x14015385f
lea r8, [rcx + rcx]
cmp r8, rdx
cmova rdx, r8
cmp rdx, 9
mov r8d, 8
cmovae r8, rdx
mov qword [rbp + 0x88], r8
test r8, r8
js 0x14015385f
test rcx, rcx
je 0x1401538a7
mov rax, qword [rsi + 8]
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x20], rcx
mov eax, 1
jmp 0x1401538a9
call sub.kernel32.dll_GetLastError
lea rax, [rsi + 0x10]
mov qword [rbp + 0x68], rax
mov rbx, qword [rsi]
mov r14, qword [rsi + 0x10]
mov rax, rbx
sub rax, r14
mov edi, 0x2000
mov dword [rbp + 0x7c], 0
cmp rax, 0x20
mov qword [rbp + 0x70], r14
jae 0x1401535c3
mov rcx, r12
mov rdx, rsi
call case.0x1401529f2.51
mov r14, rdx
test rax, rax
je 0x1401537ff
mov eax, 1
jmp 0x14015385f
mov qword [rbp + 0x60], r13
mov qword [rbp + 0x50], r12
mov qword [rbp + 0x88], rbx
xor r13d, r13d
xorps xmm6, xmm6
xor r15d, r15d
cmp r14, rbx
je 0x140153608
jmp 0x140153635
xor r13d, r13d
mov r15, rcx
sub r15, rax
cmp byte [rbp + 0x7c], 0
je 0x140153777
cmp r14, rbx
jne 0x140153635
cmp rbx, qword [rbp + 0x88]
jne 0x140153635
mov rcx, qword [rbp + 0x50]
mov rdx, rsi
call case.0x1401529f2.51
mov r14, rdx
test rax, rax
jne 0x1401535b9
test r14, r14
je 0x140153852
mov rbx, qword [rsi]
mov r14, qword [rsi + 0x10]
cmp r14, rbx
jne 0x140153680
cmp r14, 0xffffffffffffffdf
ja 0x14015381f
lea rbx, [r14 + 0x20]
lea rax, [r14 + r14]
cmp rax, rbx
cmova rbx, rax
test rbx, rbx
js 0x14015381f
test r14, r14
je 0x140153689
mov rax, qword [rsi + 8]
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x20], r14
mov eax, 1
jmp 0x14015368b
mov rbx, qword [rsi]
mov rax, qword [rsi + 8]
jmp 0x1401536b9
xor eax, eax
mov qword [rbp - 0x28], rax
mov edx, 1
lea rcx, [rbp + 0x30]
mov r8, rbx
lea r9, [rbp - 0x30]
call fcn.140134980
cmp dword [rbp + 0x30], 1
je 0x14015387d
mov rax, qword [rbp + 0x38]
mov qword [rsi + 8], rax
mov qword [rsi], rbx
mov r12, rbx
sub r12, r14
cmp r12, rdi
jb 0x1401536c7
mov r12, rdi
movups xmm0, xmmword [0x1403108e8]
movaps xmmword [rbp + 0x30], xmm0
mov edx, 0xffffffff
mov rcx, r12
cmp r12, rdx
jb 0x1401536e4
mov ecx, 0xffffffff
add rax, r14
movups xmmword [rsp + 0x38], xmm6
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x30]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], ecx
mov rcx, qword [rbp + 0x60]
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call sub.ntdll.dll_NtReadFile
cmp eax, 0x103
jne 0x140153727
mov rcx, qword [rbp + 0x60]
mov edx, 0xffffffff
call sub.kernel32.dll_WaitForSingleObject
mov eax, dword [rbp + 0x30]
cmp eax, 0xc0000011
je 0x140153844
cmp eax, 0x103
je 0x140153939
test eax, eax
js 0x140153830
mov rax, qword [rbp + 0x38]
add r14, rax
mov rcx, qword [rbp + 0x68]
mov qword [rcx], r14
test rax, rax
je 0x140153859
cmp r15, rax
mov rcx, r15
cmovbe rcx, rax
cmp rax, r12
jae 0x1401535f0
inc r13d
jmp 0x1401535f3
mov rdx, 0xffffffffffffffff
mov r8, 0xffffffffffffffff
cmp r13d, 2
jge 0x14015378e
mov r8, rdi
cmp rcx, r12
cmovne rdi, r8
test rdi, rdi
js 0x14015379e
lea rdx, [rdi + rdi]
cmp r12, rdi
cmovb rdx, rdi
cmp rax, r12
cmove rdi, rdx
cmp r14, rbx
je 0x140153608
jmp 0x140153635
mov qword [rbp + 0x88], rcx
cmp rdi, 0xfffffffffffffbff
ja 0x1401538f3
add rdi, 0x400
mov rax, rdi
and rax, 0x1fff
je 0x1401538f8
mov ecx, 0x2000
sub rcx, rax
add rdi, rcx
setb al
test al, 1
jne 0x1401538f3
jmp 0x1401538f8
test r14, r14
je 0x14015384d
mov qword [rbp + 0x88], rbx
mov qword [rbp + 0x60], r13
mov qword [rbp + 0x50], r12
mov rbx, qword [rsi]
mov r14, qword [rsi + 0x10]
jmp 0x1401535d2
mov eax, 1
movabs r14, 0x2600000003
jmp 0x14015385f
mov ecx, eax
call sub.ntdll.dll_RtlNtStatusToDosError
mov esi, eax
mov ecx, eax
call fcn.140131b10
cmp al, 0xb
jne 0x14015388e
mov rax, qword [rbp + 0x68]
mov qword [rax], r14
jmp 0x140153859
xor r14d, r14d
jmp 0x14015385d
mov rax, qword [rbp + 0x68]
mov r14, qword [rax]
sub r14, qword [rbp + 0x70]
xor eax, eax
mov rdx, r14
movaps xmm6, xmmword [rbp + 0x90]
add rsp, 0x128
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
movabs r14, 0x2600000003
mov eax, 1
jmp 0x14015385f
shl rsi, 0x20
or rsi, 2
mov rax, qword [rbp + 0x68]
mov qword [rax], r14
mov eax, 1
mov r14, rsi
jmp 0x14015385f
xor eax, eax
mov qword [rbp - 0x28], rax
lea rcx, [rbp + 0x30]
lea r9, [rbp - 0x30]
mov edx, 1
mov r8, qword [rbp + 0x88]
call fcn.140134980
cmp dword [rbp + 0x30], 1
je 0x1401535b9
mov rax, qword [rbp + 0x38]
mov qword [rsi + 8], rax
mov rax, qword [rbp + 0x88]
mov qword [rsi], rax
mov r14, qword [rbp + 0x70]
cmp rdi, 0xfffffffffffffbff
jbe 0x1401537ce
mov edi, 0x2000
lea rax, [rsi + 0x10]
mov qword [rbp + 0x68], rax
mov al, 1
mov dword [rbp + 0x7c], eax
cmp rbx, r15
jbe 0x140153922
mov qword [rbp + 0x60], r13
mov qword [rbp + 0x50], r12
mov rbx, qword [rbp + 0x88]
mov qword [rbp + 0x70], r14
jmp 0x1401535d2
mov rbx, qword [rbp + 0x88]
mov rax, rbx
sub rax, r14
mov cl, 1
mov dword [rbp + 0x7c], ecx
jmp 0x140153598
mov dword [rbp + 0x58], 0
mov byte [rbp + 0x5c], 0
lea rax, str._t_t1_
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], 1
lea rax, [rbp + 0x80]
mov qword [rbp - 0x20], rax
xorps xmm0, xmm0
movups xmmword [rbp - 0x18], xmm0
lea rcx, [rbp + 0x58]
lea rdx, [rbp - 0x30]
call fcn.14012f270
mov qword [rbp + 0x28], rax
lea rcx, [rbp + 0x28]
call fcn.14012f380
mov ecx, 7
int 0x29
ud2