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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10295688
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x10314008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x30], ebx
cmp dword [ebx + 0x1c], 0
je 0x1016f530
cmp byte [ebx + 0x14], 0
jne 0x1016f530
xor al, al
mov byte [ebp - 0x23], al
lea eax, [ebx + 0x20]
add ebx, 0x60
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x34], ebx
nop word [eax + eax]
mov edi, eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x14], edi
test edi, edi
je 0x1016f27d
mov eax, dword [edi]
test eax, eax
je 0x1016f27d
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 1
mov eax, dword [ebx]
mov esi, dword [eax]
cmp esi, eax
je 0x1016f334
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x11c]
cmp eax, 1
je 0x1016f2c0
cmp eax, 2
je 0x1016f2c0
cmp eax, 4
je 0x1016f2c0
cmp eax, 5
jne 0x1016f2e9
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ecx, ecx
sub eax, dword [esi + 0x120]
sbb ecx, dword [esi + 0x124]
test ecx, ecx
ja 0x1016f439
jb 0x1016f2e9
cmp eax, 0xea60
ja 0x1016f439
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
je 0x1016f314
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x1016f310
nop dword [eax + eax]
cmp esi, dword [eax + 8]
jne 0x1016f310
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x1016f300
mov esi, eax
jmp 0x1016f32c
mov esi, eax
mov ecx, dword [esi]
cmp byte [ecx + 0xd], 0
jne 0x1016f32c
nop
mov eax, dword [ecx]
mov esi, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x1016f320
cmp esi, dword [ebx]
jne 0x1016f2a0
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x1016f353
mov eax, dword [edi]
test eax, eax
je 0x1016f34c
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x1016f371
mov eax, dword [eax]
test eax, eax
je 0x1016f371
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 2
mov ebx, dword [ebp - 0x30]
cmp dword [ebx + 0x1c], 0
je 0x1016f40e
cmp byte [ebx + 0x14], 0
jne 0x1016f40e
cmp byte [ebp - 0x23], 0
je 0x1016f529
cmp dword [ebx + 0x64], 0
jne 0x1016f529
lea eax, [ebp - 0x21]
mov byte [ebp - 0x22], 0
push eax
mov ecx, ebx
mov byte [ebp - 0x21], 0
call fcn.1016ef50
movzx edx, byte [ebp - 0x22]
test al, al
mov esi, 1
cmovne edx, esi
cmp byte [ebp - 0x21], 0
jne 0x1016f405
test dl, dl
jne 0x1016f40e
push 0
push 0
mov ecx, ebx
call fcn.1016eaf0
test al, al
jne 0x1016f529
mov byte [ebp - 0x21], al
mov ecx, ebx
mov byte [ebp - 0x22], al
lea eax, [ebp - 0x22]
push eax
call fcn.1016ef50
movzx ecx, byte [ebp - 0x21]
test al, al
cmovne ecx, esi
cmp byte [ebp - 0x22], 0
jne 0x1016f405
test cl, cl
jne 0x1016f40e
push 0
mov ecx, ebx
call fcn.10170060
xor bl, bl
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x1016f432
mov eax, dword [eax]
test eax, eax
je 0x1016f42b
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x1c], 0
mov al, bl
jmp 0x1016f532
mov ebx, dword [esi + 0x18]
test ebx, ebx
je 0x1016f44b
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
mov eax, ebx
mov dword [ebp - 0x18], eax
mov ebx, dword [ebp - 0x30]
mov ecx, ebx
push 1
push 0
push dword [ebp - 0x28]
call fcn.10172960
mov ecx, dword [esi + 0x11c]
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x20], eax
cmp ecx, 1
je 0x1016f488
cmp ecx, 2
je 0x1016f488
cmp ecx, 4
je 0x1016f47f
cmp ecx, 5
jne 0x1016f48f
mov dword [ebp - 0x28], 0x68
jmp 0x1016f48f
mov dword [ebp - 0x28], 0x66
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebx + 0x7c]
call fcn.101739b0
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
inc dword [ebx + 8]
mov dword [ebx], eax
mov eax, dword [ebp - 0x28]
mov dword [ebx + 0xc], eax
lea eax, [ebp - 0x38]
mov dword [ebx + 4], 0
mov ebx, dword [ebp - 0x34]
mov ecx, ebx
push esi
push eax
call fcn.10175200
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x1016f334
test edi, edi
je 0x1016f4e5
mov eax, dword [edi]
test eax, eax
je 0x1016f4e0
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor edi, edi
mov dword [ebp - 0x14], edi
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x14]
mov byte [ebp - 0x23], 1
mov byte [ebp - 4], 0
mov ecx, esi
mov eax, dword [esi]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x2c]
test edi, edi
je 0x1016f260
mov eax, dword [edi]
test eax, eax
je 0x1016f51a
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x14], 0
jmp 0x1016f260
mov bl, 1
jmp 0x1016f410
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1025b3e6
mov esp, ebp
pop ebp
ret