Function at 0x4085a0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a7f0b
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x5026c4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor edi, edi
mov ebx, 1
mov dword [ebp - 0x258], ebx
mov dword [ebp - 0x268], edi
mov dword [ebp - 0x264], edi
mov dword [ebp - 0x260], edi
mov dword [ebp - 4], edi
lea eax, [ebp - 0x23c]
mov dword [ebp - 0x23c], edi
push eax
push 0x20219
push edi
push 0x4b48fc
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x408630
mov edi, dword [ebp - 0x23c]
mov dword [ebp - 0x268], edi
mov dword [ebp - 0x264], 0x200
mov byte [ebp - 4], 0
test eax, eax
jne 0x4088e8
push 0x200
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00469a40
add esp, 0xc
mov dword [ebp - 0x23c], 0x200
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x244]
push eax
push 0
push 0x4b4920
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4088e8
mov eax, dword [ebp - 0x244]
cmp eax, 1
je 0x40869a
cmp eax, 2
jne 0x4088e8
mov eax, dword [ebp - 0x23c]
test eax, eax
je 0x4086be
test al, 1
jne 0x4088e8
shr eax, 1
cmp word [ebp + eax*2 - 0x216], 0
je 0x4086c7
jmp 0x4088e8
xor eax, eax
mov word [ebp - 0x214], ax
lea eax, [ebp - 0x23c]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x244]
mov dword [ebp - 0x240], 0
push eax
lea eax, [ebp - 0x250]
mov dword [ebp - 0x248], 0
push eax
lea eax, [ebp - 0x24c]
mov dword [ebp - 0x24c], 0
push eax
lea eax, [ebp - 0x248]
mov dword [ebp - 0x250], 0
push eax
lea eax, [ebp - 0x240]
mov dword [ebp - 0x244], 0
push eax
lea eax, [ebp - 0x214]
mov dword [ebp - 0x23c], 0
push 0x4b4938
push eax
call fcn.0040c100
add esp, 0x20
cmp eax, 6
jne 0x4088e8
mov eax, dword [ebp - 0x240]
mov ecx, 0x76c
cmp eax, ecx
cmovl eax, ecx
mov dword [ebp - 0x240], eax
mov eax, dword [ebp - 0x248]
cmp eax, 1
jl 0x408774
cmp eax, 0xc
jle 0x40877f
mov eax, 1
mov dword [ebp - 0x248], eax
mov ecx, dword [ebp - 0x24c]
cmp ecx, 1
jl 0x40878f
cmp ecx, 0x1f
jle 0x40879a
mov ecx, 1
mov dword [ebp - 0x24c], ecx
mov edx, dword [ebp - 0x250]
test edx, edx
js 0x4087a9
cmp edx, 0x17
jle 0x4087b1
xor edx, edx
mov dword [ebp - 0x250], edx
mov esi, dword [ebp - 0x244]
test esi, esi
js 0x4087c0
cmp esi, 0x3b
jle 0x4087c8
xor esi, esi
mov dword [ebp - 0x244], esi
mov ebx, dword [ebp - 0x23c]
test ebx, ebx
js 0x4087d7
cmp ebx, 0x3b
jle 0x4087df
xor ebx, ebx
mov dword [ebp - 0x23c], ebx
cmp dword [ebp - 0x240], 0x7b2
jl 0x408913
dec eax
mov dword [ebp - 0x254], eax
cmp eax, 0xb
ja 0x40891d
lea eax, [ecx - 1]
cmp eax, 0x1e
ja 0x408927
cmp edx, 0x17
ja 0x408931
cmp esi, 0x3b
ja 0x40893b
cmp ebx, 0x3b
ja 0x408945
mov eax, dword [ebp - 0x254]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp - 0x240]
add eax, 0xfffff894
mov dword [ebp - 0x238], ebx
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x238]
push eax
mov dword [ebp - 0x234], esi
mov dword [ebp - 0x230], edx
mov dword [ebp - 0x22c], ecx
mov dword [ebp - 0x218], 0xffffffff
call fcn.00477830
mov ecx, edx
mov dword [ebp - 0x254], eax
and eax, ecx
mov dword [ebp - 0x25c], ecx
add esp, 4
cmp eax, 0xffffffff
je 0x40894f
jmp 0x4088a3
push 0
call fcn.004778c2
add esp, 4
mov ebx, eax
sub ebx, dword [ebp - 0x254]
mov esi, edx
mov eax, dword [ebp + 8]
mov ecx, 0x18
sbb esi, dword [ebp - 0x25c]
imul ecx
push 0
push 0xe10
push edx
push eax
call fcn.0043b9d0
cmp esi, edx
jg 0x4088e3
jl 0x4088df
cmp ebx, eax
jae 0x4088e3
xor ebx, ebx
jmp 0x4088e8
mov ebx, 1
test edi, edi
je 0x4088f3
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0043b9b8
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.00407a90
push 0x80004005
call fcn.00407a90
push 0x80004005
call fcn.00407a90
push 0x80004005
call fcn.00407a90
push 0x80004005
call fcn.00407a90
push 0x80004005
call fcn.00407a90
push 0x80070057
call fcn.00407a90
int3