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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x528
push ebx
push esi
push edi
mov edi, 0x421734
mov esi, 0x104
push edi
lea ecx, [ebp - 0x21c]
xor eax, eax
push esi
push ecx
push eax
mov ebx, str.Uninstall
push str.CPLUninstallName
push ebx
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 1
call fcn.0040c615
add esp, 0x18
test eax, eax
je 0x405207
mov dword [ebp - 8], 1
push edi
lea eax, [ebp - 0x21c]
push esi
xor edi, edi
push eax
push edi
push str.UninstallShortcutName
push ebx
call fcn.0040c615
add esp, 0x18
test eax, eax
je 0x40522c
mov dword [ebp - 0x10], 1
cmp dword [ebp - 8], edi
jne 0x40523e
cmp dword [ebp - 0x10], edi
jne 0x40523e
push 1
pop eax
jmp 0x40559e
mov edi, 0x42183c
push edi
push 0
push 0x41e534
push 0x421dd8
call dword [sym.imp.KERNEL32.DLL_GetTempFileNameA]
push edi
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
push str..inf
push edi
call fcn.0040c21b
pop ecx
lea eax, [ebp - 0x21c]
pop ecx
push 0xa
push eax
push 0x421734
push 0
push str.UninstallType
push ebx
call fcn.0040c68e
add esp, 0x10
push eax
call fcn.0041309c
lea eax, [ebp - 0x21c]
push eax
push str.UninstallType
push str.General
call fcn.00402ad0
add esp, 0x18
cmp dword [ebp - 8], 0
je 0x4053f8
lea eax, [ebp - 0x21c]
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall
push eax
call fcn.00413190
lea eax, [ebp - 0x21c]
push 0x41e044
push eax
push 0x208
call fcn.0040baef
lea eax, [ebp - 0x21c]
push 0x422a9c
push eax
push 0x208
call fcn.0040baef
add esp, 0x20
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
xor eax, eax
push eax
push 2
push eax
push eax
push eax
lea eax, [ebp - 0x21c]
push eax
push SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4053f4
push 0x421734
lea eax, [ebp - 0x21c]
push esi
push eax
push 0x423224
push str.CPLUninstallName
push ebx
call fcn.0040c615
add esp, 0x18
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
inc eax
push eax
lea eax, [ebp - 0x21c]
push eax
push 1
push 0
push str.DisplayName
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x4053e5
push esi
push str.IFinst27.exe
push 0x422df8
call fcn.0040c26a
push eax
call fcn.0040be4c
add esp, 0xc
push eax
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpynA]
lea eax, [ebp - 0x21c]
push 0x41e4fc
push eax
push 0x208
call fcn.0040baef
lea eax, [ebp - 0x21c]
push edi
push eax
push 0x208
call fcn.0040baef
add esp, 0x18
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
inc eax
push eax
lea eax, [ebp - 0x21c]
push eax
push 1
push 0
push str.UninstallString
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x4053e9
and dword [ebp - 4], 0
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4053f8
and dword [ebp - 4], 0
cmp dword [ebp - 0x10], 0
je 0x40559b
push 0x421734
lea eax, [ebp - 0x21c]
push esi
push eax
push 0x423224
push str.UninstallShortcutName
push ebx
call fcn.0040c615
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x320]
push eax
call fcn.0040bb2c
lea eax, [ebp - 0x528]
push 0
push eax
call fcn.0040bb2c
add esp, 0x28
lea eax, [ebp - 0x320]
push 0x5c
push eax
call fcn.0040bd1b
pop ecx
push eax
call fcn.00412f00
pop ecx
test eax, eax
pop ecx
je 0x4054b7
inc eax
push 0x5c
push eax
call fcn.00412f00
pop ecx
pop ecx
mov ebx, eax
test ebx, ebx
je 0x4054b7
and byte [ebx], 0
lea eax, [ebp - 0x320]
push esi
push eax
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpynA]
lea eax, [ebp - 0x424]
push eax
call fcn.00402ea9
lea eax, [ebp - 0x424]
push eax
push 0
push str.ShellFolder
call fcn.00402ad0
mov byte [ebx], 0x5c
inc ebx
push 0x5c
push ebx
call fcn.00412f00
add esp, 0x18
jmp 0x405469
lea eax, [ebp - 0x320]
push eax
call fcn.0040bd80
lea eax, [ebp - 0x320]
push eax
call fcn.00402ea9
lea eax, [ebp - 0x320]
push eax
call fcn.0040c449
add esp, 0xc
test eax, eax
je 0x4054ec
push 0
call fcn.0040c449
pop ecx
jmp 0x4054de
push str.IFinst27.exe
push 0x422df8
call fcn.0040c26a
pop ecx
mov ebx, eax
pop ecx
lea eax, [ebp - 0x21c]
push 0x41e4e8
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
lea eax, [ebp - 0x21c]
push edi
push eax
push esi
call fcn.0040baef
push 1
push ebx
lea eax, [ebp - 0x21c]
push 0x423224
push eax
lea eax, [ebp - 0x528]
push ebx
push eax
lea eax, [ebp - 0x320]
push eax
call fcn.00404746
add esp, 0x28
test eax, eax
je 0x405597
lea eax, [ebp - 0x528]
push esi
push eax
lea eax, [ebp - 0x320]
push eax
call fcn.0040c26a
pop ecx
pop ecx
push eax
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpynA]
lea eax, [ebp - 0x21c]
push str..LNK
push eax
push esi
call fcn.0040baef
lea eax, [ebp - 0x21c]
push eax
push 0
push str.Shortcut
call fcn.00402ad0
add esp, 0x18
jmp 0x40559b
and dword [ebp - 4], 0
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret