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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x1008f138
push 0x10066e29
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x1009500c]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edi, ecx
mov dword [ebp - 0x30], edi
wait
mov dword [ebp - 4], 0
mov ecx, dword [0x1009d3c8]
mov edx, dword [ecx]
mov eax, dword [0x10099738]
add eax, 0x1c
push eax
call dword [edx + 4]
cmp dword [eax], 0
je 0x100204f8
cmp dword [0x10097e70], 0
jne 0x1002009c
cmp dword [0x1009d394], 0
jne 0x1002009c
mov dword [0x10098ed8], 0
mov dword [0x1009f88c], 0
wait
jmp 0x10020522
mov dword [0x1009cf3c], 0
mov dword [0x1009f890], 0
mov dword [0x1009e058], 0
mov dword [0x10099734], 0
mov dword [0x1009f894], 0
mov dword [0x10097ee8], 0
mov dword [0x1009f7d0], 0
mov dword [0x10098c00], 0
mov dword [0x10098e88], 0
mov eax, dword [0x10099738]
mov ecx, dword [eax + 0x2bc]
mov eax, dword [0x10098038]
mov ecx, dword [eax + ecx]
call fcn.10016a80
test eax, eax
jle 0x10020082
call fcn.10017240
test eax, eax
je 0x10020128
cmp eax, 1
jne 0x10020082
cmp dword [0x10097e70], 1
je 0x1002013e
cmp dword [0x1009d394], 1
jne 0x100201fb
mov eax, dword [0x10099738]
mov ecx, dword [eax + 0x2bc]
mov eax, dword [0x10098038]
mov esi, dword [eax + ecx]
call fcn.10015e00
mov edx, dword [0x10099738]
mov ecx, dword [edx + 0x2b4]
imul ecx, esi
add ecx, eax
mov eax, dword [edx + 0x2d0]
add eax, dword [edx + 0x2b8]
mov esi, dword [eax + ecx]
mov eax, 0x4f8b588f
mul esi
mov eax, esi
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 0x10
imul eax, eax, 0x186a0
sub esi, eax
lea eax, [esi - 0xbb8]
cmp eax, 0x3e8
jb 0x100201b2
lea eax, [esi - 0xfa0]
cmp eax, 0x3e8
jb 0x100201b2
mov ecx, dword [0x10098c08]
jmp 0x100201bd
mov ecx, 0x64
mov dword [0x10098c08], ecx
lea eax, [esi - 0x1388]
cmp eax, 0x3e8
jb 0x100201d7
lea eax, [esi - 0x1770]
cmp eax, 0x3e8
jae 0x100201e2
mov ecx, 0x3e8
mov dword [0x10098c08], ecx
lea eax, [esi - 0x7d0]
mov edx, 0x1f4
cmp eax, 0x3e8
cmovb ecx, edx
mov dword [0x10098c08], ecx
or esi, 0xffffffff
mov dword [ebp - 0x2c], esi
mov ecx, dword [0x100994a0]
mov edx, 8
mov eax, dword [0x100984e4]
test eax, eax
cmove ecx, edx
mov dword [0x100994a0], ecx
mov edx, 0x10
cmp eax, 1
cmove ecx, edx
mov dword [0x100994a0], ecx
mov edx, 0x14
cmp eax, 2
cmove ecx, edx
mov dword [0x100994a0], ecx
mov edx, 0x1e
cmp eax, 3
cmove ecx, edx
mov dword [0x100994a0], ecx
mov edx, 0x28
cmp eax, 4
cmove ecx, edx
mov dword [0x100994a0], ecx
mov eax, dword [0x10095024]
mov dword [0x1009d9f4], eax
mov ecx, edi
call fcn.1001ee60
cmp eax, esi
je 0x10020284
mov dword [0x1009d9f4], 0xffff0000
mov esi, eax
mov dword [ebp - 0x2c], esi
mov eax, dword [0x10099738]
mov ecx, dword [eax + 0x2bc]
mov eax, dword [0x10098038]
mov ecx, dword [eax + ecx]
call fcn.10016900
mov ecx, eax
call fcn.10016790
mov ecx, eax
call fcn.10016730
mov ecx, eax
call fcn.1001f440
mov edi, eax
cmp edi, 0xffffffff
je 0x100202d2
mov ecx, edi
call fcn.10017280
test al, al
je 0x100202d2
mov dword [0x1009d9f4], 0xffff0000
mov esi, edi
mov dword [ebp - 0x2c], esi
cmp esi, 0xffffffff
je 0x100204eb
mov eax, dword [0x10099738]
mov ecx, dword [eax + 0x2bc]
mov eax, dword [0x10098038]
push dword [0x1009d12c]
mov edx, dword [eax + ecx]
lea ecx, [ebp - 0x28]
call fcn.10017960
add esp, 4
test al, al
je 0x10020516
push dword [0x1009d12c]
mov edx, esi
lea ecx, [ebp - 0x28]
call fcn.10017960
add esp, 4
test al, al
je 0x10020516
call fcn.100166c0
mov ecx, eax
call fcn.10016600
mov ebx, eax
call fcn.10016670
mov ecx, eax
call fcn.100164a0
mov esi, eax
call fcn.10016670
mov ecx, eax
call fcn.10016510
mov edi, eax
cmp esi, 1
jg 0x10020399
test ebx, ebx
jle 0x10020399
test edi, edi
jle 0x10020399
cmp edi, ebx
jge 0x1002037c
push edi
call fcn.10016670
mov ecx, eax
call fcn.100165b0
push 0
call fcn.10016670
mov ecx, eax
call fcn.10016560
cmp edi, ebx
jl 0x10020399
sub edi, ebx
inc edi
push ebx
call fcn.10016670
mov ecx, eax
call fcn.100165b0
push edi
call fcn.10016670
mov ecx, eax
call fcn.10016560
movss xmm0, dword [ebp - 0x28]
movss dword [0x10099378], xmm0
movss xmm0, dword [ebp - 0x24]
movss dword [0x100997e4], xmm0
movss xmm0, dword [ebp - 0x20]
movss dword [0x10098ec0], xmm0
mov dword [0x10098ed8], 1
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
cmp dword [0x1009ea04], eax
ja 0x10020442
call fcn.10016670
mov ecx, eax
call fcn.100164a0
test eax, eax
jle 0x10020435
cmp dword [0x10097e70], 1
je 0x100203fc
cmp dword [0x1009d394], 1
jne 0x10020435
call fcn.10016670
mov edi, eax
mov ecx, dword [0x1009d3c8]
mov esi, dword [ecx]
mov edx, dword [0x10099738]
add edx, 0x2d8
push edx
call dword [esi + 4]
mov esi, eax
mov ecx, dword [0x1009d3c8]
mov edx, dword [ecx]
push 0x1009d388
call dword [edx + 4]
add esi, eax
push 0
mov ecx, edi
call esi
call ebx
add eax, dword [0x10098c08]
mov dword [0x1009ea04], eax
cmp dword [0x10098c4c], 0
je 0x10020516
movq xmm0, qword [ebp - 0x28]
mov ecx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x30]
push ebx
lea eax, [ebp - 0x28]
push eax
sub esp, 0xc
mov eax, esp
movq qword [eax], xmm0
mov dword [eax + 8], ecx
call fcn.10017100
mov ecx, eax
call fcn.10016f30
test al, al
je 0x10020516
push 0xffff0000
movss xmm2, dword [0x10087420]
movss xmm1, dword [ebp - 0x24]
movss xmm0, dword [ebp - 0x28]
call fcn.10014050
push ebx
push 0xfffffafa
push 1
push 0x14
cvttss2si edx, dword [ebp - 0x24]
movss xmm0, dword [ebp - 0x28]
subss xmm0, dword [0x1008743c]
cvttss2si ecx, xmm0
call fcn.10013ff0
push ebx
push 0xfffffafa
push 0x14
push 1
movss xmm0, dword [ebp - 0x24]
subss xmm0, dword [0x1008743c]
cvttss2si edx, xmm0
cvttss2si ecx, dword [ebp - 0x28]
call fcn.10013ff0
add esp, 0x24
wait
jmp 0x10020522
mov dword [0x10098ed8], 0
wait
jmp 0x10020522
mov dword [0x10098ed8], 0
mov dword [0x1009f8a0], 0
mov dword [0x1009f88c], 0
wait
jmp 0x10020522
mov dword [ebp - 4], 0xfffffffe
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.10066b99
mov esp, ebp
pop ebp
ret