Function at 0x40eff0
Capabilities:
Check if file exists
Get common file path
Get program files directory

Disassembly:
push 0xffffffffffffffff
push 0x42a21c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x810
push ebx
push ebp
push esi
push edi
mov esi, ecx
call fcn.0040ef20
mov ebp, eax
mov eax, dword [esi + 0xd0]
push ebp
push str.CXSyncExeApp::CreateEnvLink__nOsMajorVer___d
push 2
push eax
mov dword [esp + 0x2c], ebp
call fcn.00407c90
mov ecx, dword [esi + 0x218]
mov eax, dword [esi + 0xd0]
add esp, 0x10
mov edx, dword [ecx + 0x50]
push edx
push str.CXSyncExeApp::CreateEnvLink__m_bDesktopLinkMSEdge___d
push 1
push eax
call fcn.00407c90
mov ecx, dword [esi + 0x218]
add esp, 0x10
xor ebx, ebx
add ecx, 0x54
push ebx
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [esi + 0xd0]
push eax
push str.CXSyncExeApp::CreateEnvLink__m_strDesktopLinkName___s
push 1
push ecx
call fcn.00407c90
mov ecx, dword [esi + 0x218]
add esp, 0x10
add ecx, 0x58
push ebx
call sub.MFC42.DLL_CString::GetBuffer
mov edx, dword [esi + 0xd0]
push eax
push str.CXSyncExeApp::CreateEnvLink__m_strDesktopLinkUrl___s
push 1
push edx
call fcn.00407c90
mov ecx, dword [esi + 0x218]
add esp, 0x10
add ecx, 0x5c
push ebx
call sub.MFC42.DLL_CString::GetBuffer
push eax
mov eax, dword [esi + 0xd0]
push str.CXSyncExeApp::CreateEnvLink__m_strDesktopLinkIconLocation___s
push 1
push eax
call fcn.00407c90
mov ecx, dword [esi + 0x218]
add esp, 0x10
mov edx, dword [ecx + 0x54]
mov eax, dword [edx - 8]
cmp eax, ebx
jle 0x40f398
mov eax, dword [esi + 0xd0]
push str.CXSyncExeApp::CreateEnvLink__Try_To_Create_Desktop_Web_Link
push 1
push eax
call fcn.00407c90
add esp, 0xc
lea ecx, [esp + 0x14]
push 0x440b68
call fcn.004284f2
mov ecx, dword [esi + 0x218]
mov dword [esp + 0x828], ebx
cmp dword [ecx + 0x50], ebx
je 0x40f155
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push str.Microsoft_Edge
call fcn.004284f2
lea edx, [esp + 0x14]
mov ecx, esi
push edx
call fcn.004130e0
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x82c], 1
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x10]
mov byte [esp + 0x828], bl
call sub.MFC42.DLL_CString::CString
jmp 0x40f293
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x621]
mov byte [esp + 0x620], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push ebx
lea eax, [esp + 0x24]
push 0x26
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x624]
push str._s__x86_
push edx
call ebp
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x42d]
mov byte [esp + 0x42c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x22d]
mov byte [esp + 0x22c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
add esp, 0xc
lea ecx, [esp + 0x420]
stosb byte es:[edi], al
lea eax, [esp + 0x620]
push eax
push str._sInternet_ExplorerIEXPLORE.EXE
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x20]
lea eax, [esp + 0x220]
push edx
push str._sInternet_ExplorerIEXPLORE.EXE
push eax
call ebp
mov ebp, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
add esp, 0xc
lea ecx, [esp + 0x420]
push ecx
call ebp
lea edx, [esp + 0x220]
mov edi, eax
push edx
call ebp
mov ecx, dword [esi + 0xd0]
mov ebp, eax
lea eax, [esp + 0x420]
push edi
push eax
push str.CXSyncExeApp::CreateEnvLink__szIePathX86_s__bExistX86_d
push 1
push ecx
call fcn.00407c90
mov eax, dword [esi + 0xd0]
add esp, 0x14
lea edx, [esp + 0x220]
push ebp
push edx
push str.CXSyncExeApp::CreateEnvLink__szIePathX64_s__bExistX64_d
push 1
push eax
call fcn.00407c90
add esp, 0x14
cmp edi, ebx
je 0x40f27e
lea ecx, [esp + 0x420]
push ecx
jmp 0x40f28a
cmp ebp, ebx
je 0x40f293
lea edx, [esp + 0x220]
push edx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator_1
mov eax, dword [esp + 0x14]
mov ecx, dword [eax - 8]
cmp ecx, ebx
mov ecx, dword [esi + 0x218]
jne 0x40f2c3
mov edx, dword [ecx + 0x50]
mov eax, dword [esi + 0xd0]
push edx
push str.CXSyncExeApp::CreateEnvLink__The_browser_path_is_unknown._DESKTOP_LINK_MS_EDGE_d_
push 4
push eax
call fcn.00407c90
add esp, 0x10
jmp 0x40f363
mov eax, dword [ecx + 0x50]
cmp eax, ebx
mov eax, str.__profile_directoryDefault
jne 0x40f2d4
mov eax, 0x440b68
push eax
lea ecx, [esp + 0x14]
call fcn.004284f2
push 0x436df8
lea ecx, [esp + 0x14]
mov byte [esp + 0x82c], 2
call fcn.0042851c
mov edx, dword [esi + 0x218]
lea ecx, [esp + 0x10]
add edx, 0x58
push edx
call fcn.0042879e
push 0x436df8
lea ecx, [esp + 0x14]
call fcn.0042851c
push ebx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [esi + 0x218]
push eax
push ebx
add ecx, 0x5c
call sub.MFC42.DLL_CString::GetBuffer
push eax
push ebx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [esi + 0x218]
push eax
push ebx
add ecx, 0x54
call sub.MFC42.DLL_CString::GetBuffer
push eax
call fcn.00407db0
add esp, 0x10
lea ecx, [esp + 0x10]
mov byte [esp + 0x828], bl
call sub.MFC42.DLL_CString::CString
mov ebp, dword [esp + 0x1c]
cmp ebp, 5
jle 0x40f384
mov ecx, dword [esi + 0x218]
push ebx
add ecx, 0x54
call sub.MFC42.DLL_CString::GetBuffer
push eax
call fcn.00407f50
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x828], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esi + 0x218]
push ebx
add ecx, 0x70
call sub.MFC42.DLL_CString::GetBuffer
push eax
mov eax, dword [esi + 0xd0]
push str.CXSyncExeApp::CreateEnvLink__m_strProgramLinkName___s
push 1
push eax
call fcn.00407c90
mov ecx, dword [esi + 0x218]
add esp, 0x10
add ecx, 0x74
push ebx
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [esi + 0xd0]
push eax
push str.CXSyncExeApp::CreateEnvLink__m_strProgramFilePath___s
push 1
push ecx
call fcn.00407c90
mov ecx, dword [esi + 0x218]
add esp, 0x10
add ecx, 0x78
push ebx
call sub.MFC42.DLL_CString::GetBuffer
mov edx, dword [esi + 0xd0]
push eax
push str.CXSyncExeApp::CreateEnvLink__m_strProgramArgument___s
push 1
push edx
call fcn.00407c90
mov ecx, dword [esi + 0x218]
add esp, 0x10
add ecx, 0x7c
push ebx
call sub.MFC42.DLL_CString::GetBuffer
push eax
mov eax, dword [esi + 0xd0]
push str.CXSyncExeApp::CreateEnvLink__m_strProgramLinkIconLocation___s
push 1
push eax
call fcn.00407c90
mov ecx, dword [esi + 0x218]
add esp, 0x10
mov edx, dword [ecx + 0x70]
cmp dword [edx - 8], ebx
jle 0x40f5d9
mov eax, dword [esi + 0xd0]
push str.CXSyncExeApp::CreateEnvLink__Try_To_Create_Desktop_Program_Link
push 1
push eax
call fcn.00407c90
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x2d]
mov byte [esp + 0x2c], bl
rep stosd dword es:[edi], eax
add esp, 0xc
lea ecx, [esp + 0x20]
stosw word es:[edi], ax
push 0x200
push ecx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp eax, ebx
jne 0x40f4b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esi + 0xd0]
push eax
push str.CXSyncExeApp::CreateEnvLink__GetSystemDirectory___Fail__ErrCode___d
push 4
push edx
call fcn.00407c90
mov ecx, dword [esi + 0xd0]
add esp, 0x10
lea eax, [esp + 0x18]
push eax
call fcn.00407370
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString
mov edx, dword [esi + 0xd0]
lea ecx, [esp + 0x20]
push ecx
push str.CXSyncExeApp::CreateEnvLink__System_Directory_:__s
push 1
push edx
call fcn.00407c90
add esp, 0x10
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_2
lea eax, [esp + 0x20]
lea ecx, [esp + 0x10]
push eax
push 0x435020
push ecx
mov dword [esp + 0x834], 3
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esi + 0x218]
add esp, 0xc
add ecx, 0x74
push ebx
call sub.MFC42.DLL_CString::GetBuffer
mov edx, dword [esi + 0xd0]
push eax
push str.CXSyncExeApp::CreateEnvLink__Before_Replace_:__s
push 1
push edx
call fcn.00407c90
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x218]
add esp, 0x10
add ecx, 0x74
push eax
push str._SystemDir_
call sub.MFC42.DLL_CString::Replace
mov ecx, dword [esi + 0x218]
push ebx
add ecx, 0x74
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [esi + 0xd0]
push eax
push str.CXSyncExeApp::CreateEnvLink__After_Replace_:__s
push 1
push ecx
call fcn.00407c90
mov ecx, dword [esi + 0x218]
add esp, 0x10
add ecx, 0x7c
push ebx
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [esi + 0x218]
push eax
push ebx
add ecx, 0x78
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [esi + 0x218]
push eax
push ebx
add ecx, 0x74
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [esi + 0x218]
push eax
push ebx
add ecx, 0x70
call sub.MFC42.DLL_CString::GetBuffer
push eax
call fcn.00407dd0
add esp, 0x10
cmp ebp, 5
jle 0x40f5c5
mov ecx, dword [esi + 0x218]
push ebx
add ecx, 0x70
call sub.MFC42.DLL_CString::GetBuffer
push eax
call fcn.00407f50
add esp, 4
lea ecx, [esp + 0x10]
mov dword [esp + 0x828], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x820]
pop edi
pop esi
pop ebp
xor eax, eax
mov dword fs:[0], ecx
pop ebx
add esp, 0x81c
ret