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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x620
and dword [ebp - 4], 0
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x7cfad5e3
cmp word [edi], 0
je 0x7cfad5e3
push edi
call sym.SHELL32.dll_SheGetPathOffsetW
cmp eax, 0xffffffff
je 0x7cfad5e3
mov bx, word [edi + eax*2]
and word [edi + eax*2], 0
lea esi, [edi + eax*2]
lea eax, [ebp - 0x20e]
push edi
push eax
call sub.ntdll.dll_wcscpy
pop ecx
mov word [esi], bx
pop ecx
mov edi, esi
mov ebx, 0x104
jmp 0x7cfad60b
lea eax, [ebp - 0x620]
mov ebx, 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x20e]
push eax
call sub.ntdll.dll_wcscpy
pop ecx
pop ecx
lea eax, [ebp - 0x20e]
mov word [ebp - 0x210], 0x3d
push eax
call sym.SHELL32.dll_SheGetPathOffsetW
cmp eax, 0xffffffff
je 0x7cfad62e
and word [ebp + eax*2 - 0x20e], 0
cmp eax, 2
jne 0x7cfad648
movzx eax, word [ebp - 0x20e]
push eax
call dword [sym.imp.USER32.dll_CharUpperW]
mov word [ebp - 0x20e], ax
test edi, edi
je 0x7cfad694
mov ax, word [edi]
test ax, ax
je 0x7cfad694
cmp ax, 0x5c
je 0x7cfad660
cmp ax, 0x2f
jne 0x7cfad694
lea eax, [ebp - 0x20e]
push eax
lea eax, [ebp - 0x418]
push eax
call sub.ntdll.dll_wcscpy
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
pop ecx
pop ecx
push edi
call esi
mov edx, eax
lea eax, [ebp - 0x418]
push eax
mov dword [ebp + 8], edx
call esi
mov ecx, dword [ebp + 8]
jmp 0x7cfad71b
lea eax, [ebp - 0x210]
push eax
call fcn.7cfad279
test eax, eax
je 0x7cfad6bc
push eax
lea eax, [ebp - 0x418]
push eax
call sub.ntdll.dll_wcscpy
pop ecx
mov dword [ebp - 4], 1
pop ecx
jmp 0x7cfad6d1
lea eax, [ebp - 0x20e]
push eax
lea eax, [ebp - 0x418]
push eax
call sub.ntdll.dll_wcscpy
pop ecx
pop ecx
test edi, edi
je 0x7cfad72f
cmp word [edi], 0
je 0x7cfad72f
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp - 0x418]
push eax
call esi
cmp word [ebp + eax*2 - 0x41a], 0x5c
je 0x7cfad707
lea eax, [ebp - 0x418]
push 0x7cf35574
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push edi
call esi
mov edx, eax
lea eax, [ebp - 0x418]
push eax
mov dword [ebp + 8], edx
call esi
mov ecx, dword [ebp + 8]
add ecx, eax
cmp ecx, ebx
jge 0x7cfad72f
lea eax, [ebp - 0x418]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x418]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x7cfad7f7
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [ebp - 0x620]
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x7cfad77e
test bl, 0x10
je 0x7cfad7b6
lea eax, [ebp - 0x620]
push eax
call edi
test eax, eax
jne 0x7cfad7b6
cmp dword [ebp - 4], 0
je 0x7cfad7b6
lea eax, [ebp - 0x20e]
push eax
lea eax, [ebp - 0x620]
push eax
call sub.ntdll.dll_wcscpy
pop ecx
lea eax, [ebp - 0x620]
pop ecx
push 0x7cf35574
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x620]
push eax
call esi
mov ebx, eax
cmp ebx, 0xffffffff
je 0x7cfad7f7
test bl, 0x10
je 0x7cfad7f7
lea eax, [ebp - 0x620]
push eax
call edi
test eax, eax
je 0x7cfad7f7
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.7cfad251
lea eax, [ebp - 0x620]
push eax
push 0x7d04db78
call sub.ntdll.dll_wcscpy
pop ecx
xor eax, eax
pop ecx
jmp 0x7cfad7fa
push 5
pop eax
pop edi
pop esi
pop ebx
leave
ret 4