Function at 0x1000d120
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x10c
mov esi, dword [ebp + 8]
mov dword [ebp - 0xdc], 0
mov ebx, dword [ebp + 0x18]
test byte [0x1001a0b8], 8
jne 0x1000d250
test ebx, ebx
jne 0x1000d230
mov dword [esp], 0x1001a0a0
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
sub esp, 4
test esi, esi
je 0x1000d210
cmp dword [0x10021004], esi
jb 0x1000d210
mov eax, dword [0x10021008]
mov esi, dword [eax + esi*4 - 4]
mov dword [esp], 0x1001a0a0
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
test esi, esi
je 0x1000d220
mov edi, dword [esi]
test edi, edi
je 0x1000d220
mov eax, dword [ebp + 0x10]
sub eax, 1
cmp eax, 7
ja 0x1000d200
cmp dword [ebp + 0x10], 7
je 0x1000d200
mov eax, dword [ebp + 0xc]
call fcn.10004bb0
mov esi, eax
test eax, eax
je 0x1000d1f0
lea edx, [ebp - 0xd8]
mov eax, edi
call fcn.100027d0
mov edx, eax
test eax, eax
je 0x1000d2a8
test byte [0x1001a0b8], 2
jne 0x1000d450
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], edx
lea esi, [esi]
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x18
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x7c
jmp 0x1000d1f0
mov dword [esp], 0x1001a0a0
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 6
jmp 0x1000d1f0
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call sub.ucrtbase.dll_memset
jmp 0x1000d151
mov eax, dword [ebp + 0xc]
call fcn.10002fe0
mov ecx, dword [ebp + 0x1c]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ecx
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x1c], ecx
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.__p__s__ld__p__ld__p__n
mov dword [esp + 0x18], edx
mov dword [esp + 8], str.GetPrinterDriverW
mov dword [esp + 4], 0x1001a0b8
mov dword [esp], 3
call fcn.100032c0
jmp 0x1000d149
mov dword [ebp - 0xec], eax
xor eax, eax
mov word [ebp - 0xd4], ax
lea eax, [ebp - 0xe0]
mov dword [ebp - 0xe0], 0xc8
mov dword [esp + 0x14], eax
lea eax, [ebp - 0xd4]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0xe4]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], str.Printer_Driver
mov eax, dword [ebp - 0xd8]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
mov ecx, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0xe8], eax
mov eax, dword [ebp - 0xd8]
sub esp, 0x18
mov dword [esp], eax
mov dword [ebp - 0xf0], ecx
call ecx
mov edx, dword [ebp - 0xe8]
sub esp, 4
test edx, edx
mov edx, dword [ebp - 0xec]
je 0x1000d378
test byte [0x1001a0b8], 2
je 0x1000d1f0
mov eax, edi
call fcn.10002fe0
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], 0x1001a0b8
mov dword [esp], 1
call fcn.100032c0
jmp 0x1000d1f0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xe8], edx
call fcn.10004d50
mov edx, dword [ebp - 0xe8]
test eax, eax
mov edi, eax
je 0x1000d49a
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov eax, dword [eax*4 + 0x1001e8a0]
mov dword [ebp - 0xe0], eax
cmp ebx, eax
jb 0x1000d3bc
mov edx, dword [ebp + 0x14]
add edx, eax
cmp dword [ebp + 0x14], 0
cmovne ecx, edx
mov edx, ebx
sub edx, eax
lea eax, [ebp - 0xdc]
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
lea edx, [ebp - 0xd4]
mov ecx, esi
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
mov eax, edi
call fcn.1000c1d0
mov dword [esp], edi
test eax, eax
mov eax, dword [ebp - 0xf0]
je 0x1000d490
call eax
mov esi, dword [ebp - 0xdc]
mov edx, dword [ebp - 0xe0]
sub esp, 4
mov eax, dword [ebp + 0x1c]
add edx, esi
test eax, eax
je 0x1000d41a
mov eax, dword [ebp + 0x1c]
mov dword [eax], edx
test byte [0x1001a0b8], 8
jne 0x1000d4d0
mov eax, 1
cmp ebx, edx
jae 0x1000d1f2
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x7a
jmp 0x1000d1f0
mov dword [ebp - 0xe8], eax
mov eax, edi
call fcn.10002fe0
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], 0x1001a0b8
mov dword [esp], 1
call fcn.100032c0
mov edx, dword [ebp - 0xe8]
jmp 0x1000d1e3
call eax
sub esp, 4
jmp 0x1000d1f0
test byte [0x1001a0b8], 2
je 0x1000d1f0
mov dword [esp + 0xc], str.Cant_create_Drivers_key_n
mov dword [esp + 8], str.GetPrinterDriverW
mov dword [esp + 4], 0x1001a0b8
mov dword [esp], 1
call fcn.100032c0
jmp 0x1000d1f0
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.buffer_space__ld_required__ld_n
mov dword [esp + 8], str.GetPrinterDriverW
mov dword [esp + 4], 0x1001a0b8
mov dword [esp], 3
call fcn.100032c0
mov edx, dword [ebp - 0xe0]
add edx, esi
jmp 0x1000d427