Function at 0x402440
Capabilities:
Enumerate devices by category

Disassembly:
sub esp, 0x28
mov eax, dword [esp + 0x30]
push ebx
mov ebx, dword [esp + 0x30]
push ebp
lea ecx, [eax + eax*2]
push esi
shl ecx, 2
mov edx, ecx
push edi
xor eax, eax
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
xor esi, esi
and ecx, 3
push esi
rep stosb byte es:[edi], al
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [esp + 0x18]
mov dword [esp + 0x1c], esi
push eax
push 1
mov dword [esp + 0x1c], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x20], esi
call dword [sym.imp.ole32.dll_CoGetMalloc]
lea ecx, [esp + 0x1c]
push ecx
push 0x40a218
push 1
push esi
push 0x40a268
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jne 0x4025f0
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
push esi
push ecx
mov edx, dword [eax]
push 0x40a258
push eax
call dword [edx + 0xc]
test eax, eax
jne 0x4025f0
mov eax, dword [esp + 0x14]
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
xor ebp, ebp
cmp dword [esp + 0x40], esi
jbe 0x4025f0
mov edi, ebx
mov ebx, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x3c]
push esi
push edx
mov ecx, dword [eax]
push 1
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x4025f0
mov eax, dword [esp + 0x3c]
lea edx, [esp + 0x20]
push edx
push 0x40a2a8
mov ecx, dword [eax]
push esi
push esi
push eax
call dword [ecx + 0x24]
test eax, eax
jne 0x4025f0
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x28]
push esi
mov word [esp + 0x2c], 8
mov ecx, dword [eax]
push edx
push str.FriendlyName
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x4025f0
mov eax, dword [esp + 0x44]
cmp eax, esi
je 0x402567
push eax
mov eax, dword [esp + 0x34]
push eax
call fcn.00402930
test eax, eax
je 0x4025aa
mov ecx, dword [esp + 0x30]
push ecx
call ebx
cmp eax, esi
mov dword [edi + 4], eax
je 0x4025f0
mov edx, dword [esp + 0x30]
push edx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea edx, [esp + 0x10]
mov dword [esp + 0x30], esi
mov eax, dword [esp + 0x3c]
push edx
push esi
push esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x50]
test eax, eax
jne 0x4025f0
mov eax, dword [esp + 0x10]
push eax
call ebx
cmp eax, esi
mov dword [edi], eax
je 0x4025f0
inc dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
push ecx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [esp + 0x30], esi
mov eax, dword [esp + 0x10]
cmp eax, esi
je 0x4025cc
mov ecx, dword [esp + 0x18]
push eax
push ecx
mov edx, dword [ecx]
call dword [edx + 0x14]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x10], esi
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
inc ebp
add edi, 0xc
mov eax, dword [esp + 0x40]
mov dword [esp + 0x3c], esi
cmp ebp, eax
jb 0x4024f4
jmp 0x4025fe
mov eax, dword [esp + 0x3c]
cmp eax, esi
je 0x4025fe
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x40260c
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x20]
cmp eax, esi
je 0x40261a
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x14]
cmp eax, esi
je 0x402628
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [esp + 0x10]
cmp ecx, esi
je 0x40263f
mov eax, dword [esp + 0x18]
cmp eax, esi
je 0x40264d
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x14]
mov eax, dword [esp + 0x18]
cmp eax, esi
je 0x40264d
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0xc