Function at 0x401610
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x244
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x230], 0
jmp 0x40182e
lea eax, [ebp - 0x220]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.DisplayName
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
test eax, eax
jne 0x401815
mov dword [ebp - 0x210], 4
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], str.WindowsInstaller
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
test eax, eax
jne 0x4016c5
cmp dword [ebp - 0x214], 4
je 0x401950
lea ebx, [ebp - 0x21c]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.UninstallString
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
test eax, eax
jne 0x401815
mov eax, dword [ebp - 0x21c]
mov esi, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp], eax
call esi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov edi, eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.UninstallString
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
mov eax, dword [0x406004]
add eax, 1
lea ebx, [eax + eax*4]
mov dword [0x406004], eax
shl ebx, 2
mov dword [esp + 4], ebx
mov eax, dword [0x406008]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
lea ebx, [eax + ebx - 0x14]
mov dword [0x406008], eax
mov eax, dword [ebp - 0x22c]
mov dword [ebx], eax
lea eax, [ebp - 0x20c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsdup]
mov dword [ebx + 4], eax
mov eax, dword [0x406004]
lea edx, [eax + eax*4]
mov eax, dword [0x406008]
lea ebx, [eax + edx*4 - 0x14]
mov eax, dword [ebp - 0x220]
mov dword [esp], eax
call esi
lea ecx, [ebp - 0x220]
mov dword [ebx + 8], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.DisplayName
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
mov eax, dword [0x406004]
sub esp, 0x18
lea edx, [eax + eax*4]
mov eax, dword [0x406008]
lea eax, [eax + edx*4 - 0x14]
mov dword [eax + 0xc], edi
mov dword [eax + 0x10], 0
test byte [section..data], 8
jne 0x4019a0
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
add dword [ebp - 0x230], 1
sub esp, 4
mov dword [ebp - 0x224], 0xff
lea eax, [ebp - 0x224]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x20c]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x230]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x22c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
sub esp, 0x20
cmp eax, 0x103
je 0x401940
lea eax, [ebp - 0x228]
mov dword [esp + 0xc], 0x20019
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x20c]
mov dword [esp + 8], 0
lea edi, [ebp - 0x210]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x22c]
lea esi, [ebp - 0x218]
lea ebx, [ebp - 0x214]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
mov dword [ebp - 0x210], 4
sub esp, 0x14
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], str.SystemComponent
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
test eax, eax
jne 0x401638
cmp dword [ebp - 0x214], 4
jne 0x401638
cmp dword [ebp - 0x218], 1
jne 0x401638
jmp 0x401815
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [ebp - 0x218], 1
jne 0x4016c5
lea eax, [ebp - 0x20c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcslen]
mov esi, dword [sym.imp.ucrtbase.dll_malloc]
lea eax, [eax + eax + 0x16]
mov dword [esp], eax
call esi
mov dword [esp + 4], str.msiexec__x_s
mov edi, eax
lea eax, [ebp - 0x20c]
mov dword [esp], edi
mov dword [esp + 8], eax
call dword [0x40729c]
jmp 0x40174e
mov eax, edi
call fcn.00401090
mov edx, dword [0x406008]
mov esi, eax
mov eax, dword [0x406004]
lea eax, [eax + eax*4]
lea eax, [edx + eax*4]
mov eax, dword [eax - 0xc]
call fcn.00401090
mov ecx, dword [0x406008]
mov ebx, eax
mov eax, dword [0x406004]
lea eax, [eax + eax*4]
lea eax, [ecx + eax*4]
mov eax, dword [eax - 0x10]
call fcn.00401090
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
mov eax, dword [0x406004]
mov dword [esp + 0xc], str.allocated_entry__d:__s___s____s_n
mov dword [esp + 8], str.FetchFromRootKey
mov dword [esp + 4], 0x403000
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.00401340
jmp 0x401815