Function at 0x140013c24
Capabilities:
Check if file exists
Get common file path
Get file attributes
Set current directory

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x290
mov rax, qword [0x14003d0f8]
xor rax, rsp
mov qword [rsp + 0x288], rax
mov qword [rsp + 0x28], rsp
mov r14d, edx
mov rbx, rcx
cmp word [rcx], 0x5c
je 0x14001ec5a
lea rcx, [rsp + 0x60]
call fcn.14000af14
mov al, byte [rsp + 0x270]
neg al
sbb rdx, rdx
and edx, 0x7ee3
add rdx, 0x104
lea rcx, [rsp + 0x60]
call fcn.14000ca40
xor r12d, r12d
test eax, eax
js 0x14001ec97
mov rcx, rbx
call fcn.14000b900
mov rbx, rax
mov qword [rsp + 0x38], rax
test rax, rax
je 0x14001ec97
or rsi, 0xffffffffffffffff
mov rax, rsi
inc rax
cmp word [rbx + rax*2], r12w
jne 0x140013cbf
lea rax, [rbx + rax*2]
mov qword [rsp + 0x30], rax
mov rcx, rax
cmp rax, rbx
jbe 0x140013ce5
cmp word [rax - 2], 0x20
je 0x140013faa
mov word [rax], r12w
lea rdx, [rsp + 0x60]
mov rax, qword [rsp + 0x268]
test rax, rax
cmovne rdx, rax
mov rax, qword [rsp + 0x278]
mov qword [rsp + 0x20], rax
mov ecx, eax
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetCurrentDirectoryW]
nop dword [rax + rax]
lea rcx, [rsp + 0x60]
mov rax, qword [rsp + 0x268]
test rax, rax
cmovne rcx, rax
movzx ecx, word [rcx]
call qword [sym.imp.msvcrt.dll_towupper]
nop dword [rax + rax]
movzx r15d, ax
mov eax, 0x3d
mov word [rsp + 0x280], ax
movzx ecx, word [rbx]
call qword [sym.imp.msvcrt.dll_iswalpha]
nop dword [rax + rax]
mov edi, 0x3a
test eax, eax
je 0x140013fb8
cmp word [rbx + 2], di
jne 0x140013fb8
movzx ecx, word [rbx]
call qword [sym.imp.msvcrt.dll_towupper]
nop dword [rax + rax]
mov word [rsp + 0x282], ax
mov dword [rsp + 0x284], 0x3a
lea r8, [rsp + 0x60]
mov rax, qword [rsp + 0x268]
test rax, rax
cmovne r8, rax
mov rax, qword [rsp + 0x278]
mov qword [rsp + 0x40], rax
lea r9, [rsp + 0x30]
mov edx, eax
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFullPathNameW]
nop dword [rax + rax]
test eax, eax
je 0x140013fc6
mov eax, eax
cmp rax, qword [rsp + 0x278]
ja 0x140013ff1
lea rax, [rsp + 0x60]
mov rcx, qword [rsp + 0x268]
test rcx, rcx
cmovne rax, rcx
cmp word [rax], r12w
je 0x1400140fe
lea rax, [rsp + 0x60]
test rcx, rcx
cmovne rax, rcx
cmp word [rax + 2], di
jne 0x1400140fe
lea rdx, [rsp + 0x60]
test rcx, rcx
cmovne rdx, rcx
lea rax, [rsp + 0x60]
cmovne rax, rcx
inc rsi
cmp word [rax + rsi*2], r12w
jne 0x140013e2c
lea rdx, [rdx + rsi*2]
mov qword [rsp + 0x30], rdx
mov r8, rdx
lea rax, [rsp + 0x60]
test rcx, rcx
cmovne rax, rcx
add rax, 6
cmp r8, rax
jbe 0x140013e66
lea r8, [rdx - 2]
cmp word [r8], 0x5c
je 0x140013f9d
mov word [rdx], r12w
lea rcx, [rsp + 0x60]
mov rax, qword [rsp + 0x268]
test rax, rax
cmovne rcx, rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
nop dword [rax + rax]
or edi, 0xffffffff
cmp eax, edi
je 0x14001400c
cmp byte [0x140045b25], r12b
je 0x140013ecf
mov rdx, qword [rsp + 0x278]
mov qword [rsp + 0x48], rdx
lea rcx, [rsp + 0x60]
mov rax, qword [rsp + 0x268]
test rax, rax
cmovne rcx, rax
xor r8d, r8d
call fcn.140012978
test eax, eax
je 0x14001404c
cmp r14d, 2
je 0x140013f08
lea rcx, [rsp + 0x60]
mov rax, qword [rsp + 0x268]
test rax, rax
cmovne rcx, rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
nop dword [rax + rax]
cmp eax, edi
je 0x140014067
test eax, 0x410
je 0x14001409d
test r14d, r14d
je 0x140013f1e
cmp r14d, 1
jne 0x140013f46
cmp r15w, word [rsp + 0x282]
jne 0x140013f46
lea rcx, [rsp + 0x60]
mov rax, qword [rsp + 0x268]
test rax, rax
cmovne rcx, rax
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetCurrentDirectoryW]
nop dword [rax + rax]
test eax, eax
je 0x1400140b8
lea rdx, [rsp + 0x60]
mov rax, qword [rsp + 0x268]
test rax, rax
cmovne rdx, rax
lea rcx, [rsp + 0x280]
call fcn.14001498c
test eax, eax
jne 0x1400140e3
mov rdx, qword [0x140058468]
mov qword [rsp + 0x50], rdx
mov rax, qword [0x140058458]
lea rcx, [0x140058250]
test rax, rax
cmovne rcx, rax
xor r8d, r8d
call fcn.14001417c
jmp 0x14001411a
mov rdx, r8
mov qword [rsp + 0x30], rdx
jmp 0x140013e42
lea rax, [rcx - 2]
mov qword [rsp + 0x30], rax
jmp 0x140013cd2
mov word [rsp + 0x282], r15w
jmp 0x140013d89
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x60]
call fcn.14001855c
lea rdx, [0x14001415d]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rcx, [rsp + 0x60]
call fcn.14001855c
lea rdx, [0x14001ec6f]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [rsp + 0x20], eax
lea ecx, [rax - 2]
cmp ecx, 1
jbe 0x140013e95
cmp eax, 0x7b
je 0x140013e95
lea rcx, [rsp + 0x60]
call fcn.14001855c
lea rdx, [0x140014163]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rcx, [rsp + 0x60]
call fcn.14001855c
lea rdx, [0x14001ec79]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ecx, 3
cmp eax, 2
cmove eax, ecx
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x60]
call fcn.14001855c
lea rdx, [0x140014169]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rcx, [rsp + 0x60]
call fcn.14001855c
lea rdx, [0x14001ec83]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x60]
call fcn.14001855c
lea rdx, [0x14001416f]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rcx, [rsp + 0x60]
call fcn.14001855c
lea rdx, [0x14001eca1]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rcx, [rsp + 0x60]
call fcn.14001855c
lea rdx, [0x14001ec8d]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
nop
mov rcx, rbx
call fcn.14000ff70
lea rcx, [rsp + 0x60]
call fcn.14001855c
xor eax, eax
mov rcx, qword [rsp + 0x288]
xor rcx, rsp
call fcn.140018f80
lea r11, [rsp + 0x290]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
ret
cmp word [rcx + 2], 0x5c
jne 0x140013c67
mov eax, 0x400023c9
jmp 0x14001412e
lea rcx, [rsp + 0x60]
call fcn.14001855c
mov eax, 8
jmp 0x14001412e