Function at 0x40a7a4
Capabilities:
Check if file exists
Delete registry key
Delete registry value
Get file attributes
Get installed programs
Set registry value

Disassembly:
mov eax, 0x410bcc
call fcn.00410480
sub esp, 0xf84
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x10], esp
push dword [ebp + 8]
mov dword [ebp - 4], edi
call sub.MSVCRT.dll_wcslen
lea esi, [eax + eax]
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x2c], eax
pop ecx
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
pop ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], edi
inc dword [ebp - 0x20]
push 0x415ebc
push dword [ebp - 0x20]
mov ebx, 0x418d70
lea eax, [ebp - 0x58]
push ebx
push str._s_i_s
push eax
call esi
lea eax, [ebp - 0x58]
push 0x4140b8
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.0040baa5
add esp, 0x28
test eax, eax
jne 0x40a9d2
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
push str.HKCR
push dword [ebp - 0x14]
call edi
test eax, eax
jne 0x40a846
mov dword [ebp - 0x18], 0x80000000
jmp 0x40a897
push str.HKCU
push dword [ebp - 0x14]
call edi
test eax, eax
je 0x40a890
push str.HKLM
push dword [ebp - 0x14]
call edi
test eax, eax
jne 0x40a86b
mov dword [ebp - 0x18], 0x80000002
jmp 0x40a897
push str.HKCC
push dword [ebp - 0x14]
call edi
test eax, eax
jne 0x40a882
mov dword [ebp - 0x18], 0x80000005
jmp 0x40a897
push 0x418d38
push dword [ebp - 0x14]
call edi
test eax, eax
jne 0x40a897
mov dword [ebp - 0x18], 0x80000001
push dword [ebp - 0x14]
lea eax, [ebp - 0x58]
push dword [ebp - 0x20]
push ebx
push str._s_i__s_
push eax
call esi
lea eax, [ebp - 0x58]
push 0x415e9c
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.0040baa5
add esp, 0x28
lea eax, [ebp - 0x28]
mov ebx, 0xf003f
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push 0
push eax
push 0
xor eax, eax
push ebx
push eax
push eax
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x18]
call edi
xor ecx, ecx
cmp eax, ecx
je 0x40a936
cmp eax, 5
jne 0x40a8ff
cmp dword [ebp - 0x18], 0x80000002
jne 0x40a8ff
mov dword [ebp - 0x18], 0x80000001
lea eax, [ebp - 0x28]
push ecx
push eax
push ecx
push ebx
push ecx
push ecx
push ecx
push dword [ebp - 0x14]
push dword [ebp - 0x18]
call edi
test eax, eax
je 0x40a934
push 0x4140b0
push 1
push 1
push dword [ebp - 0x14]
push eax
push str.Could_not_create_open_registry_key
call fcn.00405e29
add esp, 0x18
jmp 0x40a7eb
xor ecx, ecx
cmp dword [ebp + 0xc], ecx
je 0x40a983
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x128]
push str._DEL_s
push eax
call esi
lea eax, [ebp - 0x128]
push 0x415e9c
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.0040baa5
add esp, 0x20
test eax, eax
jne 0x40a983
push dword [ebp - 0x14]
push dword [ebp - 0x18]
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
and dword [ebp - 4], 0
jmp 0x40a7eb
push dword [ebp - 0x20]
lea eax, [ebp - 0x178]
push str.__R_i_
push eax
call esi
lea eax, [ebp - 0x178]
push eax
lea eax, [ebp - 0x58]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x2c]
push dword [ebp + 8]
call fcn.0040baa5
add esp, 0x20
test eax, eax
je 0x40a9e9
mov eax, dword [0x41bc28]
test eax, eax
jne 0x40a9c2
mov eax, 0x41bc2c
push 0x10
push str.Error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [ebp - 0x14]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push dword [ebp - 0x2c]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x40ace3
and dword [ebp - 0x24], 0
inc dword [ebp - 0x24]
lea eax, [ebp - 0xc0]
push dword [ebp - 0x24]
push str._VAL_i_
push eax
call esi
mov ebx, 0x415e9c
lea eax, [ebp - 0xc0]
push ebx
push eax
xor edi, edi
lea eax, [ebp - 0x380]
push edi
push eax
push dword [ebp - 0x2c]
mov dword [ebp - 0x1c], edi
call fcn.0040baa5
add esp, 0x20
test eax, eax
jne 0x40a7eb
push dword [ebp - 0x24]
lea eax, [ebp - 0x150]
push str.__VAL_i_
push eax
call esi
lea eax, [ebp - 0x150]
push eax
lea eax, [ebp - 0xc0]
push eax
lea eax, [ebp - 0xf90]
push edi
push eax
push dword [ebp - 0x2c]
call fcn.0040baa5
add esp, 0x20
lea eax, [ebp - 0x790]
push ebx
push str._TYPE_
push edi
push eax
lea eax, [ebp - 0xf90]
push eax
call fcn.0040baa5
add esp, 0x14
lea eax, [ebp - 0x588]
push ebx
push str._NAME_
push edi
push eax
lea eax, [ebp - 0xf90]
push eax
call fcn.0040baa5
add esp, 0x14
lea eax, [ebp - 0x380]
push eax
call sub.MSVCRT.dll_wcslen
lea eax, [eax + eax + 2]
mov dword [esp], str.REG_SZ
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x790]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x40aacc
mov dword [ebp - 0x30], 1
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall
push dword [ebp - 0x14]
call fcn.0040bafc
xor ebx, ebx
pop ecx
cmp eax, ebx
pop ecx
je 0x40ac59
lea eax, [ebp - 0x588]
push str.UninstallString
push eax
call fcn.0040bafc
pop ecx
cmp eax, ebx
pop ecx
jne 0x40ab13
lea eax, [ebp - 0x588]
push str.DisplayIcon
push eax
call fcn.0040bafc
pop ecx
cmp eax, ebx
pop ecx
je 0x40ab58
lea eax, [ebp - 0x380]
push eax
push 0x41be48
lea eax, [ebp - 0xf90]
push 0x415784
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0xf90]
push eax
lea eax, [ebp - 0x380]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x380]
push eax
call sub.MSVCRT.dll_wcslen
lea eax, [eax + eax + 2]
pop ecx
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x588]
push str.DisplayIcon
push eax
call fcn.0040bafc
pop ecx
cmp eax, ebx
pop ecx
je 0x40ac59
lea eax, [ebp - 0x380]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40ac59
lea eax, [ebp - 0x98]
push 0x40
push eax
lea eax, [ebp - 0x380]
push eax
call fcn.004046cf
add esp, 0xc
cmp eax, ebx
je 0x40ac59
push 0x40
lea eax, [ebp - 0x100]
push ebx
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
xor edi, edi
lea eax, [ebp - 0x98]
push eax
call sub.MSVCRT.dll_strlen
cmp ebx, eax
pop ecx
jae 0x40abf2
mov al, byte [ebp + ebx - 0x98]
cmp al, 0x20
je 0x40abef
cmp al, 0x2c
jne 0x40abe7
mov byte [ebp + edi - 0x100], 0x2e
jmp 0x40abee
mov byte [ebp + edi - 0x100], al
inc edi
inc ebx
jmp 0x40abbd
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x98]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x98]
push 0x2e
push eax
call sub.MSVCRT.dll_strrchr
add esp, 0x10
test eax, eax
je 0x40ac59
and byte [eax], 0
lea eax, [ebp - 0x98]
push 0x2e
push eax
call sub.MSVCRT.dll_strchr
pop ecx
test eax, eax
pop ecx
je 0x40ac59
lea eax, [ebp - 0x98]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
inc eax
push eax
lea eax, [ebp - 0x98]
push eax
push 1
push 0
push str.DisplayVersion
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
cmp dword [ebp + 0xc], 0
jne 0x40aca9
push dword [ebp - 0x1c]
lea eax, [ebp - 0x380]
push eax
lea eax, [ebp - 0x588]
push dword [ebp - 0x30]
push 0
push eax
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x40a9ed
push 0x4140b0
push 1
lea ecx, [ebp - 0x380]
push 1
push ecx
push eax
push str.Could_not_set_registry_value
call fcn.00405e29
add esp, 0x18
jmp 0x40a9ed
lea eax, [ebp - 0x588]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
jmp 0x40a9ed
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
leave
ret