Function at 0x40a010
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x98
mov edi, edx
mov esi, ecx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0x60], 0x400
mov ebx, edx
test edx, edx
jne 0x40a058
push 0
push 9
push 0x110a
push esi
call dword [sym.imp.user32.dll_SendMessageW]
mov ebx, eax
test eax, eax
je 0x40a176
push 0x800
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov dword [ebp - 0x10], eax
test eax, eax
je 0x40a176
mov dword [ebp - 0x18], edi
mov word [eax], 0
lea edi, [ebp - 0x60]
lea eax, [ebp - 0xa4]
mov ecx, esi
lea esi, [ebp - 0x10]
mov dword [ebp - 0x1c], ecx
mov edx, ebx
push edi
push eax
push esi
lea eax, [ebp - 0x30]
push eax
call dbg.get_item_path
add esp, 0x10
mov ebx, dword [ebp - 0x10]
test eax, eax
je 0x40a109
xor eax, eax
test ebx, ebx
je 0x40a178
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x40a178
cmp word [ebx], 0
je 0x40a115
push esi
push 0x20019
push 0
push ebx
push ecx
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
test eax, eax
mov edi, dword [ebp - 0x18]
je 0x40a11b
test byte [0x411178], 8
je 0x40a176
mov ecx, ebx
call dbg.wine_dbgstr_w
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.RegOpenKeyEx_failed___s_was_probably_removed._n
mov dword [esp + 8], str.RefreshTreeItem
call dbg.wine_dbg_log
add esp, 0x14
jmp 0x40a176
push ebx
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
jmp 0x40a176
mov dword [ebp - 0x10], ecx
mov edi, dword [ebp - 0x18]
push ebx
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
mov eax, dword [ebp - 0x10]
sub esp, 0x30
xorps xmm0, xmm0
movups xmmword [esp + 0x18], xmm0
lea ecx, [ebp - 0x24]
mov dword [esp + 0x14], ecx
lea ecx, [ebp - 0x28]
mov dword [esp + 0x10], ecx
mov dword [esp], eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
test eax, eax
je 0x40a183
xor eax, eax
add esp, 0x98
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x60], 0x40
mov dword [ebp - 0x5c], edi
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x60]
push eax
push 0
push 0x113f
mov esi, dword [ebp - 0x1c]
push esi
call dword [sym.imp.user32.dll_SendMessageW]
test eax, eax
mov eax, 0
je 0x40a178
push 0x20
push edi
push 0x1127
push esi
call dword [sym.imp.user32.dll_SendMessageW]
test eax, eax
je 0x40a3eb
mov eax, dword [ebp - 0x24]
lea esi, [eax + 1]
mov dword [ebp - 0x24], esi
lea ebx, [eax*2 + 2]
mov edi, dword [sym.imp.ucrtbase.dll_malloc]
push ebx
call edi
add esp, 4
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x4c], esi
push ebx
call edi
add esp, 4
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x28], 0
je 0x40a416
xor ecx, ecx
mov esi, dword [ebp - 0x1c]
jmp 0x40a211
mov ecx, dword [ebp - 0x34]
inc ecx
cmp ecx, dword [ebp - 0x28]
jae 0x40a41a
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x10]
sub esp, 0x20
xorps xmm0, xmm0
movups xmmword [esp + 0x10], xmm0
lea edx, [ebp - 0x38]
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x14]
mov dword [esp + 8], edx
mov dword [ebp - 0x34], ecx
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
test eax, eax
jne 0x40a204
mov dword [ebp - 0x20], 0
lea eax, [ebp - 0x2c]
push eax
push 1
push 0
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40a2c8
mov eax, dword [ebp - 0x2c]
sub esp, 0x30
xorps xmm0, xmm0
movups xmmword [esp + 0x14], xmm0
lea ecx, [ebp - 0x20]
mov dword [esp + 0x10], ecx
mov dword [esp], eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
test eax, eax
je 0x40a2bf
mov dword [ebp - 0x20], 0
push dword [ebp - 0x2c]
call dword [sym.imp.advapi32.dll_RegCloseKey]
push dword [ebp - 0x18]
push 4
push 0x110a
push esi
mov edi, dword [sym.imp.user32.dll_SendMessageW]
call edi
test eax, eax
je 0x40a33b
mov ebx, eax
nop word cs:[eax + eax]
mov dword [ebp - 0x60], 1
mov dword [ebp - 0x5c], ebx
lea eax, [ebp - 0x60]
push eax
push 0
push 0x113e
push esi
call edi
test eax, eax
je 0x40a3fe
push dword [ebp - 0x14]
push dword [ebp - 0x50]
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x40a204
push ebx
push 1
push 0x110a
push esi
mov edi, dword [sym.imp.user32.dll_SendMessageW]
call edi
mov ebx, eax
test eax, eax
jne 0x40a2f0
test byte [0x411178], 8
mov ebx, dword [ebp - 0x14]
je 0x40a36d
mov ecx, ebx
call dbg.wine_dbgstr_w
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.New_subkey__s_n
mov dword [esp + 8], str.RefreshTreeItem
call dbg.wine_dbg_log
add esp, 0x14
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x9c], 0x67
mov dword [ebp - 0x8c], ebx
mov ecx, 0xfffffffe
mov edx, dword [sym.imp.user32.dll_SendMessageW]
nop dword [eax + eax]
cmp word [ebx + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x40a390
sar ecx, 1
mov dword [ebp - 0x88], ecx
mov ecx, dword [0x4121a4]
mov dword [ebp - 0x84], ecx
mov ecx, dword [0x4121a0]
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], 0
mov dword [ebp - 0xa0], 0xffff0003
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0xa4], eax
lea eax, [ebp - 0xa4]
push eax
push 0
push 0x1132
push esi
call edx
jmp 0x40a204
push dword [ebp - 0x10]
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov eax, 1
jmp 0x40a178
mov esi, dword [sym.imp.ucrtbase.dll_free]
push dword [ebp - 0x14]
call esi
add esp, 4
push dword [ebp - 0x50]
call esi
jmp 0x40a110
mov ebx, eax
jmp 0x40a41d
mov ebx, dword [ebp - 0x50]
mov esi, dword [sym.imp.ucrtbase.dll_free]
push dword [ebp - 0x14]
call esi
add esp, 4
push ebx
call esi
add esp, 4
push dword [ebp - 0x10]
call dword [sym.imp.advapi32.dll_RegCloseKey]
push dword [ebp - 0x18]
push 4
push 0x110a
mov esi, dword [ebp - 0x1c]
push esi
call dword [sym.imp.user32.dll_SendMessageW]
mov edi, eax
mov eax, 1
test edi, edi
jne 0x40a464
jmp 0x40a178
mov edi, ebx
test ebx, ebx
je 0x40a3f4
push edi
push 1
push 0x110a
push esi
call dword [sym.imp.user32.dll_SendMessageW]
mov ebx, eax
mov ecx, esi
mov edx, edi
call dbg.RefreshTreeItem
test eax, eax
jne 0x40a45e
push edi
push 0
push 0x1101
push esi
call dword [sym.imp.user32.dll_SendMessageW]
jmp 0x40a45e