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

Disassembly:
push 0x228
push 0x4ad04ef0
call fcn.4ad01509
mov ecx, dword [ebp + 8]
mov ax, word [0x4ad40620]
cmp word [ecx], ax
je 0x4ad0b9df
push ecx
call fcn.4ad01b82
mov ebx, eax
mov dword [ebp - 0x234], ebx
test ebx, ebx
je 0x4ad19f33
and dword [ebp - 4], 0
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad04d09
sub eax, edx
sar eax, 1
lea eax, [ebx + eax*2]
mov dword [ebp - 0x230], eax
cmp eax, ebx
jbe 0x4ad04d31
lea ecx, [eax - 2]
cmp word [ecx], 0x20
je 0x4ad19f3b
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 0x4ad108de
cmp word [ebx + 2], 0x3a
jne 0x4ad108de
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 0x4ad19f42
cmp eax, edi
ja 0x4ad19f64
cmp word [ebp - 0x22c], 0
je 0x4ad1a007
cmp word [ebp - 0x22a], 0x3a
jne 0x4ad1a007
lea eax, [ebp - 0x22c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad04de9
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 0x4ad04e21
lea ecx, [eax - 2]
mov dx, word [ecx]
cmp dx, word [0x4ad40620]
je 0x4ad0868d
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 0x4ad19f81
cmp byte [0x4ad24081], 0
je 0x4ad04e5e
push 0
push edi
lea eax, [ebp - 0x22c]
push eax
call fcn.4ad038d6
test eax, eax
je 0x4ad19f64
cmp dword [ebp + 0xc], 2
je 0x4ad04e81
lea eax, [ebp - 0x22c]
push eax
call esi
cmp eax, 0xffffffff
je 0x4ad19fbd
test eax, 0x410
je 0x4ad19fd2
cmp dword [ebp + 0xc], 0
je 0x4ad04e9a
cmp dword [ebp + 0xc], 1
jne 0x4ad04eaf
mov ax, word [ebp - 0x238]
cmp ax, word [ebp - 0x22]
jne 0x4ad04eaf
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x4ad19f42
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.4ad01730
test eax, eax
jne 0x4ad19fef
push 0
push edi
push 0x4ad25220
call fcn.4ad03a9f
mov dword [ebp - 4], 0xfffffffe
call fcn.4ad04f11
xor eax, eax
call fcn.4ad013be
ret 8
mov eax, ecx
jmp 0x4ad04dfe
cmp word [ecx + 2], ax
jne 0x4ad04cea
mov eax, 0x400023c9
jmp 0x4ad04ee2
mov ax, word [ebp - 0x238]
jmp 0x4ad04d8d
push 8
pop eax
jmp 0x4ad04ee2
mov eax, ecx
jmp 0x4ad04d1a
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 0x4ad04ee2
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad240ac
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, 0xce
jmp 0x4ad04ee2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 2
je 0x4ad19fb2
cmp ebx, 3
je 0x4ad19fb2
cmp ebx, 0x7b
je 0x4ad19fb2
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad240ac
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, ebx
jmp 0x4ad04ee2
mov ebx, dword [ebp - 0x234]
jmp 0x4ad04e3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
jne 0x4ad19f4a
push 3
pop esi
jmp 0x4ad19f4a
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad240ac
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, 0x10b
jmp 0x4ad04ee2
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad240ac
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
jmp 0x4ad19f33
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad240ac
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
push 3
jmp 0x4ad19f35