Function at 0x401faf
Capabilities:
Get installed programs
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffefe0
push esi
push edi
cmp dword [0x41505e], 0
je 0x401fd8
push dword [0x41505e]
call fcn.00401871
mov dword [0x41505e], 0
cmp dword [0x415062], 0
je 0x401ff6
push dword [0x415062]
call fcn.00401871
mov dword [0x415062], 0
lea eax, [ebp - 0x1010]
push eax
call fcn.00401000
lea eax, [ebp - 0x1014]
push eax
call fcn.00401000
lea eax, [ebp - 4]
push eax
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall
push 0x80000002
call sub.advapi32.dll_RegOpenKeyA
or eax, eax
jne 0x402184
mov dword [ebp - 0x100c], 0
mov dword [ebp - 0x1008], 0xfff
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x1008]
push eax
lea eax, [ebp - 0x1004]
push eax
push dword [ebp - 0x100c]
push dword [ebp - 4]
call sub.advapi32.dll_RegEnumKeyExA
or eax, eax
jne 0x40217c
push 0x4150b6
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall
call fcn.00401cec
and eax, eax
je 0x402171
mov edx, eax
lea eax, [ebp - 0x1004]
push eax
push edx
call fcn.00401d40
and eax, eax
je 0x402171
mov dword [ebp - 0x1020], eax
lea eax, [ebp - 0x1018]
push eax
push str.UninstallString
push dword [ebp - 0x1020]
push 0x80000002
call fcn.00401c65
and eax, eax
je 0x402166
cmp eax, 1
jbe 0x402166
push eax
push dword [ebp - 0x1018]
push eax
push dword [ebp - 0x1010]
call fcn.00401537
lea eax, [ebp - 0x1018]
push eax
push str.DisplayName
push dword [ebp - 0x1020]
push 0x80000002
call fcn.00401c65
and eax, eax
je 0x402141
cmp dword [ebp - 0x1018], 1
jbe 0x402141
push eax
push eax
lea eax, [ebp - 0x1004]
push eax
call sub.kernel32.dll_lstrlenA
push eax
lea eax, [ebp - 0x1004]
push eax
push dword [ebp - 0x1014]
call fcn.00401537
pop eax
push dword [ebp - 0x1018]
push eax
push dword [ebp - 0x1014]
call fcn.00401537
call fcn.00401871
jmp 0x402161
lea eax, [ebp - 0x1004]
push eax
call sub.kernel32.dll_lstrlenA
inc eax
push eax
lea eax, [ebp - 0x1004]
push eax
push dword [ebp - 0x1014]
call fcn.00401537
call fcn.00401871
push dword [ebp - 0x1020]
call fcn.00401871
inc dword [ebp - 0x100c]
jmp 0x402033
push dword [ebp - 4]
call sub.advapi32.dll_RegCloseKey
push 0
push dword [ebp - 0x1010]
call fcn.00401522
push 0
push dword [ebp - 0x1014]
call fcn.00401522
lea eax, [ebp - 0x101c]
push eax
push dword [ebp - 0x1010]
call sub.ole32.dll_GetHGlobalFromStream
test eax, eax
js 0x4021ff
push dword [ebp - 0x1010]
call fcn.00401091
mov dword [ebp - 0x1018], eax
push dword [ebp - 0x1018]
call fcn.00401888
mov dword [0x41505e], eax
push dword [ebp - 0x101c]
call sub.kernel32.dll_GlobalLock
and eax, eax
je 0x4021ff
mov ecx, dword [ebp - 0x1018]
mov esi, eax
mov edi, dword [0x41505e]
rep movsb byte es:[edi], byte [esi]
push dword [ebp - 0x101c]
call sub.kernel32.dll_GlobalUnlock
lea eax, [ebp - 0x101c]
push eax
push dword [ebp - 0x1014]
call sub.ole32.dll_GetHGlobalFromStream
test eax, eax
js 0x402260
push dword [ebp - 0x1014]
call fcn.00401091
mov dword [ebp - 0x1018], eax
push dword [ebp - 0x1018]
call fcn.00401888
mov dword [0x415062], eax
push dword [ebp - 0x101c]
call sub.kernel32.dll_GlobalLock
and eax, eax
je 0x402260
mov ecx, dword [ebp - 0x1018]
mov esi, eax
mov edi, dword [0x415062]
rep movsb byte es:[edi], byte [esi]
push dword [ebp - 0x101c]
call sub.kernel32.dll_GlobalUnlock
push dword [ebp - 0x1010]
call fcn.00401026
push dword [ebp - 0x1014]
call fcn.00401026
pop edi
pop esi
leave
ret