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

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
push ebx
mov ebx, eax
sub esp, 0x8c
mov dword [ebp - 0x44], 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 0x405a70
mov eax, dword [ebp + 8]
or eax, dword [ebp - 0x30]
je 0x40580e
mov dword [esp + 4], edi
mov dword [esp], global_fmt
call dbg.output_string
mov ebx, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp], 0x200
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 ebx, eax
mov eax, dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x3c], 0x800
mov dword [ebp - 0x4c], eax
lea esi, [esi]
nop
mov eax, dword [ebp - 0x3c]
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 - 0x40]
mov dword [esp + 0x10], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 8], edi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumValueW]
sub esp, 0x20
test eax, eax
je 0x4058c0
cmp eax, 0xea
jne 0x405900
mov edx, dword [ebp - 0x28]
cmp edx, dword [ebp - 0x3c]
jbe 0x4058e0
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 0x405850
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x20]
mov ecx, ebx
mov dword [esp], eax
mov eax, edi
call dbg.output_value
add dword [ebp - 0x40], 1
jmp 0x405850
lea eax, [esi + esi]
shl esi, 2
mov dword [esp], edi
mov dword [esp + 4], esi
mov dword [ebp - 0x48], eax
call dword [sym.imp.ucrtbase.dll_realloc]
mov esi, dword [ebp - 0x48]
mov edi, eax
jmp 0x405850
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], ebx
call esi
mov dword [esp], edi
call esi
mov eax, dword [ebp - 0x40]
or eax, dword [ebp + 8]
jne 0x405a30
mov edx, dword [ebp - 0x34]
test edx, edx
jne 0x405930
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 0x405acb
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x405950
sub eax, dword [ebp - 0x50]
sar eax, 1
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x40], esi
mov esi, dword [ebp - 0x44]
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 0x405a88
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x405a50
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], edi
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 dbg.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 [0x40c080]
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 0x405aa0
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
add ebx, 1
jmp 0x405969
mov dword [esp], 0x409462
call dbg.output_string
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x405923
jmp 0x405930
mov eax, dword [ebp - 0x50]
mov dword [esp + 8], edi
mov dword [esp], str._1_2_n
mov dword [esp + 4], eax
call dbg.output_string
jmp 0x405a1e
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 dbg.query_all
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x405a13
mov dword [ebp - 0x48], 0
jmp 0x405961