Function at 0x140006424
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 [0x1402ba790]
xor rax, rbp
mov qword [rbp + 0x50], rax
mov rbx, rdx
mov r13, rcx
xor r14d, r14d
mov r15d, r14d
mov qword [rbp + 0x30], r14
mov eax, 0x100
mov dword [rbp + 0x10], eax
mov ecx, eax
call fcn.140005ed4
mov r12, rax
mov qword [rbp + 0x28], rax
mov esi, r14d
mov dword [rbp + 0x18], r14d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [rbp + 0x20], eax
lea edi, [r14 + 1]
cmp eax, 0xffffffff
je 0x1400066ef
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x8000080
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, edi
mov edx, 0x80000000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r15, rax
mov qword [rbp + 0x30], rax
cmp rax, 0xffffffffffffffff
je 0x1400066ef
mov ebx, r14d
mov dword [rbp], ebx
mov eax, 0x8000
call fcn.1401d5d50
sub rsp, rax
lea rsi, [rsp + 0x40]
mov qword [rbp + 0x40], rsi
mov qword [rsp + 0x20], r14
lea r9, [rbp + 4]
mov r8d, eax
mov rdx, rsi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400066ec
mov ecx, r14d
mov r8b, 0xa
mov edx, dword [rbp + 4]
mov dword [rbp + 0x1c], ecx
cmp ecx, edx
jae 0x14000653b
mov eax, ecx
cmp byte [rax + rsi], 0xd
je 0x14000653b
cmp byte [rax + rsi], r8b
je 0x14000653b
add ecx, edi
jmp 0x140006522
cmp r14d, edx
jne 0x140006545
mov eax, r14d
jmp 0x140006564
cmp byte [rsi], r8b
jne 0x14000654e
mov eax, edi
jmp 0x140006564
lea eax, [rdx - 1]
cmp r14d, eax
jae 0x14000655f
cmp byte [rsi + 1], r8b
mov eax, r14d
je 0x140006564
mov eax, 2
mov dword [r13 + 0x4c], eax
cdqe
lea rcx, [0x14026eef0]
mov rax, qword [rcx + rax*8]
mov qword [rbp + 0x48], rax
lea rcx, [r13 + 0x58]
xor edx, edx
mov r8d, 0x1000
call fcn.140007dfc
mov dword [rbp + 0xc], r14d
xor esi, esi
mov dword [rbp + 8], esi
mov ecx, dword [rbp + 4]
cmp r14d, ecx
jae 0x140006685
mov eax, r14d
mov rdx, qword [rbp + 0x40]
movsx eax, byte [rax + rdx]
mov dword [rbp + 0x14], eax
add r14d, edi
mov dword [rbp + 0xc], r14d
cmp r14d, ecx
jne 0x1400065e5
cmp ecx, 0x8000
jne 0x1400065e5
xor r14d, r14d
mov qword [rsp + 0x20], r14
lea r9, [rbp + 4]
mov r8d, ecx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400066ec
mov dword [rbp + 0xc], r14d
movsxd rax, ebx
mov ecx, dword [rbp + 0x14]
mov byte [rax + r12], cl
add ebx, edi
mov dword [rbp], ebx
mov eax, dword [rbp + 0x10]
cmp ebx, eax
jne 0x140006638
add eax, 0x100
mov dword [rbp + 0x10], eax
mov dword [rbp + 0x38], eax
movsxd rcx, eax
call fcn.140005ed4
mov rbx, rax
movsxd r8, dword [rbp]
mov rdx, r12
mov rcx, rax
call fcn.1401d6650
mov rdx, rdi
mov rcx, r12
call fcn.1400025e8
mov r12, rbx
mov qword [rbp + 0x28], rbx
mov ebx, dword [rbp]
mov ecx, dword [rbp + 0x14]
movsxd rax, esi
mov rdx, qword [rbp + 0x48]
cmp cl, byte [rax + rdx]
jne 0x14000667b
add esi, edi
mov dword [rbp + 8], esi
movsxd rax, esi
cmp byte [rax + rdx], 0
jne 0x140006680
sub ebx, esi
movsxd rax, ebx
mov byte [rax + r12], 0
mov rcx, r12
call fcn.140005e84
mov rdx, rax
or r9d, 0xffffffff
or r8d, r9d
mov rcx, r13
call fcn.140006174
xor ebx, ebx
mov dword [rbp], ebx
xor esi, esi
mov dword [rbp + 8], esi
jmp 0x140006593
movsxd rax, ebx
xor r14d, r14d
mov byte [rax + r12], r14b
mov rcx, r12
call fcn.140005e84
mov rdx, rax
or r9d, 0xffffffff
or r8d, r9d
mov rcx, r13
call fcn.140006174
mov dword [r13 + 0x40], edi
mov eax, dword [rbp + 0x20]
and eax, edi
mov dword [r13 + 0x44], eax
mov dword [r13 + 0x48], r14d
mov qword [r13 + 0xb0], r14
mov dword [r13 + 0x54], 0x80000
mov qword [r13 + 0xa8], r14
mov esi, edi
or dword [rsp + 0x20], 0xffffffff
mov r9d, 0x1000
xor r8d, r8d
xor edx, edx
mov rcx, r13
call fcn.140006e84
jmp 0x1400066ef
mov esi, dword [rbp + 0x18]
test r12, r12
je 0x1400066ff
mov rdx, rdi
mov rcx, r12
call fcn.1400025e8
test r15, r15
je 0x14000670d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rcx, qword [rbp + 0x50]
xor rcx, rbp
call fcn.1401d5080
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