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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 7
push 0
push 0
dec ecx
jne 0x498588
push ecx
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
call fcn.004045b0
xor eax, eax
push ebp
push 0x49885b
push dword fs:[eax]
mov dword fs:[eax], esp
xor edx, edx
push ebp
push 0x4987c5
push dword fs:[edx]
mov dword fs:[edx], esp
xor eax, eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 8]
call fcn.00404198
call sub.kernel32.dll_GetTickCount_1
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
cmp byte [eax], 0x2b
jne 0x4986d7
mov eax, dword [ebp - 0xc]
call fcn.004043c0
cmp eax, 2
jl 0x4987a5
mov eax, dword [ebp - 0xc]
mov al, byte [eax + 1]
sub al, 0x2d
je 0x498610
sub al, 0x15
je 0x498610
sub al, 0xb
je 0x498695
sub al, 7
jne 0x4986c0
mov dword [ebp - 0x1c], 1
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
call fcn.004043c0
mov ecx, eax
sub ecx, 2
mov edx, 3
mov eax, dword [ebp - 0xc]
call fcn.00404620
or edx, 0xffffffff
mov eax, dword [ebp - 0x10]
call fcn.00496afc
mov ebx, eax
mov edx, ebx
mov eax, dword [0x4a6f40]
call fcn.00497d74
mov ebx, eax
test ebx, ebx
je 0x4987a5
mov dword [ebp - 0x1c], 2
mov eax, dword [ebx]
test eax, eax
je 0x49867e
cmp byte [eax + 8], 0
je 0x49867e
mov dword [ebp - 0x1c], 3
call fcn.00472da4
mov dword [ebp - 0x1c], 4
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
mov dword [edx + 0x68], eax
mov eax, dword [ebp - 4]
mov byte [eax + 0x6c], 0
jmp 0x4987a5
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0xc]
call fcn.004043c0
mov ecx, eax
sub ecx, 2
mov edx, 3
mov eax, dword [ebp - 0xc]
call fcn.00404620
mov eax, dword [ebp - 0x14]
call fcn.00499424
jmp 0x4987a5
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
mov dword [edx + 0x68], eax
mov eax, dword [ebp - 4]
mov byte [eax + 0x6c], 0
jmp 0x4987a5
push 0
lea eax, [ebp - 0x24]
push eax
mov byte [ebp - 0x28], 0x2f
lea ecx, [ebp - 0x28]
lea edx, [ebp - 0x10]
mov eax, dword [ebp - 0xc]
call fcn.00496b9c
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 0xc]
call fcn.00404198
push 0
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 0x28], 0x2f
lea ecx, [ebp - 0x28]
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 0xc]
call fcn.00496b9c
mov edx, dword [ebp - 0x2c]
lea eax, [ebp - 0xc]
call fcn.00404198
or edx, 0xffffffff
mov eax, dword [ebp - 0x10]
call fcn.00496afc
mov ebx, eax
mov eax, dword [0x4a6f40]
call fcn.00497e58
xor edx, edx
push ebp
push 0x49879e
push dword fs:[edx]
mov dword fs:[edx], esp
mov edx, ebx
mov eax, dword [0x4a6f40]
call fcn.00497d74
mov ebx, eax
test ebx, ebx
je 0x498786
mov eax, dword [ebx + 0x38]
mov edx, dword [ebp - 0x20]
call fcn.0040450c
jne 0x498786
mov dword [ebp - 0x1c], 0xb
mov eax, dword [ebx]
test eax, eax
je 0x49877f
cmp byte [eax + 8], 0
je 0x49877f
mov eax, dword [ebx + 0x28]
mov edx, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov dword [ebp - 0x1c], 0xc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4987a5
mov eax, dword [0x4a6f40]
call fcn.00497e64
ret
mov dword [ebp - 0x1c], 0xd
mov eax, dword [ebp - 4]
call fcn.00497f98
mov dword [ebp - 0x1c], 0xe
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x498801
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [ebp - 0x18]
cmp eax, dword [0x4a6f9c]
jbe 0x498816
mov dword [0x4a6f9c], eax
cmp dword [0x4a6f9c], 0x32
jbe 0x498826
sub dword [0x4a6f9c], 0x32
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x498862
lea eax, [ebp - 0x34]
mov edx, 3
call fcn.00404124
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.00404124
lea eax, [ebp - 0x14]
mov edx, 4
call fcn.00404124
ret