Function at 0x65148160
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x1c], 0
test byte [0x651531d8], 8
jne 0x651482d0
test ebx, ebx
je 0x6514818d
cmp word [ebx], 0x5c
je 0x651481c0
test esi, esi
je 0x65148197
cmp word [esi], 0
jne 0x651481f8
test byte [0x651531d8], 8
jne 0x65148338
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x57
xor ebx, ebx
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
cmp word [ebx + 2], 0x5c
jne 0x6514818d
xor edx, edx
mov eax, ebx
call sym._copy_servername_from_name.part.0
test eax, eax
je 0x6514818d
test byte [0x651531d8], 1
jne 0x65148469
mov eax, dword fs:[0x18]
xor ebx, ebx
mov dword [eax + 0x34], 0x7b
jmp 0x651481b3
mov dword [esp], 0x651531c0
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ebx, dword [0x65153154]
sub esp, 4
cmp ebx, 0x65153154
je 0x65148245
mov edi, dword [sym.imp.kernel32.dll_lstrcmpW]
lea esi, [esi]
mov eax, dword [ebx + 8]
test eax, eax
je 0x6514823b
mov dword [esp + 4], eax
mov dword [esp], esi
call edi
sub esp, 8
test eax, eax
je 0x651483c8
mov ebx, dword [ebx]
cmp ebx, 0x65153154
jne 0x65148220
mov dword [esp], 0x651531c0
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
lea eax, [ebp - 0x1c]
sub esp, 4
mov dword [esp + 8], eax
mov dword [esp + 4], str.SystemCurrentControlSetControlPrintMonitors_
mov dword [esp], 0x80000002
call dword [sym.imp.advapi32.dll_RegCreateKeyW]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x65148378
xor ebx, ebx
test byte [0x651531d8], 2
je 0x651481b3
mov edx, 0xffffffff
mov eax, str.SystemCurrentControlSetControlPrintMonitors_
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str.unable_to_create_key__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.fpDeleteMonitor
mov dword [esp + 4], 0x651531d8
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x651481b3
mov edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn
mov edx, 0xffffffff
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
call sym._wine_dbgstr_wn
mov edx, 0xffffffff
mov edi, eax
mov eax, ebx
call sym._wine_dbgstr_wn
mov ecx, dword [ebp - 0x2c]
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0xc], str.__s___s___s__n
mov dword [esp + 8], str.fpDeleteMonitor
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x65148183
mov edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str.pMonitorName__s_is_invalid_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.fpDeleteMonitor
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x651481a4
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegDeleteTreeW]
sub esp, 8
test eax, eax
je 0x651483d8
test byte [0x651531d8], 8
jne 0x65148430
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0xbb8
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
mov eax, ebx
call sym._monitor_unload
jmp 0x65148245
test byte [0x651531d8], 8
jne 0x651483fa
mov eax, dword [ebp - 0x1c]
mov ebx, 1
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x651481b3
mov edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str._s_deleted_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.fpDeleteMonitor
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x651483e1
mov edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str._s_does_not_exist_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.fpDeleteMonitor
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x6514839c
mov edx, 0xffffffff
mov eax, ebx
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str.server__s_not_supported_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.fpDeleteMonitor
mov dword [esp + 4], 0x651531d8
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
jmp 0x651481e1