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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x270
mov rax, qword [0x14002f008]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov qword [rsp + 0x28], rsp
mov r14d, edx
cmp word [rcx], 0x5c
je 0x14001b4b0
call fcn.140008660
mov rbx, rax
mov qword [rsp + 0x38], rax
xor r12d, r12d
test rax, rax
je 0x14001b4c5
or rsi, 0xffffffffffffffff
mov rax, rsi
inc rax
cmp word [rbx + rax*2], r12w
jne 0x1400112de
lea rax, [rbx + rax*2]
mov qword [rsp + 0x30], rax
cmp rax, rbx
jbe 0x140011304
lea rcx, [rax - 2]
cmp word [rcx], 0x20
je 0x14001149e
mov word [rax], r12w
lea rdx, [rsp + 0x50]
mov r13d, 0x104
mov ecx, r13d
call qword [sym.imp.api_ms_win_core_processenvironment_l1_2_0.dll_GetCurrentDirectoryW]
movzx ecx, word [rsp + 0x50]
call qword [sym.imp.msvcrt.dll_towupper]
movzx r15d, ax
mov eax, 0x3d
mov word [rsp + 0x40], ax
movzx ecx, word [rbx]
call qword [sym.imp.msvcrt.dll_iswalpha]
mov edi, 0x3a
test eax, eax
je 0x1400114ab
cmp word [rbx + 2], di
jne 0x1400114ab
movzx ecx, word [rbx]
call qword [sym.imp.msvcrt.dll_towupper]
mov word [rsp + 0x42], ax
mov dword [rsp + 0x44], 0x3a
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x50]
mov edx, r13d
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_GetFullPathNameW]
test eax, eax
je 0x1400114b6
cmp eax, r13d
ja 0x1400114d1
cmp word [rsp + 0x50], r12w
je 0x140011586
cmp word [rsp + 0x52], di
jne 0x140011586
lea rax, [rsp + 0x50]
inc rsi
cmp word [rax + rsi*2], r12w
jne 0x1400113ae
lea rax, [rsp + 0x50]
lea rax, [rax + rsi*2]
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x56]
cmp rax, rcx
jbe 0x1400113de
lea rcx, [rax - 2]
cmp word [rcx], 0x5c
je 0x140011491
mov word [rax], r12w
lea rcx, [rsp + 0x50]
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_GetFileAttributesW]
or edi, 0xffffffff
cmp eax, edi
je 0x1400114e2
cmp byte [0x140046d39], r12b
je 0x140011419
xor r8d, r8d
mov edx, r13d
lea rcx, [rsp + 0x50]
call fcn.14000e928
test eax, eax
je 0x140011512
cmp r14d, 2
je 0x14001143d
lea rcx, [rsp + 0x50]
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_GetFileAttributesW]
cmp eax, edi
je 0x140011523
test eax, 0x410
je 0x140011549
test r14d, r14d
je 0x140011450
cmp r14d, 1
jne 0x140011463
cmp r15w, word [rsp + 0x42]
jne 0x140011463
lea rcx, [rsp + 0x50]
call qword [sym.imp.api_ms_win_core_processenvironment_l1_2_0.dll_SetCurrentDirectoryW]
test eax, eax
je 0x14001155a
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x40]
call fcn.14000e278
test eax, eax
jne 0x140011575
xor r8d, r8d
mov edx, r13d
lea rcx, [0x140032600]
call fcn.1400115f0
jmp 0x140011598
mov rax, rcx
mov qword [rsp + 0x30], rcx
jmp 0x1400113c6
mov rax, rcx
mov qword [rsp + 0x30], rcx
jmp 0x1400112f1
mov word [rsp + 0x42], r15w
jmp 0x140011363
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea rdx, [0x1400115cf]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rdx, [0x14001b4cf]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea ecx, [rax - 2]
cmp ecx, 1
jbe 0x1400113f8
cmp eax, 0x7b
je 0x1400113f8
lea rdx, [0x1400115d5]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rdx, [0x14001b4d9]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov ecx, 3
cmp eax, 2
cmove eax, ecx
mov dword [rsp + 0x20], eax
lea rdx, [0x1400115db]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rdx, [0x14001b4e3]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea rdx, [0x1400115e1]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rdx, [0x14001b4ed]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rdx, [0x14001b4f7]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
nop
mov rcx, rbx
call fcn.14000b4a0
xor eax, eax
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.1400151c0
lea r11, [rsp + 0x270]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
cmp word [rcx + 2], 0x5c
jne 0x1400112be
mov eax, 0x400023c9
jmp 0x1400115a2
mov eax, 8
jmp 0x1400115a2