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 0x405900
xor edx, edx
xor eax, eax
lea ebx, [ebp - 0x8018]
mov word [edi], dx
lea esi, [esi]
movzx edx, word [esi + eax]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x405580
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x405828
cmp word [edi + 2], 0
je 0x4059e0
lea eax, [ebp - 0xc020]
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0xc02c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0xc028]
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 0x405a50
cmp word [edi + 2], 0
lea ebx, [edi + 2]
je 0x405afa
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 0x405a5b
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 0x4058c0
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 0x405b08
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
cmp word [ebp - 0x8018], 0
mov edx, ebx
je 0x405841
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x405838
xor eax, eax
mov ecx, 0x5c
jmp 0x405857
movzx ecx, word [eax + str.ShellOpenCommand]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x405850
cmp word [edi + 2], 0
jne 0x4055a6
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
mov dword [esp + 4], esi
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 word [ebp - 0x4018], 0
lea edx, [ebp - 0x4018]
je 0x4058d9
add edx, 2
cmp word [edx], 0
jne 0x4058d0
xor eax, eax
mov ecx, 0x5c
jmp 0x4058ef
movzx ecx, word [eax + str.ShellOpenCommand]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4058e8
jmp 0x4056cc
xor edx, edx
lea edi, [ebp - 0xc018]
jmp 0x405914
movzx eax, word [esi + edx]
mov word [edi + edx], ax
add edx, 2
test ax, ax
jne 0x405910
mov dword [esp + 4], 0x20
mov dword [esp], edi
call ebx
test eax, eax
je 0x405936
xor ebx, ebx
mov word [eax], bx
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 0x405940
mov eax, dword [ebp - 0xc028]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0xc034], eax
test ecx, ecx
je 0x405b20
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 0x405a70
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
jmp 0x40589c
mov eax, dword [ebp - 0xc028]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegDeleteKeyW]
sub esp, 8
test eax, eax
jne 0x405bd3
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
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 0x405bc6
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, 2
jmp 0x40561e
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 0x405b39
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x405b30
xor eax, eax
mov ecx, 0x5c
jmp 0x405b4f
movzx ecx, word [eax + str.ShellOpenCommand]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x405b48
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 0x405a70
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 0x4059cd
mov dword [esp], edi
call sym._WCMD_output_asis
jmp 0x405ad0
cmp eax, 2
jne 0x405a50
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
jmp 0x405898