Function at 0x405440
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov eax, 0xc05c
mov ebp, esp
push edi
push esi
push ebx
call fcn.00401050
sub esp, eax
mov esi, dword [ebp + 8]
mov ebx, dword [sym.imp.ucrtbase.dll_wcschr]
mov dword [0x4231f0], 0
mov dword [esp + 4], 0x3d
mov dword [esp], esi
call ebx
mov dword [esp + 8], 0
cmp eax, 1
mov edi, eax
mov dword [esp + 4], 0x436944
sbb eax, eax
mov dword [esp], 0x80000000
and eax, 0xfffffffa
add eax, 0x2001f
mov ecx, eax
mov dword [ebp - 0xc02c], eax
lea eax, [ebp - 0xc028]
mov dword [esp + 0x10], eax
mov eax, dword [sym.imp.advapi32.dll_RegOpenKeyExW]
mov dword [esp + 0xc], ecx
mov dword [ebp - 0xc030], eax
call eax
sub esp, 0x14
test eax, eax
jne 0x4057e0
movzx eax, word [esi]
test ax, ax
jne 0x405568
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov edi, dword [ebp + 0xc]
xor esi, esi
lea ebx, [ebp - 0x8018]
mov dword [ebp - 0xc034], eax
lea esi, [esi]
nop
lea eax, [ebp - 0xc01c]
mov dword [esp + 0x1c], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xc028]
mov dword [ebp - 0xc01c], 0x2000
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
sub esp, 0x20
mov edx, eax
test eax, eax
jne 0x4057b0
movzx edx, word [ebp - 0x8018]
cmp dx, 0x2e
je 0x4056a0
test edi, edi
je 0x4056a8
inc esi
jmp 0x4054f0
test edi, edi
je 0x405910
xor ecx, ecx
xor eax, eax
lea ebx, [ebp - 0x8018]
mov word [edi], cx
lea esi, [esi]
movzx edx, word [esi + eax]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x405580
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x405890
cmp word [edi + 2], 0
mov eax, dword [ebp - 0xc028]
je 0x405828
mov ecx, dword [ebp - 0xc02c]
lea edx, [ebp - 0xc020]
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCreateKeyExW]
sub esp, 0x24
test eax, eax
jne 0x405a11
cmp word [edi + 2], 0
lea ebx, [edi + 2]
je 0x405be8
mov eax, ebx
add eax, 2
cmp word [eax], 0
jne 0x405610
sub eax, ebx
add eax, 2
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0xc020]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegSetValueExW]
mov edi, eax
mov eax, dword [ebp - 0xc020]
sub esp, 0x18
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0xc034], eax
call eax
sub esp, 4
test edi, edi
jne 0x405a1c
mov dword [esp], esi
call sym._WCMD_output_asis
mov dword [esp], 0x4350ba
call sym._WCMD_output_asis
mov dword [esp], ebx
call sym._WCMD_output_asis
mov dword [esp], 0x4350b4
call sym._WCMD_output_asis
jmp 0x4057bc
test edi, edi
je 0x405561
xor eax, eax
jmp 0x4056b4
movzx edx, word [ebx + eax]
mov word [ebp + eax - 0x4018], dx
add eax, 2
test dx, dx
jne 0x4056b0
test edi, edi
je 0x4058d0
lea eax, [ebp - 0xc020]
mov dword [esp + 8], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xc02c]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x4018]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc028]
mov dword [esp], eax
mov eax, dword [ebp - 0xc030]
call eax
sub esp, 0x14
test eax, eax
jne 0x405561
lea eax, [ebp - 0xc024]
lea ecx, [ebp - 0xc018]
mov dword [ebp - 0xc024], 0x4000
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0xc020]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
mov dword [ebp - 0xc038], eax
mov dword [esp], ebx
call sym._WCMD_output_asis
mov dword [esp], 0x4350ba
call sym._WCMD_output_asis
mov edx, dword [ebp - 0xc038]
lea ecx, [ebp - 0xc018]
test edx, edx
je 0x405b00
mov dword [esp], 0x4350b4
mov dword [ebp - 0xc038], edx
call sym._WCMD_output_asis
mov eax, dword [ebp - 0xc020]
mov dword [esp], eax
mov eax, dword [ebp - 0xc034]
call eax
mov edx, dword [ebp - 0xc038]
sub esp, 4
cmp edx, 0x103
jne 0x405561
mov eax, dword [ebp - 0xc028]
mov dword [esp], eax
mov eax, dword [ebp - 0xc034]
call eax
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x423010], 1
je 0x4057d0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.Unexpected_failure_opening_HKCR_key:__ld_n
mov dword [esp + 8], str.WCMD_assoc
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x423010
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegDeleteTreeW]
sub esp, 8
test eax, eax
jne 0x405a08
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0xc034], eax
test byte [0x423010], 8
je 0x4057bc
mov eax, esi
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.HKCR_Key__s_deleted_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.WCMD_assoc
mov dword [esp + 4], 0x423010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x4057bc
cmp word [ebp - 0x8018], 0
mov edx, ebx
je 0x4058a9
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x4058a0
xor eax, eax
mov ecx, 0x5c
jmp 0x4058bf
movzx ecx, word [eax + str.ShellOpenCommand]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4058b8
jmp 0x40559b
cmp word [ebp - 0x4018], 0
lea edx, [ebp - 0x4018]
je 0x4058e9
add edx, 2
cmp word [edx], 0
jne 0x4058e0
xor eax, eax
mov ecx, 0x5c
jmp 0x4058ff
movzx ecx, word [eax + str.ShellOpenCommand]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4058f8
jmp 0x4056cc
xor edx, edx
lea edi, [ebp - 0xc018]
jmp 0x405924
movzx eax, word [esi + edx]
mov word [edi + edx], ax
add edx, 2
test ax, ax
jne 0x405920
mov dword [esp + 4], 0x20
mov dword [esp], edi
call ebx
test eax, eax
je 0x405946
xor edx, edx
mov word [eax], dx
xor eax, eax
lea ebx, [ebp - 0x8018]
nop
movzx edx, word [edi + eax]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x405950
mov eax, dword [ebp - 0xc028]
mov dword [ebp - 0xc034], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x405b18
lea eax, [ebp - 0xc020]
mov dword [esp + 8], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xc02c]
mov dword [esp + 4], ebx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xc034]
mov dword [esp], eax
mov eax, dword [ebp - 0xc030]
call eax
sub esp, 0x14
test eax, eax
je 0x405a30
lea ebx, [ebp - 0x4018]
mov dword [esp + 0xc], 0x2000
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x3ec
mov dword [esp], 0
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
mov dword [esp + 4], edi
mov dword [esp], ebx
call sym._WCMD_output_stderr
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [0x4231f0], 2
mov dword [ebp - 0xc034], eax
jmp 0x4057bc
cmp eax, 2
je 0x405aba
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0xc034], eax
call sym._WCMD_print_error
mov dword [0x4231f0], 2
jmp 0x4057bc
lea eax, [ebp - 0xc024]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0xc020]
mov dword [ebp - 0xc024], 0x4000
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
mov ebx, eax
mov dword [esp], esi
call sym._WCMD_output_asis
mov dword [esp], 0x4350ba
call sym._WCMD_output_asis
test ebx, ebx
je 0x405bdb
mov dword [esp], 0x4350b4
call sym._WCMD_output_asis
mov eax, dword [ebp - 0xc020]
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0xc034], eax
call eax
sub esp, 4
jmp 0x4057bc
mov eax, dword [ebp + 0xc]
lea ebx, [ebp - 0x4018]
mov dword [esp + 0xc], 0x2000
mov dword [esp + 8], ebx
test eax, eax
je 0x405bbe
mov dword [esp + 4], 0x3ec
mov dword [esp], 0
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
mov dword [esp + 4], esi
jmp 0x4059e1
mov dword [esp], ecx
call sym._WCMD_output_asis
mov edx, dword [ebp - 0xc038]
jmp 0x405784
cmp word [ebp - 0x8018], 0
mov edx, ebx
je 0x405b31
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x405b28
xor eax, eax
mov ecx, 0x5c
jmp 0x405b47
movzx ecx, word [eax + str.ShellOpenCommand]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x405b40
lea eax, [ebp - 0xc020]
mov dword [esp + 8], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xc02c]
mov dword [esp + 4], ebx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xc034]
mov dword [esp], eax
mov eax, dword [ebp - 0xc030]
call eax
sub esp, 0x14
test eax, eax
je 0x405a30
lea ebx, [ebp - 0x4018]
mov dword [esp + 0xc], 0x2000
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x3ed
mov dword [esp], 0
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
jmp 0x4059dd
mov dword [esp + 4], 0x3ed
mov dword [esp], 0
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
jmp 0x405aef
mov dword [esp], edi
call sym._WCMD_output_asis
jmp 0x405a90
mov eax, 2
jmp 0x40561e