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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x624
mov ax, word [0x4ad30b84]
push esi
mov esi, dword [ebp + 8]
mov cx, word [esi]
cmp cx, ax
je 0x4ad0ef24
cmp cx, 0x2e
je 0x4ad13b9a
push ebx
push edi
lea eax, [ebp - 0x214]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push dword [ebp - 0x214]
mov edi, dword [sym.imp.msvcrt.dll_towupper]
call edi
mov word [ebp - 8], 0x3d
mov dword [ebp - 0xc], eax
xor eax, eax
mov ax, word [esi]
push eax
call dword [sym.imp.msvcrt.dll_iswalpha]
test eax, eax
pop ecx
pop ecx
je 0x4ad0ef41
cmp word [esi + 2], 0x3a
jne 0x4ad0ef41
xor eax, eax
mov ax, word [esi]
push eax
call edi
pop ecx
add esi, 4
xor ebx, ebx
cmp esi, ebx
mov word [ebp - 6], ax
mov word [ebp - 4], 0x3a
mov word [ebp - 2], bx
je 0x4ad0720a
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov ebx, eax
mov ax, word [esi]
cmp ax, word [0x4ad30b84]
jne 0x4ad13bd7
add ebx, 2
cmp ebx, 0x208
ja 0x4ad13bcd
mov ax, word [ebp - 6]
mov word [ebp - 0x624], ax
mov ax, word [ebp - 4]
mov word [ebp - 0x622], ax
lea eax, [ebp - 0x620]
push esi
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
xor ebx, ebx
pop ecx
pop ecx
lea eax, [ebp + 8]
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.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x4ad13c80
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4ad0ef4a
cmp word [eax], bx
je 0x4ad0ef67
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [ebp - 0x214]
push eax
call esi
cmp eax, 0xffffffff
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
je 0x4ad13ca6
cmp byte [0x4ad2ca64], 0
je 0x4ad072ca
push ebx
lea eax, [ebp - 0x214]
push eax
call fcn.4ad0708c
test eax, eax
je 0x4ad13bcd
cmp dword [ebp + 0xc], 2
je 0x4ad072ec
lea eax, [ebp - 0x214]
push eax
call esi
cmp eax, 0xffffffff
je 0x4ad13cc9
test ax, 0x410
je 0x4ad13cbf
cmp dword [ebp + 0xc], ebx
je 0x4ad07301
cmp dword [ebp + 0xc], 1
jne 0x4ad07316
mov ax, word [ebp - 0xc]
cmp ax, word [ebp - 6]
jne 0x4ad07316
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x4ad13cd8
push 0x4ad280d0
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 8]
push eax
call fcn.4ad01fd9
test eax, eax
jne 0x4ad13cdf
push ebx
push 0x4ad31400
call fcn.4ad03be2
xor eax, eax
pop edi
pop ebx
pop esi
leave
ret 8
cmp word [esi + 2], ax
jne 0x4ad0718a
jmp 0x4ad13b90
cmp eax, 0x7b
jne 0x4ad07340
jmp 0x4ad072ac
mov ax, word [ebp - 0xc]
jmp 0x4ad071ec
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
lea eax, [ebp + eax*2 - 0x214]
pop ecx
mov dword [ebp + 8], eax
jmp 0x4ad07285
lea ecx, [ebp - 0x20e]
cmp eax, ecx
jbe 0x4ad0728e
jmp 0x4ad13c88
mov eax, 0x23c9
jmp 0x4ad07342
cmp word [esi + 2], cx
jne 0x4ad07194
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
push 2
pop ecx
cmp eax, ecx
jbe 0x4ad13bc3
cmp word [esi + ecx*2], 0x20
jne 0x4ad07194
inc ecx
cmp ecx, eax
jb 0x4ad13bb3
and word [esi + 4], 0
jmp 0x4ad07194
mov eax, 0xce
jmp 0x4ad07340
lea eax, [ebp - 8]
push eax
call fcn.4ad0133f
test eax, eax
mov edi, dword [sym.imp.msvcrt.dll_wcscpy]
mov dword [ebp + 8], eax
je 0x4ad13bfb
push eax
lea eax, [ebp - 0x624]
push eax
call edi
pop ecx
pop ecx
jmp 0x4ad13c19
mov ax, word [ebp - 6]
and word [ebp - 0x620], 0
mov word [ebp - 0x624], ax
mov ax, word [ebp - 4]
mov word [ebp - 0x622], ax
lea eax, [ebp - 0x624]
push eax
call fcn.4ad01d2c
mov cx, word [0x4ad30b84]
mov dword [ebp + 8], eax
mov dx, word [eax]
test dx, dx
jne 0x4ad13c41
mov word [eax], cx
mov eax, dword [ebp + 8]
inc eax
inc eax
jmp 0x4ad13c50
cmp dx, cx
je 0x4ad13c53
mov word [eax + 2], cx
mov eax, dword [ebp + 8]
add eax, 4
mov dword [ebp + 8], eax
mov ecx, eax
lea edx, [ebp - 0x624]
sub ecx, edx
sar ecx, 1
add ecx, ebx
cmp ecx, 0x208
ja 0x4ad13bcd
xor ebx, ebx
cmp eax, ebx
je 0x4ad07251
push esi
push eax
call edi
jmp 0x4ad0724f
push 5
pop eax
jmp 0x4ad07340
add eax, 0xfffffffe
mov cx, word [eax]
cmp cx, word [0x4ad30b84]
jne 0x4ad0728e
mov dword [ebp + 8], eax
mov word [eax], bx
jmp 0x4ad0728e
call edi
cmp eax, 2
je 0x4ad072ac
cmp eax, 3
je 0x4ad072ac
jmp 0x4ad0ef33
mov eax, 0x10b
jmp 0x4ad07340
call edi
cmp eax, 2
jne 0x4ad07340
push 3
jmp 0x4ad13c82
call edi
jmp 0x4ad07340
push 8
jmp 0x4ad13c82