Function at 0x557e70
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 [0x646040]
xor eax, ebp
mov dword [esp + 0x28], eax
mov eax, dword [0x64b6b4]
mov ecx, dword [0x64984c]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x5580ce
movzx ebx, byte [ebp + 8]
mov esi, dword [0x64b6b0]
push esi
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x55810f
movzx edi, bl
dec edi
or edi, 1
add edi, dword [0x64b664]
mov dword [0x64b664], edi
mov ebx, 1
test byte [0x64b660], 1
je 0x5580c4
test edi, edi
cmove ebx, edi
mov eax, dword [0x64b668]
cmp ebx, eax
je 0x558077
test eax, eax
mov dword [esp + 0x14], esi
je 0x557ff2
mov ecx, dword [0x648080]
cmp ecx, 0x5531a0
mov dword [esp + 0xc], ebx
jne 0x5580aa
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 esi, dword [esi + 4]
cmp eax, 0x7bd05af7
mov ecx, esi
sbb ecx, 0x863
jge 0x5581d9
mov ecx, 0xf4240
mul ecx
imul ecx, esi, 0xf4240
add ecx, edx
push dword [0x64b6cc]
push dword [0x64b6c8]
push ecx
push eax
call fcn.005877d0
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
sub eax, dword [0x64b6b8]
sbb edx, dword [0x64b6bc]
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 [0x64b674]
mov esi, dword [0x64b670]
jb 0x55811b
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 [0x64b670], eax
mov dword [0x64b674], ecx
push dword [0x64b668]
call dword [sym.imp.WINMM.dll_timeEndPeriod]
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0xc]
mov dword [0x64b668], ebx
test edi, edi
je 0x558077
mov ecx, dword [0x648080]
cmp ecx, 0x5531a0
jne 0x558093
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 0x55815e
mov ecx, 0xf4240
mov eax, esi
mul ecx
imul ecx, ebx, 0xf4240
add ecx, edx
push dword [0x64b6cc]
push dword [0x64b6c8]
push ecx
push eax
call fcn.005877d0
mov dword [0x64b6b8], eax
mov dword [0x64b6bc], edx
push dword [0x64b668]
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.00567335
mov al, 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [0x6401dc]
lea esi, [esp + 0x20]
push esi
call ecx
add esp, 4
mov eax, dword [esi]
mov edx, dword [esi + 4]
jmp 0x55805c
call dword [0x6401dc]
lea esi, [esp + 0x20]
push esi
call ecx
add esp, 4
mov eax, dword [esi]
mov edx, dword [esi + 4]
jmp 0x557f6e
mov ebx, 8
jmp 0x557ee6
push 0x64b6b4
call fcn.00565714
add esp, 4
cmp dword [0x64b6b4], 0xffffffff
jne 0x557ea8
push 4
call fcn.00564055
add esp, 4
mov dword [eax], 0
mov dword [0x64b6b0], eax
push 0x64b6b4
call fcn.00565763
add esp, 4
jmp 0x557ea8
push esi
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
jmp 0x557ec1
mov dword [esp + 4], esi
xor ebx, ebx
inc ebx
add dword [esp + 4], ebx
mov ebx, edx
adc ebx, 0x80000000
mov dword [esp], ebx
mov dword [esp + 8], 0
xor ebx, ebx
inc ebx
cmp ebx, dword [esp + 4]
mov ebx, dword [esp + 8]
sbb ebx, dword [esp]
setb bl
xor esi, eax
xor edx, ecx
or edx, esi
sete dl
or dl, bl
jne 0x557fd3
int3
mov eax, dword [0x64b6c8]
mov dword [esp + 0xc], eax
mov ecx, dword [0x64b6cc]
mov dword [esp + 4], ecx
push ecx
push eax
push ebx
push esi
call fcn.005877d0
mov edi, edx
mov ecx, eax
mul dword [esp + 0xc]
mov dword [esp], eax
mov eax, ecx
imul ecx, dword [esp + 4]
add edx, ecx
imul ecx, edi, 0xf4240
mov dword [esp + 8], ecx
imul edi, dword [esp + 0xc]
add edi, edx
sub esi, dword [esp]
sbb ebx, edi
mov ecx, 0xf4240
mul ecx
mov dword [esp], eax
mov edi, edx
add edi, dword [esp + 8]
mov eax, esi
mul ecx
imul ecx, ebx, 0xf4240
add edx, ecx
push dword [esp + 4]
push dword [esp + 0x10]
push edx
push eax
call fcn.005877d0
add eax, dword [esp]
adc edx, edi
jmp 0x55805c
mov ecx, dword [0x64b6c8]
mov dword [esp + 4], ecx
mov edx, dword [0x64b6cc]
mov dword [esp + 8], edx
push edx
push ecx
push esi
push eax
mov dword [esp + 0x20], eax
call fcn.005877d0
mov dword [esp], eax
mov ecx, edx
mov eax, dword [esp]
mul dword [esp + 4]
mov dword [esp + 0x18], eax
mov eax, esi
mov esi, dword [esp]
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 eax, ecx
mov ecx, eax
mov edx, 0xf4240
mov eax, dword [esp]
mul edx
mov dword [esp], eax
add edx, dword [esp + 0x1c]
mov dword [esp + 0x10], edx
mov eax, esi
mov edx, 0xf4240
mul edx
imul ecx, ecx, 0xf4240
add edx, ecx
push dword [esp + 8]
push dword [esp + 8]
push edx
push eax
call fcn.005877d0
add eax, dword [esp]
adc edx, dword [esp + 0x10]
jmp 0x557f66