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

Disassembly:
push rbp
push rdi
push r12
push r14
sub rsp, 0x2d8
mov rbp, rcx
mov r12, r9
lea rcx, [rsp + 0x60]
mov rdi, r8
mov r14, rdx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x140045865
mov rax, qword [rsp + 0x60]
xor edx, edx
sub rax, qword [0x140099f88]
xorps xmm0, xmm0
mov rcx, qword [rdi + 8]
imul rax, rax, 0xf4240
mov qword [rsp + 0x300], rbx
div qword [0x140099f80]
mov edx, dword [rcx + 0xa4]
movzx ecx, byte [0x140087d76]
mov qword [rsp + 0x308], rsi
mov qword [rsp + 0x310], r13
mov r13d, 0
mov qword [rsp + 0x2d0], r15
mov esi, r13d
mov r15, rax
shr edx, 0xd
add r15, qword [0x140099f90]
mov byte [rsp + 0x70], cl
movups xmmword [rsp + 0x71], xmm0
movups xmmword [rsp + 0x81], xmm0
test dl, 1
je 0x140045684
mov rdx, qword [rdi + 0x48]
lea rcx, [rsp + 0x70]
call fcn.14002de90
lea rdx, [0x140089bc4]
lea rcx, [rsp + 0x70]
call fcn.1400147d0
mov rbx, rax
test rax, rax
jne 0x140045651
lea rcx, str.Failed_to_open_file_for_signature_ingredient_writing._Skipping_CacheWrite._n
call fcn.1400011a0
jmp 0x140045837
mov eax, dword [r14 + 0x38]
lea r9, [r14 + 8]
mov rdx, qword [rdi + 8]
mov r8, rdi
mov qword [rsp + 0x28], rbx
mov rcx, rbp
mov dword [rsp + 0x20], eax
call fcn.140036a50
mov rcx, rbx
call fcn.140056cc4
mov rax, qword [rdi + 0x48]
lea rsi, [rsp + 0x70]
jmp 0x140045688
lea rax, [rdi + 0x20]
movaps xmmword [rsp + 0x2c0], xmm6
lea rdx, [rsp + 0x60]
movups xmm6, xmmword [rax]
lea rcx, [rsp + 0x98]
movaps xmmword [rsp + 0x60], xmm6
call fcn.14002de90
mov rcx, qword [rbp + 0x120]
lea r8, str._s__s_out
add rcx, 0x9c
mov eax, r13d
mov edx, 0x200
sub eax, dword [rcx]
movsxd r9, dword [rcx]
add r9, rcx
lea rcx, [rsp + 0xc0]
neg eax
sbb rax, rax
and r9, rax
lea rax, [rsp + 0x98]
mov qword [rsp + 0x20], rax
call fcn.140003390
test r12, r12
je 0x140045727
lea rdx, [0x140089bc4]
lea rcx, [rsp + 0xc0]
call fcn.1400147d0
mov r8, r12
lea rdx, [0x140089bc8]
mov rcx, rax
mov rbx, rax
call fcn.140001150
mov rcx, rbx
call fcn.140056cc4
mov rax, qword [rdi + 8]
lea rcx, [rsp + 0xc0]
mov rdx, qword [rbp + 0x1d0]
mov r9, r14
mov qword [rsp + 0x40], rcx
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rax
lea r8, [rax + 0x38]
movdqa xmmword [rsp + 0x60], xmm6
mov dword [rsp + 0x20], 1
call fcn.1400131a0
mov ebx, eax
test rsi, rsi
je 0x140045777
mov rcx, rsi
call fcn.1400145f0
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x140045872
mov rax, qword [rsp + 0x60]
xor edx, edx
sub rax, qword [0x140099f88]
xorps xmm6, xmm6
imul rax, rax, 0xf4240
div qword [0x140099f80]
mov rcx, rax
sub rcx, r15
add rcx, qword [0x140099f90]
js 0x1400457bf
cvtsi2sd xmm6, rcx
jmp 0x1400457d4
mov rax, rcx
and ecx, 1
shr rax, 1
or rax, rcx
cvtsi2sd xmm6, rax
addsd xmm6, xmm6
divsd xmm6, qword [0x14008df68]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rdi + 8]
lea r8, str._s__CacheWrite__s_
add rcx, 0xc
mov eax, r13d
cvttsd2si edx, xmm6
sub eax, dword [rcx]
movsxd r9, dword [rcx]
add r9, rcx
mov ecx, 2
neg eax
sbb rax, rax
and r9, rax
lea rax, [rsp + 0x70]
cmp ebx, 3
mov qword [rsp + 0x20], rax
cmove ecx, r13d
call fcn.14003c360
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
movaps xmm6, xmmword [rsp + 0x2c0]
mov r13, qword [rsp + 0x310]
mov rsi, qword [rsp + 0x308]
mov rbx, qword [rsp + 0x300]
mov r15, qword [rsp + 0x2d0]
add rsp, 0x2d8
pop r14
pop r12
pop rdi
pop rbp
ret
lea rcx, str.QueryPerformanceCounter_failed
call fcn.140013a60
int3
lea rcx, str.QueryPerformanceCounter_failed
call fcn.140013a60
int3