Function at 0x4ad069b2
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 [0x4ad33b38]
push esi
mov esi, dword [ebp + 8]
mov cx, word [esi]
mov dword [ebp - 4], eax
mov ax, word [0x4ad34440]
cmp cx, ax
je 0x4ad10966
cmp cx, 0x2e
je 0x4ad17b83
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 - 0xc], 0x3d
mov dword [ebp - 0x62c], 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 0x4ad0b8c1
cmp word [esi + 2], 0x3a
jne 0x4ad0b8c1
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 0x4ad06a5e
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov ebx, eax
mov ax, word [esi]
cmp ax, word [0x4ad34440]
jne 0x4ad0b8db
add ebx, 2
cmp ebx, 0x208
ja 0x4ad17bb6
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.msvcrt.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.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x4ad17bf3
mov eax, dword [ebp - 0x628]
cmp eax, ebx
je 0x4ad0b872
cmp word [eax], bx
je 0x4ad0b892
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 0x4ad17bfb
cmp byte [0x4ad2fa24], 0
je 0x4ad06b24
push ebx
lea eax, [ebp - 0x214]
push eax
call fcn.4ad0689e
test eax, eax
je 0x4ad17bb6
cmp dword [ebp + 0xc], 2
je 0x4ad06b46
lea eax, [ebp - 0x214]
push eax
call esi
cmp eax, 0xffffffff
je 0x4ad17c1e
test ax, 0x410
je 0x4ad17c14
cmp dword [ebp + 0xc], ebx
je 0x4ad06b5e
cmp dword [ebp + 0xc], 1
jne 0x4ad06b73
mov ax, word [ebp - 0x62c]
cmp ax, word [ebp - 0xa]
jne 0x4ad06b73
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x4ad17c2d
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.4ad01682
test eax, eax
jne 0x4ad17c34
push ebx
push 0x4ad34460
call fcn.4ad0234c
xor eax, eax
pop ebx
pop edi
mov ecx, dword [ebp - 4]
pop esi
call fcn.4ad01389
leave
ret 8
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
lea eax, [ebp + eax*2 - 0x214]
pop ecx
mov dword [ebp - 0x628], eax
jmp 0x4ad06adf
lea ecx, [ebp - 0x20e]
cmp eax, ecx
jbe 0x4ad06ae8
add eax, 0xfffffffe
mov cx, word [eax]
cmp cx, word [0x4ad34440]
jne 0x4ad06ae8
mov dword [ebp - 0x628], eax
mov word [eax], bx
jmp 0x4ad06ae8
mov ax, word [ebp - 0x62c]
jmp 0x4ad06a3f
cmp eax, 0x7b
je 0x4ad06b06
jmp 0x4ad06b98
lea eax, [ebp - 0xc]
push eax
call fcn.4ad01f78
test eax, eax
mov edi, dword [sym.imp.msvcrt.dll_wcscpy]
mov dword [ebp - 0x628], eax
je 0x4ad17bc0
push eax
lea eax, [ebp - 0x624]
push eax
call edi
pop ecx
pop ecx
lea eax, [ebp - 0x624]
push eax
call fcn.4ad02ea5
mov cx, word [0x4ad34440]
mov dword [ebp - 0x628], eax
mov dx, word [eax]
test dx, dx
je 0x4ad17be3
cmp dx, cx
je 0x4ad0b941
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 0x4ad17bb6
xor ebx, ebx
cmp eax, ebx
je 0x4ad06aa5
push esi
push eax
call edi
jmp 0x4ad06aa3
cmp word [esi + 2], ax
jne 0x4ad069db
mov eax, 0x23c9
jmp 0x4ad06b9a
cmp word [esi + 2], cx
jne 0x4ad069e5
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
push 2
pop ecx
cmp eax, ecx
jbe 0x4ad17bac
cmp word [esi + ecx*2], 0x20
jne 0x4ad069e5
inc ecx
cmp ecx, eax
jb 0x4ad17b9c
and word [esi + 4], 0
jmp 0x4ad069e5
mov eax, 0xce
jmp 0x4ad06b98
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 0x4ad0b904
mov word [eax], cx
mov eax, dword [ebp - 0x628]
inc eax
inc eax
jmp 0x4ad0b93b
push 5
pop eax
jmp 0x4ad06b98
call edi
cmp eax, 2
je 0x4ad06b06
cmp eax, 3
jne 0x4ad0b8cd
jmp 0x4ad06b06
mov eax, 0x10b
jmp 0x4ad06b98
call edi
cmp eax, 2
jne 0x4ad06b98
push 3
jmp 0x4ad17bf5
call edi
jmp 0x4ad06b98
push 8
jmp 0x4ad17bf5