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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
mov ebx, eax
sub esp, 0x8c
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x30]
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x58], ecx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
mov dword [ebp - 0x54], eax
sub esp, 0x30
test eax, eax
jne 0x404980
mov eax, dword [ebp + 8]
or eax, dword [ebp - 0x30]
je 0x40471e
mov dword [esp + 4], esi
mov dword [esp], 0x40930c
call sym._output_string
mov edi, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp], 0x200
mov esi, 0x100
mov dword [ebp - 0x5c], edi
call edi
mov dword [esp], 0x800
mov dword [ebp - 0x3c], eax
call edi
mov dword [ebp - 0x44], 0
mov ebx, eax
mov eax, dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x40], 0x800
mov dword [ebp - 0x4c], eax
lea esi, [esi]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x2c], esi
mov dword [esp + 0x18], ebx
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumValueW]
sub esp, 0x20
test eax, eax
je 0x4047d0
cmp eax, 0xea
jne 0x404810
mov edi, dword [ebp - 0x28]
cmp edi, dword [ebp - 0x40]
jbe 0x4047f0
mov dword [esp], ebx
mov eax, dword [ebp - 0x4c]
mov dword [esp + 4], edi
call eax
mov dword [ebp - 0x40], edi
mov ebx, eax
jmp 0x404760
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x20]
mov ecx, ebx
mov dword [esp], eax
mov eax, dword [ebp - 0x3c]
call sym._output_value
inc dword [ebp - 0x44]
jmp 0x404760
mov eax, dword [ebp - 0x3c]
lea edi, [esi + esi]
shl esi, 2
mov dword [esp + 4], esi
mov esi, edi
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x3c], eax
jmp 0x404760
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], ebx
call esi
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x44]
or eax, dword [ebp + 8]
jne 0x404940
mov edx, dword [ebp - 0x34]
test edx, edx
jne 0x404848
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 edi, eax
mov eax, dword [ebp - 0x50]
cmp word [eax], 0
je 0x4049db
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x404868
sub eax, dword [ebp - 0x50]
sar eax, 1
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], esi
mov esi, dword [ebp - 0x48]
xor ebx, ebx
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 0x101
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
sub esp, 0x20
test eax, eax
jne 0x404998
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x404960
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x50]
mov dword [esp], eax
call sym._build_subkey_path
mov dword [esp + 8], 0
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], eax
mov eax, dword [0x4081b0]
mov dword [esp + 4], edi
or eax, 0x20019
mov dword [esp], esi
mov dword [esp + 0xc], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
je 0x4049b0
mov eax, dword [ebp - 0x3c]
inc ebx
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
jmp 0x404881
mov dword [esp], 0x4092e6
call sym._output_string
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x404836
jmp 0x404848
mov eax, dword [ebp - 0x50]
mov dword [esp + 8], edi
inc ebx
mov dword [esp], str._1_2_n
mov dword [esp + 4], eax
call sym._output_string
jmp 0x404881
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], edi
mov esi, dword [ebp - 0x40]
call esi
mov eax, dword [ebp - 0x54]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 1
mov edx, dword [ebp - 0x3c]
mov ecx, 1
mov eax, dword [ebp - 0x1c]
call sym._query_all
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x40492b
mov dword [ebp - 0x44], 0
jmp 0x404879