Function at 0x416243
Capabilities:
Get common file path
Query environment variable
Query or enumerate registry value

Disassembly:
mov eax, 0x4303c0
call fcn.004083b8
sub esp, 0x12c
mov al, byte [ebp - 0x25]
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
push ebx
mov dword [ebp - 0x2c], edi
mov byte [edi], al
call fcn.00403360
mov al, byte [ebp - 0x25]
lea ecx, [edi + 0x10]
push ebx
mov dword [ebp - 4], ebx
mov byte [ecx], al
call fcn.00403360
mov al, byte [ebp - 0x25]
lea ecx, [edi + 0x20]
push ebx
mov byte [ebp - 4], 1
mov byte [ecx], al
call fcn.00403360
mov al, byte [ebp - 0x25]
lea ecx, [edi + 0x30]
push ebx
mov byte [ebp - 4], 2
mov byte [ecx], al
call fcn.00403360
lea eax, [ebp - 0x25]
lea esi, [edi + 0x44]
push eax
lea eax, [ebp - 0xd]
push ebx
push eax
mov ecx, esi
mov byte [ebp - 4], 3
call fcn.004181ae
mov dword [edi + 0x54], ebx
mov al, byte [0x4541f8]
push 0x40
mov byte [ebp - 0x138], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x137]
mov byte [ebp - 4], 4
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x30]
push eax
push 0xf003f
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push 1
test eax, eax
pop edi
jne 0x41634e
lea eax, [ebp - 0x34]
mov dword [ebp - 0x14], edi
push eax
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
push str.ProgramFilesDir
mov dword [ebp - 0x34], 0x104
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x416345
push str.CSetupWrapperApp:_Both_SHGetSpecialFolderPath_CSIDL_PROGRAM_FILES__and_RegQueryValueEx_HKLMSoftwareMicrosoftWindowsCurrentVersion____ProgramFilesDir__Failed___
push 0x444698
call fcn.00413226
pop ecx
pop ecx
push str.CSetupWrapperApp:_Could_not_set_the_Program_Files_directory_to_replace__ProgramFiles_.
push 0x444698
call fcn.00413226
pop ecx
pop ecx
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
test eax, eax
pop ecx
jbe 0x416389
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
cmp byte [ebp + eax - 0x139], 0x5c
pop ecx
je 0x416389
lea eax, [ebp - 0x138]
push 0x43d2b8
push eax
call fcn.0040d8a0
pop ecx
pop ecx
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
call fcn.00403360
push str._Program_Files_
call fcn.00409f30
pop ecx
push eax
push str._Program_Files_
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
mov byte [ebp - 4], 5
call fcn.0041812c
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
call fcn.00403360
push str._ProgramFiles_
call fcn.00409f30
pop ecx
push eax
push str._ProgramFiles_
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
mov byte [ebp - 4], 6
call fcn.0041812c
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
call fcn.00403360
push str._PF_
call fcn.00409f30
pop ecx
push eax
push str._PF_
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 7
push eax
mov ecx, esi
call fcn.0041812c
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
push eax
lea eax, [ebp - 0x138]
push eax
mov eax, dword [ebp - 0x2c]
lea ecx, [eax + 0x30]
call fcn.00403650
lea eax, [ebp - 0x138]
push 0x104
push eax
mov byte [ebp - 0x138], bl
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x41653f
push str.CSetupWrapperApp:_Both_SHGetSpecialFolderPath_CSIDL_WINDOWS__and_GetWindowsDirectory___Failed___
push 0x444698
call fcn.00413226
pop ecx
lea eax, [ebp - 0x138]
pop ecx
push 0x104
push eax
push str.windir
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x41653f
push str.CSetupWrapperApp:_Also_failed_to_get_environment_variable__windir_.
push 0x444698
call fcn.00413226
pop ecx
pop ecx
push str.CSetupWrapperApp:_Could_not_set_the_Windows_directory_to_replace__Windows_.
push 0x444698
call fcn.00413226
pop ecx
pop ecx
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
test eax, eax
pop ecx
jbe 0x41657a
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
cmp byte [ebp + eax - 0x139], 0x5c
pop ecx
je 0x41657a
lea eax, [ebp - 0x138]
push 0x43d2b8
push eax
call fcn.0040d8a0
pop ecx
pop ecx
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
call fcn.00403360
push str._Windows_
call fcn.00409f30
pop ecx
push eax
push str._Windows_
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
mov byte [ebp - 4], 8
call fcn.0041812c
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
call fcn.00403360
push str._Win_
call fcn.00409f30
pop ecx
push eax
push str._Win_
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
mov byte [ebp - 4], 9
call fcn.0041812c
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
call fcn.00403360
push str._Windir_
call fcn.00409f30
pop ecx
push eax
push str._Windir_
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 0xa
push eax
mov ecx, esi
call fcn.0041812c
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
push eax
lea eax, [ebp - 0x138]
push eax
mov eax, dword [ebp - 0x2c]
lea ecx, [eax + 0x20]
call fcn.00403650
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x135], bl
mov byte [ebp - 0x24], al
call fcn.00403360
push str._WindowsDrive_
call fcn.00409f30
pop ecx
push eax
push str._WindowsDrive_
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
mov byte [ebp - 4], 0xb
call fcn.0041812c
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
lea eax, [ebp - 0x138]
mov byte [ebp - 0x138], bl
push eax
call fcn.00409f30
test eax, eax
pop ecx
jne 0x41677f
lea eax, [ebp - 0x138]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x41677f
push str.CSetupWrapperApp:_Both_SHGetSpecialFolderPath_CSIDL_SYSTEM__and_GetSystemDirectory___Failed___
push 0x444698
call fcn.00413226
pop ecx
pop ecx
push str.CSetupWrapperApp:_Could_not_set_the_System_directory_to_replace__System_.
push 0x444698
call fcn.00413226
pop ecx
pop ecx
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
test eax, eax
pop ecx
jbe 0x4167ba
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
cmp byte [ebp + eax - 0x139], 0x5c
pop ecx
je 0x4167ba
lea eax, [ebp - 0x138]
push 0x43d2b8
push eax
call fcn.0040d8a0
pop ecx
pop ecx
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
call fcn.00403360
push str._System_
call fcn.00409f30
pop ecx
push eax
push str._System_
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
mov byte [ebp - 4], 0xc
call fcn.0041812c
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
call fcn.00403360
push str._System32_
call fcn.00409f30
pop ecx
push eax
push str._System32_
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
mov byte [ebp - 4], 0xd
call fcn.0041812c
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
call fcn.00403360
push str._Sys_
call fcn.00409f30
pop ecx
push eax
push str._Sys_
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 0xe
push eax
mov ecx, esi
call fcn.0041812c
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
call fcn.00403360
push str._Sys32_
call fcn.00409f30
pop ecx
push eax
push str._Sys32_
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
mov byte [ebp - 4], 0xf
call fcn.0041812c
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
push eax
lea eax, [ebp - 0x138]
push eax
mov eax, dword [ebp - 0x2c]
lea ecx, [eax + 0x10]
call fcn.00403650
lea eax, [ebp - 0x138]
mov byte [ebp - 0x138], bl
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
test eax, eax
pop ecx
jne 0x4169fc
lea eax, [ebp - 0x138]
push 0x104
push eax
push str.temp
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x4169fc
push str.CSetupWrapperApp:_Both_GetTempPath___and_GetEnvironmentVariable___temp___Failed___
push 0x444698
call fcn.00413226
pop ecx
lea eax, [ebp - 0x138]
pop ecx
push 0x104
push eax
push 0x441af8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x4169fc
push str.CSetupWrapperApp:_Also_failed_to_get_environment_variable__tmp_.
push 0x444698
call fcn.00413226
pop ecx
pop ecx
push str.CSetupWrapperApp:_Could_not_set_the_Temp_directory_to_replace__Temp_.
push 0x444698
call fcn.00413226
pop ecx
pop ecx
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
test eax, eax
pop ecx
jbe 0x416a37
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
cmp byte [ebp + eax - 0x139], 0x5c
pop ecx
je 0x416a37
lea eax, [ebp - 0x138]
push 0x43d2b8
push eax
call fcn.0040d8a0
pop ecx
pop ecx
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
call fcn.00403360
push str._Temp_
call fcn.00409f30
pop ecx
push eax
push str._Temp_
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
mov byte [ebp - 4], 0x10
call fcn.0041812c
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
call fcn.00403360
push str._Tmp_
call fcn.00409f30
pop ecx
push eax
push str._Tmp_
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
mov byte [ebp - 4], 0x11
call fcn.0041812c
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
lea eax, [ebp - 0x138]
push eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x2c]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.00403650
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x138], bl
mov byte [ebp - 0x24], al
call fcn.00403360
push str._cr_
call fcn.00409f30
pop ecx
push eax
push str._cr_
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
mov byte [ebp - 4], 0x12
call fcn.0041812c
push 0x441a50
mov dword [ebp - 0x14], eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
push 0x441a50
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
call fcn.00403360
push str._lf_
call fcn.00409f30
pop ecx
push eax
push str._lf_
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
mov byte [ebp - 4], 0x13
call fcn.0041812c
push 0x441a44
mov dword [ebp - 0x14], eax
call fcn.00409f30
pop ecx
mov ecx, dword [ebp - 0x14]
push eax
push 0x441a44
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
mov al, byte [ebp - 0xd]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
call fcn.00403360
mov ebx, str._crlf_
push ebx
call fcn.00409f30
pop ecx
push eax
push ebx
lea ecx, [ebp - 0x24]
call fcn.00403650
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
mov byte [ebp - 4], 0x14
call fcn.0041812c
mov esi, 0x433750
mov ebx, eax
push esi
call fcn.00409f30
pop ecx
push eax
push esi
mov ecx, ebx
call fcn.00403650
push edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00403360
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x2c]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret