Function at 0x40a0d0
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 ebx, ecx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0x60], 0x400
mov esi, edx
test edx, edx
jne 0x40a118
push 0
push 9
push 0x110a
push ebx
call dword [sym.imp.user32.dll_SendMessageW]
mov esi, eax
test eax, eax
je 0x40a1c4
push 0x800
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov dword [ebp - 0x10], eax
test eax, eax
je 0x40a1c4
mov dword [ebp - 0x1c], edi
mov word [eax], 0
lea edi, [ebp - 0x60]
lea eax, [ebp - 0xa4]
mov ecx, ebx
mov edx, esi
push edi
lea edi, [ebp - 0x10]
push eax
push edi
lea eax, [ebp - 0x30]
push eax
call sym._get_item_path
add esp, 0x10
mov esi, dword [ebp - 0x10]
test eax, eax
je 0x40a1ba
mov dword [ebp - 0x18], ebx
xor ebx, ebx
test esi, esi
je 0x40a1c6
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40a1c6
cmp word [esi], 0
je 0x40a1d3
push edi
push 0x20019
push 0
push esi
push eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
test eax, eax
je 0x40a1d6
test byte [0x410178], 8
je 0x40a1c6
mov ecx, esi
call sym._wine_dbgstr_w_1
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 sym._wine_dbg_log_4
add esp, 0x14
jmp 0x40a1c6
push esi
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
xor ebx, ebx
mov eax, ebx
add esp, 0x98
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x10], eax
push esi
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
lea eax, [ebp - 0x24]
lea ecx, [ebp - 0x28]
push 0
push 0
push 0
push 0
push 0
push 0
push eax
push ecx
push 0
push 0
push 0
push dword [ebp - 0x10]
call dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x40a1c6
mov dword [ebp - 0x60], 0x40
mov edi, dword [ebp - 0x1c]
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 - 0x18]
push esi
call dword [sym.imp.user32.dll_SendMessageW]
test eax, eax
je 0x40a1c6
push 0x20
push edi
push 0x1127
push esi
call dword [sym.imp.user32.dll_SendMessageW]
test eax, eax
je 0x40a42d
mov eax, dword [ebp - 0x24]
lea esi, [eax + 1]
mov dword [ebp - 0x24], esi
lea edi, [eax*2 + 2]
mov ebx, dword [sym.imp.ucrtbase.dll_malloc]
push edi
call ebx
add esp, 4
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x4c], esi
push edi
call ebx
add esp, 4
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x28], 0
je 0x40a458
xor ecx, ecx
mov esi, dword [sym.imp.user32.dll_SendMessageW]
jmp 0x40a296
mov ecx, dword [ebp - 0x34]
inc ecx
cmp ecx, dword [ebp - 0x28]
jae 0x40a45c
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x38], eax
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x14]
mov dword [ebp - 0x34], ecx
push ecx
push dword [ebp - 0x10]
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
test eax, eax
jne 0x40a289
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
mov edi, dword [ebp - 0x18]
jne 0x40a313
push 0
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push 0
push dword [ebp - 0x2c]
call dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
test eax, eax
je 0x40a30a
mov dword [ebp - 0x20], 0
push dword [ebp - 0x2c]
call dword [sym.imp.advapi32.dll_RegCloseKey]
push dword [ebp - 0x1c]
push 4
push 0x110a
push edi
call esi
test eax, eax
je 0x40a378
mov ebx, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [ebp - 0x60], 1
mov dword [ebp - 0x5c], ebx
lea eax, [ebp - 0x60]
push eax
push 0
push 0x113e
push edi
call esi
test eax, eax
je 0x40a440
push dword [ebp - 0x14]
push dword [ebp - 0x50]
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x40a289
push ebx
push 1
push 0x110a
mov edi, dword [ebp - 0x18]
push edi
call esi
mov ebx, eax
test eax, eax
jne 0x40a330
test byte [0x410178], 8
mov ebx, dword [ebp - 0x14]
je 0x40a3aa
mov ecx, ebx
call sym._wine_dbgstr_w_1
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.New_subkey__s_n
mov dword [esp + 8], str.RefreshTreeItem
call sym._wine_dbg_log_4
add esp, 0x14
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x9c], 0x67
mov dword [ebp - 0x8c], ebx
mov ecx, 0xfffffffe
mov edx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ebx + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x40a3d0
sar ecx, 1
mov dword [ebp - 0x88], ecx
mov ecx, dword [0x4111a4]
mov dword [ebp - 0x84], ecx
mov ecx, dword [0x4111a0]
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], 0
mov dword [ebp - 0xa0], 0xffff0003
mov dword [ebp - 0xa4], edi
lea eax, [ebp - 0xa4]
push eax
push 0
push 0x1132
push edx
mov eax, dword [sym.imp.user32.dll_SendMessageW]
call eax
jmp 0x40a289
push dword [ebp - 0x10]
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov ebx, 1
jmp 0x40a1c6
mov esi, dword [sym.imp.ucrtbase.dll_free]
push dword [ebp - 0x14]
call esi
add esp, 4
push dword [ebp - 0x50]
call esi
jmp 0x40a1c1
mov esi, eax
jmp 0x40a45f
mov esi, dword [ebp - 0x50]
mov eax, dword [ebp - 0x14]
mov edi, dword [sym.imp.ucrtbase.dll_free]
push eax
call edi
add esp, 4
push esi
call edi
add esp, 4
push dword [ebp - 0x10]
call dword [sym.imp.advapi32.dll_RegCloseKey]
push dword [ebp - 0x1c]
push 4
push 0x110a
push dword [ebp - 0x18]
call dword [sym.imp.user32.dll_SendMessageW]
mov ebx, 1
test eax, eax
je 0x40a1c6
mov esi, eax
mov edi, dword [ebp - 0x18]
jmp 0x40a4b1
mov eax, dword [ebp - 0x1c]
mov esi, eax
test eax, eax
je 0x40a1c6
push esi
push 1
push 0x110a
push edi
call dword [sym.imp.user32.dll_SendMessageW]
mov dword [ebp - 0x1c], eax
mov ecx, edi
mov edx, esi
call sym._RefreshTreeItem
test eax, eax
jne 0x40a4a4
push esi
push 0
push 0x1101
push dword [ebp - 0x18]
call dword [sym.imp.user32.dll_SendMessageW]
jmp 0x40a4a4