Function at 0x6418d940
Capabilities:
Query or enumerate 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, 0x138
mov eax, dword [ecx + 4]
mov ebx, dword [ecx]
mov dword [ebp - 0xe8], 0
mov edi, dword [ecx + 8]
mov esi, dword [ecx + 0x10]
mov dword [ebp - 0x100], eax
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0xfc], eax
mov eax, dword [ecx + 0x14]
mov dword [ebp - 0x104], eax
test byte [0x6419a04c], 8
jne 0x6418dad0
test esi, esi
jne 0x6418dab0
mov dword [esp], 0x6419a328
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
sub esp, 4
test ebx, ebx
je 0x6418da80
cmp ebx, dword [0x6419a304]
ja 0x6418da80
mov eax, dword [0x6419a324]
mov ebx, dword [eax + ebx*4 - 4]
mov dword [esp], 0x6419a328
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
test ebx, ebx
je 0x6418da90
mov ecx, dword [ebx]
test ecx, ecx
je 0x6418da90
lea eax, [edi - 1]
cmp eax, 7
ja 0x6418da60
cmp edi, 7
je 0x6418da60
mov eax, dword [ebp - 0x100]
mov dword [ebp - 0x108], ecx
call sym._validate_envW
mov ecx, dword [ebp - 0x108]
test eax, eax
mov dword [ebp - 0x10c], eax
je 0x6418db35
lea edx, [ebp - 0xe4]
mov eax, ecx
mov dword [ebp - 0x108], ecx
call sym._open_printer_reg_key
mov ecx, dword [ebp - 0x108]
test eax, eax
mov edx, eax
je 0x6418db50
test byte [0x6419a04c], 2
jne 0x6418dd08
mov eax, dword fs:[0x18]
xor ebx, ebx
mov dword [eax + 0x34], edx
jmp 0x6418da6f
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x7c
xor ebx, ebx
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x18
mov dword [esp], 0x6419a328
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 6
lea esp, [ebp - 0x10]
xor ebx, ebx
pop ecx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x18
mov eax, dword [ebp - 0xfc]
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._memset
jmp 0x6418d999
mov eax, dword [ebp - 0x100]
call sym._wine_dbgstr_wn.constprop.0
mov edx, dword [ebp - 0x104]
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x24], edx
mov edx, dword [ebp - 0xfc]
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.__p__s__ld__p__ld__p__n
mov dword [esp + 8], str.GetPrinterDriverW
mov dword [esp + 4], 0x6419a04c
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x6418d991
call eax
sub esp, 4
lea esp, [ebp - 0x10]
xor ebx, ebx
pop ecx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x18
mov dword [ebp - 0x108], eax
xor eax, eax
mov word [ebp - 0xe0], ax
lea eax, [ebp - 0xec]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0xe0]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0xf0]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xe4]
mov dword [ebp - 0x110], ecx
mov dword [ebp - 0xec], 0xc8
mov dword [esp + 8], 0
mov dword [esp + 4], str.Printer_Driver
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
mov ebx, eax
mov eax, dword [ebp - 0xe4]
sub esp, 0x18
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0x114], eax
call eax
mov edx, dword [ebp - 0x108]
sub esp, 4
test ebx, ebx
je 0x6418dc20
test byte [0x6419a04c], 2
mov ecx, dword [ebp - 0x110]
je 0x6418db35
mov eax, ecx
xor ebx, ebx
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.Cant_get_DriverName_for_printer__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.GetPrinterDriverW
mov dword [esp + 4], 0x6419a04c
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x6418da6f
mov eax, dword [ebp - 0x100]
mov dword [ebp - 0x108], edx
call sym._WINSPOOL_OpenDriverReg
mov edx, dword [ebp - 0x108]
test eax, eax
mov dword [ebp - 0x100], eax
je 0x6418dd52
mov eax, dword [edi*4 + 0x6419e760]
xor ecx, ecx
mov dword [ebp - 0xec], eax
cmp eax, esi
ja 0x6418dc6e
mov edx, dword [ebp - 0xfc]
add edx, eax
cmp dword [ebp - 0xfc], 0
cmovne ecx, edx
mov edx, esi
sub edx, eax
lea eax, [ebp - 0xe8]
mov dword [esp + 0xc], edx
lea edx, [ebp - 0xe0]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xfc]
mov dword [esp + 8], ecx
mov ecx, dword [ebp - 0x10c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x100]
mov dword [esp], edi
call sym._WINSPOOL_GetDriverInfoFromReg
test eax, eax
mov eax, dword [ebp - 0x100]
mov dword [esp], eax
mov eax, dword [ebp - 0x114]
je 0x6418db30
call eax
mov eax, dword [ebp - 0x104]
sub esp, 4
test eax, eax
je 0x6418ddc5
mov edi, dword [ebp - 0x104]
mov eax, dword [ebp - 0xe8]
add eax, dword [ebp - 0xec]
mov dword [edi], eax
test byte [0x6419a04c], 8
jne 0x6418dd88
cmp esi, eax
jae 0x6418dd48
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x7a
jmp 0x6418da6f
mov dword [ebp - 0xfc], eax
mov eax, ecx
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.Cant_find_opened_printer__s_in_registry_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.GetPrinterDriverW
mov dword [esp + 4], 0x6419a04c
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
mov edx, dword [ebp - 0xfc]
jmp 0x6418da4a
mov ebx, 1
jmp 0x6418da6f
test byte [0x6419a04c], 2
je 0x6418db35
mov dword [esp + 0xc], str.Cant_create_Drivers_key_n
mov dword [esp + 8], str.GetPrinterDriverW
mov dword [esp + 4], 0x6419a04c
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x6418da6f
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.buffer_space__ld_required__ld_n
mov dword [esp + 8], str.GetPrinterDriverW
mov dword [esp + 4], 0x6419a04c
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov eax, dword [ebp - 0xec]
add eax, dword [ebp - 0xe8]
jmp 0x6418dcef
mov eax, dword [ebp - 0xec]
add eax, dword [ebp - 0xe8]
jmp 0x6418dce2