Function at 0x408650
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a876b
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x5036c4]
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 0x4b58fc
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4086e0
mov edi, dword [ebp - 0x23c]
mov dword [ebp - 0x268], edi
mov dword [ebp - 0x264], 0x200
mov byte [ebp - 4], 0
test eax, eax
jne 0x408998
push 0x200
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00469cf0
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 0x4b5920
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x408998
mov eax, dword [ebp - 0x244]
cmp eax, 1
je 0x40874a
cmp eax, 2
jne 0x408998
mov eax, dword [ebp - 0x23c]
test eax, eax
je 0x40876e
test al, 1
jne 0x408998
shr eax, 1
cmp word [ebp + eax*2 - 0x216], 0
je 0x408777
jmp 0x408998
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 0x4b5938
push eax
call fcn.0040c1b0
add esp, 0x20
cmp eax, 6
jne 0x408998
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 0x408824
cmp eax, 0xc
jle 0x40882f
mov eax, 1
mov dword [ebp - 0x248], eax
mov ecx, dword [ebp - 0x24c]
cmp ecx, 1
jl 0x40883f
cmp ecx, 0x1f
jle 0x40884a
mov ecx, 1
mov dword [ebp - 0x24c], ecx
mov edx, dword [ebp - 0x250]
test edx, edx
js 0x408859
cmp edx, 0x17
jle 0x408861
xor edx, edx
mov dword [ebp - 0x250], edx
mov esi, dword [ebp - 0x244]
test esi, esi
js 0x408870
cmp esi, 0x3b
jle 0x408878
xor esi, esi
mov dword [ebp - 0x244], esi
mov ebx, dword [ebp - 0x23c]
test ebx, ebx
js 0x408887
cmp ebx, 0x3b
jle 0x40888f
xor ebx, ebx
mov dword [ebp - 0x23c], ebx
cmp dword [ebp - 0x240], 0x7b2
jl 0x4089c3
dec eax
mov dword [ebp - 0x254], eax
cmp eax, 0xb
ja 0x4089cd
lea eax, [ecx - 1]
cmp eax, 0x1e
ja 0x4089d7
cmp edx, 0x17
ja 0x4089e1
cmp esi, 0x3b
ja 0x4089eb
cmp ebx, 0x3b
ja 0x4089f5
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.00477af0
mov ecx, edx
mov dword [ebp - 0x254], eax
and eax, ecx
mov dword [ebp - 0x25c], ecx
add esp, 4
cmp eax, 0xffffffff
je 0x4089ff
jmp 0x408953
push 0
call fcn.00477b82
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.0043ba90
cmp esi, edx
jg 0x408993
jl 0x40898f
cmp ebx, eax
jae 0x408993
xor ebx, ebx
jmp 0x408998
mov ebx, 1
test edi, edi
je 0x4089a3
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.0043ba78
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