Function at 0x140006cb0
Capabilities:
Check if file exists
Get file attributes
Read file on windows

Disassembly:
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0xa0
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x90], rbx
mov qword [rbp + 0x98], rsi
mov qword [rbp + 0xa0], rdi
mov rax, qword [0x1402be790]
xor rax, rbp
mov qword [rbp + 0x50], rax
mov rbx, rdx
mov r12, rcx
mov qword [rbp + 0x28], rcx
xor r14d, r14d
mov edi, r14d
mov qword [rbp + 0x18], r14
mov dword [rbp + 0xc], 0x100
mov ecx, 0x100
call fcn.1400066a0
mov r13, rax
mov qword [rbp + 0x30], rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [rbp + 0x24], eax
cmp eax, 0xffffffff
je 0x140006fae
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x8000080
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r14 + 1]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
mov qword [rbp + 0x18], rax
cmp rax, 0xffffffffffffffff
je 0x140006fae
mov r15d, r14d
mov dword [rbp + 0x10], r14d
mov eax, 0x8000
call fcn.1401d8310
sub rsp, rax
lea rbx, [rsp + 0x40]
mov qword [rbp + 0x40], rbx
mov qword [rsp + 0x20], r14
lea r9, [rbp]
mov r8d, eax
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140006fae
mov ecx, r14d
mov r8d, dword [rbp]
mov dword [rbp + 0x20], ecx
cmp ecx, r8d
jae 0x140006dc5
mov eax, ecx
movzx edx, byte [rax + rbx]
cmp dl, 0xd
je 0x140006dc5
cmp dl, 0xa
je 0x140006dc5
inc ecx
jmp 0x140006da9
cmp r14d, r8d
jne 0x140006dcf
mov eax, r14d
jmp 0x140006df2
cmp byte [rbx], 0xa
jne 0x140006ddb
mov eax, 1
jmp 0x140006df2
lea eax, [r8 - 1]
cmp r14d, eax
jae 0x140006ded
cmp byte [rbx + 1], 0xa
mov eax, r14d
je 0x140006df2
mov eax, 2
mov dword [r12 + 0x4c], eax
cdqe
lea rcx, [0x1402757e0]
mov rcx, qword [rcx + rax*8]
mov qword [rbp + 0x48], rcx
lea rcx, [r12 + 0x58]
xor edx, edx
mov r8d, 0x1000
call fcn.1400088e0
mov esi, r14d
mov dword [rbp + 8], r14d
mov edi, r14d
mov dword [rbp + 4], r14d
nop dword [rax + rax]
mov ecx, dword [rbp]
cmp esi, ecx
jae 0x140006f35
mov eax, esi
movsx r12d, byte [rax + rbx]
mov dword [rbp + 0x38], r12d
inc esi
mov dword [rbp + 8], esi
cmp esi, ecx
jne 0x140006e7f
cmp ecx, 0x8000
jne 0x140006e7f
mov qword [rsp + 0x20], r14
lea r9, [rbp]
mov r8d, ecx
mov rdx, rbx
mov rcx, qword [rbp + 0x18]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140006faa
mov esi, r14d
mov dword [rbp + 8], r14d
movsxd rax, r15d
mov byte [rax + r13], r12b
inc r15d
mov dword [rbp + 0x10], r15d
mov eax, dword [rbp + 0xc]
cmp r15d, eax
jne 0x140006ed1
add eax, 0x100
mov dword [rbp + 0xc], eax
mov dword [rbp + 0x3c], eax
movsxd rcx, eax
call fcn.1400066a0
mov rbx, rax
movsxd r8, r15d
mov rdx, r13
mov rcx, rax
call fcn.1401d8c10
mov edx, 1
mov rcx, r13
call fcn.140002720
mov r13, rbx
mov qword [rbp + 0x30], rbx
mov rbx, qword [rbp + 0x40]
movsxd rax, edi
mov rcx, qword [rbp + 0x48]
cmp r12b, byte [rax + rcx]
jne 0x140006f25
inc edi
mov dword [rbp + 4], edi
movsxd rax, edi
cmp byte [rax + rcx], 0
jne 0x140006f2c
sub r15d, edi
movsxd rax, r15d
mov byte [rax + r13], 0
mov rcx, r13
call fcn.140006630
mov rdx, rax
or r9d, 0xffffffff
or r8d, r9d
mov r12, qword [rbp + 0x28]
mov rcx, r12
call fcn.1400069c0
mov r15d, r14d
mov dword [rbp + 0x10], r14d
mov edi, r14d
mov dword [rbp + 4], r14d
jmp 0x140006f30
mov edi, r14d
mov dword [rbp + 4], r14d
mov r12, qword [rbp + 0x28]
jmp 0x140006e30
movsxd rax, r15d
mov byte [rax + r13], 0
mov rcx, r13
call fcn.140006630
mov rdx, rax
or r9d, 0xffffffff
or r8d, r9d
mov rcx, r12
call fcn.1400069c0
mov dword [r12 + 0x40], 1
mov eax, dword [rbp + 0x24]
and eax, 1
mov dword [r12 + 0x44], eax
mov dword [r12 + 0x48], r14d
mov qword [r12 + 0xb0], r14
mov dword [r12 + 0x54], 0x80000
mov qword [r12 + 0xa8], r14
mov r14d, 1
mov dword [rsp + 0x20], 0xffffffff
mov r9d, 0x1000
xor r8d, r8d
xor edx, edx
mov rcx, r12
call fcn.1400077d0
mov rdi, qword [rbp + 0x18]
test r13, r13
je 0x140006fc0
mov edx, 1
mov rcx, r13
call fcn.140002720
test rdi, rdi
je 0x140006fce
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r14d
mov rcx, qword [rbp + 0x50]
xor rcx, rbp
call fcn.1401d7640
mov rbx, qword [rbp + 0x90]
mov rsi, qword [rbp + 0x98]
mov rdi, qword [rbp + 0xa0]
lea rsp, [rbp + 0x60]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rbx, rdx
mov rdi, rcx
call fcn.1400559fc
test eax, eax
jne 0x140017104
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
lea rcx, [rdi + 0x180]
mov rdx, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp 0x140006cb0