Function at 0x40d1d5
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
mov ecx, 0x8e
dec ecx
mov dword [esp + ecx*4], 0xfffa5a5a
jne 0x40d1e3
push ebx
push esi
push edi
mov dword [ebp - 8], 0
push dword [ebp + 8]
push str.SYSTEMCurrentControlSetEnum_s
lea edi, [ebp - 0x108]
push edi
call fcn.0041afb5
add esp, 0xc
lea edi, [ebp - 4]
push edi
push 1
push 0
lea edi, [ebp - 0x108]
push edi
push 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
cmp eax, 0
jne 0x40d4b2
mov dword [ebp - 0x10c], 0x100
lea edi, [ebp - 0x10c]
push edi
lea edi, [ebp - 0x20c]
push edi
lea edi, [ebp - 0x214]
push edi
push 0
push str.FriendlyName
push dword [ebp - 4]
call sub.ADVAPI32.DLL_RegQueryValueExA
cmp eax, 0
jne 0x40d4aa
push str._COM
lea edi, [ebp - 0x20c]
push edi
call sub.CRTDLL.DLL_strstr
add esp, 8
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x210], 0
je 0x40d4aa
lea edi, [ebp - 0x21c]
push edi
push str._COM_d_
push dword [ebp - 0x210]
call fcn.0041aed8
add esp, 0xc
mov eax, 0x98
mul dword [0x4684f4]
mov dword [ebp - 0x220], eax
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp - 0x220]
mov dword [esi + 0x4264b8], edi
mov eax, 0x98
mul dword [0x4684f4]
mov dword [ebp - 0x224], eax
mov edi, dword [ebp - 0x21c]
mov esi, dword [ebp - 0x224]
mov dword [esi + 0x4264bc], edi
mov edi, dword [ebp + 0xc]
cmp edi, 1
je 0x40d2fa
cmp edi, 3
jne 0x40d301
mov ebx, 1
jmp 0x40d306
mov ebx, 0
mov eax, 0x98
mul dword [0x4684f4]
mov dword [ebp - 0x228], eax
mov edi, dword [ebp - 0x228]
mov dword [edi + 0x4264c4], ebx
lea edi, [ebp - 0x20c]
push edi
mov eax, 0x98
mul dword [0x4684f4]
mov dword [ebp - 0x22c], eax
mov edi, dword [ebp - 0x22c]
lea edi, [edi + 0x4264cc]
push edi
call fcn.0041b031
add esp, 8
mov dword [ebp - 0x10c], 4
lea edi, [ebp - 0x10c]
push edi
lea edi, [ebp - 0x218]
push edi
lea edi, [ebp - 0x214]
push edi
push 0
push str.Capabilities
push dword [ebp - 4]
call sub.ADVAPI32.DLL_RegQueryValueExA
cmp eax, 0
jne 0x40d3a9
mov eax, 0x98
mul dword [0x4684f4]
mov dword [ebp - 0x230], eax
mov edi, dword [ebp - 0x218]
mov esi, dword [ebp - 0x230]
mov dword [esi + 0x4264c0], edi
cmp dword [ebp + 0xc], 2
jne 0x40d48b
mov dword [ebp - 0x10c], 0xc8
lea edi, [ebp - 0x10c]
push edi
lea edi, [ebp - 0x20c]
push edi
lea edi, [ebp - 0x214]
push edi
push 0
push str.HardwareID
push dword [ebp - 4]
call sub.ADVAPI32.DLL_RegQueryValueExA
push str.VID_
lea edi, [ebp - 0x20c]
push edi
call sub.CRTDLL.DLL_strstr
add esp, 8
mov dword [ebp - 0x210], eax
cmp eax, 0
je 0x40d436
mov eax, 0x98
mul dword [0x4684f4]
mov dword [ebp - 0x234], eax
mov edi, dword [ebp - 0x234]
lea edi, [edi + 0x42654c]
push edi
push 0x43f841
mov edi, dword [ebp - 0x210]
add edi, 4
push edi
call fcn.0041aed8
add esp, 0xc
push str.PID_
lea edi, [ebp - 0x20c]
push edi
call sub.CRTDLL.DLL_strstr
add esp, 8
mov dword [ebp - 0x210], eax
cmp eax, 0
je 0x40d48b
mov eax, 0x98
mul dword [0x4684f4]
mov dword [ebp - 0x238], eax
mov edi, dword [ebp - 0x238]
lea edi, [edi + 0x42654e]
push edi
push 0x43f841
mov edi, dword [ebp - 0x210]
add edi, 4
push edi
call fcn.0041aed8
add esp, 0xc
cmp dword [ebp + 0xc], 4
jne 0x40d49d
test dword [ebp - 0x218], 4
je 0x40d4aa
inc dword [0x4684f4]
mov dword [ebp - 8], 1
push dword [ebp - 4]
call sub.ADVAPI32.DLL_RegCloseKey
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret