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

Disassembly:
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push ebx
push ebx
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], ebx
call dword [sym.imp.SETUPAPI.dll_CM_Locate_DevNodeW]
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x14], eax
xor ebp, ebp
call esi
mov edi, eax
add edi, 5
call esi
mov ecx, edi
sub ecx, eax
cmp ecx, ebx
jle 0x40e174
cmp byte [0x4ae290], bl
jle 0x40e174
cmp ecx, ebx
jbe 0x40e165
cmp ecx, 0x7d0
jbe 0x40e10b
mov ecx, 0x3e8
jmp 0x40e113
cmp ecx, 0x64
jbe 0x40e113
push 0x64
pop ecx
push 0x4bf
push ecx
push ebx
lea eax, [esp + 0x24]
push eax
push ebx
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
jmp 0x40e165
cmp ebp, ebx
jg 0x40e136
call esi
mov ecx, edi
sub ecx, eax
test ecx, ecx
jle 0x40e16d
push 3
push ebx
push ebx
push ebx
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x40e16d
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
cmp ebp, ebx
jle 0x40e165
dec ebp
cmp byte [0x4ae290], bl
jg 0x40e128
xor ebp, ebp
jmp 0x40e0e2
xor ebp, ebp
call esi
mov edi, eax
add edi, 5
cmp dword [esp + 0x14], ebx
je 0x40e21d
call esi
mov ecx, edi
sub ecx, eax
cmp ecx, ebx
jle 0x40e35d
cmp byte [0x4ae290], bl
jle 0x40e35d
cmp ecx, ebx
jbe 0x40e20e
cmp ecx, 0x7d0
jbe 0x40e1b4
mov ecx, 0x3e8
jmp 0x40e1bc
cmp ecx, 0x64
jbe 0x40e1bc
push 0x64
pop ecx
push 0x4bf
push ecx
push ebx
lea eax, [esp + 0x24]
push eax
push ebx
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
jmp 0x40e20e
cmp ebp, ebx
jg 0x40e1df
call esi
mov ecx, edi
sub ecx, eax
test ecx, ecx
jle 0x40e216
push 3
push ebx
push ebx
push ebx
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x40e216
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
cmp ebp, ebx
jle 0x40e20e
dec ebp
cmp byte [0x4ae290], bl
jg 0x40e1d1
xor ebp, ebp
jmp 0x40e187
call esi
mov ecx, edi
sub ecx, eax
cmp ecx, ebx
jle 0x40e2af
cmp byte [0x4ae290], bl
jle 0x40e2af
cmp ecx, ebx
jbe 0x40e2a0
cmp ecx, 0x7d0
jbe 0x40e246
mov ecx, 0x3e8
jmp 0x40e24e
cmp ecx, 0x64
jbe 0x40e24e
push 0x64
pop ecx
push 0x4bf
push ecx
push ebx
lea eax, [esp + 0x24]
push eax
push ebx
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
jmp 0x40e2a0
cmp ebp, ebx
jg 0x40e271
call esi
mov ecx, edi
sub ecx, eax
test ecx, ecx
jle 0x40e2a8
push 3
push ebx
push ebx
push ebx
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x40e2a8
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
cmp ebp, ebx
jle 0x40e2a0
dec ebp
cmp byte [0x4ae290], bl
jg 0x40e263
xor ebp, ebp
jmp 0x40e21d
push ebx
push dword [esp + 0x14]
call dword [sym.imp.SETUPAPI.dll_CM_Reenumerate_DevNode]
xor ebp, ebp
test eax, eax
je 0x40e364
call esi
mov edi, eax
add edi, 5
call esi
mov ecx, edi
sub ecx, eax
cmp ecx, ebx
jle 0x40e35d
cmp byte [0x4ae290], bl
jle 0x40e35d
cmp ecx, ebx
jbe 0x40e34e
cmp ecx, 0x7d0
jbe 0x40e2f4
mov ecx, 0x3e8
jmp 0x40e2fc
cmp ecx, 0x64
jbe 0x40e2fc
push 0x64
pop ecx
push 0x4bf
push ecx
push ebx
lea eax, [esp + 0x24]
push eax
push ebx
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
jmp 0x40e34e
cmp ebp, ebx
jg 0x40e31f
call esi
mov ecx, edi
sub ecx, eax
test ecx, ecx
jle 0x40e356
push 3
push ebx
push ebx
push ebx
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x40e356
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
cmp ebp, ebx
jle 0x40e34e
dec ebp
cmp byte [0x4ae290], bl
jg 0x40e311
xor ebp, ebp
jmp 0x40e2cb
xor eax, eax
jmp 0x40e400
call esi
mov edi, eax
add edi, 5
call esi
mov ecx, edi
sub ecx, eax
cmp ecx, ebx
jle 0x40e3fd
cmp byte [0x4ae290], bl
jle 0x40e3fd
cmp ecx, ebx
jbe 0x40e3ee
cmp ecx, 0x7d0
jbe 0x40e394
mov ecx, 0x3e8
jmp 0x40e39c
cmp ecx, 0x64
jbe 0x40e39c
push 0x64
pop ecx
push 0x4bf
push ecx
push ebx
lea eax, [esp + 0x24]
push eax
push ebx
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
jmp 0x40e3ee
cmp ebp, ebx
jg 0x40e3bf
call esi
mov ecx, edi
sub ecx, eax
test ecx, ecx
jle 0x40e3f6
push 3
push ebx
push ebx
push ebx
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x40e3f6
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
cmp ebp, ebx
jle 0x40e3ee
dec ebp
cmp byte [0x4ae290], bl
jg 0x40e3b1
xor ebp, ebp
jmp 0x40e36b
xor eax, eax
inc eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret