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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xd0
mov eax, dword [0x644040]
xor eax, ebp
mov dword [esp + 0xc8], eax
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
xor eax, eax
mov edx, ebx
neg edx
sbb eax, edi
jge 0x55011a
pcmpeqd xmm0, xmm0
movdqa xmmword [esp + 0x70], xmm0
movdqa xmmword [esp + 0x90], xmm0
movdqa xmmword [esp + 0x80], xmm0
mov dword [esp + 0xa0], 0xffffffff
mov dword [esp + 0xa4], 0xffffffff
mov byte [esp + 0x70], 0
mov byte [esp + 0xa0], 0
cmp byte [ecx + 4], 0
mov dword [esp + 0x10], ecx
je 0x54fb2e
mov eax, ebx
not eax
mov ecx, edi
xor ecx, 0x7fffffff
or ecx, eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x18], edi
je 0x54fadf
mov ecx, dword [0x646080]
cmp ecx, 0x552d10
jne 0x54fb11
xor eax, eax
lea esi, [esp + 0x60]
mov dword [esi + 4], eax
mov dword [esi], eax
push esi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edi, dword [esi]
mov ebx, dword [esi + 4]
cmp edi, 0x7bd05af7
mov eax, ebx
sbb eax, 0x863
jge 0x5501f4
mov ecx, 0xf4240
mov eax, edi
mul ecx
imul ecx, ebx, 0xf4240
add ecx, edx
push dword [0x6496cc]
push dword [0x6496c8]
push ecx
push eax
call fcn.00586340
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x18]
add eax, ebx
mov dword [esp + 8], eax
adc edx, edi
seto al
mov esi, edx
sar esi, 0x1f
mov ecx, edi
mov edi, ebx
lea ebx, [esi - 0x80000000]
test al, al
cmove esi, dword [esp + 8]
mov dword [esp + 0xc], esi
test al, al
cmove ebx, edx
mov dword [esp + 0x14], ebx
mov esi, edi
mov edx, ecx
mov edi, ecx
mov eax, esi
mov ecx, 0xffffffff
xor eax, ecx
mov ebx, edx
mov ecx, edx
mov edx, 0x7fffffff
xor ecx, edx
or ecx, eax
je 0x54fad4
push 0
push 0x3e8
mov dword [esp + 0x10], ebx
push ebx
push esi
call fcn.005825e0
mov ecx, eax
mov edi, edx
mov edx, 0x3e8
mul edx
imul ebx, edi, 0x3e8
add ebx, edx
cmp eax, esi
sbb ebx, dword [esp + 8]
adc ecx, 0
adc edi, 0
jne 0x54fea4
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ecx
push dword [esi]
call ebx
test eax, eax
jne 0x54fdf0
mov bl, 1
cmp byte [esi + 4], 0
je 0x54faf8
cmp byte [esp + 0xa0], 1
je 0x54fb87
mov ecx, dword [esp + 0xc8]
xor ecx, ebp
call fcn.00565ea5
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 8
mov ecx, 0xffffffff
mov esi, dword [esp + 0x10]
jmp 0x54fa91
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 0x14], 0x7fffffff
mov ecx, edi
mov edi, ebx
jmp 0x54fa30
mov dword [esp + 0xc4], 0x1aa
mov al, byte [0x6495f6]
test al, al
je 0x54faac
jmp 0x5501b2
call dword [0x63e1bc]
lea esi, [esp + 0xb8]
push esi
call ecx
add esp, 4
mov eax, dword [esi]
mov edx, dword [esi + 4]
jmp 0x54fa02
lea esi, [esp + 0x60]
push 0x40
push str.waitable_event.cc
push str.TimedWait
push esi
call fcn.0050b300
add esp, 0x10
cmp byte [esp + 0xa0], 1
je 0x550136
lea ecx, [esp + 0x70]
push 1
push 0
call fcn.00522210
mov dword [esp + 0xb4], 0xa
mov al, byte [0x649456]
test al, al
jne 0x55014c
mov byte [esp + 0xa0], 1
jmp 0x54f97e
mov dword [esp + 0xb8], 0xa
mov al, byte [0x649456]
test al, al
jne 0x55017b
call fcn.00562bf5
mov eax, dword [eax]
mov dword [esp + 0x18], eax
call fcn.00562bf5
xor edi, edi
mov dword [eax], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [esp + 0x70]
test edi, edi
je 0x54fc35
cmp dword [esp + 0x74], 0
jne 0x54fc35
cmp byte [edi + 0x11], 1
jne 0x54fc35
mov eax, dword [edi + 0x20]
add eax, 0x50
mov dword [esp + 0x10], eax
push eax
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x54feac
xor eax, eax
mov dword [edi + 0x1c], eax
mov dword [edi + 0x18], eax
cmp byte [edi + 0x2b], 0
jne 0x54fc25
mov eax, dword [edi + 0x20]
cmp byte [edi + 0x29], 1
je 0x54febb
dec dword [eax + 0xb0]
cmp byte [edi + 0x11], 0
je 0x5501a3
cmp byte [edi + 0x10], 0
je 0x54fcbc
mov word [edi + 0x29], 0
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.00562bf5
mov ecx, dword [esp + 0x18]
mov dword [eax], ecx
cmp byte [esp + 0x98], 1
jne 0x54fc5c
mov eax, dword [esp + 0x90]
test eax, eax
jne 0x54fcd4
mov eax, dword [esp + 0x78]
test eax, eax
je 0x54fc6a
mov ecx, dword [esp + 0x7c]
mov dword [eax], ecx
mov eax, dword [esp + 0x74]
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x64c810]
bt edx, ecx
jb 0x5500ed
mov dword [esp + 0x74], 0
mov eax, dword [esp + 0x70]
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x64c810]
bt edx, ecx
jae 0x54faba
push eax
call fcn.004ff570
add esp, 4
jmp 0x54faba
mov ecx, dword [edi + 0x20]
cmp byte [edi + 0x2a], 1
je 0x5500fb
dec dword [ecx + 0xb4]
jmp 0x54fc25
mov dword [esp + 0x18], eax
mov ecx, dword [fcn.0055f760]
cmp ecx, 0x552d10
mov dword [esp + 0x24], ebx
jne 0x54fdb9
xor eax, eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x60], eax
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov esi, dword [esp + 0x60]
mov edi, dword [esp + 0x64]
cmp esi, 0x7bd05af7
mov eax, edi
sbb eax, 0x863
jge 0x5502a6
mov ecx, 0xf4240
mov eax, esi
mul ecx
imul ecx, edi, 0xf4240
add ecx, edx
push dword [0x6496cc]
push dword [0x6496c8]
push ecx
push eax
call fcn.00586340
mov dword [esp + 0xb8], eax
mov dword [esp + 0xbc], edx
mov ecx, dword [esp + 0x88]
mov esi, dword [esp + 0x8c]
mov dword [esp + 8], eax
mov dword [esp + 0x10], ecx
sub eax, ecx
mov dword [esp + 0xc], edx
mov ecx, edx
sbb ecx, esi
seto bl
mov edi, ecx
sar edi, 0x1f
test bl, bl
cmovne eax, edi
add edi, 0x80000000
test bl, bl
cmove edi, ecx
cmp eax, 0xf4240
mov ecx, edi
sbb ecx, 0
jge 0x54fef0
mov esi, dword [esp + 0x90]
test esi, esi
mov ebx, dword [esp + 0x24]
je 0x54fc5c
lock dec dword [esi]
jne 0x54fc5c
jmp 0x550105
call dword [0x63e1bc]
lea esi, [esp + 0xb8]
push esi
call ecx
add esp, 4
mov eax, dword [esi]
mov edx, dword [esi + 4]
jmp 0x54fd50
call dword [0x63e1bc]
lea eax, [esp + 0x60]
push eax
call ecx
add esp, 4
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
jmp 0x54fe5d
cmp eax, 0x102
jne 0x55027e
mov ecx, dword [0x646080]
cmp ecx, 0x552d10
jne 0x54fdd6
xor eax, eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x60], eax
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edi, dword [esp + 0x60]
mov ebx, dword [esp + 0x64]
cmp edi, 0x7bd05af7
mov eax, ebx
sbb eax, 0x863
jge 0x550337
mov eax, edi
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 + 8], eax
mov ecx, dword [esp + 0xc]
sub ecx, eax
mov edi, dword [esp + 0x14]
sbb edi, edx
seto bl
mov esi, edi
sar esi, 0x1f
test bl, bl
mov eax, edx
lea edx, [esi - 0x80000000]
cmove esi, ecx
test bl, bl
cmove edx, edi
mov ecx, dword [esp + 8]
cmp ecx, dword [esp + 0xc]
sbb eax, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
jl 0x54fa36
xor ebx, ebx
jmp 0x54faac
xor ecx, ecx
dec ecx
jmp 0x54fa89
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
jmp 0x54fbf0
mov ecx, dword [eax + 0x5c]
mov edx, dword [eax + 0xa0]
dec edx
mov dword [eax + 0xa0], edx
cmp ecx, dword [eax + 0x60]
je 0x54fed8
cmp dword [eax + 0xa8], edx
jae 0x54fee3
mov word [eax + 0x78], 0
jmp 0x54fc11
movzx ecx, word [ecx + 8]
mov word [eax + 0x78], cx
jmp 0x54fc11
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], esi
xor eax, eax
dec eax
mov ebx, 0x3938700
mov esi, dword [esp + 0x18]
add ebx, dword [esi + 0xf8]
mov ecx, dword [esi + 0xfc]
adc ecx, 0
mov edx, 0x7fffffff
cmovno edx, ecx
cmovo ebx, eax
cmp dword [esp + 8], ebx
mov ecx, dword [esp + 0xc]
sbb ecx, edx
jge 0x5503f0
mov eax, dword [esi + 0xf8]
mov esi, dword [esi + 0xfc]
mov edx, dword [esp + 0x10]
mov dword [esp + 8], eax
sub edx, eax
mov ebx, dword [esp + 0x14]
sbb ebx, esi
seto cl
mov eax, ebx
sar eax, 0x1f
test cl, cl
cmovne edx, eax
add eax, 0x80000000
test cl, cl
cmove eax, ebx
mov ecx, 0xffffffff
add ecx, edx
mov ebx, 0x7fffffff
adc ebx, eax
add ecx, 2
adc ebx, 0
cmp ecx, 2
sbb ebx, 0
jb 0x5503d0
movd xmm0, edx
movd xmm1, eax
punpckldq xmm0, xmm1
movq qword [esp + 0x58], xmm0
fild qword [esp + 0x58]
fstp qword [esp + 0x50]
movsd xmm0, qword [esp + 0x50]
divsd xmm0, qword [0x62dcc0]
sub esp, 8
movsd qword [esp], xmm0
call fcn.0058f820
add esp, 8
fstp qword [esp + 0x30]
movsd xmm0, qword [esp + 0x30]
xor esi, esi
movsd xmm1, qword [0x62e2f0]
ucomisd xmm0, xmm1
mov eax, 0x7fffffff
cmovb eax, esi
movsd xmm2, qword [0x62e2f8]
ucomisd xmm2, xmm0
maxsd xmm0, xmm1
cvttsd2si ebx, xmm0
cmovb ebx, eax
mov ecx, 0xffffffff
mov eax, dword [esp + 0x1c]
add ecx, eax
movd xmm0, eax
mov eax, 0x7fffffff
adc eax, edi
movd xmm1, edi
add ecx, 2
adc eax, 0
cmp ecx, 2
sbb eax, 0
mov edi, 0x7fffffff
punpckldq xmm0, xmm1
movq qword [esp + 0x48], xmm0
fild qword [esp + 0x48]
fstp qword [esp + 0x40]
jae 0x550039
movsd xmm0, qword [0x62e300]
jmp 0x550047
movsd xmm0, qword [esp + 0x40]
divsd xmm0, qword [0x62dcc0]
sub esp, 8
movsd qword [esp], xmm0
call fcn.0058f91d
add esp, 8
fstp qword [esp + 0x38]
movsd xmm0, qword [esp + 0x38]
movsd xmm1, qword [0x62e2f0]
ucomisd xmm0, xmm1
cmovb edi, esi
movsd xmm2, qword [0x62e2f8]
ucomisd xmm2, xmm0
maxsd xmm0, xmm1
cvttsd2si esi, xmm0
cmovb esi, edi
add esi, ebx
cmp esi, 0x3c
mov edi, 0x3c
cmovl edi, esi
mov eax, dword [esp + 0x18]
add eax, 4
mov dword [esp + 0x10], eax
push eax
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x5503c1
cmp ebx, edi
jge 0x5500bf
mov eax, dword [esp + 0x18]
inc dword [eax + ebx*4 + 8]
inc ebx
cmp edi, ebx
jne 0x5500b2
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp esi, 0x3d
jl 0x54fd98
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0x100]
sub esi, edi
xor ebx, ebx
mov dword [esp + 0x18], eax
test eax, eax
jne 0x550087
jmp 0x54fd98
push eax
call fcn.004ff570
add esp, 4
jmp 0x54fc88
call fcn.00590760
jmp 0x54fc25
mov ecx, esi
call fcn.00411f10
push esi
call fcn.00562bc0
add esp, 4
jmp 0x54fc5c
call fcn.004f2d00
mov ebx, eax
mov ecx, dword [esp + 0xc8]
xor ecx, ebp
call fcn.00565ea5
mov eax, ebx
jmp 0x54faca
lea ecx, [esp + 0x70]
call fcn.00535ef0
lea eax, [esp + 0x70]
mov byte [eax + 0x30], 0
jmp 0x54fb55
movzx ecx, al
lea eax, [esp + 0xb8]
mov dword [eax], esi
lea esi, [esp + 0xc4]
mov dword [esi], str.ScopedBlockingCallWithBaseSyncPrimitives
lea edx, [esp + 0xb4]
push eax
push esi
call fcn.005b6120
add esp, 8
jmp 0x54fb7a
movzx eax, al
mov dword [esp + 0x60], 0
lea ecx, [esp + 0xb8]
push 2
lea edx, [esp + 0x64]
push edx
push ecx
push eax
call fcn.0058fbc0
add esp, 0x10
jmp 0x54fb9f
push str....._third_partylibc_srcincludeoptional:795:_assertion_this__has_value___failed:_optional_operator_called_on_a_disengaged_value_n
push 0x622e92
call fcn.0058fdd0
movzx eax, al
mov ecx, dword [0x648794]
xor esi, dword [0x648790]
mov dword [esp + 0x64], ecx
mov dword [esp + 0x60], esi
lea ecx, [esp + 0xb8]
mov dword [ecx], str.WaitableEvent::Wait_Complete
lea edx, [esp + 0xc4]
lea esi, [esp + 0x60]
push esi
push 3
push ecx
push edx
push eax
call fcn.005c03d0
add esp, 0x14
jmp 0x54faac
mov esi, dword [0x6496c8]
mov dword [esp + 0x20], esi
mov eax, dword [0x6496cc]
mov dword [esp + 8], eax
push eax
push esi
push ebx
push edi
call fcn.00586340
mov dword [esp + 0xc], eax
mov ecx, edx
mov eax, dword [esp + 0xc]
mul esi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0xc]
mov esi, eax
imul esi, dword [esp + 8]
add edx, esi
imul esi, ecx, 0xf4240
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x20]
imul ecx, esi
add ecx, edx
sub edi, dword [esp + 0x1c]
sbb ebx, ecx
mov ecx, 0xf4240
mul ecx
mov dword [esp + 0xc], eax
add edx, dword [esp + 0x14]
mov dword [esp + 0x14], edx
mov eax, edi
mul ecx
imul ecx, ebx, 0xf4240
add edx, ecx
push dword [esp + 8]
push esi
push edx
push eax
call fcn.00586340
add eax, dword [esp + 0xc]
adc edx, dword [esp + 0x14]
jmp 0x54f9fa
mov ecx, dword [esp + 0x24]
mov edx, 0xffffffff
xor ecx, edx
mov edx, edi
mov esi, 0x7fffffff
xor edx, esi
or edx, ecx
jne 0x54fdfb
mov ecx, eax
call fcn.005c0340
jmp 0x54fdfb
mov eax, dword [0x6496c8]
mov dword [esp + 0x10], eax
mov ecx, dword [0x6496cc]
mov dword [esp + 8], ecx
push ecx
push eax
push edi
push esi
call fcn.00586340
mov dword [esp + 0xc], eax
mov dword [esp + 0x20], edx
mul dword [esp + 0x10]
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0xc]
imul ecx, dword [esp + 8]
add edx, ecx
mov eax, dword [esp + 0x20]
imul ecx, eax, 0xf4240
mov dword [esp + 0x14], ecx
imul eax, dword [esp + 0x10]
add eax, edx
sub esi, dword [esp + 0x1c]
sbb edi, eax
mov ecx, 0xf4240
mov eax, dword [esp + 0xc]
mul ecx
mov dword [esp + 0xc], eax
add edx, dword [esp + 0x14]
mov dword [esp + 0x14], edx
mov eax, esi
mul ecx
imul ecx, edi, 0xf4240
add edx, ecx
push dword [esp + 8]
push dword [esp + 0x14]
push edx
push eax
call fcn.00586340
add eax, dword [esp + 0xc]
adc edx, dword [esp + 0x14]
jmp 0x54fd42
mov esi, dword [0x6496c8]
mov dword [esp + 0x28], esi
mov eax, dword [0x6496cc]
mov dword [esp + 8], eax
push eax
push esi
push ebx
push edi
call fcn.00586340
mov dword [esp + 0x1c], eax
mov ecx, edx
mov eax, dword [esp + 0x1c]
mul esi
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x1c]
mov esi, eax
imul esi, dword [esp + 8]
add edx, esi
imul esi, ecx, 0xf4240
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x28]
imul ecx, esi
add ecx, edx
sub edi, dword [esp + 0x2c]
sbb ebx, ecx
mov ecx, 0xf4240
mul ecx
mov dword [esp + 0x1c], eax
add edx, dword [esp + 0x20]
mov dword [esp + 0x20], edx
mov eax, edi
mul ecx
imul ecx, ebx, 0xf4240
add edx, ecx
push dword [esp + 8]
push esi
push edx
push eax
call fcn.00586340
add eax, dword [esp + 0x1c]
adc edx, dword [esp + 0x20]
jmp 0x54fe5d
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
jmp 0x5500ae
mov eax, dword [esp + 8]
cmp dword [esp + 0x10], eax
sbb dword [esp + 0x14], esi
setl al
movzx eax, al
movsd xmm0, qword [eax*8 + 0x62e2e0]
jmp 0x54ffa1
mov eax, dword [esp + 8]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x64], eax
sub esp, 0xc
movq xmm0, qword [esp + 0x6c]
movq qword [esp + 4], xmm0
lea ebx, [esp + 0xd0]
mov dword [esp], ebx
call fcn.004f31e0
add esp, 0xc
mov ebx, dword [ebx]
test ebx, ebx
je 0x54ff2e
lock dec dword [ebx]
jne 0x54ff2e
mov ecx, ebx
call fcn.00411f10
push ebx
call fcn.00562bc0
add esp, 4
jmp 0x54ff2e