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

Disassembly:
mov eax, ecx
jmp 0x4ad07145
push 0x228
push 0x4ad07238
call fcn.4ad013e1
mov ecx, dword [ebp + 8]
mov ax, word [0x4ad40664]
cmp word [ecx], ax
je 0x4ad0c15b
push ecx
call fcn.4ad019d6
mov ebx, eax
mov dword [ebp - 0x234], ebx
test ebx, ebx
je 0x4ad19f11
and dword [ebp - 4], 0
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad07050
sub eax, edx
sar eax, 1
lea eax, [ebx + eax*2]
mov dword [ebp - 0x230], eax
cmp eax, ebx
jbe 0x4ad07078
lea ecx, [eax - 2]
cmp word [ecx], 0x20
je 0x4ad19f19
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x22c]
push eax
mov edi, 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push dword [ebp - 0x22c]
mov esi, dword [sym.imp.msvcrt.dll_towupper]
call esi
movzx eax, ax
mov dword [ebp - 0x238], eax
push 0x3d
pop eax
mov word [ebp - 0x24], ax
movzx eax, word [ebx]
push eax
call dword [sym.imp.msvcrt.dll_iswalpha]
pop ecx
pop ecx
test eax, eax
je 0x4ad1055a
cmp word [ebx + 2], 0x3a
jne 0x4ad1055a
movzx eax, word [ebx]
push eax
call esi
pop ecx
mov word [ebp - 0x22], ax
push 0x3a
pop eax
mov word [ebp - 0x20], ax
xor eax, eax
mov word [ebp - 0x1e], ax
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x22c]
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x4ad19f20
cmp eax, edi
ja 0x4ad19f42
cmp word [ebp - 0x22c], 0
je 0x4ad19fe5
cmp word [ebp - 0x22a], 0x3a
jne 0x4ad19fe5
lea eax, [ebp - 0x22c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad07130
sub eax, edx
sar eax, 1
lea eax, [ebp + eax*2 - 0x22c]
mov dword [ebp - 0x230], eax
lea ecx, [ebp - 0x226]
cmp eax, ecx
jbe 0x4ad07168
lea ecx, [eax - 2]
mov dx, word [ecx]
cmp dx, word [0x4ad40664]
je 0x4ad02ccf
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x22c]
push eax
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
call esi
cmp eax, 0xffffffff
je 0x4ad19f5f
cmp byte [0x4ad24081], 0
je 0x4ad071a5
push 0
push edi
lea eax, [ebp - 0x22c]
push eax
call fcn.4ad06e47
test eax, eax
je 0x4ad19f42
cmp dword [ebp + 0xc], 2
je 0x4ad071c8
lea eax, [ebp - 0x22c]
push eax
call esi
cmp eax, 0xffffffff
je 0x4ad19f9b
test eax, 0x410
je 0x4ad19fb0
cmp dword [ebp + 0xc], 0
je 0x4ad071e1
cmp dword [ebp + 0xc], 1
jne 0x4ad071f6
mov ax, word [ebp - 0x238]
cmp ax, word [ebp - 0x22]
jne 0x4ad071f6
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x4ad19f20
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.4ad01730
test eax, eax
jne 0x4ad19fcd
push 0
push edi
push 0x4ad25260
call fcn.4ad02c56
mov dword [ebp - 4], 0xfffffffe
call fcn.4ad07259
xor eax, eax
call fcn.4ad013ca
ret 8
cmp word [ecx + 2], ax
jne 0x4ad07031
mov eax, 0x400023c9
jmp 0x4ad07229
mov ax, word [ebp - 0x238]
jmp 0x4ad070d4
push 8
pop eax
jmp 0x4ad07229
mov eax, ecx
jmp 0x4ad07061
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad240ac
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, esi
jmp 0x4ad07229
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad240ac
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, 0xce
jmp 0x4ad07229
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 2
je 0x4ad19f90
cmp ebx, 3
je 0x4ad19f90
cmp ebx, 0x7b
je 0x4ad19f90
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad240ac
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, ebx
jmp 0x4ad07229
mov ebx, dword [ebp - 0x234]
jmp 0x4ad07185
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
jne 0x4ad19f28
push 3
pop esi
jmp 0x4ad19f28
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad240ac
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, 0x10b
jmp 0x4ad07229
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad240ac
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
jmp 0x4ad19f11
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad240ac
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
push 3
jmp 0x4ad19f13