Function at 0x140006e90
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 [0x1402827b0]
xor rax, rbp
mov qword [rbp + 0x50], rax
mov rbx, rdx
mov r13, rcx
mov qword [rbp + 0x28], rcx
xor esi, esi
mov edi, esi
mov qword [rbp + 0x18], rsi
mov dword [rbp + 0xc], 0x100
mov ecx, 0x100
call fcn.140006870
mov r12, rax
mov qword [rbp + 0x38], rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [rbp + 0x24], eax
cmp eax, 0xffffffff
je 0x14000717d
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x8000080
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rsi + 1]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
mov qword [rbp + 0x18], rax
cmp rax, 0xffffffffffffffff
je 0x14000717d
mov r15d, esi
mov dword [rbp + 0x10], esi
mov eax, 0x8000
call fcn.1401bb7a0
sub rsp, rax
lea rbx, [rsp + 0x40]
mov qword [rbp + 0x30], rbx
mov qword [rsp + 0x20], rsi
lea r9, [rbp]
mov r8d, eax
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000717d
mov ecx, esi
mov r8d, dword [rbp]
mov dword [rbp + 0x20], ecx
cmp ecx, r8d
jae 0x140006fa1
mov eax, ecx
movzx edx, byte [rax + rbx]
cmp dl, 0xd
je 0x140006fa1
cmp dl, 0xa
je 0x140006fa1
inc ecx
jmp 0x140006f85
cmp esi, r8d
jne 0x140006faa
mov eax, esi
jmp 0x140006fcb
cmp byte [rbx], 0xa
jne 0x140006fb6
mov eax, 1
jmp 0x140006fcb
lea eax, [r8 - 1]
cmp esi, eax
jae 0x140006fc6
cmp byte [rbx + 1], 0xa
mov eax, esi
je 0x140006fcb
mov eax, 2
mov dword [r13 + 0x4c], eax
lea rcx, [0x140247980]
mov rcx, qword [rcx + rax*8]
mov qword [rbp + 0x48], rcx
lea rcx, [r13 + 0x58]
xor edx, edx
mov r8d, 0x1000
call fcn.140008af0
mov r14d, esi
mov dword [rbp + 8], esi
mov edi, esi
mov dword [rbp + 4], esi
nop word [rax + rax]
mov ecx, dword [rbp]
cmp r14d, ecx
jae 0x140007109
mov eax, r14d
movsx r13d, byte [rax + rbx]
mov ebx, r13d
mov dword [rbp + 0x40], ebx
inc r14d
mov dword [rbp + 8], r14d
cmp r14d, ecx
jne 0x140007056
cmp ecx, 0x8000
jne 0x140007056
mov qword [rsp + 0x20], rsi
lea r9, [rbp]
mov r8d, ecx
mov rdx, qword [rbp + 0x30]
mov rcx, qword [rbp + 0x18]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140007179
mov r14d, esi
mov dword [rbp + 8], esi
movsxd rax, r15d
mov byte [rax + r12], bl
inc r15d
mov dword [rbp + 0x10], r15d
mov eax, dword [rbp + 0xc]
cmp r15d, eax
jne 0x1400070a4
add eax, 0x100
mov dword [rbp + 0xc], eax
mov dword [rbp + 0x44], eax
movsxd rcx, eax
call fcn.140006870
mov rbx, rax
movsxd r8, r15d
mov rdx, r12
mov rcx, rax
call fcn.1401bcd30
mov edx, 1
mov rcx, r12
call fcn.140002990
mov r12, rbx
mov qword [rbp + 0x38], rbx
movsxd rax, edi
mov rcx, qword [rbp + 0x48]
cmp r13b, byte [rax + rcx]
jne 0x1400070f7
inc edi
mov dword [rbp + 4], edi
movsxd rax, edi
cmp byte [rax + rcx], 0
jne 0x1400070fc
sub r15d, edi
movsxd rax, r15d
mov byte [rax + r12], 0
mov rcx, r12
call fcn.140006800
mov rdx, rax
mov r9d, 0xffffffff
mov r8d, r9d
mov r13, qword [rbp + 0x28]
mov rcx, r13
call fcn.140006b80
mov r15d, esi
mov dword [rbp + 0x10], esi
mov edi, esi
mov dword [rbp + 4], esi
jmp 0x140007100
mov edi, esi
mov dword [rbp + 4], esi
mov r13, qword [rbp + 0x28]
mov rbx, qword [rbp + 0x30]
jmp 0x140007000
movsxd rax, r15d
mov byte [rax + r12], 0
mov rcx, r12
call fcn.140006800
mov rdx, rax
mov r9d, 0xffffffff
mov r8d, r9d
mov rcx, r13
call fcn.140006b80
mov dword [r13 + 0x40], 1
mov eax, dword [rbp + 0x24]
and eax, 1
mov dword [r13 + 0x44], eax
mov dword [r13 + 0x48], esi
mov qword [r13 + 0xb0], rsi
mov dword [r13 + 0x54], 0x80000
mov qword [r13 + 0xa8], rsi
mov esi, 1
mov dword [rsp + 0x20], 0xffffffff
mov r9d, 0x1000
xor r8d, r8d
xor edx, edx
mov rcx, r13
call fcn.1400079b0
mov rdi, qword [rbp + 0x18]
test r12, r12
je 0x14000718f
mov edx, 1
mov rcx, r12
call fcn.140002990
test rdi, rdi
je 0x14000719d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rcx, qword [rbp + 0x50]
xor rcx, rbp
call fcn.1401bad70
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.140051300
test eax, eax
jne 0x140016ef4
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 0x140006e90