Function at 0x40cfb0
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
lea eax, [ebp - 0x17c]
push ebx
sub esp, 0x1c0
mov dword [ebp - 0x188], edx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], esi
mov dword [ebp - 0x17c], 0
call dbg.GetItemPath
test eax, eax
je 0x40d0f0
mov ebx, eax
mov eax, dword [ebp - 0x17c]
test eax, eax
je 0x40d0f0
cmp word [ebx], 0
jne 0x40d100
mov dword [ebp - 0x178], eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], ebx
mov dword [ebp - 0x18c], eax
call eax
lea eax, [ebp - 0x16c]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x170]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x178]
mov dword [esp + 0x28], 0
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [ebp - 0x190], eax
call eax
sub esp, 0x30
test eax, eax
jne 0x40d0f0
mov eax, dword [ebp - 0x170]
mov ebx, dword [ebp - 0x188]
mov dword [esp], esi
mov dword [esp + 8], 0
mov edi, dword [0x4156fc]
mov dword [ebp - 0x140], eax
lea eax, [ebp - 0x160]
mov dword [ebp - 0x160], 0x40
mov dword [ebp - 0x15c], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x113f
call edi
sub esp, 0x10
test eax, eax
jne 0x40d1e0
lea esi, [esi]
nop
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [ebp - 0x178]
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
test eax, eax
je 0x40d00c
test byte [global___dbch.0], 8
je 0x40d0f0
mov eax, ebx
shr eax, 0x10
je 0x40d8f6
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x40d71f
cmp word [ebx], 0
je 0x40d17a
nop
add ecx, 1
cmp word [ebx + ecx*2], 0
jne 0x40d170
mov eax, 0x224c
lea edx, [ebp - 0x136]
lea edi, [ebp - 0x16]
mov word [ebp - 0x138], ax
nop
lea esi, [ecx - 1]
cmp edx, edi
ja 0x40d6f4
test ecx, ecx
jle 0x40d6f4
add ebx, 2
movzx eax, word [ebx - 2]
cmp ax, 0xd
je 0x40d7c6
ja 0x40d5a0
cmp ax, 9
je 0x40d840
cmp ax, 0xa
jne 0x40d7e0
mov eax, 0x6e5c
add edx, 2
mov ecx, esi
mov word [edx - 2], ax
jmp 0x40d190
mov dword [esp + 0xc], 0x20
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1127
mov dword [esp], esi
call edi
sub esp, 0x10
test eax, eax
je 0x40d600
mov eax, dword [ebp - 0x16c]
mov edx, dword [sym.imp.ucrtbase.dll_malloc]
lea ebx, [eax + 1]
mov dword [ebp - 0x184], edx
lea ecx, [ebx + ebx]
mov dword [ebp - 0x16c], ebx
mov dword [esp], ecx
mov dword [ebp - 0x194], ecx
call edx
mov ecx, dword [ebp - 0x194]
mov edx, dword [ebp - 0x184]
mov dword [ebp - 0x14c], ebx
mov dword [ebp - 0x180], eax
mov dword [esp], ecx
call edx
mov edx, dword [ebp - 0x170]
mov dword [ebp - 0x150], eax
test edx, edx
je 0x40d626
mov dword [ebp - 0x184], 0
mov eax, dword [ebp - 0x180]
shr eax, 0x10
mov dword [ebp - 0x194], eax
mov eax, ebx
jmp 0x40d29f
add dword [ebp - 0x184], 1
mov eax, dword [ebp - 0x184]
cmp dword [ebp - 0x170], eax
jbe 0x40d620
mov eax, dword [ebp - 0x16c]
mov dword [ebp - 0x168], eax
lea eax, [ebp - 0x168]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x180]
mov dword [esp + 0x1c], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x184]
mov dword [esp + 0x18], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x178]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
sub esp, 0x20
test eax, eax
jne 0x40d280
lea eax, [ebp - 0x174]
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x180]
mov dword [ebp - 0x164], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x178]
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
je 0x40d440
mov eax, dword [ebp - 0x188]
mov dword [esp + 8], 4
mov dword [esp + 0xc], eax
jmp 0x40d3bf
mov dword [ebp - 0x15c], eax
lea eax, [ebp - 0x160]
mov dword [ebp - 0x160], 1
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x113e
mov dword [esp], esi
call edi
sub esp, 0x10
test eax, eax
je 0x40d410
mov eax, dword [ebp - 0x180]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x150]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
je 0x40d280
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 0x110a
mov dword [esp], esi
call edi
sub esp, 0x10
mov ebx, eax
test eax, eax
jne 0x40d355
test byte [global___dbch.0], 8
jne 0x40d4d3
mov eax, dword [ebp - 0x164]
mov dword [esp], 0
mov ecx, dword [ebp - 0x180]
mov edx, dword [ebp - 0x188]
mov dword [esp + 4], eax
mov eax, esi
call dbg.AddEntryToTree
jmp 0x40d280
mov dword [ebp - 0x184], eax
mov eax, dword [ebp - 0x180]
mov edi, dword [ebp - 0x18c]
mov dword [esp], eax
call edi
mov edx, dword [ebp - 0x150]
mov dword [esp], edx
call edi
mov eax, dword [ebp - 0x184]
jmp 0x40d0f2
lea eax, [ebp - 0x164]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x174]
mov dword [esp + 0x28], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x190]
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call eax
sub esp, 0x30
test eax, eax
je 0x40d4bc
mov dword [ebp - 0x164], 0
mov eax, dword [ebp - 0x174]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x40d341
mov ecx, dword [ebp - 0x180]
test ecx, ecx
je 0x40d942
mov edx, dword [ebp - 0x194]
test edx, edx
je 0x40d91a
mov ebx, dword [ebp - 0x180]
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x40d786
cmp word [ebx], 0
je 0x40d52a
mov eax, ebx
add ecx, 1
cmp word [eax + ecx*2], 0
jne 0x40d520
mov eax, 0x224c
mov dword [ebp - 0x198], esi
mov ebx, dword [ebp - 0x180]
lea edx, [ebp - 0x136]
mov word [ebp - 0x138], ax
lea eax, [ebp - 0x16]
mov dword [ebp - 0x19c], edi
mov edi, eax
lea esi, [ecx - 1]
cmp edx, edi
ja 0x40d74c
test ecx, ecx
jle 0x40d74c
add ebx, 2
movzx eax, word [ebx - 2]
cmp ax, 0xd
je 0x40d853
ja 0x40d5d0
cmp ax, 9
je 0x40d8d0
cmp ax, 0xa
jne 0x40d870
mov eax, 0x6e5c
add edx, 2
mov ecx, esi
mov word [edx - 2], ax
jmp 0x40d553
cmp ax, 0x22
je 0x40d7b3
cmp ax, 0x5c
jne 0x40d7e0
mov eax, 0x5c5c
add edx, 2
mov ecx, esi
mov word [edx - 2], ax
jmp 0x40d190
cmp ax, 0x22
je 0x40d8e3
cmp ax, 0x5c
jne 0x40d870
mov eax, 0x5c5c
add edx, 2
mov ecx, esi
mov word [edx - 2], ax
jmp 0x40d553
mov eax, dword [ebp - 0x178]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov eax, 1
sub esp, 4
jmp 0x40d0f2
mov eax, dword [ebp - 0x150]
mov dword [ebp - 0x184], eax
mov eax, dword [ebp - 0x180]
mov ebx, dword [ebp - 0x18c]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x184]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x178]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov eax, dword [ebp - 0x188]
sub esp, 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], 4
mov dword [esp + 4], 0x110a
mov dword [esp], esi
call edi
sub esp, 0x10
test eax, eax
je 0x40d6bf
mov dword [ebp - 0x180], edi
mov edi, eax
mov dword [esp + 0xc], edi
mov eax, dword [ebp - 0x180]
mov dword [esp + 8], 1
mov dword [esp + 4], 0x110a
mov dword [esp], esi
call eax
mov edx, edi
sub esp, 0x10
mov ebx, eax
mov eax, esi
call dbg.RefreshTreeItem
test eax, eax
je 0x40d6d0
mov edi, ebx
test ebx, ebx
jne 0x40d688
mov eax, 1
jmp 0x40d0f2
mov dword [esp + 0xc], edi
mov eax, dword [ebp - 0x180]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x1101
mov dword [esp], esi
call eax
sub esp, 0x10
jmp 0x40d6b9
mov byte [edx], 0x22
lea eax, [edx + 1]
test esi, esi
jle 0x40d70e
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x138]
mov dword [esp], eax
call dbg.__wine_dbg_strdup
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.RegOpenKeyEx_failed___s_was_probably_removed._n
mov dword [esp + 8], global___func__.2
mov dword [esp + 4], global___dbch.0
mov dword [esp], 3
call sym._wine_dbg_log.constprop.4_1
jmp 0x40d0f0
mov eax, esi
mov edi, dword [ebp - 0x19c]
mov esi, dword [ebp - 0x198]
mov byte [edx], 0x22
test eax, eax
jle 0x40d94c
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x138]
mov dword [esp], eax
call dbg.__wine_dbg_strdup
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.New_subkey__s_n
mov dword [esp + 8], global___func__.2
mov dword [esp + 4], global___dbch.0
mov dword [esp], 3
call sym._wine_dbg_log.constprop.4_1
jmp 0x40d3e2
mov eax, 0x225c
add edx, 2
mov ecx, esi
mov word [edx - 2], ax
jmp 0x40d190
mov eax, 0x725c
add edx, 2
mov ecx, esi
mov word [edx - 2], ax
jmp 0x40d190
lea ecx, [eax - 0x20]
cmp cx, 0x5e
jbe 0x40d90e
mov ecx, eax
mov byte [edx], 0x5c
add edx, 5
shr cx, 0xc
movzx ecx, cx
movzx ecx, byte [ecx + str.0123456789abcdefRefreshTreeItem]
mov byte [edx - 4], cl
mov ecx, eax
shr cx, 8
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdefRefreshTreeItem]
mov byte [edx - 3], cl
mov ecx, eax
and eax, 0xf
shr cx, 4
movzx eax, byte [eax + str.0123456789abcdefRefreshTreeItem]
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdefRefreshTreeItem]
mov byte [edx - 1], al
mov byte [edx - 2], cl
mov ecx, esi
jmp 0x40d190
mov eax, 0x745c
add edx, 2
mov ecx, esi
mov word [edx - 2], ax
jmp 0x40d190
mov eax, 0x725c
add edx, 2
mov ecx, esi
mov word [edx - 2], ax
jmp 0x40d553
lea ecx, [eax - 0x20]
cmp cx, 0x5e
jbe 0x40d936
mov ecx, eax
mov byte [edx], 0x5c
add edx, 5
shr cx, 0xc
movzx ecx, cx
movzx ecx, byte [ecx + str.0123456789abcdefRefreshTreeItem]
mov byte [edx - 4], cl
mov ecx, eax
shr cx, 8
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdefRefreshTreeItem]
mov byte [edx - 3], cl
mov ecx, eax
and eax, 0xf
shr cx, 4
movzx eax, byte [eax + str.0123456789abcdefRefreshTreeItem]
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdefRefreshTreeItem]
mov byte [edx - 1], al
mov byte [edx - 2], cl
mov ecx, esi
jmp 0x40d553
mov eax, 0x745c
add edx, 2
mov ecx, esi
mov word [edx - 2], ax
jmp 0x40d553
mov eax, 0x225c
add edx, 2
mov ecx, esi
mov word [edx - 2], ax
jmp 0x40d553
movzx ebx, bx
mov dword [esp], str._04x
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf.constprop.6
jmp 0x40d71f
mov byte [edx], al
mov ecx, esi
add edx, 1
jmp 0x40d190
movzx eax, word [ebp - 0x180]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.6
jmp 0x40d786
mov byte [edx], al
mov ecx, esi
add edx, 1
jmp 0x40d553
mov eax, str._null_
jmp 0x40d786
lea eax, [edx + 1]
jmp 0x40d775