Function at 0x40c0d0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4375e8
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x44a00c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x24], 0
mov dword [ebp - 4], 2
or ebx, 0xffffffff
mov eax, dword [ebp + 0x10]
cmp dword [eax - 0xc], 0
je 0x40c156
lea eax, [ebp + 0x10]
mov edx, 0x440204
push eax
lea ecx, [ebp - 0x1c]
call fcn.00407320
add esp, 4
push eax
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 3
call fcn.004085c0
mov byte [ebp - 4], 2
mov eax, ebx
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40c156
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.0040d100
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 5
push ecx
mov edx, eax
lea ecx, [ebp - 0x1c]
call fcn.004074c0
add esp, 4
lea ecx, [ebp - 0x30]
push 0x2001f
push dword [eax]
push SysReAllocString
call fcn.0040bf50
mov edx, dword [ebp - 0x1c]
test eax, eax
mov eax, ebx
sete byte [ebp - 0xd]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40c1c0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
mov eax, ebx
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40c1de
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
mov edi, dword [ebp - 0x30]
je 0x40c32f
mov eax, dword [ebp - 0x1c]
add eax, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push 0
lea eax, [ebp - 0x1c]
push eax
push 0
push dword [ebp + 8]
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40c318
mov eax, dword [ebp - 0x1c]
cmp eax, 1
je 0x40c222
cmp eax, 2
jne 0x40c318
mov eax, dword [ebp - 0x18]
shr eax, 1
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
call fcn.00406c60
mov ecx, eax
test ecx, ecx
jne 0x40c242
push 0x80004005
call fcn.00406fc0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x20]
test edx, edx
jns 0x40c262
push 0x80070057
call fcn.00406fc0
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x40c27f
push edx
lea ecx, [ebp - 0x18]
call fcn.004079c0
mov esi, dword [ebp - 0x18]
lea eax, [ebp - 0x1c]
push eax
push esi
push dword [ebp + 8]
lea ecx, [ebp - 0x30]
call fcn.0040c000
test eax, eax
jne 0x40c2fa
push dword [esi - 8]
push esi
call fcn.0042a1ae
add esp, 8
test eax, eax
js 0x40c258
cmp eax, dword [esi - 8]
jg 0x40c258
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
test edi, edi
je 0x40c2c1
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
mov dword [ebp - 0x30], edi
lea eax, [esi - 0x10]
mov dword [ebp - 0x2c], 0
mov ecx, eax
mov dword [ebp - 0x20], eax
call fcn.00407960
mov esi, dword [ebp - 0x14]
add eax, 0x10
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x20]
mov dword [esi], eax
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40c33f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40c33f
mov byte [ebp - 4], 4
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40c315
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x14]
test edi, edi
je 0x40c328
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], 0
mov ecx, dword [ebp + 0xc]
lea ecx, [ecx - 0x10]
call fcn.00407960
add eax, 0x10
mov dword [esi], eax
test edi, edi
je 0x40c34a
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40c368
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, ebx
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40c386
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40c3a5
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