Function at 0x40cb60
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
mov esi, eax
lea eax, [ebp - 0x834]
push ebx
lea ebx, [ebp - 0x80c]
sub esp, 0x898
mov dword [ebp - 0x854], ecx
mov dword [ebp - 0x834], 1
mov dword [ebp - 0x830], edx
mov dword [ebp - 0x824], ebx
mov dword [ebp - 0x820], 0x400
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x113e
mov dword [esp], esi
call dword [0x4156fc]
sub esp, 0x10
test eax, eax
je 0x40cbd2
test byte [ebp + 8], 2
jne 0x40cbe0
test byte [ebp + 8], 0xc
jne 0x40cc04
xor esi, esi
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x854]
mov eax, ebx
call sym._match_string
test eax, eax
je 0x40cbcc
mov eax, dword [ebp + 0xc]
mov esi, 1
mov dword [eax], 0xffffffff
jmp 0x40cbd4
lea eax, [ebp - 0x84c]
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov dword [esp], esi
call dbg.GetItemPath
mov ebx, eax
test eax, eax
je 0x40cbd2
mov eax, dword [ebp - 0x84c]
test eax, eax
je 0x40cbd2
lea edx, [ebp - 0x850]
mov dword [esp + 0xc], 0x20019
mov dword [esp + 0x10], edx
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
mov dword [esp], ebx
test eax, eax
jne 0x40cf41
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x864], eax
call eax
lea eax, [ebp - 0x840]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x844]
mov dword [esp + 0x20], eax
mov eax, dword [ebp - 0x850]
mov dword [esp + 0x28], 0
mov dword [esp + 0x1c], 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 esi, eax
test eax, eax
jne 0x40cbd2
mov eax, dword [ebp - 0x844]
add eax, 1
mov dword [ebp - 0x844], eax
mov dword [ebp - 0x848], eax
add eax, eax
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x870], eax
call eax
mov dword [esp + 0x1c], 0
mov edi, eax
lea eax, [ebp - 0x848]
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x850]
mov dword [esp + 0x14], 0
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_RegEnumValueW]
mov dword [esp + 0x10], 0
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [ebp - 0x86c], eax
call eax
mov dword [ebp - 0x868], 0
sub esp, 0x20
test eax, eax
jne 0x40cd79
xor eax, eax
cmp word [edi], 0
setne al
mov dword [ebp - 0x868], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x874], esi
mov dword [ebp - 0x860], 0
mov esi, dword [ebp - 0x86c]
mov eax, dword [eax]
mov ebx, eax
mov eax, 0
sub ebx, dword [ebp - 0x868]
cmovs ebx, eax
mov eax, dword [ebp + 8]
and eax, 4
mov dword [ebp - 0x858], eax
mov eax, dword [ebp + 8]
and eax, 8
mov dword [ebp - 0x85c], eax
jmp 0x40cddf
mov edx, dword [ebp - 0x85c]
test edx, edx
je 0x40cddc
mov eax, dword [ebp - 0x838]
sub eax, 1
cmp eax, 1
jbe 0x40ceb0
add ebx, 1
mov eax, dword [ebp - 0x844]
mov dword [esp + 0x1c], 0
mov dword [ebp - 0x83c], 0
mov dword [ebp - 0x848], eax
lea eax, [ebp - 0x838]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x848]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x850]
mov dword [ebp - 0x838], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], eax
call esi
sub esp, 0x20
test eax, eax
jne 0x40cf72
mov ecx, dword [ebp - 0x858]
test ecx, ecx
je 0x40cdc0
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x854]
mov eax, edi
call sym._match_string
test eax, eax
je 0x40cdc0
mov dword [esp], edi
mov edi, dword [ebp - 0x864]
mov esi, 1
call edi
mov eax, dword [ebp - 0x860]
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x850]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov eax, dword [ebp + 0xc]
add ebx, dword [ebp - 0x868]
sub esp, 4
mov dword [eax], ebx
jmp 0x40cbd4
mov eax, dword [ebp - 0x860]
mov edx, dword [ebp - 0x840]
test eax, eax
je 0x40cf50
mov eax, dword [ebp - 0x844]
lea ecx, [ebp - 0x838]
mov dword [esp + 8], edi
mov dword [esp + 0x14], ecx
lea ecx, [ebp - 0x848]
mov dword [ebp - 0x848], eax
lea eax, [ebp - 0x83c]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x860]
mov dword [ebp - 0x83c], edx
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x850]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 4], ebx
mov dword [esp], eax
call esi
sub esp, 0x20
test eax, eax
jne 0x40cf72
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x854]
mov eax, dword [ebp - 0x860]
call sym._match_string
test eax, eax
je 0x40cddc
jmp 0x40ce6f
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x40cbd2
mov dword [esp], edx
mov eax, dword [ebp - 0x870]
mov dword [ebp - 0x86c], edx
call eax
mov edx, dword [ebp - 0x86c]
mov dword [ebp - 0x860], eax
jmp 0x40cec4
mov dword [esp], edi
mov esi, dword [ebp - 0x874]
mov edi, dword [ebp - 0x864]
call edi
mov eax, dword [ebp - 0x860]
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x850]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x40cbd4