Function at 0x404710
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
xor edi, edi
push esi
push ebx
mov ebx, eax
lea eax, [ebp - 0x20]
sub esp, 0x4c
mov dword [ebp - 0x24], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x20019
mov dword [esp + 8], 0
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersionAppletsRegeditFavorites
mov dword [esp], 0x80000001
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
je 0x404760
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x18]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
sub esp, 0x30
mov edi, eax
test eax, eax
jne 0x404900
mov edx, dword [ebp - 0x1c]
test edx, edx
jne 0x4047f0
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x18]
lea ecx, [eax + 1]
lea eax, [ecx + ecx]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x28], ecx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
test ebx, ebx
mov ecx, dword [ebp - 0x28]
mov esi, eax
je 0x404843
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x800
mov dword [esp], ebx
call dword [0x4175fc]
mov eax, dword [ebp - 0x1c]
sub esp, 0x10
test eax, eax
je 0x4048e0
mov ecx, dword [ebp - 0x18]
xor edi, edi
jmp 0x40485f
add edi, 1
cmp dword [ebp - 0x1c], edi
jbe 0x4048e0
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x10]
mov dword [ebp - 0x14], ecx
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x14]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumValueW]
sub esp, 0x20
test eax, eax
jne 0x404850
cmp dword [ebp - 0x10], 1
jne 0x404850
test ebx, ebx
je 0x404920
lea eax, [edi + 0x80e8]
mov dword [esp + 0xc], esi
add edi, 1
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [0x4175fc]
sub esp, 0x10
cmp dword [ebp - 0x1c], edi
ja 0x40485c
lea esi, [esi]
nop
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x4047e5
test byte [0x410014], 2
jne 0x404950
mov eax, dword [ebp - 0x20]
xor edi, edi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x4047e5
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x404850
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], 0x180
mov dword [esp], eax
call dword [0x41770c]
sub esp, 0x10
jmp 0x404850
mov dword [esp + 0x10], eax
xor edi, edi
mov dword [esp + 0xc], str.RegQueryInfoKey_failed:__ld_n
mov dword [esp + 8], str.add_favourite_key_items
mov dword [esp + 4], 0x410014
mov dword [esp], 1
call fcn.004046c0
jmp 0x4047d6