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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x485647
mov eax, dword fs:[0]
push eax
sub esp, 0x29c
mov eax, dword [0x4ad0cc]
xor eax, esp
mov dword [esp + 0x294], eax
push esi
push edi
mov eax, dword [0x4ad0cc]
xor eax, esp
push eax
lea eax, [esp + 0x2a8]
mov dword fs:[0], eax
mov edi, edx
push ecx
lea ecx, [esp + 0x78]
call fcn.00405950
lea ecx, [esp + 0x74]
mov dword [esp + 0x2b0], 0
xor esi, esi
call fcn.004034a0
test al, al
jne 0x40f73c
lea ecx, [esp + 0x58]
call fcn.00403390
lea ecx, [esp + 0x40]
mov byte [esp + 0x2b0], 1
call fcn.00403390
lea ecx, [esp + 0x40]
mov byte [esp + 0x2b0], 2
call fcn.004034a0
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test al, al
je 0x40f476
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x44]
call fcn.004033e0
lea ecx, [esp + 0x40]
call fcn.00403480
push eax
call esi
test eax, eax
jne 0x40f476
push eax
lea ecx, [esp + 0x44]
call fcn.00403830
lea ecx, [esp + 0x40]
call fcn.004034a0
test al, al
je 0x40f565
test edi, edi
jne 0x40f565
xor eax, eax
push 0x20a
push eax
mov word [esp + 0x94], ax
lea eax, [esp + 0x96]
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
lea eax, [esp + 0x8c]
push 0x104
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x8c]
push eax
lea ecx, [esp + 0x5c]
call fcn.00403460
push 1
push ecx
lea eax, [esp + 0x78]
mov dword [esp + 0x78], 0x5c
push eax
lea ecx, [esp + 0x64]
call fcn.0040f880
cmp eax, 0xffffffff
je 0x40f516
inc eax
lea ecx, [esp + 0x58]
push eax
push edi
lea eax, [esp + 0x18]
push eax
call fcn.0040f820
push eax
lea ecx, [esp + 0x5c]
call fcn.0040f770
lea ecx, [esp + 0x10]
call fcn.004033c0
lea ecx, [esp + 0x58]
call fcn.004034a0
test al, al
jne 0x40f565
lea eax, [esp + 0x74]
push eax
lea edx, [esp + 0x5c]
lea ecx, [esp + 0x14]
call fcn.0040f910
add esp, 4
lea ecx, [esp + 0x40]
push eax
call fcn.0040f770
lea ecx, [esp + 0x10]
call fcn.004033c0
lea ecx, [esp + 0x40]
call fcn.00403480
push eax
call esi
test eax, eax
jne 0x40f565
push eax
lea ecx, [esp + 0x44]
call fcn.00403830
lea ecx, [esp + 0x40]
call fcn.004034a0
test al, al
je 0x40f626
push 0
lea ecx, [esp + 0x5c]
call fcn.00403830
push 0x104
lea eax, [esp + 0x90]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x40f5a9
lea eax, [esp + 0x8c]
push eax
lea ecx, [esp + 0x5c]
call fcn.00403460
lea ecx, [esp + 0x58]
call fcn.004034a0
test al, al
jne 0x40f626
push 0x496c7c
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x30]
push eax
call fcn.00408510
lea ecx, [esp + 0x80]
mov byte [esp + 0x2bc], 3
push ecx
mov edx, eax
lea ecx, [esp + 0x20]
call fcn.0040f9b0
add esp, 0x10
lea ecx, [esp + 0x40]
push eax
call fcn.0040f770
lea ecx, [esp + 0x10]
call fcn.004033c0
lea ecx, [esp + 0x28]
mov byte [esp + 0x2b0], 2
call fcn.004033c0
lea ecx, [esp + 0x40]
call fcn.00403480
push eax
call esi
test eax, eax
jne 0x40f626
push eax
lea ecx, [esp + 0x44]
call fcn.00403830
lea ecx, [esp + 0x40]
call fcn.004034a0
test al, al
je 0x40f6e7
push 0
lea ecx, [esp + 0x5c]
call fcn.00403830
push 0x104
lea eax, [esp + 0x90]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x40f66a
lea eax, [esp + 0x8c]
push eax
lea ecx, [esp + 0x5c]
call fcn.00403460
lea ecx, [esp + 0x58]
call fcn.004034a0
test al, al
jne 0x40f6e7
push 0x496c7c
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.00408510
lea ecx, [esp + 0x80]
mov byte [esp + 0x2bc], 4
push ecx
mov edx, eax
lea ecx, [esp + 0x38]
call fcn.0040f9b0
add esp, 0x10
lea ecx, [esp + 0x40]
push eax
call fcn.0040f770
lea ecx, [esp + 0x28]
call fcn.004033c0
lea ecx, [esp + 0x10]
mov byte [esp + 0x2b0], 2
call fcn.004033c0
lea ecx, [esp + 0x40]
call fcn.00403480
push eax
call esi
test eax, eax
jne 0x40f6e7
push eax
lea ecx, [esp + 0x44]
call fcn.00403830
lea ecx, [esp + 0x40]
call fcn.004034a0
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test al, al
jne 0x40f71c
lea ecx, [esp + 0x40]
call fcn.00403480
push eax
call esi
test eax, eax
je 0x40f71c
lea ecx, [esp + 0x40]
call fcn.00403480
push eax
call edi
mov esi, eax
test esi, esi
jne 0x40f72a
lea ecx, [esp + 0x74]
call fcn.00403480
push eax
call edi
mov esi, eax
lea ecx, [esp + 0x40]
call fcn.004033c0
lea ecx, [esp + 0x58]
call fcn.004033c0
lea ecx, [esp + 0x74]
call fcn.004033c0
mov eax, esi
mov ecx, dword [esp + 0x2a8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x294]
xor ecx, esp
call fcn.0048079e
mov esp, ebp
pop ebp
ret