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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3cc
push ebx
push esi
mov esi, dword [ebp + 0x10]
lea eax, [esi + 0xd0e]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x1c], ecx
push str.CUsbDevs::PutUsbPortInfo_0x_08Ix___s_...
push 1
call fcn.0044c79b
mov ebx, dword [esi + 0xfc8]
add esp, 0x10
mov dword [ebp - 0x18], ebx
test ebx, ebx
jne 0x40bee1
push str.CUsbDevs::PutUsbPortInfo
push 0x766
push str..CUsbDevs.cpp
push str.INT3_in__S_line__u__function__S
push 1
call fcn.0044c79b
add esp, 0x14
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x40cd88
cmp dword [esi + 0xfe8], 1
mov eax, dword [esi + 0xd60]
mov dword [ebp - 0x14], eax
jne 0x40befa
mov ecx, ebx
call fcn.0040761d
mov eax, dword [ebx]
push edi
lea ecx, [ebx + 0x48]
push ecx
push eax
push dword [ebp + 8]
mov dword [ebp - 0xc], eax
call fcn.0042f625
and dword [ebx + 0x40], 0
mov dword [ebx + 0x44], eax
cmp dword [0x508720], 0x602
jb 0x40c17b
and dword [ebp - 4], 0
lea eax, [ebx + 0x1c]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0xc]
and dword [ebp + 0x10], 0
xor eax, eax
lea edi, [ebp - 0x30]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x12
push dword [ebp - 4]
stosd dword es:[edi], eax
push ecx
push dword [ebp + 8]
stosw word es:[edi], ax
movzx eax, word [ebp - 4]
push str.IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES_0x_08Ix___i__compi_i___u_...
push 1
mov dword [ebp - 0x34], ecx
mov word [ebp - 0x28], ax
call fcn.0044c79b
add esp, 0x18
push 0
lea eax, [ebp + 0x10]
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 edi, eax
movzx eax, word [ebp - 0x26]
push eax
push dword [ebp - 0x30]
push dword [ebp + 0x10]
push edi
call fcn.004284b8
push eax
push str.__s_ret_u_actlen_u_compport_u
push 1
call fcn.0044c79b
add esp, 0x18
test edi, edi
je 0x40c0e6
mov eax, dword [ebp - 0x30]
lea ecx, [eax - 0x12]
cmp ecx, 0x207
ja 0x40c0e6
push eax
call fcn.00446ca6
mov edi, eax
movzx eax, word [ebp - 4]
mov word [edi + 0xc], ax
pop ecx
mov ecx, dword [ebp - 0xc]
xor eax, eax
mov dword [edi], ecx
mov word [edi + 0xe], ax
cmp dword [ebp - 0x30], 0x12
jbe 0x40c07e
push dword [ebp - 0x30]
and dword [ebp + 0x10], eax
push dword [ebp - 4]
push ecx
push dword [ebp + 8]
push str.IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES_0x_08Ix___i__compi_i___u_...
push 1
call fcn.0044c79b
add esp, 0x18
push 0
lea eax, [ebp + 0x10]
push eax
push dword [ebp - 0x30]
push edi
push dword [ebp - 0x30]
push edi
push 0x220458
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x10], eax
lea eax, [edi + 0x10]
push eax
movzx eax, word [edi + 0xe]
push eax
push dword [edi + 4]
push dword [ebp + 0x10]
push dword [ebp - 0x10]
call fcn.004284b8
push eax
push str.__s_ret_u_actlen_u_compport_u_at__s
push 1
call fcn.0044c79b
add esp, 0x1c
cmp dword [ebp - 0x10], 0
je 0x40c0de
movzx ecx, word [edi + 0xe]
test cx, cx
je 0x40c0de
cmp dword [ebp - 4], 0
jle 0x40c07e
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp word [eax + 0xe], cx
jne 0x40c07e
lea ecx, [edi + 0x10]
push ecx
add eax, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x40c0c7
mov eax, dword [ebp - 8]
mov dword [eax + 4], edi
movzx eax, word [edi + 0xe]
test ax, ax
jbe 0x40c0ad
mov ecx, dword [0x50b36c]
movzx eax, ax
push eax
lea eax, [edi + 0x10]
push eax
call fcn.00407be5
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x14], eax
mov eax, dword [ebp - 4]
inc eax
mov dword [ebx + 0x40], eax
cmp word [edi + 0xe], 0
je 0x40c0f4
inc dword [ebp - 4]
add dword [ebp - 8], 4
cmp dword [ebp - 4], 4
jl 0x40bf2e
jmp 0x40c0f4
push str._same_companion_port_reported_again____nonsense____abort
push 1
call fcn.0044c79b
push edi
call fcn.00446ce1
add esp, 0xc
jmp 0x40c0f4
push edi
call fcn.00446ce1
jmp 0x40c0f3
push str._abort
push 1
call fcn.0044c79b
pop ecx
pop ecx
push 0x10
pop edi
push edi
call fcn.00446ca6
mov ecx, dword [ebp - 0xc]
mov dword [ebx + 0x14], eax
push ecx
push dword [ebp + 8]
mov dword [eax], ecx
mov eax, dword [ebx + 0x14]
mov dword [eax + 4], edi
mov eax, dword [ebx + 0x14]
or dword [eax + 8], 4
push str.IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_V2_0x_08Ix___i_
push 1
call fcn.0044c79b
and dword [ebp + 0x10], 0
mov eax, dword [ebx + 0x14]
add esp, 0x14
push 0
lea ecx, [ebp + 0x10]
push ecx
push edi
push eax
push edi
push eax
push 0x22045c
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov edi, eax
mov eax, dword [ebx + 0x14]
push dword [eax + 8]
push edi
call fcn.004284b8
push eax
push str.__s_spr0x_02X
push 1
call fcn.0044c79b
add esp, 0x10
test edi, edi
jne 0x40c17b
push dword [ebx + 0x14]
call fcn.00446ce1
and dword [ebx + 0x14], edi
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0xc], eax
and dword [ebp - 8], 0
push 0x18d
lea eax, [ebp - 0x1c3]
push 0
push eax
mov edi, 0x18e
call fcn.00446b72
mov eax, dword [ebp - 0xc]
push edi
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.0044c79b
and dword [ebp + 0x10], 0
add esp, 0x20
push 0
lea eax, [ebp + 0x10]
push eax
push edi
lea eax, [ebp - 0x1c4]
push eax
push edi
push eax
push 0x220448
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x40c22a
call fcn.00449d52
push eax
push str._err_S
push 1
call fcn.0044c79b
push edi
push dword [ebp - 0xc]
push dword [ebp + 8]
push str.IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_0x_08Ix___i___u_...
push 1
call fcn.0044c79b
and dword [ebp + 0x10], 0
add esp, 0x20
push 0
lea eax, [ebp + 0x10]
push eax
push edi
lea eax, [ebp - 0x1c4]
push eax
push edi
push eax
push 0x22040c
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x10], eax
push dword [ebp + 0x10]
push dword [ebp - 0x10]
call fcn.004284b8
push eax
push str.__s__br_u
push 1
call fcn.0044c79b
add esp, 0x10
cmp dword [ebp - 0x10], 0
je 0x40cd5a
cmp dword [ebp + 0x10], 0
je 0x40c339
cmp dword [ebp + 0x10], edi
ja 0x40c339
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x40c270
push eax
call fcn.00446ce1
pop ecx
push dword [ebp + 0x10]
call fcn.00446ca6
mov edi, eax
mov dword [ebx + 0x10], edi
push dword [ebp + 0x10]
lea eax, [ebp - 0x1c4]
push eax
push edi
mov dword [ebp - 4], edi
call fcn.00446bdc
movzx eax, byte [edi + 0x15]
add esp, 0x10
push eax
push dword [edi + 0x1b]
movzx eax, byte [edi + 0x18]
push eax
push dword [edi + 0x1f]
call fcn.0041bc60
push eax
movzx eax, byte [edi + 0x17]
push eax
call fcn.0041002f
push eax
movzx eax, word [edi + 6]
push eax
push str.bcdUsb0x_03x_Speed_S_ConnState_S_IsHub_i_OpenPipes_i_NumConfig_i
push 1
call fcn.0044c79b
add esp, 0x20
cmp dword [esi + 0xfe8], 2
jne 0x40c2f5
mov eax, dword [esi + 0xfd0]
test eax, eax
je 0x40c2e1
cmp dword [eax + 8], 0
jne 0x40c2f5
cmp dword [edi + 0x1f], 1
jne 0x40c2f5
push str.device_is_not_present_but_ConnectionStatus_is_DeviceConnected__maybe_restarted
push 1
call fcn.0044c79b
pop ecx
pop ecx
cmp dword [esi + 0xfe8], 1
movzx eax, word [edi + 6]
mov dword [esi + 0xfd4], eax
jne 0x40c35a
cmp byte [edi + 0x15], 0
jne 0x40c35a
cmp dword [ebp - 8], 0
jne 0x40c35a
push str.bNumConfigurations0____try_again_in_500ms
push 3
call fcn.0044c79b
pop ecx
pop ecx
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 8], 1
jmp 0x40c17f
push 0x23
call fcn.00446ca6
push 0x23
mov edi, eax
push 0
push edi
mov dword [ebx + 0x10], edi
mov dword [ebp - 4], eax
call fcn.00446b72
mov eax, dword [ebp - 0xc]
add esp, 0x10
mov dword [edi], eax
mov edi, dword [ebp - 4]
movzx eax, byte [edi + 0x18]
push eax
push dword [edi]
push dword [edi + 0x1f]
call fcn.0041bc60
push eax
push str.ConnectionStatus_S_ReturnedConnIdx_u_IsHub_u
push 1
call fcn.0044c79b
mov byte [esi + 0xc74], 0
mov dword [esi + 0x14], 0xb
mov eax, dword [edi + 0x1f]
add esp, 0x14
test eax, eax
jne 0x40c397
cmp word [edi + 0x19], ax
je 0x40c3e8
cmp eax, 1
je 0x40c409
cmp eax, 3
jne 0x40c3be
cmp dword [edi], 0
jne 0x40c3be
cmp dword [ebx + 0xc], 0x57
jne 0x40c3be
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xfc4]
test eax, eax
je 0x40c3be
cmp dword [eax], 0
jne 0x40c41d
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x10], 0
je 0x40c455
cmp dword [ebp - 8], 3
jge 0x40c455
push 0x14d
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp - 8]
jmp 0x40c17f
push 8
pop eax
push eax
mov dword [esi + 0x14], eax
call fcn.0040b33f
push eax
push str.DeviceType_S____next_port
push 1
call fcn.0044c79b
add esp, 0xc
jmp 0x40cd85
xor eax, eax
cmp byte [edi + 0x18], al
sete al
dec eax
and eax, 0xfffffffd
add eax, 9
mov dword [esi + 0x14], eax
jmp 0x40c49a
push str.ConnectionStatusDeviceGeneralFailure_and_returned_ConnectionIndex0____probably_non_existing_port_
push 1
call fcn.0044c79b
pop ecx
pop ecx
mov ecx, dword [ebp - 0x14]
lea eax, [ecx + 0xffc]
cmp byte [eax], 0
jne 0x40c440
mov cl, byte [ebp - 0xc]
mov byte [eax], cl
jmp 0x40c449
mov al, byte [ebp - 0xc]
mov byte [ecx + 0xffd], al
mov dword [esi + 0x14], 0xa
jmp 0x40cd85
xor eax, eax
cmp byte [edi + 0x18], al
sete al
dec eax
and eax, 0xfffffffd
add eax, 0xa
mov dword [esi + 0x14], eax
push dword [edi + 0x1f]
push str.DEVTYPE_BAD_because_ConnectionStatus_u
push 1
call fcn.0044c79b
add esp, 0xc
push dword [edi + 0x1f]
call fcn.0041bc60
push eax
push dword [edi + 0x1f]
lea eax, [esi + 0xc74]
push str.Device_has_ConnectionStatus_i___s_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push dword [esi + 0x14]
call fcn.0040b33f
push eax
push str.DeviceType_S
push 1
call fcn.0044c79b
lea edi, [esi + 0xd64]
xor ebx, ebx
add esp, 0xc
cmp word [edi], bx
jne 0x40c5d4
lea eax, [esi + 0xdc0]
push eax
push edi
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0042f317
test eax, eax
je 0x40c54d
mov ecx, dword [0x50b370]
push edi
call fcn.00401891
mov dword [esi + 0xfd0], eax
cmp eax, ebx
je 0x40c5d4
cmp dword [0x515894], 4
jl 0x40c516
lea ecx, [eax + 0xe38]
push ecx
push dword [eax + 4]
push str.portss_dev_is_Dev__i__s
push 4
call fcn.0044c79b
add esp, 0x10
mov eax, dword [esi + 0xfd0]
add eax, 0x1838
cmp word [eax], bx
je 0x40c5d4
push eax
lea eax, [esi + 0xd0e]
push eax
push str.Enumerating_USB_port__s___s_
push ebx
push 1
push dword [0x509698]
call fcn.00405dc1
add esp, 0x18
jmp 0x40c5d4
mov eax, dword [esi + 0xd60]
cmp eax, ebx
je 0x40c5a8
add eax, 0xfd0
mov ecx, dword [eax]
cmp ecx, ebx
je 0x40c5a8
cmp word [ecx + 0x2afc], bx
je 0x40c5a8
mov ecx, dword [esi + 0xfc8]
push dword [ecx]
mov eax, dword [eax]
add eax, 0x2afc
push eax
lea eax, [ebp - 0x3cc]
push str._sUSB__i_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov ecx, dword [0x50b370]
add esp, 0x10
lea eax, [ebp - 0x3cc]
push eax
call fcn.00401942
mov dword [esi + 0xfd0], eax
cmp dword [esi + 0xfd0], ebx
jne 0x40c5d4
mov eax, dword [esi + 0xfc8]
mov eax, dword [eax + 0x10]
movzx ecx, word [eax + 0xc]
movzx eax, word [eax + 0xe]
push eax
push ecx
mov ecx, dword [0x50b370]
call fcn.0040175d
mov dword [esi + 0xfd0], eax
mov eax, dword [esi + 0xfd0]
cmp eax, ebx
je 0x40c5eb
add eax, 0x1c38
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [esi + 0x14]
cmp eax, 9
je 0x40c621
cmp eax, 0xa
je 0x40c621
cmp eax, 6
je 0x40c602
cmp eax, 7
jne 0x40c663
cmp dword [0x4a0b1c], ebx
je 0x40c663
cmp word [esi + 0x868], bx
jne 0x40c663
push esi
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0042fc26
jmp 0x40c663
cmp dword [esi + 0xfe8], 2
je 0x40c647
cmp dword [0x4a0b1c], ebx
je 0x40c63e
push esi
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0042fc26
cmp dword [esi + 0xfe8], 2
jne 0x40c65d
push str.Unknown_Device
lea eax, [esi + 0xa6c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x40c663
push esi
call fcn.00430ab5
mov eax, dword [esi + 0xfd0]
cmp eax, ebx
je 0x40c673
mov ecx, dword [esi + 0x14]
mov dword [eax + 0xc], ecx
mov eax, dword [esi + 0xfcc]
cmp eax, ebx
je 0x40c6d9
mov ebx, eax
lea edi, [ebx + 0x48]
mov dword [ebp - 0x14], 0x10
mov eax, dword [edi]
and dword [edi - 0x40], 0
and dword [edi + 0x40], 0
test eax, eax
je 0x40c69e
push eax
call fcn.00446ce1
pop ecx
mov eax, dword [edi + 0x80]
and dword [edi], 0
test eax, eax
je 0x40c6b2
push eax
call fcn.00446ce1
pop ecx
and dword [edi + 0x80], 0
add edi, 4
dec dword [ebp - 0x14]
jne 0x40c689
lea edi, [ebx + 0x108]
mov eax, dword [edi]
test eax, eax
je 0x40c6d4
push eax
call fcn.00446ce1
pop ecx
and dword [edi], 0
jmp 0x40c71d
mov edi, 0x520
push edi
call fcn.00446ca6
pop ecx
cmp eax, ebx
je 0x40c6f2
mov ecx, eax
call fcn.004075a1
jmp 0x40c6f4
xor eax, eax
push edi
mov ebx, eax
push 0
push ebx
mov dword [esi + 0xfcc], eax
call fcn.00446b72
mov dword [ebx], 1
mov dword [ebx + 0x51c], esi
mov eax, dword [esi + 0xfd0]
add esp, 0xc
mov dword [ebx + 4], eax
mov edx, dword [ebp + 0xc]
cmp dword [edx + 4], 0
mov ecx, dword [ebp - 0x18]
jne 0x40c752
mov eax, dword [ecx + 0x14]
test eax, eax
je 0x40c742
test byte [eax + 0xc], 5
jne 0x40c73a
xor eax, eax
jmp 0x40c73d
xor eax, eax
inc eax
mov dword [edx + 4], eax
jmp 0x40c752
mov eax, dword [ecx + 0x10]
cmp byte [eax + 0x17], 3
jb 0x40c752
mov dword [edx + 4], 1
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x40cc92
cmp dword [eax + 0x1f], 1
jne 0x40cc92
lea edi, [ebx + 0x48]
mov dword [ebp + 0xc], 0x10
mov eax, dword [edi]
test eax, eax
je 0x40c781
push eax
call fcn.00446ce1
and dword [edi], 0
pop ecx
add edi, 4
dec dword [ebp + 0xc]
jne 0x40c771
mov eax, dword [esi + 0xfd0]
test eax, eax
je 0x40c798
mov eax, dword [eax + 0x10]
jmp 0x40c79a
xor eax, eax
mov dword [ebp - 8], eax
test eax, eax
je 0x40c7be
push eax
call fcn.0044ae0d
test eax, eax
jne 0x40c7be
push str.device_is_gone____abort
push 2
call fcn.0044c79b
pop ecx
pop ecx
jmp 0x40cd85
mov eax, dword [esi + 0xfd0]
test eax, eax
je 0x40c7da
cmp dword [eax + 0x39f4], 0
jne 0x40c7da
mov dword [ebp - 0x1c], 1
jmp 0x40c7de
and dword [ebp - 0x1c], 0
mov eax, dword [ebx + 0x51c]
mov eax, dword [eax + 0xfc8]
mov eax, dword [eax + 0x10]
movzx edi, byte [eax + 0x15]
mov dword [ebp - 0x10], edi
test edi, edi
jne 0x40c836
push str.DEVTYPE_BAD_because_bNumConfigurations_is_0
push 1
call fcn.0044c79b
mov ecx, dword [ebp - 4]
xor eax, eax
cmp byte [ecx + 0x18], al
push str.bNumConfigurations_is_0
sete al
add esi, 0xc74
push esi
dec eax
and eax, 0xfffffffd
add eax, 0xa
mov dword [esi - 0xc60], eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x40cd85
cmp edi, 0x10
jle 0x40c853
push 0x10
push edi
push str.bNumConfigurations_is__i____cut_to__i
push 1
call fcn.0044c79b
add esp, 0x10
push 0x10
pop edi
mov dword [ebp - 0x10], edi
mov eax, 0x452971
cmp edi, 1
je 0x40c862
mov eax, 0x4534a0
push eax
push edi
push str.getting_ConfigDescritor_for__i_configuration_S...
push 3
call fcn.0044c79b
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetTickCount]
and dword [ebp + 0xc], 0
mov dword [ebp - 0x20], eax
test edi, edi
jle 0x40c95a
lea eax, [ebx + 0x48]
mov dword [ebp - 0x14], eax
push dword [ebx + 4]
push dword [ebp - 0x14]
push dword [ebp + 0xc]
push 2
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0042ffd8
cmp dword [ebp - 8], 0
mov edi, eax
je 0x40c8bc
push dword [ebp - 8]
call fcn.0044ae0d
test eax, eax
je 0x40c7ab
cmp dword [0x508cd8], 0
jne 0x40c941
cmp dword [ebp - 0x1c], 0
je 0x40c941
cmp edi, 0xaa
je 0x40c8d8
cmp edi, 0x15
jne 0x40c941
cmp dword [ebx], 1
jne 0x40c941
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x20]
cmp eax, 0x1388
jae 0x40c941
push edi
call fcn.00447eb9
push eax
push dword [ebp + 0xc]
push str.GetConfigDescriptor_i__err_S
push 1
call fcn.0044c79b
add esp, 0x10
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 8], 0
je 0x40c927
push dword [ebp - 8]
call fcn.0044ae0d
test eax, eax
je 0x40c7ab
push dword [ebx + 4]
push dword [ebp - 0x14]
push dword [ebp + 0xc]
push 2
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0042ffd8
mov edi, eax
jmp 0x40c8cb
mov eax, dword [ebp - 0x14]
inc dword [ebp + 0xc]
add dword [ebp - 0x14], 4
mov dword [eax - 0x40], edi
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 0x10]
jl 0x40c88e
mov eax, dword [ebx + 8]
test eax, eax
jne 0x40c96a
cmp dword [ebx + 0x48], eax
jne 0x40caa5
push eax
call fcn.00447eb9
push eax
push str.DEVTYPE_BAD_because_GetConfigDescriptor0_failed_with_err_S
push 1
call fcn.0044c79b
mov eax, dword [ebx + 8]
add esp, 0xc
test eax, eax
je 0x40c9a5
push eax
lea edi, [esi + 0xc74]
call fcn.00447eb9
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 0x40c9b9
lea eax, [esi + 0xc74]
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 [ebx + 0x48], 0
mov eax, dword [ebp - 0x18]
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 [esi + 0x14], ecx
cmp dword [0x508cd8], 0
jne 0x40ca9b
cmp dword [ebx + 8], 0
je 0x40ca9b
mov edi, dword [esi + 0xfd0]
test edi, edi
je 0x40ca9b
cmp dword [edi], 1
jne 0x40ca9b
cmp dword [edi + 0x39f4], 0
jne 0x40ca9b
push 0
lea eax, [ebp - 0x20]
push eax
lea eax, [edi + 0x39f8]
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 0x40ca9b
cmp dword [edi + 0x39fc], 1
jne 0x40ca9b
xor edi, edi
push edi
push ebx
push 0x4086a8
call fcn.0042813c
push 0x3e8
push eax
mov dword [esi + 0x1010], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40ca89
lea eax, [ebp + 0xc]
push eax
push dword [esi + 0x1010]
mov dword [ebp + 0xc], 0x1f
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x40ca89
cmp dword [ebp + 0xc], edi
jne 0x40ca89
mov byte [esi + 0xc74], 0
push dword [esi + 0x1010]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x1010], edi
cmp dword [ebx + 0x48], 0
je 0x40cc92
mov eax, dword [ebp - 4]
movzx eax, word [eax + 6]
mov ecx, 0x200
cmp ax, cx
jb 0x40cbac
mov ecx, 0x300
cmp ax, cx
jae 0x40cbac
cmp byte [esi + 0xcfc], 3
jae 0x40cbac
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x17]
test al, al
jne 0x40cae8
cmp dword [0x50b38c], 0
jne 0x40caf5
cmp al, 1
jne 0x40cb12
cmp dword [0x50b390], 0
je 0x40cb12
push str.request_for_device_qualifier_descriptor_skipped
push 3
call fcn.0044c79b
mov eax, dword [ebp - 0x18]
pop ecx
pop ecx
mov dword [eax + 0x1c], 0x2cd
jmp 0x40cbac
push dword [esi + 0xfd0]
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.0042f3e4
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 0x1c], eax
test eax, eax
jne 0x40cb6e
cmp byte [ebp - 0x2b], 6
jne 0x40cbac
mov edi, ecx
mov eax, dword [edi + 0x18]
test eax, eax
je 0x40cb53
push eax
call fcn.00446ce1
pop ecx
push 0xa
call fcn.00446ca6
push 0xa
lea ecx, [ebp - 0x2c]
push ecx
push eax
mov dword [edi + 0x18], eax
call fcn.00446bdc
add esp, 0x10
jmp 0x40cbac
cmp eax, 0x102
jne 0x40cba4
lea eax, [esi + 0xd0e]
push eax
lea eax, [esi + 0x868]
push eax
push str.Timeout_requesting_Device_Qualifier_Descriptor_from__s_at__s
push 0xea60
push 1
push dword [0x509698]
call fcn.00405dc1
add esp, 0x18
push 0xbb8
jmp 0x40cba6
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 4]
movzx eax, word [eax + 6]
add eax, 0xfffffe00
mov ecx, 0xff
cmp ax, cx
ja 0x40cc73
mov eax, dword [ebx + 0x51c]
mov eax, dword [eax + 0xfc8]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x40cc73
mov al, byte [eax + 8]
test al, al
jbe 0x40cc73
movzx eax, al
push 0x10
pop edi
cmp eax, edi
mov dword [ebp - 0x10], eax
jle 0x40cc09
push edi
push eax
push str.bNumConfigurations_is__i____cut_to__i
push 1
call fcn.0044c79b
add esp, 0x10
mov dword [ebp - 0x10], edi
lea edi, [ebx + 0xc8]
mov dword [ebp + 0xc], 0x10
mov eax, dword [edi]
test eax, eax
je 0x40cc26
push eax
call fcn.00446ce1
and dword [edi], 0
pop ecx
add edi, 4
dec dword [ebp + 0xc]
jne 0x40cc16
and dword [ebp + 0xc], 0
cmp dword [ebp - 0x10], 0
jle 0x40cc73
lea edi, [ebx + 0x88]
push dword [esi + 0xfd0]
lea eax, [edi + 0x40]
push eax
push dword [ebp + 0xc]
mov eax, dword [ebx + 0x51c]
mov eax, dword [eax + 0xfc8]
push 7
push dword [eax]
push dword [ebp + 8]
call fcn.0042ffd8
inc dword [ebp + 0xc]
mov dword [edi], eax
mov eax, dword [ebp + 0xc]
add edi, 4
cmp eax, dword [ebp - 0x10]
jl 0x40cc3e
mov ecx, dword [ebp - 4]
mov eax, 0x200
cmp word [ecx + 6], ax
jb 0x40cc92
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0042f48c
mov dword [ebx + 0x108], eax
push dword [ebx + 0x51c]
push str.pUsbDev__pTNI0x_08Ix
push 4
call fcn.0044c79b
add esp, 0xc
call fcn.0044c653
mov eax, dword [ebx + 0x51c]
push dword [eax + 0xfd0]
push str.pUsbDev__pTNI__pDeviceInfo0x_08Ix
push 4
call fcn.0044c79b
add esp, 0xc
call fcn.0044c653
mov eax, dword [ebx + 0x51c]
mov eax, dword [eax + 0xfd0]
test eax, eax
je 0x40ccf2
push dword [eax]
push str.pUsbDev__pTNI__pDeviceInfo__bGood_i
push 4
call fcn.0044c79b
add esp, 0xc
call fcn.0044c653
mov ebx, dword [ebx + 0x51c]
mov eax, dword [ebx + 0xfd0]
test eax, eax
je 0x40cd0d
cmp dword [eax], 1
jne 0x40cd0d
mov ecx, dword [ebx + 0x14]
mov dword [eax + 0xc], ecx
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x17]
mov byte [esi + 0xcfc], al
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x40cd3e
mov eax, dword [eax + 0xc]
test al, 4
je 0x40cd33
mov byte [esi + 0xcfc], 4
jmp 0x40cd3e
test al, 1
je 0x40cd3e
mov byte [esi + 0xcfc], 3
mov eax, dword [esi + 0xfc4]
test eax, eax
je 0x40cd55
cmp byte [esi + 0xcfc], 3
sbb ecx, ecx
inc ecx
mov dword [eax + 4], ecx
xor eax, eax
inc eax
jmp 0x40cd87
call fcn.00449d52
push eax
lea eax, [esi + 0xc74]
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 [esi + 0x14], 0xb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 8], eax
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0xc