Function at 0x140019554
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, 0x270
mov rax, qword [0x1400400b0]
xor rax, rsp
mov qword [rsp + 0x268], rax
mov qword [rsp + 0x28], rsp
mov r14d, edx
mov rbx, rcx
cmp word [rcx], 0x5c
je 0x140027756
lea rcx, [rsp + 0x40]
call fcn.1400176ac
mov al, byte [rsp + 0x250]
neg al
sbb rdx, rdx
and edx, 0x7ee3
add rdx, 0x104
lea rcx, [rsp + 0x40]
call fcn.140010e10
xor r12d, r12d
test eax, eax
js 0x140027793
mov rcx, rbx
call fcn.14000fcb0
mov rbx, rax
mov qword [rsp + 0x38], rax
test rax, rax
je 0x140027793
or rdi, 0xffffffffffffffff
mov rax, rdi
inc rax
cmp word [rbx + rax*2], r12w
jne 0x1400195ef
lea rcx, [rbx + rax*2]
mov qword [rsp + 0x30], rcx
mov rax, rcx
mov rdx, rcx
cmp rax, rbx
jbe 0x14001961e
lea rax, [rdx - 2]
mov rdx, rax
cmp word [rax], 0x20
je 0x14001990c
mov word [rcx], r12w
mov rcx, qword [rsp + 0x248]
test rcx, rcx
setne al
lea rdx, [rsp + 0x40]
test al, al
cmovne rdx, rcx
mov ecx, dword [rsp + 0x258]
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetCurrentDirectoryW]
nop dword [rax + rax]
mov rdx, qword [rsp + 0x248]
test rdx, rdx
setne al
lea rcx, [rsp + 0x40]
test al, al
cmovne rcx, rdx
movzx ecx, word [rcx]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_towupper]
nop dword [rax + rax]
movzx r15d, ax
mov eax, 0x3d
mov word [rsp + 0x260], ax
movzx ecx, word [rbx]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_iswalpha]
nop dword [rax + rax]
mov esi, 0x3a
test eax, eax
je 0x140019919
cmp word [rbx + 2], si
jne 0x140019919
movzx ecx, word [rbx]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_towupper]
nop dword [rax + rax]
mov word [rsp + 0x262], ax
mov dword [rsp + 0x264], 0x3a
mov rcx, qword [rsp + 0x248]
test rcx, rcx
setne al
lea r8, [rsp + 0x40]
test al, al
cmovne r8, rcx
lea r9, [rsp + 0x30]
mov edx, dword [rsp + 0x258]
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 0x140019927
mov eax, eax
lea rcx, [rsp + 0x40]
cmp rax, qword [rsp + 0x258]
ja 0x140019952
mov rdx, qword [rsp + 0x248]
test rdx, rdx
setne al
test al, al
cmovne rcx, rdx
cmp word [rcx], r12w
je 0x140019a5a
test rdx, rdx
setne al
lea rcx, [rsp + 0x40]
test al, al
cmovne rcx, rdx
cmp word [rcx + 2], si
jne 0x140019a5a
test rdx, rdx
setne al
lea r8, [rsp + 0x40]
test al, al
cmovne r8, rdx
test rdx, rdx
setne al
lea rcx, [rsp + 0x40]
test al, al
cmovne rcx, rdx
inc rdi
cmp word [rcx + rdi*2], r12w
jne 0x14001977b
lea r8, [r8 + rdi*2]
mov qword [rsp + 0x30], r8
test rdx, rdx
setne al
lea rcx, [rsp + 0x40]
test al, al
cmovne rcx, rdx
lea rax, [rcx + 6]
cmp r8, rax
jbe 0x1400197b6
lea rax, [r8 - 2]
cmp word [rax], 0x5c
je 0x1400198ff
mov word [r8], r12w
mov rdx, qword [rsp + 0x248]
test rdx, rdx
setne al
lea rcx, [rsp + 0x40]
test al, al
cmovne rcx, rdx
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 0x140019968
cmp byte [0x14004cbc5], r12b
je 0x140019823
mov rdx, qword [rsp + 0x248]
test rdx, rdx
setne al
lea rcx, [rsp + 0x40]
test al, al
cmovne rcx, rdx
xor r8d, r8d
mov edx, dword [rsp + 0x258]
call fcn.140017b10
test eax, eax
je 0x1400199a8
cmp r14d, 2
je 0x140019861
mov rdx, qword [rsp + 0x248]
test rdx, rdx
setne al
lea rcx, [rsp + 0x40]
test al, al
cmovne rcx, rdx
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
nop dword [rax + rax]
cmp eax, edi
je 0x1400199c3
test eax, 0x410
je 0x1400199f9
test r14d, r14d
je 0x140019877
cmp r14d, 1
jne 0x1400198a4
cmp r15w, word [rsp + 0x262]
jne 0x1400198a4
mov rdx, qword [rsp + 0x248]
test rdx, rdx
setne al
lea rcx, [rsp + 0x40]
test al, al
cmovne rcx, rdx
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetCurrentDirectoryW]
nop dword [rax + rax]
test eax, eax
je 0x140019a14
mov rcx, qword [rsp + 0x248]
test rcx, rcx
setne al
lea rdx, [rsp + 0x40]
test al, al
cmovne rdx, rcx
lea rcx, [rsp + 0x260]
call fcn.14001a328
test eax, eax
jne 0x140019a3f
mov r8, qword [0x14005b848]
test r8, r8
setne al
lea rcx, [0x14005b640]
test al, al
cmovne rcx, r8
xor r8d, r8d
mov edx, dword [0x14005b858]
call fcn.14001a478
jmp 0x140019a76
mov r8, rax
mov qword [rsp + 0x30], rax
jmp 0x14001978e
mov rcx, rax
mov qword [rsp + 0x30], rax
jmp 0x140019608
mov word [rsp + 0x262], r15w
jmp 0x1400196c4
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 + 0x40]
call fcn.14001e0bc
lea rdx, [0x140019ab9]
mov rcx, qword [rsp + 0x28]
call sub.api_ms_win_crt_private_l1_1_0.dll__local_unwind
call fcn.14001e0bc
lea rdx, [0x14002776b]
mov rcx, qword [rsp + 0x28]
call sub.api_ms_win_crt_private_l1_1_0.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 0x1400197ea
cmp eax, 0x7b
je 0x1400197ea
lea rcx, [rsp + 0x40]
call fcn.14001e0bc
lea rdx, [0x140019abf]
mov rcx, qword [rsp + 0x28]
call sub.api_ms_win_crt_private_l1_1_0.dll__local_unwind
lea rcx, [rsp + 0x40]
call fcn.14001e0bc
lea rdx, [0x140027775]
mov rcx, qword [rsp + 0x28]
call sub.api_ms_win_crt_private_l1_1_0.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 + 0x40]
call fcn.14001e0bc
lea rdx, [0x140019ac5]
mov rcx, qword [rsp + 0x28]
call sub.api_ms_win_crt_private_l1_1_0.dll__local_unwind
lea rcx, [rsp + 0x40]
call fcn.14001e0bc
lea rdx, [0x14002777f]
mov rcx, qword [rsp + 0x28]
call sub.api_ms_win_crt_private_l1_1_0.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 + 0x40]
call fcn.14001e0bc
lea rdx, [0x140019acb]
mov rcx, qword [rsp + 0x28]
call sub.api_ms_win_crt_private_l1_1_0.dll__local_unwind
lea rcx, [rsp + 0x40]
call fcn.14001e0bc
lea rdx, [0x14002779d]
mov rcx, qword [rsp + 0x28]
call sub.api_ms_win_crt_private_l1_1_0.dll__local_unwind
lea rcx, [rsp + 0x40]
call fcn.14001e0bc
lea rdx, [0x140027789]
mov rcx, qword [rsp + 0x28]
call sub.api_ms_win_crt_private_l1_1_0.dll__local_unwind
nop
mov rcx, rbx
call fcn.140014240
lea rcx, [rsp + 0x40]
call fcn.14001e0bc
xor eax, eax
mov rcx, qword [rsp + 0x268]
xor rcx, rsp
call fcn.14001f920
lea r11, [rsp + 0x270]
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 0x140019597
mov eax, 0x400023c9
jmp 0x140019a8a
lea rcx, [rsp + 0x40]
call fcn.14001e0bc
mov eax, 8
jmp 0x140019a8a