Function at 0x41fbf0
Capabilities:
Check if file exists
Get file attributes
Get file system object information
Query environment variable
Set current directory

Disassembly:
sub esp, 0x72c
mov eax, dword [0x493008]
xor eax, esp
mov dword [esp + 0x724], eax
push esi
push edi
push 0x104
lea edx, [esp + 0x31c]
mov esi, ecx
call fcn.00416080
add esp, 4
test eax, eax
jne 0x41fcdc
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41fcd2
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x41fcd2
push 0x2b4
push eax
lea eax, [esp + 0x68]
push eax
call fcn.00425950
add esp, 0xc
lea eax, [esp + 0x318]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [esp + 0x318]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [esp + 0x318]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0x19d0d
push 0x111
push dword [0x564b3c]
call edi
push 0x200
push 0x2b4
lea eax, [esp + 0x68]
push eax
push 0
push esi
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push esi
lea edx, [esp + 0x70]
call fcn.00414140
add esp, 4
test eax, eax
jne 0x41fcd2
push eax
push eax
push 0x1013
push dword [0x561c6c]
call edi
push 0xc35b
jmp 0x41ff85
push 0x138
lea eax, [esp + 0x64]
push eax
lea eax, [esp + 0x320]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x41fd10
push 0x104
lea eax, [esp + 0x64]
push eax
lea eax, [esp + 0x320]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [esp + 0x520]
push eax
lea ecx, [esp + 0x31c]
call fcn.00416640
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
add esp, 4
test eax, eax
jne 0x41fd43
lea eax, [esp + 0x318]
push eax
lea eax, [esp + 0x524]
push eax
call edi
lea eax, [esp + 0x520]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x41fed6
test al, 0x10
je 0x41fdbd
lea eax, [esp + 0x520]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x41ff80
push 0
push 0x19d0d
push 0x111
push dword [0x564b3c]
call dword [sym.imp.USER32.dll_PostMessageW]
push 0
push 0
push 0x1013
push dword [0x561c6c]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, 1
pop edi
pop esi
mov ecx, dword [esp + 0x724]
xor ecx, esp
call fcn.00422d0c
add esp, 0x72c
ret
push 0x2b4
lea eax, [esp + 0x64]
push 0
push eax
call fcn.00425950
add esp, 0xc
lea eax, [esp + 0x520]
push esi
push eax
call edi
push 0x200
push 0x2b4
lea eax, [esp + 0x68]
push eax
push 0
lea eax, [esp + 0x530]
push eax
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push 0x5c
push 0
lea eax, [esp + 0x528]
push eax
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
mov esi, eax
test esi, esi
je 0x41fe3c
xor eax, eax
mov word [esi + 2], ax
lea eax, [esp + 0x520]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsRootW]
test eax, eax
jne 0x41fe2e
mov word [esi], ax
lea eax, [esp + 0x520]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [esp + 0x6c]
push 0
push 0x19d0d
push 0x111
push dword [0x564b3c]
mov dword [esp + 0x1c], 2
mov dword [esp + 0x20], eax
call esi
lea eax, [esp + 0xc]
push eax
push 0xffffffffffffffff
push 0x1053
push dword [0x561c6c]
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x41fea9
lea eax, [esp + 0x24]
mov dword [esp + 0x34], 3
push eax
push edi
push 0x102b
push dword [0x561c6c]
mov dword [esp + 0x40], 3
call esi
push 0
push edi
jmp 0x41fead
push 0
push 0
push 0x1013
push dword [0x561c6c]
call esi
mov eax, 1
pop edi
pop esi
mov ecx, dword [esp + 0x724]
xor ecx, esp
call fcn.00422d0c
add esp, 0x72c
ret
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41ff80
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x41ff80
push 0x2b4
push eax
lea eax, [esp + 0x68]
push eax
call fcn.00425950
add esp, 0xc
lea eax, [esp + 0x318]
push esi
push eax
call edi
lea eax, [esp + 0x318]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [esp + 0x318]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0x19d0d
push 0x111
push dword [0x564b3c]
call edi
push 0x200
push 0x2b4
lea eax, [esp + 0x68]
push eax
push 0
push esi
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push esi
lea edx, [esp + 0x70]
call fcn.00414140
add esp, 4
test eax, eax
jne 0x41ff80
push eax
push eax
push 0x1013
push dword [0x561c6c]
call edi
push 0xc35c
push 2
call fcn.00412d90
mov ecx, dword [esp + 0x734]
add esp, 8
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.00422d0c
add esp, 0x72c
ret