Function at 0x4058d1
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1068
call fcn.0040c750
push ebx
push esi
xor ebx, ebx
mov esi, ecx
push str.__CWinNT5::vRemove
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x28], 0x42511c
mov dword [ebp - 0x24], 0x425118
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
call fcn.004013fd
mov eax, dword [esi + 0x1c]
pop ecx
cmp eax, ebx
je 0x405c4b
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SetupDiGetClassDevsA
push eax
call edi
push str.SetupDiEnumDeviceInfo
mov dword [esi + 0x20], eax
push dword [esi + 0x1c]
call edi
push str.SetupDiGetDeviceRegistryPropertyA
mov dword [esi + 0x24], eax
push dword [esi + 0x1c]
call edi
push str.SetupDiCallClassInstaller
mov dword [esi + 0x34], eax
push dword [esi + 0x1c]
call edi
push str.SetupDiDestroyDeviceInfoList
mov dword [esi + 0x30], eax
push dword [esi + 0x1c]
call edi
mov dword [esi + 0x28], eax
mov dword [ebp - 8], ebx
cmp dword [ebp + 8], ebx
je 0x405970
push ebx
mov ecx, 0x42a0b8
call fcn.00415e93
push eax
jmp 0x405977
mov eax, dword [ebp - 8]
push dword [ebp + eax - 0x28]
lea eax, [ebp - 0x68]
push eax
call fcn.0040bb30
pop ecx
lea eax, [ebp - 0x68]
pop ecx
push 0xa
push ebx
push eax
push 0x41f500
call dword [esi + 0x20]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x4059a4
push str.SetupDiGetClassDevs___INVALID_HANDLE_VALUE
call fcn.004013fd
pop ecx
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 0x1c
push eax
push ebx
push dword [ebp - 4]
mov dword [ebp - 0xc], ebx
call dword [esi + 0x24]
test eax, eax
je 0x405ba8
lea ecx, [ebp - 0x10]
mov eax, 0x1000
push ecx
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0x1068]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x48]
push 1
push eax
push dword [ebp - 4]
call dword [esi + 0x34]
test eax, eax
jne 0x405a05
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0xd
jne 0x405bbf
push str.SetupDiGetDeviceRegistryProperty___ERROR_INVALID_DATA
call fcn.004013fd
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
je 0x405b8e
cmp byte [ebp - 0x1068], 0
lea edi, [ebp - 0x1068]
je 0x405b8e
mov eax, dword [ebp - 0x10]
lea eax, [ebp + eax - 0x1068]
cmp edi, eax
jae 0x405b8e
mov ebx, str.PCIVEN_1106
push ebx
call fcn.0040c0a0
push eax
push edi
push ebx
call fcn.0040c5df
add esp, 0x10
test eax, eax
jne 0x405a5f
push edi
call fcn.0040c0a0
cmp eax, 0x28
pop ecx
ja 0x405ac6
mov ebx, str.USBVID_040D
push ebx
call fcn.0040c0a0
push eax
push edi
push ebx
call fcn.0040c5df
add esp, 0x10
test eax, eax
jne 0x405a85
push edi
call fcn.0040c0a0
cmp eax, 0x18
pop ecx
ja 0x405ac6
mov ebx, str.USBVID_160A
push ebx
call fcn.0040c0a0
push eax
push edi
push ebx
call fcn.0040c5df
add esp, 0x10
test eax, eax
jne 0x405aab
push edi
call fcn.0040c0a0
cmp eax, 0x18
pop ecx
ja 0x405ac6
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [edi + eax + 1], 0
lea edi, [edi + eax + 1]
jne 0x405a27
jmp 0x405b8e
cmp dword [ebp + 8], 0
je 0x405b3f
mov ebx, dword [ebp + 0xc]
cmp byte [ebx], 0
je 0x405b8e
push ebx
call fcn.0040c0a0
push eax
push edi
push ebx
call fcn.0040c5df
add esp, 0x10
test eax, eax
je 0x405afa
push ebx
call fcn.0040c0a0
pop ecx
lea ebx, [ebx + eax + 1]
jmp 0x405acf
push edi
push str.vRemove:_remove__s...
call fcn.004013fd
pop ecx
lea eax, [ebp - 0x48]
pop ecx
push eax
push dword [ebp - 4]
push 5
call dword [esi + 0x30]
test eax, eax
jne 0x405b88
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0xe0000235
jne 0x405bda
push str.SetupDiCallClassInstaller:_ERROR_IN_WOW64
call fcn.004013fd
pop ecx
push edi
mov ecx, esi
call fcn.0040618b
jmp 0x405b88
push edi
push str.vRemove:_remove__s...
call fcn.004013fd
pop ecx
lea eax, [ebp - 0x48]
pop ecx
push eax
push dword [ebp - 4]
push 5
call dword [esi + 0x30]
test eax, eax
jne 0x405b7d
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0xe0000235
jne 0x405bde
push str.SetupDiCallClassInstaller:_ERROR_IN_WOW64
call fcn.004013fd
pop ecx
mov dword [ebp - 0x14], 1
mov eax, dword [ebp - 8]
inc dword [ebp + eax - 0x1c]
lea eax, [ebp + eax - 0x1c]
inc dword [0x42a138]
inc dword [ebp - 0xc]
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0xc]
push dword [ebp - 4]
call dword [esi + 0x24]
test eax, eax
jne 0x4059c1
xor ebx, ebx
cmp dword [ebp + 8], ebx
jne 0x405c21
add dword [ebp - 8], 4
mov eax, dword [ebp - 8]
cmp dword [ebp + eax - 0x28], ebx
je 0x405bee
jmp 0x40595d
call edi
cmp eax, 0x7a
jne 0x405bd3
push str.SetupDiGetDeviceRegistryProperty___ERROR_INSUFFICIENT_BUFFER
call fcn.004013fd
pop ecx
jmp 0x405c21
push str.SetupDiGetDeviceRegistryProperty___Unknown
jmp 0x405bcb
call ebx
jmp 0x405be0
call edi
push eax
push str.SetupDiCallClassInstaller_failed____u
call fcn.004013fd
pop ecx
jmp 0x405bd0
cmp dword [ebp - 0x14], ebx
je 0x405c21
cmp dword [ebp - 0x1c], ebx
je 0x405c04
push str.PCIVEN_1106
mov ecx, esi
call fcn.0040618b
cmp dword [ebp - 0x18], ebx
je 0x405c21
push str.USBVID_040D
mov ecx, esi
call fcn.0040618b
push str.USBVID_160A
mov ecx, esi
call fcn.0040618b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
mov edi, eax
call dword [esi + 0x28]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x4261d4
call fcn.004013fd
xor eax, eax
pop ecx
test edi, edi
sete al
pop edi
jmp 0x405c4e
push 1
pop eax
pop esi
pop ebx
leave
ret 8