Function at 0x4021a4
Capabilities:
Get common file path
Get installed programs
Persist via run registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
mov eax, dword [0x40f058]
cmp eax, 0xffffffff
je 0x4021be
push eax
call fcn.0040121f
pop ecx
push ebx
xor ebx, ebx
cmp dword [0x411b10], ebx
push esi
push edi
jne 0x402698
mov eax, dword [0x411ab8]
cmp byte [eax], bl
je 0x40246e
push 2
push eax
call section..text
mov esi, eax
push ebx
push esi
call fcn.0040113a
push esi
call fcn.00401103
push dword [0x411ac8]
mov dword [ebp - 0x18], eax
mov word [ebp - 0x14], 0x1235
mov word [ebp - 0x12], bx
mov dword [ebp - 0x10], ebx
call fcn.0040629f
lea eax, [ebp - 8]
push 4
push eax
push esi
mov dword [ebp - 8], ebx
call fcn.004010cd
mov edi, dword [0x411b04]
add esp, 0x24
cmp dword [0x411b08], ebx
mov dword [ebp - 0xc], ebx
jbe 0x402311
push edi
call fcn.004026eb
mov ax, word [edi + 4]
pop ecx
cmp ax, 0x17
je 0x402252
cmp ax, 0x19
je 0x402252
cmp ax, 0x1f4
jne 0x40228c
cmp byte [edi + 0xb], 1
jne 0x40228c
mov al, byte [edi + 8]
mov byte [ebp - 4], bl
cmp al, bl
je 0x40226c
cmp byte [edi + 0xa], 1
jne 0x40226c
mov byte [ebp - 4], 1
cmp al, 3
jne 0x402274
or byte [ebp - 4], 2
cmp byte [edi + 0xc], 2
jne 0x40227e
or byte [ebp - 4], 4
push dword [ebp - 4]
push esi
call fcn.00402081
inc dword [ebp - 8]
pop ecx
pop ecx
push 4
push edi
call fcn.004026b6
cmp byte [eax], bl
pop ecx
pop ecx
mov dword [ebp - 0x1c], eax
je 0x4022f6
lea eax, [ebp - 0x20]
push eax
push ebx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x4022f6
push dword [0x411ac4]
push dword [ebp - 0x20]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x4022f6
push dword [0x411ac4]
call fcn.0040629f
push dword [ebp - 0x1c]
push dword [0x411ac4]
call fcn.00408110
push str..lnk
push dword [0x411ac4]
call fcn.00408110
push ebx
push esi
call fcn.00402081
add esp, 0x1c
inc dword [ebp - 8]
inc dword [ebp - 0xc]
push edi
call fcn.0040199b
mov edi, eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [0x411b08]
pop ecx
jb 0x402235
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 - 0x10], ecx
call fcn.00401114
lea eax, [ebp - 0x14]
push 8
push eax
push esi
call fcn.004010cd
lea eax, [ebp - 8]
push 4
push eax
push esi
call fcn.004010cd
mov eax, dword [ebp - 0x10]
add eax, 0xfffffffc
push eax
push esi
call fcn.00401127
push esi
call fcn.0040425d
mov eax, dword [0x411b68]
add esp, 0x30
cmp eax, ebx
je 0x402444
cmp byte [eax], bl
je 0x402444
lea eax, [ebp - 0x1bc]
push str.SoftwareMicrosoftWindowsCurrentVersionUninstall_
push eax
call fcn.00408100
push dword [0x411b68]
lea eax, [ebp - 0x1bc]
push eax
call fcn.00408110
add esp, 0x10
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x1bc]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
push dword [0x411b68]
call fcn.00408080
pop ecx
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push eax
push dword [0x411b68]
push 1
push ebx
push str.DisplayName
push dword [ebp - 4]
call edi
push dword [0x411ab8]
call fcn.00408080
pop ecx
push eax
push dword [0x411ab8]
push 1
push ebx
push str.UninstallString
push dword [ebp - 4]
call edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x1bc]
mov word [ebp - 0x14], 0x1238
push eax
mov word [ebp - 0x12], bx
call fcn.00408080
add eax, 6
push 8
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
push esi
call fcn.004010cd
lea eax, [ebp - 0x18]
push 4
push eax
push esi
mov dword [ebp - 0x18], 0x80000002
call fcn.004010cd
lea eax, [ebp - 0x1bc]
push eax
push esi
call fcn.00402168
add esp, 0x24
push esi
call fcn.00401103
lea eax, [ebp - 0x14]
push 8
push eax
push esi
mov word [ebp - 0x14], 0x7f7f
mov word [ebp - 0x12], bx
mov dword [ebp - 0x10], ebx
call fcn.004010cd
push esi
call fcn.0040121f
add esp, 0x14
jmp 0x402476
push 0xffffffffffffffff
call fcn.0040425d
pop ecx
push dword [0x411ac8]
call fcn.004062c6
test byte [0x411b74], 4
pop ecx
je 0x4024f1
cmp dword [0x411b58], ebx
je 0x4024f1
push dword [0x411ac8]
call fcn.00408080
mov esi, eax
mov eax, dword [0x411b5c]
inc esi
cmp eax, 0x10
pop ecx
jb 0x4024b3
mov eax, dword [0x40f060]
jmp 0x4024ba
mov eax, dword [eax*4 + 0x40f05c]
lea ecx, [ebp - 8]
push ecx
push dword [0x411b58]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x4024f1
push esi
push dword [0x411ac8]
push 1
push ebx
push dword [0x411b54]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test byte [0x411b74], 8
je 0x402533
mov edx, dword [0x411b50]
cmp edx, ebx
je 0x402533
mov ecx, dword [0x411b4c]
cmp ecx, ebx
je 0x402533
mov eax, dword [0x411b48]
cmp eax, ebx
je 0x402533
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push edx
push dword [0x411ac8]
push eax
push ecx
call esi
push dword [0x411b50]
push ebx
push ebx
push ebx
call esi
push dword [0x411ac8]
call fcn.0040629f
mov eax, dword [0x411b04]
cmp dword [0x411b08], ebx
pop ecx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], eax
jbe 0x402698
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
mov edi, dword [ebp - 4]
cmp byte [edi + 0xc], 2
jne 0x40267a
push edi
call fcn.004026eb
cmp word [edi + 4], 0x1f4
pop ecx
jne 0x40264e
lea eax, [ebp - 8]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionRunOnce
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40267a
cmp dword [0x411ab0], 0x64
jge 0x402643
push dword [0x411ab0]
lea eax, [ebp - 0x54]
push str.RegCtrl
push str._s_3.3d
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x18]
inc dword [0x411ab0]
mov dword [ebp - 0x1c], ebx
push eax
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x54]
push ebx
push eax
push dword [ebp - 8]
mov dword [ebp - 0x18], 0x168
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x402598
lea eax, [ebp - 0x158]
push 0x104
push eax
push dword [0x411ac4]
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
lea eax, [ebp - 0x158]
push eax
lea eax, [ebp - 0x324]
push str.regsvr32__s__s
push eax
call esi
lea eax, [ebp - 0x158]
push eax
call fcn.00408080
add esp, 0x10
push eax
lea eax, [ebp - 0x158]
push eax
push 1
lea eax, [ebp - 0x54]
push ebx
push eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40267a
push dword [0x411ac4]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, 0x20
jb 0x40267a
push str.DllRegisterServer
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x402673
call eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push dword [ebp - 4]
inc dword [ebp - 0xc]
call fcn.0040199b
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [0x411b08]
pop ecx
jb 0x40255c
cmp word [0x40f042], 0xffff
jne 0x4026ab
push 5
call fcn.004017d5
pop ecx
pop edi
mov dword [0x411ae4], ebx
pop esi
pop ebx
leave
ret