Function at 0x40f540
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
lea ebp, [esp - 0x404]
sub esp, 0x404
push 0xffffffffffffffff
push 0x522fa8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x5a4aa8]
xor eax, ebp
mov dword [ebp + 0x400], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov eax, dword [ebp + 0x40c]
mov dword [ebp - 0x24], eax
xor edi, edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x18], edi
push 0x535a4c
lea ecx, [ebp - 0x14]
call fcn.00405c00
mov dword [ebp - 4], edi
mov byte [ebp - 4], 1
push edi
lea ecx, [ebp - 0x1c]
push ecx
push edi
push 0xf003f
push edi
push edi
push edi
push str.InstallingComponents
mov edx, dword [esi + 0x320c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40f733
push edi
push edi
push edi
push edi
push edi
push edi
push edi
lea eax, [ebp - 0x20]
push eax
push edi
push edi
push edi
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
je 0x40f603
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00406150
xor eax, eax
jmp 0x40f779
xor ebx, ebx
mov dword [ebp - 0x28], ebx
cmp ebx, dword [ebp - 0x20]
jge 0x40f733
push 0x200
push edi
lea edx, [ebp + 0x200]
push edx
call fcn.004fd670
add esp, 0xc
mov dword [ebp - 0x18], pe_nt_image_headers32
push edi
push edi
push edi
push edi
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp + 0x200]
push ecx
push ebx
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x40f72b
push str.InstallOrder
lea eax, [ebp + 0x200]
push eax
call fcn.004f9f1e
add esp, 8
test eax, eax
je 0x40f72b
push 0x535a4c
lea ecx, [ebp - 0x14]
call fcn.00405ec0
lea ecx, [ebp + 0x200]
push ecx
push str.InstallingComponents
push 0x535a74
lea edx, [ebp - 0x14]
push edx
call fcn.004081a0
push 0x200
push edi
lea eax, [ebp]
push eax
call fcn.004fd670
add esp, 0x1c
push str.Class
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.004290f0
push eax
mov eax, pe_nt_image_headers32
lea edx, [ebp]
call fcn.004051f0
test eax, eax
jne 0x40f72b
push str.Printer
lea edx, [ebp]
push edx
call fcn.004f9f1e
add esp, 8
test eax, eax
jne 0x40f72b
mov dword [ebp - 0x18], edi
mov esi, dword [ebp - 0x14]
call fcn.004290f0
push 4
push 4
lea ecx, [ebp - 0x18]
push ecx
push str.InstallNow
mov edx, dword [eax]
push edx
mov edx, esi
call fcn.004920e0
add esp, 0x14
test eax, eax
jne 0x40f72b
cmp dword [ebp - 0x18], 1
jne 0x40f72b
mov eax, dword [ebp - 0x24]
cmp eax, edi
je 0x40f715
mov dword [eax], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00406150
mov eax, 1
jmp 0x40f779
add ebx, 1
jmp 0x40f605
mov dword [ebp - 4], edi
jmp 0x40f759
mov eax, dword [ebp - 0x1c]
cmp eax, edi
je 0x40f767
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00406150
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x400]
xor ecx, ebp
call fcn.004fa103
add ebp, 0x404
mov esp, ebp
pop ebp
ret 4