Function at 0x4168b0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x55a88b
mov eax, dword fs:[0]
push eax
sub esp, 0x888
mov eax, dword [0x5b4450]
xor eax, esp
mov dword [esp + 0x880], eax
push ebx
push esi
push edi
mov eax, dword [0x5b4450]
xor eax, esp
push eax
lea eax, [esp + 0x898]
mov dword fs:[0], eax
xor ebx, ebx
push ebx
lea eax, [esp + 0x20]
mov edi, ecx
push str.GetLastAddPrinter
push eax
mov dword [esp + 0x30], edi
call fcn.0040ac70
add esp, 0xc
push edi
push str.lpszPrinter___s
lea ecx, [esp + 0x24]
push 1
push ecx
mov dword [esp + 0x8b0], ebx
call fcn.0040aed0
add esp, 0x10
xor esi, esi
mov dword [esp + 0x14], ebx
call fcn.0040bea0
cmp eax, 6
je 0x416a10
cmp eax, 0xa
je 0x416a10
mov edi, dword [sym.imp.KERNEL32.dll_GetProfileStringW]
mov eax, pe_nt_image_headers32
mov dword [esp + 0x10], eax
add eax, 2
cmp eax, dword [esp + 0x10]
jb 0x41699b
add dword [esp + 0x10], 0x100
cmp esi, ebx
je 0x41696f
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov edx, dword [esp + 0x10]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
cmp esi, ebx
je 0x4169e0
mov eax, dword [esp + 0x10]
shr eax, 1
push eax
push esi
push 0x58a8c8
push ebx
push 0x58dab0
call edi
cmp eax, ebx
jne 0x416953
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
mov edi, esi
call ebx
test eax, eax
je 0x4169cc
mov dword [esp + 0x14], 1
mov edx, dword [esp + 0x24]
push edi
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push edi
call ebx
lea edi, [edi + eax*2 + 2]
push edi
call ebx
test eax, eax
jne 0x4169b2
test esi, esi
je 0x416aed
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x416aed
push ebx
push str.return___08x
lea ecx, [esp + 0x24]
push 2
push ecx
call fcn.0040aed0
add esp, 0x10
lea ecx, [esp + 0x1c]
mov dword [esp + 0x8a0], 0xffffffff
call fcn.0040ae50
xor eax, eax
jmp 0x416b1c
lea eax, [esp + 0x18]
push eax
push 0x20019
push ebx
push str.SoftwareMicrosoftWindows_NTCurrentVersionDevices
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x416ae4
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
lea esp, [esp]
push 0x410
lea ecx, [esp + 0x30]
push 0
push ecx
mov dword [esp + 0x1c], 0x208
call fcn.005373f0
mov ecx, dword [esp + 0x24]
add esp, 0xc
push 0
push 0
push 0
push 0
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x40]
push eax
push esi
push ecx
call ebx
mov ecx, 1
add esi, ecx
test eax, eax
jne 0x416a93
lea edx, [esp + 0x2c]
push edx
push edi
mov dword [esp + 0x1c], ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x416a40
cmp dword [esp + 0x14], ecx
jne 0x416ad7
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x440]
push ecx
push 0
push 0
push edi
push edx
mov dword [esp + 0x40], 0x450
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x58daac
push edi
call esi
lea eax, [esp + 0x43c]
push eax
push edi
call esi
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x416aed
cmp eax, 2
je 0x416aed
mov dword [esp + 0x14], ebx
mov esi, dword [esp + 0x14]
push esi
push str.return___08x
lea edx, [esp + 0x24]
push 2
push edx
call fcn.0040aed0
add esp, 0x10
lea ecx, [esp + 0x1c]
mov dword [esp + 0x8a0], 0xffffffff
call fcn.0040ae50
mov eax, esi
mov ecx, dword [esp + 0x898]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x880]
xor ecx, esp
call fcn.005337cb
mov esp, ebp
pop ebp
ret