Function at 0x40ec90
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c2c47
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x50d024]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], 0
mov ecx, ebx
mov dword [ebp - 0x1c], 0
call fcn.0040eb10
mov edx, dword [ebx]
mov dword [ebp - 0x24], eax
cmp dword [edx - 0xc], 0
jg 0x40ece2
or esi, 0xffffffff
jmp 0x40ecfe
push 0x5c
push edx
call fcn.0049a369
mov edx, dword [ebx]
mov esi, eax
add esp, 8
test esi, esi
jne 0x40ecfa
or esi, 0xffffffff
jmp 0x40ecfe
sub esi, edx
sar esi, 1
push 0x5c
push edx
call fcn.0049a2c5
mov edi, eax
add esp, 8
test edi, edi
jne 0x40ed14
or edi, 0xffffffff
jmp 0x40ed18
sub edi, dword [ebx]
sar edi, 1
mov eax, edi
mov ecx, ebx
sub eax, esi
dec eax
push eax
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040f0d0
mov dword [ebp - 4], 1
call fcn.00408d40
mov ecx, eax
test ecx, ecx
je 0x40ef2b
mov eax, dword [ecx]
call dword [eax + 0xc]
mov esi, dword [ebp - 0x18]
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 1
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x1c], 1
push eax
movzx eax, byte [ebp + 8]
shl eax, 8
inc eax
push eax
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40eef5
lea ecx, [edi + 1]
mov byte [ebp - 4], 3
mov eax, dword [ebx]
mov eax, dword [eax - 0xc]
sub eax, ecx
push eax
push ecx
lea eax, [ebp - 0x20]
mov ecx, ebx
push eax
call fcn.0040f0d0
mov edi, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], 3
mov dword [ebp - 0x14], 0
mov byte [ebp - 4], 4
push 0
mov dword [ebp - 0x10], 0xc8
call fcn.00499096
add esp, 4
mov dword [ebp - 0x14], 0
lea ecx, [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.0040f220
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 0x10]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push eax
push esi
lea eax, [ebp - 0x24]
push eax
push 0
push dword [ebp - 0x20]
push edi
call ebx
cmp eax, 0xea
jne 0x40ee2c
add dword [ebp - 0x10], 2
push esi
call fcn.00499096
add esp, 4
mov dword [ebp - 0x14], 0
lea ecx, [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.0040f220
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 0x10]
push eax
push esi
lea eax, [ebp - 0x24]
push eax
push 0
push dword [ebp - 0x20]
push edi
call ebx
cmp eax, 0xea
je 0x40edf2
test eax, eax
jne 0x40eeb1
mov eax, dword [ebp - 0x24]
cmp eax, 1
je 0x40ee69
cmp eax, 2
je 0x40ee69
cmp eax, 7
je 0x40ee69
cmp eax, 4
jne 0x40eeb1
push dword [esi]
push 0x4e7c08
push dword [ebp - 0x18]
call fcn.0040c880
mov byte [ebp - 4], 3
push esi
call fcn.00499096
add esp, 0x10
jmp 0x40eebe
mov eax, dword [ebp - 0x10]
xor ecx, ecx
shr eax, 1
mov dword [ebp - 0x10], eax
mov word [esi + eax*2], cx
mov eax, dword [ebp - 0x10]
cmp word [esi + eax*2], cx
jne 0x40ee8a
dec eax
mov dword [ebp - 0x10], eax
cmp word [esi + eax*2], cx
je 0x40ee80
inc eax
lea ecx, [ebp - 0x30]
push eax
push esi
mov dword [ebp - 0x10], eax
call fcn.0040f1c0
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x18]
push eax
call fcn.00406a40
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x30]
call fcn.004089c0
mov byte [ebp - 4], 3
push esi
call fcn.00499096
add esp, 4
mov eax, 3
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], eax
and eax, 0xfffffffd
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 1
or eax, 0xffffffff
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40eef2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x18]
mov dword [ebp - 4], 0
or eax, 0xffffffff
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40ef17
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00409410
int3