Function at 0x40cd40
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41fe36
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2054
call fcn.0041e6e0
mov eax, dword [0x427040]
xor eax, esp
mov dword [esp + 0x2050], eax
push ebx
push esi
push edi
mov eax, dword [0x427040]
xor eax, esp
push eax
lea eax, [esp + 0x2068]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push 0x1ffe
mov esi, ecx
mov ecx, dword [ebp + 0x10]
lea edx, [esp + 0x62]
push 0
mov ebx, 7
push edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ebx
mov word [esp + 0x68], 0
call fcn.00413e90
add esp, 0xc
lea eax, [esp + 0x3c]
push eax
mov eax, dword [esi + 4]
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x40]
push edx
push 0
push edi
push eax
mov dword [esp + 0x54], 0x2000
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xor ecx, ecx
cmp eax, ecx
je 0x40cdf4
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x40d0cc
cmp dword [esp + 0x38], ebx
jne 0x40cded
mov dword [esp + 0x58], ebx
mov dword [esp + 0x54], ecx
mov word [esp + 0x44], cx
mov dword [esp + 0x2070], ecx
xor edi, edi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov byte [esp + 0x2070], 1
jmp 0x40ce28
xor ecx, ecx
cmp edi, ecx
jne 0x40ce4a
lea eax, [esp + 0x5c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40ce33
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x60]
push ecx
jmp 0x40ce64
lea edx, [esp + edi*2 + 0x5c]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40ce53
sub eax, esi
sar eax, 1
push eax
push edx
lea esi, [esp + 0x48]
call fcn.004053a0
cmp dword [esp + 0x54], 0
je 0x40ce90
mov edx, esi
push edx
lea esi, [esp + 0x18]
call fcn.00406080
mov eax, dword [esp + 0x54]
lea edi, [edi + eax + 1]
cmp edi, 0xffe
jb 0x40ce26
xor ebx, ebx
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c], ebx
call fcn.004019a0
test eax, eax
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
jbe 0x40cf06
mov dword [esp + 0x24], ebx
test esi, esi
je 0x40cece
mov ecx, edi
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x40cedb
call fcn.00412b4f
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + esi + 0x14]
mov edx, dword [esp + 0x2c]
lea ecx, [edx + ecx*2 + 2]
mov dword [esp + 0x2c], ecx
add eax, 0x1c
lea ecx, [esp + 0x14]
add ebx, 1
mov dword [esp + 0x24], eax
call fcn.004019a0
cmp ebx, eax
jb 0x40ceaf
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x34]
mov eax, dword [edx]
add ecx, 2
cmp eax, ecx
mov dword [esp + 0x2c], ecx
jae 0x40cf66
xor ebx, ebx
cmp esi, ebx
mov dword [edx], ecx
je 0x40cf3f
mov edx, dword [esp + 0x30]
push edx
mov eax, esi
call fcn.00406eb0
mov eax, dword [esp + 0x1c]
add esp, 4
push eax
call fcn.004127aa
add esp, 4
cmp dword [esp + 0x58], 8
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
jb 0x40cf5f
mov ecx, dword [esp + 0x44]
push ecx
call fcn.004127aa
add esp, 4
xor al, al
jmp 0x40d0cc
mov ebx, dword [esp + 0x28]
push eax
push 0
push ebx
call fcn.00413e90
add esp, 0xc
mov dword [esp + 0x24], ebx
lea ecx, [esp + 0x14]
xor ebx, ebx
call fcn.004019a0
test eax, eax
jbe 0x40d07e
mov dword [esp + 0x28], ebx
test esi, esi
je 0x40cfb0
mov ecx, edi
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x40cfbd
call fcn.00412b4f
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
test esi, esi
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx + esi + 0x14]
mov dword [esp + 0x30], edx
je 0x40cfe6
sub edi, esi
mov eax, 0x92492493
imul edi
add edx, edi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x40cff3
call fcn.00412b4f
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
cmp dword [ecx + esi + 0x18], 8
jb 0x40d000
mov esi, dword [ecx + esi + 4]
jmp 0x40d004
lea esi, [ecx + esi + 4]
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x24]
lea ecx, [eax + eax + 2]
push ecx
push esi
push edx
call fcn.00414cc0
mov esi, dword [esp + 0x24]
add esp, 0xc
test esi, esi
je 0x40d042
mov edi, dword [esp + 0x1c]
mov ecx, edi
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x40d04f
call fcn.00412b4f
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + esi + 0x14]
mov edx, dword [esp + 0x24]
lea ecx, [edx + ecx*2 + 2]
mov dword [esp + 0x24], ecx
add eax, 0x1c
lea ecx, [esp + 0x14]
add ebx, 1
mov dword [esp + 0x28], eax
call fcn.004019a0
cmp ebx, eax
jb 0x40cf91
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x34]
xor ebx, ebx
cmp esi, ebx
mov dword [eax], edx
je 0x40d0aa
mov ecx, dword [esp + 0x30]
push ecx
mov eax, esi
call fcn.00406eb0
mov edx, dword [esp + 0x1c]
add esp, 4
push edx
call fcn.004127aa
add esp, 4
cmp dword [esp + 0x58], 8
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
jb 0x40d0ca
mov eax, dword [esp + 0x44]
push eax
call fcn.004127aa
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x2068]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2050]
xor ecx, esp
call fcn.0041288d
mov esp, ebp
pop ebp
ret 0xc