Function at 0x4ad07dc0
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 r13
push r14
sub rsp, 0x270
mov rax, qword [0x4ad2e1c8]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov qword [rsp + 0x28], rsp
mov r12d, edx
cmp word [rcx], 0x5c
jne 0x4ad07e0d
cmp word [rcx + 2], 0x5c
jne 0x4ad07e0d
mov eax, 0x400023c9
jmp 0x4ad08144
call fcn.4ad01880
mov rsi, rax
mov qword [rsp + 0x38], rax
xor r14d, r14d
cmp rax, r14
jne 0x4ad07e2b
lea eax, [r14 + 8]
jmp 0x4ad08144
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasw ax, word [rdi]
not rcx
lea rax, [rsi + rcx*2 - 2]
mov qword [rsp + 0x30], rax
cmp rax, rsi
jbe 0x4ad07e5d
lea rcx, [rax - 2]
cmp word [rcx], 0x20
jne 0x4ad07e5d
mov rax, rcx
mov qword [rsp + 0x30], rcx
jmp 0x4ad07e44
mov word [rax], r14w
lea rdx, [rsp + 0x50]
mov ebx, 0x104
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
movzx ecx, word [rsp + 0x50]
call qword [sym.imp.msvcrt.dll_towupper]
movzx r13d, ax
mov eax, 0x3d
mov word [rsp + 0x40], ax
movzx ecx, word [rsi]
call qword [sym.imp.msvcrt.dll_iswalpha]
cmp eax, r14d
je 0x4ad07eb5
mov edi, 0x3a
cmp word [rsi + 2], di
jne 0x4ad07eba
movzx ecx, word [rsi]
call qword [sym.imp.msvcrt.dll_towupper]
mov word [rsp + 0x42], ax
jmp 0x4ad07ec0
mov edi, 0x3a
mov word [rsp + 0x42], r13w
mov word [rsp + 0x44], di
mov word [rsp + 0x46], r14w
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x50]
mov edx, ebx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp eax, r14d
jne 0x4ad07f0b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea rdx, [0x4ad07f02]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
nop
nop
mov eax, dword [rsp + 0x20]
jmp 0x4ad08144
cmp eax, ebx
jbe 0x4ad07f2c
lea rdx, [0x4ad07f22]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
nop
nop
mov eax, 0xce
jmp 0x4ad08144
cmp word [rsp + 0x50], r14w
je 0x4ad0812c
cmp word [rsp + 0x52], di
jne 0x4ad0812c
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x50]
repne scasw ax, word [rdi]
not rcx
lea rax, [rsp + rcx*2 + 0x4e]
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x56]
cmp rax, rcx
jbe 0x4ad07f7c
lea rcx, [rax - 2]
cmp word [rcx], 0x5c
jne 0x4ad07f7c
mov rax, rcx
mov qword [rsp + 0x30], rcx
jmp 0x4ad07f5e
mov word [rax], r14w
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4ad07fd0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
cmp eax, 2
je 0x4ad07fc9
mov ebx, 3
cmp eax, ebx
je 0x4ad07fd5
cmp eax, 0x7b
je 0x4ad07fd5
lea rdx, [0x4ad07fc0]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
nop
nop
mov eax, dword [rsp + 0x20]
jmp 0x4ad08144
mov ebx, 3
jmp 0x4ad07fd5
mov ebx, 3
cmp byte [0x4ad2e0ca], r14b
je 0x4ad08031
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x50]
repne scasw ax, word [rdi]
not rcx
dec rcx
cmp ecx, 0x104
jg 0x4ad08014
mov r9d, ecx
xor r8d, r8d
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.4ad07770
cmp eax, r14d
jne 0x4ad08031
lea rdx, [0x4ad08027]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
nop
nop
mov eax, 0xce
jmp 0x4ad08144
cmp r12d, 2
je 0x4ad08097
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4ad08073
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
cmove eax, ebx
mov dword [rsp + 0x20], eax
lea rdx, [0x4ad0806a]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
nop
nop
mov eax, dword [rsp + 0x20]
jmp 0x4ad08144
test eax, 0x410
jne 0x4ad08097
lea rdx, [0x4ad0808d]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
nop
nop
mov eax, 0x10b
jmp 0x4ad08144
cmp r12d, r14d
je 0x4ad080aa
cmp r12d, 1
jne 0x4ad080dd
cmp r13w, word [rsp + 0x42]
jne 0x4ad080dd
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp eax, r14d
jne 0x4ad080dd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea rdx, [0x4ad080d7]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
nop
nop
mov eax, dword [rsp + 0x20]
jmp 0x4ad08144
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x40]
call fcn.4ad0134c
cmp eax, r14d
je 0x4ad0810b
lea rdx, [0x4ad08104]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
nop
nop
mov eax, 8
jmp 0x4ad08144
xor r8d, r8d
mov edx, 0x104
lea rcx, [0x4ad3c0a0]
call fcn.4ad05410
nop
mov rcx, rsi
call fcn.4ad01040
xor eax, eax
jmp 0x4ad08144
lea rdx, [0x4ad0813f]
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll__local_unwind
nop
nop
mov eax, 3
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.4ad01000
lea r11, [rsp + 0x270]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop r12
ret