Function at 0x140231a10
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
mov rsi, r8
mov rax, qword [0x14039ce38]
xor rax, rsp
mov qword [rsp + 0x80], rax
lea rcx, [rsp + 0x40]
mov r8b, 1
xor r9d, r9d
call fcn.140231320
test rsi, rsi
je 0x140231b28
movzx eax, byte [rsi]
movzx ecx, byte [rsi + 1]
cmp al, 0x5c
jne 0x140231b05
cmp cl, 0x5c
jne 0x140231b05
lea rcx, [rsp + 0x48]
mov rdx, rsi
mov r8b, 1
xor r9d, r9d
call fcn.140231320
mov rsi, qword [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, 2
cmp eax, 0xffffffff
je 0x140231c99
test eax, 0x400
je 0x140231afa
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x2000000
mov dword [rsp + 0x20], 3
mov rcx, rsi
xor edx, edx
mov r8d, 7
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x140231c99
mov rdi, rax
lea rdx, [rsp + 0x48]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
mov ebp, eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x140231c99
mov eax, dword [rsp + 0x48]
shr eax, 4
and eax, 1
jmp 0x140231c8e
cmp cl, 0x3a
jne 0x140231b28
or al, 0x20
add al, 0x9f
cmp al, 0x19
ja 0x140231b28
movzx eax, byte [rsi + 2]
cmp eax, 0x5c
je 0x140231a65
cmp eax, 0x2f
je 0x140231a65
lea rcx, [rsp + 0x48]
mov rdx, rsi
call fcn.140233d50
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x40]
mov rcx, rdi
call fcn.14026c9a8
mov rbx, rax
mov rcx, rsi
call fcn.14026c9a8
lea rcx, [rbx + rax]
lea r14, [rbx + rax]
add r14, 2
lea rax, [rcx*2 + 4]
test r14, r14
mov r15, 0xffffffffffffffff
cmovns r15, rax
mov rcx, r15
call fcn.140258ed0
mov rbx, rax
mov rcx, rax
xor edx, edx
mov r8, r15
call fcn.14025c7b0
mov rcx, rbx
mov rdx, r14
mov r8, rdi
call fcn.14027e8a0
mov rcx, rbx
mov rdx, r14
call qword [sym.imp.api_ms_win_core_path_l1_1_0.dll_PathCchRemoveFileSpec]
test eax, eax
je 0x140231bb8
mov ecx, 5
cmp eax, 1
je 0x140231bd8
mov ecx, eax
jmp 0x140231bd8
mov dword [rsp + 0x20], 1
mov rcx, rbx
mov rdx, r14
mov r8, rbx
mov r9, rsi
call qword [sym.imp.api_ms_win_core_path_l1_1_0.dll_PathCchCombineEx]
mov ecx, eax
test eax, eax
je 0x140231bf6
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rbx
call fcn.140258ec8
xor ebp, ebp
test rsi, rsi
jne 0x140231cb9
jmp 0x140231cc6
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140231c15
test eax, 0x400
jne 0x140231c1c
shr eax, 4
and eax, 1
mov ebp, eax
jmp 0x140231c84
mov ebp, 5
jmp 0x140231c84
mov ebp, 5
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x2000000
mov dword [rsp + 0x20], 3
mov rcx, rbx
xor edx, edx
mov r8d, 7
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x140231c84
mov rdi, rax
lea rdx, [rsp + 0x48]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
mov ebp, eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x48]
shr eax, 4
and eax, 1
test ebp, ebp
mov ebp, 5
cmovne ebp, eax
mov rcx, rbx
call fcn.140258ec8
mov eax, ebp
xor ebx, ebx
cmp eax, 1
sete bl
or ebx, 2
mov rdi, qword [rsp + 0x40]
mov rcx, rdi
mov rdx, rsi
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_CreateSymbolicLinkW]
mov bpl, 1
test al, al
je 0x140231cf5
test rsi, rsi
je 0x140231cc6
mov rcx, rsi
call fcn.140258ec8
mov rdi, qword [rsp + 0x40]
test rdi, rdi
je 0x140231cd3
mov rcx, rdi
call fcn.140258ec8
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140258ea0
mov eax, ebp
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x140231be6
and ebx, 1
mov rcx, rdi
mov rdx, rsi
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_CreateSymbolicLinkW]
test al, al
setne bpl
test rsi, rsi
jne 0x140231cb9
jmp 0x140231cc6