Function at 0x140006ea0
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 [0x1402837b0]
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.140006890
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 0x1400071a2
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 0x1400071a2
mov r15d, r14d
mov dword [rbp + 0x10], r14d
mov eax, 0x8000
call fcn.1401bb720
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 0x1400071a2
mov ecx, r14d
mov r8d, dword [rbp]
mov dword [rbp + 0x20], ecx
cmp ecx, r8d
jae 0x140006fb5
mov eax, ecx
movzx edx, byte [rax + rbx]
cmp dl, 0xd
je 0x140006fb5
cmp dl, 0xa
je 0x140006fb5
inc ecx
jmp 0x140006f99
cmp r14d, r8d
jne 0x140006fbf
mov eax, r14d
jmp 0x140006fe2
cmp byte [rbx], 0xa
jne 0x140006fcb
mov eax, 1
jmp 0x140006fe2
lea eax, [r8 - 1]
cmp r14d, eax
jae 0x140006fdd
cmp byte [rbx + 1], 0xa
mov eax, r14d
je 0x140006fe2
mov eax, 2
mov dword [r12 + 0x4c], eax
lea rcx, [0x1402479d0]
mov rcx, qword [rcx + rax*8]
mov qword [rbp + 0x48], rcx
lea rcx, [r12 + 0x58]
xor edx, edx
mov r8d, 0x1000
call fcn.140008b50
mov esi, r14d
mov dword [rbp + 8], r14d
mov edi, r14d
mov dword [rbp + 4], r14d
nop word [rax + rax]
mov ecx, dword [rbp]
cmp esi, ecx
jae 0x140007127
mov eax, esi
movsx r12d, byte [rax + rbx]
mov dword [rbp + 0x38], r12d
inc esi
mov dword [rbp + 8], esi
cmp esi, ecx
jne 0x14000706f
cmp ecx, 0x8000
jne 0x14000706f
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 0x14000719e
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 0x1400070c1
add eax, 0x100
mov dword [rbp + 0xc], eax
mov dword [rbp + 0x3c], eax
movsxd rcx, eax
call fcn.140006890
mov rbx, rax
movsxd r8, r15d
mov rdx, r13
mov rcx, rax
call fcn.1401bcce0
mov edx, 1
mov rcx, r13
call fcn.140002990
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 0x140007117
inc edi
mov dword [rbp + 4], edi
movsxd rax, edi
cmp byte [rax + rcx], 0
jne 0x14000711e
sub r15d, edi
movsxd rax, r15d
mov byte [rax + r13], 0
mov rcx, r13
call fcn.140006820
mov rdx, rax
mov r9d, 0xffffffff
mov r8d, r9d
mov r12, qword [rbp + 0x28]
mov rcx, r12
call fcn.140006ba0
mov r15d, r14d
mov dword [rbp + 0x10], r14d
mov edi, r14d
mov dword [rbp + 4], r14d
jmp 0x140007122
mov edi, r14d
mov dword [rbp + 4], r14d
mov r12, qword [rbp + 0x28]
jmp 0x140007020
movsxd rax, r15d
mov byte [rax + r13], 0
mov rcx, r13
call fcn.140006820
mov rdx, rax
mov r9d, 0xffffffff
mov r8d, r9d
mov rcx, r12
call fcn.140006ba0
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.140007a10
mov rdi, qword [rbp + 0x18]
test r13, r13
je 0x1400071b4
mov edx, 1
mov rcx, r13
call fcn.140002990
test rdi, rdi
je 0x1400071c2
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r14d
mov rcx, qword [rbp + 0x50]
xor rcx, rbp
call fcn.1401bacf0
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.14005164c
test eax, eax
jne 0x140016fc4
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 0x140006ea0