Function at 0x410475
Capabilities:
Check if file exists
Get common file path
Get file version info
Set environment variable

Disassembly:
push 0x954
mov eax, 0x439a29
call fcn.0041f076
mov ebx, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x940], ebx
mov dword [ebp - 0x934], edi
mov dword [ebp - 0x934], ebp
push 1
push dword [ebp - 0x934]
push str.int___cdecl_ReleaseSetupUIToTemp_wchar_t__
call fcn.0040ca6a
mov esi, eax
add esp, 0xc
mov eax, 0x441918
cmp esi, edi
jne 0x4104bd
mov esi, eax
push edi
push edi
push edi
push edi
push eax
push 0x4418ec
push esi
lea ecx, [ebp - 0x960]
call fcn.0040b9b3
mov dword [ebp - 4], edi
cmp esi, edi
jne 0x4104dc
push ebp
pop ebp
cmp ebx, edi
je 0x410864
xor eax, eax
mov ebx, 0x206
push ebx
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push edi
push eax
call fcn.00420d30
xor eax, eax
push ebx
mov word [ebp - 0x628], ax
lea eax, [ebp - 0x626]
push edi
push eax
call fcn.00420d30
xor eax, eax
push ebx
mov word [ebp - 0x830], ax
lea eax, [ebp - 0x82e]
push edi
push eax
call fcn.00420d30
add esp, 0x24
lea eax, [ebp - 0x218]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jbe 0x410828
push esi
lea eax, [ebp - 0x628]
push eax
push dword [0x44f200]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jbe 0x410828
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov dword [ebp - 0x938], eax
cmp eax, edi
je 0x410828
push esi
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.00421011
add esp, 0xc
push dword [ebp - 0x938]
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
push dword [ebp - 0x938]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x218]
push eax
call fcn.0040edcc
push 0xfe
lea eax, [ebp - 0x92e]
push edi
push eax
call fcn.00420d30
xor eax, eax
mov word [ebp - 0x930], ax
add esp, 0x10
lea eax, [ebp - 0x944]
push eax
lea eax, [ebp - 0x830]
push eax
mov dword [ebp - 0x944], edi
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov dword [ebp - 0x93c], eax
cmp eax, edi
jbe 0x4106bd
xor ecx, ecx
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004137de
pop ecx
mov dword [ebp - 0x938], eax
cmp eax, edi
je 0x4106bd
push eax
push dword [ebp - 0x93c]
lea eax, [ebp - 0x830]
push dword [ebp - 0x944]
push eax
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x4106b1
lea eax, [ebp - 0x93c]
push eax
lea eax, [ebp - 0x948]
push eax
push 0x43c9f0
push dword [ebp - 0x938]
mov dword [ebp - 0x93c], edi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x4106b1
mov eax, dword [ebp - 0x948]
movzx ecx, word [eax + 0xc]
push ecx
movzx ecx, word [eax + 0xe]
push ecx
movzx ecx, word [eax + 8]
movzx eax, word [eax + 0xa]
push ecx
push eax
lea eax, [ebp - 0x930]
push str._d._d._d._d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
push dword [ebp - 0x938]
call fcn.0041e83c
pop ecx
lea eax, [ebp - 0x930]
push eax
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x410747
lea eax, [ebp - 0x218]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
test eax, eax
je 0x410747
mov esi, 0x4418c0
push esi
call fcn.00406c58
pop ecx
test eax, eax
jne 0x410864
push 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._lasterror
lea eax, [ebp - 0x218]
push eax
push str._XmpSetup_create_ui_release_path_failed_path
push edi
push esi
call fcn.0040af0a
pop ecx
pop ecx
mov ecx, eax
call fcn.0040cf55
mov ecx, eax
call fcn.004014be
jmp 0x41084f
xor eax, eax
push ebx
mov word [ebp - 0x420], ax
lea eax, [ebp - 0x41e]
push edi
push eax
call fcn.00420d30
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.00421be9
add esp, 0x14
push str..SetupUI.cab
lea eax, [ebp - 0x420]
push eax
call esi
push edi
lea eax, [ebp - 0x420]
push eax
push str.SETUPUI
push 0x68
call fcn.0040db5a
add esp, 0x10
test eax, eax
jne 0x4107cd
mov esi, 0x4418c0
push esi
call fcn.00406c58
pop ecx
test eax, eax
jne 0x410864
push 1
push str._XmpSetup_save_ui_cab_failed
push edi
push esi
call fcn.0040af0a
pop ecx
pop ecx
mov ecx, eax
call fcn.0040cf55
jmp 0x41085d
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x940]
call fcn.00421be9
pop ecx
pop ecx
push dword [ebp - 0x940]
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
push dword [ebp - 0x940]
push str.installworkdir
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.0040ffa9
pop ecx
pop ecx
mov esi, eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x960]
call fcn.0040d1f9
mov eax, esi
jmp 0x410875
mov esi, 0x4418c0
push esi
call fcn.00406c58
pop ecx
test eax, eax
jne 0x410864
push 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._XmpSetup_get_temp_path_failed_lasterror
push edi
push esi
call fcn.0040af0a
pop ecx
pop ecx
mov ecx, eax
call fcn.0040cf55
mov ecx, eax
call fcn.00401342
mov ecx, eax
call fcn.0040b982
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x960]
call fcn.0040d1f9
xor eax, eax
call fcn.0041f0f9
ret