Function at 0x10016ae0
Capabilities:
Check mutex on windows
Delete directory
Delete registry value
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2e0
mov dword [esp + 8], str.__WINE_WINSPOOL_MUTEX__
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateMutexW]
sub esp, 0xc
mov dword [section..bss], eax
test eax, eax
je 0x10017268
mov edx, dword fs:[0x18]
cmp dword [edx + 0x34], 0xb7
je 0x100172a0
lea eax, [ebp - 0x2a8]
mov ebx, dword [sym.imp.advapi32.dll_RegCreateKeyW]
mov dword [esp + 4], str.SystemCurrentControlSetControlPrintPrinters
mov dword [esp + 8], eax
mov dword [esp], 0x80000002
call ebx
sub esp, 0xc
test eax, eax
je 0x10016f20
xor eax, eax
call fcn.10014390
lea eax, [ebp - 0x298]
mov dword [ebp - 0x27c], 0
mov dword [ebp - 0x278], eax
lea eax, [ebp - 0x294]
mov dword [ebp - 0x274], eax
xor eax, eax
mov word [ebp - 0x262], ax
xor eax, eax
mov word [ebp - 0x2aa], ax
lea eax, [ebp - 0x28c]
mov dword [ebp - 0x284], 0x410052
mov dword [ebp - 0x280], 0x57
mov dword [ebp - 0x26e], 0x690077
mov dword [ebp - 0x26a], 0x65006e
mov dword [ebp - 0x266], 0x730070
mov dword [esp + 8], eax
mov dword [esp + 4], str.SystemCurrentControlSetControlPrintPrinters
mov dword [esp], 0x80000002
call ebx
sub esp, 0xc
test eax, eax
jne 0x10016ef0
lea ebx, [ebp - 0x27c]
mov eax, 0x2710
jmp 0x10016c06
mov eax, dword [ebp - 0x298]
add eax, eax
mov dword [ebp - 0x298], eax
mov eax, dword [ebp - 0x27c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x298]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x27c], eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov eax, dword [0x10021240]
mov edx, dword [0x10021244]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [0x1001a168]
sub esp, 0x10
cmp eax, 0x80000005
je 0x10016c00
mov edi, eax
test eax, eax
jne 0x10017300
test byte [0x1001a0b8], 8
jne 0x10017198
mov eax, dword [ebp - 0x294]
test eax, eax
je 0x10017300
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0x2b0], edi
mov dword [ebp - 0x2bc], 0
mov dword [ebp - 0x2b4], 0
mov dword [ebp - 0x2b8], eax
jmp 0x10016dd5
mov edi, dword [ebp - 0x2b4]
test edi, edi
je 0x10017080
mov eax, dword [ebx]
mov edx, dword [ebp - 0x2b4]
call fcn.10012030
test eax, eax
je 0x10016dbc
mov eax, dword [ebx]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcslen]
lea eax, [eax + eax + 0xc]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp + 4], str.CUPS:
mov esi, eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscpy]
mov eax, dword [ebx]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll_wcscat]
lea edx, [ebp - 0x260]
xor eax, eax
mov ecx, 0x15
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, dword [ebx]
mov dword [ebp - 0x25c], eax
lea eax, [ebp - 0x284]
mov dword [ebp - 0x238], eax
lea eax, [ebp - 0x26e]
mov dword [ebp - 0x23c], eax
mov eax, dword [ebx]
mov dword [ebp - 0x250], eax
mov eax, dword [ebx + 4]
mov dword [ebp - 0x24c], eax
mov eax, dword [ebx + 8]
mov dword [ebp - 0x254], esi
mov dword [ebp - 0x248], eax
lea eax, [ebp - 0x2aa]
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x258], eax
mov dword [ebp - 0x240], eax
mov dword [esp + 8], edx
mov dword [esp + 4], 2
mov dword [esp], 0
call sym.winspool.drv_AddPrinterW
sub esp, 0xc
test eax, eax
je 0x10017108
mov dword [esp], eax
call sym.winspool.drv_ClosePrinter
sub esp, 4
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
mov esi, dword [ebx + 0xc]
test esi, esi
je 0x10016dbc
mov eax, dword [ebx]
mov dword [ebp - 0x2bc], eax
add dword [ebp - 0x2b0], 1
mov eax, dword [ebp - 0x2b0]
cmp eax, dword [ebp - 0x294]
jae 0x10017098
mov ebx, dword [ebp - 0x2b0]
lea eax, [ebp - 0x290]
shl ebx, 4
add ebx, dword [ebp - 0x27c]
mov dword [esp + 8], eax
mov eax, dword [ebx]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyW]
sub esp, 0xc
test eax, eax
jne 0x10016cb0
mov eax, dword [ebp - 0x290]
mov edx, str.Status
call fcn.10003830
mov esi, eax
test byte [0x1001a0b8], 8
jne 0x10017168
mov dword [esp + 4], str.WineMayDeleteMe
mov eax, dword [ebp - 0x290]
or esi, 0x4000000
lea edi, [ebp - 0x26e]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegDeleteValueW]
lea eax, [ebp - 0x288]
mov dword [ebp - 0x288], esi
mov esi, dword [sym.imp.advapi32.dll_RegSetValueExW]
sub esp, 8
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], str.Status
mov eax, dword [ebp - 0x290]
mov dword [esp], eax
call esi
sub esp, 0x18
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_wcslen]
mov dword [esp + 0x10], edi
lea eax, [eax + eax + 2]
mov dword [esp + 0xc], 1
mov dword [esp + 0x14], eax
mov dword [esp + 8], 0
mov dword [esp + 4], str.Print_Processor
mov eax, dword [ebp - 0x290]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x290]
sub esp, 0x18
mov dword [esp], eax
mov eax, dword [ebp - 0x2b8]
call eax
sub esp, 4
jmp 0x10016dad
test byte [0x1001a0b8], 2
jne 0x10017238
mov eax, 1
call fcn.10014390
mov eax, dword [section..bss]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReleaseMutex]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x29c]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x2a8]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
sub esp, 0x30
test eax, eax
jne 0x10017210
mov eax, dword [ebp - 0x29c]
test eax, eax
je 0x10017210
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
lea esi, [ebp - 0x20c]
xor edi, edi
mov dword [ebp - 0x2b8], eax
jmp 0x10016fcf
add edi, 1
cmp edi, dword [ebp - 0x29c]
jae 0x1001721b
mov dword [esp + 0xc], 0x100
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x2a8]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyW]
sub esp, 0x10
test eax, eax
jne 0x10016fc0
lea eax, [ebp - 0x2a4]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2a8]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyW]
sub esp, 0xc
test eax, eax
jne 0x10016fc0
lea eax, [ebp - 0x2a0]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.Name
mov eax, dword [ebp - 0x2a4]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
cmp eax, 2
je 0x10017310
mov eax, dword [ebp - 0x2a4]
mov dword [esp], eax
mov eax, dword [ebp - 0x2b8]
call eax
sub esp, 4
jmp 0x10016fc0
call fcn.100036e0
mov dword [ebp - 0x2b4], eax
test eax, eax
jne 0x10016cbe
lea esi, [esi]
nop
mov ecx, dword [ebp - 0x2bc]
test ecx, ecx
je 0x100171e0
mov eax, dword [ebp - 0x2bc]
mov dword [esp], eax
call sym.winspool.drv_SetDefaultPrinterW
sub esp, 4
mov eax, dword [ebp - 0x2b4]
test eax, eax
je 0x100170dc
mov edi, dword [ebp - 0x2b4]
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_RemoveDirectoryW]
sub esp, 4
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x27c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x28c]
mov dword [esp], eax
mov eax, dword [ebp - 0x2b8]
call eax
sub esp, 4
jmp 0x10016efd
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x70a
je 0x10016da4
test byte [0x1001a0b8], 2
je 0x10016da4
mov edi, dword [eax + 0x34]
mov eax, dword [ebx]
call fcn.10002fe0
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.printer__s_not_added_by_AddPrinter__error__ld__n
mov dword [esp + 8], str.init_unix_printers
mov dword [esp + 4], 0x1001a0b8
mov dword [esp], 1
call fcn.100032c0
jmp 0x10016da4
mov dword [esp + 0xc], str.Printer_already_exists_n
mov dword [esp + 8], str.init_unix_printers
mov dword [esp + 4], 0x1001a0b8
mov dword [esp], 3
call fcn.100032c0
jmp 0x10016e2d
mov edx, dword [ebp - 0x294]
mov ecx, str.printer
mov eax, str.printers
mov dword [esp + 0xc], str.Found__d_CUPS__s:_n
mov dword [esp + 8], str.init_unix_printers
mov dword [esp + 4], 0x1001a0b8
mov dword [esp], 3
cmp edx, 1
mov dword [esp + 0x10], edx
cmove eax, ecx
mov dword [esp + 0x14], eax
call fcn.100032c0
jmp 0x10016c77
mov edx, dword [ebp - 0x294]
test edx, edx
je 0x100170b7
mov eax, dword [ebp - 0x27c]
mov eax, dword [eax]
mov dword [ebp - 0x2bc], eax
test eax, eax
jne 0x100170a6
jmp 0x100170b7
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0x2b8], eax
mov eax, dword [ebp - 0x2a8]
mov dword [esp], eax
mov eax, dword [ebp - 0x2b8]
call eax
sub esp, 4
jmp 0x10016b59
mov dword [esp + 0xc], str.Cant_create_Printers_key_n
mov dword [esp + 8], str.init_unix_printers
mov dword [esp + 4], 0x1001a0b8
mov dword [esp], 1
call fcn.100032c0
jmp 0x10016efd
test byte [0x1001a0b8], 2
je 0x10016f18
mov dword [esp + 0xc], str.Failed_to_create_mutex_n
mov dword [esp + 8], str.WINSPOOL_LoadSystemPrinters
mov dword [esp + 4], 0x1001a0b8
mov dword [esp], 1
call fcn.100032c0
jmp 0x10016f18
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [section..bss]
sub esp, 8
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReleaseMutex]
sub esp, 4
test byte [0x1001a0b8], 8
je 0x10016f18
mov dword [esp + 0xc], str.Init_already_done_n
mov dword [esp + 8], str.WINSPOOL_LoadSystemPrinters
mov dword [esp + 4], 0x1001a0b8
mov dword [esp], 3
call fcn.100032c0
jmp 0x10016f18
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0x2b8], eax
jmp 0x100170dc
mov edx, dword [ebp - 0x2a4]
mov dword [ebp - 0x2b0], edx
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_wcslen]
mov dword [esp + 0x10], esi
lea eax, [eax + eax + 2]
mov dword [esp + 0xc], 1
mov dword [esp + 0x14], eax
mov dword [esp + 8], 0
mov dword [esp + 4], str.Name
mov edx, dword [ebp - 0x2b0]
mov dword [esp], edx
call dword [sym.imp.advapi32.dll_RegSetValueExW]
sub esp, 0x18
jmp 0x1001705e