Function at 0x14000bb78
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 [0x1400390f8]
xor rax, rsp
mov qword [rsp + 0x288], rax
mov qword [rsp + 0x28], rsp
mov r14d, edx
mov rbx, rcx
cmp word [rcx], 0x5c
je 0x14001a7ec
lea rcx, [rsp + 0x60]
call fcn.1400105f0
mov al, byte [rsp + 0x270]
neg al
sbb rdx, rdx
and edx, 0x7ee3
add rdx, 0x104
lea rcx, [rsp + 0x60]
call fcn.1400104d0
xor r12d, r12d
test eax, eax
js 0x14001a801
mov rcx, rbx
call fcn.14000d340
mov rbx, rax
mov qword [rsp + 0x38], rax
test rax, rax
je 0x14001a801
or rsi, 0xffffffffffffffff
mov rax, rsi
inc rax
cmp word [rbx + rax*2], r12w
jne 0x14000bc13
lea rax, [rbx + rax*2]
mov qword [rsp + 0x30], rax
mov rcx, rax
cmp rcx, rbx
jbe 0x14000bc3c
lea rcx, [rax - 2]
cmp word [rcx], 0x20
je 0x14000bed6
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 0x14000bee3
cmp word [rbx + 2], di
jne 0x14000bee3
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 0x14000bef1
mov eax, eax
cmp rax, qword [rsp + 0x278]
ja 0x14000bf16
lea rax, [rsp + 0x60]
mov rcx, qword [rsp + 0x268]
test rcx, rcx
cmovne rax, rcx
cmp word [rax], r12w
je 0x14000c01e
lea rax, [rsp + 0x60]
test rcx, rcx
cmovne rax, rcx
cmp word [rax + 2], di
jne 0x14000c01e
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 0x14000bd65
lea r8, [rdx + rsi*2]
mov qword [rsp + 0x30], r8
mov rdx, r8
mov r9, r8
test rcx, rcx
je 0x14000bf31
mov rax, rcx
add rax, 6
cmp rdx, rax
jbe 0x14000bda1
lea rdx, [r8 - 2]
cmp word [rdx], 0x5c
je 0x14000bec6
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 0x14000bf3e
cmp byte [0x1400502b9], r12b
je 0x14000be04
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.140012154
test eax, eax
je 0x14000bf78
cmp r14d, 2
je 0x14000be37
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 0x14000bf93
test eax, 0x410
je 0x14000bfc3
test r14d, r14d
je 0x14000be4d
cmp r14d, 1
jne 0x14000be6f
cmp r15w, word [rsp + 0x282]
jne 0x14000be6f
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 0x14000bfde
lea rdx, [rsp + 0x60]
mov rax, qword [rsp + 0x268]
test rax, rax
cmovne rdx, rax
lea rcx, [rsp + 0x280]
call fcn.14000b9d8
test eax, eax
jne 0x14000c003
mov rdx, qword [0x1400502a8]
mov qword [rsp + 0x50], rdx
mov rax, qword [0x140050298]
lea rcx, [0x140050090]
test rax, rax
cmovne rcx, rax
xor r8d, r8d
call fcn.14000bae4
jmp 0x14000c03a
mov r8, rdx
mov qword [rsp + 0x30], rdx
mov r9, rdx
jmp 0x14000bd7e
mov rax, rcx
mov qword [rsp + 0x30], rcx
jmp 0x14000bc29
mov word [rsp + 0x282], r15w
jmp 0x14000bcc8
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.1400106a8
lea rdx, [0x14000c07c]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rcx, [rsp + 0x60]
call fcn.1400106a8
lea rdx, [0x14001a815]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rax, [rsp + 0x60]
mov rdx, r9
jmp 0x14000bd8a
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 0x14000bdca
cmp eax, 0x7b
je 0x14000bdca
lea rcx, [rsp + 0x60]
call fcn.1400106a8
lea rdx, [0x14000c082]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rcx, [rsp + 0x60]
call fcn.1400106a8
lea rdx, [0x14001a81f]
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.1400106a8
lea rdx, [0x14000c088]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rcx, [rsp + 0x60]
call fcn.1400106a8
lea rdx, [0x14001a829]
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.1400106a8
lea rdx, [0x14000c08e]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rcx, [rsp + 0x60]
call fcn.1400106a8
lea rdx, [0x14001a833]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
lea rcx, [rsp + 0x60]
call fcn.1400106a8
lea rdx, [0x14001a83d]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
nop
mov rcx, rbx
call fcn.14000f250
lea rcx, [rsp + 0x60]
call fcn.1400106a8
xor eax, eax
mov rcx, qword [rsp + 0x288]
xor rcx, rsp
call fcn.1400173b0
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 0x14000bbbb
mov eax, 0x400023c9
jmp 0x14000c04e
lea rcx, [rsp + 0x60]
call fcn.1400106a8
mov eax, 8
jmp 0x14000c04e