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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffefe0
push esi
push edi
cmp dword [0x4147c5], 0
je 0x40205f
push dword [0x4147c5]
call fcn.00401835
mov dword [0x4147c5], 0
cmp dword [0x4147c9], 0
je 0x40207d
push dword [0x4147c9]
call fcn.00401835
mov dword [0x4147c9], 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 0x40220b
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 0x402203
push 0x41481d
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall
call fcn.00401d75
or eax, eax
je 0x4021f8
mov edx, eax
lea eax, [ebp - 0x1004]
push eax
push edx
call fcn.00401dc9
or eax, eax
je 0x4021f8
mov dword [ebp - 0x1020], eax
lea eax, [ebp - 0x1018]
push eax
push str.UninstallString
push dword [ebp - 0x1020]
push 0x80000002
call fcn.00401cee
or eax, eax
je 0x4021ed
cmp eax, 1
jbe 0x4021ed
push eax
push dword [ebp - 0x1018]
push eax
push dword [ebp - 0x1010]
call fcn.004014fb
lea eax, [ebp - 0x1018]
push eax
push str.DisplayName
push dword [ebp - 0x1020]
push 0x80000002
call fcn.00401cee
or eax, eax
je 0x4021c8
cmp dword [ebp - 0x1018], 1
jbe 0x4021c8
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.004014fb
pop eax
push dword [ebp - 0x1018]
push eax
push dword [ebp - 0x1014]
call fcn.004014fb
call fcn.00401835
jmp 0x4021e8
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.004014fb
call fcn.00401835
push dword [ebp - 0x1020]
call fcn.00401835
inc dword [ebp - 0x100c]
jmp 0x4020ba
push dword [ebp - 4]
call sub.advapi32.dll_RegCloseKey
push 0
push dword [ebp - 0x1010]
call fcn.004014e6
push 0
push dword [ebp - 0x1014]
call fcn.004014e6
lea eax, [ebp - 0x101c]
push eax
push dword [ebp - 0x1010]
call sub.ole32.dll_GetHGlobalFromStream
test eax, eax
js 0x402286
push dword [ebp - 0x1010]
call fcn.00401082
mov dword [ebp - 0x1018], eax
push dword [ebp - 0x1018]
call fcn.0040184c
mov dword [0x4147c5], eax
push dword [ebp - 0x101c]
call sub.kernel32.dll_GlobalLock
or eax, eax
je 0x402286
mov ecx, dword [ebp - 0x1018]
mov esi, eax
mov edi, dword [0x4147c5]
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 0x4022e7
push dword [ebp - 0x1014]
call fcn.00401082
mov dword [ebp - 0x1018], eax
push dword [ebp - 0x1018]
call fcn.0040184c
mov dword [0x4147c9], eax
push dword [ebp - 0x101c]
call sub.kernel32.dll_GlobalLock
or eax, eax
je 0x4022e7
mov ecx, dword [ebp - 0x1018]
mov esi, eax
mov edi, dword [0x4147c9]
rep movsb byte es:[edi], byte [esi]
push dword [ebp - 0x101c]
call sub.kernel32.dll_GlobalUnlock
push dword [ebp - 0x1010]
call fcn.00401021
push dword [ebp - 0x1014]
call fcn.00401021
pop edi
pop esi
leave
ret