Function at 0x4138e2
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44cbd0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x130
mov dword [ebp - 0x13c], ecx
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x20], 0
call fcn.004045b0
mov dword [ebp - 0x2c], eax
push 0
lea eax, [ebp - 0x28]
push eax
push pe_nt_image_headers32
lea ecx, [ebp + 8]
call fcn.0043dbd3
push eax
call sub.WINSPOOL.DRV_OpenPrinterA
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x413959
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.0043d7a3
jmp 0x413b3c
lea ecx, [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x14]
push edx
push 0
push 2
mov eax, dword [ebp - 0x28]
push eax
call sub.WINSPOOL.DRV_GetPrinterA
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x4139a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x4139a3
push 0x460510
call fcn.00413e70
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.0043d7a3
jmp 0x413b3c
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.0042c150
add esp, 4
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x4139cc
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.0043d7a3
jmp 0x413b3c
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x14], edx
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x24]
push edx
push 2
mov eax, dword [ebp - 0x28]
push eax
call sub.WINSPOOL.DRV_GetPrinterA
test eax, eax
jne 0x413a23
push str.GetDefaultModelNameOnLUpdate___:_GetPrinter___is_failed
call fcn.00413e70
add esp, 4
mov ecx, dword [ebp - 0x28]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
mov edx, dword [ebp - 0x24]
push edx
call fcn.0042be8b
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.0043d7a3
jmp 0x413b3c
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + 0x10]
push edx
lea ecx, [ebp - 0x18]
call fcn.0043d811
mov byte [ebp - 4], 1
lea eax, [ebp - 0x38]
push eax
push 0x20019
push 0
mov ecx, dword [ebp - 0x2c]
add ecx, 0xec
call fcn.00404560
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x413a97
cmp dword [ebp - 0x24], 0
je 0x413a77
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.0042be8b
add esp, 4
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.0043d7a3
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.0043d7a3
jmp 0x413b3c
mov dword [ebp - 0x10], 0
push 0xff
lea edx, [ebp - 0x138]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0x103
je 0x413aca
cmp dword [ebp - 0x34], 6
jne 0x413acc
jmp 0x413b02
lea edx, [ebp - 0x138]
push edx
lea ecx, [ebp - 0x18]
call fcn.0043c441
test eax, eax
jl 0x413af0
lea eax, [ebp - 0x138]
push eax
mov ecx, dword [ebp + 0xc]
call fcn.0043d92c
jmp 0x413b02
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, 1
test edx, edx
jne 0x413a9e
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x28]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
mov edx, dword [ebp - 0x24]
push edx
call fcn.0042be8b
add esp, 4
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.0043d7a3
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.0043d7a3
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8