Function at 0x40e950
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x5c0
push ebx
push ebp
push esi
push edi
push 0
call fcn.00410e77
test al, al
mov byte [esp + 0x20], al
mov dword [esp + 0x1c], 0
je 0x40eb8e
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x2b0]
push 0x190
push eax
push str.PNP_ID
push ecx
call fcn.00410fa4
mov edi, str.Enum_
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x28]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x28]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x2b0]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0x20019
lea ecx, [esp + 0x30]
push 0
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40eb8e
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
lea eax, [esp + 0x440]
push edx
push eax
push 0
push 0
push str.Class
push ecx
mov dword [esp + 0x30], 0x190
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40eb73
xor ebx, ebx
mov ecx, dword [esp + 0x14]
push 0
push 0
push 0
lea edx, [esp + 0x30]
push 0
lea eax, [esp + 0x1bc]
push edx
push eax
push ebx
push ecx
mov dword [esp + 0x44], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov ebp, eax
or ecx, 0xffffffff
lea edi, [esp + 0x28]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0xa8]
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [esp + 0xa8]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x42a310
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0xa8]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x1ac]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0x20019
lea ecx, [esp + 0xb0]
push 0
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea edx, [esp + 0x18]
lea eax, [esp + 0x440]
push edx
push eax
push 0
push 0
push str.Class
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40eb4d
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc ebx
test ebp, ebp
je 0x40ea3e
jmp 0x40eb68
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x28]
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x1c]
inc eax
push eax
mov dword [esp + 0x20], eax
call fcn.00410e77
test al, al
mov byte [esp + 0x20], al
jne 0x40e975
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c0
ret