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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x874
push ebx
push esi
push edi
push dword [ebp + 0xc]
xor ebx, ebx
lea edi, [ebp - 4]
mov esi, eax
mov dword [ebp - 4], ebx
call fcn.0040da85
cmp dword [ebp - 4], ebx
mov dword [ebp - 0x10], eax
je 0x40ddab
push 0x7fe
lea eax, [ebp - 0x86e]
push ebx
push eax
mov word [ebp - 0x870], bx
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x20
push esi
mov dword [ebp + 0xc], esi
mov dword [ebp - 0x14], ebx
call sub.msvcrt.dll_wcschr
test eax, eax
pop ecx
pop ecx
jne 0x40dbf9
push esi
push str.SELECT__FROM__s
lea eax, [ebp - 0x870]
push 0x3ff
push eax
call sub.msvcrt.dll__snwprintf
lea eax, [ebp - 0x870]
mov dword [ebp + 0xc], eax
add esp, 0x10
lea eax, [ebp - 0x50]
call fcn.004041d1
push eax
mov eax, dword [ebp - 4]
push esi
call fcn.0040dade
mov edi, dword [ebp + 8]
mov eax, dword [edi]
lea ecx, [ebp - 0x50]
push ecx
mov ecx, edi
call dword [eax + 0xc]
lea esi, [ebp - 0x50]
call fcn.004041f3
jmp 0x40dc03
mov edi, dword [ebp + 8]
mov dword [ebp - 0x14], 1
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
lea edx, [ebp - 0xc]
push edx
push ebx
push 0x30
push dword [ebp + 0xc]
mov dword [edi + 0x1c], eax
mov eax, dword [ebp - 4]
push 0x4114f8
mov dword [ebp - 0xc], ebx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x50]
cmp dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], eax
je 0x40dda2
push dword [ebp - 0xc]
call fcn.0040da6c
lea eax, [edi + 4]
push eax
push 0x40f79c
push 1
push ebx
push 0x40f81c
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov dword [ebp - 0x18], ebx
mov dword [ebp + 8], ebx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
lea edx, [ebp - 0x18]
push edx
lea edx, [ebp + 8]
push edx
push 1
push 0x7530
push eax
call dword [ecx + 0x10]
cmp eax, 1
mov dword [ebp - 0x10], eax
jne 0x40dc7b
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x18], ebx
je 0x40dd7d
cmp dword [ebp - 0x14], ebx
je 0x40dcfc
lea eax, [ebp - 0x70]
mov dword [ebp - 0x14], ebx
call fcn.004041d1
mov esi, dword [ebp + 8]
cmp esi, ebx
je 0x40dce9
mov eax, dword [esi]
push 0x40
push esi
call dword [eax + 0x20]
mov dword [ebp + 0xc], ebx
jmp 0x40dccb
cmp dword [ebp + 0xc], ebx
je 0x40dcc1
push dword [ebp + 0xc]
lea eax, [ebp - 0x70]
call fcn.00404219
push dword [ebp + 0xc]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [esi]
push ebx
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x40]
push ecx
lea ecx, [ebp + 0xc]
push ecx
push ebx
push esi
call dword [eax + 0x24]
test eax, eax
je 0x40dca8
mov eax, dword [esi]
push esi
call dword [eax + 0x28]
mov eax, dword [edi]
lea ecx, [ebp - 0x70]
push ecx
mov ecx, edi
call dword [eax + 0xc]
lea esi, [ebp - 0x70]
call fcn.004041f3
cmp dword [ebp + 8], ebx
je 0x40dc58
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push 0x40
push eax
call dword [ecx + 0x20]
mov dword [ebp - 8], ebx
jmp 0x40dd44
push dword [ebp - 0x1c]
mov eax, dword [edi]
lea ecx, [ebp - 0x30]
push ecx
push dword [ebp - 8]
mov ecx, edi
call dword [eax]
cmp dword [ebp - 8], ebx
je 0x40dd3a
push dword [ebp - 8]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ebx
lea edx, [ebp - 0x1c]
push edx
lea edx, [ebp - 0x30]
push edx
lea edx, [ebp - 8]
push edx
push ebx
push eax
call dword [ecx + 0x24]
test eax, eax
je 0x40dd1c
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x28]
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 8]
jmp 0x40dc58
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x40dd8d
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [edi + 4], ebx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
sub eax, dword [edi + 0x1c]
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
leave
ret 8