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

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
mov esi, edx
push ebx
xor ebx, ebx
sub esp, 0x8c
mov dword [ebp - 0x44], eax
xor eax, eax
mov dword [esp + 0x2c], eax
xor eax, eax
mov dword [esp + 0x28], eax
xor eax, eax
mov dword [esp + 0x24], eax
xor eax, eax
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x30]
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x34]
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [ebp - 0x50], edx
xor edx, edx
mov dword [ebp - 0x58], ecx
xor ecx, ecx
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], ebx
mov dword [esp + 4], eax
mov dword [esp], edi
call sym._RegQueryInfoKeyW_48
mov dword [ebp - 0x54], eax
sub esp, 0x30
test eax, eax
jne 0x4057d0
mov eax, dword [ebp + 8]
or eax, dword [ebp - 0x30]
je 0x40556b
mov dword [esp + 4], esi
mov dword [esp], 0x409428
call sym._output_string
mov dword [esp], 0x200
mov ebx, dword [sym.imp.ucrtbase.dll_malloc]
mov esi, 0x100
mov dword [ebp - 0x5c], ebx
call ebx
mov dword [esp], 0x800
mov edi, eax
call ebx
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0x800
mov ebx, eax
mov eax, dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x4c], eax
lea esi, [esi]
lea edi, [edi]
mov dword [esp + 0x18], ebx
mov eax, dword [ebp - 0x3c]
mov dword [esp + 8], edi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call sym._RegEnumValueW_32
sub esp, 0x20
test eax, eax
je 0x405620
cmp eax, 0xea
jne 0x405660
mov edx, dword [ebp - 0x28]
cmp edx, dword [ebp - 0x3c]
jbe 0x405640
mov dword [esp], ebx
mov eax, dword [ebp - 0x4c]
mov dword [esp + 4], edx
mov dword [ebp - 0x3c], edx
call eax
mov ebx, eax
jmp 0x4055b0
mov eax, dword [ebp - 0x28]
mov ecx, ebx
mov edx, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, edi
call sym._output_value
inc dword [ebp - 0x40]
jmp 0x4055b0
mov dword [esp], edi
lea eax, [esi + esi]
mov dword [ebp - 0x48], eax
shl esi, 2
mov dword [esp + 4], esi
call dword [sym.imp.ucrtbase.dll_realloc]
mov esi, dword [ebp - 0x48]
mov edi, eax
jmp 0x4055b0
mov dword [esp], ebx
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x3c], eax
mov esi, eax
call eax
mov dword [esp], edi
call esi
mov eax, dword [ebp - 0x40]
or eax, dword [ebp + 8]
jne 0x405790
mov ecx, dword [ebp - 0x34]
test ecx, ecx
jne 0x405698
mov eax, dword [ebp - 0x54]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x202
mov eax, dword [ebp - 0x5c]
call eax
mov ebx, eax
mov eax, dword [ebp - 0x50]
cmp word [eax], 0
je 0x40582a
lea esi, [esi]
lea edi, [edi]
add eax, 2
cmp word [eax], 0
jne 0x4056c0
mov edx, dword [ebp - 0x50]
sub eax, edx
sar eax, 1
mov dword [ebp - 0x48], eax
mov edi, dword [ebp - 0x44]
xor esi, esi
mov dword [esp + 8], ebx
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x24]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 4], esi
mov dword [esp], edi
mov dword [ebp - 0x24], 0x101
call sym._RegEnumKeyExW_32
sub esp, 0x20
test eax, eax
jne 0x4057e8
mov edx, dword [ebp - 0x58]
test edx, edx
je 0x4057b0
mov dword [esp + 8], ebx
mov eax, dword [ebp - 0x24]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x50]
mov dword [esp], eax
call sym._build_subkey_path
mov dword [esp + 4], ebx
mov dword [esp], edi
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], eax
mov eax, dword [0x40c080]
or eax, 0x20019
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
call sym._RegOpenKeyExW_20
mov edx, dword [ebp - 0x40]
sub esp, 0x14
test eax, eax
je 0x405800
mov dword [esp], edx
mov eax, dword [ebp - 0x3c]
inc esi
call eax
jmp 0x4056d8
mov dword [esp], 0x409402
call sym._output_string
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x405687
jmp 0x405698
mov dword [esp + 8], ebx
mov eax, dword [ebp - 0x50]
inc esi
mov dword [esp], str._1_2_n
mov dword [esp + 4], eax
call sym._output_string
jmp 0x4056d8
mov dword [ebp - 0x54], 1
mov eax, dword [ebp - 0x54]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], ebx
mov eax, dword [ebp - 0x3c]
call eax
mov eax, dword [ebp - 0x54]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 1
mov eax, dword [ebp - 0x1c]
mov ecx, 1
call sym._query_all
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._RegCloseKey_4
mov edx, dword [ebp - 0x40]
sub esp, 4
jmp 0x405779
mov dword [ebp - 0x48], 0
jmp 0x4056d3