Function at 0x641989d0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
xor ecx, ecx
mov edx, 5
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x30]
push ebx
lea ebx, [ebp - 0x38]
sub esp, 0x5c
mov dword [ebp - 0x3c], eax
mov eax, 2
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], 0
mov dword [ebp - 0x24], 1
call sym._WINSPOOL_EnumPrintersW.constprop.0
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x7a
je 0x64198a20
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [ebp - 0x38]
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp + 8], esi
mov edx, 5
xor esi, esi
mov dword [esp + 4], ebx
mov ecx, eax
mov ebx, eax
mov dword [esp], edi
mov dword [ebp - 0x40], eax
mov eax, 2
call sym._WINSPOOL_EnumPrintersW.constprop.0
mov ecx, dword [ebp - 0x30]
mov edi, dword [sym.imp.ucrtbase.dll_wcsncmp]
test ecx, ecx
jne 0x64198ab7
jmp 0x64198bd8
lea edx, [ebp - 0x24]
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], str.WineMayDeleteMe
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegSetValueExW]
mov eax, dword [ebp - 0x20]
sub esp, 0x18
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
inc esi
add ebx, 0x14
cmp dword [ebp - 0x30], esi
jbe 0x64198bd8
mov eax, dword [ebx + 4]
test eax, eax
je 0x64198aaa
mov dword [esp + 8], 5
mov dword [esp + 4], str.CUPS:
mov dword [esp], eax
call edi
test eax, eax
je 0x64198af3
mov dword [esp + 8], 4
mov dword [esp + 4], str.LPR:
mov eax, dword [ebx + 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x64198aaa
mov eax, dword [ebx]
lea edx, [ebp - 0x20]
call sym._open_printer_reg_key
test eax, eax
jne 0x64198aaa
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x20]
test edx, edx
je 0x64198a68
lea edx, [ebp - 0x28]
mov dword [ebp - 0x2c], 0
mov dword [esp + 0x14], edx
lea edx, [ebp - 0x2c]
mov dword [esp + 0x10], edx
lea edx, [ebp - 0x34]
mov dword [esp + 0xc], edx
mov dword [ebp - 0x28], 4
mov dword [esp + 8], 0
mov dword [esp + 4], str.WineMayDeleteMe
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
mov eax, dword [ebp - 0x20]
sub esp, 0x18
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov eax, dword [ebp - 0x2c]
sub esp, 4
test eax, eax
je 0x64198aaa
test byte [0x6419a04c], 8
jne 0x64198c10
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call sym.winspool.drv_OpenPrinter2W
sub esp, 0x10
test eax, eax
jne 0x64198bf0
mov dword [esp + 0x10], 0
inc esi
add ebx, 0x14
mov dword [esp + 0xc], 0
mov eax, dword [ebx - 0x14]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0
call sym.winspool.drv_DeletePrinterDriverExW
sub esp, 0x14
cmp dword [ebp - 0x30], esi
ja 0x64198ab7
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.winspool.drv_DeletePrinter
mov eax, dword [ebp - 0x1c]
sub esp, 4
mov dword [esp], eax
call sym.winspool.drv_ClosePrinter
sub esp, 4
jmp 0x64198b9d
mov eax, dword [ebx]
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.Deleting_old_printer__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.old_printer_check
mov dword [esp + 4], 0x6419a04c
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x64198b75