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

Disassembly:
push 0x228
push 0x4ad07080
call fcn.4ad018b0
mov ecx, dword [ebp + 8]
mov ax, word [0x4ad40604]
cmp word [ecx], ax
je 0x4ad100ca
push ecx
call fcn.4ad01ebf
mov ebx, eax
mov dword [ebp - 0x234], ebx
test ebx, ebx
je 0x4ad19554
and dword [ebp - 4], 0
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad06ea6
sub eax, edx
sar eax, 1
lea eax, [ebx + eax*2]
mov dword [ebp - 0x230], eax
cmp eax, ebx
jbe 0x4ad06ece
lea ecx, [eax - 2]
cmp word [ecx], 0x20
je 0x4ad1955c
and word [eax], 0
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
mov word [ebp - 0x24], 0x3d
movzx eax, word [ebx]
push eax
call dword [sym.imp.msvcrt.dll_iswalpha]
pop ecx
pop ecx
test eax, eax
je 0x4ad12f9c
cmp word [ebx + 2], 0x3a
jne 0x4ad12f9c
movzx eax, word [ebx]
push eax
call esi
pop ecx
mov word [ebp - 0x22], ax
mov word [ebp - 0x20], 0x3a
xor esi, esi
mov word [ebp - 0x1e], si
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x22c]
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp eax, esi
je 0x4ad19563
cmp eax, edi
ja 0x4ad19585
cmp word [ebp - 0x22c], si
je 0x4ad19628
cmp word [ebp - 0x22a], 0x3a
jne 0x4ad19628
lea eax, [ebp - 0x22c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x4ad06f82
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 0x4ad06fba
lea ecx, [eax - 2]
mov dx, word [ecx]
cmp dx, word [0x4ad40604]
je 0x4ad08746
mov word [eax], si
lea eax, [ebp - 0x22c]
push eax
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
call esi
cmp eax, 0xffffffff
je 0x4ad195a2
cmp byte [0x4ad24041], 0
je 0x4ad06ff5
push 0
push edi
lea eax, [ebp - 0x22c]
push eax
call fcn.4ad06b5e
test eax, eax
je 0x4ad19585
cmp dword [ebp + 0xc], 2
je 0x4ad07017
lea eax, [ebp - 0x22c]
push eax
call esi
cmp eax, 0xffffffff
je 0x4ad195de
test ax, 0x410
je 0x4ad195f3
cmp dword [ebp + 0xc], 0
je 0x4ad07030
cmp dword [ebp + 0xc], 1
jne 0x4ad07045
mov ax, word [ebp - 0x238]
cmp ax, word [ebp - 0x22]
jne 0x4ad07045
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x4ad19563
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.4ad01624
test eax, eax
jne 0x4ad19610
push 0
push edi
push 0x4ad25200
call fcn.4ad0363f
mov dword [ebp - 4], 0xfffffffe
call fcn.4ad070a1
xor eax, eax
call fcn.4ad018a4
ret 8
mov eax, ecx
jmp 0x4ad06f97
cmp word [ecx + 2], ax
jne 0x4ad06e87
mov eax, 0x400023c9
jmp 0x4ad07078
mov ax, word [ebp - 0x238]
jmp 0x4ad06f28
push 8
pop eax
jmp 0x4ad07078
mov eax, ecx
jmp 0x4ad06eb7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad2406c
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, esi
jmp 0x4ad07078
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad2406c
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, 0xce
jmp 0x4ad07078
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 2
je 0x4ad195d3
cmp ebx, 3
je 0x4ad195d3
cmp ebx, 0x7b
je 0x4ad195d3
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad2406c
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, ebx
jmp 0x4ad07078
mov ebx, dword [ebp - 0x234]
jmp 0x4ad06fd5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
jne 0x4ad1956b
push 3
pop esi
jmp 0x4ad1956b
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad2406c
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, 0x10b
jmp 0x4ad07078
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad2406c
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
jmp 0x4ad19554
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ad2406c
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
push 3
jmp 0x4ad19556