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

Disassembly:
push rsi
push rdi
sub rsp, 0x48
mov rsi, qword [rcx + 0x2a8]
mov rdi, rcx
movzx ecx, word [rcx + 0x4c4]
test cl, 0x10
je 0x140055aca
movzx eax, cl
and al, 0xc0
cmp al, 0x40
jne 0x140055e6c
test cx, cx
jns 0x140055e6c
mov qword [rsp + 0x68], rbx
xor ebx, ebx
test byte [rsi + 0x58], 1
mov qword [rsp + 0x70], rbp
mov qword [rsp + 0x40], r14
je 0x140055af2
mov r14b, 0x20
lea eax, [rbx + 0x38]
jmp 0x140055b58
movzx edx, word [rdi + 0x2f8]
movzx ecx, dx
shr cx, 8
cmp dl, 3
jne 0x140055b11
cmp cl, 4
jb 0x140055b11
mov eax, 1
jmp 0x140055b1d
mov eax, ebx
cmp dl, 0xfe
jne 0x140055b1d
cmp cl, 0xfc
jbe 0x140055b4b
test eax, eax
jne 0x140055b4b
mov rax, qword [rdi + 0x10]
test rax, rax
je 0x140055b4b
movups xmm0, xmmword [rax + 0x5c]
movups xmmword [rsi + 0x74], xmm0
movups xmm1, xmmword [rax + 0x6c]
movups xmmword [rsi + 0x84], xmm1
mov rax, qword [rdi + 0x10]
movzx ecx, byte [rax + 0x7c]
mov byte [rsi + 0x94], cl
movzx r14d, byte [rsi + 0x94]
mov eax, 0x74
lea rbp, [rax + rsi]
mov eax, dword [rdi + 0x2e4]
mov dword [rsi + 0x70], eax
movzx eax, byte [rdi + 0x4c4]
shr al, 6
and al, 3
mov byte [rsi + 0x68], al
movzx edx, word [rdi + 0x2f8]
movzx ecx, dx
shr cx, 8
cmp dl, 3
jne 0x140055b93
cmp cl, 4
jb 0x140055b93
mov eax, 1
jmp 0x140055b9f
mov eax, ebx
cmp dl, 0xfe
jne 0x140055b9f
cmp cl, 0xfc
jbe 0x140055bd6
test eax, eax
jne 0x140055bd6
mov rax, qword [rdi + 0x10]
test rax, rax
je 0x140055bd6
movups xmm0, xmmword [rax + 0xad]
movups xmmword [rsi + 0x95], xmm0
movups xmm1, xmmword [rax + 0xbd]
movups xmmword [rsi + 0xa5], xmm1
movups xmm0, xmmword [rax + 0xcd]
movups xmmword [rsi + 0xb5], xmm0
movzx eax, word [rdi + 0x4c8]
shr ax, 0xb
and ax, 1
mov word [rsi + 0xc6], ax
movzx ecx, byte [rdi + 0x539]
lea eax, [rcx - 1]
cmp al, 0x1e
ja 0x140055c24
mov r8d, ecx
lea rdx, [rdi + 0x508]
mov rcx, qword [rdi + 0x2a8]
add rcx, 0xe1
call fcn.1400c1bc0
movzx eax, byte [rdi + 0x539]
mov byte [rsi + 0xe0], al
cmp dword [0x1401c1d2c], ebx
mov eax, dword [rdi + 0x2e4]
mov dword [rsi + 0x70], eax
jne 0x140055c4c
lea rcx, [0x1401c1e78]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov dword [0x1401c1d2c], 1
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x60]
cqo
idiv qword [0x1401c1e78]
mov dword [rsi + 0x6c], eax
movzx eax, byte [rdi + 0x4cd]
mov byte [rsi + 0xc8], al
movzx eax, byte [rdi + 0x4ce]
mov byte [rsi + 0xc9], al
movzx eax, byte [rdi + 0x534]
mov byte [rsi + 0x101], al
test r14b, r14b
jne 0x140055d61
movzx eax, byte [rdi + 0x4c4]
and al, 0xc0
cmp al, 0x40
jne 0x140055d61
mov rax, qword [rdi + 0x90]
mov rbp, rbx
test rax, rax
je 0x140055cbd
mov rbp, rax
jmp 0x140055d27
cmp dword [0x1401c1c60], 1
je 0x140055d20
lea rcx, [0x1401c1d00]
mov r14d, ebx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x1401c1c60], ebx
jne 0x140055d0d
xor r9d, r9d
lea rcx, [0x1401c1cb8]
call fcn.1400b4360
mov r14d, eax
test eax, eax
jne 0x140055d0d
lea rcx, [0x1401c1d00]
mov dword [0x1401c1c60], 1
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x140055d20
lea rcx, [0x1401c1d00]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp r14d, 1
jne 0x140055d27
lea rbp, [0x1401c1cb8]
mov rdx, qword [rdi + 0x2a8]
mov r8d, 0x20
add rdx, 0x38
mov rcx, rbp
call fcn.1400b45a0
test eax, eax
jne 0x140055e5d
mov rax, qword [rdi + 0x2a8]
mov r14b, 0x20
or byte [rax + 0x58], 1
mov rbp, qword [rdi + 0x2a8]
add rbp, 0x38
movzx eax, word [rdi + 0x4c4]
test al, 0xc0
jne 0x140055d85
shr eax, 6
movzx r9d, r14b
and eax, 3
mov r8, rbp
mov rdx, rsi
mov dword [rsp + 0x28], eax
call fcn.1400558a0
cmp dword [0x1401c1d2c], ebx
jne 0x140055da4
lea rcx, [0x1401c1e78]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov dword [0x1401c1d2c], 1
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x60]
lea rcx, [0x1401c1c90]
cqo
idiv qword [0x1401c1e78]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea r9, [0x1401bb500]
mov r10d, 2
lea r11, [0x1401bd760]
mov eax, dword [r9]
mov r8d, 3
cmp dword [r9 + 4], r8d
cmovb r8d, dword [r9 + 4]
dec eax
cmp eax, r10d
cmova eax, r10d
test r8d, r8d
jle 0x140055e33
cdqe
imul rcx, rax, 0x108
mov edx, dword [rcx + r9 + 0x78]
add edx, dword [rcx + r9 + 0x74]
lea ecx, [rbx + 1]
cmp edi, edx
cmovae ecx, ebx
test rax, rax
jle 0x140055e26
dec rax
jmp 0x140055e29
mov rax, r10
dec r8d
mov ebx, ecx
test r8d, r8d
jg 0x140055e03
add r9, 0x320
cmp r9, r11
jl 0x140055de1
lea rcx, [0x1401c1c90]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x1401bd774]
cmp eax, ebx
cmovb eax, ebx
mov dword [0x1401bd774], eax
mov rbp, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x68]
mov r14, qword [rsp + 0x40]
add rsp, 0x48
pop rdi
pop rsi
ret