Function at 0x4080d0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a522b
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x4ff4f4]
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 0x4b180c
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x408160
mov edi, dword [ebp - 0x23c]
mov dword [ebp - 0x268], edi
mov dword [ebp - 0x264], 0x200
mov byte [ebp - 4], 0
test eax, eax
jne 0x408418
push 0x200
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.00466d80
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 0x4b1830
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x408418
mov eax, dword [ebp - 0x244]
cmp eax, 1
je 0x4081ca
cmp eax, 2
jne 0x408418
mov eax, dword [ebp - 0x23c]
test eax, eax
je 0x4081ee
test al, 1
jne 0x408418
shr eax, 1
cmp word [ebp + eax*2 - 0x216], 0
je 0x4081f7
jmp 0x408418
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 0x4b1848
push eax
call fcn.0040bc30
add esp, 0x20
cmp eax, 6
jne 0x408418
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 0x4082a4
cmp eax, 0xc
jle 0x4082af
mov eax, 1
mov dword [ebp - 0x248], eax
mov ecx, dword [ebp - 0x24c]
cmp ecx, 1
jl 0x4082bf
cmp ecx, 0x1f
jle 0x4082ca
mov ecx, 1
mov dword [ebp - 0x24c], ecx
mov edx, dword [ebp - 0x250]
test edx, edx
js 0x4082d9
cmp edx, 0x17
jle 0x4082e1
xor edx, edx
mov dword [ebp - 0x250], edx
mov esi, dword [ebp - 0x244]
test esi, esi
js 0x4082f0
cmp esi, 0x3b
jle 0x4082f8
xor esi, esi
mov dword [ebp - 0x244], esi
mov ebx, dword [ebp - 0x23c]
test ebx, ebx
js 0x408307
cmp ebx, 0x3b
jle 0x40830f
xor ebx, ebx
mov dword [ebp - 0x23c], ebx
cmp dword [ebp - 0x240], 0x7b2
jl 0x408443
dec eax
mov dword [ebp - 0x254], eax
cmp eax, 0xb
ja 0x40844d
lea eax, [ecx - 1]
cmp eax, 0x1e
ja 0x408457
cmp edx, 0x17
ja 0x408461
cmp esi, 0x3b
ja 0x40846b
cmp ebx, 0x3b
ja 0x408475
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.00474b70
mov ecx, edx
mov dword [ebp - 0x254], eax
and eax, ecx
mov dword [ebp - 0x25c], ecx
add esp, 4
cmp eax, 0xffffffff
je 0x40847f
jmp 0x4083d3
push 0
call fcn.00474c02
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.0043af40
cmp esi, edx
jg 0x408413
jl 0x40840f
cmp ebx, eax
jae 0x408413
xor ebx, ebx
jmp 0x408418
mov ebx, 1
test edi, edi
je 0x408423
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.0043af28
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.004075c0
push 0x80004005
call fcn.004075c0
push 0x80004005
call fcn.004075c0
push 0x80004005
call fcn.004075c0
push 0x80004005
call fcn.004075c0
push 0x80004005
call fcn.004075c0
push 0x80070057
call fcn.004075c0
int3