Function at 0x140012d04
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 [0x14003b0f8]
xor rax, rsp
mov qword [rsp + 0x288], rax
mov qword [rsp + 0x28], rsp
mov r14d, edx
mov rbx, rcx
cmp word [rcx], 0x5c
je 0x14001e298
lea rcx, [rsp + 0x60]
call fcn.14000a6f8
mov al, byte [rsp + 0x270]
neg al
sbb rdx, rdx
and edx, 0x7ee3
add rdx, 0x104
lea rcx, [rsp + 0x60]
call fcn.14000c130
xor r12d, r12d
test eax, eax
js 0x14001e2ad
mov rcx, rbx
call fcn.14000b070
mov rbx, rax
mov qword [rsp + 0x38], rax
test rax, rax
je 0x14001e2ad
or rsi, 0xffffffffffffffff
mov rax, rsi
inc rax
cmp word [rbx + rax*2], r12w
jne 0x140012d9f
lea rax, [rbx + rax*2]
mov qword [rsp + 0x30], rax
mov rcx, rax
cmp rax, rbx
jbe 0x140012dc5
cmp word [rax - 2], 0x20
je 0x140013059
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]
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]
movzx r15d, ax
mov eax, 0x3d
mov word [rsp + 0x280], ax
movzx ecx, word [rbx]
call qword [sym.imp.msvcrt.dll_iswalpha]
mov edi, 0x3a
test eax, eax
je 0x140013067
cmp word [rbx + 2], di
jne 0x140013067
movzx ecx, word [rbx]
call qword [sym.imp.msvcrt.dll_towupper]
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]
test eax, eax
je 0x140013075
mov eax, eax
cmp rax, qword [rsp + 0x278]
ja 0x14001309a
lea rax, [rsp + 0x60]
mov rcx, qword [rsp + 0x268]
test rcx, rcx
cmovne rax, rcx
cmp word [rax], r12w
je 0x14001319f
lea rax, [rsp + 0x60]
test rcx, rcx
cmovne rax, rcx
cmp word [rax + 2], di
jne 0x14001319f
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 0x140012eee
lea r8, [rdx + rsi*2]
mov qword [rsp + 0x30], r8
mov rdx, r8
test rcx, rcx
mov rax, rcx
je 0x1400130b5
add rax, 6
cmp rdx, rax
jbe 0x140012f27
lea rdx, [r8 - 2]
cmp word [rdx], 0x5c
je 0x14001304c
mov word [r8], 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]
or edi, 0xffffffff
cmp eax, edi
je 0x1400130bf
cmp byte [0x140043aa5], r12b
je 0x140012f8a
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.140011940
test eax, eax
je 0x1400130f9
cmp r14d, 2
je 0x140012fbd
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]
cmp eax, edi
je 0x140013114
test eax, 0x410
je 0x140013144
test r14d, r14d
je 0x140012fd3
cmp r14d, 1
jne 0x140012ff5
cmp r15w, word [rsp + 0x282]
jne 0x140012ff5
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]
test eax, eax
je 0x14001315f
lea rdx, [rsp + 0x60]
mov rax, qword [rsp + 0x268]
test rax, rax
cmovne rdx, rax
lea rcx, [rsp + 0x280]
call fcn.1400139b8
test eax, eax
jne 0x140013184
mov rdx, qword [0x140056678]
mov qword [rsp + 0x50], rdx
mov rax, qword [0x140056668]
lea rcx, [0x140056460]
test rax, rax
cmovne rcx, rax
xor r8d, r8d
call fcn.14001321c
jmp 0x1400131bb
mov r8, rdx
mov qword [rsp + 0x30], rdx
jmp 0x140012f04
lea rax, [rcx - 2]
mov qword [rsp + 0x30], rax
jmp 0x140012db2
mov word [rsp + 0x282], r15w
jmp 0x140012e51
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x60]
call fcn.140017138
lea rdx, [0x1400131fd]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rcx, [rsp + 0x60]
call fcn.140017138
lea rdx, [0x14001e2c1]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rax, [rsp + 0x60]
jmp 0x140012f10
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea ecx, [rax - 2]
cmp ecx, 1
jbe 0x140012f50
cmp eax, 0x7b
je 0x140012f50
lea rcx, [rsp + 0x60]
call fcn.140017138
lea rdx, [0x140013203]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rcx, [rsp + 0x60]
call fcn.140017138
lea rdx, [0x14001e2cb]
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]
mov ecx, 3
cmp eax, 2
cmove eax, ecx
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x60]
call fcn.140017138
lea rdx, [0x140013209]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rcx, [rsp + 0x60]
call fcn.140017138
lea rdx, [0x14001e2d5]
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]
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x60]
call fcn.140017138
lea rdx, [0x14001320f]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rcx, [rsp + 0x60]
call fcn.140017138
lea rdx, [0x14001e2df]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rcx, [rsp + 0x60]
call fcn.140017138
lea rdx, [0x14001e2e9]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
nop
mov rcx, rbx
call fcn.14000f5b0
lea rcx, [rsp + 0x60]
call fcn.140017138
xor eax, eax
mov rcx, qword [rsp + 0x288]
xor rcx, rsp
call fcn.1400182e0
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 0x140012d47
mov eax, 0x400023c9
jmp 0x1400131cf
lea rcx, [rsp + 0x60]
call fcn.140017138
mov eax, 8
jmp 0x1400131cf