Function at 0x40ca50
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x491d6d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x250
push ebx
push esi
push edi
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push 1
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40ccc1
push 0x208
push eax
lea eax, [ebp - 0x258]
push eax
call fcn.00470f10
add esp, 0xc
mov dword [ebp - 0x2c], 0x208
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x30], 1
push eax
lea eax, [ebp - 0x258]
push eax
lea eax, [ebp - 0x30]
push eax
push 0
push str.BuildLabEx
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40ccb8
lea ecx, [ebp - 0x258]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 7
lea edx, [ecx + 2]
mov word [ebp - 0x28], ax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40cb00
sub ecx, edx
lea eax, [ebp - 0x258]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x28]
call fcn.00402f30
mov dword [ebp - 4], 0
lea edx, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x18]
cmovae edx, edi
test eax, eax
je 0x40cb63
xor esi, esi
mov ecx, edx
test eax, eax
je 0x40cb59
cmp word [edx], 0x2e
je 0x40cb57
cmp eax, 1
je 0x40cb59
add ecx, 2
dec eax
cmp word [ecx], 0x2e
jne 0x40cb48
mov esi, ecx
test esi, esi
je 0x40cb63
sub esi, edx
sar esi, 1
jmp 0x40cb66
or esi, 0xffffffff
lea ebx, [esi + 1]
push ebx
push ecx
lea ecx, [ebp - 0x28]
call fcn.0040e3a0
mov dword [ebp - 0x34], eax
cmp eax, esi
jbe 0x40cc85
cmp esi, 0xffffffff
je 0x40cc85
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov dword [ebp - 0x3c], 0
mov word [ebp - 0x4c], ax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x38], 7
cmp eax, ebx
jb 0x40ccd4
mov ecx, dword [ebp - 0x34]
sub eax, ebx
sub ecx, esi
dec ecx
cmp eax, ecx
cmovb ecx, eax
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x4c]
lea eax, [eax + ebx*2]
push eax
call fcn.00402f30
cmp dword [ebp - 0x38], 8
lea eax, [ebp - 0x4c]
push 0xa
cmovae eax, dword [ebp - 0x4c]
push 0
push eax
call fcn.00479cef
mov edx, dword [ebp - 0x38]
add esp, 0xc
mov esi, eax
cmp edx, 8
jb 0x40cc28
mov ecx, dword [ebp - 0x4c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40cc1e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ccd9
push edx
push ecx
call fcn.0046d4cf
add esp, 8
mov edx, dword [ebp - 0x14]
xor eax, eax
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 7
mov word [ebp - 0x4c], ax
cmp edx, 8
jb 0x40cc72
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40cc68
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ccd9
push edx
push ecx
call fcn.0046d4cf
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40ccb8
lea ecx, [eax*2 + 2]
mov eax, edi
cmp ecx, 0x1000
jb 0x40ccae
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ccde
push ecx
push edi
call fcn.0046d4cf
add esp, 8
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
xor eax, eax
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00403440
call fcn.00472aca
call fcn.00472aca
int3