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

Disassembly:
mov qword [rsp + 0x20], r9
push rbp
push rdi
push r14
push r15
sub rsp, 0x2d8
mov r15, rcx
mov rbp, r9
lea rcx, [rsp + 0x60]
mov r14, r8
mov rdi, rdx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x140046d9c
mov rax, qword [rsp + 0x60]
xor edx, edx
sub rax, qword [0x14009c1f8]
xorps xmm0, xmm0
mov rcx, qword [r14 + 8]
imul rax, rax, 0xf4240
mov qword [rsp + 0x300], rbx
mov ebx, 0
div qword [0x14009c1f0]
mov edx, dword [rcx + 0x9c]
movzx ecx, byte [0x140089d66]
mov qword [rsp + 0x308], rsi
mov rsi, qword [rdi + 0x18]
mov qword [rsp + 0x310], r12
mov r12, rax
add r12, qword [0x14009c200]
mov qword [rsp + 0x2d0], r13
mov r13d, ebx
shr edx, 0xd
movaps xmmword [rsp + 0x2c0], xmm6
mov byte [rsp + 0x70], cl
movups xmmword [rsp + 0x71], xmm0
movups xmmword [rsp + 0x81], xmm0
test dl, 1
je 0x140046b91
mov rdx, qword [r14 + 0x48]
lea rcx, [rsp + 0x70]
call fcn.14002f5c0
mov rcx, qword [r15 + 0x120]
mov eax, ebx
add rcx, 0x9c
mov rbx, 0xffffffffffffffff
sub eax, dword [rcx]
movsxd rbp, dword [rcx]
add rbp, rcx
neg eax
sbb rax, rax
and rbp, rax
cmp byte [rbx + rbp + 1], r13b
lea rbx, [rbx + 1]
jne 0x140046af1
lea rcx, [rdi + 8]
mov r8d, 1
lea rdx, [rbx + 0x23]
call fcn.14003d100
mov r13, rax
lea r8, str._s__s
lea rax, [rsp + 0x70]
mov rcx, r13
mov r9, rbp
mov qword [rsp + 0x20], rax
lea rdx, [rbx + 0x23]
call fcn.140003900
lea rdx, [0x14008bbf4]
mov rcx, r13
call fcn.140015c40
mov rbx, rax
test rax, rax
jne 0x140046b5a
lea rcx, str.Failed_to_open_file_for_signature_ingredient_writing._Skipping_CacheWrite._n
call fcn.1400011a0
jmp 0x140046d29
mov eax, dword [rdi + 0x38]
lea r9, [rdi + 8]
mov rdx, qword [r14 + 8]
mov r8, r14
mov qword [rsp + 0x28], rbx
mov rcx, r15
mov dword [rsp + 0x20], eax
call fcn.140038330
mov rcx, rbx
call fcn.140058a4c
mov rax, qword [r14 + 0x48]
xor ebx, ebx
mov rbp, qword [rsp + 0x318]
jmp 0x140046b95
lea rax, [r14 + 0x20]
movups xmm6, xmmword [rax]
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x98]
movaps xmmword [rsp + 0x60], xmm6
call fcn.14002f5c0
mov rcx, qword [r15 + 0x120]
lea r8, str._s__s_out
add rcx, 0x9c
mov eax, ebx
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.140003900
test rbp, rbp
je 0x140046c2b
lea rdx, [0x14008bbf4]
lea rcx, [rsp + 0xc0]
call fcn.140015c40
mov r8, rbp
lea rdx, [0x14008bbf8]
mov rcx, rax
mov rbx, rax
call fcn.140001150
mov rcx, rbx
call fcn.140058a4c
mov rax, qword [r14 + 8]
lea rcx, [rsp + 0xc0]
mov rdx, qword [r15 + 0x1d0]
mov r9, rdi
mov qword [rsp + 0x40], rcx
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], rax
lea r8, [rax + 0x40]
movdqa xmmword [rsp + 0x60], xmm6
mov dword [rsp + 0x20], 1
call fcn.140014750
lea rcx, [rsp + 0x60]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x140046d8f
mov rax, qword [rsp + 0x60]
xor edx, edx
sub rax, qword [0x14009c1f8]
xorps xmm6, xmm6
imul rax, rax, 0xf4240
div qword [0x14009c1f0]
mov rcx, rax
sub rcx, r12
add rcx, qword [0x14009c200]
js 0x140046cb6
cvtsi2sd xmm6, rcx
jmp 0x140046ccb
mov rax, rcx
and ecx, 1
shr rax, 1
or rax, rcx
cvtsi2sd xmm6, rax
addsd xmm6, xmm6
divsd xmm6, qword [0x14008fed0]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [r14 + 8]
xor r8d, r8d
add rcx, 0xc
mov eax, r8d
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, r8d
lea r8, str._s__CacheWrite__s_
call fcn.14003dcb0
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, qword [rdi + 0x10]
mov qword [rdi + 0x18], rsi
cmp qword [rax + 0x20], rsi
jbe 0x140046d4d
nop word [rax + rax]
mov rax, qword [rax]
mov qword [rdi + 0x10], rax
cmp qword [rax + 0x20], rsi
ja 0x140046d40
mov rax, qword [rdi + 0x10]
mov r13, qword [rsp + 0x2d0]
mov r12, qword [rsp + 0x310]
mov rbx, qword [rsp + 0x300]
sub rsi, qword [rax + 0x20]
movaps xmm6, xmmword [rsp + 0x2c0]
mov qword [rax + 0x18], rsi
mov rsi, qword [rsp + 0x308]
add rsp, 0x2d8
pop r15
pop r14
pop rdi
pop rbp
ret
lea rcx, str.QueryPerformanceCounter_failed
call fcn.140014f00
int3
lea rcx, str.QueryPerformanceCounter_failed
call fcn.140014f00
int3