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

Disassembly:
push ebp
mov eax, 0xc044
mov ebp, esp
push edi
push esi
push ebx
call fcn.004246d8
sub esp, eax
mov esi, dword [ebp + 8]
mov ebx, dword [sym.imp.ucrtbase.dll_wcschr]
mov dword [0x4386f0], 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], 0x4289c0
sbb eax, eax
mov dword [esp], 0x80000000
and eax, 0xfffffffa
add eax, 0x2001f
mov ecx, eax
mov dword [ebp - 0xc020], eax
lea eax, [ebp - 0xc01c]
mov dword [esp + 0x10], eax
mov eax, dword [sym.imp.advapi32.dll_RegOpenKeyExW]
mov dword [esp + 0xc], ecx
mov dword [ebp - 0xc024], eax
call eax
sub esp, 0x14
test eax, eax
jne 0x413275
movzx eax, word [esi]
test ax, ax
jne 0x413084
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
xor esi, esi
lea ebx, [ebp - 0x800c]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0xc028], eax
jmp 0x41300c
movzx edx, word [ebp - 0x800c]
cmp dx, 0x2e
je 0x413160
test edi, edi
je 0x413168
add esi, 1
lea eax, [ebp - 0xc010]
mov dword [esp + 0x1c], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xc01c]
mov dword [ebp - 0xc010], 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
je 0x412ff0
cmp edx, 0x103
jne 0x413009
mov eax, dword [ebp - 0xc01c]
mov dword [esp], eax
mov eax, dword [ebp - 0xc028]
call eax
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test edi, edi
je 0x4133d0
xor edx, edx
xor eax, eax
lea ebx, [ebp - 0x800c]
mov word [edi], dx
lea esi, [esi]
movzx edx, word [esi + eax]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x4130a0
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4132c0
cmp word [ebp - 0x800c], 0
mov edx, ebx
je 0x4130d9
lea esi, [esi]
nop
add edx, 2
cmp word [edx], 0
jne 0x4130d0
xor eax, eax
mov ecx, 0x5c
jmp 0x4130e9
movzx ecx, word [eax + str.ShellOpenCommand]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4130e2
cmp word [edi + 2], 0
mov eax, dword [ebp - 0xc01c]
jne 0x4132d1
lea ebx, [ebp - 0x400c]
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 dbg.WCMD_output_stderr
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [0x4386f0], 2
mov dword [ebp - 0xc028], eax
jmp 0x413068
test edi, edi
je 0x413009
xor eax, eax
jmp 0x413174
movzx edx, word [ebx + eax]
mov word [ebp + eax - 0x400c], dx
add eax, 2
test dx, dx
jne 0x413170
test edi, edi
je 0x4134b0
lea eax, [ebp - 0xc014]
mov dword [esp + 8], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xc020]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x400c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc01c]
mov dword [esp], eax
mov eax, dword [ebp - 0xc024]
call eax
sub esp, 0x14
test eax, eax
jne 0x413009
lea eax, [ebp - 0xc018]
lea ecx, [ebp - 0xc00c]
mov dword [ebp - 0xc018], 0x4000
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0xc014]
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 - 0xc02c], eax
mov dword [esp], ebx
call sym._WCMD_output_asis
mov dword [esp], 0x427126
call sym._WCMD_output_asis
mov edx, dword [ebp - 0xc02c]
lea ecx, [ebp - 0xc00c]
test edx, edx
je 0x413610
mov dword [esp], 0x427120
mov dword [ebp - 0xc02c], edx
call sym._WCMD_output_asis
mov eax, dword [ebp - 0xc014]
mov dword [esp], eax
mov eax, dword [ebp - 0xc028]
call eax
mov edx, dword [ebp - 0xc02c]
sub esp, 4
jmp 0x413060
test byte [0x425010], 1
je 0x41307c
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], 0x425010
mov dword [esp], 0
call sym._wine_dbg_log.constprop.6
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp word [edi + 2], 0
mov eax, dword [ebp - 0xc01c]
je 0x4134f0
mov ecx, dword [ebp - 0xc020]
lea edx, [ebp - 0xc014]
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 0x4135f0
cmp word [edi + 2], 0
lea ebx, [edi + 2]
je 0x4136b3
mov eax, ebx
add eax, 2
cmp word [eax], 0
jne 0x413335
sub eax, ebx
sar eax, 1
lea eax, [eax + eax + 2]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0xc014]
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 - 0xc014]
sub esp, 0x18
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0xc028], eax
call eax
sub esp, 4
test edi, edi
jne 0x4135fb
mov dword [esp], esi
call sym._WCMD_output_asis
mov dword [esp], 0x427126
call sym._WCMD_output_asis
mov dword [esp], ebx
call sym._WCMD_output_asis
mov dword [esp], 0x427120
call sym._WCMD_output_asis
jmp 0x413068
xor edx, edx
lea edi, [ebp - 0xc00c]
jmp 0x4133e4
movzx eax, word [esi + edx]
mov word [edi + edx], ax
add edx, 2
test ax, ax
jne 0x4133e0
mov dword [esp + 4], 0x20
mov dword [esp], edi
call ebx
test eax, eax
je 0x413406
xor ebx, ebx
mov word [eax], bx
xor eax, eax
lea ebx, [ebp - 0x800c]
nop
movzx edx, word [edi + eax]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x413410
mov eax, dword [ebp - 0xc01c]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0xc028], eax
test ecx, ecx
je 0x413554
lea eax, [ebp - 0xc014]
mov dword [esp + 8], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xc020]
mov dword [esp + 4], ebx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xc028]
mov dword [esp], eax
mov eax, dword [ebp - 0xc024]
call eax
sub esp, 0x14
test eax, eax
je 0x413623
lea ebx, [ebp - 0x400c]
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 0x413134
cmp word [ebp - 0x400c], 0
lea edx, [ebp - 0x400c]
je 0x4134c9
add edx, 2
cmp word [edx], 0
jne 0x4134c0
xor eax, eax
mov ecx, 0x5c
jmp 0x4134d9
movzx ecx, word [eax + str.ShellOpenCommand]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4134d2
jmp 0x41318c
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegDeleteKeyW]
sub esp, 8
test eax, eax
jne 0x4136bd
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0xc028], eax
test byte [0x425010], 8
je 0x413068
mov eax, esi
call sym._wine_dbgstr_wn.constprop.5
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], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.6
jmp 0x413068
cmp word [ebp - 0x800c], 0
mov edx, ebx
je 0x413569
add edx, 2
cmp word [edx], 0
jne 0x413560
xor eax, eax
mov ecx, 0x5c
jmp 0x413579
movzx ecx, word [eax + str.ShellOpenCommand]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x413572
lea eax, [ebp - 0xc014]
mov dword [esp + 8], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xc020]
mov dword [esp + 4], ebx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xc028]
mov dword [esp], eax
mov eax, dword [ebp - 0xc024]
call eax
sub esp, 0x14
test eax, eax
je 0x413623
lea ebx, [ebp - 0x400c]
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 0x41349d
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0xc028], eax
call dbg.WCMD_print_error
mov dword [0x4386f0], 2
jmp 0x413068
mov dword [esp], ecx
call sym._WCMD_output_asis
mov edx, dword [ebp - 0xc02c]
jmp 0x413244
lea eax, [ebp - 0xc018]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0xc014]
mov dword [ebp - 0xc018], 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], 0x427126
call sym._WCMD_output_asis
test ebx, ebx
je 0x4136a9
mov dword [esp], 0x427120
call sym._WCMD_output_asis
mov eax, dword [ebp - 0xc014]
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0xc028], eax
call eax
sub esp, 4
jmp 0x413068
mov dword [esp], edi
call sym._WCMD_output_asis
jmp 0x41367f
mov eax, 2
jmp 0x413346
cmp eax, 2
jne 0x4135f0
lea ebx, [ebp - 0x400c]
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 0x413130