Function at 0x64197b60
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
push ebx
mov ebx, eax
sub esp, 0x32c
mov dword [esp], 0x6419a0c8
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, dword [0x6419a0c4]
sub esp, 4
test esi, esi
jne 0x64197b9d
jmp 0x64197bd0
mov eax, dword [esi + 4]
cmovns eax, dword [esi + 8]
mov esi, eax
test eax, eax
je 0x64197bd0
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [0x6419a0c0]
test eax, eax
jne 0x64197b90
test edi, edi
jne 0x64197ef0
mov dword [esp], 0x6419a0c8
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov eax, esi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test edi, edi
je 0x64197ee0
lea eax, [ebp - 0x2f8]
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
jne 0x64197ed0
lea eax, [ebp - 0x2f4]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2f8]
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_RegOpenKeyW]
mov dword [ebp - 0x30c], eax
call eax
mov edi, dword [sym.imp.advapi32.dll_RegCloseKey]
mov esi, eax
mov eax, dword [ebp - 0x2f8]
sub esp, 0xc
mov dword [esp], eax
call edi
sub esp, 4
test esi, esi
jne 0x64197ef9
lea eax, [ebp - 0x2fc]
mov dword [esp + 8], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x2e8]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x2ec]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2f4]
mov dword [ebp - 0x2fc], 0xc8
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_RegQueryValueExW]
mov dword [esp + 4], str.Printer_Driver
mov dword [ebp - 0x310], eax
call eax
mov esi, eax
mov eax, dword [ebp - 0x2f4]
sub esp, 0x18
mov dword [esp], eax
call edi
sub esp, 4
test esi, esi
jne 0x64197f38
cmp dword [ebp - 0x2ec], 1
jne 0x64197f38
xor eax, eax
call sym._WINSPOOL_OpenDriverReg
mov esi, eax
test eax, eax
je 0x64197ee0
lea eax, [ebp - 0x2f0]
mov dword [esp], esi
mov dword [esp + 8], eax
lea eax, [ebp - 0x2e8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x30c]
call eax
sub esp, 0xc
mov dword [ebp - 0x30c], eax
mov dword [esp], esi
call edi
mov esi, dword [ebp - 0x30c]
sub esp, 4
test esi, esi
jne 0x64197f97
lea eax, [ebp - 0x2fc]
lea esi, [ebp - 0x220]
mov dword [esp + 0x10], 0x208
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0x2fc], 0x208
call sym.winspool.drv_GetPrinterDriverDirectoryW
sub esp, 0x18
test eax, eax
je 0x64197ee0
mov eax, dword [ebp - 0x2fc]
mov ecx, 0x33
mov edx, 0x5c
mov dword [esp + 8], 0
mov dword [esp + 4], str.Configuration_File
shr eax, 1
mov word [ebp + eax*2 - 0x220], cx
mov ecx, 0x5c
mov word [ebp + eax*2 - 0x222], dx
lea edx, [eax + 2]
mov word [ebp + eax*2 - 0x21e], cx
mov eax, 0x104
sub eax, edx
add eax, eax
mov dword [ebp - 0x2fc], eax
lea eax, [ebp - 0x2fc]
mov dword [esp + 0x14], eax
lea eax, [esi + edx*2]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x2ec]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2f0]
mov dword [esp], eax
mov eax, dword [ebp - 0x310]
call eax
mov dword [ebp - 0x30c], eax
mov eax, dword [ebp - 0x2f0]
sub esp, 0x18
mov dword [esp], eax
call edi
mov edx, dword [ebp - 0x30c]
sub esp, 4
test edx, edx
jne 0x64197fc0
cmp dword [ebp - 0x2ec], 1
jne 0x64197fc0
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_LoadLibraryW]
sub esp, 4
mov edi, eax
test eax, eax
je 0x64198048
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcslen]
lea eax, [eax + eax + 0x22]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov esi, eax
test eax, eax
je 0x64197ee0
mov edx, dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [eax + 0x10], edi
mov dword [eax + 0x14], 2
mov dword [ebp - 0x30c], edx
mov dword [esp], edi
mov dword [esp + 4], str.DrvDeviceCapabilities
call edx
mov edx, dword [ebp - 0x30c]
sub esp, 8
mov dword [esi + 0x18], eax
mov dword [esp], edi
lea edi, [esi + 0x20]
mov dword [esp + 4], str.DrvDocumentPropertySheets
call edx
sub esp, 8
mov dword [esi + 0x1c], eax
mov dword [esp + 4], ebx
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_wcscpy]
mov ebx, dword [0x6419a0c4]
test ebx, ebx
jne 0x64197eb7
jmp 0x64197fde
lea ecx, [ebx + 4]
lea edx, [ebx + 8]
mov eax, ecx
cmovns eax, edx
mov edx, dword [eax]
test edx, edx
je 0x64197fe3
mov ebx, edx
mov dword [esp + 4], ebx
mov dword [esp], edi
call dword [0x6419a0c0]
test eax, eax
jne 0x64197ea0
jmp 0x64197bb6
test byte [0x6419a04c], 2
jne 0x64197f6c
lea esi, [esi]
xor esi, esi
jmp 0x64197bb6
lock inc dword [esi + 0x14]
jmp 0x64197bb6
test byte [0x6419a04c], 4
je 0x64197ee0
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.Device__s_key_not_found_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.get_config_module
xor esi, esi
mov dword [esp + 4], 0x6419a04c
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x64197bb6
test byte [0x6419a04c], 4
je 0x64197ee0
mov dword [esp + 0xc], str.Cant_get_Printer_Driver_name_n
xor esi, esi
mov dword [esp + 8], str.get_config_module
mov dword [esp + 4], 0x6419a04c
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x64197bb6
mov dword [esp + 0xc], str.Cant_create_Printers_key_n
xor esi, esi
mov dword [esp + 8], str.get_config_module
mov dword [esp + 4], 0x6419a04c
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x64197bb6
test byte [0x6419a04c], 4
je 0x64197ee0
lea eax, [ebp - 0x2e8]
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.Driver__s_key_not_found_n
mov dword [esp + 0x10], eax
jmp 0x64197f15
test byte [0x6419a04c], 4
je 0x64197ee0
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], str.no_configuration_file:__lu_n
jmp 0x64197f15
mov eax, 0x6419a0c4
mov dword [esi], ebx
mov edx, esi
mov dword [esi + 0xc], 1
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [eax], esi
mov eax, dword [esi]
test eax, eax
je 0x6419803a
test byte [eax + 0xc], 1
je 0x6419803a
mov ecx, dword [eax]
mov ebx, dword [ecx + 4]
cmp ebx, eax
je 0x641980bd
test ebx, ebx
je 0x6419806d
test byte [ebx + 0xc], 1
je 0x6419806d
xor dword [ecx + 0xc], 1
xor dword [ebx + 0xc], 1
mov eax, dword [ecx + 8]
xor dword [eax + 0xc], 1
mov eax, dword [edx]
mov edx, dword [eax]
mov eax, dword [edx]
test eax, eax
jne 0x64198004
mov eax, dword [0x6419a0c4]
and dword [eax + 0xc], 0xfffffffe
jmp 0x64197bb6
test byte [0x6419a04c], 4
je 0x64197ee0
mov eax, esi
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.Could_not_load__s_n
mov dword [esp + 0x10], eax
jmp 0x64197f15
mov ebx, dword [eax + 4]
cmp edx, ebx
je 0x64198162
mov eax, dword [edx]
and dword [eax + 0xc], 0xfffffffe
mov eax, dword [edx]
mov eax, dword [eax]
or dword [eax + 0xc], 1
mov eax, dword [edx]
mov eax, dword [eax]
mov ebx, dword [eax]
mov ecx, dword [eax + 8]
test ebx, ebx
je 0x64198157
cmp eax, dword [ebx + 4]
je 0x6419814f
mov dword [ebx + 8], ecx
mov ebx, dword [ecx + 4]
mov dword [eax + 8], ebx
test ebx, ebx
je 0x641980af
mov dword [ebx], eax
mov dword [ecx + 4], eax
mov ebx, dword [eax]
mov dword [ecx], ebx
mov dword [eax], ecx
jmp 0x64198034
mov ebx, dword [ecx + 8]
test ebx, ebx
je 0x641980e2
test byte [ebx + 0xc], 1
je 0x641980e2
xor dword [ecx + 0xc], 1
xor dword [eax + 0xc], 1
mov eax, dword [ecx + 8]
xor dword [eax + 0xc], 1
mov eax, dword [edx]
mov edx, dword [eax]
jmp 0x64198034
mov ebx, dword [eax + 8]
cmp edx, ebx
je 0x64198133
mov eax, dword [edx]
and dword [eax + 0xc], 0xfffffffe
mov eax, dword [edx]
mov eax, dword [eax]
or dword [eax + 0xc], 1
mov eax, dword [edx]
mov eax, dword [eax]
mov ebx, dword [eax]
mov ecx, dword [eax + 4]
test ebx, ebx
je 0x6419812b
cmp eax, dword [ebx + 4]
je 0x64198126
mov dword [ebx + 8], ecx
mov ebx, dword [ecx + 8]
mov dword [eax + 4], ebx
test ebx, ebx
je 0x64198118
mov dword [ebx], eax
mov dword [ecx + 8], eax
mov ebx, dword [eax]
mov dword [ecx], ebx
mov dword [eax], ecx
jmp 0x64198034
mov dword [ebx + 4], ecx
jmp 0x6419810c
mov dword [0x6419a0c4], ecx
jmp 0x6419810c
mov dword [ecx + 4], ebx
mov edx, dword [ebx + 4]
mov dword [eax + 8], edx
test edx, edx
je 0x64198142
mov dword [edx], eax
mov dword [ebx + 4], eax
mov edx, dword [eax]
mov dword [ebx], edx
mov edx, eax
mov dword [eax], ebx
jmp 0x641980e9
mov dword [ebx + 4], ecx
jmp 0x641980a3
mov dword [0x6419a0c4], ecx
jmp 0x641980a3
mov dword [ecx + 8], ebx
mov edx, dword [ebx + 8]
mov dword [eax + 4], edx
test edx, edx
je 0x64198171
mov dword [edx], eax
mov dword [ebx + 8], eax
mov edx, dword [eax]
mov dword [ebx], edx
mov edx, eax
mov dword [eax], ebx
jmp 0x64198078