Function at 0x4021a3
Capabilities:
Get common file path
Get installed programs
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
push ebx
push dword [0x40d058]
call fcn.0040121f
xor ebx, ebx
pop ecx
cmp dword [0x40da34], ebx
jne 0x402534
mov eax, dword [0x40d9e4]
push esi
cmp byte [eax], bl
je 0x402462
push edi
push 2
push eax
call section..text
mov esi, eax
push ebx
push esi
call fcn.0040113a
push esi
call fcn.00401103
push dword [0x40d9f4]
mov dword [ebp - 0x18], eax
mov word [ebp - 0xc], 0x1235
mov word [ebp - 0xa], bx
mov dword [ebp - 8], ebx
call fcn.00405cca
lea eax, [ebp - 0x14]
push 4
push eax
push esi
mov dword [ebp - 0x14], ebx
call fcn.004010cd
mov edi, dword [0x40da28]
add esp, 0x24
cmp dword [0x40da2c], ebx
mov dword [ebp - 4], ebx
jbe 0x402305
push edi
call fcn.00402585
mov ax, word [edi + 4]
pop ecx
cmp ax, 0x17
je 0x402246
cmp ax, 0x19
jne 0x402280
cmp byte [edi + 0xb], 1
jne 0x402280
mov al, byte [edi + 8]
mov byte [ebp - 0x10], bl
cmp al, bl
je 0x402260
cmp byte [edi + 0xa], 1
jne 0x402260
mov byte [ebp - 0x10], 1
cmp al, 3
jne 0x402268
or byte [ebp - 0x10], 2
cmp byte [edi + 0xc], 2
jne 0x402272
or byte [ebp - 0x10], 4
push dword [ebp - 0x10]
push esi
call fcn.0040208f
inc dword [ebp - 0x14]
pop ecx
pop ecx
push 4
push edi
call fcn.00402550
cmp byte [eax], bl
pop ecx
pop ecx
mov dword [ebp - 0x20], eax
je 0x4022ea
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x4022ea
push dword [0x40d9f0]
push dword [ebp - 0x1c]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x4022ea
push dword [0x40d9f0]
call fcn.00405cca
push dword [ebp - 0x20]
push dword [0x40d9f0]
call fcn.00407ac0
push str..lnk
push dword [0x40d9f0]
call fcn.00407ac0
push ebx
push esi
call fcn.0040208f
add esp, 0x1c
inc dword [ebp - 0x14]
inc dword [ebp - 4]
push edi
call fcn.00401d69
mov edi, eax
mov eax, dword [ebp - 4]
cmp eax, dword [0x40da2c]
pop ecx
jb 0x40222f
push esi
call fcn.00401103
mov ecx, eax
mov eax, dword [ebp - 0x18]
sub ecx, eax
add eax, 0xfffffff8
push eax
push esi
mov dword [ebp - 8], ecx
call fcn.00401114
lea eax, [ebp - 0xc]
push 8
push eax
push esi
call fcn.004010cd
lea eax, [ebp - 0x14]
push 4
push eax
push esi
call fcn.004010cd
mov eax, dword [ebp - 8]
add eax, 0xfffffffc
push eax
push esi
call fcn.00401127
push esi
call fcn.00403e75
mov eax, dword [0x40da8c]
add esp, 0x30
cmp eax, ebx
je 0x402437
cmp byte [eax], bl
je 0x402437
lea eax, [ebp - 0x188]
push str.SoftwareMicrosoftWindowsCurrentVersionUninstall_
push eax
call fcn.00407ab0
push dword [0x40da8c]
lea eax, [ebp - 0x188]
push eax
call fcn.00407ac0
add esp, 0x10
lea eax, [ebp - 4]
mov edi, 0x80000002
push eax
lea eax, [ebp - 0x188]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
push dword [0x40da8c]
call fcn.00407a30
pop ecx
push eax
push dword [0x40da8c]
push 1
push ebx
push str.DisplayName
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [0x40d9e4]
call fcn.00407a30
pop ecx
push eax
push dword [0x40d9e4]
push 1
push ebx
push str.UninstallString
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x188]
mov word [ebp - 0xc], 0x1238
push eax
mov word [ebp - 0xa], bx
call fcn.00407a30
add eax, 6
push 8
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push esi
call fcn.004010cd
lea eax, [ebp - 0x18]
push 4
push eax
push esi
mov dword [ebp - 0x18], edi
call fcn.004010cd
lea eax, [ebp - 0x188]
push eax
push esi
call fcn.00402167
add esp, 0x24
push esi
call fcn.00401103
lea eax, [ebp - 0xc]
push 8
push eax
push esi
mov word [ebp - 0xc], 0x7f7f
mov word [ebp - 0xa], bx
mov dword [ebp - 8], ebx
call fcn.004010cd
push esi
call fcn.0040121f
add esp, 0x14
pop edi
jmp 0x40246a
push 0xffffffffffffffff
call fcn.00403e75
pop ecx
push dword [0x40d9f4]
call fcn.00405cf1
test byte [0x40da98], 4
pop ecx
je 0x4024e5
cmp dword [0x40da7c], ebx
je 0x4024e5
push dword [0x40d9f4]
call fcn.00407a30
mov esi, eax
mov eax, dword [0x40da80]
inc esi
cmp eax, 0x10
pop ecx
jb 0x4024a7
mov eax, dword [0x40d060]
jmp 0x4024ae
mov eax, dword [eax*4 + 0x40d05c]
lea ecx, [ebp - 4]
push ecx
push dword [0x40da7c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x4024e5
push esi
push dword [0x40d9f4]
push 1
push ebx
push dword [0x40da78]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test byte [0x40da98], 8
je 0x402527
mov edx, dword [0x40da74]
cmp edx, ebx
je 0x402527
mov ecx, dword [0x40da70]
cmp ecx, ebx
je 0x402527
mov eax, dword [0x40da6c]
cmp eax, ebx
je 0x402527
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push edx
push dword [0x40d9f4]
push eax
push ecx
call esi
push dword [0x40da74]
push ebx
push ebx
push ebx
call esi
push dword [0x40d9f4]
call fcn.00405cca
pop ecx
pop esi
cmp word [0x40d042], 0xffff
jne 0x402547
push 5
call fcn.004017d5
pop ecx
mov dword [0x40da08], ebx
pop ebx
leave
ret