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

Disassembly:
mov eax, 0x418c6b
call fcn.00416550
sub esp, 0x118
push ebx
push esi
mov ebx, 0x80004005
push edi
lea ecx, [ebp - 0x124]
mov dword [ebp - 0x38], ebx
call fcn.00406997
mov esi, 0x423544
xor edi, edi
push esi
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x14], edi
call sub.MFC42u.DLL_CString::CString_3
push esi
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call sub.MFC42u.DLL_CString::CString_3
push esi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call sub.MFC42u.DLL_CString::CString_3
push esi
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 3
call sub.MFC42u.DLL_CString::CString_3
push esi
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call sub.MFC42u.DLL_CString::CString_3
push esi
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 5
call sub.MFC42u.DLL_CString::CString_3
push esi
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 6
call sub.MFC42u.DLL_CString::CString_3
mov dword [ebp - 0x34], edi
xor eax, eax
lea edi, [ebp - 0x30]
push esi
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 7
stosd dword es:[edi], eax
call sub.MFC42u.DLL_CString::CString_3
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 8
call sub.MFC42u.DLL_CString::CString_1
mov edi, dword [ebp + 0xc]
mov byte [ebp - 4], 9
test edi, edi
je 0x406909
push edi
lea ecx, [ebp - 0x20]
call fcn.00416304
lea ecx, [ebp - 0x20]
call fcn.00404fff
test eax, eax
jne 0x406906
push eax
mov esi, 0x104
push 0x1a
push esi
lea ecx, [ebp - 0x18]
call sub.MFC42u.DLL_CString::GetBuffer
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x18]
call sub.MFC42u.DLL_CString::ReleaseBuffer
push str.MicrosoftInternet_ExplorerQuick_LaunchUser_Pinned
push esi
lea ecx, [ebp - 0x18]
call sub.MFC42u.DLL_CString::GetBuffer
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x18]
call sub.MFC42u.DLL_CString::ReleaseBuffer
push edi
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
push eax
lea ecx, [ebp - 0x18]
call fcn.0040dffa
push eax
push edi
call dword [sym.imp.MSVCRT.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x406906
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406906
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
lea eax, [ebp - 0x28]
mov dword [ebp + 0xc], esi
push eax
push edi
push ebx
call fcn.0040da28
cmp dword [ebp + 0x14], 0
mov dword [ebp - 0x44], eax
je 0x4066d0
test esi, 0xf0000
je 0x4066bb
mov dword [ebp + 0xc], 0x80000
mov dword [ebp - 0x14], 8
push edi
lea ecx, [ebp - 0x10]
call fcn.00416304
jmp 0x406860
push edi
lea ecx, [ebp - 0x124]
call fcn.0040c92a
test eax, eax
je 0x406906
lea ecx, [ebp - 0x124]
call fcn.0040ee92
dec eax
je 0x40680f
dec eax
je 0x4067e5
dec eax
dec eax
je 0x406797
sub eax, 4
je 0x406746
sub eax, 0xff9
je 0x40680f
sub eax, 0xf000
je 0x40680f
sub eax, 0x30000
je 0x406860
test esi, 0xf0000
mov dword [ebp - 0x14], 1
je 0x4066c2
mov dword [ebp + 0xc], 0x10000
jmp 0x4066c2
test esi, 0xf0000
je 0x406755
mov dword [ebp + 0xc], 0x10000
lea eax, [ebp - 0x34]
lea ecx, [ebp - 0x124]
push eax
mov dword [ebp - 0x14], 1
call fcn.0040d6f0
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x124]
push eax
lea eax, [ebp + 0x10]
push eax
call fcn.0040d12a
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xb
call fcn.00416328
mov byte [ebp - 4], 9
lea ecx, [ebp + 0x10]
jmp 0x40685b
test esi, 0xf0000
je 0x4067a6
mov dword [ebp + 0xc], 0x10000
lea eax, [ebp - 0x34]
lea ecx, [ebp - 0x124]
push eax
mov dword [ebp - 0x14], 1
call fcn.0040d6f0
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x124]
push eax
lea eax, [ebp + 8]
push eax
call fcn.0040d12a
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xc
call fcn.00416328
mov byte [ebp - 4], 9
lea ecx, [ebp + 8]
jmp 0x40685b
test esi, 0xf0000
je 0x4067f4
mov dword [ebp + 0xc], 0x40000
lea eax, [ebp - 0x34]
lea ecx, [ebp - 0x124]
push eax
mov dword [ebp - 0x14], 4
call fcn.0040d6f0
jmp 0x4066c2
test esi, 0xf0000
je 0x40681e
mov dword [ebp + 0xc], 0x10000
lea eax, [ebp - 0x34]
lea ecx, [ebp - 0x124]
push eax
mov dword [ebp - 0x14], 1
call fcn.0040d6f0
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x124]
push eax
lea eax, [ebp + 0x14]
push eax
call fcn.0040d12a
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xa
call fcn.00416328
mov byte [ebp - 4], 9
lea ecx, [ebp + 0x14]
call fcn.004162ce
lea ecx, [ebp - 0x24]
call fcn.00404fff
test eax, eax
je 0x406878
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x24]
push eax
call fcn.00416328
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp + 0x10]
push eax
push ebx
call fcn.0040dbc5
push eax
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0xd
call fcn.00416328
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 9
call fcn.004162ce
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp + 0x10]
push eax
push ebx
call fcn.0040dcac
push eax
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xe
call fcn.00416328
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 9
call fcn.004162ce
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x2c]
push dword [ebp - 0x44]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x20]
push dword [ebp - 0x14]
push dword [ebp + 0xc]
push eax
push ebx
call fcn.0040d79b
test eax, eax
jl 0x406906
push dword [ebp - 0x40]
push ebx
call fcn.0040dd66
test eax, eax
jl 0x406906
and dword [ebp - 0x38], 0
mov ebx, dword [ebp - 0x38]
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 8
call fcn.004162ce
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 7
call fcn.004162ce
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 6
call fcn.004162ce
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 5
call fcn.004162ce
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.004162ce
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 3
call fcn.004162ce
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call fcn.004162ce
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.004162ce
and byte [ebp - 4], 0
lea ecx, [ebp - 0x20]
call fcn.004162ce
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x124]
call fcn.0040c8c1
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, ebx
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10