Function at 0x40d330
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4378c8
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
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 dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 0
call fcn.0040d100
push 0x2001f
lea ecx, [ebp - 0x38]
push dword [eax]
push SysReAllocString
call fcn.0040bf50
mov edx, dword [ebp - 0x1c]
test eax, eax
setne byte [ebp - 0xd]
or ebx, 0xffffffff
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40d3b3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x40d586
lea ecx, [ebp - 0x1c]
call fcn.0040d100
sub esp, 0x14
lea ecx, [ebp - 0x38]
push dword [eax]
push SysReAllocString
call fcn.0040bed0
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 0x40d3fd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
je 0x40d586
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.0040d100
push 0x20019
lea ecx, [ebp - 0x2c]
push dword [eax]
push reloc.OLEAUT32.dll_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 0x40d45c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
je 0x40d56e
xor edi, edi
mov dword [ebp - 0x14], 0x200
mov dword [ebp - 0x1c], edi
call fcn.00406c60
mov ecx, eax
test ecx, ecx
jne 0x40d487
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], 2
mov edx, dword [ebp - 0x14]
test edx, edx
js 0x40d52d
mov ebx, dword [ebp - 0x2c]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x40d4c1
push edx
lea ecx, [ebp - 0x18]
call fcn.004079c0
mov esi, dword [ebp - 0x18]
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x14]
push eax
push esi
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x40d537
push dword [esi - 8]
push esi
call fcn.0042a1ae
add esp, 8
test eax, eax
js 0x40d52d
cmp eax, dword [esi - 8]
jg 0x40d52d
xor ecx, ecx
mov dword [esi - 0xc], eax
push ecx
mov word [esi + eax*2], cx
mov edi, esp
lea ecx, [esi - 0x10]
mov dword [ebp - 0x20], edi
call fcn.00407960
add eax, 0x10
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0x2c]
mov dword [edi], eax
call fcn.0040d220
mov edi, dword [ebp - 0x1c]
add esp, 4
inc edi
mov edx, 0x200
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x14], edx
jmp 0x40d4a4
push 0x80070057
call fcn.00406fc0
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x40d549
push ebx
call edi
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], 0
add esi, 0xfffffff0
mov byte [ebp - 4], 1
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40d571
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40d571
mov ebx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x38]
test esi, esi
je 0x40d57d
push esi
call edi
xor esi, esi
test ebx, ebx
je 0x40d589
push ebx
call edi
jmp 0x40d589
mov esi, dword [ebp - 0x38]
test esi, esi
je 0x40d590
push esi
call edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret