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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3d0
push ebx
push esi
mov esi, dword [ebp + 0x10]
lea eax, [esi + 0xd90]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x34], ecx
push str.CUsbDevs::PutUsbPortInfo_0x_08Ix___s_...
push 1
call fcn.00451479
mov ebx, dword [esi + 0x1148]
add esp, 0x10
mov dword [ebp - 0x18], ebx
test ebx, ebx
jne 0x40cac3
push str.CUsbDevs::PutUsbPortInfo
push 0x8e7
push str..CUsbDevs.cpp
push str.INT3_in__S_line__u__function__S
push 1
call fcn.00451479
add esp, 0x14
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x40dc53
cmp dword [esi + 0x1188], 1
mov eax, dword [esi + 0xde0]
mov dword [ebp - 0x14], eax
jne 0x40cadc
mov ecx, ebx
call fcn.00407a9a
mov eax, dword [ebx]
push edi
lea ecx, [ebx + 0x50]
push ecx
push eax
push dword [ebp + 8]
mov dword [ebp + 0x10], eax
call fcn.004321d5
and dword [ebx + 0x48], 0
mov dword [ebx + 0x4c], eax
cmp dword [0x510080], 0x602
jb 0x40cd5f
and dword [ebp - 4], 0
lea eax, [ebx + 0x24]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 0x10]
and dword [ebp - 8], 0
xor eax, eax
lea edi, [ebp - 0x28]
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 - 0x2c], ecx
mov word [ebp - 0x20], ax
call fcn.00451479
add esp, 0x18
push 0
lea eax, [ebp - 8]
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 edi, eax
movzx eax, word [ebp - 0x1e]
push eax
push dword [ebp - 0x28]
push dword [ebp - 8]
push edi
call fcn.00429f27
push eax
push str.__s_ret_u_actlen_u_compport_u
push 1
call fcn.00451479
add esp, 0x18
test edi, edi
je 0x40ccca
mov eax, dword [ebp - 0x28]
lea ecx, [eax - 0x12]
cmp ecx, 0x207
ja 0x40ccca
push eax
call fcn.0044b31e
mov edi, eax
mov eax, dword [ebp + 0x10]
mov dword [edi], eax
movzx eax, word [ebp - 4]
mov word [edi + 0xc], ax
xor eax, eax
mov word [edi + 0xe], ax
cmp dword [ebp - 0x28], 0x12
pop ecx
jbe 0x40cc62
push dword [ebp - 0x28]
and dword [ebp - 8], eax
push dword [ebp - 4]
push dword [ebp + 0x10]
push dword [ebp + 8]
push str.IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES_0x_08Ix___i__compi_i___u_...
push 1
call fcn.00451479
add esp, 0x18
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x28]
push edi
push dword [ebp - 0x28]
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 - 8]
push dword [ebp - 0x10]
call fcn.00429f27
push eax
push str.__s_ret_u_actlen_u_compport_u_at__s
push 1
call fcn.00451479
add esp, 0x1c
cmp dword [ebp - 0x10], 0
je 0x40ccc2
movzx ecx, word [edi + 0xe]
test cx, cx
je 0x40ccc2
cmp dword [ebp - 4], 0
jle 0x40cc62
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
cmp word [eax + 0xe], cx
jne 0x40cc62
lea ecx, [edi + 0x10]
push ecx
add eax, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x40ccab
mov eax, dword [ebp - 0xc]
mov dword [eax + 4], edi
movzx eax, word [edi + 0xe]
test ax, ax
jbe 0x40cc91
mov ecx, dword [0x512c60]
movzx eax, ax
push eax
lea eax, [edi + 0x10]
push eax
call fcn.004080d4
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x14], eax
mov eax, dword [ebp - 4]
inc eax
mov dword [ebx + 0x48], eax
cmp word [edi + 0xe], 0
je 0x40ccd8
inc dword [ebp - 4]
add dword [ebp - 0xc], 4
cmp dword [ebp - 4], 4
jl 0x40cb10
jmp 0x40ccd8
push str._same_companion_port_reported_again____nonsense____abort
push 1
call fcn.00451479
push edi
call fcn.0044b359
add esp, 0xc
jmp 0x40ccd8
push edi
call fcn.0044b359
jmp 0x40ccd7
push str._abort
push 1
call fcn.00451479
pop ecx
pop ecx
push 0x10
pop edi
push edi
call fcn.0044b31e
mov ecx, dword [ebp + 0x10]
mov dword [ebx + 0x18], eax
push ecx
push dword [ebp + 8]
mov dword [eax], ecx
mov eax, dword [ebx + 0x18]
mov dword [eax + 4], edi
mov eax, dword [ebx + 0x18]
or dword [eax + 8], 4
push str.IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_V2_0x_08Ix___i_
push 1
call fcn.00451479
and dword [ebp - 8], 0
mov eax, dword [ebx + 0x18]
add esp, 0x14
push 0
lea ecx, [ebp - 8]
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 + 0x18]
push dword [eax + 8]
push edi
call fcn.00429f27
push eax
push str.__s_spr0x_02X
push 1
call fcn.00451479
add esp, 0x10
test edi, edi
jne 0x40cd5f
push dword [ebx + 0x18]
call fcn.0044b359
and dword [ebx + 0x18], edi
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x10], eax
cmp dword [0x510068], 0xa
jb 0x40ce6c
cmp dword [0x510070], 0x65f4
jb 0x40ce6c
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x40ce6c
test byte [eax + 8], 4
je 0x40ce6c
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], 0x18
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.00451479
and dword [ebp - 8], 0
add esp, 0x10
push 0
lea eax, [ebp - 8]
push eax
push 0x18
lea eax, [ebp - 0x30]
push eax
push 0x18
push eax
push 0x220484
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40ce45
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.00451479
add esp, 0x1c
cmp dword [ebx + 0x1c], 0
jne 0x40ce0c
push 0x18
call fcn.0044b31e
pop ecx
mov dword [ebx + 0x1c], eax
push 0x18
lea eax, [ebp - 0x30]
push eax
push dword [ebx + 0x1c]
call fcn.0044b1c8
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 [esi + 0x116c], eax
mov eax, dword [ebp - 0x20]
shr eax, 0x10
inc ecx
imul eax, ecx
mov dword [esi + 0x1170], eax
jmp 0x40ce6c
call fcn.0044e457
push eax
push str._err_s
push 1
call fcn.00451479
mov eax, dword [ebx + 0x1c]
add esp, 0xc
test eax, eax
je 0x40ce6c
push eax
call fcn.0044b359
and dword [ebx + 0x1c], 0
pop ecx
and dword [ebp - 0xc], 0
mov ebx, 0x18e
push 0x18d
xor edi, edi
lea eax, [ebp - 0x1c7]
push edi
push eax
call fcn.0044b15e
mov eax, dword [ebp + 0x10]
push ebx
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.00451479
add esp, 0x20
push edi
lea eax, [ebp - 8]
push eax
push ebx
lea eax, [ebp - 0x1c8]
push eax
push ebx
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 - 0x10], eax
test eax, eax
jne 0x40cf18
call fcn.0044e479
push eax
push str._err_S
push 1
call fcn.00451479
push ebx
push dword [ebp + 0x10]
push dword [ebp + 8]
push str.IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_0x_08Ix___i___u_...
push 1
call fcn.00451479
and dword [ebp - 8], 0
add esp, 0x20
push 0
lea eax, [ebp - 8]
push eax
push ebx
lea eax, [ebp - 0x1c8]
push eax
push ebx
push eax
push 0x22040c
push dword [ebp + 8]
call edi
mov dword [ebp - 0x10], eax
push dword [ebp - 8]
push dword [ebp - 0x10]
call fcn.00429f27
push eax
push str.__s__br_u
push 1
call fcn.00451479
add esp, 0x10
cmp dword [ebp - 0x10], 0
je 0x40dc22
cmp dword [ebp - 8], 0
je 0x40d02d
cmp dword [ebp - 8], ebx
ja 0x40d02d
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x40cf61
push eax
call fcn.0044b359
pop ecx
push dword [ebp - 8]
call fcn.0044b31e
mov edi, eax
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x14], edi
push dword [ebp - 8]
lea eax, [ebp - 0x1c8]
push eax
push edi
mov dword [ebp - 4], edi
call fcn.0044b1c8
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.0041da3b
push eax
movzx eax, byte [edi + 0x17]
push eax
call fcn.004115b5
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.00451479
add esp, 0x20
cmp dword [esi + 0x1188], 2
jne 0x40cfe9
mov eax, dword [esi + 0x1154]
test eax, eax
je 0x40cfd5
cmp dword [eax + 0xc], 0
jne 0x40cfe9
cmp dword [edi + 0x1f], 1
jne 0x40cfe9
push str.device_is_not_present_but_ConnectionStatus_is_DeviceConnected__maybe_restarted
push 1
call fcn.00451479
pop ecx
pop ecx
cmp dword [esi + 0x1188], 1
movzx eax, word [edi + 6]
mov dword [esi + 0x115c], eax
jne 0x40d051
cmp byte [edi + 0x15], 0
jne 0x40d051
cmp dword [ebp - 0xc], 0
jne 0x40d051
push str.bNumConfigurations0____try_again_in_500ms
push 3
call fcn.00451479
pop ecx
pop ecx
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0xc], 1
jmp 0x40ce75
push 0x23
call fcn.0044b31e
mov edi, eax
mov eax, dword [ebp - 0x18]
push 0x23
push 0
push edi
mov dword [eax + 0x14], edi
mov dword [ebp - 4], edi
call fcn.0044b15e
mov eax, dword [ebp + 0x10]
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.0041da3b
push eax
push str.ConnectionStatus_S_ReturnedConnIdx_u_IsHub_u
push 1
call fcn.00451479
mov byte [esi + 0xc78], 0
mov dword [esi + 0x18], 0xb
mov eax, dword [edi + 0x1f]
add esp, 0x14
test eax, eax
jne 0x40d08e
cmp word [edi + 0x19], ax
je 0x40d0e2
cmp eax, 1
je 0x40d103
cmp eax, 3
jne 0x40d0b8
cmp dword [edi], 0
jne 0x40d0b8
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0x10], 0x57
jne 0x40d0b8
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x1144]
test eax, eax
je 0x40d0b8
cmp dword [eax], 0
jne 0x40d117
mov eax, dword [ebp - 0x34]
cmp dword [eax + 0x10], 0
je 0x40d14f
cmp dword [ebp - 0xc], 3
jge 0x40d14f
push 0x14d
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp - 0xc]
jmp 0x40ce75
push 8
pop eax
push eax
mov dword [esi + 0x18], eax
call fcn.0040bc24
push eax
push str.DeviceType_S____next_port
push 1
call fcn.00451479
add esp, 0xc
jmp 0x40dc50
xor eax, eax
cmp byte [edi + 0x18], al
sete al
dec eax
and eax, 0xfffffffd
add eax, 9
mov dword [esi + 0x18], eax
jmp 0x40d194
push str.ConnectionStatusDeviceGeneralFailure_and_returned_ConnectionIndex0____probably_non_existing_port_
push 1
call fcn.00451479
pop ecx
pop ecx
mov ecx, dword [ebp - 0x14]
lea eax, [ecx + 0x119c]
cmp byte [eax], 0
jne 0x40d13a
mov cl, byte [ebp + 0x10]
mov byte [eax], cl
jmp 0x40d143
mov al, byte [ebp + 0x10]
mov byte [ecx + 0x119d], al
mov dword [esi + 0x18], 0xa
jmp 0x40dc50
xor eax, eax
cmp byte [edi + 0x18], al
sete al
dec eax
and eax, 0xfffffffd
add eax, 0xa
mov dword [esi + 0x18], eax
push dword [edi + 0x1f]
push str.DEVTYPE_BAD_because_ConnectionStatus_u
push 1
call fcn.00451479
add esp, 0xc
push dword [edi + 0x1f]
call fcn.0041da3b
push eax
push dword [edi + 0x1f]
lea eax, [esi + 0xc78]
push str.Device_has_ConnectionStatus_i___s_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push dword [esi + 0x18]
call fcn.0040bc24
push eax
push str.DeviceType_S
push 1
call fcn.00451479
lea edi, [esi + 0xde4]
xor ebx, ebx
add esp, 0xc
cmp word [edi], bx
jne 0x40d2e4
lea eax, [esi + 0xe40]
push eax
push edi
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.00431ec7
test eax, eax
je 0x40d247
mov ecx, dword [0x512c64]
push edi
call fcn.004019ed
mov dword [esi + 0x1154], eax
cmp eax, ebx
je 0x40d2e4
cmp dword [0x51cdd4], 4
jl 0x40d210
lea ecx, [eax + 0xe3c]
push ecx
push dword [eax + 4]
push str.portss_dev_is_Dev__i__s
push 4
call fcn.00451479
add esp, 0x10
mov eax, dword [esi + 0x1154]
add eax, 0x183c
cmp word [eax], bx
je 0x40d2e4
push eax
lea eax, [esi + 0xd90]
push eax
push str.Enumerating_USB_port__s___s_
push ebx
push 1
push dword [0x511014]
call fcn.0040601d
add esp, 0x18
jmp 0x40d2e4
mov eax, dword [esi + 0xde0]
cmp eax, ebx
je 0x40d2b8
add eax, 0x1154
mov ecx, dword [eax]
cmp ecx, ebx
je 0x40d2b8
cmp word [ecx + 0x2b80], bx
je 0x40d2b8
mov ecx, dword [esi + 0x1148]
push dword [ecx]
mov eax, dword [eax]
add eax, 0x2b80
push eax
lea eax, [ebp - 0x3d0]
push str._sUSB__i_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [esi + 0x1154]
add esp, 0x10
cmp eax, ebx
je 0x40d2a0
push dword [eax + 0x14]
call fcn.0044f5b3
test eax, eax
jne 0x40d2b8
mov ecx, dword [0x512c64]
lea eax, [ebp - 0x3d0]
push eax
call fcn.00401a9e
mov dword [esi + 0x1154], eax
cmp dword [esi + 0x1154], ebx
jne 0x40d2e4
mov eax, dword [esi + 0x1148]
mov eax, dword [eax + 0x14]
movzx ecx, word [eax + 0xc]
movzx eax, word [eax + 0xe]
push eax
push ecx
mov ecx, dword [0x512c64]
call fcn.004018bc
mov dword [esi + 0x1154], eax
mov eax, dword [esi + 0x1154]
cmp eax, ebx
je 0x40d312
add eax, 0x1cbc
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
call edi
mov eax, dword [esi + 0x1154]
add eax, 0x1bbc
push eax
lea eax, [esi + 0xd00]
push eax
call edi
mov eax, dword [esi + 0x18]
cmp eax, 9
je 0x40d348
cmp eax, 0xa
je 0x40d348
cmp eax, 6
je 0x40d329
cmp eax, 7
jne 0x40d38a
cmp dword [0x4a7b44], ebx
je 0x40d38a
cmp word [esi + 0x86c], bx
jne 0x40d38a
push esi
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.004327d6
jmp 0x40d38a
cmp dword [esi + 0x1188], 2
je 0x40d36e
cmp dword [0x4a7b44], ebx
je 0x40d365
push esi
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.004327d6
cmp dword [esi + 0x1188], 2
jne 0x40d384
push str.Unknown_Device
lea eax, [esi + 0xa70]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x40d38a
push esi
call fcn.004336c0
mov eax, dword [esi + 0x1148]
mov edi, dword [eax + 0x14]
cmp edi, ebx
je 0x40d43f
movzx ecx, byte [edi + 0x12]
test cl, cl
je 0x40d3bd
lea eax, [esi + 0xe44]
cmp word [eax], bx
jne 0x40d3bd
push 0x7f
push eax
push ecx
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.0043222b
movzx ecx, byte [edi + 0x13]
test cl, cl
je 0x40d3df
lea eax, [esi + 0xf42]
cmp word [eax], bx
jne 0x40d3df
push 0x7f
push eax
push ecx
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.0043222b
movzx eax, byte [edi + 0x14]
test al, al
je 0x40d43f
lea edi, [esi + 0x1040]
cmp word [edi], bx
jne 0x40d43f
push 0x7f
push edi
push eax
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.0043222b
cmp word [edi], bx
jne 0x40d43f
mov eax, dword [esi + 0x1154]
cmp eax, ebx
je 0x40d43f
push 0x5c
push ebx
add eax, 0xe3c
push eax
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
mov ebx, eax
test ebx, ebx
je 0x40d43d
push 0x26
push ebx
call dword [sym.imp.SHLWAPI.dll_StrChrW]
test eax, eax
jne 0x40d43d
add ebx, 2
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
xor ebx, ebx
mov eax, dword [esi + 0x1154]
cmp eax, ebx
je 0x40d44f
mov ecx, dword [esi + 0x18]
mov dword [eax + 0x10], ecx
mov eax, dword [esi + 0x114c]
cmp eax, ebx
je 0x40d4b5
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 0x40d47a
push eax
call fcn.0044b359
pop ecx
mov eax, dword [edi + 0x80]
and dword [edi], 0
test eax, eax
je 0x40d48e
push eax
call fcn.0044b359
pop ecx
and dword [edi + 0x80], 0
add edi, 4
dec dword [ebp - 0x14]
jne 0x40d465
lea edi, [ebx + 0x108]
mov eax, dword [edi]
test eax, eax
je 0x40d4b0
push eax
call fcn.0044b359
pop ecx
and dword [edi], 0
jmp 0x40d4f9
mov edi, 0x520
push edi
call fcn.0044b31e
pop ecx
cmp eax, ebx
je 0x40d4ce
mov ecx, eax
call fcn.00407a1e
jmp 0x40d4d0
xor eax, eax
push edi
mov ebx, eax
push 0
push ebx
mov dword [esi + 0x114c], eax
call fcn.0044b15e
mov dword [ebx], 1
mov dword [ebx + 0x51c], esi
mov eax, dword [esi + 0x1154]
add esp, 0xc
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 0x18]
test ecx, ecx
je 0x40d54c
test byte [ecx + 8], 4
mov edi, dword [ebp + 0xc]
je 0x40d513
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 0x40d52b
test dl, 4
jne 0x40d52b
xor ecx, ecx
jmp 0x40d52e
xor ecx, ecx
inc ecx
cmp dword [ebp + 0xc], 0
mov dword [edi + 4], ecx
je 0x40d53e
mov dword [eax + 8], 3
test dl, 4
je 0x40d55f
mov dword [eax + 8], 4
jmp 0x40d55f
mov ecx, dword [eax + 0x14]
cmp byte [ecx + 0x17], 3
jb 0x40d55f
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 4], 1
mov eax, dword [eax + 0x14]
test eax, eax
je 0x40da97
cmp dword [eax + 0x1f], 1
jne 0x40da97
lea edi, [ebx + 0x48]
mov dword [ebp + 0xc], 0x10
mov eax, dword [edi]
test eax, eax
je 0x40d58e
push eax
call fcn.0044b359
and dword [edi], 0
pop ecx
add edi, 4
dec dword [ebp + 0xc]
jne 0x40d57e
mov eax, dword [esi + 0x1154]
test eax, eax
je 0x40d5a5
mov eax, dword [eax + 0x14]
jmp 0x40d5a7
xor eax, eax
mov dword [ebp - 0xc], eax
test eax, eax
je 0x40d5cb
push eax
call fcn.0044f5b3
test eax, eax
jne 0x40d5cb
push str.device_is_gone____abort
push 2
call fcn.00451479
pop ecx
pop ecx
jmp 0x40dc50
mov eax, dword [esi + 0x1154]
test eax, eax
je 0x40d5e4
cmp dword [eax + 8], 0
jne 0x40d5e4
mov dword [ebp - 0x34], 1
jmp 0x40d5e8
and dword [ebp - 0x34], 0
mov eax, dword [ebx + 0x51c]
mov eax, dword [eax + 0x1148]
mov eax, dword [eax + 0x14]
movzx edi, byte [eax + 0x15]
mov dword [ebp - 0x10], edi
test edi, edi
jne 0x40d640
push str.DEVTYPE_BAD_because_bNumConfigurations_is_0
push 1
call fcn.00451479
mov ecx, dword [ebp - 4]
xor eax, eax
cmp byte [ecx + 0x18], al
push str.bNumConfigurations_is_0
sete al
add esi, 0xc78
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 0x40dc50
cmp edi, 0x10
jle 0x40d65d
push 0x10
push edi
push str.bNumConfigurations_is__i____cut_to__i
push 1
call fcn.00451479
add esp, 0x10
push 0x10
pop edi
mov dword [ebp - 0x10], edi
mov eax, 0x457a19
cmp edi, 1
je 0x40d66c
mov eax, 0x4586e4
push eax
push edi
push str.getting_ConfigDescritor_for__i_configuration_S...
push 3
call fcn.00451479
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetTickCount]
and dword [ebp + 0xc], 0
mov dword [ebp - 0x38], eax
test edi, edi
jle 0x40d764
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 + 0x10]
push dword [ebp + 8]
call fcn.00432be3
cmp dword [ebp - 0xc], 0
mov edi, eax
je 0x40d6c6
push dword [ebp - 0xc]
call fcn.0044f5b3
test eax, eax
je 0x40d5b8
cmp dword [0x51064c], 0
jne 0x40d74b
cmp dword [ebp - 0x34], 0
je 0x40d74b
cmp edi, 0xaa
je 0x40d6e2
cmp edi, 0x15
jne 0x40d74b
cmp dword [ebx], 1
jne 0x40d74b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x38]
cmp eax, 0x1388
jae 0x40d74b
push edi
call fcn.0044c5a0
push eax
push dword [ebp + 0xc]
push str.GetConfigDescriptor_i__err_S
push 1
call fcn.00451479
add esp, 0x10
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0xc], 0
je 0x40d731
push dword [ebp - 0xc]
call fcn.0044f5b3
test eax, eax
je 0x40d5b8
push dword [ebx + 4]
push dword [ebp - 0x14]
push dword [ebp + 0xc]
push 2
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.00432be3
mov edi, eax
jmp 0x40d6d5
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 0x40d698
mov eax, dword [ebx + 8]
test eax, eax
jne 0x40d774
cmp dword [ebx + 0x48], eax
jne 0x40d8ac
push eax
call fcn.0044c5a0
push eax
push str.DEVTYPE_BAD_because_GetConfigDescriptor0_failed_with_err_S
push 1
call fcn.00451479
mov eax, dword [ebx + 8]
add esp, 0xc
test eax, eax
je 0x40d7af
push eax
lea edi, [esi + 0xc78]
call fcn.0044c5a0
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 0x40d7c3
lea eax, [esi + 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 [ebx + 0x48], 0
mov eax, dword [ebp - 0x18]
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 [esi + 0x18], ecx
cmp dword [0x51064c], 0
jne 0x40d8a2
cmp dword [ebx + 8], 0
je 0x40d8a2
mov edi, dword [esi + 0x1154]
test edi, edi
je 0x40d8a2
cmp dword [edi], 1
jne 0x40d8a2
cmp dword [edi + 8], 0
jne 0x40d8a2
push 0
lea eax, [ebp - 0x38]
push eax
lea eax, [edi + 0x3a78]
push eax
push 0
push 0x1f
push dword [edi + 0x14]
mov dword [ebp - 0x38], 0x38
call dword [sym.imp.CFGMGR32.dll_CM_Get_DevNode_Registry_PropertyW]
test eax, eax
jne 0x40d8a2
cmp dword [edi + 0x3a7c], 1
jne 0x40d8a2
xor edi, edi
push edi
push ebx
push 0x408d44
call fcn.00429bab
push 0x3e8
push eax
mov dword [esi + 0x11b0], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40d890
lea eax, [ebp + 0xc]
push eax
push dword [esi + 0x11b0]
mov dword [ebp + 0xc], 0x1f
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x40d890
cmp dword [ebp + 0xc], edi
jne 0x40d890
mov byte [esi + 0xc78], 0
push dword [esi + 0x11b0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x11b0], edi
cmp dword [ebx + 0x48], 0
je 0x40da97
mov eax, dword [ebp - 4]
movzx eax, word [eax + 6]
mov ecx, 0x200
cmp ax, cx
jb 0x40d9b1
mov ecx, 0x300
cmp ax, cx
jae 0x40d9b1
cmp dword [esi + 0x1174], 3
jge 0x40d9b1
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x17]
test al, al
jne 0x40d8ef
cmp dword [0x512c80], 0
jne 0x40d8fc
cmp al, 1
jne 0x40d919
cmp dword [0x512c84], 0
je 0x40d919
push str.request_for_device_qualifier_descriptor_skipped
push 3
call fcn.00451479
mov eax, dword [ebp - 0x18]
pop ecx
pop ecx
mov dword [eax + 0x24], 0x2cd
jmp 0x40d9b1
push dword [esi + 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.00431f94
mov edi, dword [ebp - 0x18]
mov dword [edi + 0x24], eax
test eax, eax
jne 0x40d973
cmp byte [ebp - 0x23], 6
jne 0x40d9b1
mov eax, dword [edi + 0x20]
test eax, eax
je 0x40d958
push eax
call fcn.0044b359
pop ecx
push 0xa
call fcn.0044b31e
push 0xa
lea ecx, [ebp - 0x24]
push ecx
push eax
mov dword [edi + 0x20], eax
call fcn.0044b1c8
add esp, 0x10
jmp 0x40d9b1
cmp eax, 0x102
jne 0x40d9a9
lea eax, [esi + 0xd90]
push eax
lea eax, [esi + 0x86c]
push eax
push str.Timeout_requesting_Device_Qualifier_Descriptor_from__s_at__s
push 0xea60
push 1
push dword [0x511014]
call fcn.0040601d
add esp, 0x18
push 0xbb8
jmp 0x40d9ab
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 0x40da78
mov eax, dword [ebx + 0x51c]
mov eax, dword [eax + 0x1148]
mov eax, dword [eax + 0x20]
test eax, eax
je 0x40da78
mov al, byte [eax + 8]
test al, al
jbe 0x40da78
movzx eax, al
push 0x10
pop edi
cmp eax, edi
mov dword [ebp - 0x10], eax
jle 0x40da0e
push edi
push eax
push str.bNumConfigurations_is__i____cut_to__i
push 1
call fcn.00451479
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 0x40da2b
push eax
call fcn.0044b359
and dword [edi], 0
pop ecx
add edi, 4
dec dword [ebp + 0xc]
jne 0x40da1b
and dword [ebp + 0xc], 0
cmp dword [ebp - 0x10], 0
jle 0x40da78
lea edi, [ebx + 0x88]
push dword [esi + 0x1154]
lea eax, [edi + 0x40]
push eax
push dword [ebp + 0xc]
mov eax, dword [ebx + 0x51c]
mov eax, dword [eax + 0x1148]
push 7
push dword [eax]
push dword [ebp + 8]
call fcn.00432be3
inc dword [ebp + 0xc]
mov dword [edi], eax
mov eax, dword [ebp + 0xc]
add edi, 4
cmp eax, dword [ebp - 0x10]
jl 0x40da43
mov ecx, dword [ebp - 4]
mov eax, 0x200
cmp word [ecx + 6], ax
jb 0x40da97
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.0043203c
mov dword [ebx + 0x108], eax
push dword [ebx + 0x51c]
push str.pUsbDev__pTNI0x_08Ix
push 4
pop edi
push edi
call fcn.00451479
add esp, 0xc
call fcn.00451331
mov eax, dword [ebx + 0x51c]
push dword [eax + 0x1154]
push str.pUsbDev__pTNI__pDeviceInfo0x_08Ix
push edi
call fcn.00451479
add esp, 0xc
call fcn.00451331
mov eax, dword [ebx + 0x51c]
mov eax, dword [eax + 0x1154]
test eax, eax
je 0x40daf7
push dword [eax]
push str.pUsbDev__pTNI__pDeviceInfo__bGood_i
push edi
call fcn.00451479
add esp, 0xc
call fcn.00451331
mov ebx, dword [ebx + 0x51c]
mov eax, dword [ebx + 0x1154]
test eax, eax
je 0x40db12
cmp dword [eax], 1
jne 0x40db12
mov ecx, dword [ebx + 0x18]
mov dword [eax + 0x10], ecx
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x17]
mov ebx, dword [ebp - 0x18]
mov dword [ebx + 8], eax
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x40db3b
mov eax, dword [eax + 0xc]
test al, 1
je 0x40db34
mov dword [ebx + 8], 3
test al, 4
je 0x40db3b
mov dword [ebx + 8], edi
mov ecx, dword [ebx + 0x1c]
mov eax, dword [esi + 0x1148]
mov eax, dword [eax + 0x18]
test ecx, ecx
je 0x40dbd1
test eax, eax
je 0x40db68
test dword [eax + 0xc], edi
jne 0x40db68
push str.ConnInfoSSP_available_but_device_is_not_operating_at_SuperSpeedPlus____ConnInfoSSP_must_be_wrong____ignore
push 3
call fcn.00451479
pop ecx
pop ecx
jmp 0x40dbd1
mov eax, dword [ecx + 8]
shr eax, 4
and eax, 3
cmp eax, 3
jne 0x40db83
mov eax, dword [ecx + 0xc]
movzx ecx, word [ecx + 0xa]
inc eax
imul eax, ecx
jmp 0x40db9c
cmp eax, 2
jne 0x40dbd1
mov eax, dword [ecx + 0xc]
movzx ecx, word [ecx + 0xa]
inc eax
imul eax, ecx
xor edx, edx
mov ecx, 0x3e8
div ecx
cmp eax, 5
je 0x40dbc3
cmp eax, 0xa
je 0x40dbb7
cmp eax, 0x14
jne 0x40dbd1
mov eax, dword [ebx + 8]
cmp eax, 6
jg 0x40dbce
push 6
jmp 0x40dbcd
mov eax, dword [ebx + 8]
cmp eax, 5
jg 0x40dbce
push 5
jmp 0x40dbcd
mov eax, dword [ebx + 8]
cmp eax, 3
jg 0x40dbce
push 3
pop eax
mov dword [ebx + 8], eax
mov eax, dword [ebx + 8]
cmp eax, 0xffffffff
jg 0x40dbfe
mov ebx, dword [ebx + 0x18]
test ebx, ebx
je 0x40dc04
mov ebx, dword [ebx + 8]
test bl, 4
je 0x40dbf4
mov dword [esi + 0x1174], 3
jmp 0x40dc04
push 0
test bl, 2
pop eax
setne al
inc eax
mov dword [esi + 0x1174], eax
mov eax, dword [esi + 0x1144]
test eax, eax
je 0x40dc1d
xor ecx, ecx
cmp dword [esi + 0x1174], 3
setge cl
mov dword [eax + 4], ecx
xor eax, eax
inc eax
jmp 0x40dc52
call fcn.0044e479
push eax
lea eax, [esi + 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 [esi + 0x18], 0xb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 0xc], eax
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0xc