Function at 0x40f190
Capabilities:
Check if file exists
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4155de
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x230
push ebx
push esi
push edi
lea eax, [esp + 0x30]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x24]
call fcn.00413dc4
push str.minint
lea ecx, [esp + 0x24]
mov dword [esp + 0x248], 0
call sub.MFC42u.DLL_CString::Find_2
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 0xffffffff
jg 0x40f216
push str.I386
lea ecx, [esp + 0x24]
call sub.MFC42u.DLL_CString::Find_2
cmp eax, 0xffffffff
jg 0x40f216
push str.i386
lea ecx, [esp + 0x24]
call sub.MFC42u.DLL_CString::Find_2
cmp eax, 0xffffffff
jle 0x40f241
push str.z:_netstart.tag
xor esi, esi
call edi
test eax, eax
je 0x40f241
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, 0x3c
jae 0x40f241
push 0x1388
inc esi
call ebx
push str.z:_netstart.tag
call edi
test eax, eax
jne 0x40f229
mov eax, dword [0x4207c8]
test eax, eax
jne 0x40f258
call fcn.00406900
mov eax, dword [0x4207c8]
test eax, eax
je 0x40f287
lea edx, [esp + 0x18]
mov dword [esp + 0x18], 0
push edx
call eax
test eax, eax
jne 0x40f287
lea ecx, [esp + 0x20]
mov dword [esp + 0x244], 0xffffffff
call sub.MFC42u.DLL_CString::CString
or eax, 0xffffffff
jmp 0x40f7eb
push 0x41de54
call dword [sym.imp.MSVCRT.dll__wgetenv]
add esp, 4
lea ecx, [esp + 0x10]
mov esi, eax
push 0x4207b8
call fcn.00413dc4
push 0x4207b8
lea ecx, [esp + 0x2c]
mov byte [esp + 0x248], 1
call fcn.00413dc4
lea eax, [esp + 0x18]
mov byte [esp + 0x244], 2
push eax
call fcn.00407450
add esp, 4
mov ecx, dword [eax]
lea edx, [esp + 0x10]
push ecx
push str._smapdrv.exe
push edx
mov byte [esp + 0x250], 3
call sub.MFC42u.DLL_CString::Format
add esp, 0xc
lea ecx, [esp + 0x18]
mov byte [esp + 0x244], 2
call sub.MFC42u.DLL_CString::CString
mov eax, dword [esp + 0x10]
push eax
call edi
test eax, eax
jne 0x40f385
push esi
lea ecx, [esp + 0x14]
push str._sibmtoolsutilsmndmapdrv.exe
push ecx
call sub.MFC42u.DLL_CString::Format
mov edx, dword [esp + 0x1c]
add esp, 0xc
push edx
call edi
test eax, eax
jne 0x40f385
push esi
lea eax, [esp + 0x14]
push str._sprebootutilsmndmapdrv.exe
push eax
call sub.MFC42u.DLL_CString::Format
mov ecx, dword [esp + 0x1c]
add esp, 0xc
push ecx
call edi
test eax, eax
jne 0x40f385
lea ecx, [esp + 0x28]
mov byte [esp + 0x244], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x244], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x20]
mov dword [esp + 0x244], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov eax, 2
jmp 0x40f7eb
lea edx, [esp + 0x28]
push str._rru__nodrive
push edx
call sub.MFC42u.DLL_CString::Format
mov al, byte [esp + 0x254]
add esp, 8
test al, al
je 0x40f3b0
push 0x41f8ec
lea ecx, [esp + 0x2c]
call sub.MFC42u.DLL_CString::operator
lea ecx, [esp + 0xc]
call sub.MFC42u.DLL_CString::CString_1
lea eax, [esp + 0xc]
mov byte [esp + 0x244], 4
push eax
call fcn.0040ef10
add esp, 4
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::CString_1
push 1
push ecx
lea edx, [esp + 0x14]
mov ebx, 5
mov ecx, esp
mov dword [esp + 0x20], esp
push edx
mov byte [esp + 0x250], bl
call sub.MFC42u.DLL_CString::CString_2
lea eax, [esp + 0x1c]
mov byte [esp + 0x24c], 6
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push str.NetworkUNCPath
call fcn.00413dc4
push ecx
mov byte [esp + 0x258], 7
mov ecx, esp
mov dword [esp + 0x38], esp
push str.RapidRestoreUltra
call fcn.00413dc4
mov byte [esp + 0x258], bl
call fcn.0040ce30
mov ecx, dword [esp + 0x28]
mov edi, dword [sym.imp.MSVCRT.dll_wcscmp]
push 0x4207b8
push ecx
call edi
add esp, 0x1c
test eax, eax
je 0x40f533
mov al, byte [esp + 0x250]
push ecx
test al, al
mov ecx, esp
je 0x40f4cb
lea edx, [esp + 0x10]
mov dword [esp + 0x28], esp
push edx
call sub.MFC42u.DLL_CString::CString_2
push ecx
lea eax, [esp + 0x1c]
mov ecx, esp
mov dword [esp + 0x20], esp
push eax
mov byte [esp + 0x250], 8
call sub.MFC42u.DLL_CString::CString_2
push ecx
mov byte [esp + 0x250], 9
mov ecx, esp
mov dword [esp + 0x28], esp
push 0x41f8e4
call fcn.00413dc4
push ecx
mov byte [esp + 0x254], 0xa
mov ecx, esp
mov dword [esp + 0x3c], esp
push str.mapdrv
call fcn.00413dc4
mov byte [esp + 0x254], bl
call fcn.0040d3b0
jmp 0x40f530
lea edx, [esp + 0x10]
mov dword [esp + 0x30], esp
push edx
call sub.MFC42u.DLL_CString::CString_2
push ecx
lea eax, [esp + 0x1c]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
mov byte [esp + 0x250], 0xb
call sub.MFC42u.DLL_CString::CString_2
push ecx
mov byte [esp + 0x250], 0xc
mov ecx, esp
mov dword [esp + 0x24], esp
push 0x41f8e4
call fcn.00413dc4
push ecx
mov byte [esp + 0x254], 0xd
mov ecx, esp
mov dword [esp + 0x2c], esp
push str.mapdrv
call fcn.00413dc4
mov byte [esp + 0x254], bl
call fcn.0040d620
add esp, 0x10
push 0
push ecx
mov ecx, esp
mov dword [esp + 0x34], esp
push 0x4207b8
call fcn.00413dc4
push 0x20
push 0x40
push ebx
push ecx
lea edx, [esp + 0x40]
mov ecx, esp
mov dword [esp + 0x3c], esp
push edx
mov byte [esp + 0x260], 0xe
call sub.MFC42u.DLL_CString::CString_2
push ecx
lea eax, [esp + 0x2c]
mov ecx, esp
mov dword [esp + 0x34], esp
push eax
mov byte [esp + 0x264], 0xf
call sub.MFC42u.DLL_CString::CString_2
mov byte [esp + 0x260], bl
call fcn.0040eb10
mov esi, eax
mov al, byte [esp + 0x270]
add esp, 0x1c
test al, al
je 0x40f791
test esi, esi
je 0x40f61b
lea ecx, [esp + 0x1c]
call sub.MFC42u.DLL_CString::CString_1
mov ecx, dword [esp + 0x10]
push esi
push ecx
lea edx, [esp + 0x24]
push str._s_returned__d
push edx
mov byte [esp + 0x254], 0x10
call sub.MFC42u.DLL_CString::Format
add esp, 0x10
push 0
push ecx
mov ecx, esp
mov dword [esp + 0x34], esp
push 0x41c198
call fcn.00413dc4
push ecx
lea eax, [esp + 0x28]
mov ecx, esp
mov dword [esp + 0x30], esp
push eax
mov byte [esp + 0x254], 0x11
call sub.MFC42u.DLL_CString::CString_2
mov byte [esp + 0x250], 0x10
call fcn.00406ff0
add esp, 0xc
lea ecx, [esp + 0x1c]
mov byte [esp + 0x244], bl
call sub.MFC42u.DLL_CString::CString
jmp 0x40f791
push 1
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x34], esp
push edx
call sub.MFC42u.DLL_CString::CString_2
lea eax, [esp + 0x1c]
mov byte [esp + 0x24c], 0x12
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x34], esp
push str.NetPath
call fcn.00413dc4
push ecx
mov byte [esp + 0x258], 0x13
mov ecx, esp
mov dword [esp + 0x2c], esp
push str.mapdrv
call fcn.00413dc4
mov byte [esp + 0x258], bl
call fcn.0040ce30
mov ecx, dword [esp + 0x28]
push 0x4207b8
push ecx
call edi
add esp, 0x1c
test eax, eax
je 0x40f791
mov al, byte [esp + 0x250]
push ecx
test al, al
mov ecx, esp
je 0x40f6fd
lea edx, [esp + 0x10]
mov dword [esp + 0x30], esp
push edx
call sub.MFC42u.DLL_CString::CString_2
push ecx
lea eax, [esp + 0x1c]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
mov byte [esp + 0x250], 0x14
call sub.MFC42u.DLL_CString::CString_2
push ecx
mov byte [esp + 0x250], 0x15
mov ecx, esp
mov dword [esp + 0x24], esp
push str.NetworkUNCPath
call fcn.00413dc4
push ecx
mov byte [esp + 0x254], 0x16
mov ecx, esp
mov dword [esp + 0x2c], esp
push str.RapidRestoreUltra
call fcn.00413dc4
mov byte [esp + 0x254], bl
call fcn.0040d3b0
jmp 0x40f762
lea edx, [esp + 0x10]
mov dword [esp + 0x30], esp
push edx
call sub.MFC42u.DLL_CString::CString_2
push ecx
lea eax, [esp + 0x1c]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
mov byte [esp + 0x250], 0x17
call sub.MFC42u.DLL_CString::CString_2
push ecx
mov byte [esp + 0x250], 0x18
mov ecx, esp
mov dword [esp + 0x24], esp
push str.NetworkUNCPath
call fcn.00413dc4
push ecx
mov byte [esp + 0x254], 0x19
mov ecx, esp
mov dword [esp + 0x2c], esp
push str.RapidRestoreUltra
call fcn.00413dc4
mov byte [esp + 0x254], bl
call fcn.0040d620
mov ecx, dword [esp + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
add esp, 0x10
push ecx
push 0
push 0x41f8e4
push str.mapdrv
call edi
mov edx, dword [esp + 0xc]
push edx
push 0
push str.NetPath
push str.mapdrv
call edi
lea ecx, [esp + 0x14]
mov byte [esp + 0x244], 4
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0xc]
mov byte [esp + 0x244], 2
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x28]
mov byte [esp + 0x244], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x244], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x20]
mov dword [esp + 0x244], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov eax, esi
mov ecx, dword [esp + 0x23c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x23c
ret