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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x30
mov eax, dword [0x644040]
xor eax, ebp
mov dword [esp + 0x28], eax
mov eax, dword [0x6496b4]
mov ecx, dword [0x64784c]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x556ef7
movzx ebx, byte [ebp + 8]
mov esi, dword [0x6496b0]
push esi
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x556f38
movzx edi, bl
dec edi
or edi, 1
add edi, dword [0x649664]
mov dword [0x649664], edi
mov ecx, 1
test byte [0x649660], 1
je 0x556eed
test edi, edi
cmove ecx, edi
mov eax, dword [0x649668]
cmp ecx, eax
je 0x556eba
test eax, eax
mov dword [esp + 0x14], esi
je 0x556e35
mov dword [esp + 0xc], ecx
mov ecx, dword [0x646080]
cmp ecx, 0x552d10
je 0x556d5d
call dword [0x63e1cc]
lea esi, [esp + 0x20]
push esi
call ecx
add esp, 4
mov eax, dword [esi]
mov edx, dword [esi + 4]
jmp 0x556db1
xor eax, eax
lea esi, [esp + 0x20]
mov dword [esi + 4], eax
mov dword [esi], eax
push esi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [esi]
mov ebx, dword [esi + 4]
cmp eax, 0x7bd05af7
mov ecx, ebx
sbb ecx, 0x863
jge 0x557004
mov ecx, 0xf4240
mul ecx
imul ecx, ebx, 0xf4240
add ecx, edx
push dword [0x6496cc]
push dword [0x6496c8]
push ecx
push eax
call fcn.00586340
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
sub eax, dword [0x6496b8]
sbb edx, dword [0x6496bc]
seto bl
mov ecx, edx
sar ecx, 0x1f
test bl, bl
cmovne eax, ecx
add ecx, 0x80000000
test bl, bl
cmove ecx, edx
mov edx, eax
add edx, 1
mov esi, ecx
adc esi, 0x80000000
cmp edx, 2
sbb esi, 0
mov edx, dword [0x649674]
mov esi, dword [0x649670]
jb 0x556f44
add esi, eax
adc edx, ecx
seto bl
mov eax, edx
sar eax, 0x1f
lea ecx, [eax - 0x80000000]
test bl, bl
cmove eax, esi
test bl, bl
cmove ecx, edx
mov dword [0x649670], eax
mov dword [0x649674], ecx
push dword [0x649668]
call dword [sym.imp.WINMM.dll_timeEndPeriod]
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0xc]
mov dword [0x649668], ecx
test edi, edi
je 0x556eba
mov ecx, dword [0x646080]
cmp ecx, 0x552d10
jne 0x556ed6
xor eax, eax
lea edi, [esp + 0x20]
mov dword [edi + 4], eax
mov dword [edi], eax
push edi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov esi, dword [edi]
mov ebx, dword [edi + 4]
cmp esi, 0x7bd05af7
mov eax, ebx
sbb eax, 0x863
jge 0x556f87
mov ecx, 0xf4240
mov eax, esi
mul ecx
imul ecx, ebx, 0xf4240
add ecx, edx
push dword [0x6496cc]
push dword [0x6496c8]
push ecx
push eax
call fcn.00586340
mov dword [0x6496b8], eax
mov dword [0x6496bc], edx
push dword [0x649668]
call dword [sym.imp.WINMM.dll_timeBeginPeriod]
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov ecx, dword [esp + 0x28]
xor ecx, ebp
call fcn.00565ea5
mov al, 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [0x63e1cc]
lea esi, [esp + 0x20]
push esi
call ecx
add esp, 4
mov eax, dword [esi]
mov edx, dword [esi + 4]
jmp 0x556e9f
mov ecx, 8
jmp 0x556d16
push 0x6496b4
call fcn.00562c08
add esp, 4
cmp dword [0x6496b4], 0xffffffff
jne 0x556cd8
push 4
call fcn.00562bc5
add esp, 4
mov dword [eax], 0
mov dword [0x6496b0], eax
push 0x6496b4
call fcn.00562c57
add esp, 4
jmp 0x556cd8
push esi
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
jmp 0x556cf1
mov dword [esp + 8], esi
xor ebx, ebx
inc ebx
add dword [esp + 8], ebx
mov ebx, edx
adc ebx, 0x80000000
mov dword [esp + 4], ebx
mov dword [esp], 0
xor ebx, ebx
inc ebx
cmp ebx, dword [esp + 8]
mov ebx, dword [esp]
sbb ebx, dword [esp + 4]
setb bl
xor esi, eax
xor edx, ecx
or edx, esi
sete dl
or dl, bl
jne 0x556e16
int3
mov eax, dword [0x6496c8]
mov dword [esp + 0xc], eax
mov ecx, dword [0x6496cc]
mov dword [esp + 8], ecx
push ecx
push eax
push ebx
push esi
call fcn.00586340
mov edi, edx
mov ecx, eax
mul dword [esp + 0xc]
mov dword [esp + 4], eax
mov eax, ecx
imul ecx, dword [esp + 8]
add edx, ecx
imul ecx, edi, 0xf4240
mov dword [esp], ecx
imul edi, dword [esp + 0xc]
add edi, edx
sub esi, dword [esp + 4]
sbb ebx, edi
mov ecx, 0xf4240
mul ecx
mov dword [esp + 4], eax
mov edi, edx
add edi, dword [esp]
mov eax, esi
mul ecx
imul ecx, ebx, 0xf4240
add edx, ecx
push dword [esp + 8]
push dword [esp + 0x10]
push edx
push eax
call fcn.00586340
add eax, dword [esp + 4]
adc edx, edi
jmp 0x556e9f
mov esi, dword [0x6496c8]
mov dword [esp + 4], esi
mov ecx, dword [0x6496cc]
mov dword [esp + 8], ecx
push ecx
push esi
push ebx
push eax
mov dword [esp + 0x20], eax
call fcn.00586340
mov dword [esp], eax
mov ecx, edx
mov eax, dword [esp]
mul esi
mov dword [esp + 0x18], eax
mov eax, dword [esp]
mov esi, eax
imul esi, dword [esp + 8]
add edx, esi
imul esi, ecx, 0xf4240
mov dword [esp + 0x1c], esi
imul ecx, dword [esp + 4]
add ecx, edx
mov esi, dword [esp + 0x10]
sub esi, dword [esp + 0x18]
sbb ebx, ecx
mov ecx, 0xf4240
mul ecx
mov dword [esp], eax
add edx, dword [esp + 0x1c]
mov dword [esp + 0x10], edx
mov eax, esi
mul ecx
imul ecx, ebx, 0xf4240
add edx, ecx
push dword [esp + 8]
push dword [esp + 8]
push edx
push eax
call fcn.00586340
add eax, dword [esp]
adc edx, dword [esp + 0x10]
jmp 0x556da9