Function at 0x40a9f4
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3cc
push ebx
mov ebx, dword [ebp + 0x10]
push esi
lea eax, [ebx + 0xcf6]
push eax
push dword [ebp + 8]
push str.CUsbDevs::PutUsbPortInfo_0x_08Ix___s_...
push 1
call fcn.004452a3
mov esi, dword [ebx + 0xfb0]
add esp, 0x10
mov dword [ebp + 0x10], esi
test esi, esi
jne 0x40aa55
push str.CUsbDevs::PutUsbPortInfo
push 0x62a
push str..CUsbDevs.cpp
push str.INT3_in__S_line__u__function__S
push 1
call fcn.004452a3
add esp, 0x14
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x40b895
cmp dword [ebx + 0xfe0], 1
mov eax, dword [ebx + 0xd48]
mov dword [ebp - 0x1c], eax
jne 0x40aa6e
mov ecx, esi
call fcn.00406f4d
mov eax, dword [esi]
push edi
lea ecx, [esi + 0x48]
push ecx
push eax
push dword [ebp + 8]
mov dword [ebp - 0xc], eax
call fcn.0042b712
and dword [esi + 0x40], 0
mov dword [esi + 0x44], eax
cmp dword [0x4f9f68], 0x602
jb 0x40acf3
and dword [ebp - 4], 0
mov eax, esi
add eax, 0x1c
mov dword [ebp - 0x10], eax
and dword [ebp - 8], 0
xor eax, eax
lea edi, [ebp - 0x30]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x12
push dword [ebp - 4]
stosw word es:[edi], ax
mov eax, dword [ebp - 0xc]
movzx edi, word [ebp - 4]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x34], eax
push str.IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES_0x_08Ix___i__compi_i___u_...
push 1
mov word [ebp - 0x28], di
call fcn.004452a3
add esp, 0x18
push 0
lea eax, [ebp - 8]
push eax
push 0x12
lea eax, [ebp - 0x34]
push eax
push 0x12
push eax
push 0x220458
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov esi, eax
movzx eax, word [ebp - 0x26]
push eax
push dword [ebp - 0x30]
push dword [ebp - 8]
push esi
call fcn.004257b7
push eax
push str.__s_ret_u_actlen_u_compport_u
push 1
call fcn.004452a3
add esp, 0x18
test esi, esi
je 0x40ac5b
mov eax, dword [ebp - 0x30]
lea ecx, [eax - 0x12]
cmp ecx, 0x207
ja 0x40ac5b
push eax
call fcn.0043f698
mov esi, eax
mov eax, dword [ebp - 0xc]
pop ecx
xor ecx, ecx
mov dword [esi], eax
mov word [esi + 0xc], di
mov word [esi + 0xe], cx
cmp dword [ebp - 0x30], 0x12
jbe 0x40abeb
push dword [ebp - 0x30]
and dword [ebp - 8], ecx
push dword [ebp - 4]
push eax
push dword [ebp + 8]
push str.IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES_0x_08Ix___i__compi_i___u_...
push 1
call fcn.004452a3
add esp, 0x18
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x30]
push esi
push dword [ebp - 0x30]
push esi
push 0x220458
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
movzx ecx, word [esi + 0xe]
lea edi, [esi + 0x10]
push edi
push ecx
push dword [esi + 4]
mov dword [ebp - 0x14], eax
push dword [ebp - 8]
push eax
call fcn.004257b7
push eax
push str.__s_ret_u_actlen_u_compport_u_at__s
push 1
call fcn.004452a3
add esp, 0x1c
cmp dword [ebp - 0x14], 0
je 0x40ac53
movzx ecx, word [esi + 0xe]
test cx, cx
je 0x40ac53
cmp dword [ebp - 4], 0
jle 0x40abeb
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
cmp word [eax + 0xe], cx
jne 0x40abeb
push edi
add eax, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x40ac3c
mov eax, dword [ebp - 0x10]
mov dword [eax + 4], esi
movzx eax, word [esi + 0xe]
test ax, ax
jbe 0x40ac1f
mov ecx, dword [0x4fc948]
movzx eax, ax
push eax
lea eax, [esi + 0x10]
push eax
call fcn.00407485
mov ecx, dword [ebp - 0x10]
mov edi, dword [ebp + 0x10]
mov dword [ecx + 0x14], eax
mov eax, dword [ebp - 4]
inc eax
mov dword [edi + 0x40], eax
jmp 0x40ac22
mov edi, dword [ebp + 0x10]
cmp word [esi + 0xe], 0
je 0x40ac6c
inc dword [ebp - 4]
add dword [ebp - 0x10], 4
cmp dword [ebp - 4], 4
jl 0x40aaa4
jmp 0x40ac69
push str._same_companion_port_reported_again____nonsense____abort
push 1
call fcn.004452a3
push esi
call fcn.0043f70d
add esp, 0xc
jmp 0x40ac69
push esi
call fcn.0043f70d
jmp 0x40ac68
push str._abort
push 1
call fcn.004452a3
pop ecx
pop ecx
mov edi, dword [ebp + 0x10]
push 0x10
pop esi
push esi
call fcn.0043f698
mov ecx, dword [ebp - 0xc]
mov dword [edi + 0x14], eax
push ecx
push dword [ebp + 8]
mov dword [eax], ecx
mov eax, dword [edi + 0x14]
mov dword [eax + 4], esi
mov eax, dword [edi + 0x14]
or dword [eax + 8], 4
push str.IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_V2_0x_08Ix___i_
push 1
call fcn.004452a3
and dword [ebp - 8], 0
mov eax, dword [edi + 0x14]
add esp, 0x14
push 0
lea ecx, [ebp - 8]
push ecx
push esi
push eax
push esi
push eax
push 0x22045c
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov esi, eax
mov eax, dword [edi + 0x14]
push dword [eax + 8]
push esi
call fcn.004257b7
push eax
push str.__s_spr0x_02X
push 1
call fcn.004452a3
add esp, 0x10
test esi, esi
jne 0x40acf3
push dword [edi + 0x14]
call fcn.0043f70d
and dword [edi + 0x14], esi
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0xc], eax
push 0x18d
xor edi, edi
lea eax, [ebp - 0x1c3]
push edi
push eax
call fcn.0043f4d8
mov eax, dword [ebp - 0xc]
mov esi, 0x18e
push esi
push eax
push dword [ebp + 8]
mov dword [ebp - 0x1c4], eax
push str.IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_0x_08Ix___i___u_...
push 1
call fcn.004452a3
add esp, 0x20
push edi
lea eax, [ebp - 8]
push eax
push esi
lea eax, [ebp - 0x1c4]
push eax
push esi
push eax
push 0x220448
push dword [ebp + 8]
mov dword [ebp - 8], edi
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
call edi
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x40ad9b
call fcn.00442f0e
push eax
push str._err_S
push 1
call fcn.004452a3
push esi
push dword [ebp - 0xc]
push dword [ebp + 8]
push str.IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_0x_08Ix___i___u_...
push 1
call fcn.004452a3
and dword [ebp - 8], 0
add esp, 0x20
push 0
lea eax, [ebp - 8]
push eax
push esi
lea eax, [ebp - 0x1c4]
push eax
push esi
push eax
push 0x22040c
push dword [ebp + 8]
call edi
mov dword [ebp - 0x14], eax
push dword [ebp - 8]
push dword [ebp - 0x14]
call fcn.004257b7
push eax
push str.__s__br_u
push 1
call fcn.004452a3
add esp, 0x10
cmp dword [ebp - 0x14], 0
je 0x40b864
cmp dword [ebp - 8], 0
je 0x40ae9c
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x40addb
push eax
call fcn.0043f70d
pop ecx
push dword [ebp - 8]
call fcn.0043f698
mov esi, eax
mov eax, dword [ebp + 0x10]
mov dword [eax + 0x10], esi
push dword [ebp - 8]
lea eax, [ebp - 0x1c4]
push eax
push esi
mov edi, esi
mov dword [ebp - 0x10], esi
call fcn.0043f542
movzx eax, byte [esi + 0x18]
add esp, 0x10
push dword [esi + 0x1b]
push eax
push dword [esi + 0x1f]
call fcn.00419610
push eax
movzx eax, byte [esi + 0x17]
push eax
call fcn.0040dfb6
push eax
movzx eax, word [esi + 6]
push eax
push str.bcdUsb0x_03x_Speed_S_ConnState_S_IsHub_i_OpenPipes_i
push 1
call fcn.004452a3
add esp, 0x1c
cmp dword [ebx + 0xfe0], 2
jne 0x40ae8e
mov eax, dword [ebx + 0xfc0]
test eax, eax
je 0x40ae4c
cmp dword [eax + 8], 0
jne 0x40ae8e
cmp dword [esi + 0x1f], 1
jne 0x40ae8e
push str.device_is_not_present_but_ConnectionStatus_is_DeviceConnected_____perform_full_enumeration_
push 1
call fcn.004452a3
pop ecx
pop ecx
push 0x4369f8
push 0x3e8
push 0x12340001
push dword [0x4fa548]
call dword [sym.imp.USER32.dll_SetTimer]
mov eax, dword [ebp + 0x10]
and dword [eax + 0x10], 0
push esi
call fcn.0043f70d
pop ecx
jmp 0x40b892
movzx eax, word [esi + 6]
mov dword [ebx + 0xfd0], eax
xor esi, esi
jmp 0x40aec1
push 0x23
call fcn.0043f698
mov edi, eax
mov eax, dword [ebp + 0x10]
push 0x23
xor esi, esi
push esi
push edi
mov dword [eax + 0x10], edi
mov dword [ebp - 0x10], edi
call fcn.0043f4d8
mov eax, dword [ebp - 0xc]
add esp, 0x10
mov dword [edi], eax
movzx eax, byte [edi + 0x18]
push eax
push dword [edi]
push dword [edi + 0x1f]
call fcn.00419610
push eax
push str.ConnectionStatus_S_ReturnedConnIdx_u_IsHub_u
push 1
call fcn.004452a3
mov eax, dword [edi + 0x1f]
add esp, 0x14
cmp eax, esi
jne 0x40af0e
cmp word [edi + 0x19], si
jne 0x40af0e
push 8
pop eax
push eax
mov dword [ebx + 0x10], eax
call fcn.0040a195
push eax
push str.DeviceType_S____next_port
push 1
call fcn.004452a3
add esp, 0xc
jmp 0x40b892
cmp eax, 1
jne 0x40af2a
xor eax, eax
cmp byte [edi + 0x18], al
sete al
dec eax
and eax, 0xfffffffd
add eax, 9
mov dword [ebx + 0x10], eax
jmp 0x40afc6
cmp eax, 3
jne 0x40af7f
cmp dword [edi], esi
jne 0x40af7f
mov eax, dword [ebp + 0x10]
cmp dword [eax + 0xc], 0x57
jne 0x40af7f
mov esi, dword [ebp - 0x1c]
mov eax, dword [esi + 0xfac]
test eax, eax
je 0x40af7f
cmp dword [eax], 0
je 0x40af7f
push str.ConnectionStatusDeviceGeneralFailure_and_returned_ConnectionIndex0____probably_non_existing_port_
push 1
call fcn.004452a3
lea eax, [esi + 0xff0]
cmp byte [eax], 0
pop ecx
pop ecx
jne 0x40af71
mov cl, byte [ebp - 0xc]
mov byte [eax], cl
jmp 0x40b892
mov al, byte [ebp - 0xc]
mov byte [esi + 0xff1], al
jmp 0x40b892
xor eax, eax
cmp byte [edi + 0x18], al
sete al
dec eax
and eax, 0xfffffffd
add eax, 0xa
mov dword [ebx + 0x10], eax
push dword [edi + 0x1f]
push str.DEVTYPE_BAD_because_ConnectionStatus_u
push 1
call fcn.004452a3
add esp, 0xc
push dword [edi + 0x1f]
call fcn.00419610
push eax
push dword [edi + 0x1f]
lea eax, [ebx + 0xc5c]
push str.Device_has_ConnectionStatus_i___s_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
xor esi, esi
push dword [ebx + 0x10]
call fcn.0040a195
push eax
push str.DeviceType_S
push 1
call fcn.004452a3
lea edi, [ebx + 0xd4c]
add esp, 0xc
cmp word [edi], si
jne 0x40b0fe
lea eax, [ebx + 0xda8]
push eax
push edi
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0042b404
test eax, eax
je 0x40b077
mov ecx, dword [0x4fc94c]
push edi
call fcn.0040187b
mov dword [ebx + 0xfc0], eax
cmp eax, esi
je 0x40b0fe
cmp dword [0x506fb4], 4
jl 0x40b040
lea ecx, [eax + 0xe34]
push ecx
push dword [eax + 4]
push str.portss_dev_is_Dev__i__s
push 4
call fcn.004452a3
add esp, 0x10
mov eax, dword [ebx + 0xfc0]
add eax, 0x1834
cmp word [eax], si
je 0x40b0fe
push eax
lea eax, [ebx + 0xcf6]
push eax
push str.Enumerating_USB_port__s___s_
push esi
push 1
push dword [0x4fac78]
call fcn.00405605
add esp, 0x18
jmp 0x40b0fe
mov eax, dword [ebx + 0xd48]
cmp eax, esi
je 0x40b0d2
add eax, 0xfc0
mov ecx, dword [eax]
cmp ecx, esi
je 0x40b0d2
cmp word [ecx + 0x2af8], si
je 0x40b0d2
mov ecx, dword [ebx + 0xfb0]
push dword [ecx]
mov eax, dword [eax]
add eax, 0x2af8
push eax
lea eax, [ebp - 0x3cc]
push str._sUSB__i_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov ecx, dword [0x4fc94c]
add esp, 0x10
lea eax, [ebp - 0x3cc]
push eax
call fcn.0040192c
mov dword [ebx + 0xfc0], eax
cmp dword [ebx + 0xfc0], esi
jne 0x40b0fe
mov eax, dword [ebx + 0xfb0]
mov eax, dword [eax + 0x10]
movzx ecx, word [eax + 0xc]
movzx eax, word [eax + 0xe]
push eax
push ecx
mov ecx, dword [0x4fc94c]
call fcn.0040175a
mov dword [ebx + 0xfc0], eax
mov eax, dword [ebx + 0x10]
cmp eax, 9
je 0x40b12c
cmp eax, 0xa
je 0x40b12c
cmp eax, 6
je 0x40b115
cmp eax, 7
jne 0x40b166
cmp word [ebx + 0x860], si
jne 0x40b166
push ebx
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0042bcae
jmp 0x40b166
cmp dword [ebx + 0xfe0], 2
je 0x40b14a
push ebx
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0042bcae
cmp dword [ebx + 0xfe0], 2
jne 0x40b160
push str.Unknown_Device
lea eax, [ebx + 0xa5c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x40b166
push ebx
call fcn.0042ca1a
mov eax, dword [ebx + 0xfc0]
cmp eax, esi
je 0x40b176
mov ecx, dword [ebx + 0x10]
mov dword [eax + 0xc], ecx
mov eax, dword [ebx + 0xfb4]
cmp eax, esi
je 0x40b1dc
mov esi, eax
lea edi, [esi + 0x48]
mov dword [ebp - 0x18], 0x10
mov eax, dword [edi]
and dword [edi - 0x40], 0
and dword [edi + 0x40], 0
test eax, eax
je 0x40b1a1
push eax
call fcn.0043f70d
pop ecx
mov eax, dword [edi + 0x80]
and dword [edi], 0
test eax, eax
je 0x40b1b5
push eax
call fcn.0043f70d
pop ecx
and dword [edi + 0x80], 0
add edi, 4
dec dword [ebp - 0x18]
jne 0x40b18c
lea edi, [esi + 0x108]
mov eax, dword [edi]
test eax, eax
je 0x40b1d7
push eax
call fcn.0043f70d
pop ecx
and dword [edi], 0
jmp 0x40b220
mov edi, 0x518
push edi
call fcn.0043f698
pop ecx
cmp eax, esi
je 0x40b1f5
mov ecx, eax
call fcn.00406ed1
jmp 0x40b1f7
xor eax, eax
push edi
mov esi, eax
push 0
push esi
mov dword [ebx + 0xfb4], eax
call fcn.0043f4d8
mov dword [esi], 1
mov dword [esi + 0x514], ebx
mov eax, dword [ebx + 0xfc0]
add esp, 0xc
mov dword [esi + 4], eax
mov edx, dword [ebp + 0xc]
cmp dword [edx + 4], 0
mov ecx, dword [ebp + 0x10]
jne 0x40b255
mov eax, dword [ecx + 0x14]
test eax, eax
je 0x40b245
test byte [eax + 0xc], 5
jne 0x40b23d
xor eax, eax
jmp 0x40b240
xor eax, eax
inc eax
mov dword [edx + 4], eax
jmp 0x40b255
mov eax, dword [ecx + 0x10]
cmp byte [eax + 0x17], 3
jb 0x40b255
mov dword [edx + 4], 1
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x40b79c
cmp dword [eax + 0x1f], 1
jne 0x40b79c
lea edi, [esi + 0x48]
mov dword [ebp + 0xc], 0x10
mov eax, dword [edi]
test eax, eax
je 0x40b284
push eax
call fcn.0043f70d
and dword [edi], 0
pop ecx
add edi, 4
dec dword [ebp + 0xc]
jne 0x40b274
mov eax, dword [ebx + 0xfc0]
test eax, eax
je 0x40b29b
mov eax, dword [eax + 0x10]
jmp 0x40b29d
xor eax, eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40b2c0
push eax
call fcn.00443efe
test eax, eax
jne 0x40b2c0
push str.device_is_gone____abort
push 2
call fcn.004452a3
pop ecx
jmp 0x40ae88
mov eax, dword [ebx + 0xfc0]
test eax, eax
je 0x40b2dc
cmp dword [eax + 0x39e4], 0
jne 0x40b2dc
mov dword [ebp - 0x1c], 1
jmp 0x40b2e0
and dword [ebp - 0x1c], 0
mov eax, dword [esi + 0x514]
mov eax, dword [eax + 0xfb0]
mov eax, dword [eax + 0x10]
movzx edi, byte [eax + 0x15]
mov dword [ebp - 4], edi
test edi, edi
jne 0x40b338
push str.DEVTYPE_BAD_because_bNumConfigurations_is_0
push 1
call fcn.004452a3
mov ecx, dword [ebp - 0x10]
xor eax, eax
cmp byte [ecx + 0x18], al
push str.bNumConfigurations_is_0
sete al
add ebx, 0xc5c
push ebx
dec eax
and eax, 0xfffffffd
add eax, 0xa
mov dword [ebx - 0xc4c], eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x40b892
cmp edi, 0x10
jle 0x40b355
push 0x10
push edi
push str.bNumConfigurations_is__i____cut_to__i
push 1
call fcn.004452a3
add esp, 0x10
push 0x10
pop edi
mov dword [ebp - 4], edi
mov eax, 0x44b285
cmp edi, 1
je 0x40b364
mov eax, 0x44be5c
push eax
push edi
push str.getting_ConfigDescritor_for__i_configuration_S...
push 3
call fcn.004452a3
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetTickCount]
and dword [ebp + 0xc], 0
mov dword [ebp - 0x20], eax
test edi, edi
jle 0x40b45c
lea eax, [esi + 0x48]
mov dword [ebp - 0x18], eax
push dword [esi + 4]
push dword [ebp - 0x18]
push dword [ebp + 0xc]
push 2
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0042bfba
cmp dword [ebp - 0x14], 0
mov edi, eax
je 0x40b3be
push dword [ebp - 0x14]
call fcn.00443efe
test eax, eax
je 0x40b2ae
cmp dword [0x4fa50c], 0
jne 0x40b443
cmp dword [ebp - 0x1c], 0
je 0x40b443
cmp edi, 0xaa
je 0x40b3da
cmp edi, 0x15
jne 0x40b443
cmp dword [esi], 1
jne 0x40b443
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x20]
cmp eax, 0x1388
jae 0x40b443
push edi
call fcn.00440118
push eax
push dword [ebp + 0xc]
push str.GetConfigDescriptor_i__err_S
push 1
call fcn.004452a3
add esp, 0x10
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x14], 0
je 0x40b429
push dword [ebp - 0x14]
call fcn.00443efe
test eax, eax
je 0x40b2ae
push dword [esi + 4]
push dword [ebp - 0x18]
push dword [ebp + 0xc]
push 2
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0042bfba
mov edi, eax
jmp 0x40b3cd
mov eax, dword [ebp - 0x18]
inc dword [ebp + 0xc]
add dword [ebp - 0x18], 4
mov dword [eax - 0x40], edi
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 4]
jl 0x40b390
mov eax, dword [esi + 8]
test eax, eax
jne 0x40b46c
cmp dword [esi + 0x48], eax
jne 0x40b5a7
push eax
call fcn.00440118
push eax
push str.DEVTYPE_BAD_because_GetConfigDescriptor0_failed_with_err_S
push 1
call fcn.004452a3
mov eax, dword [esi + 8]
add esp, 0xc
test eax, eax
je 0x40b4a7
push eax
lea edi, [ebx + 0xc5c]
call fcn.00440118
push eax
push str.IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION_failed_with_err_s
push edi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x40b4bb
lea eax, [ebx + 0xc5c]
push str.IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION_failed
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
pop ecx
pop ecx
and dword [esi + 0x48], 0
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x10]
xor ecx, ecx
cmp byte [eax + 0x18], cl
sete cl
dec ecx
and ecx, 0xfffffffd
add ecx, 0xa
mov dword [ebx + 0x10], ecx
cmp dword [0x4fa50c], 0
jne 0x40b59d
cmp dword [esi + 8], 0
je 0x40b59d
mov edi, dword [ebx + 0xfc0]
test edi, edi
je 0x40b59d
cmp dword [edi], 1
jne 0x40b59d
cmp dword [edi + 0x39e4], 0
jne 0x40b59d
push 0
lea eax, [ebp - 0x20]
push eax
lea eax, [edi + 0x39e8]
push eax
push 0
push 0x1f
push dword [edi + 0x10]
mov dword [ebp - 0x20], 0x38
call dword [sym.imp.CFGMGR32.dll_CM_Get_DevNode_Registry_PropertyW]
test eax, eax
jne 0x40b59d
cmp dword [edi + 0x39ec], 1
jne 0x40b59d
xor edi, edi
push edi
push esi
push 0x407d44
call fcn.00425403
push 0x3e8
push eax
mov dword [ebx + 0x1000], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40b58b
lea eax, [ebp + 0xc]
push eax
push dword [ebx + 0x1000]
mov dword [ebp + 0xc], 0x1f
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x40b58b
cmp dword [ebp + 0xc], edi
jne 0x40b58b
mov byte [ebx + 0xc5c], 0
push dword [ebx + 0x1000]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x1000], edi
cmp dword [esi + 0x48], 0
je 0x40b79c
mov eax, dword [ebp - 0x10]
movzx eax, word [eax + 6]
mov ecx, 0x200
cmp ax, cx
jb 0x40b6ac
mov ecx, 0x300
cmp ax, cx
jae 0x40b6ac
cmp byte [ebx + 0xce4], 3
jae 0x40b6ac
mov eax, dword [ebp - 0x10]
mov al, byte [eax + 0x17]
test al, al
jne 0x40b5ea
cmp dword [0x4fc968], 0
jne 0x40b5f7
cmp al, 1
jne 0x40b614
cmp dword [0x4fc96c], 0
je 0x40b614
push str.request_for_device_qualifier_descriptor_skipped
push 3
call fcn.004452a3
mov eax, dword [ebp + 0x10]
pop ecx
pop ecx
mov dword [eax + 0x1c], 0x2cd
jmp 0x40b6ac
push dword [ebx + 0xfc0]
xor eax, eax
mov byte [ebp - 0x2c], 0
lea edi, [ebp - 0x2b]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosb byte es:[edi], al
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0042b4d1
mov edi, dword [ebp + 0x10]
mov dword [edi + 0x1c], eax
test eax, eax
jne 0x40b66e
cmp byte [ebp - 0x2b], 6
jne 0x40b6ac
mov eax, dword [edi + 0x18]
test eax, eax
je 0x40b653
push eax
call fcn.0043f70d
pop ecx
push 0xa
call fcn.0043f698
push 0xa
lea ecx, [ebp - 0x2c]
push ecx
push eax
mov dword [edi + 0x18], eax
call fcn.0043f542
add esp, 0x10
jmp 0x40b6ac
cmp eax, 0x102
jne 0x40b6a4
lea eax, [ebx + 0xcf6]
push eax
lea eax, [ebx + 0x860]
push eax
push str.Timeout_requesting_Device_Qualifier_Descriptor_from__s_at__s
push 0xea60
push 1
push dword [0x4fac78]
call fcn.00405605
add esp, 0x18
push 0xbb8
jmp 0x40b6a6
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x10]
movzx eax, word [eax + 6]
add eax, 0xfffffe00
mov ecx, 0xff
cmp ax, cx
ja 0x40b776
mov eax, dword [esi + 0x514]
mov eax, dword [eax + 0xfb0]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x40b776
mov al, byte [eax + 8]
test al, al
jbe 0x40b776
movzx eax, al
push 0x10
pop edi
cmp eax, edi
mov dword [ebp - 4], eax
jle 0x40b70c
push edi
push eax
push str.bNumConfigurations_is__i____cut_to__i
push 1
call fcn.004452a3
add esp, 0x10
mov dword [ebp - 4], edi
lea edi, [esi + 0xc8]
mov dword [ebp + 0xc], 0x10
mov eax, dword [edi]
test eax, eax
je 0x40b729
push eax
call fcn.0043f70d
and dword [edi], 0
pop ecx
add edi, 4
dec dword [ebp + 0xc]
jne 0x40b719
and dword [ebp + 0xc], 0
cmp dword [ebp - 4], 0
jle 0x40b776
lea edi, [esi + 0x88]
push dword [ebx + 0xfc0]
lea eax, [edi + 0x40]
push eax
push dword [ebp + 0xc]
mov eax, dword [esi + 0x514]
mov eax, dword [eax + 0xfb0]
push 7
push dword [eax]
push dword [ebp + 8]
call fcn.0042bfba
inc dword [ebp + 0xc]
mov dword [edi], eax
mov eax, dword [ebp + 0xc]
add edi, 4
cmp eax, dword [ebp - 4]
jl 0x40b741
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x40b79c
mov ecx, 0x200
cmp word [eax + 6], cx
jbe 0x40b79c
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0042b579
mov dword [esi + 0x108], eax
push dword [esi + 0x514]
push str.pUsbDev__pTNI0x_08Ix
push 4
call fcn.004452a3
add esp, 0xc
call fcn.0044515b
mov eax, dword [esi + 0x514]
push dword [eax + 0xfc0]
push str.pUsbDev__pTNI__pDeviceInfo0x_08Ix
push 4
call fcn.004452a3
add esp, 0xc
call fcn.0044515b
mov eax, dword [esi + 0x514]
mov eax, dword [eax + 0xfc0]
test eax, eax
je 0x40b7fc
push dword [eax]
push str.pUsbDev__pTNI__pDeviceInfo__bGood_i
push 4
call fcn.004452a3
add esp, 0xc
call fcn.0044515b
mov esi, dword [esi + 0x514]
mov eax, dword [esi + 0xfc0]
test eax, eax
je 0x40b817
cmp dword [eax], 1
jne 0x40b817
mov ecx, dword [esi + 0x10]
mov dword [eax + 0xc], ecx
mov eax, dword [ebp - 0x10]
mov al, byte [eax + 0x17]
mov byte [ebx + 0xce4], al
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x40b848
mov eax, dword [eax + 0xc]
test al, 4
je 0x40b83d
mov byte [ebx + 0xce4], 4
jmp 0x40b848
test al, 1
je 0x40b848
mov byte [ebx + 0xce4], 3
mov eax, dword [ebx + 0xfac]
test eax, eax
je 0x40b85f
cmp byte [ebx + 0xce4], 3
sbb ecx, ecx
inc ecx
mov dword [eax + 4], ecx
xor eax, eax
inc eax
jmp 0x40b894
call fcn.00442f0e
push eax
lea eax, [ebx + 0xc5c]
push str.IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_failed_with__s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov dword [ebx + 0x10], 0xb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 8], eax
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0xc