Function at 0x40d3dd
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 0x40d49c
cmp byte [0x4a5290], bl
jle 0x40d49c
cmp ecx, ebx
jbe 0x40d48d
cmp ecx, 0x7d0
jbe 0x40d433
mov ecx, 0x3e8
jmp 0x40d43b
cmp ecx, 0x64
jbe 0x40d43b
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 0x40d48d
cmp ebp, ebx
jg 0x40d45e
call esi
mov ecx, edi
sub ecx, eax
test ecx, ecx
jle 0x40d495
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 0x40d495
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 0x40d48d
dec ebp
cmp byte [0x4a5290], bl
jg 0x40d450
xor ebp, ebp
jmp 0x40d40a
xor ebp, ebp
call esi
mov edi, eax
add edi, 5
cmp dword [esp + 0x14], ebx
je 0x40d545
call esi
mov ecx, edi
sub ecx, eax
cmp ecx, ebx
jle 0x40d685
cmp byte [0x4a5290], bl
jle 0x40d685
cmp ecx, ebx
jbe 0x40d536
cmp ecx, 0x7d0
jbe 0x40d4dc
mov ecx, 0x3e8
jmp 0x40d4e4
cmp ecx, 0x64
jbe 0x40d4e4
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 0x40d536
cmp ebp, ebx
jg 0x40d507
call esi
mov ecx, edi
sub ecx, eax
test ecx, ecx
jle 0x40d53e
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 0x40d53e
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 0x40d536
dec ebp
cmp byte [0x4a5290], bl
jg 0x40d4f9
xor ebp, ebp
jmp 0x40d4af
call esi
mov ecx, edi
sub ecx, eax
cmp ecx, ebx
jle 0x40d5d7
cmp byte [0x4a5290], bl
jle 0x40d5d7
cmp ecx, ebx
jbe 0x40d5c8
cmp ecx, 0x7d0
jbe 0x40d56e
mov ecx, 0x3e8
jmp 0x40d576
cmp ecx, 0x64
jbe 0x40d576
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 0x40d5c8
cmp ebp, ebx
jg 0x40d599
call esi
mov ecx, edi
sub ecx, eax
test ecx, ecx
jle 0x40d5d0
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 0x40d5d0
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 0x40d5c8
dec ebp
cmp byte [0x4a5290], bl
jg 0x40d58b
xor ebp, ebp
jmp 0x40d545
push ebx
push dword [esp + 0x14]
call dword [sym.imp.SETUPAPI.dll_CM_Reenumerate_DevNode]
xor ebp, ebp
test eax, eax
je 0x40d68c
call esi
mov edi, eax
add edi, 5
call esi
mov ecx, edi
sub ecx, eax
cmp ecx, ebx
jle 0x40d685
cmp byte [0x4a5290], bl
jle 0x40d685
cmp ecx, ebx
jbe 0x40d676
cmp ecx, 0x7d0
jbe 0x40d61c
mov ecx, 0x3e8
jmp 0x40d624
cmp ecx, 0x64
jbe 0x40d624
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 0x40d676
cmp ebp, ebx
jg 0x40d647
call esi
mov ecx, edi
sub ecx, eax
test ecx, ecx
jle 0x40d67e
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 0x40d67e
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 0x40d676
dec ebp
cmp byte [0x4a5290], bl
jg 0x40d639
xor ebp, ebp
jmp 0x40d5f3
xor eax, eax
jmp 0x40d728
call esi
mov edi, eax
add edi, 5
call esi
mov ecx, edi
sub ecx, eax
cmp ecx, ebx
jle 0x40d725
cmp byte [0x4a5290], bl
jle 0x40d725
cmp ecx, ebx
jbe 0x40d716
cmp ecx, 0x7d0
jbe 0x40d6bc
mov ecx, 0x3e8
jmp 0x40d6c4
cmp ecx, 0x64
jbe 0x40d6c4
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 0x40d716
cmp ebp, ebx
jg 0x40d6e7
call esi
mov ecx, edi
sub ecx, eax
test ecx, ecx
jle 0x40d71e
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 0x40d71e
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 0x40d716
dec ebp
cmp byte [0x4a5290], bl
jg 0x40d6d9
xor ebp, ebp
jmp 0x40d693
xor eax, eax
inc eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret