Function at 0x1400105d0
Capabilities:
Read file on windows

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
push rbp
sub rsp, 0x38
mov rax, rcx
xor ecx, ecx
mov rbp, rax
mov rbx, rcx
mov rcx, rbp
lea rdx, [rsp + 0x20]
call fcn.1400139a0
movzx r8d, byte [rsp + 0x20]
mov byte [rbp + 0x4e5], r8b
mov byte [rbp + 0x4e4], r8b
test r8d, r8d
je 0x14001087d
lea edx, [r8 - 5]
cmp edx, 0xa
ja 0x140010674
cmp edx, 2
ja 0x140010636
mov edx, 7
mov esi, 0xf
cmp r8d, 5
cmove esi, edx
jmp 0x140010643
mov esi, 1
lea ecx, [r8 + 0x15]
shl esi, cl
dec esi
mov byte [rbp + 0x80], sil
mov byte [rbp + 0x81], sil
mov byte [rbp + 0x83], sil
mov byte [rbp + 0x88], sil
mov byte [rbp + 0x89], sil
mov byte [rbp + 0x8a], sil
mov byte [rbp + 0x8b], sil
mov edi, dword [rbp + 0xc0]
mov esi, edi
cmp r8d, 0x3f
je 0x1400107ab
mov r9, qword [rbp + 0x528]
mov rdi, qword [rbp + 0x4f8]
mov r13d, dword [rsp + 0x28]
cmp dword [r9], 0
je 0x14001078f
mov r12, qword [r9 + 8]
cmp rdi, qword [r12 + 0x30]
jne 0x140010736
mov rdi, qword [r12 + 0x28]
mov dword [rdi], 1
mov dword [rdi + 4], r13d
mov rcx, qword [r12]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [r12 + 8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r14d, dword [rdi + 8]
test r14d, r14d
jl 0x140010895
mov rcx, rbp
mov edx, dword [rsp + 0x24]
call fcn.1400108c0
test eax, eax
jl 0x140010884
mov edi, dword [rbp + 0xc0]
mov edx, edi
sub rdx, rsi
je 0x140010711
add rbx, rdx
sub edi, dword [rbp + 0x78]
jns 0x14001072e
mov rdx, qword [rbp + 0x528]
cmp dword [rdx], 0
jne 0x1400105eb
mov rcx, rbx
call fcn.14001e7f0
jmp 0x1400105eb
mov dword [rbp + 0xc0], edi
jmp 0x140010711
test r13, r13
je 0x140010787
mov r14, qword [r12 + 0x28]
mov dword [r14], 1
mov dword [r14 + 4], r13d
mov rcx, qword [r12]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [r12 + 8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r14d, dword [r14 + 8]
test r14d, r14d
jle 0x1400106df
mov rcx, rdi
mov r8, r13
mov rdx, qword [r12 + 0x30]
call fcn.140023e60
jmp 0x1400106df
xor r14d, r14d
jmp 0x1400106df
mov rcx, rdi
xor edx, edx
inc rdx
mov r8, r13
mov r9, qword [r9 + 0x10]
call fcn.140027a34
mov r14d, eax
jmp 0x1400106df
mov r13d, dword [rsp + 0x28]
test r13, r13
je 0x140010849
mov r12d, edi
shr edi, 0x18
and r12, 0xffffff
mov r9, qword [rbp + rdi*8 + 0xd8]
mov rdi, r12
add r12, r9
neg rdi
mov rcx, r12
add rdi, 0x1000000
cmp rdi, r13
mov r8, qword [rbp + 0x528]
cmovae rdi, r13
mov rdx, rdi
call fcn.14000f660
mov r14d, eax
test r14d, r14d
jl 0x140010895
movsxd r15, r14d
cmp r15, rdi
jne 0x1400108a9
mov rcx, r12
mov rdx, r15
mov r8, qword [rbp + 0x528]
call fcn.14001c310
test eax, eax
jl 0x140010884
mov edi, dword [rbp + 0xc0]
add dword [rbp + 0x504], r14d
add edi, r14d
mov dword [rbp + 0xc0], edi
sub r13, r15
jne 0x1400107b9
jmp 0x140010702
mov rax, rbp
mov rcx, rbx
mov rax, qword [rax + 0x528]
cmp dword [rax], 0
jne 0x14001086a
mov dword [0x1400371a0], 0
call fcn.14001e7f0
xor eax, eax
add rsp, 0x38
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
xor esi, esi
jmp 0x140010643
add rsp, 0x38
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov eax, r14d
add rsp, 0x38
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
xor eax, eax
dec eax
add rsp, 0x38
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret