Function at 0x408660
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a9e9b
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x4ef6d4]
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 0x4b6168
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4086f0
mov edi, dword [ebp - 0x23c]
mov dword [ebp - 0x268], edi
mov dword [ebp - 0x264], 0x200
mov byte [ebp - 4], 0
test eax, eax
jne 0x4089a8
push 0x200
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.0046b3e0
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 0x4b618c
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4089a8
mov eax, dword [ebp - 0x244]
cmp eax, 1
je 0x40875a
cmp eax, 2
jne 0x4089a8
mov eax, dword [ebp - 0x23c]
test eax, eax
je 0x40877e
test al, 1
jne 0x4089a8
shr eax, 1
cmp word [ebp + eax*2 - 0x216], 0
je 0x408787
jmp 0x4089a8
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 0x4b61a4
push eax
call fcn.0040c1c0
add esp, 0x20
cmp eax, 6
jne 0x4089a8
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 0x408834
cmp eax, 0xc
jle 0x40883f
mov eax, 1
mov dword [ebp - 0x248], eax
mov ecx, dword [ebp - 0x24c]
cmp ecx, 1
jl 0x40884f
cmp ecx, 0x1f
jle 0x40885a
mov ecx, 1
mov dword [ebp - 0x24c], ecx
mov edx, dword [ebp - 0x250]
test edx, edx
js 0x408869
cmp edx, 0x17
jle 0x408871
xor edx, edx
mov dword [ebp - 0x250], edx
mov esi, dword [ebp - 0x244]
test esi, esi
js 0x408880
cmp esi, 0x3b
jle 0x408888
xor esi, esi
mov dword [ebp - 0x244], esi
mov ebx, dword [ebp - 0x23c]
test ebx, ebx
js 0x408897
cmp ebx, 0x3b
jle 0x40889f
xor ebx, ebx
mov dword [ebp - 0x23c], ebx
cmp dword [ebp - 0x240], 0x7b2
jl 0x4089d3
dec eax
mov dword [ebp - 0x254], eax
cmp eax, 0xb
ja 0x4089dd
lea eax, [ecx - 1]
cmp eax, 0x1e
ja 0x4089e7
cmp edx, 0x17
ja 0x4089f1
cmp esi, 0x3b
ja 0x4089fb
cmp ebx, 0x3b
ja 0x408a05
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.004791d0
mov ecx, edx
mov dword [ebp - 0x254], eax
and eax, ecx
mov dword [ebp - 0x25c], ecx
add esp, 4
cmp eax, 0xffffffff
je 0x408a0f
jmp 0x408963
push 0
call fcn.00479262
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.0043d1f0
cmp esi, edx
jg 0x4089a3
jl 0x40899f
cmp ebx, eax
jae 0x4089a3
xor ebx, ebx
jmp 0x4089a8
mov ebx, 1
test edi, edi
je 0x4089b3
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.0043d1d8
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.00407b40
push 0x80004005
call fcn.00407b40
push 0x80004005
call fcn.00407b40
push 0x80004005
call fcn.00407b40
push 0x80004005
call fcn.00407b40
push 0x80004005
call fcn.00407b40
push 0x80070057
call fcn.00407b40
int3