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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x48
mov esi, esp
mov eax, dword [0x644040]
xor eax, ebp
mov dword [esi + 0x40], eax
mov eax, dword [ebp + 8]
mov dword [esi + 0x34], eax
mov edi, dword [ecx + 8]
mov eax, dword [edi + 0x18]
mov edx, dword [edi + 0x1c]
nop word [eax + eax]
mov ebx, eax
add ebx, 1
mov ecx, edx
adc ecx, 0
lock cmpxchg8b qword [edi + 0x18]
jne 0x519fb0
mov dword [esi + 0x2c], eax
lea edi, [ebp + 8]
mov eax, dword [edi + 0x24]
cmp eax, 1
mov dword [esi + 0x20], edx
jne 0x51a373
mov ebx, dword [edi + 0x3c]
mov al, byte [ebx + 8]
test al, al
jne 0x51a06e
mov ecx, dword [fcn.0055f760]
cmp ecx, 0x552d10
jne 0x51a34b
xor eax, eax
lea edi, [esi + 0x38]
mov dword [edi + 4], eax
mov dword [edi], eax
push edi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [edi]
mov edi, dword [edi + 4]
cmp eax, 0x7bd05af7
mov ecx, edi
sbb ecx, 0x863
jge 0x51a5ae
mov ecx, 0xf4240
mul ecx
imul ecx, edi, 0xf4240
add ecx, edx
push dword [0x6496cc]
push dword [0x6496c8]
push ecx
push eax
call fcn.00586340
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], edx
lea edi, [ebp + 8]
mov al, byte [ebx + 8]
cmp al, 1
je 0x51a506
test ebx, ebx
je 0x51a4e6
mov eax, dword [esi + 0x38]
mov ecx, dword [esi + 0x3c]
mov dword [ebx], eax
mov dword [ebx + 4], ecx
mov byte [ebx + 8], 1
mov al, 1
test al, al
je 0x51a4d2
mov eax, dword [edi + 0x1c]
sub eax, dword [ebx]
mov ecx, dword [edi + 0x20]
sbb ecx, dword [ebx + 4]
seto dl
mov byte [esi + 0x14], dl
mov ebx, ecx
sar ebx, 0x1f
test dl, dl
lea edx, [ebx - 0x80000000]
cmove ebx, eax
cmp byte [esi + 0x14], 0
cmove edx, ecx
mov dword [esi + 0x14], edx
movq xmm0, qword [0x647168]
mov eax, dword [edi + 0x2c]
xor ecx, ecx
cmp eax, 2
cmovne ecx, eax
movd edx, xmm0
cmp ebx, edx
pshufd xmm0, xmm0, 0x55
movd edx, xmm0
sbb dword [esi + 0x14], edx
mov dword [esi + 0x14], esp
cmovl ecx, eax
mov dword [edi + 0x2c], ecx
push eax
sub esp, 0x58
mov ebx, esp
mov dword [ebx + 0x58], 0
mov dword [ebx + 0x54], 0
mov ecx, dword [edi + 0x3c]
movzx eax, byte [ecx + 8]
test al, al
mov edx, dword [esi + 0x20]
jne 0x51a194
mov dword [esi + 4], ecx
mov ecx, dword [fcn.0055f760]
cmp ecx, 0x552d10
jne 0x51a321
xor eax, eax
lea edi, [esi + 0x38]
mov dword [edi + 4], eax
mov dword [edi], eax
push edi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [edi]
mov edi, dword [edi + 4]
cmp eax, 0x7bd05af7
mov ecx, edi
sbb ecx, 0x863
jge 0x51a522
mov ecx, 0xf4240
mul ecx
imul ecx, edi, 0xf4240
add ecx, edx
push dword [0x6496cc]
push dword [0x6496c8]
push ecx
push eax
call fcn.00586340
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], edx
lea edi, [ebp + 8]
mov ecx, dword [esi + 4]
mov al, byte [ecx + 8]
cmp al, 1
je 0x51a4f5
test ecx, ecx
mov edx, dword [esi + 0x20]
je 0x51a4e6
mov eax, dword [esi + 0x38]
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x3c]
mov dword [esi + 4], eax
mov eax, dword [esi + 0xc]
mov dword [ecx], eax
mov eax, dword [esi + 4]
mov dword [ecx + 4], eax
mov byte [ecx + 8], 1
mov al, 1
test al, al
je 0x51a4d2
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [esi + 0xc], eax
mov dword [ebx + 0x48], eax
mov dword [esi + 0x18], ecx
mov dword [ebx + 0x4c], ecx
mov dword [ebx + 0x40], 0
mov dword [ebx + 0x44], 0
mov dword [ebx + 0x3c], edx
mov eax, dword [esi + 0x2c]
mov dword [ebx + 0x38], eax
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov dword [edi + 4], 0
movups xmm0, xmmword [edi + 8]
movups xmmword [ebx + 4], xmm0
movups xmm0, xmmword [edi + 0x18]
movups xmmword [ebx + 0x14], xmm0
movsd xmm0, qword [edi + 0x28]
movsd qword [ebx + 0x24], xmm0
mov eax, dword [edi + 0x30]
mov dword [esi + 0x1c], eax
mov eax, dword [edi + 0x34]
mov dword [esi + 8], eax
mov dword [edi + 0x30], 0
mov dword [edi + 0x34], 0
mov eax, dword [edi + 0x38]
mov dword [esi + 0x10], eax
mov dword [ebx + 0x34], eax
mov dword [ebx + 0x50], 0
mov dword [esi + 0x20], 0
cmp dword [ebx + 0x20], 1
lea eax, [edi + 8]
mov ecx, dword [ebx + 0x28]
mov dword [esi + 0x24], ecx
mov ecx, dword [ebx + 0x58]
mov dword [esi + 0x30], ecx
mov ecx, dword [ebx + 0x54]
mov dword [esi + 0x28], ecx
mov edx, 0
je 0x51a303
mov dword [ebx], 0
movups xmm0, xmmword [eax]
mov ecx, dword [esi + 0x34]
movups xmmword [ecx], xmm0
mov eax, dword [esi + 0x18]
mov dword [ecx + 0x14], eax
mov eax, dword [esi + 0xc]
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x1c], edx
mov eax, dword [esi + 0x20]
mov dword [ecx + 0x18], eax
mov eax, dword [esi + 0x30]
mov dword [ecx + 0x24], eax
mov eax, dword [esi + 0x28]
mov dword [ecx + 0x20], eax
mov eax, dword [esi + 0x24]
mov dword [ecx + 0x28], eax
xorps xmm0, xmm0
movups xmmword [ecx + 0x2c], xmm0
movups xmmword [ecx + 0x39], xmm0
mov eax, dword [esi + 4]
mov dword [ecx + 0x50], eax
movzx eax, byte [ebx + 0x14]
mov byte [ecx + 0x58], al
movzx eax, byte [ebx + 0x15]
mov byte [ecx + 0x5a], al
mov eax, dword [esi + 0x1c]
mov dword [ecx + 0x5c], eax
mov dword [ebx + 0x2c], 0
mov dword [ecx + 0x64], 0
mov dword [ecx + 0x60], 0
mov eax, dword [esi + 8]
mov dword [ecx + 0x68], eax
mov dword [ebx + 0x30], 0
mov eax, dword [esi + 0x10]
mov dword [ecx + 0x6c], eax
mov eax, dword [esi + 0x2c]
mov dword [ecx + 0x44], eax
mov byte [ecx + 0x59], 0
mov esp, dword [esi + 0x14]
mov eax, dword [edi + 0x34]
test eax, eax
jne 0x51a311
mov eax, dword [edi + 0x30]
test eax, eax
jne 0x51a481
mov ebx, edi
mov edi, dword [edi + 4]
test edi, edi
jne 0x51a335
mov edi, dword [ebx]
mov ecx, dword [esi + 0x40]
xor ecx, ebp
call fcn.00565ea5
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0x40
mov ecx, dword [ebx + 0x18]
mov dword [esi + 0x20], ecx
mov edx, dword [ebx + 0x1c]
jmp 0x51a240
lock dec dword [eax]
jne 0x51a2d7
push eax
call fcn.00562bc0
add esp, 4
jmp 0x51a2d7
call dword [0x63e1bc]
lea eax, [esi + 0x38]
push eax
call ecx
add esp, 4
jmp 0x51a15e
lock dec dword [edi]
jne 0x51a2eb
mov ecx, dword [edi + 8]
call dword [0x63e1bc]
push edi
call ecx
add esp, 4
jmp 0x51a2eb
call dword [0x63e1bc]
lea eax, [esi + 0x38]
push eax
call ecx
add esp, 4
jmp 0x51a04a
call dword [0x63e1bc]
lea eax, [esi + 0x38]
push eax
call ecx
add esp, 4
jmp 0x51a3f7
test eax, eax
jne 0x51a4e1
mov ebx, dword [edi + 0x1c]
mov eax, dword [edi + 0x20]
mov dword [esi + 0x14], eax
mov edi, dword [edi + 0x3c]
mov al, byte [edi + 8]
test al, al
jne 0x51a41b
mov ecx, dword [fcn.0055f760]
cmp ecx, 0x552d10
jne 0x51a35f
mov dword [esi + 0xc], edi
xor eax, eax
lea edi, [esi + 0x38]
mov dword [edi + 4], eax
mov dword [edi], eax
push edi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [edi]
mov edi, dword [edi + 4]
cmp eax, 0x7bd05af7
mov ecx, edi
sbb ecx, 0x863
jge 0x51a63a
mov ecx, 0xf4240
mul ecx
imul ecx, edi, 0xf4240
add ecx, edx
push dword [0x6496cc]
push dword [0x6496c8]
push ecx
push eax
call fcn.00586340
mov edi, dword [esi + 0xc]
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], edx
mov al, byte [edi + 8]
cmp al, 1
je 0x51a514
test edi, edi
je 0x51a4e6
mov eax, dword [esi + 0x38]
mov ecx, dword [esi + 0x3c]
mov dword [edi], eax
mov dword [edi + 4], ecx
mov byte [edi + 8], 1
mov al, 1
test al, al
je 0x51a4d2
mov eax, ebx
add eax, 1
mov edx, dword [esi + 0x14]
mov ecx, edx
adc ecx, 0x80000000
cmp eax, 2
sbb ecx, 0
mov ecx, dword [edi]
mov eax, dword [edi + 4]
mov dword [esi + 4], ebx
jb 0x51a499
add ecx, ebx
adc eax, edx
seto bl
mov edx, eax
sar edx, 0x1f
test bl, bl
lea edi, [edx - 0x80000000]
cmove edx, ecx
test bl, bl
cmove edi, eax
lea ecx, [ebp + 8]
mov eax, dword [ecx + 0x24]
mov dword [ecx + 0x1c], edx
mov dword [ecx + 0x20], edi
mov edi, ecx
cmp eax, 1
je 0x51a479
mov dword [edi + 0x24], 1
mov ebx, dword [esi + 4]
jmp 0x51a0a1
lock dec dword [eax + 4]
jne 0x51a2e2
push eax
call fcn.00542640
add esp, 4
jmp 0x51a2e2
mov edi, ecx
xor edx, edx
inc edx
add edi, edx
mov ebx, eax
adc ebx, 0x80000000
mov dword [esi + 0xc], 0
xor edx, edx
inc edx
cmp edx, edi
sbb dword [esi + 0xc], ebx
setb dl
mov ebx, dword [esi + 4]
xor ecx, ebx
mov edi, dword [esi + 0x14]
xor eax, edi
or eax, ecx
sete al
or al, dl
mov edx, ebx
jne 0x51a45f
int3
push str....._third_partylibc_srcincludeoptional:800:_assertion_this__has_value___failed:_optional_operator_called_on_a_disengaged_value_n
push 0x622e92
call fcn.0058fdd0
call fcn.005ceb10
push str....._third_partylibc_srcinclude__memoryconstruct_at.h:40:_assertion___location___nullptr_failed:_null_pointer_given_to_construct_at_n
push 0x622e92
call fcn.0058fdd0
movq xmm0, qword [esi + 0x38]
movq qword [ecx], xmm0
mov edx, dword [esi + 0x20]
jmp 0x51a194
movq xmm0, qword [esi + 0x38]
movq qword [ebx], xmm0
jmp 0x51a06e
movq xmm0, qword [esi + 0x38]
movq qword [edi], xmm0
jmp 0x51a41b
mov ecx, dword [0x6496c8]
mov dword [esi + 0xc], ecx
mov edx, dword [0x6496cc]
mov dword [esi + 0x10], edx
push edx
push ecx
push edi
push eax
mov dword [esi + 0x18], eax
call fcn.00586340
mov dword [esi + 8], eax
mov ecx, edx
mov eax, dword [esi + 8]
mul dword [esi + 0xc]
mov dword [esi + 0x24], eax
mov eax, edi
mov edi, dword [esi + 8]
imul edi, dword [esi + 0x10]
add edx, edi
imul edi, ecx, 0xf4240
mov dword [esi + 0x1c], edi
imul ecx, dword [esi + 0xc]
add ecx, edx
mov edi, dword [esi + 0x18]
sub edi, dword [esi + 0x24]
sbb eax, ecx
mov ecx, eax
mov edx, 0xf4240
mov eax, dword [esi + 8]
mul edx
mov dword [esi + 8], eax
add edx, dword [esi + 0x1c]
mov dword [esi + 0x18], edx
mov eax, edi
mov edx, 0xf4240
mul edx
imul ecx, ecx, 0xf4240
add edx, ecx
push dword [esi + 0x10]
push dword [esi + 0xc]
push edx
push eax
call fcn.00586340
add eax, dword [esi + 8]
adc edx, dword [esi + 0x18]
jmp 0x51a155
mov ecx, dword [0x6496c8]
mov dword [esi + 0x14], ecx
mov edx, dword [0x6496cc]
mov dword [esi + 0xc], edx
push edx
push ecx
push edi
push eax
mov dword [esi + 8], eax
call fcn.00586340
mov dword [esi + 4], eax
mov ecx, edx
mov eax, dword [esi + 4]
mul dword [esi + 0x14]
mov dword [esi + 0x18], eax
mov eax, edi
mov edi, dword [esi + 4]
imul edi, dword [esi + 0xc]
add edx, edi
imul edi, ecx, 0xf4240
mov dword [esi + 0x10], edi
imul ecx, dword [esi + 0x14]
add ecx, edx
mov edi, dword [esi + 8]
sub edi, dword [esi + 0x18]
sbb eax, ecx
mov ecx, eax
mov edx, 0xf4240
mov eax, dword [esi + 4]
mul edx
mov dword [esi + 4], eax
add edx, dword [esi + 0x10]
mov dword [esi + 8], edx
mov eax, edi
mov edx, 0xf4240
mul edx
imul ecx, ecx, 0xf4240
add edx, ecx
push dword [esi + 0xc]
push dword [esi + 0x14]
push edx
push eax
call fcn.00586340
add eax, dword [esi + 4]
adc edx, dword [esi + 8]
jmp 0x51a041
mov ecx, dword [0x6496c8]
mov dword [esi + 8], ecx
mov edx, dword [0x6496cc]
mov dword [esi + 0x18], edx
push edx
push ecx
push edi
push eax
mov dword [esi + 0x1c], eax
call fcn.00586340
mov dword [esi + 0x10], eax
mov ecx, edx
mov eax, dword [esi + 0x10]
mul dword [esi + 8]
mov dword [esi + 0x28], eax
mov eax, edi
mov edi, dword [esi + 0x10]
imul edi, dword [esi + 0x18]
add edx, edi
imul edi, ecx, 0xf4240
mov dword [esi + 0x24], edi
imul ecx, dword [esi + 8]
add ecx, edx
mov edi, dword [esi + 0x1c]
sub edi, dword [esi + 0x28]
sbb eax, ecx
mov ecx, eax
mov edx, 0xf4240
mov eax, dword [esi + 0x10]
mul edx
mov dword [esi + 0x10], eax
add edx, dword [esi + 0x24]
mov dword [esi + 0x1c], edx
mov eax, edi
mov edx, 0xf4240
mul edx
imul ecx, ecx, 0xf4240
add edx, ecx
push dword [esi + 0x18]
push dword [esi + 8]
push edx
push eax
call fcn.00586340
add eax, dword [esi + 0x10]
adc edx, dword [esi + 0x1c]
jmp 0x51a3ee