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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3d0
push ebx
mov ebx, dword [ebp + 0x10]
push esi
lea eax, [ebx + 0xd90]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x18], ecx
push str.CUsbDevs::PutUsbPortInfo_0x_08Ix___s_...
push 1
call fcn.0044fe2e
mov esi, dword [ebx + 0x1148]
add esp, 0x10
mov dword [ebp + 0x10], esi
test esi, esi
jne 0x40c741
push str.CUsbDevs::PutUsbPortInfo
push 0x8d8
push str..CUsbDevs.cpp
push str.INT3_in__S_line__u__function__S
push 1
call fcn.0044fe2e
add esp, 0x14
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x40d7c2
cmp dword [ebx + 0x1188], 1
mov eax, dword [ebx + 0xde0]
mov dword [ebp - 0x14], eax
jne 0x40c75a
mov ecx, esi
call fcn.00407950
mov eax, dword [esi]
push edi
lea ecx, [esi + 0x50]
push ecx
push eax
push dword [ebp + 8]
mov dword [ebp - 0x10], eax
call fcn.00431396
and dword [esi + 0x48], 0
mov dword [esi + 0x4c], eax
cmp dword [0x50e060], 0x602
jb 0x40c9df
and dword [ebp - 0xc], 0
mov eax, esi
add eax, 0x24
mov dword [ebp - 8], eax
and dword [ebp - 4], 0
xor eax, eax
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x12
push dword [ebp - 0xc]
stosw word es:[edi], ax
mov eax, dword [ebp - 0x10]
movzx edi, word [ebp - 0xc]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x2c], eax
push str.IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES_0x_08Ix___i__compi_i___u_...
push 1
mov word [ebp - 0x20], di
call fcn.0044fe2e
add esp, 0x18
push 0
lea eax, [ebp - 4]
push eax
push 0x12
lea eax, [ebp - 0x2c]
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 - 0x1e]
push eax
push dword [ebp - 0x28]
push dword [ebp - 4]
push esi
call fcn.004296b5
push eax
push str.__s_ret_u_actlen_u_compport_u
push 1
call fcn.0044fe2e
add esp, 0x18
test esi, esi
je 0x40c947
mov eax, dword [ebp - 0x28]
lea ecx, [eax - 0x12]
cmp ecx, 0x207
ja 0x40c947
push eax
call fcn.00449e38
mov esi, eax
mov eax, dword [ebp - 0x10]
pop ecx
xor ecx, ecx
mov dword [esi], eax
mov word [esi + 0xc], di
mov word [esi + 0xe], cx
cmp dword [ebp - 0x28], 0x12
jbe 0x40c8d7
push dword [ebp - 0x28]
and dword [ebp - 4], ecx
push dword [ebp - 0xc]
push eax
push dword [ebp + 8]
push str.IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES_0x_08Ix___i__compi_i___u_...
push 1
call fcn.0044fe2e
add esp, 0x18
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x28]
push esi
push dword [ebp - 0x28]
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 - 0x34], eax
push dword [ebp - 4]
push eax
call fcn.004296b5
push eax
push str.__s_ret_u_actlen_u_compport_u_at__s
push 1
call fcn.0044fe2e
add esp, 0x1c
cmp dword [ebp - 0x34], 0
je 0x40c93f
movzx ecx, word [esi + 0xe]
test cx, cx
je 0x40c93f
cmp dword [ebp - 0xc], 0
jle 0x40c8d7
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp word [eax + 0xe], cx
jne 0x40c8d7
push edi
add eax, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x40c928
mov eax, dword [ebp - 8]
mov dword [eax + 4], esi
movzx eax, word [esi + 0xe]
test ax, ax
jbe 0x40c90b
mov ecx, dword [0x510c40]
movzx eax, ax
push eax
lea eax, [esi + 0x10]
push eax
call fcn.00407f66
mov ecx, dword [ebp - 8]
mov edi, dword [ebp + 0x10]
mov dword [ecx + 0x14], eax
mov eax, dword [ebp - 0xc]
inc eax
mov dword [edi + 0x48], eax
jmp 0x40c90e
mov edi, dword [ebp + 0x10]
cmp word [esi + 0xe], 0
je 0x40c958
inc dword [ebp - 0xc]
add dword [ebp - 8], 4
cmp dword [ebp - 0xc], 4
jl 0x40c790
jmp 0x40c955
push str._same_companion_port_reported_again____nonsense____abort
push 1
call fcn.0044fe2e
push esi
call fcn.00449e73
add esp, 0xc
jmp 0x40c955
push esi
call fcn.00449e73
jmp 0x40c954
push str._abort
push 1
call fcn.0044fe2e
pop ecx
pop ecx
mov edi, dword [ebp + 0x10]
push 0x10
pop esi
push esi
call fcn.00449e38
mov ecx, dword [ebp - 0x10]
mov dword [edi + 0x18], eax
push ecx
push dword [ebp + 8]
mov dword [eax], ecx
mov eax, dword [edi + 0x18]
mov dword [eax + 4], esi
mov eax, dword [edi + 0x18]
or dword [eax + 8], 4
push str.IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_V2_0x_08Ix___i_
push 1
call fcn.0044fe2e
and dword [ebp - 4], 0
mov eax, dword [edi + 0x18]
add esp, 0x14
push 0
lea ecx, [ebp - 4]
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 + 0x18]
push dword [eax + 8]
push esi
call fcn.004296b5
push eax
push str.__s_spr0x_02X
push 1
call fcn.0044fe2e
add esp, 0x10
test esi, esi
jne 0x40c9df
push dword [edi + 0x18]
call fcn.00449e73
and dword [edi + 0x18], esi
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0x10], eax
cmp dword [0x50e048], 0xa
jb 0x40caef
cmp dword [0x50e050], 0x5848
jb 0x40caef
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x40caef
test byte [eax + 8], 4
je 0x40caef
mov ecx, dword [ebp - 0x10]
push 0x18
pop esi
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], esi
xor eax, eax
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
push ecx
push dword [ebp + 8]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push str.IOCTL_USB_GET_NODE_CONNECTION_SUPERSPEEDPLUS_INFORMATION_0x_08Ix___i_
push 1
stosd dword es:[edi], eax
call fcn.0044fe2e
add esp, 0x10
xor edi, edi
push edi
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 0x30]
push eax
push esi
push eax
push 0x220484
push dword [ebp + 8]
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp eax, edi
je 0x40cac6
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push eax
push str._res_i__RxSuperSpeedPlus_u_RxLaneCount_u_TxSuperSpeedPlus_u_TxLaneCount_u
push 1
call fcn.0044fe2e
mov edi, dword [ebp + 0x10]
add esp, 0x1c
cmp dword [edi + 0x1c], 0
jne 0x40ca8e
push esi
call fcn.00449e38
pop ecx
mov dword [edi + 0x1c], eax
push esi
lea eax, [ebp - 0x30]
push eax
push dword [edi + 0x1c]
call fcn.00449ce2
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
shr eax, 0x10
add esp, 0xc
inc ecx
imul eax, ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebx + 0x116c], eax
mov eax, dword [ebp - 0x20]
shr eax, 0x10
inc ecx
imul eax, ecx
mov dword [ebx + 0x1170], eax
jmp 0x40caef
call fcn.0044cf52
push eax
push str._err_s
push 1
call fcn.0044fe2e
mov esi, dword [ebp + 0x10]
mov eax, dword [esi + 0x1c]
add esp, 0xc
cmp eax, edi
je 0x40caef
push eax
call fcn.00449e73
pop ecx
mov dword [esi + 0x1c], edi
and dword [ebp - 8], 0
mov esi, 0x18e
push 0x18d
xor edi, edi
lea eax, [ebp - 0x1c7]
push edi
push eax
call fcn.00449c78
mov eax, dword [ebp - 0x10]
push esi
push eax
push dword [ebp + 8]
mov dword [ebp - 0x1c8], eax
push str.IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_0x_08Ix___i___u_...
push 1
call fcn.0044fe2e
add esp, 0x20
push edi
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 0x1c8]
push eax
push esi
push eax
push 0x220448
push dword [ebp + 8]
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov edi, eax
test edi, edi
jne 0x40cb99
call fcn.0044cf74
push eax
push str._err_S
push 1
call fcn.0044fe2e
push esi
push dword [ebp - 0x10]
push dword [ebp + 8]
push str.IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_0x_08Ix___i___u_...
push 1
call fcn.0044fe2e
and dword [ebp - 4], edi
add esp, 0x20
push edi
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 0x1c8]
push eax
push esi
push eax
push 0x22040c
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov edi, eax
push dword [ebp - 4]
push edi
call fcn.004296b5
push eax
push str.__s__br_u
push 1
call fcn.0044fe2e
add esp, 0x10
test edi, edi
je 0x40d791
cmp dword [ebp - 4], 0
je 0x40ccaa
cmp dword [ebp - 4], esi
ja 0x40ccaa
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x40cbde
push eax
call fcn.00449e73
pop ecx
push dword [ebp - 4]
call fcn.00449e38
mov edi, eax
mov eax, dword [ebp + 0x10]
mov dword [eax + 0x14], edi
push dword [ebp - 4]
lea eax, [ebp - 0x1c8]
push eax
push edi
mov dword [ebp - 0xc], edi
call fcn.00449ce2
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.0041cd90
push eax
movzx eax, byte [edi + 0x17]
push eax
call fcn.00410c0b
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.0044fe2e
add esp, 0x20
cmp dword [ebx + 0x1188], 2
jne 0x40cc66
mov eax, dword [ebx + 0x1154]
test eax, eax
je 0x40cc52
cmp dword [eax + 8], 0
jne 0x40cc66
cmp dword [edi + 0x1f], 1
jne 0x40cc66
push str.device_is_not_present_but_ConnectionStatus_is_DeviceConnected__maybe_restarted
push 1
call fcn.0044fe2e
pop ecx
pop ecx
cmp dword [ebx + 0x1188], 1
movzx eax, word [edi + 6]
mov dword [ebx + 0x115c], eax
jne 0x40ccce
cmp byte [edi + 0x15], 0
jne 0x40ccce
cmp dword [ebp - 8], 0
jne 0x40ccce
push str.bNumConfigurations0____try_again_in_500ms
push 3
call fcn.0044fe2e
pop ecx
pop ecx
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 8], 1
jmp 0x40caf8
push 0x23
call fcn.00449e38
mov edi, eax
mov eax, dword [ebp + 0x10]
push 0x23
push 0
push edi
mov dword [eax + 0x14], edi
mov dword [ebp - 0xc], edi
call fcn.00449c78
mov eax, dword [ebp - 0x10]
add esp, 0x10
mov dword [edi], eax
mov edi, dword [ebp - 0xc]
movzx eax, byte [edi + 0x18]
push eax
push dword [edi]
push dword [edi + 0x1f]
call fcn.0041cd90
push eax
push str.ConnectionStatus_S_ReturnedConnIdx_u_IsHub_u
push 1
call fcn.0044fe2e
mov byte [ebx + 0xc78], 0
mov dword [ebx + 0x18], 0xb
mov eax, dword [edi + 0x1f]
add esp, 0x14
test eax, eax
jne 0x40cd0b
cmp word [edi + 0x19], ax
je 0x40cd5f
cmp eax, 1
je 0x40cd80
cmp eax, 3
jne 0x40cd35
cmp dword [edi], 0
jne 0x40cd35
mov eax, dword [ebp + 0x10]
cmp dword [eax + 0x10], 0x57
jne 0x40cd35
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x1144]
test eax, eax
je 0x40cd35
cmp dword [eax], 0
jne 0x40cd94
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0x10], 0
je 0x40cdcc
cmp dword [ebp - 8], 3
jge 0x40cdcc
push 0x14d
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp - 8]
jmp 0x40caf8
push 8
pop eax
push eax
mov dword [ebx + 0x18], eax
call fcn.0040b89f
push eax
push str.DeviceType_S____next_port
push 1
call fcn.0044fe2e
add esp, 0xc
jmp 0x40d7bf
xor eax, eax
cmp byte [edi + 0x18], al
sete al
dec eax
and eax, 0xfffffffd
add eax, 9
mov dword [ebx + 0x18], eax
jmp 0x40ce11
push str.ConnectionStatusDeviceGeneralFailure_and_returned_ConnectionIndex0____probably_non_existing_port_
push 1
call fcn.0044fe2e
pop ecx
pop ecx
mov ecx, dword [ebp - 0x14]
lea eax, [ecx + 0x119c]
cmp byte [eax], 0
jne 0x40cdb7
mov cl, byte [ebp - 0x10]
mov byte [eax], cl
jmp 0x40cdc0
mov al, byte [ebp - 0x10]
mov byte [ecx + 0x119d], al
mov dword [ebx + 0x18], 0xa
jmp 0x40d7bf
xor eax, eax
cmp byte [edi + 0x18], al
sete al
dec eax
and eax, 0xfffffffd
add eax, 0xa
mov dword [ebx + 0x18], eax
push dword [edi + 0x1f]
push str.DEVTYPE_BAD_because_ConnectionStatus_u
push 1
call fcn.0044fe2e
add esp, 0xc
push dword [edi + 0x1f]
call fcn.0041cd90
push eax
push dword [edi + 0x1f]
lea eax, [ebx + 0xc78]
push str.Device_has_ConnectionStatus_i___s_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push dword [ebx + 0x18]
call fcn.0040b89f
push eax
push str.DeviceType_S
push 1
call fcn.0044fe2e
lea esi, [ebx + 0xde4]
xor edi, edi
add esp, 0xc
cmp word [esi], di
jne 0x40cf4b
lea eax, [ebx + 0xe40]
push eax
push esi
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.00431088
test eax, eax
je 0x40cec4
mov ecx, dword [0x510c44]
push esi
call fcn.004019fa
mov dword [ebx + 0x1154], eax
cmp eax, edi
je 0x40cf4b
cmp dword [0x51adac], 4
jl 0x40ce8d
lea ecx, [eax + 0xe38]
push ecx
push dword [eax + 4]
push str.portss_dev_is_Dev__i__s
push 4
call fcn.0044fe2e
add esp, 0x10
mov eax, dword [ebx + 0x1154]
add eax, 0x1838
cmp word [eax], di
je 0x40cf4b
push eax
lea eax, [ebx + 0xd90]
push eax
push str.Enumerating_USB_port__s___s_
push edi
push 1
push dword [0x50eff4]
call fcn.00405f8f
add esp, 0x18
jmp 0x40cf4b
mov eax, dword [ebx + 0xde0]
cmp eax, edi
je 0x40cf1f
add eax, 0x1154
mov ecx, dword [eax]
cmp ecx, edi
je 0x40cf1f
cmp word [ecx + 0x2b7c], di
je 0x40cf1f
mov ecx, dword [ebx + 0x1148]
push dword [ecx]
mov eax, dword [eax]
add eax, 0x2b7c
push eax
lea eax, [ebp - 0x3d0]
push str._sUSB__i_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov ecx, dword [0x510c44]
add esp, 0x10
lea eax, [ebp - 0x3d0]
push eax
call fcn.00401aab
mov dword [ebx + 0x1154], eax
cmp dword [ebx + 0x1154], edi
jne 0x40cf4b
mov eax, dword [ebx + 0x1148]
mov eax, dword [eax + 0x14]
movzx ecx, word [eax + 0xc]
movzx eax, word [eax + 0xe]
push eax
push ecx
mov ecx, dword [0x510c44]
call fcn.004018c6
mov dword [ebx + 0x1154], eax
mov eax, dword [ebx + 0x1154]
cmp eax, edi
je 0x40cf79
add eax, 0x1cb8
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
call esi
mov eax, dword [ebx + 0x1154]
add eax, 0x1bb8
push eax
lea eax, [ebx + 0xd00]
push eax
call esi
mov eax, dword [ebx + 0x18]
cmp eax, 9
je 0x40cfaf
cmp eax, 0xa
je 0x40cfaf
cmp eax, 6
je 0x40cf90
cmp eax, 7
jne 0x40cff1
cmp dword [0x4a5b3c], edi
je 0x40cff1
cmp word [ebx + 0x86c], di
jne 0x40cff1
push ebx
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.00431997
jmp 0x40cff1
cmp dword [ebx + 0x1188], 2
je 0x40cfd5
cmp dword [0x4a5b3c], edi
je 0x40cfcc
push ebx
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.00431997
cmp dword [ebx + 0x1188], 2
jne 0x40cfeb
push str.Unknown_Device
lea eax, [ebx + 0xa70]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x40cff1
push ebx
call fcn.00432881
mov eax, dword [ebx + 0x1154]
cmp eax, edi
je 0x40d001
mov ecx, dword [ebx + 0x18]
mov dword [eax + 0xc], ecx
mov esi, dword [ebx + 0x114c]
cmp esi, edi
je 0x40d065
lea edi, [esi + 0x48]
mov dword [ebp - 0x14], 0x10
mov eax, dword [edi]
and dword [edi - 0x40], 0
and dword [edi + 0x40], 0
test eax, eax
je 0x40d02a
push eax
call fcn.00449e73
pop ecx
mov eax, dword [edi + 0x80]
and dword [edi], 0
test eax, eax
je 0x40d03e
push eax
call fcn.00449e73
pop ecx
and dword [edi + 0x80], 0
add edi, 4
dec dword [ebp - 0x14]
jne 0x40d015
lea edi, [esi + 0x108]
mov eax, dword [edi]
test eax, eax
je 0x40d060
push eax
call fcn.00449e73
pop ecx
and dword [edi], 0
jmp 0x40d0a9
mov edi, 0x520
push edi
call fcn.00449e38
pop ecx
test eax, eax
je 0x40d07e
mov ecx, eax
call fcn.004078d4
jmp 0x40d080
xor eax, eax
push edi
mov esi, eax
push 0
push esi
mov dword [ebx + 0x114c], eax
call fcn.00449c78
mov dword [esi], 1
mov dword [esi + 0x51c], ebx
mov eax, dword [ebx + 0x1154]
add esp, 0xc
mov dword [esi + 4], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x18]
test ecx, ecx
je 0x40d0fc
test byte [ecx + 8], 4
mov edi, dword [ebp + 0xc]
je 0x40d0c3
mov dword [edi + 4], 1
mov ecx, dword [eax + 0x18]
mov edx, dword [ecx + 0xc]
mov dword [ebp + 0xc], edx
and dword [ebp + 0xc], 1
jne 0x40d0db
test dl, 4
jne 0x40d0db
xor ecx, ecx
jmp 0x40d0de
xor ecx, ecx
inc ecx
cmp dword [ebp + 0xc], 0
mov dword [edi + 4], ecx
je 0x40d0ee
mov dword [eax + 8], 3
test dl, 4
je 0x40d10f
mov dword [eax + 8], 4
jmp 0x40d10f
mov ecx, dword [eax + 0x14]
cmp byte [ecx + 0x17], 3
jb 0x40d10f
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 4], 1
mov eax, dword [eax + 0x14]
test eax, eax
je 0x40d64d
cmp dword [eax + 0x1f], 1
jne 0x40d64d
lea edi, [esi + 0x48]
mov dword [ebp + 0xc], 0x10
mov eax, dword [edi]
test eax, eax
je 0x40d13e
push eax
call fcn.00449e73
and dword [edi], 0
pop ecx
add edi, 4
dec dword [ebp + 0xc]
jne 0x40d12e
mov eax, dword [ebx + 0x1154]
test eax, eax
je 0x40d155
mov eax, dword [eax + 0x10]
jmp 0x40d157
xor eax, eax
mov dword [ebp - 0x18], eax
test eax, eax
je 0x40d17b
push eax
call fcn.0044e0b4
test eax, eax
jne 0x40d17b
push str.device_is_gone____abort
push 2
call fcn.0044fe2e
pop ecx
pop ecx
jmp 0x40d7bf
mov eax, dword [ebx + 0x1154]
test eax, eax
je 0x40d197
cmp dword [eax + 0x3a74], 0
jne 0x40d197
mov dword [ebp - 0x34], 1
jmp 0x40d19b
and dword [ebp - 0x34], 0
mov eax, dword [esi + 0x51c]
mov eax, dword [eax + 0x1148]
mov eax, dword [eax + 0x14]
movzx edi, byte [eax + 0x15]
mov dword [ebp - 8], edi
test edi, edi
jne 0x40d1f3
push str.DEVTYPE_BAD_because_bNumConfigurations_is_0
push 1
call fcn.0044fe2e
mov ecx, dword [ebp - 0xc]
xor eax, eax
cmp byte [ecx + 0x18], al
push str.bNumConfigurations_is_0
sete al
add ebx, 0xc78
push ebx
dec eax
and eax, 0xfffffffd
add eax, 0xa
mov dword [ebx - 0xc60], eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x40d7bf
cmp edi, 0x10
jle 0x40d210
push 0x10
push edi
push str.bNumConfigurations_is__i____cut_to__i
push 1
call fcn.0044fe2e
add esp, 0x10
push 0x10
pop edi
mov dword [ebp - 8], edi
mov eax, 0x4569e1
cmp edi, 1
je 0x40d21f
mov eax, 0x45763c
push eax
push edi
push str.getting_ConfigDescritor_for__i_configuration_S...
push 3
call fcn.0044fe2e
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetTickCount]
and dword [ebp + 0xc], 0
mov dword [ebp - 0x38], eax
test edi, edi
jle 0x40d317
lea eax, [esi + 0x48]
mov dword [ebp - 0x14], eax
push dword [esi + 4]
push dword [ebp - 0x14]
push dword [ebp + 0xc]
push 2
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.00431da4
cmp dword [ebp - 0x18], 0
mov edi, eax
je 0x40d279
push dword [ebp - 0x18]
call fcn.0044e0b4
test eax, eax
je 0x40d168
cmp dword [0x50e62c], 0
jne 0x40d2fe
cmp dword [ebp - 0x34], 0
je 0x40d2fe
cmp edi, 0xaa
je 0x40d295
cmp edi, 0x15
jne 0x40d2fe
cmp dword [esi], 1
jne 0x40d2fe
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x38]
cmp eax, 0x1388
jae 0x40d2fe
push edi
call fcn.0044b09e
push eax
push dword [ebp + 0xc]
push str.GetConfigDescriptor_i__err_S
push 1
call fcn.0044fe2e
add esp, 0x10
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x18], 0
je 0x40d2e4
push dword [ebp - 0x18]
call fcn.0044e0b4
test eax, eax
je 0x40d168
push dword [esi + 4]
push dword [ebp - 0x14]
push dword [ebp + 0xc]
push 2
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.00431da4
mov edi, eax
jmp 0x40d288
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 - 8]
jl 0x40d24b
mov eax, dword [esi + 8]
test eax, eax
jne 0x40d327
cmp dword [esi + 0x48], eax
jne 0x40d462
push eax
call fcn.0044b09e
push eax
push str.DEVTYPE_BAD_because_GetConfigDescriptor0_failed_with_err_S
push 1
call fcn.0044fe2e
mov eax, dword [esi + 8]
add esp, 0xc
test eax, eax
je 0x40d362
push eax
lea edi, [ebx + 0xc78]
call fcn.0044b09e
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 0x40d376
lea eax, [ebx + 0xc78]
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 + 0x14]
xor ecx, ecx
cmp byte [eax + 0x18], cl
sete cl
dec ecx
and ecx, 0xfffffffd
add ecx, 0xa
mov dword [ebx + 0x18], ecx
cmp dword [0x50e62c], 0
jne 0x40d458
cmp dword [esi + 8], 0
je 0x40d458
mov edi, dword [ebx + 0x1154]
test edi, edi
je 0x40d458
cmp dword [edi], 1
jne 0x40d458
cmp dword [edi + 0x3a74], 0
jne 0x40d458
push 0
lea eax, [ebp - 0x38]
push eax
lea eax, [edi + 0x3a78]
push eax
push 0
push 0x1f
push dword [edi + 0x10]
mov dword [ebp - 0x38], 0x38
call dword [sym.imp.CFGMGR32.dll_CM_Get_DevNode_Registry_PropertyW]
test eax, eax
jne 0x40d458
cmp dword [edi + 0x3a7c], 1
jne 0x40d458
xor edi, edi
push edi
push esi
push 0x408b98
call fcn.00429339
push 0x3e8
push eax
mov dword [ebx + 0x11b0], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40d446
lea eax, [ebp + 0xc]
push eax
push dword [ebx + 0x11b0]
mov dword [ebp + 0xc], 0x1f
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x40d446
cmp dword [ebp + 0xc], edi
jne 0x40d446
mov byte [ebx + 0xc78], 0
push dword [ebx + 0x11b0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x11b0], edi
cmp dword [esi + 0x48], 0
je 0x40d64d
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 6]
mov ecx, 0x200
cmp ax, cx
jb 0x40d567
mov ecx, 0x300
cmp ax, cx
jae 0x40d567
cmp dword [ebx + 0x1174], 3
jge 0x40d567
mov eax, dword [ebp - 0xc]
mov al, byte [eax + 0x17]
test al, al
jne 0x40d4a5
cmp dword [0x510c60], 0
jne 0x40d4b2
cmp al, 1
jne 0x40d4cf
cmp dword [0x510c64], 0
je 0x40d4cf
push str.request_for_device_qualifier_descriptor_skipped
push 3
call fcn.0044fe2e
mov eax, dword [ebp + 0x10]
pop ecx
pop ecx
mov dword [eax + 0x24], 0x2cd
jmp 0x40d567
push dword [ebx + 0x1154]
xor eax, eax
mov byte [ebp - 0x24], 0
lea edi, [ebp - 0x23]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosb byte es:[edi], al
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.00431155
mov edi, dword [ebp + 0x10]
mov dword [edi + 0x24], eax
test eax, eax
jne 0x40d529
cmp byte [ebp - 0x23], 6
jne 0x40d567
mov eax, dword [edi + 0x20]
test eax, eax
je 0x40d50e
push eax
call fcn.00449e73
pop ecx
push 0xa
call fcn.00449e38
push 0xa
lea ecx, [ebp - 0x24]
push ecx
push eax
mov dword [edi + 0x20], eax
call fcn.00449ce2
add esp, 0x10
jmp 0x40d567
cmp eax, 0x102
jne 0x40d55f
lea eax, [ebx + 0xd90]
push eax
lea eax, [ebx + 0x86c]
push eax
push str.Timeout_requesting_Device_Qualifier_Descriptor_from__s_at__s
push 0xea60
push 1
push dword [0x50eff4]
call fcn.00405f8f
add esp, 0x18
push 0xbb8
jmp 0x40d561
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 6]
add eax, 0xfffffe00
mov ecx, 0xff
cmp ax, cx
ja 0x40d62e
mov eax, dword [esi + 0x51c]
mov eax, dword [eax + 0x1148]
mov eax, dword [eax + 0x20]
test eax, eax
je 0x40d62e
mov al, byte [eax + 8]
test al, al
jbe 0x40d62e
movzx eax, al
push 0x10
pop edi
cmp eax, edi
mov dword [ebp - 8], eax
jle 0x40d5c4
push edi
push eax
push str.bNumConfigurations_is__i____cut_to__i
push 1
call fcn.0044fe2e
add esp, 0x10
mov dword [ebp - 8], edi
lea edi, [esi + 0xc8]
mov dword [ebp + 0xc], 0x10
mov eax, dword [edi]
test eax, eax
je 0x40d5e1
push eax
call fcn.00449e73
and dword [edi], 0
pop ecx
add edi, 4
dec dword [ebp + 0xc]
jne 0x40d5d1
and dword [ebp + 0xc], 0
cmp dword [ebp - 8], 0
jle 0x40d62e
lea edi, [esi + 0x88]
push dword [ebx + 0x1154]
lea eax, [edi + 0x40]
push eax
push dword [ebp + 0xc]
mov eax, dword [esi + 0x51c]
mov eax, dword [eax + 0x1148]
push 7
push dword [eax]
push dword [ebp + 8]
call fcn.00431da4
inc dword [ebp + 0xc]
mov dword [edi], eax
mov eax, dword [ebp + 0xc]
add edi, 4
cmp eax, dword [ebp - 8]
jl 0x40d5f9
mov ecx, dword [ebp - 0xc]
mov eax, 0x200
cmp word [ecx + 6], ax
jb 0x40d64d
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.004311fd
mov dword [esi + 0x108], eax
push dword [esi + 0x51c]
push str.pUsbDev__pTNI0x_08Ix
push 4
pop edi
push edi
call fcn.0044fe2e
add esp, 0xc
call fcn.0044fce6
mov eax, dword [esi + 0x51c]
push dword [eax + 0x1154]
push str.pUsbDev__pTNI__pDeviceInfo0x_08Ix
push edi
call fcn.0044fe2e
add esp, 0xc
call fcn.0044fce6
mov eax, dword [esi + 0x51c]
mov eax, dword [eax + 0x1154]
test eax, eax
je 0x40d6ad
push dword [eax]
push str.pUsbDev__pTNI__pDeviceInfo__bGood_i
push edi
call fcn.0044fe2e
add esp, 0xc
call fcn.0044fce6
mov esi, dword [esi + 0x51c]
mov eax, dword [esi + 0x1154]
test eax, eax
je 0x40d6c8
cmp dword [eax], 1
jne 0x40d6c8
mov ecx, dword [esi + 0x18]
mov dword [eax + 0xc], ecx
mov eax, dword [ebp - 0xc]
movzx ecx, byte [eax + 0x17]
mov eax, dword [ebp + 0x10]
mov edx, dword [eax + 0x18]
mov dword [eax + 8], ecx
test edx, edx
je 0x40d6f3
mov ecx, dword [edx + 0xc]
test cl, 1
je 0x40d6eb
mov dword [eax + 8], 3
test cl, 4
je 0x40d6f3
mov dword [eax + 8], edi
mov esi, dword [eax + 0x1c]
test esi, esi
je 0x40d745
mov ecx, dword [esi + 8]
and ecx, 0x30
cmp cl, 0x30
jne 0x40d745
mov ecx, dword [esi + 0xc]
movzx esi, word [esi + 0xa]
inc ecx
imul ecx, esi
cmp ecx, 5
je 0x40d737
cmp ecx, 0xa
je 0x40d72b
cmp ecx, 0x14
jne 0x40d745
mov ecx, dword [eax + 8]
cmp ecx, 6
jg 0x40d742
push 6
jmp 0x40d741
mov ecx, dword [eax + 8]
cmp ecx, 5
jg 0x40d742
push 5
jmp 0x40d741
mov ecx, dword [eax + 8]
cmp ecx, 3
jg 0x40d742
push 3
pop ecx
mov dword [eax + 8], ecx
mov eax, dword [eax + 8]
cmp eax, 0xffffffff
jg 0x40d76d
test edx, edx
je 0x40d773
mov eax, dword [edx + 8]
test al, 4
je 0x40d764
mov dword [ebx + 0x1174], 3
jmp 0x40d773
test al, 2
push 0
pop eax
setne al
inc eax
mov dword [ebx + 0x1174], eax
mov eax, dword [ebx + 0x1144]
test eax, eax
je 0x40d78c
xor ecx, ecx
cmp dword [ebx + 0x1174], 3
setge cl
mov dword [eax + 4], ecx
xor eax, eax
inc eax
jmp 0x40d7c1
call fcn.0044cf74
push eax
lea eax, [ebx + 0xc78]
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 + 0x18], 0xb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 0xc], eax
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0xc