Function at 0x40d9b0
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap flags
Get process heap force flags
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
push ebx
xor ebx, ebx
lea eax, [ebp - 0x188]
sub esp, 0x1cc
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], edi
mov dword [ebp - 0x190], edx
mov dword [ebp - 0x188], ebx
call sym._GetItemPath
test eax, eax
je 0x40daf0
mov ebx, eax
mov eax, dword [ebp - 0x188]
test eax, eax
je 0x40daf0
cmp word [ebx], 0
jne 0x40db00
mov dword [ebp - 0x184], eax
mov dword [esp + 8], ebx
xor edx, edx
xor ebx, ebx
mov dword [esp + 4], edx
xor esi, esi
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x194], eax
call eax
xor eax, eax
xor ecx, ecx
xor edx, edx
sub esp, 0xc
mov dword [esp + 0x20], eax
xor eax, eax
mov dword [esp + 0x1c], eax
xor eax, eax
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x178]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x17c]
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x184]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], esi
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._RegQueryInfoKeyW_48
sub esp, 0x30
test eax, eax
jne 0x40daf0
mov dword [esp], edi
mov eax, 0x40
mov ebx, dword [ebp - 0x190]
mov dword [ebp - 0x16c], eax
mov eax, dword [ebp - 0x17c]
mov dword [ebp - 0x168], ebx
mov dword [ebp - 0x14c], eax
lea eax, [ebp - 0x16c]
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, 0x113f
mov dword [esp + 4], eax
call sym._SendMessageW_16
sub esp, 0x10
test eax, eax
jne 0x40dc10
jmp 0x40daf0
xor esi, esi
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], ebx
lea edx, [ebp - 0x184]
xor ecx, ecx
mov dword [esp + 0x10], edx
mov edx, 0x20019
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov dword [esp], eax
call sym._RegOpenKeyExW_20
sub esp, 0x14
test eax, eax
je 0x40da0a
test byte [0x4112e4], 8
je 0x40daf0
mov eax, ebx
shr eax, 0x10
je 0x40e236
mov dword [esp], ebx
mov edi, 0xffffffff
mov dword [esp + 4], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40e2cf
cmp word [ebx], 0
je 0x40e2d9
nop
lea esi, [esi]
mov edx, eax
cmp word [ebx + edx*2 + 2], 0
lea eax, [eax + 1]
jne 0x40db70
mov dword [ebp - 0x18c], ebx
lea esi, [ebp - 0x22]
mov ecx, 0x224c
mov word [ebp - 0x144], cx
lea ecx, [ebp - 0x142]
jmp 0x40dbd5
cmp eax, 9
je 0x40e0e0
cmp eax, 0xa
jne 0x40e0fa
mov word [ecx], 0x6e5c
add ecx, 2
lea esi, [esi]
lea eax, [edx - 1]
cmp ecx, esi
ja 0x40e1dd
test edx, edx
jle 0x40e1dd
mov edx, eax
add dword [ebp - 0x18c], 2
mov eax, dword [ebp - 0x18c]
movzx eax, word [eax - 2]
cmp eax, 0xd
je 0x40e0d0
jbe 0x40dba0
cmp eax, 0x22
je 0x40e148
cmp eax, 0x5c
lea esi, [esi]
jne 0x40e0ed
mov word [ecx], 0x5c5c
add ecx, 2
jmp 0x40dbc0
mov dword [esp + 8], ebx
mov eax, 0x1127
mov esi, 0x20
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
mov dword [esp], edi
call sym._SendMessageW_16
sub esp, 0x10
test eax, eax
je 0x40dfc0
mov eax, dword [ebp - 0x178]
inc eax
mov dword [ebp - 0x178], eax
add eax, eax
mov dword [esp], eax
call sym._heap_xalloc
mov dword [ebp - 0x198], eax
mov eax, dword [ebp - 0x178]
mov dword [ebp - 0x158], eax
add eax, eax
mov dword [esp], eax
call sym._heap_xalloc
mov ebx, dword [ebp - 0x17c]
test ebx, ebx
mov dword [ebp - 0x15c], eax
je 0x40dfe0
mov ebx, dword [ebp - 0x198]
mov eax, ebx
shr eax, 0x10
mov dword [ebp - 0x1a0], eax
xor eax, eax
mov dword [ebp - 0x18c], eax
jmp 0x40dcb8
inc dword [ebp - 0x18c]
mov eax, dword [ebp - 0x18c]
cmp dword [ebp - 0x17c], eax
jbe 0x40dfe0
mov eax, dword [ebp - 0x178]
xor ecx, ecx
xor esi, esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], esi
mov dword [esp + 8], ebx
mov dword [ebp - 0x174], eax
xor eax, eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x174]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x18c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x184]
mov dword [esp], eax
call sym._RegEnumKeyExW_32
sub esp, 0x20
test eax, eax
jne 0x40dca0
mov dword [esp + 4], ebx
xor eax, eax
xor edx, edx
mov dword [ebp - 0x170], eax
lea eax, [ebp - 0x180]
mov dword [esp + 0x10], eax
mov eax, 1
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x184]
mov dword [esp + 8], edx
mov dword [esp], eax
call sym._RegOpenKeyExW_20
sub esp, 0x14
test eax, eax
je 0x40de60
mov eax, dword [ebp - 0x190]
mov esi, 4
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
jmp 0x40ddc4
mov dword [esp], edi
mov eax, 1
mov edx, 0x113e
mov dword [ebp - 0x16c], eax
lea eax, [ebp - 0x16c]
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [ebp - 0x168], esi
call sym._SendMessageW_16
sub esp, 0x10
test eax, eax
je 0x40de10
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x15c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
je 0x40dca0
mov dword [esp + 0xc], esi
mov eax, 1
mov dword [esp + 8], eax
mov dword [esp], edi
mov ecx, 0x110a
mov dword [esp + 4], ecx
call sym._SendMessageW_16
sub esp, 0x10
test eax, eax
mov esi, eax
jne 0x40dd60
test byte [0x4112e4], 8
jne 0x40dee0
mov dword [esp], 0
mov eax, dword [ebp - 0x170]
mov ecx, ebx
mov edx, dword [ebp - 0x190]
mov dword [esp + 4], eax
mov eax, edi
call sym._AddEntryToTree
jmp 0x40dca0
mov esi, eax
mov eax, dword [ebp - 0x198]
mov ebx, dword fs:[0x18]
mov edi, dword [ebp - 0x194]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x15c]
sub esp, 0xc
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
sub esp, 0xc
jmp 0x40daf2
xor eax, eax
xor edx, edx
mov dword [esp + 0x2c], eax
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x28], eax
xor eax, eax
xor esi, esi
mov dword [esp + 0x24], eax
xor eax, eax
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x170]
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x180]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], esi
mov dword [esp], eax
call sym._RegQueryInfoKeyW_48
sub esp, 0x30
test eax, eax
je 0x40dec3
xor eax, eax
mov dword [ebp - 0x170], eax
mov eax, dword [ebp - 0x180]
mov dword [esp], eax
call sym._RegCloseKey_4
sub esp, 4
jmp 0x40dd47
test ebx, ebx
je 0x40e2fe
mov esi, dword [ebp - 0x1a0]
test esi, esi
je 0x40e2b2
mov dword [esp], ebx
mov ecx, 0xffffffff
mov dword [esp + 4], ecx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40e2f7
cmp word [ebx], 0
je 0x40e308
lea esi, [esi]
mov edx, eax
cmp word [ebx + edx*2 + 2], 0
lea eax, [eax + 1]
jne 0x40df20
mov dword [ebp - 0x1a4], ebx
lea ecx, [ebp - 0x142]
mov eax, 0x224c
mov word [ebp - 0x144], ax
mov dword [ebp - 0x19c], ebx
jmp 0x40df88
cmp eax, 9
je 0x40e168
cmp eax, 0xa
jne 0x40e182
mov word [ecx], 0x6e5c
add ecx, 2
lea esi, [esi]
lea eax, [edx - 1]
test edx, edx
jle 0x40e253
lea edx, [ebp - 0x22]
cmp ecx, edx
ja 0x40e253
mov edx, eax
add dword [ebp - 0x19c], 2
mov eax, dword [ebp - 0x19c]
movzx eax, word [eax - 2]
cmp eax, 0xd
je 0x40e155
jbe 0x40df50
cmp eax, 0x22
je 0x40e1d0
cmp eax, 0x5c
jne 0x40e175
mov word [ecx], 0x5c5c
add ecx, 2
jmp 0x40df70
mov eax, dword [ebp - 0x184]
mov esi, 1
mov dword [esp], eax
call sym._RegCloseKey_4
sub esp, 4
jmp 0x40daf2
mov eax, dword [ebp - 0x198]
mov ebx, dword fs:[0x18]
mov esi, dword [ebp - 0x194]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x15c]
sub esp, 0xc
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x184]
sub esp, 0xc
mov dword [esp], eax
call sym._RegCloseKey_4
mov eax, dword [ebp - 0x190]
mov edx, 4
mov ecx, 0x110a
sub esp, 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], edi
call sym._SendMessageW_16
sub esp, 0x10
test eax, eax
mov ebx, eax
je 0x40e09d
mov dword [esp + 0xc], ebx
mov eax, 1
mov esi, ebx
mov dword [esp + 8], eax
mov eax, 0x110a
mov dword [esp + 4], eax
mov dword [esp], edi
call sym._SendMessageW_16
mov edx, esi
sub esp, 0x10
mov ebx, eax
mov eax, edi
call sym._RefreshTreeItem
test eax, eax
je 0x40e0b0
test ebx, ebx
jne 0x40e067
mov esi, 1
jmp 0x40daf2
mov dword [esp + 0xc], esi
mov eax, 0x1101
xor esi, esi
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], edi
call sym._SendMessageW_16
sub esp, 0x10
jmp 0x40e099
mov word [ecx], 0x725c
add ecx, 2
jmp 0x40dbc0
mov word [ecx], 0x745c
add ecx, 2
jmp 0x40dbc0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40e24b
mov byte [ecx], 0x5c
mov edi, eax
add ecx, 5
shr edi, 0xc
movzx ebx, byte [edi + str.0123456789abcdefRefreshTreeItem]
mov edi, eax
shr edi, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefRefreshTreeItem]
mov edi, eax
shr edi, 4
and eax, 0xf
and edi, 0xf
movzx eax, byte [eax + str.0123456789abcdefRefreshTreeItem]
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefRefreshTreeItem]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x40dbc0
mov word [ecx], 0x225c
add ecx, 2
jmp 0x40dbc0
mov word [ecx], 0x725c
add ecx, 2
jmp 0x40df70
mov word [ecx], 0x745c
add ecx, 2
jmp 0x40df70
lea esi, [eax - 0x20]
cmp si, 0x5e
jbe 0x40e2c7
mov byte [ecx], 0x5c
mov esi, eax
add ecx, 5
shr esi, 0xc
movzx ebx, byte [esi + str.0123456789abcdefRefreshTreeItem]
mov esi, eax
shr esi, 8
and esi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [esi + str.0123456789abcdefRefreshTreeItem]
mov esi, eax
shr esi, 4
and eax, 0xf
and esi, 0xf
movzx eax, byte [eax + str.0123456789abcdefRefreshTreeItem]
mov byte [ecx - 3], bl
movzx ebx, byte [esi + str.0123456789abcdefRefreshTreeItem]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x40df70
mov word [ecx], 0x225c
add ecx, 2
jmp 0x40df70
mov byte [ecx], 0x22
test eax, eax
jle 0x40e2ef
mov word [ecx + 1], 0x2e2e
lea eax, [ecx + 4]
mov byte [ecx + 3], 0x2e
mov byte [eax], 0
lea eax, [ebp - 0x144]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov ecx, str.RegOpenKeyEx_failed___s_was_probably_removed._n
mov ebx, 0x412e18
mov dword [esp + 0x10], eax
mov esi, 0x4112e4
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_5
jmp 0x40daf0
mov dword [esp], str._04x
movzx ebx, bx
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf.constprop.0_2
jmp 0x40e206
mov byte [ecx], al
inc ecx
jmp 0x40dbc0
mov byte [ecx], 0x22
test eax, eax
mov ebx, dword [ebp - 0x1a4]
jle 0x40e31e
mov word [ecx + 1], 0x2e2e
lea eax, [ecx + 4]
mov byte [ecx + 3], 0x2e
mov byte [eax], 0
lea eax, [ebp - 0x144]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov dword [esp + 0x10], eax
mov eax, str.New_subkey__s_n
mov edx, 0x4112e4
mov dword [esp + 0xc], eax
mov eax, 0x412e18
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_5
jmp 0x40ddeb
mov dword [esp], str._04x
movzx eax, bx
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_2
jmp 0x40e282
mov byte [ecx], al
inc ecx
jmp 0x40df70
mov eax, str._invalid_
jmp 0x40e206
mov word [ebp - 0x144], 0x224c
lea ecx, [ebp - 0x142]
mov byte [ebp - 0x142], 0x22
lea eax, [ecx + 1]
jmp 0x40e1f5
mov eax, str._invalid_
jmp 0x40e282
mov eax, str._null_
jmp 0x40e282
mov word [ebp - 0x144], 0x224c
lea ecx, [ebp - 0x142]
mov byte [ebp - 0x142], 0x22
lea eax, [ecx + 1]
jmp 0x40e271