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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x62c
mov eax, dword [0x4ad33b78]
push esi
mov esi, dword [ebp + 8]
mov cx, word [esi]
mov dword [ebp - 4], eax
mov ax, word [0x4ad33b8c]
cmp cx, ax
je 0x4ad17505
cmp cx, 0x2e
je 0x4ad17519
push edi
lea eax, [ebp - 0x214]
push eax
push 0x104
call dword [sym.imp.vKERNEL32.dll_GetCurrentDirectoryW]
push dword [ebp - 0x214]
mov edi, dword [sym.imp.vmsvcrt.dll_towupper]
call edi
mov word [ebp - 0xc], 0x3d
mov dword [ebp - 0x62c], eax
xor eax, eax
mov ax, word [esi]
push eax
call dword [sym.imp.vmsvcrt.dll_iswalpha]
test eax, eax
pop ecx
pop ecx
je 0x4ad0dd24
cmp word [esi + 2], 0x3a
jne 0x4ad0dd24
xor eax, eax
mov ax, word [esi]
push eax
call edi
pop ecx
add esi, 4
push ebx
xor ebx, ebx
cmp esi, ebx
mov word [ebp - 0xa], ax
mov word [ebp - 8], 0x3a
mov word [ebp - 6], bx
je 0x4ad0424b
push esi
call dword [sym.imp.vmsvcrt.dll_wcslen]
pop ecx
mov ebx, eax
mov ax, word [esi]
cmp ax, word [0x4ad33b8c]
jne 0x4ad0dd3e
add ebx, 2
cmp ebx, 0x208
ja 0x4ad1754c
mov ax, word [ebp - 0xa]
mov word [ebp - 0x624], ax
mov ax, word [ebp - 8]
mov word [ebp - 0x622], ax
lea eax, [ebp - 0x620]
push esi
push eax
call dword [sym.imp.vmsvcrt.dll_wcscpy]
xor ebx, ebx
pop ecx
pop ecx
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x214]
push eax
push 0x103
lea eax, [ebp - 0x624]
push eax
mov word [ebp - 0xe], bx
call dword [sym.imp.vKERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x4ad17589
mov eax, dword [ebp - 0x628]
cmp eax, ebx
je 0x4ad0dcca
cmp word [eax], bx
je 0x4ad0dcea
mov esi, dword [sym.imp.vKERNEL32.dll_GetFileAttributesW]
lea eax, [ebp - 0x214]
push eax
call esi
cmp eax, 0xffffffff
mov edi, dword [sym.imp.vKERNEL32.dll_GetLastError]
je 0x4ad17591
cmp byte [0x4ad2fa64], 0
je 0x4ad04311
push ebx
lea eax, [ebp - 0x214]
push eax
call fcn.4ad04469
test eax, eax
je 0x4ad1754c
cmp dword [ebp + 0xc], 2
je 0x4ad04333
lea eax, [ebp - 0x214]
push eax
call esi
cmp eax, 0xffffffff
je 0x4ad175b4
test ax, 0x410
je 0x4ad175aa
cmp dword [ebp + 0xc], ebx
je 0x4ad0434b
cmp dword [ebp + 0xc], 1
jne 0x4ad04360
mov ax, word [ebp - 0x62c]
cmp ax, word [ebp - 0xa]
jne 0x4ad04360
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.vKERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x4ad175c3
push 0x4ad2b0d0
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.4ad0158f
test eax, eax
jne 0x4ad175ca
push ebx
push 0x4ad34400
call fcn.4ad01550
xor eax, eax
pop ebx
pop edi
mov ecx, dword [ebp - 4]
pop esi
call fcn.4ad01305
leave
ret 8
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.vmsvcrt.dll_wcslen]
lea eax, [ebp + eax*2 - 0x214]
pop ecx
mov dword [ebp - 0x628], eax
jmp 0x4ad042cc
lea ecx, [ebp - 0x20e]
cmp eax, ecx
jbe 0x4ad042d5
add eax, 0xfffffffe
mov cx, word [eax]
cmp cx, word [0x4ad33b8c]
jne 0x4ad042d5
mov dword [ebp - 0x628], eax
mov word [eax], bx
jmp 0x4ad042d5
mov ax, word [ebp - 0x62c]
jmp 0x4ad0422c
cmp eax, 0x7b
je 0x4ad042f3
jmp 0x4ad0438a
lea eax, [ebp - 0xc]
push eax
call fcn.4ad01b70
test eax, eax
mov edi, dword [sym.imp.vmsvcrt.dll_wcscpy]
mov dword [ebp - 0x628], eax
je 0x4ad17556
push eax
lea eax, [ebp - 0x624]
push eax
call edi
pop ecx
pop ecx
lea eax, [ebp - 0x624]
push eax
call fcn.4ad01a79
mov cx, word [0x4ad33b8c]
mov dword [ebp - 0x628], eax
mov dx, word [eax]
test dx, dx
je 0x4ad17579
cmp dx, cx
je 0x4ad0dda4
mov word [eax + 2], cx
mov eax, dword [ebp - 0x628]
add eax, 4
mov dword [ebp - 0x628], eax
mov ecx, eax
lea edx, [ebp - 0x624]
sub ecx, edx
sar ecx, 1
add ecx, ebx
cmp ecx, 0x208
ja 0x4ad1754c
xor ebx, ebx
cmp eax, ebx
je 0x4ad04292
push esi
push eax
call edi
jmp 0x4ad04290
cmp word [esi + 2], ax
jne 0x4ad041c8
mov eax, 0x23c9
jmp 0x4ad0438c
cmp word [esi + 2], cx
jne 0x4ad041d2
push esi
call dword [sym.imp.vmsvcrt.dll_wcslen]
pop ecx
push 2
pop ecx
cmp eax, ecx
jbe 0x4ad17542
cmp word [esi + ecx*2], 0x20
jne 0x4ad041d2
inc ecx
cmp ecx, eax
jb 0x4ad17532
and word [esi + 4], 0
jmp 0x4ad041d2
mov eax, 0xce
jmp 0x4ad0438a
mov ax, word [ebp - 0xa]
and word [ebp - 0x620], 0
mov word [ebp - 0x624], ax
mov ax, word [ebp - 8]
mov word [ebp - 0x622], ax
jmp 0x4ad0dd67
mov word [eax], cx
mov eax, dword [ebp - 0x628]
inc eax
inc eax
jmp 0x4ad0dd9e
push 5
pop eax
jmp 0x4ad0438a
call edi
cmp eax, 2
je 0x4ad042f3
cmp eax, 3
jne 0x4ad0dd30
jmp 0x4ad042f3
mov eax, 0x10b
jmp 0x4ad0438a
call edi
cmp eax, 2
jne 0x4ad0438a
push 3
jmp 0x4ad1758b
call edi
jmp 0x4ad0438a
push 8
jmp 0x4ad1758b