Function at 0x51b130
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 [0x64a040]
xor eax, ebp
mov dword [esp + 0xc8], eax
mov edi, dword [ebp + 8]
xor eax, eax
mov edx, edi
neg edx
mov esi, dword [ebp + 0xc]
sbb eax, esi
lea eax, [ecx + 0x10]
mov dword [esp + 8], eax
jge 0x51b925
pcmpeqd xmm0, xmm0
movdqa xmmword [esp + 0x70], xmm0
xor eax, eax
dec eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
movdqa xmmword [esp + 0x90], xmm0
movdqa xmmword [esp + 0x80], xmm0
xor eax, eax
mov byte [esp + 0x70], al
mov byte [esp + 0xa0], al
cmp byte [ecx + 0x14], al
je 0x51b343
mov eax, edi
not eax
mov edx, esi
xor edx, 0x7fffffff
or edx, eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], esi
je 0x51b312
mov ecx, dword [0x64c080]
cmp ecx, 0x56aca0
jne 0x51b326
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 ebx, dword [esi]
mov esi, dword [esi + 4]
cmp ebx, 0x7bd05af7
mov eax, esi
sbb eax, 0x863
jge 0x51ba41
mov ecx, 0xf4240
mov eax, ebx
mul ecx
imul ecx, esi, 0xf4240
add ecx, edx
push dword [0x64f6a4]
push dword [0x64f6a0]
push ecx
push eax
call fcn.005a13d0
add eax, edi
mov esi, dword [esp + 0x1c]
adc edx, esi
seto cl
mov ebx, edx
sar ebx, 0x1f
lea edi, [ebx - 0x80000000]
test cl, cl
cmove ebx, eax
mov dword [esp + 0xc], ebx
test cl, cl
cmove edi, edx
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, esi
mov eax, edi
xor edx, edx
dec edx
xor eax, edx
mov dword [esp + 4], ecx
mov esi, 0x7fffffff
xor ecx, esi
or ecx, eax
mov eax, edx
je 0x51b2b4
push 0
mov esi, 0x3e8
push esi
push dword [esp + 0xc]
push edi
call fcn.0059d670
mov ecx, eax
mov ebx, edx
mul esi
imul esi, ebx, 0x3e8
add esi, edx
cmp eax, edi
sbb esi, dword [esp + 4]
adc ecx, 0
adc ebx, 0
neg ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, 0
sbb eax, eax
or eax, ecx
push eax
mov eax, dword [esp + 0xc]
push dword [eax]
call ebx
test eax, eax
jne 0x51b3a4
mov bl, 1
mov eax, dword [esp + 0x28]
cmp byte [eax + 0x14], 0
je 0x51b2f9
cmp byte [esp + 0xa0], 0
jne 0x51b476
mov ecx, dword [esp + 0xc8]
xor ecx, ebp
call fcn.005810d5
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 8
mov dword [esp + 0xc4], 0x1a8
mov al, byte [0x64f5cc]
test al, al
je 0x51b2d1
jmp 0x51b9fb
xor eax, eax
dec eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 0x7fffffff
jmp 0x51b257
call dword [0x6445dc]
lea esi, [esp + 0xb8]
push esi
call ecx
add esp, 4
mov eax, dword [esi]
mov edx, dword [esi + 4]
jmp 0x51b22b
mov ebx, edi
mov edi, ecx
lea eax, [esp + 0x60]
push 0x24
push str.waitable_event.cc
push str.TimedWait
push eax
call fcn.0051dbb0
add esp, 0x10
cmp byte [esp + 0xa0], 0
jne 0x51b945
lea ecx, [esp + 0x70]
push 1
push 0
call fcn.00536a30
mov dword [esp + 0xb4], 0xa
mov al, byte [0x64f42e]
test al, al
jne 0x51b9ba
mov byte [esp + 0xa0], 1
mov ecx, edi
mov edi, ebx
jmp 0x51b1ab
cmp eax, 0x102
jne 0x51b95b
mov ecx, dword [0x64c080]
cmp ecx, 0x56aca0
jne 0x51b45c
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 ebx, dword [esp + 0x60]
mov edi, dword [esp + 0x64]
cmp ebx, 0x7bd05af7
mov eax, edi
sbb eax, 0x863
jge 0x51bae9
mov eax, ebx
mov ecx, 0xf4240
mul ecx
imul ecx, edi, 0xf4240
add ecx, edx
push dword [0x64f6a4]
push dword [0x64f6a0]
push ecx
push eax
call fcn.005a13d0
mov dword [esp + 4], eax
mov ebx, dword [esp + 0xc]
sub ebx, eax
mov esi, dword [esp + 0x10]
sbb esi, edx
seto al
mov edi, esi
sar edi, 0x1f
test al, al
lea ecx, [edi - 0x80000000]
cmove edi, ebx
test al, al
cmove ecx, esi
mov eax, dword [esp + 4]
cmp eax, dword [esp + 0xc]
sbb edx, dword [esp + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jl 0x51b25f
xor ebx, ebx
jmp 0x51b2d1
call dword [0x6445dc]
lea eax, [esp + 0x60]
push eax
call ecx
add esp, 4
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
jmp 0x51b415
mov dword [esp + 0xb8], 0xa
mov al, byte [0x64f42e]
test al, al
jne 0x51b983
call fcn.0057dc60
mov eax, dword [eax]
mov dword [esp + 4], eax
call fcn.0057dc60
xor esi, esi
mov dword [eax], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [esp + 0x70]
test esi, esi
je 0x51b524
cmp dword [esp + 0x74], 0
jne 0x51b524
cmp byte [esi + 0x11], 0
je 0x51b524
mov eax, dword [esi + 0x20]
add eax, 0x50
mov dword [esp + 8], eax
push eax
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x51b6be
xor eax, eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x18], eax
cmp byte [esi + 0x2b], 0
jne 0x51b514
cmp byte [esi + 0x29], 0
mov eax, dword [esi + 0x20]
jne 0x51b6cd
dec dword [eax + 0xb4]
cmp byte [esi + 0x11], 0
je 0x51b9ab
cmp byte [esi + 0x10], 0
je 0x51b5ab
mov word [esi + 0x29], 0
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.0057dc60
mov ecx, dword [esp + 4]
mov dword [eax], ecx
cmp byte [esp + 0x98], 0
je 0x51b54b
mov eax, dword [esp + 0x90]
test eax, eax
jne 0x51b5c3
mov eax, dword [esp + 0x78]
test eax, eax
je 0x51b559
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 + 0x6527ec]
bt edx, ecx
jb 0x51b8e3
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 + 0x6527ec]
bt edx, ecx
jae 0x51b2df
push eax
call fcn.00506f30
add esp, 4
jmp 0x51b2df
cmp byte [esi + 0x2a], 0
mov eax, dword [esi + 0x20]
jne 0x51b8f1
dec dword [eax + 0xb8]
jmp 0x51b514
mov dword [esp + 4], eax
mov ecx, dword [fcn.0056d830]
cmp ecx, 0x56aca0
mov dword [esp + 0x28], ebx
jne 0x51b6a4
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 esi, dword [esp + 0x64]
cmp edi, 0x7bd05af7
mov eax, esi
sbb eax, 0x863
jge 0x51bb73
mov ecx, 0xf4240
mov eax, edi
mul ecx
imul ecx, esi, 0xf4240
add ecx, edx
push dword [0x64f6a4]
push dword [0x64f6a0]
push ecx
push eax
call fcn.005a13d0
mov dword [esp + 0xb8], eax
mov dword [esp + 0xbc], edx
mov ecx, dword [esp + 0x88]
mov edi, dword [esp + 0x8c]
mov dword [esp + 0x14], eax
mov dword [esp + 8], ecx
sub eax, ecx
mov dword [esp + 0x1c], edx
mov ecx, edx
sbb ecx, edi
seto bl
mov esi, ecx
sar esi, 0x1f
test bl, bl
cmovne eax, esi
add esi, 0x80000000
test bl, bl
cmove esi, ecx
cmp eax, 0xf4240
mov ecx, esi
sbb ecx, 0
jge 0x51b702
mov esi, dword [esp + 0x90]
test esi, esi
mov ebx, dword [esp + 0x28]
je 0x51b54b
lock dec dword [esi]
jne 0x51b54b
jmp 0x51bad4
call dword [0x6445dc]
lea esi, [esp + 0xb8]
push esi
call ecx
add esp, 4
mov eax, dword [esi]
mov edx, dword [esi + 4]
jmp 0x51b63f
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
jmp 0x51b4df
mov ecx, dword [eax + 0x5c]
mov edx, dword [eax + 0xa4]
dec edx
mov dword [eax + 0xa4], edx
cmp ecx, dword [eax + 0x60]
je 0x51b6ea
cmp dword [eax + 0xac], edx
jae 0x51b6f5
mov word [eax + 0x78], 0
jmp 0x51b500
movzx ecx, word [ecx + 8]
mov word [eax + 0x78], cx
jmp 0x51b500
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edi
xor eax, eax
dec eax
mov ebx, 0x3938700
mov ecx, dword [esp + 4]
add ebx, dword [ecx + 0xf8]
mov ecx, dword [ecx + 0xfc]
adc ecx, 0
mov edx, 0x7fffffff
cmovno edx, ecx
cmovo ebx, eax
cmp dword [esp + 0x14], ebx
mov ecx, dword [esp + 0x1c]
sbb ecx, edx
jge 0x51bc61
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0xf8]
mov edi, dword [eax + 0xfc]
mov edx, dword [esp + 8]
mov dword [esp + 0x14], ecx
sub edx, ecx
mov ebx, dword [esp + 0xc]
sbb ebx, edi
seto cl
mov eax, ebx
sar eax, 0x1f
test cl, cl
cmovne edx, eax
add eax, 0x80000000
test cl, cl
cmove eax, ebx
xor ecx, ecx
dec ecx
add ecx, edx
mov ebx, 0x7fffffff
adc ebx, eax
add ecx, 2
adc ebx, 0
cmp ecx, 2
sbb ebx, 0
jb 0x51bc41
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 [0x634a90]
sub esp, 8
movsd qword [esp], xmm0
call fcn.005aa8b0
add esp, 8
fstp qword [esp + 0x48]
movsd xmm0, qword [esp + 0x48]
movsd xmm1, qword [0x6350b0]
ucomisd xmm1, xmm0
jb 0x51bc13
maxsd xmm0, qword [0x6350b8]
cvttsd2si ebx, xmm0
xor eax, eax
dec eax
mov edx, dword [esp + 0x10]
add eax, edx
mov ecx, 0x7fffffff
adc ecx, esi
add eax, 2
adc ecx, 0
movd xmm0, edx
movd xmm1, esi
cmp eax, 2
sbb ecx, 0
punpckldq xmm0, xmm1
movq qword [esp + 0x40], xmm0
fild qword [esp + 0x40]
fstp qword [esp + 0x38]
jae 0x51b837
movsd xmm0, qword [0x6350c0]
jmp 0x51b845
movsd xmm0, qword [esp + 0x38]
divsd xmm0, qword [0x634a90]
sub esp, 8
movsd qword [esp], xmm0
call fcn.005aa9ad
add esp, 8
fstp qword [esp + 0x30]
movsd xmm0, qword [esp + 0x30]
movsd xmm1, qword [0x6350b0]
ucomisd xmm1, xmm0
jb 0x51bc2a
maxsd xmm0, qword [0x6350b8]
cvttsd2si esi, xmm0
add esi, ebx
cmp esi, 0x3c
mov edi, 0x3c
cmovl edi, esi
mov eax, dword [esp + 4]
add eax, 4
mov dword [esp + 8], eax
push eax
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x51bc04
cmp ebx, edi
jge 0x51b8b5
mov eax, dword [esp + 4]
inc dword [eax + ebx*4 + 8]
inc ebx
cmp edi, ebx
jne 0x51b8a8
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp esi, 0x3d
jl 0x51b683
mov eax, dword [esp + 4]
mov eax, dword [eax + 0x100]
sub esi, edi
xor ebx, ebx
mov dword [esp + 4], eax
test eax, eax
jne 0x51b87d
jmp 0x51b683
push eax
call fcn.00506f30
add esp, 4
jmp 0x51b577
dec dword [eax + 0xa8]
mov ecx, dword [eax + 0x5c]
cmp ecx, dword [eax + 0x60]
je 0x51b90d
mov edx, dword [eax + 0xac]
cmp edx, dword [eax + 0xa4]
jae 0x51b918
mov word [eax + 0x78], 0
jmp 0x51b514
movzx ecx, word [ecx + 8]
mov word [eax + 0x78], cx
jmp 0x51b514
mov ecx, dword [esp + 8]
call fcn.0057ba50
mov ebx, eax
mov ecx, dword [esp + 0xc8]
xor ecx, ebp
call fcn.005810d5
mov eax, ebx
jmp 0x51b2ef
lea ecx, [esp + 0x70]
call fcn.0054a630
lea eax, [esp + 0x70]
mov byte [eax + 0x30], 0
jmp 0x51b36e
mov ecx, dword [esp + 0x14]
xor edx, edx
dec edx
xor ecx, edx
mov edx, dword [esp + 0x1c]
mov esi, 0x7fffffff
xor edx, esi
or edx, ecx
jne 0x51b3af
mov ecx, eax
call fcn.005e65e0
jmp 0x51b3af
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.005beed0
add esp, 0x10
jmp 0x51b48e
push str....._third_partylibc_srcincludeoptional:801:_assertion_this__has_value___failed:_optional_operator_called_on_a_disengaged_value_n
push 0x62a183
call fcn.005aacb0
movzx ecx, al
lea edx, [esp + 0xb8]
lea eax, [esp + 0x60]
mov dword [edx], eax
lea eax, [esp + 0xc4]
mov dword [eax], str.ScopedBlockingCallWithBaseSyncPrimitives
lea edx, [esp + 0xb4]
lea eax, [esp + 0xb8]
push eax
lea eax, [esp + 0xc8]
push eax
call fcn.005da640
add esp, 8
jmp 0x51b393
movzx eax, al
mov ecx, dword [0x64e76c]
mov edx, dword [esp + 8]
xor edx, dword [0x64e768]
mov dword [esp + 0x64], ecx
mov dword [esp + 0x60], edx
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.005e6670
add esp, 0x14
jmp 0x51b2d1
mov eax, dword [0x64f6a0]
mov dword [esp + 4], eax
mov ecx, dword [0x64f6a4]
mov dword [esp + 0xc], ecx
push ecx
push eax
push esi
push ebx
call fcn.005a13d0
mov dword [esp + 0x24], edx
mov ecx, eax
mul dword [esp + 4]
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], ecx
imul ecx, dword [esp + 0xc]
add edx, ecx
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
imul ecx, eax, 0xf4240
mov dword [esp + 0x18], ecx
imul eax, dword [esp + 4]
add eax, edx
sub ebx, dword [esp + 0x10]
sbb esi, eax
mov ecx, 0xf4240
mov eax, dword [esp + 0x20]
mul ecx
mov dword [esp + 0x10], eax
add edx, dword [esp + 0x18]
mov dword [esp + 0x18], edx
mov eax, ebx
mul ecx
imul ecx, esi, 0xf4240
add edx, ecx
push dword [esp + 0xc]
push dword [esp + 8]
push edx
push eax
call fcn.005a13d0
add eax, dword [esp + 0x10]
adc edx, dword [esp + 0x18]
jmp 0x51b22b
mov ecx, esi
call fcn.00503060
push esi
call fcn.0057dc2b
add esp, 4
jmp 0x51b54b
mov esi, dword [0x64f6a0]
mov dword [esp + 0x2c], esi
mov eax, dword [0x64f6a4]
mov dword [esp + 4], eax
push eax
push esi
push edi
push ebx
call fcn.005a13d0
mov dword [esp + 0x18], eax
mov ecx, edx
mov eax, dword [esp + 0x18]
mul esi
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x18]
mov esi, eax
imul esi, dword [esp + 4]
add edx, esi
imul esi, ecx, 0xf4240
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x2c]
imul ecx, esi
add ecx, edx
sub ebx, dword [esp + 0x24]
sbb edi, ecx
mov ecx, 0xf4240
mul ecx
mov dword [esp + 0x18], eax
add edx, dword [esp + 0x20]
mov dword [esp + 0x20], edx
mov eax, ebx
mul ecx
imul ecx, edi, 0xf4240
add edx, ecx
push dword [esp + 4]
push esi
push edx
push eax
call fcn.005a13d0
add eax, dword [esp + 0x18]
adc edx, dword [esp + 0x20]
jmp 0x51b415
mov eax, dword [0x64f6a0]
mov dword [esp + 8], eax
mov ecx, dword [0x64f6a4]
mov dword [esp + 0x14], ecx
push ecx
push eax
push esi
push edi
call fcn.005a13d0
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edx
mul dword [esp + 8]
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x1c]
imul ecx, dword [esp + 0x14]
add edx, ecx
mov eax, dword [esp + 0x18]
imul ecx, eax, 0xf4240
mov dword [esp + 0xc], ecx
imul eax, dword [esp + 8]
add eax, edx
sub edi, dword [esp + 0x10]
sbb esi, eax
mov ecx, 0xf4240
mov eax, dword [esp + 0x1c]
mul ecx
mov dword [esp + 0x1c], eax
add edx, dword [esp + 0xc]
mov dword [esp + 0xc], edx
mov eax, edi
mul ecx
imul ecx, esi, 0xf4240
add edx, ecx
push dword [esp + 0x14]
push dword [esp + 0xc]
push edx
push eax
call fcn.005a13d0
add eax, dword [esp + 0x1c]
adc edx, dword [esp + 0xc]
jmp 0x51b631
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
jmp 0x51b8a4
xor eax, eax
ucomisd xmm0, qword [0x6350b8]
mov ebx, 0x7fffffff
cmovb ebx, eax
jmp 0x51b7f5
xor eax, eax
ucomisd xmm0, qword [0x6350b8]
mov esi, 0x7fffffff
cmovb esi, eax
jmp 0x51b87d
mov eax, dword [esp + 0x14]
cmp dword [esp + 8], eax
sbb dword [esp + 0xc], edi
setl al
movzx eax, al
movsd xmm0, qword [eax*8 + 0x6350a0]
jmp 0x51b7b5
mov eax, dword [esp + 0x14]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x1c]
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.00502f80
add esp, 0xc
mov edi, dword [ebx]
test edi, edi
je 0x51b740
lock dec dword [edi]
jne 0x51b740
mov ecx, edi
call fcn.00503060
push edi
call fcn.0057dc2b
add esp, 4
jmp 0x51b740