Function at 0x40c150
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0xc
mov eax, dword [0x49c4e8]
mov dword [esp + 4], 0
push ebp
mov ebp, dword [esp + 0x1c]
push esi
push edi
test eax, eax
jne 0x40c186
push eax
push str.Setupapi.dll
call fcn.0040e630
add esp, 8
mov dword [0x49c4e8], eax
test eax, eax
je 0x40c25b
cmp dword [0x49c4ec], 0
jne 0x40c1ad
push str.SetupDiGetClassDevsW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x49c4ec], eax
test eax, eax
je 0x40c25b
mov eax, dword [0x49c4e8]
cmp dword [0x49c4f0], 0
jne 0x40c1d4
push str.SetupDiEnumDeviceInfo
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x49c4f0], eax
test eax, eax
je 0x40c25b
mov eax, dword [0x49c4e8]
cmp dword [0x49c4f8], 0
jne 0x40c1f7
push str.SetupDiGetDeviceRegistryPropertyW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x49c4f8], eax
test eax, eax
je 0x40c25b
mov eax, dword [0x49c4e8]
cmp dword [0x49c4f4], 0
jne 0x40c21a
push str.SetupDiGetDeviceInterfaceDetailW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x49c4f4], eax
test eax, eax
je 0x40c25b
mov eax, dword [0x49c4e8]
cmp dword [0x49c500], 0
jne 0x40c238
push str.SetupDiDestroyDeviceInfoList
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x49c500], eax
test eax, eax
je 0x40c25b
mov esi, dword [0x49c4ec]
mov ecx, esi
push 6
push 0
push 0
push 0
call dword [0x485320]
call esi
mov edi, eax
mov dword [esp + 0x14], edi
cmp edi, 0xffffffff
jne 0x40c264
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0xc
ret
push ebx
push ebp
push 0
mov dword [ebp + 4], 0
mov dword [ebp + 8], 0
mov dword [ebp + 0xc], 0
mov dword [ebp + 0x10], 0
mov dword [ebp + 0x14], 0
mov dword [ebp + 0x18], 0
mov dword [ebp], 0x1c
mov esi, dword [0x49c4f0]
mov ecx, esi
push edi
call dword [0x485320]
call esi
test eax, eax
je 0x40c41b
mov eax, dword [esp + 0x20]
xor ebx, ebx
mov dword [esp + 0x10], 0
cmp eax, 1
jae 0x40c3ed
lea eax, [esp + 0x10]
push eax
push ebx
push ebx
push ebx
push 2
lfence
mov esi, dword [0x49c4f8]
mov ecx, esi
push ebp
push edi
call dword [0x485320]
call esi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40c3e6
lea esi, [eax + 4]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x40c3e6
push 0
push esi
mov esi, dword [0x49c4f8]
mov ecx, esi
push ebx
push 0
push 2
push ebp
push edi
call dword [0x485320]
call esi
test eax, eax
je 0x40c3e6
cmp word [ebx], 0
mov edi, ebx
je 0x40c3c5
nop dword [eax + eax]
mov eax, dword [esp + 0x20]
mov esi, dword [eax*4 + 0x499180]
cmp word [esi], 0
je 0x40c386
push esi
push edi
call fcn.00430574
add esp, 8
test eax, eax
jne 0x40c380
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40c364
sub eax, edx
sar eax, 1
lea esi, [esi + eax*2]
add esi, 2
cmp word [esi], cx
jne 0x40c351
jmp 0x40c386
cmp word [esi], 0
jne 0x40c3c5
mov ecx, edi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c390
sub ecx, edx
sar ecx, 1
lea edi, [edi + ecx*2]
add edi, 2
cmp word [edi], ax
jne 0x40c340
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
inc eax
push ebp
mov dword [esp + 0x18], eax
push eax
jmp 0x40c268
cmp word [edi], 0
jne 0x40c3fd
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
inc eax
push ebp
mov dword [esp + 0x18], eax
push eax
jmp 0x40c268
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x14]
inc eax
push ebp
mov dword [esp + 0x18], eax
push eax
jmp 0x40c268
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
pop ebx
pop edi
pop esi
mov dword [eax], ecx
mov eax, 1
pop ebp
add esp, 0xc
ret
mov esi, dword [0x49c500]
mov ecx, esi
push edi
call dword [0x485320]
call esi
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0xc
ret