Function at 0x416148
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1e4
mov dword [ebp - 0xd8], 0
lea eax, [ebp - 0xc8]
push eax
lea ecx, [ebp - 0x1a0]
push ecx
call fcn.00404ad0
mov dword [ebp - 0xd8], eax
cmp dword [ebp - 0xd8], 0
je 0x416188
mov eax, dword [ebp - 0xd8]
jmp 0x41664e
cmp dword [ebp - 0x19c], 3
jne 0x416648
push 0x534660
call fcn.00412a9e
add esp, 4
push str.setupapi.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x1cc], eax
cmp dword [ebp - 0x1cc], 0
jne 0x4161f5
mov edx, dword [ebp - 0x1cc]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 1
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov eax, dword [ebp - 0xd8]
jmp 0x41664e
push str.SetupDiGetClassDevsA
mov eax, dword [ebp - 0x1cc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xd4], eax
cmp dword [ebp - 0xd4], 0
jne 0x41624f
mov ecx, dword [ebp - 0x1cc]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov eax, dword [ebp - 0xd8]
jmp 0x41664e
push str.SetupDiEnumDeviceInfo
mov edx, dword [ebp - 0x1cc]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xcc], eax
cmp dword [ebp - 0xcc], 0
jne 0x4162a9
mov eax, dword [ebp - 0x1cc]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov eax, dword [ebp - 0xd8]
jmp 0x41664e
push str.SetupDiGetDeviceRegistryPropertyA
mov ecx, dword [ebp - 0x1cc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xd0], eax
cmp dword [ebp - 0xd0], 0
jne 0x416303
mov edx, dword [ebp - 0x1cc]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov eax, dword [ebp - 0xd8]
jmp 0x41664e
push str.SetupDiCallClassInstaller
mov eax, dword [ebp - 0x1cc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1c4], eax
cmp dword [ebp - 0x1c4], 0
jne 0x41635d
mov ecx, dword [ebp - 0x1cc]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov eax, dword [ebp - 0xd8]
jmp 0x41664e
push str.SetupDiDestroyDeviceInfoList
mov edx, dword [ebp - 0x1cc]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1d4], eax
cmp dword [ebp - 0x1d4], 0
jne 0x4163b7
mov eax, dword [ebp - 0x1cc]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov eax, dword [ebp - 0xd8]
jmp 0x41664e
push 4
push 0
push 0
push 0
call dword [ebp - 0xd4]
mov dword [ebp - 0x1c8], eax
cmp dword [ebp - 0x1c8], 0xffffffff
jne 0x41640d
push 8
call fcn.00406ccc
add esp, 4
push 0x2020000
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov ecx, dword [ebp - 0x1cc]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0xd8]
jmp 0x41664e
mov dword [ebp - 0x1bc], 0x1c
mov dword [ebp - 0x1c0], 0
jmp 0x416432
mov edx, dword [ebp - 0x1c0]
add edx, 1
mov dword [ebp - 0x1c0], edx
lea eax, [ebp - 0x1bc]
push eax
mov ecx, dword [ebp - 0x1c0]
push ecx
mov edx, dword [ebp - 0x1c8]
push edx
call dword [ebp - 0xcc]
mov dword [ebp - 0x1d0], eax
cmp dword [ebp - 0x1d0], 0
je 0x41661e
mov dword [ebp - 0x1e0], 0
mov dword [ebp - 0x1e4], 0
lea eax, [ebp - 0x1e4]
push eax
mov ecx, dword [ebp - 0x1e4]
push ecx
mov edx, dword [ebp - 0x1e0]
push edx
lea eax, [ebp - 0x1dc]
push eax
push 1
lea ecx, [ebp - 0x1bc]
push ecx
mov edx, dword [ebp - 0x1c8]
push edx
call dword [ebp - 0xd0]
test eax, eax
jne 0x416531
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
jne 0x4164bb
jmp 0x416531
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4164f3
cmp dword [ebp - 0x1e0], 0
je 0x4164dc
mov eax, dword [ebp - 0x1e0]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x1e4]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x1e0], eax
jmp 0x41652c
push 9
call fcn.00406ccc
add esp, 4
push 0x2020000
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov edx, dword [ebp - 0x1cc]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0xd8]
jmp 0x41664e
jmp 0x416474
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
jne 0x416541
jmp 0x416423
mov eax, dword [ebp - 0x1e0]
mov dword [ebp - 0x1d8], eax
jmp 0x41656c
mov ecx, dword [ebp - 0x1d8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [ebp - 0x1d8]
lea eax, [edx + eax + 1]
mov dword [ebp - 0x1d8], eax
mov ecx, dword [ebp - 0x1d8]
movsx edx, byte [ecx]
test edx, edx
je 0x416603
mov eax, dword [ebp - 0x1e0]
add eax, dword [ebp - 0x1e4]
cmp dword [ebp - 0x1d8], eax
jae 0x416603
mov ecx, dword [ebp - 0x1d8]
push ecx
push str.USBVid_0529Pid_0001
call fcn.00420970
add esp, 8
test eax, eax
jne 0x4165fe
lea edx, [ebp - 0x1bc]
push edx
mov eax, dword [ebp - 0x1c8]
push eax
push 5
call dword [ebp - 0x1c4]
test eax, eax
jne 0x4165f9
push 9
call fcn.00406ccc
add esp, 4
push 0x2020000
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xd8], 0xffffffff
mov ecx, dword [ebp - 0x1cc]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0xd8]
jmp 0x41664e
jmp 0x41654f
jmp 0x41654f
cmp dword [ebp - 0x1e0], 0
je 0x416619
mov edx, dword [ebp - 0x1e0]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x416423
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x41662e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebp - 0x1c8]
push eax
call dword [ebp - 0x1d4]
mov ecx, dword [ebp - 0x1cc]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0xd8]
mov esp, ebp
pop ebp
ret