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

Disassembly:
sub esp, 0x1c
mov eax, dword [0x6ddfa0]
xor eax, dword [esp + 0x1c]
mov dword [esp], 0
mov dword [esp + 0x18], eax
cmp dword [esi + 0x80], 2
jne 0x65db54
mov eax, dword [esi + 0x6c]
push 0
push 0
push 0x73746174
push eax
call fcn.00656520
add esp, 0x10
test eax, eax
jle 0x65db54
mov dword [esi + 0x80], 4
cmp dword [esi + 0x80], 3
push ebx
push edi
jne 0x65dbac
mov eax, dword [esi + 0x6c]
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x14]
push edx
push eax
mov dword [esp + 0x18], 0x10
call fcn.00656360
mov edi, eax
add esp, 0xc
test edi, edi
je 0x65dbac
mov ecx, dword [esi + 0x6c]
push ecx
call fcn.00656270
push fcn.0065dea0
push esi
push 0x64
push 2
push edi
mov dword [esi + 0x6c], edi
call fcn.006566f0
add esp, 0x18
mov dword [esi + 0x80], 4
cmp dword [esi + 0x80], 4
jne 0x65dce7
lea esp, [esp]
mov ecx, dword [esi + 0x94]
mov eax, dword [esi + 0x8c]
add eax, ecx
cdq
idiv dword [esi + 0x90]
cmp edx, dword [esi + 0x98]
je 0x65dce7
mov edi, dword [esi + 0x9c]
add edi, ecx
mov ecx, dword [esi + 0x88]
mov eax, 2
cmp ecx, eax
lea edx, [ecx + edi + 4]
jl 0x65dc03
movsx eax, word [edi + 4]
add eax, 2
push 0
push 0
push 0
sub eax, ecx
push eax
push edx
mov edx, dword [esi + 0x6c]
push edx
call fcn.00656490
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x65dce7
jl 0x65dcdd
call sub.KERNEL32.dll_GetTickCount
mov ecx, dword [esi + 0x88]
test ecx, ecx
mov dword [esi + 0xc4], eax
jne 0x65dc40
mov dword [edi], eax
mov eax, dword [esp + 8]
mov edx, dword [esi + 0x88]
add eax, ebx
add edx, ebx
mov dword [esp + 8], eax
mov eax, edx
cmp eax, 2
mov dword [esi + 0x88], edx
jl 0x65dcce
movsx ecx, word [edi + 4]
add ecx, 2
cmp eax, ecx
jl 0x65dcce
mov dword [esi + 0x88], 0
cmp word [edi + 4], 0
je 0x65dcce
mov edx, dword [esi + 0x1fc]
mov eax, dword [esi + 0x94]
inc edx
mov dword [esi + 0x1fc], edx
add eax, dword [esi + 0x8c]
cdq
idiv dword [esi + 0x90]
mov eax, dword [esi + 0x3c]
test eax, eax
mov dword [esi + 0x94], edx
je 0x65dcba
mov ecx, dword [edi]
movsx edx, word [edi + 4]
push ecx
push edx
add edi, 6
push edi
push esi
call eax
add esp, 0x10
mov eax, dword [esi + 0x1fc]
dec eax
mov dword [esi + 0x1fc], eax
or dword [esi + 0x200], 1
cmp dword [esi + 0x80], 4
je 0x65dbc0
jmp 0x65dce7
mov dword [esi + 0x80], 5
mov eax, dword [esi + 0x80]
mov ebx, 4
cmp eax, ebx
jne 0x65de3b
mov eax, dword [esi + 0xa4]
test eax, eax
jge 0x65dd58
mov ecx, dword [esi + 0xb0]
cmp ecx, dword [esi + 0xb4]
jne 0x65dd58
call sub.KERNEL32.dll_GetTickCount
mov edx, dword [esi + 0xc0]
add edx, 0x32
cmp eax, edx
jbe 0x65dd58
mov edi, dword [esi + 0xb8]
add edi, dword [esi + 0xb0]
call sub.KERNEL32.dll_GetTickCount
mov dword [edi], eax
mov word [edi + 4], 0
mov ecx, dword [esi + 0xb0]
mov eax, dword [esi + 0xa8]
add eax, ecx
cdq
idiv dword [esi + 0xac]
mov dword [esi + 0xb0], edx
cmp dword [esi + 0x80], ebx
jne 0x65de3b
mov eax, dword [esi + 0xa4]
test eax, eax
jge 0x65ddaa
mov edx, dword [esi + 0xb4]
cmp dword [esi + 0xb0], edx
je 0x65de3b
mov ecx, dword [esi + 0x38]
test ecx, ecx
mov dword [esi + 0xa4], 0
je 0x65ddaa
mov eax, dword [esi + 0xb8]
add eax, edx
movsx edx, word [eax + 4]
push 0
push edx
add eax, 6
push eax
push esi
call ecx
add esp, 0x10
mov eax, dword [esi + 0xb4]
mov edi, dword [esi + 0xb8]
mov ecx, dword [esi + 0xa4]
add edi, eax
movsx eax, word [edi + 4]
push 0
push 0
sub eax, ecx
add eax, 2
push 0
push eax
mov eax, dword [esi + 0x6c]
lea edx, [ecx + edi + 4]
push edx
push eax
call fcn.00656410
mov ebx, eax
add esp, 0x18
test ebx, ebx
jle 0x65de3b
call sub.KERNEL32.dll_GetTickCount
mov dword [esi + 0xc0], eax
mov eax, dword [esi + 0xa4]
add eax, ebx
mov dword [esi + 0xa4], eax
movsx ecx, word [edi + 4]
add ecx, 2
cmp eax, ecx
jne 0x65de2e
mov ecx, dword [esi + 0xb4]
mov eax, dword [esi + 0xa8]
add eax, ecx
cdq
idiv dword [esi + 0xac]
mov dword [esi + 0xa4], 0xffffffff
mov dword [esi + 0xb4], edx
cmp dword [esi + 0x80], 4
je 0x65dd64
mov eax, dword [esi + 0x1fc]
test eax, eax
pop edi
pop ebx
jne 0x65de86
mov ecx, dword [esi + 0x200]
test ecx, ecx
je 0x65de86
mov edx, dword [esi + 0x1fc]
mov eax, dword [esi + 0x204]
inc edx
test eax, eax
mov dword [esi + 0x1fc], edx
je 0x65de6f
push ecx
push esi
call eax
add esp, 8
mov eax, dword [esi + 0x1fc]
dec eax
mov dword [esi + 0x1fc], eax
mov dword [esi + 0x200], 0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp]
xor ecx, dword [esp + 0x1c]
add esp, 0x1c
jmp fcn.006684c2