Function at 0x408560
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x8004]
mov eax, 0x8004
call fcn.0047d870
push 0xffffffffffffffff
push 0x49e50d
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x4e2054]
xor eax, ebp
mov dword [ebp + 0x8000], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x2c], ebx
cmp dword [ebx + 4], 0
mov eax, dword [ebp + 0x800c]
mov dword [ebp - 0x34], eax
je 0x40879d
mov ecx, eax
call fcn.004087f0
xor esi, esi
mov dword [ebp - 0x20], esi
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x10], 0x3fff
push eax
push 0
lea eax, [ebp - 0x24]
mov dword [ebp - 0x1c], 0
push eax
push 0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp]
push eax
push esi
push dword [ebx + 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov ebx, eax
test ebx, ebx
jne 0x408776
mov dword [ebp - 0x10], 0x3fff
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x18]
push dword [ebp - 0x1c]
call fcn.00408bf0
mov edi, dword [ebp - 0x18]
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x24]
push eax
push ebx
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp]
push eax
mov eax, dword [ebp - 0x2c]
push esi
push dword [eax + 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
cmp dword [ebp - 0x24], 1
mov ebx, eax
mov dword [ebp - 0x28], ebx
jne 0x408786
test ebx, ebx
jne 0x40875f
mov ebx, dword [ebp - 0x10]
call fcn.00404580
test eax, eax
je 0x4087de
mov ecx, dword [eax]
push 2
push ebx
mov edx, dword [ecx]
mov ecx, eax
call edx
test eax, eax
je 0x4087d9
lea esi, [eax + 0x10]
mov dword [ebp - 0x30], esi
test ebx, ebx
js 0x4087cf
cmp ebx, dword [esi - 8]
jg 0x4087cf
mov dword [esi - 0xc], ebx
xor eax, eax
add ebx, ebx
mov word [ebx + esi], ax
test ebx, ebx
je 0x4086b5
test esi, esi
jne 0x4086a7
call fcn.00481b0d
mov dword [eax], 0x16
call fcn.00481a0f
jmp 0x4086b5
push ebx
lea eax, [ebp]
push eax
push esi
call fcn.0047e1e0
add esp, 0xc
mov byte [ebp - 4], 2
call fcn.00404580
test eax, eax
je 0x4087de
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x14]
push edi
call fcn.00403660
test al, al
jne 0x40870a
test edi, edi
jne 0x4086ec
xor eax, eax
jmp 0x408700
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4086f1
sub eax, edx
sar eax, 1
push eax
push edi
lea ecx, [ebp - 0x14]
call fcn.004037d0
mov byte [ebp - 4], 4
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 0x34]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004088d0
mov byte [ebp - 4], 2
or eax, 0xffffffff
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40873d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x408759
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
push edi
call fcn.0047cc05
add esp, 4
mov dword [ebp - 0x18], 0
inc esi
mov dword [ebp - 0x20], esi
test ebx, ebx
jne 0x4087a1
mov ebx, dword [ebp - 0x2c]
jmp 0x4085c1
mov dword [ebp - 4], 0xffffffff
push edi
call fcn.0047cc05
add esp, 4
mov dword [ebp - 0x18], 0
xor al, al
jmp 0x4087aa
cmp ebx, 0x103
sete al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x8000]
xor ecx, ebp
call fcn.0047c73c
lea esp, [ebp + 0x8004]
pop ebp
ret 8
push 0x80070057
call fcn.004027c0
call fcn.004027e0
push 0x80004005
call fcn.004027c0
int3