Function at 0x41f700
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x563c2b
mov eax, dword fs:[0]
push eax
sub esp, 0x888
mov eax, dword [0x5c0490]
xor eax, esp
mov dword [esp + 0x880], eax
push ebx
push esi
push edi
mov eax, dword [0x5c0490]
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.00401190
add esp, 0xc
push edi
push str.lpszPrinter___s
lea ecx, [esp + 0x24]
push 1
push ecx
mov dword [esp + 0x8b0], ebx
call fcn.00401410
push 0x410
lea edx, [esp + 0x40]
push ebx
push edx
mov dword [esp + 0x34], ebx
call fcn.00541d20
add esp, 0x1c
mov dword [esp + 0x10], ebx
xor esi, esi
mov dword [esp + 0x14], ebx
call fcn.00414850
cmp eax, 6
je 0x41f87e
cmp eax, 0xa
je 0x41f87e
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 0x41f803
add dword [esp + 0x10], 0x100
cmp esi, ebx
je 0x41f7d7
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x10]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
cmp esi, ebx
je 0x41f84e
mov ecx, dword [esp + 0x10]
shr ecx, 1
push ecx
push esi
push 0x5988ec
push ebx
push 0x5989a8
call edi
cmp eax, ebx
jne 0x41f7bb
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
mov edi, esi
call ebx
test eax, eax
je 0x41f83a
mov dword [esp + 0x14], 1
lea ebx, [ebx]
mov eax, dword [esp + 0x24]
push edi
push eax
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 0x41f820
test esi, esi
je 0x41f95d
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x41f95d
push ebx
push str.return___08x
lea edx, [esp + 0x24]
push 2
push edx
call fcn.00401410
add esp, 0x10
lea ecx, [esp + 0x1c]
mov dword [esp + 0x8a0], 0xffffffff
call fcn.00401370
xor eax, eax
jmp 0x41f98c
lea ecx, [esp + 0x18]
push ecx
push 0x20019
push ebx
push str.SoftwareMicrosoftWindows_NTCurrentVersionDevices
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x41f954
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
jmp 0x41f8b0
push 0x410
lea edx, [esp + 0x30]
push 0
push edx
mov dword [esp + 0x1c], 0x208
call fcn.00541d20
mov edx, dword [esp + 0x24]
add esp, 0xc
push 0
push 0
push 0
push 0
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x40]
push ecx
push esi
push edx
call ebx
mov ecx, 1
add esi, ecx
test eax, eax
jne 0x41f903
lea eax, [esp + 0x2c]
push eax
push edi
mov dword [esp + 0x1c], ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x41f8b0
cmp dword [esp + 0x14], ecx
jne 0x41f947
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x440]
push edx
push 0
push 0
push edi
push eax
mov dword [esp + 0x40], 0x450
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x5989a4
push edi
call esi
lea ecx, [esp + 0x43c]
push ecx
push edi
call esi
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x41f95d
cmp eax, 2
je 0x41f95d
mov dword [esp + 0x14], ebx
mov esi, dword [esp + 0x14]
push esi
push str.return___08x
lea eax, [esp + 0x24]
push 2
push eax
call fcn.00401410
add esp, 0x10
lea ecx, [esp + 0x1c]
mov dword [esp + 0x8a0], 0xffffffff
call fcn.00401370
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.0053ca73
mov esp, ebp
pop ebp
ret