Function at 0x1400068c4
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 [0x140287940]
xor rax, rbp
mov qword [rbp + 0x50], rax
mov rbx, rdx
mov r13, rcx
xor r14d, r14d
mov r12d, r14d
mov qword [rbp + 0x38], r14
mov eax, 0x100
mov dword [rbp + 0xc], eax
mov ecx, eax
call fcn.1400064a8
mov rdi, rax
mov qword [rbp + 0x30], rax
mov esi, r14d
mov dword [rbp + 0x20], r14d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [rbp + 0x1c], eax
lea r15d, [r14 + 1]
cmp eax, 0xffffffff
je 0x140006c96
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x8000080
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, r15d
mov edx, 0x80000000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
mov qword [rbp + 0x38], rax
cmp rax, 0xffffffffffffffff
je 0x140006c96
mov dword [rbp + 0x10], r14d
mov ecx, 0x8000
mov eax, ecx
call fcn.1401bc630
sub rsp, rcx
lea rbx, [rsp + 0x40]
mov qword [rbp + 0x28], rbx
xor eax, eax
mov qword [rsp + 0x20], rax
lea r9, [rbp]
mov r8d, ecx
mov rdx, rbx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor r8d, r8d
test eax, eax
je 0x140006c96
mov ecx, r8d
mov r9b, 0xa
mov edx, dword [rbp]
mov dword [rbp + 0x14], ecx
cmp ecx, edx
jae 0x1400069e1
mov eax, ecx
cmp byte [rax + rbx], 0xd
je 0x1400069e1
cmp byte [rax + rbx], r9b
je 0x1400069e1
add ecx, r15d
jmp 0x1400069c7
cmp r8d, edx
jne 0x1400069eb
mov eax, r8d
jmp 0x140006a0b
cmp byte [rbx], r9b
jne 0x1400069f5
mov eax, r15d
jmp 0x140006a0b
lea eax, [rdx - 1]
cmp r8d, eax
jae 0x140006a06
cmp byte [rbx + 1], r9b
mov eax, r8d
je 0x140006a0b
mov eax, 2
mov dword [r13 + 0x4c], eax
lea rcx, [0x140247b10]
mov rax, qword [rcx + rax*8]
mov qword [rbp + 0x48], rax
lea rcx, [r13 + 0x58]
xor edx, edx
mov r8d, 0x1000
call fcn.1400085a0
xor r8d, r8d
mov edx, r8d
mov dword [rbp + 8], edx
mov esi, r8d
mov dword [rbp + 4], r8d
mov ecx, dword [rbp]
cmp edx, ecx
jae 0x140006bb6
mov eax, edx
movsx ebx, byte [rax + rbx]
mov dword [rbp + 0x18], ebx
add edx, r15d
mov dword [rbp + 8], edx
cmp edx, ecx
jne 0x140006a8d
cmp ecx, 0x8000
jne 0x140006a8d
mov qword [rsp + 0x20], r8
lea r9, [rbp]
mov r8d, ecx
mov rdx, qword [rbp + 0x28]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor r8d, r8d
test eax, eax
je 0x140006c93
mov dword [rbp + 8], r8d
movsxd rax, r14d
mov byte [rax + rdi], bl
add r14d, r15d
mov dword [rbp + 0x10], r14d
mov eax, dword [rbp + 0xc]
cmp r14d, eax
jne 0x140006adb
add eax, 0x100
mov dword [rbp + 0xc], eax
mov dword [rbp + 0x40], eax
movsxd rcx, eax
call fcn.1400064a8
mov rbx, rax
movsxd r8, r14d
mov rdx, rdi
mov rcx, rax
call fcn.1401bddd0
mov rdx, r15
mov rcx, rdi
call fcn.140002c88
mov rdi, rbx
mov qword [rbp + 0x30], rbx
mov ebx, dword [rbp + 0x18]
movsxd rax, esi
mov rcx, qword [rbp + 0x48]
xor r8d, r8d
cmp bl, byte [rax + rcx]
jne 0x140006ba3
add esi, r15d
mov dword [rbp + 4], esi
movsxd rax, esi
cmp byte [rax + rcx], r8b
jne 0x140006baa
sub r14d, esi
movsxd rax, r14d
mov byte [rax + rdi], r8b
test rdi, rdi
je 0x140006b87
or rax, 0xffffffffffffffff
inc rax
cmp byte [rdi + rax], r8b
jne 0x140006b14
lea edx, [rax + 1]
cmp edx, 0x3fffffff
jg 0x140006b87
cdqe
lea rax, [rax*2 + 2]
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x140006b45
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.1401bc630
sub rsp, rcx
lea rbx, [rsp + 0x40]
test rbx, rbx
je 0x140006b87
mov word [rbx], r8w
mov dword [rsp + 0x28], edx
mov qword [rsp + 0x20], rbx
or r9d, 0xffffffff
mov r8, rdi
xor edx, edx
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
neg eax
sbb rdx, rdx
and rdx, rbx
jmp 0x140006b8a
mov rdx, r8
or r9d, 0xffffffff
or r8d, r9d
mov rcx, r13
call fcn.1400066b4
xor r8d, r8d
mov r14d, r8d
mov dword [rbp + 0x10], r8d
mov dword [rbp + 4], r8d
mov esi, r8d
mov edx, dword [rbp + 8]
mov rbx, qword [rbp + 0x28]
jmp 0x140006a3f
movsxd rax, r14d
mov byte [rax + rdi], r8b
or r14, 0xffffffffffffffff
test rdi, rdi
je 0x140006c3b
mov rax, r14
inc rax
cmp byte [rdi + rax], r8b
jne 0x140006bc9
lea edx, [rax + 1]
cmp edx, 0x3fffffff
jg 0x140006c3b
cdqe
lea rax, [rax*2 + 2]
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x140006bfa
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.1401bc630
sub rsp, rcx
lea rbx, [rsp + 0x40]
test rbx, rbx
je 0x140006c3b
mov word [rbx], r8w
mov dword [rsp + 0x28], edx
mov qword [rsp + 0x20], rbx
mov r9d, r14d
mov r8, rdi
xor edx, edx
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
neg eax
sbb rdx, rdx
and rdx, rbx
jmp 0x140006c3e
mov rdx, r8
mov r9d, r14d
mov r8d, r14d
mov rcx, r13
call fcn.1400066b4
mov dword [r13 + 0x40], r15d
mov eax, dword [rbp + 0x1c]
and eax, r15d
mov dword [r13 + 0x44], eax
xor eax, eax
mov dword [r13 + 0x48], eax
mov qword [r13 + 0xb0], rax
mov dword [r13 + 0x54], 0x80000
mov qword [r13 + 0xa8], rax
mov esi, r15d
mov dword [rsp + 0x20], r14d
mov r9d, 0x1000
xor r8d, r8d
xor edx, edx
mov rcx, r13
call fcn.140007618
jmp 0x140006c96
mov esi, dword [rbp + 0x20]
test rdi, rdi
je 0x140006ca6
mov rdx, r15
mov rcx, rdi
call fcn.140002c88
test r12, r12
je 0x140006cb4
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rcx, qword [rbp + 0x50]
xor rcx, rbp
call fcn.1401bbe60
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