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

Disassembly:
mov eax, 0x2009c98d
call fcn.2007d394
sub esp, 0x90
push ebx
push esi
mov ebx, ecx
push edi
lea eax, [ebx + 8]
push eax
lea ecx, [ebp - 0x2c]
call fcn.200011c0
and dword [ebp - 4], 0
mov eax, dword [ebp + 0xc]
and dword [ebp - 0x18], 0
cmp eax, dword [ebx + 0x3c]
jne 0x2001f2b8
mov ecx, dword [ebx + 0x48]
mov dword [ebp - 0x18], ecx
push eax
mov ecx, ebx
call fcn.2001bb16
mov esi, eax
test esi, esi
je 0x2001f5a6
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
xor edx, edx
div ecx
push dword [esi + 8]
xor ecx, ecx
test edx, edx
setne cl
add ecx, eax
mov dword [ebp - 0x24], ecx
lea ecx, [ebp - 0x28]
call fcn.200011c0
mov byte [ebp - 4], 1
mov eax, dword [esi + 0xc]
lea edx, [eax + 0xfa0]
mov ecx, 0x1770
cmp edx, ecx
mov dword [ebp - 0x10], edx
jge 0x2001f307
mov dword [ebp - 0x10], ecx
mov ecx, 0x3e80
cmp dword [ebp - 0x10], ecx
jle 0x2001f314
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebx + 0x3c]
lea edx, [ecx + 0x1e]
cmp dword [ebp + 0xc], edx
jae 0x2001f328
add dword [ebp - 0x10], 0x7d0
jmp 0x2001f337
add ecx, 0x3c
cmp dword [ebp + 0xc], ecx
jae 0x2001f337
add dword [ebp - 0x10], 0x3e8
cmp eax, 0x800
ja 0x2001f349
mov eax, dword [ebp - 0x10]
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x18]
cmp dword [ebp - 0x10], eax
jbe 0x2001f354
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x38]
mov ecx, dword [eax]
and dword [ebp - 0x1c], 0
and dword [ebp - 0x20], 0
mov dword [ebp + 0x18], ecx
jmp 0x2001f3bd
lea edi, [ecx + 0x10]
mov ax, word [edi + 0xe]
cmp ax, word [edi + 0xc]
mov ecx, dword [ecx + 0xc]
mov dword [ebp - 0x14], ecx
jae 0x2001f3af
push ecx
mov ecx, dword [ebp + 8]
call fcn.2003ab56
test eax, eax
je 0x2001f3af
push dword [ebp - 0x14]
lea ecx, [esi + 0x40]
call fcn.2003ab56
test eax, eax
jne 0x2001f3af
push dword [ebp - 0x10]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
push eax
mov ecx, edi
call fcn.2001e6f5
test eax, eax
jne 0x2001f57f
lea ecx, [ebp + 0x18]
call fcn.2006f271
mov eax, dword [esi + 0x38]
mov ecx, dword [ebp + 0x18]
cmp ecx, eax
jne 0x2001f366
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
push eax
call fcn.2007e612
pop ecx
call fcn.2007e61f
mov ecx, dword [ebx + 0x3c]
add ecx, 0x3c
cmp dword [ebp + 0xc], ecx
movzx eax, ax
jae 0x2001f3e5
xor eax, eax
mov ecx, dword [ebp - 0x24]
sub ecx, dword [ebp - 0x18]
xor edx, edx
div ecx
mov eax, edx
add eax, dword [ebp - 0x18]
xor edx, edx
div dword [ebp - 0x24]
mov ebx, edx
call edi
mov dword [ebp + 0xc], ebx
dec ebx
mov dword [ebp + 0x18], ebx
mov dword [ebp - 0x30], eax
xor ebx, ebx
mov eax, dword [ebp + 0x18]
cmp eax, dword [ebp - 0x18]
mov eax, dword [ebp + 0xc]
jge 0x2001f41d
cmp eax, dword [ebp - 0x24]
jge 0x2001f591
xor edi, edi
cmp eax, dword [ebp - 0x24]
jge 0x2001f447
mov ecx, dword [ebp + 8]
push eax
call fcn.2003ab56
test eax, eax
je 0x2001f444
push dword [ebp + 0xc]
lea ecx, [esi + 0x40]
call fcn.2003ab56
test eax, eax
jne 0x2001f444
mov ebx, dword [ebp + 0xc]
inc edi
inc dword [ebp + 0xc]
mov eax, dword [ebp + 0x18]
cmp eax, dword [ebp - 0x18]
jl 0x2001f476
test edi, edi
jne 0x2001f47a
mov ecx, dword [ebp + 8]
push eax
call fcn.2003ab56
test eax, eax
je 0x2001f473
push dword [ebp + 0x18]
lea ecx, [esi + 0x40]
call fcn.2003ab56
test eax, eax
jne 0x2001f473
mov ebx, dword [ebp + 0x18]
inc edi
dec dword [ebp + 0x18]
test edi, edi
je 0x2001f409
mov edi, dword [esi + 0x38]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x38]
lea ecx, [esi + 0x34]
push eax
mov dword [ebp - 0x14], ebx
call fcn.2001b5db
cmp dword [eax], edi
jne 0x2001f409
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x34]
push eax
lea ecx, [esi + 0x28]
xor edi, edi
mov dword [ebp - 0x14], ebx
call fcn.2001b667
mov eax, dword [eax]
cmp eax, dword [esi + 0x2c]
je 0x2001f4b7
mov edi, dword [eax + 0x10]
mov eax, dword [ebp - 0x30]
sub eax, edi
cmp eax, dword [ebp - 0x10]
jle 0x2001f409
cmp edi, 0xffffffff
je 0x2001f409
lea ecx, [ebp - 0x54]
call fcn.2001e98e
mov byte [ebp - 4], 2
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0x14], ebx
call fcn.2001ebb4
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x7c]
call fcn.2001eaaa
mov byte [ebp - 4], 4
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x5c]
push eax
lea ecx, [esi + 0x34]
call fcn.2001f16a
mov edi, dword [eax]
add edi, 0x10
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x7c]
call fcn.2001e6cf
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x9c]
call fcn.2001e6cf
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
mov ecx, edx
imul ecx, ebx
sub eax, ecx
cmp eax, edx
jbe 0x2001f544
mov eax, edx
push 0x400
push eax
push ecx
push dword [esi + 0xb0]
mov ecx, edi
call fcn.2001c1b5
push dword [ebp - 0x10]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
push eax
mov ecx, edi
call fcn.2001e6f5
test eax, eax
jne 0x2001f5ce
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x54]
call fcn.2001e6a9
jmp 0x2001f409
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x1c]
mov dword [eax], ecx
jmp 0x2001f5ea
mov byte [ebp - 4], 0
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x2001f5a6
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
dec dword [esi + 0x18]
or dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x2c]
test esi, esi
je 0x2001f5bb
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
dec dword [esi + 0x18]
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x14
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp + 0x10]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp + 0x14]
mov dword [eax], ecx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x54]
call fcn.2001e6a9
mov byte [ebp - 4], 0
mov esi, dword [ebp - 0x28]
test esi, esi
mov edi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
je 0x2001f601
push esi
call edi
dec dword [esi + 0x18]
or dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x2c]
test esi, esi
je 0x2001f612
push esi
call edi
dec dword [esi + 0x18]
xor eax, eax
inc eax
jmp 0x2001f5bd