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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 5
push 0
push 0
dec ecx
jne 0x501fa0
push ebx
push esi
push edi
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x502296
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
add eax, 0x40
push eax
call sub.kernel32.dll_EnterCriticalSection_1
xor eax, eax
push ebp
push 0x502274
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x5c]
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x58]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x5c]
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x58]
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [ebp - 4]
cmp dword [eax + 0x70], 0
je 0x5020d6
mov eax, dword [ebp - 4]
cmp byte [eax + 0x74], 0
je 0x5020d6
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x5c]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x5020d6
inc eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
lea ecx, [ebp - 0x10]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x5c]
mov edx, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
cmp dword [ebp - 0x10], 0
je 0x5020ca
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x5c]
mov edx, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0x18]
push eax
call sub.kernel32.dll_GetTickCount_1
pop edx
sub eax, edx
cmp eax, 0x64
jae 0x5020ca
lea ecx, [ebp - 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x5c]
mov edx, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x14]
call fcn.0040c448
test al, al
je 0x5020ca
xor eax, eax
push ebp
push 0x5020c0
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
lea ecx, [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x5c]
mov edx, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x70]
xor ecx, ecx
call fcn.00480840
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5020ca
inc dword [ebp - 8]
dec dword [ebp - 0xc]
jne 0x502035
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x64]
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x60]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x64]
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x60]
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x64]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x50225a
inc eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
lea ecx, [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x64]
mov edx, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
cmp dword [ebp - 0x1c], 0
je 0x50224e
cmp byte [0x54204c], 0
je 0x5021f9
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x64]
mov edx, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0x18]
push eax
call sub.kernel32.dll_GetTickCount_1
pop edx
sub eax, edx
cmp eax, 0xbb8
jbe 0x5021c6
mov byte [0x54204c], 0
xor eax, eax
push ebp
push 0x5021b7
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x544b8c]
cmp dword [eax + 0x28], 0
je 0x5021aa
push 1
push 0
lea ecx, [ebp - 0x20]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x64]
mov edx, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x20]
call fcn.00405550
push eax
mov eax, dword [0x544b8c]
mov eax, dword [eax + 0x28]
call eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x50224e
lea ecx, [ebp - 0x24]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x64]
mov edx, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x64]
mov edx, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov ecx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x60]
pop edx
mov ebx, dword [eax]
call dword [ebx + 0x3c]
jmp 0x50224e
xor eax, eax
push ebp
push 0x502244
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x544b8c]
cmp dword [eax + 0x28], 0
je 0x50223a
push 1
push 0
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x64]
mov edx, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x28]
call fcn.00405550
push eax
mov eax, dword [0x544b8c]
mov eax, dword [eax + 0x28]
call eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x50224e
inc dword [ebp - 8]
dec dword [ebp - 0xc]
jne 0x50211c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50227b
mov eax, dword [ebp - 4]
add eax, 0x40
push eax
call sub.kernel32.dll_LeaveCriticalSection_1
ret