Function at 0x40d5a0
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
lea eax, [ebp - 0x5c]
push ebx
sub esp, 0xac
mov dword [ebp - 0x74], edx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], esi
mov dword [ebp - 0x5c], 0
call sym._GetItemPath
test eax, eax
je 0x40d6b0
mov ebx, eax
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x40d6b0
cmp word [ebx], 0
jne 0x40d6c0
mov dword [ebp - 0x58], eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], ebx
mov dword [ebp - 0x78], eax
call eax
lea eax, [ebp - 0x4c]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x50]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x58]
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 - 0x7c], eax
call eax
sub esp, 0x30
test eax, eax
jne 0x40d6b0
mov eax, dword [ebp - 0x50]
mov ebx, dword [ebp - 0x74]
mov dword [ebp - 0x40], 0x40
mov dword [esp + 8], 0
mov edi, dword [0x417714]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x3c], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x113f
mov dword [esp], esi
call edi
sub esp, 0x10
test eax, eax
jne 0x40d730
lea esi, [esi]
nop
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [ebp - 0x58]
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 0x40d5ed
test byte [0x4102e4], 8
je 0x40d6b0
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.0_2
mov dword [esp + 0xc], str.RegOpenKeyEx_failed___s_was_probably_removed._n
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0x411e78
mov dword [esp + 4], 0x4102e4
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_4
jmp 0x40d6b0
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 0x40d9d0
mov eax, dword [ebp - 0x4c]
mov edx, dword [sym.imp.ucrtbase.dll_malloc]
lea ebx, [eax + 1]
mov dword [ebp - 0x70], edx
lea ecx, [ebx + ebx]
mov dword [ebp - 0x4c], ebx
mov dword [esp], ecx
mov dword [ebp - 0x80], ecx
call edx
mov ecx, dword [ebp - 0x80]
mov edx, dword [ebp - 0x70]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x6c], eax
mov dword [esp], ecx
call edx
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x30], eax
test edx, edx
je 0x40d9f3
mov dword [ebp - 0x70], 0
jmp 0x40d7b2
inc dword [ebp - 0x70]
mov eax, dword [ebp - 0x70]
cmp dword [ebp - 0x50], eax
jbe 0x40d9f0
mov ebx, dword [ebp - 0x4c]
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], ebx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp + 0x1c], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x70]
mov dword [esp + 0x18], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
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 0x40d7a0
lea eax, [ebp - 0x54]
mov dword [ebp - 0x44], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp + 0xc], 1
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
je 0x40d910
mov eax, dword [ebp - 0x74]
mov dword [esp + 8], 4
mov dword [esp + 0xc], eax
jmp 0x40d8a7
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 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 0x40d8f0
mov eax, dword [ebp - 0x6c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
je 0x40d7a0
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 0x40d850
test byte [0x4102e4], 8
jne 0x40d998
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x6c]
mov dword [esp], 0
mov edx, dword [ebp - 0x74]
mov dword [esp + 4], eax
mov eax, esi
call sym._AddEntryToTree
jmp 0x40d7a0
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x6c]
mov edi, dword [ebp - 0x78]
mov dword [esp], eax
call edi
mov edx, dword [ebp - 0x30]
mov dword [esp], edx
call edi
mov eax, dword [ebp - 0x70]
jmp 0x40d6b2
lea eax, [ebp - 0x44]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x54]
mov dword [esp + 0x28], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x7c]
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 0x40d980
mov dword [ebp - 0x44], 0
mov eax, dword [ebp - 0x54]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x40d839
mov eax, dword [ebp - 0x6c]
call sym._wine_dbgstr_wn.constprop.0_2
mov dword [esp + 0xc], str.New_subkey__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0x411e78
mov dword [esp + 4], 0x4102e4
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_4
jmp 0x40d8ca
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov eax, 1
sub esp, 4
jmp 0x40d6b2
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x6c]
mov ebx, dword [ebp - 0x78]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x70]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov eax, dword [ebp - 0x74]
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 0x40da74
mov dword [ebp - 0x6c], edi
mov edi, eax
mov dword [esp + 0xc], edi
mov ebx, edi
mov eax, dword [ebp - 0x6c]
mov dword [esp + 8], 1
mov dword [esp + 4], 0x110a
mov dword [esp], esi
call eax
mov edx, ebx
sub esp, 0x10
mov edi, eax
mov eax, esi
call sym._RefreshTreeItem
test eax, eax
je 0x40da80
test edi, edi
jne 0x40da40
mov eax, 1
jmp 0x40d6b2
mov dword [esp + 0xc], ebx
mov eax, dword [ebp - 0x6c]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x1101
mov dword [esp], esi
call eax
sub esp, 0x10
jmp 0x40da70