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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x100a4b90
push 0x10077d0f
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x100ab00c]
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 [0x100ae0c4]
mov edx, dword [ecx]
mov eax, dword [0x100b2cf4]
add eax, 0x1c
push eax
call dword [edx + 4]
cmp dword [eax], 0
je 0x10021eb8
cmp dword [0x100af22c], 0
jne 0x10021a5c
cmp dword [0x100ae088], 0
jne 0x10021a5c
mov dword [0x100b83f0], 0
mov dword [0x100b83e0], 0
wait
jmp 0x10021ee2
mov dword [0x100b68f0], 0
mov dword [0x100b28c8], 0
mov dword [0x100aed7c], 0
mov dword [0x100b2cf0], 0
mov dword [0x100b26c4], 0
mov dword [0x100af2ac], 0
mov dword [0x100b2e18], 0
mov dword [0x100b1dd0], 0
mov dword [0x100b244c], 0
mov eax, dword [0x100b2cf4]
mov ecx, dword [eax + 0x2c8]
mov eax, dword [0x100af3fc]
mov ecx, dword [eax + ecx]
call fcn.10018240
test eax, eax
jle 0x10021a42
call fcn.10018a00
test eax, eax
je 0x10021ae8
cmp eax, 1
jne 0x10021a42
cmp dword [0x100af22c], 1
je 0x10021afe
cmp dword [0x100ae088], 1
jne 0x10021bbb
mov eax, dword [0x100b2cf4]
mov ecx, dword [eax + 0x2c8]
mov eax, dword [0x100af3fc]
mov esi, dword [eax + ecx]
call fcn.100175e0
mov edx, dword [0x100b2cf4]
mov ecx, dword [edx + 0x2c0]
imul ecx, esi
add ecx, eax
mov eax, dword [edx + 0x2dc]
add eax, dword [edx + 0x2c4]
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 0x10021b72
lea eax, [esi - 0xfa0]
cmp eax, 0x3e8
jb 0x10021b72
mov ecx, dword [0x100b1ddc]
jmp 0x10021b7d
mov ecx, 0x64
mov dword [0x100b1ddc], ecx
lea eax, [esi - 0x1388]
cmp eax, 0x3e8
jb 0x10021b97
lea eax, [esi - 0x1770]
cmp eax, 0x3e8
jae 0x10021ba2
mov ecx, 0x3e8
mov dword [0x100b1ddc], ecx
lea eax, [esi - 0x7d0]
mov edx, 0x1f4
cmp eax, 0x3e8
cmovb ecx, edx
mov dword [0x100b1ddc], ecx
or esi, 0xffffffff
mov dword [ebp - 0x2c], esi
mov ecx, dword [0x100b2a64]
mov edx, 8
mov eax, dword [0x100af8a4]
test eax, eax
cmove ecx, edx
mov dword [0x100b2a64], ecx
mov edx, 0x10
cmp eax, 1
cmove ecx, edx
mov dword [0x100b2a64], ecx
mov edx, 0x14
cmp eax, 2
cmove ecx, edx
mov dword [0x100b2a64], ecx
mov edx, 0x1e
cmp eax, 3
cmove ecx, edx
mov dword [0x100b2a64], ecx
mov edx, 0x28
cmp eax, 4
cmove ecx, edx
mov dword [0x100b2a64], ecx
mov eax, dword [0x100ab038]
mov dword [0x100ae710], eax
mov ecx, edi
call fcn.10020270
cmp eax, esi
je 0x10021c44
mov dword [0x100ae710], 0xffff0000
mov esi, eax
mov dword [ebp - 0x2c], esi
mov eax, dword [0x100b2cf4]
mov ecx, dword [eax + 0x2c8]
mov eax, dword [0x100af3fc]
mov ecx, dword [eax + ecx]
call fcn.100180c0
mov ecx, eax
call fcn.10017f50
mov ecx, eax
call fcn.10017ef0
mov ecx, eax
call fcn.10020d10
mov edi, eax
cmp edi, 0xffffffff
je 0x10021c92
mov ecx, edi
call fcn.10018a40
test al, al
je 0x10021c92
mov dword [0x100ae710], 0xffff0000
mov esi, edi
mov dword [ebp - 0x2c], esi
cmp esi, 0xffffffff
je 0x10021eab
mov eax, dword [0x100b2cf4]
mov ecx, dword [eax + 0x2c8]
mov eax, dword [0x100af3fc]
push dword [0x100ade10]
mov edx, dword [eax + ecx]
lea ecx, [ebp - 0x28]
call fcn.10019120
add esp, 4
test al, al
je 0x10021ed6
push dword [0x100ade10]
mov edx, esi
lea ecx, [ebp - 0x28]
call fcn.10019120
add esp, 4
test al, al
je 0x10021ed6
call fcn.10017e80
mov ecx, eax
call fcn.10017dc0
mov ebx, eax
call fcn.10017e30
mov ecx, eax
call fcn.10017c60
mov esi, eax
call fcn.10017e30
mov ecx, eax
call fcn.10017cd0
mov edi, eax
cmp esi, 1
jg 0x10021d59
test ebx, ebx
jle 0x10021d59
test edi, edi
jle 0x10021d59
cmp edi, ebx
jge 0x10021d3c
push edi
call fcn.10017e30
mov ecx, eax
call fcn.10017d70
push 0
call fcn.10017e30
mov ecx, eax
call fcn.10017d20
cmp edi, ebx
jl 0x10021d59
sub edi, ebx
inc edi
push ebx
call fcn.10017e30
mov ecx, eax
call fcn.10017d70
push edi
call fcn.10017e30
mov ecx, eax
call fcn.10017d20
movss xmm0, dword [ebp - 0x28]
movss dword [0x100b83e4], xmm0
movss xmm0, dword [ebp - 0x24]
movss dword [0x100b82ec], xmm0
movss xmm0, dword [ebp - 0x20]
movss dword [0x100b83f8], xmm0
mov dword [0x100b83f0], 1
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
cmp dword [0x100b6a5c], eax
ja 0x10021e02
call fcn.10017e30
mov ecx, eax
call fcn.10017c60
test eax, eax
jle 0x10021df5
cmp dword [0x100af22c], 1
je 0x10021dbc
cmp dword [0x100ae088], 1
jne 0x10021df5
call fcn.10017e30
mov edi, eax
mov ecx, dword [0x100ae0c4]
mov esi, dword [ecx]
mov edx, dword [0x100b2cf4]
add edx, 0x2e4
push edx
call dword [esi + 4]
mov esi, eax
mov ecx, dword [0x100ae0c4]
mov edx, dword [ecx]
push 0x100ae078
call dword [edx + 4]
add esi, eax
push 0
mov ecx, edi
call esi
call ebx
add eax, dword [0x100b1ddc]
mov dword [0x100b6a5c], eax
cmp dword [0x100b1e28], 0
je 0x10021ed6
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.100188c0
mov ecx, eax
call fcn.100186f0
test al, al
je 0x10021ed6
push 0xffff0000
movss xmm2, dword [0x1009c160]
movss xmm1, dword [ebp - 0x24]
movss xmm0, dword [ebp - 0x28]
call fcn.10015760
push ebx
push 0xfffffafa
push 1
push 0x14
cvttss2si edx, dword [ebp - 0x24]
movss xmm0, dword [ebp - 0x28]
subss xmm0, dword [0x1009c18c]
cvttss2si ecx, xmm0
call fcn.100155c0
push ebx
push 0xfffffafa
push 0x14
push 1
movss xmm0, dword [ebp - 0x24]
subss xmm0, dword [0x1009c18c]
cvttss2si edx, xmm0
cvttss2si ecx, dword [ebp - 0x28]
call fcn.100155c0
add esp, 0x24
wait
jmp 0x10021ee2
mov dword [0x100b83f0], 0
wait
jmp 0x10021ee2
mov dword [0x100b83f0], 0
mov dword [0x100b83f4], 0
mov dword [0x100b83e0], 0
wait
jmp 0x10021ee2
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.10077b59
mov esp, ebp
pop ebp
ret