Function at 0x413de0
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0xc
mov eax, dword [0x4d7770]
mov dword [esp + 4], 0
push ebp
mov ebp, dword [esp + 0x1c]
push esi
push edi
test eax, eax
jne 0x413e16
push eax
push str.Setupapi.dll
call fcn.004162d0
add esp, 8
mov dword [0x4d7770], eax
test eax, eax
je 0x413eeb
cmp dword [0x4d7774], 0
jne 0x413e3d
push str.SetupDiGetClassDevsW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4d7774], eax
test eax, eax
je 0x413eeb
mov eax, dword [0x4d7770]
cmp dword [0x4d7778], 0
jne 0x413e64
push str.SetupDiEnumDeviceInfo
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4d7778], eax
test eax, eax
je 0x413eeb
mov eax, dword [0x4d7770]
cmp dword [0x4d7780], 0
jne 0x413e87
push str.SetupDiGetDeviceRegistryPropertyW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4d7780], eax
test eax, eax
je 0x413eeb
mov eax, dword [0x4d7770]
cmp dword [0x4d777c], 0
jne 0x413eaa
push str.SetupDiGetDeviceInterfaceDetailW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4d777c], eax
test eax, eax
je 0x413eeb
mov eax, dword [0x4d7770]
cmp dword [0x4d7788], 0
jne 0x413ec8
push str.SetupDiDestroyDeviceInfoList
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4d7788], eax
test eax, eax
je 0x413eeb
mov esi, dword [0x4d7774]
mov ecx, esi
push 6
push 0
push 0
push 0
call dword [0x4b9328]
call esi
mov edi, eax
mov dword [esp + 0x14], edi
cmp edi, 0xffffffff
jne 0x413ef4
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 [0x4d7778]
mov ecx, esi
push edi
call dword [0x4b9328]
call esi
test eax, eax
je 0x4140ab
mov eax, dword [esp + 0x20]
xor ebx, ebx
mov dword [esp + 0x10], 0
cmp eax, 1
jae 0x41407d
lea eax, [esp + 0x10]
push eax
push ebx
push ebx
push ebx
push 2
lfence
mov esi, dword [0x4d7780]
mov ecx, esi
push ebp
push edi
call dword [0x4b9328]
call esi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x414076
lea esi, [eax + 4]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x414076
push 0
push esi
mov esi, dword [0x4d7780]
mov ecx, esi
push ebx
push 0
push 2
push ebp
push edi
call dword [0x4b9328]
call esi
test eax, eax
je 0x414076
cmp word [ebx], 0
mov edi, ebx
je 0x414055
nop dword [eax + eax]
mov eax, dword [esp + 0x20]
mov esi, dword [eax*4 + 0x4d5034]
cmp word [esi], 0
je 0x414016
push esi
push edi
call fcn.004649f8
add esp, 8
test eax, eax
jne 0x414010
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x413ff4
sub eax, edx
sar eax, 1
lea esi, [esi + eax*2]
add esi, 2
cmp word [esi], cx
jne 0x413fe1
jmp 0x414016
cmp word [esi], 0
jne 0x414055
mov ecx, edi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x414020
sub ecx, edx
sar ecx, 1
lea edi, [edi + ecx*2]
add edi, 2
cmp word [edi], ax
jne 0x413fd0
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 0x413ef8
cmp word [edi], 0
jne 0x41408d
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 0x413ef8
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 0x413ef8
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 [0x4d7788]
mov ecx, esi
push edi
call dword [0x4b9328]
call esi
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0xc
ret