Function at 0x100524b0
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
mov eax, dword [0x11ad127c]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
push edi
push ebx
mov dword [ebp - 0x228], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebx + esi*4 + 0x13c], 0
lea eax, [esi + 0x4f]
lea eax, [ebx + eax*4]
mov dword [ebp - 0x240], eax
lea eax, [esi + 0x2f]
lea eax, [ebx + eax*4]
mov dword [ebp - 0x230], eax
je 0x100528b1
mov esi, dword [eax]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
test esi, esi
je 0x10052762
mov eax, dword [0x11d0c5b8]
mov ecx, dword fs:[0x2c]
lea ecx, [ecx + eax*4]
mov dword [ebp - 0x224], ecx
nop dword [eax]
cmp dword [esi + 0xb30], 0
mov eax, 1
je 0x100525af
inc dword [esi + 0xa6c]
cmp dword [esi + 8], 0
je 0x10052595
mov eax, dword [ecx]
mov ecx, esi
mov eax, dword [eax + 0x10]
mov eax, dword [eax + 0x7c5c]
shr eax, 5
and al, 1
mov byte [ebp - 0x238], al
push dword [ebp - 0x238]
push 0
call fcn.1004ca70
mov eax, dword [esi + 0xb30]
mov dword [esi + 4], eax
mov dword [esi + 0xb30], 0
and dword [esi + 0xb38], 0xffffffdf
mov ecx, esi
call fcn.1004af00
mov ebx, eax
test ebx, ebx
js 0x10052741
xor eax, eax
cmp dword [esi + 0xa6c], 0
je 0x100525d2
and dword [esi + 0xb38], 0xffffffdf
mov ecx, esi
call fcn.1004af00
mov ebx, eax
test ebx, ebx
js 0x10052741
xor eax, eax
test eax, eax
jne 0x100525dd
or byte [esi + 0xb00], 1
mov eax, dword [ebp - 0x224]
lea edx, [esi + 8]
push 0
push edx
mov ebx, dword [eax]
mov eax, dword [ebx + 0x10]
mov ecx, dword [eax + 0x7a68]
mov eax, dword [ecx]
call dword [eax + 0x144]
test byte [esi + 0xb38], 1
je 0x10052658
cmp byte [ebx + 8], 0
mov eax, dword [esi]
mov eax, dword [eax + 0x28c]
mov dword [ebp - 0x23c], eax
jne 0x10052624
call fcn.10450c0b
mov eax, dword [esi + 0xaf0]
lea edi, [esi + 0xaf0]
mov ecx, dword [ebx + 0x10]
shl eax, 0x1c
sar eax, 0x1c
push eax
mov ecx, dword [ecx + 0xbe2c]
lea eax, [ebp - 0x23c]
push 1
push 0
push eax
call fcn.101d5da0
jmp 0x100526ef
mov ebx, dword [esi + 0xaf0]
lea edi, [esi + 0xaf0]
shl ebx, 0x1c
lea eax, [ebp - 0x18]
sar ebx, 0x1c
dec ebx
mov edx, dword [eax + ebx*4]
lea eax, [eax + ebx*4]
mov ecx, ebx
mov dword [ebp - 0x220], eax
mov eax, dword [esi + 8]
shl ecx, 5
add ecx, edx
mov dword [ebp + ecx*4 - 0x21c], eax
lea eax, [edx + 1]
mov ecx, dword [ebp - 0x220]
mov dword [ecx], eax
cmp eax, 0x20
jne 0x100526ef
mov ecx, dword [ebp - 0x224]
mov eax, dword [ecx]
cmp byte [eax + 8], 0
jne 0x100526b7
call fcn.10450c0b
mov ecx, dword [ebp - 0x224]
mov eax, dword [edi]
shl eax, 0x1c
sar eax, 0x1c
push eax
shl ebx, 7
lea eax, [ebp - 0x21c]
push 0x20
add eax, ebx
push eax
mov eax, dword [ecx]
push 0
mov ecx, dword [eax + 0x10]
mov ecx, dword [ecx + 0xbe2c]
call fcn.101d5da0
mov eax, dword [ebp - 0x220]
mov dword [eax], 0
mov ecx, dword [ebp - 0x240]
dec dword [ecx]
mov eax, dword [esi + 0xae8]
mov ecx, dword [ebp - 0x230]
or dword [esi + 0xb38], 0x80
and dword [edi], 0xfffffff0
mov dword [esi + 0xae8], 0
mov dword [esi + 0xae4], 0
mov dword [esi + 0xaec], 0xffffffff
mov esi, eax
mov dword [ecx], eax
test eax, eax
je 0x10052762
mov ecx, dword [ebp - 0x224]
jmp 0x10052540
push dword [ebp - 0x228]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1045066c
mov esp, ebp
pop ebp
ret 4
xor edi, edi
lea ebx, [ebp - 0x21c]
nop word [eax + eax]
lea eax, [ebp - 0x18]
lea eax, [eax + edi*4]
mov dword [ebp - 0x220], eax
mov eax, dword [eax]
test eax, eax
je 0x1005289c
mov eax, dword [0x11d0c5b8]
mov ecx, dword fs:[0x2c]
mov esi, dword [ecx + eax*4]
cmp byte [esi + 8], 0
jne 0x100527a3
call fcn.10450c0b
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp - 0x220]
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x24c], ebx
mov esi, dword [eax + 0xbe2c]
mov eax, dword [ecx]
mov dword [ebp - 0x248], eax
lea eax, [edi + 1]
mov edi, eax
mov dword [ebp - 0x244], eax
cmp dword [esi + 0x1044], 0x3001
jb 0x1005288e
mov ecx, dword [esi + 0x10e8]
test ecx, ecx
je 0x1005288e
mov eax, dword [esi]
cmp dword [eax + 0xd45c], 1
jne 0x10052876
lea eax, [esi + 0x1428]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [esi + 0x10e8]
lea ecx, [ebp - 0x250]
push ecx
push dword [esi + 0x11cc]
call eax
push eax
push ecx
mov ecx, esi
call fcn.101c9e10
lea eax, [ebp - 0x234]
xorps xmm0, xmm0
push eax
movlpd qword [ebp - 0x234], xmm0
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov ecx, dword [ebp - 0x234]
sub ecx, dword [esi + 0x1428]
mov eax, dword [ebp - 0x230]
sbb eax, dword [esi + 0x142c]
add dword [esi + 0x1420], ecx
adc dword [esi + 0x1424], eax
mov eax, dword [ebp - 0x220]
mov dword [eax], 0
jmp 0x1005289d
lea eax, [ebp - 0x250]
push eax
push dword [esi + 0x11cc]
call ecx
push eax
push ecx
mov ecx, esi
call fcn.101c9e10
mov eax, dword [ebp - 0x220]
mov dword [eax], 0
jmp 0x1005289d
inc edi
sub ebx, 0xffffff80
cmp edi, 4
jb 0x10052770
mov ebx, dword [ebp - 0x228]
jmp 0x100528b7
mov dword [eax], 0
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1045066c
mov esp, ebp
pop ebp
ret 4