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

Disassembly:
push 0xffffffffffffffff
push 0x100a1fc8
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov eax, dword [0x100c60c8]
xor eax, esp
push eax
lea eax, [esp + 0x3c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x4c]
cmp dword [ebp + 0x1c], 0
je 0x1002ec9a
mov al, byte [ebp + 0x14]
test al, al
jne 0x1002ec9a
mov byte [esp + 0x16], al
jmp 0x1002ea5a
mov ebp, dword [esp + 0x4c]
lea eax, [ebp + 0x20]
xor esi, esi
cmp eax, esi
mov dword [esp + 0x1c], eax
je 0x1002ea74
mov eax, dword [eax]
cmp eax, esi
je 0x1002ea74
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x44], esi
mov dword [esp + 0x20], esi
mov byte [esp + 0x44], 1
mov eax, dword [ebp + 0x60]
mov edi, dword [eax]
add ebp, 0x5c
mov ebx, ebp
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], ebx
test ebx, ebx
mov esi, dword [ebp + 4]
je 0x1002ea9e
cmp ebx, ebp
je 0x1002eaa4
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp edi, esi
je 0x1002ec24
test ebx, ebx
mov esi, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
jne 0x1002eab8
call esi
cmp edi, dword [ebx + 4]
jne 0x1002eabf
call esi
cmp edi, dword [ebx + 4]
mov ecx, dword [edi + 0x10]
mov dword [esp + 0x24], ecx
jne 0x1002eacd
call esi
mov eax, dword [edi + 0x144]
cmp eax, 1
je 0x1002eae7
cmp eax, 2
je 0x1002eae7
cmp eax, 4
je 0x1002eae7
cmp eax, 5
jne 0x1002eb08
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ecx, ecx
sub eax, dword [edi + 0x148]
sbb ecx, dword [edi + 0x14c]
test ecx, ecx
ja 0x1002eb1e
jb 0x1002eb08
cmp eax, 0xea60
ja 0x1002eb1e
lea esi, [esp + 0x28]
call fcn.10033080
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
jmp 0x1002ea93
mov esi, dword [edi + 0x18]
test esi, esi
je 0x1002eb31
mov edx, dword [esi]
mov eax, dword [edx]
mov ecx, esi
call eax
mov dword [esp + 0x20], esi
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x4c]
push 1
push 0
push ecx
push edx
call fcn.100314c0
mov ebp, dword [edi + 0x144]
cmp ebp, 1
mov eax, dword [edi + 0x20]
mov dword [esp + 0x24], eax
je 0x1002eb5b
cmp ebp, 2
jne 0x1002eb62
mov ebp, 0x66
jmp 0x1002eb71
cmp ebp, 4
je 0x1002eb6c
cmp ebp, 5
jne 0x1002eb71
mov ebp, 0x68
mov ecx, dword [esp + 0x4c]
add ecx, 0x84
push ecx
lea eax, [esp + 0x28]
call fcn.100327b0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add dword [esi + 8], 1
push edi
mov dword [esi], eax
mov eax, dword [esp + 0x50]
push ebx
lea edx, [esp + 0x38]
push edx
add eax, 0x5c
push eax
mov dword [esi + 4], 0
mov dword [esi + 0xc], ebp
call fcn.10031f80
mov esi, dword [esp + 0x20]
test esi, esi
je 0x1002ec24
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x1002ebda
mov edi, dword [edi]
test edi, edi
je 0x1002ebce
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x1c], 0
mov edi, dword [esp + 0x1c]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
mov ecx, esi
call edx
mov byte [esp + 0x16], 1
mov byte [esp + 0x44], 0
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
mov dword [esp + 0x44], 0xffffffff
test edi, edi
je 0x1002ea56
mov eax, dword [esp + 0x1c]
mov eax, dword [eax]
test eax, eax
je 0x1002ec17
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x1c], 0
jmp 0x1002ea56
or ebp, 0xffffffff
mov dword [esp + 0x44], ebp
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x1002ec48
mov eax, dword [eax]
test eax, eax
je 0x1002ec40
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x1c], 0
mov edi, dword [esp + 0x4c]
lea esi, [edi + 0x20]
test esi, esi
mov dword [esp + 0x18], esi
je 0x1002ec64
mov eax, dword [esi]
test eax, eax
je 0x1002ec64
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x44], 2
cmp dword [edi + 0x1c], 0
je 0x1002ec7d
mov cl, byte [edi + 0x14]
test cl, cl
je 0x1002eca1
mov esi, dword [esp + 0x18]
mov dword [esp + 0x44], ebp
test esi, esi
je 0x1002ec9a
mov esi, dword [esi]
test esi, esi
je 0x1002ec92
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x18], 0
xor al, al
jmp 0x1002eda2
cmp byte [esp + 0x16], 0
je 0x1002ed7f
cmp dword [edi + 0x64], 0
jne 0x1002ed7f
lea edx, [esp + 0x17]
xor bl, bl
push edx
mov esi, edi
mov byte [esp + 0x1b], bl
call fcn.1002e690
test al, al
je 0x1002ecce
mov bl, 1
cmp byte [esp + 0x17], 0
je 0x1002ece9
push 4
mov ecx, edi
call fcn.1002d0d0
cmp dword [edi + 0x1c], 0
je 0x1002eced
mov al, byte [edi + 0x14]
jmp 0x1002eced
test bl, bl
je 0x1002ed15
mov dword [esp + 0x44], ebp
mov eax, dword [esp + 0x18]
test eax, eax
je 0x1002ed0e
mov eax, dword [eax]
test eax, eax
je 0x1002ed06
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x18], 0
xor al, al
jmp 0x1002eda2
xor esi, esi
push esi
push esi
push edi
call fcn.1002e130
test al, al
jne 0x1002ed60
mov eax, edi
call fcn.1002e640
test al, al
jne 0x1002ed3f
push 4
mov ecx, edi
call fcn.1002d0d0
cmp dword [edi + 0x1c], esi
je 0x1002ed3f
mov cl, byte [edi + 0x14]
mov dword [esp + 0x44], ebp
mov eax, dword [esp + 0x18]
cmp eax, esi
je 0x1002ed5c
mov eax, dword [eax]
cmp eax, esi
je 0x1002ed58
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x18], esi
xor al, al
jmp 0x1002eda2
mov dword [esp + 0x44], ebp
mov eax, dword [esp + 0x18]
cmp eax, esi
je 0x1002eda0
mov eax, dword [eax]
cmp eax, esi
je 0x1002ed79
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x18], esi
jmp 0x1002eda0
mov dword [esp + 0x44], ebp
mov eax, dword [esp + 0x18]
test eax, eax
je 0x1002eda0
mov eax, dword [eax]
test eax, eax
je 0x1002ed98
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x18], 0
mov al, 1
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret 4