Function at 0x100202e0
Capabilities:
Check for time delay via queryperformancecounter
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100b02b8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
push ebx
push esi
mov ebx, ecx
lea ecx, [esp + 0x2c]
push edi
mov dword [esp + 0x10], ebx
call fcn.1008de30
mov dword [esp + 0x5c], 0
mov edi, dword [ebx + 0x360]
push 0x20
mov dword [esp + 0x24], edi
lea esi, [edi + edi]
lea eax, [esi + esi]
push eax
call fcn.1009d182
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x10020345
mov ecx, dword [ebx + 8]
push 0xe
call fcn.100145e0
push dword [0x100db8a4]
add eax, esi
mov esi, dword [ebx + 8]
mov dword [esp + 0x28], eax
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push esi
push dword [0x100db8a4]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
xor ebx, ebx
test edi, edi
je 0x100203da
fld qword [0x100b8f80]
fld qword [0x100b9250]
xor edi, edi
mov dword [esp + 0x34], ebx
fild dword [esp + 0x34]
test ebx, ebx
jns 0x1002039b
fadd qword [0x100b9260]
xor esi, esi
fild dword [esi + 0x100b6ec0]
fmul st(1)
fmul st(3)
fsin
fmul st(2)
call fcn.100a1180
mov ecx, dword [esi + 0x100b6ecc]
add esi, 4
sar eax, cl
add edi, eax
cmp esi, 0xc
jb 0x1002039d
mov eax, dword [esp + 0x24]
fstp st(0)
sar edi, 0x10
mov word [eax + ebx*2], di
inc ebx
cmp ebx, dword [esp + 0x20]
jb 0x10020387
fstp st(1)
fstp st(0)
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov edi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [esp + 0x40]
push eax
call edi
mov ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x30]
mov eax, dword [ebx + 0x35c]
neg eax
cdq
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edx
jmp 0x10020410
lea eax, [esp + 0x38]
push eax
call edi
mov ecx, dword [esp + 0x38]
sub ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
sbb eax, dword [esp + 0x44]
push 0
push 0x3e8
push eax
push ecx
call fcn.100a2ea0
push dword [esp + 0x4c]
push dword [esp + 0x4c]
push edx
push eax
call fcn.100a2df0
mov edi, eax
mov ecx, edx
sub edi, dword [esp + 0x18]
mov eax, dword [ebx + 0x35c]
sbb ecx, dword [esp + 0x14]
cdq
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], ecx
cmp ecx, edx
jl 0x10020542
jg 0x10020471
cmp edi, eax
jb 0x10020542
lea eax, [ebx + 0x378]
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x34], eax
nop
mov eax, dword [esi]
mov ecx, esi
push 0xa
push ebx
push dword [esp + 0x24]
call dword [eax + 4]
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x36c], 0
jne 0x100204c2
test ebx, ebx
je 0x100204c2
mov edi, dword [esp + 0x24]
mov edx, ebx
mov ecx, dword [esp + 0x1c]
sub edi, ecx
jmp 0x100204b0
mov ax, word [edi + ecx]
lea ecx, [ecx + 2]
add word [ecx - 2], ax
dec edx
jne 0x100204b0
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x34]
lea eax, [ebx + ebx]
push 0
push eax
call fcn.10013b50
mov ecx, dword [esp + 0x18]
add esp, 8
push 0x3e8
push ebx
push dword [esp + 0x24]
call fcn.1001f4b0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
mov eax, dword [ecx + 0x35c]
sub edi, eax
mov ecx, dword [esp + 0x2c]
sbb ecx, 0
mov dword [esp + 0x28], edi
add edx, eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], edx
adc dword [esp + 0x14], 0
test ecx, ecx
jg 0x10020534
jl 0x1002051f
cmp edi, 0x3e8
jae 0x10020534
cdq
cmp ecx, edx
jg 0x10020480
jl 0x1002053e
cmp edi, eax
jae 0x10020480
jmp 0x1002053e
add edx, edi
mov dword [esp + 0x18], edx
adc dword [esp + 0x14], ecx
mov ebx, dword [esp + 0x10]
push 5
push dword [ebx + 0x368]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
jne 0x10020410
push dword [esp + 0x1c]
call fcn.1009d16a
add esp, 4
test esi, esi
je 0x10020577
push esi
call fcn.1009c777
add esp, 4
mov ecx, dword [esp + 0x54]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret