Function at 0x651484b0
Capabilities:
Delete registry key
Persist via print monitors registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
test byte [0x651531d8], 8
jne 0x651485c0
test esi, esi
je 0x651484e4
cmp word [esi], 0x5c
je 0x65148520
mov eax, dword [ebx]
test eax, eax
je 0x651484f0
cmp word [eax], 0
jne 0x65148558
test byte [0x651531d8], 4
jne 0x65148648
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x57
xor esi, esi
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
cmp word [esi + 2], 0x5c
jne 0x651484e4
xor edx, edx
mov eax, esi
call sym._copy_servername_from_name.part.0
test eax, eax
je 0x651484e4
test byte [0x651531d8], 1
jne 0x651487f0
mov eax, dword fs:[0x18]
xor esi, esi
mov dword [eax + 0x34], 5
jmp 0x6514850c
mov eax, dword [ebx + 4]
call sym._validate_envW
test eax, eax
je 0x6514850a
mov eax, dword [ebx + 8]
test eax, eax
je 0x65148575
cmp word [eax], 0
jne 0x65148680
test byte [0x651531d8], 4
je 0x651484fd
mov edx, 0xffffffff
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str.pDLLName_not_valid_:__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.fpAddMonitor
mov dword [esp + 4], 0x651531d8
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
jmp 0x651484fd
mov eax, dword [ebx + 8]
mov edx, 0xffffffff
call sym._wine_dbgstr_wn
mov edx, 0xffffffff
mov dword [ebp - 0x30], eax
mov eax, dword [ebx + 4]
call sym._wine_dbgstr_wn
mov edx, 0xffffffff
mov edi, eax
mov eax, dword [ebx]
call sym._wine_dbgstr_wn
mov edx, 0xffffffff
mov dword [ebp - 0x2c], eax
mov eax, esi
call sym._wine_dbgstr_wn
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp + 0xc]
mov dword [esp + 0x20], edi
mov edi, dword [ebp - 0x2c]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__s___ld___p_:__s__s__s_n
mov dword [esp + 8], str.fpAddMonitor
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x651484da
mov edx, 0xffffffff
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str.pName_not_valid_:__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.fpAddMonitor
mov dword [esp + 4], 0x651531d8
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
jmp 0x651484fd
lea eax, [ebp - 0x28]
mov dword [esp + 4], str.SystemCurrentControlSetControlPrintMonitors_
mov dword [esp + 8], eax
mov dword [esp], 0x80000002
call dword [sym.imp.advapi32.dll_RegCreateKeyW]
sub esp, 0xc
mov esi, eax
test eax, eax
je 0x651486f0
test byte [0x651531d8], 2
je 0x6514850a
mov edx, 0xffffffff
mov eax, str.SystemCurrentControlSetControlPrintMonitors_
xor esi, esi
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.fpAddMonitor
mov dword [esp + 4], 0x651531d8
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x6514850c
lea eax, [ebp - 0x20]
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x24]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], 0x20007
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov eax, dword [ebx]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCreateKeyExW]
mov edi, dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 0x24
test eax, eax
jne 0x651487d6
cmp dword [ebp - 0x20], 2
mov dword [ebp - 0x1c], 0
je 0x65148830
mov eax, dword [ebx + 8]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcslen]
lea eax, [eax + eax + 2]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 8]
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], 0
mov dword [esp + 4], str.Driver
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegSetValueExW]
mov edx, dword [ebx + 8]
sub esp, 0x18
test eax, eax
sete al
movzx eax, al
mov esi, eax
mov eax, dword [ebx]
call sym._monitor_load
test eax, eax
je 0x6514888b
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0
mov eax, dword [ebp - 0x24]
mov edi, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [esp], eax
call edi
sub esp, 4
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call edi
sub esp, 4
jmp 0x6514850c
mov edx, 0xffffffff
mov eax, esi
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.fpAddMonitor
mov dword [esp + 4], 0x651531d8
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
jmp 0x65148541
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.Driver
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
mov esi, eax
test eax, eax
jne 0x6514875a
test byte [0x651531d8], 8
jne 0x651488a7
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0xbbe
jmp 0x651487c5
mov eax, dword [ebx]
xor esi, esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegDeleteKeyW]
sub esp, 8
jmp 0x651487c5
mov eax, dword [ebx]
mov edx, 0xffffffff
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str.monitor__s_already_exists_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.fpAddMonitor
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x65148879