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

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
push ebx
mov ebx, edx
sub esp, 0x6c
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x44], ecx
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x28]
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], edi
call dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
mov dword [ebp - 0x40], eax
sub esp, 0x30
test eax, eax
jne 0x405920
mov eax, dword [ebp + 8]
or eax, dword [ebp - 0x24]
je 0x4056db
mov dword [esp + 4], ebx
mov dword [esp], 0x40a4a8
call sym._output_string
mov esi, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp], 0x200
mov ebx, 0x100
mov dword [ebp - 0x48], esi
call esi
mov dword [esp], 0x800
mov edi, eax
call esi
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0x800
mov esi, eax
lea esi, [esi]
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x14]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumValueW]
sub esp, 0x20
test eax, eax
je 0x405780
cmp eax, 0xea
jne 0x4057c0
mov edx, dword [ebp - 0x1c]
cmp dword [ebp - 0x2c], edx
jae 0x4057a0
mov dword [esp + 4], edx
mov dword [ebp - 0x2c], edx
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_realloc]
mov esi, eax
jmp 0x405710
mov eax, dword [ebp - 0x1c]
mov ecx, esi
mov dword [esp], eax
mov edx, dword [ebp - 0x14]
mov eax, edi
call sym._output_value
add dword [ebp - 0x30], 1
jmp 0x405710
lea eax, [ebx + ebx]
shl ebx, 2
mov dword [ebp - 0x38], eax
mov dword [esp + 4], ebx
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_realloc]
mov ebx, dword [ebp - 0x38]
mov edi, eax
jmp 0x405710
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], esi
mov ebx, eax
mov dword [ebp - 0x38], eax
call eax
mov dword [esp], edi
call ebx
mov eax, dword [ebp - 0x30]
or eax, dword [ebp + 8]
jne 0x405900
mov ecx, dword [ebp - 0x28]
test ecx, ecx
jne 0x4057f8
mov eax, dword [ebp - 0x40]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x202
mov eax, dword [ebp - 0x48]
call eax
mov edx, dword [ebp - 0x3c]
mov ebx, eax
cmp word [edx], 0
je 0x4059e3
lea esi, cs:[esi]
add edx, 2
cmp word [edx], 0
jne 0x405818
mov eax, dword [ebp - 0x3c]
sub edx, eax
sar edx, 1
mov dword [ebp - 0x48], edx
mov edx, dword [ebp - 0x44]
xor esi, esi
lea eax, [ebp - 0x18]
mov dword [ebp - 0x2c], eax
test edx, edx
je 0x405938
mov eax, dword [sym.imp.advapi32.dll_RegEnumKeyExW]
mov edi, dword [ebp - 0x34]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x18], 0x101
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], esi
mov dword [esp], edi
mov eax, dword [ebp - 0x30]
call eax
sub esp, 0x20
test eax, eax
jne 0x4059a0
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym._build_subkey_path
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [0x40c080]
mov dword [esp + 8], 0
or eax, 0x20019
mov dword [esp + 4], ebx
mov dword [esp + 0xc], eax
mov dword [esp], edi
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
mov edx, dword [ebp - 0x34]
sub esp, 0x14
test eax, eax
je 0x4059b8
mov dword [esp], edx
add esi, 1
mov eax, dword [ebp - 0x38]
call eax
jmp 0x405849
mov dword [esp], 0x40a482
call sym._output_string
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4057e7
jmp 0x4057f8
mov dword [ebp - 0x40], 1
mov eax, dword [ebp - 0x40]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [sym.imp.advapi32.dll_RegEnumKeyExW]
mov dword [ebp - 0x18], 0x101
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call edi
sub esp, 0x20
test eax, eax
jne 0x4059a0
mov dword [esp + 8], ebx
mov eax, dword [ebp - 0x3c]
add esi, 1
mov dword [esp], str._1_2_n
mov dword [esp + 4], eax
call sym._output_string
jmp 0x40593e
mov dword [esp], ebx
mov eax, dword [ebp - 0x38]
call eax
mov eax, dword [ebp - 0x40]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 1
mov eax, dword [ebp - 0x10]
mov ecx, 1
call sym._query_all
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov edx, dword [ebp - 0x34]
sub esp, 4
jmp 0x4058ea
mov dword [ebp - 0x48], 0
jmp 0x40582b