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

Disassembly:
mov eax, 0x423476
call fcn.00414c98
sub esp, 0x950
mov eax, dword [0x431d24]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor eax, ebp
xor esi, esi
mov dword [ebp - 0x10], eax
push edi
mov dword [ebp - 0x938], ebx
mov dword [ebp - 0x934], esi
mov dword [ebp - 0x934], ebp
push 1
push dword [ebp - 0x934]
push str.int___cdecl_ReleaseSetupUIToTemp_wchar_t__
call fcn.0040c4cf
mov edi, eax
add esp, 0xc
cmp edi, esi
mov eax, 0x429740
jne 0x40fa67
mov edi, eax
push esi
push esi
push esi
push esi
push eax
push 0x429714
push edi
lea ecx, [ebp - 0x95c]
call fcn.0040b312
mov dword [ebp - 4], esi
cmp edi, esi
jne 0x40fa86
push ebp
pop ebp
cmp ebx, esi
je 0x40fddd
xor eax, eax
mov edx, 0x81
mov word [ebp - 0x218], si
mov ecx, edx
lea edi, [ebp - 0x216]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [ebp - 0x830], si
mov ecx, edx
lea edi, [ebp - 0x82e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [ebp - 0x628], si
mov ecx, edx
lea edi, [ebp - 0x626]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x218]
push eax
mov edi, 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jbe 0x40fda1
push edi
lea eax, [ebp - 0x830]
push eax
push dword [0x432e24]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jbe 0x40fda1
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea eax, [ebp - 0x830]
push eax
call ebx
cmp eax, esi
mov dword [ebp - 0x934], eax
je 0x40fda1
push edi
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x628]
push eax
call fcn.004143f8
add esp, 0xc
push dword [ebp - 0x934]
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
lea eax, [ebp - 0x628]
push eax
call ebx
push dword [ebp - 0x934]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
call ebx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x218]
push eax
call fcn.0040e3e4
pop ecx
push 0x3f
pop ecx
xor eax, eax
lea edi, [ebp - 0x92e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x93c]
push eax
lea eax, [ebp - 0x628]
push eax
mov word [ebp - 0x930], si
mov dword [ebp - 0x93c], esi
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov edi, eax
cmp edi, esi
jbe 0x40fc4a
lea eax, [edi + edi + 2]
push eax
call fcn.004114ba
cmp eax, esi
pop ecx
mov dword [ebp - 0x934], eax
je 0x40fc4a
push eax
push edi
push dword [ebp - 0x93c]
lea eax, [ebp - 0x628]
push eax
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x40fc3e
lea eax, [ebp - 0x944]
push eax
lea eax, [ebp - 0x940]
push eax
push 0x424860
push dword [ebp - 0x934]
mov dword [ebp - 0x944], esi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x40fc3e
mov eax, dword [ebp - 0x940]
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 - 0x934]
call fcn.00414259
pop ecx
lea eax, [ebp - 0x930]
push eax
lea eax, [ebp - 0x218]
push eax
call ebx
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 0x40fcd4
lea eax, [ebp - 0x218]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
test eax, eax
je 0x40fcd4
mov edi, 0x4296d0
push edi
call fcn.0040663e
test eax, eax
pop ecx
jne 0x40fddd
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 esi
push edi
call fcn.0040a806
pop ecx
pop ecx
mov ecx, eax
call fcn.0040ca6a
mov ecx, eax
call fcn.0040133c
jmp 0x40fdc8
xor eax, eax
mov word [ebp - 0x420], si
mov ecx, 0x81
lea edi, [ebp - 0x41e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.00414f86
pop ecx
pop ecx
push str..SetupUI.cab
lea eax, [ebp - 0x420]
push eax
call ebx
push esi
lea eax, [ebp - 0x420]
push eax
push str.SETUPUI
push 0x68
call fcn.0040d0f4
add esp, 0x10
test eax, eax
jne 0x40fd57
mov edi, 0x4296d0
push edi
call fcn.0040663e
test eax, eax
pop ecx
jne 0x40fddd
push 1
push str._XmpSetup_save_ui_cab_failed
push esi
push edi
call fcn.0040a806
pop ecx
pop ecx
mov ecx, eax
call fcn.0040ca6a
jmp 0x40fdd6
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x938]
call fcn.00414f86
pop ecx
pop ecx
push dword [ebp - 0x938]
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
push dword [ebp - 0x938]
push str.installworkdir
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.0040eb7e
pop ecx
pop ecx
mov esi, eax
jmp 0x40fddd
mov edi, 0x4296d0
push edi
call fcn.0040663e
test eax, eax
pop ecx
jne 0x40fddd
push 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._XmpSetup_get_temp_path_failed_lasterror
push esi
push edi
call fcn.0040a806
pop ecx
pop ecx
mov ecx, eax
call fcn.0040ca6a
mov ecx, eax
call fcn.0040123d
mov ecx, eax
call fcn.0040b2e1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x95c]
call fcn.0040cd39
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041428f
leave
ret