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

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x258
mov edi, dword [ecx]
test byte [0x6419a04c], 8
jne 0x6418f730
test edi, edi
je 0x6418f5c0
cmp word [edi], 0
je 0x6418f5c0
mov eax, dword [sym.imp.ucrtbase.dll_wcslen]
mov dword [esp], edi
mov dword [ebp - 0x240], eax
call eax
lea ebx, [eax + 0x20b]
mov dword [ebp - 0x228], ebx
add ebx, ebx
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_malloc]
mov esi, eax
test eax, eax
je 0x6418f596
lea eax, [ebp - 0x22c]
mov dword [esp + 4], str.SoftwareMicrosoftWindows_NTCurrentVersionDevices
mov dword [esp + 8], eax
mov eax, dword [sym.imp.advapi32.dll_RegCreateKeyW]
mov dword [esp], 0x80000001
mov dword [ebp - 0x23c], eax
call eax
sub esp, 0xc
test eax, eax
je 0x6418f668
mov dword [esp], esi
xor ebx, ebx
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 2
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 4
lea edi, [ebp - 0x228]
lea esi, [ebp - 0x220]
xor ecx, ecx
mov dword [ebp - 0x228], 0x104
mov dword [esp + 4], edi
mov dword [esp], esi
mov word [ebp - 0x220], cx
call sym._GetDefaultPrinterW_8.part.0
sub esp, 8
mov ebx, eax
test eax, eax
je 0x6418f610
lea esp, [ebp - 0x10]
mov ebx, 1
pop ecx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 4
lea eax, [ebp - 0x22c]
mov dword [esp + 4], str.SystemCurrentControlSetControlPrintPrinters
mov dword [esp + 8], eax
mov dword [esp], 0x80000002
call dword [sym.imp.advapi32.dll_RegCreateKeyW]
sub esp, 0xc
test eax, eax
je 0x6418f768
test byte [0x6419a04c], 8
jne 0x6418f898
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 2
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 4
lea eax, [ebx - 0x416]
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov dword [esp], esi
call sym._memcpy
mov eax, 0x2c
mov dword [ebp - 0x228], 0x414
mov word [esi + ebx - 0x416], ax
lea eax, [ebp - 0x228]
mov dword [esp + 0x14], eax
lea eax, [esi + ebx - 0x414]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x22c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
mov ebx, eax
test eax, eax
je 0x6418f7e0
cmp eax, 2
je 0x6418f6ec
test byte [0x6419a04c], 1
jne 0x6418f900
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x709
mov edi, dword [sym.imp.advapi32.dll_RegCloseKey]
mov eax, dword [ebp - 0x22c]
mov dword [esp], eax
call edi
sub esp, 4
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
test ebx, ebx
sete bl
lea esp, [ebp - 0x10]
pop ecx
movzx ebx, bl
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 4
mov eax, edi
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.__s__n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.SetDefaultPrinterW
mov dword [esp + 4], 0x6419a04c
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x6418f526
mov eax, dword [ebp - 0x22c]
xor edx, edx
mov dword [ebp - 0x228], 0x104
mov word [ebp - 0x220], dx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
sub esp, 0x20
test eax, eax
je 0x6418f870
mov eax, dword [ebp - 0x22c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x6418f63a
lea eax, [ebp - 0x224]
mov dword [esp + 4], str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x23c]
mov dword [esp], 0x80000001
call eax
mov edi, dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 0xc
test eax, eax
jne 0x6418f6ff
mov dword [esp], esi
mov eax, dword [ebp - 0x240]
call eax
mov dword [esp + 0x10], esi
lea eax, [eax + eax + 2]
mov dword [esp + 0xc], 1
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x224]
mov dword [esp + 8], 0
mov dword [esp + 4], str.device
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegSetValueExW]
mov eax, dword [ebp - 0x224]
sub esp, 0x18
mov dword [esp], eax
call edi
sub esp, 4
jmp 0x6418f6ff
test byte [0x6419a04c], 8
jne 0x6418f8c8
mov eax, dword [ebp - 0x22c]
mov edi, esi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x6418f538
mov dword [esp + 0xc], str.no_local_printer_found_n
mov dword [esp + 8], str.SetDefaultPrinterW
mov dword [esp + 4], 0x6419a04c
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x6418f647
mov eax, esi
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.using__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.SetDefaultPrinterW
mov dword [esp + 4], 0x6419a04c
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x6418f879
mov eax, edi
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], str.RegQueryValueExW_failed_with__ld_for__s_n
mov dword [esp + 8], str.SetDefaultPrinterW
mov dword [esp + 4], 0x6419a04c
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x6418f6ec