Function at 0x14006b660
Capabilities:
Read file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x48
mov eax, dword [rsp + 0xc8]
mov r10d, dword [rsp + 0xd0]
mov rbx, qword [rsp + 0xb8]
test eax, eax
mov esi, 0x200
mov r11, rdx
cmovne esi, eax
mov rax, qword [rsp + 0xc0]
xor ebp, ebp
mov r12, rdx
test r10d, r10d
je 0x14006b6d3
test rax, rax
je 0x14006b6be
lea r12, [rbx + rax]
cmp esi, 1
jle 0x14006b716
mov rax, rbx
movsxd rcx, esi
cqo
idiv rcx
sub rbx, rdx
jmp 0x14006b6f5
test rax, rax
je 0x14006b6dc
lea r12, [rbx + rax]
cmp esi, 1
jle 0x14006b716
mov rax, rbx
movsxd rcx, esi
cqo
idiv rcx
movsxd rax, edx
mov r10, rdx
sub rbx, rax
movsxd rax, r10d
add rbx, rax
mov rax, rbx
cqo
idiv rcx
mov rcx, qword [rsp + 0x90]
movsxd rax, edx
mov r13, rdx
sub rbx, rax
jmp 0x14006b719
mov r13d, ebp
cmp r12, r11
movsxd rax, r13d
mov r14, rbx
cmovg r12, r11
and r14, 0xfffffffffffffe00
lea r15, [rax + rbx]
lea rdx, [r12 + 0x1ff]
mov qword [rsp + 0x38], rax
movsxd rax, r9d
and rdx, 0xfffffffffffffe00
mov rdi, r12
cmp rdx, r11
cmovg rdx, r11
sub rdi, rax
sub rdx, r14
sub rdi, r15
cmp rdx, 0x7fffffff
jg 0x14006b7eb
mov r9, r14
mov r8d, 2
call fcn.140061a40
mov r11, rax
test rax, rax
je 0x14006b7e3
mov r9, rax
sub r9, r14
add r9, r15
test rdi, rdi
js 0x14006b7c0
mov r10d, dword [rsp + 0xa8]
mov rbx, qword [rsp + 0xa0]
nop dword [rax]
mov r8d, r10d
mov rdx, rbx
mov rcx, r9
call fcn.14005b5d0
test eax, eax
je 0x14006b7ce
movsxd rax, esi
add rbp, rax
add r9, rax
cmp rbp, rdi
jle 0x14006b7a0
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x14006ba18
mov rcx, r11
lea rbx, [r15 + rbp]
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rax, rbx
jmp 0x14006ba1c
mov r9d, dword [rsp + 0xa8]
lea edi, [r9 + r13]
mov rcx, r12
xor r8d, r8d
movsxd rax, edi
mov rdx, rbx
mov dword [rsp + 0xb8], edi
sub rcx, rax
mov qword [rsp + 0x30], rcx
mov rcx, qword [rsp + 0x90]
call fcn.14005c450
cmp rbx, rax
jne 0x14006ba18
sub r12, rbx
lea r14d, [rdi*4]
mov qword [rsp + 0x98], rbp
movsxd rax, r14d
cmp rax, r12
mov eax, 0x200000
cmovg r14d, r12d
lea r12d, [rdi + 0x1ff]
lea r13d, [r14 + 0x1ff]
and r12d, 0xfffffe00
and r13d, 0xfffffe00
cmp r13d, eax
cmovl r13d, eax
nop word [rax + rax]
lea edx, [r13 + 0x100000]
lea rcx, [rsp + 0x98]
call fcn.1400632e0
mov rdi, rax
test rax, rax
je 0x14006b89c
add rdi, 0x100000
and rdi, 0xfffffffffff00000
jne 0x14006b8c0
cmp r13d, r14d
jl 0x14006ba0b
mov eax, r13d
cdq
sub eax, edx
sar eax, 1
lea r13d, [rax + 0x1ff]
and r13d, 0xfffffe00
test rdi, rdi
je 0x14006b870
cmp r13d, r12d
mov r15, rdi
jl 0x14006ba0b
xor ecx, ecx
mov r12d, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rsp + 0x30]
mov dword [rsp + 0xd0], 0x3e8
cmp rbx, rax
jg 0x14006ba0b
mov rcx, rax
mov r14d, r13d
sub rcx, rbx
sub r14d, r12d
add rcx, 0x1ff
movsxd rax, r14d
and rcx, 0xfffffffffffffe00
cmp rcx, rax
cmovg rcx, rax
test rcx, rcx
jle 0x14006ba0b
mov r8d, ecx
mov rcx, qword [rsp + 0x90]
movsxd rdx, r12d
lea r9, [rsp + 0xc8]
add rdx, rdi
mov dword [rsp + 0xc8], ebp
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14006b957
mov eax, dword [rsp + 0xc8]
test eax, eax
jg 0x14006b971
mov eax, dword [rsp + 0xd0]
dec eax
mov dword [rsp + 0xd0], eax
test eax, eax
jle 0x14006ba0b
mov eax, ebp
mov ecx, dword [rsp + 0xb8]
cmp eax, r14d
cmovg eax, r14d
add eax, r12d
cmp eax, ecx
mov dword [rsp + 0xc8], eax
mov r12d, eax
jl 0x14006b9fd
mov rdi, qword [rsp + 0x38]
sub eax, ecx
mov r9d, ebp
add eax, esi
lea r10, [rdi + r15]
cdq
idiv esi
mov r11d, eax
test eax, eax
jle 0x14006b9dd
nop word [rax + rax]
mov r8d, dword [rsp + 0xa8]
mov rdx, qword [rsp + 0xa0]
mov rcx, r10
call fcn.14005b5d0
test eax, eax
je 0x14006ba2d
movsxd rax, esi
inc r9d
add rbx, rax
add r10, rax
cmp r9d, r11d
jl 0x14006b9b0
imul r11d, esi
mov rdi, r15
sub r12d, r11d
test r12d, r12d
jle 0x14006b9fd
movsxd rdx, r11d
movsxd r8, r12d
mov rcx, r15
add rdx, r15
call fcn.14010cd30
mov rax, qword [rsp + 0x30]
cmp rbx, rax
jle 0x14006b8f0
lea rcx, [rsp + 0x98]
call fcn.14005b520
or rax, 0xffffffffffffffff
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
lea rcx, [rsp + 0x98]
add rbx, rdi
call fcn.14005b520
mov rax, rbx
jmp 0x14006ba1c