Function at 0x14005cc80
Capabilities:
Set thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov rax, qword [0x14028f028]
xor rax, rsp
mov qword [rsp + 0x40], rax
test rcx, rcx
je 0x14005cf12
mov rsi, rcx
mov byte [rsp + 0x3f], 0xaa
lea r14, [rcx + 0x858]
lea rbx, [rcx + 8]
mov edi, 1
xor ebp, ebp
mov r15, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov r12d, 0x40
mov rcx, rbx
call r15
test al, al
jne 0x14005cd01
mov eax, edi
test edi, edi
jle 0x14005cce7
pause
dec eax
jne 0x14005ccdf
add ebp, edi
add edi, edi
cmp edi, 0x40
cmovge edi, r12d
cmp ebp, 0x3e8
jl 0x14005cccf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov rax, qword [r14]
mov rdi, qword [rax]
test rdi, rdi
je 0x14005cedb
mov byte [rsp + 0x3f], 0
mov rcx, qword [rdi]
test rcx, rcx
je 0x14005cd35
mov rdx, rcx
not rdx
cmp qword [rdi + 8], rdx
jne 0x14005cf0d
bswap rcx
prefetcht0 byte [rcx]
jmp 0x14005cd37
xor ecx, ecx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
lea rax, [rdi + 0x590]
mov rcx, rdi
mov dword [rcx + 8], 0
mov qword [rcx], 0
mov byte [rcx + 9], 0
add rcx, 0x10
cmp rcx, rax
jne 0x14005cd51
xor r12d, r12d
mov qword [rdi + 0x590], r12
mov byte [rdi + 0x598], 0
lea rbx, [rdi + 0x5a0]
xorps xmm0, xmm0
movups xmmword [rdi + 0x5a0], xmm0
movups xmmword [rdi + 0x5b0], xmm0
movups xmmword [rdi + 0x5c0], xmm0
movups xmmword [rdi + 0x5d0], xmm0
movups xmmword [rdi + 0x5e0], xmm0
mov qword [rdi + 0x5f0], r12
mov qword [rdi + 0x5f8], rsi
movups xmmword [rdi + 0x600], xmm0
mov ebp, 1
lea r14, [0x1402927e0]
mov r13d, 0x40
mov rcx, r14
call r15
test al, al
jne 0x14005ce09
mov eax, ebp
test ebp, ebp
jle 0x14005cdea
pause
dec eax
jne 0x14005cde1
add r12d, ebp
add ebp, ebp
cmp ebp, 0x40
cmovge ebp, r13d
cmp r12d, 0x3e8
jl 0x14005cdd1
lea rcx, [0x1402927e0]
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov qword [rdi + 0x608], 0
mov rax, qword [0x1402927e8]
mov qword [0x1402927e8], rdi
mov qword [rdi + 0x600], rax
test rax, rax
je 0x14005ce35
mov qword [rax + 0x608], rdi
lea rcx, [0x1402927e0]
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
xorps xmm0, xmm0
movups xmmword [rbx + 0x40], xmm0
movups xmmword [rbx + 0x30], xmm0
movups xmmword [rbx + 0x20], xmm0
movups xmmword [rbx + 0x10], xmm0
movups xmmword [rbx], xmm0
mov qword [rbx + 0x50], 0
lea rax, [rdi + 0xa]
add rsi, 0x10
xor ecx, ecx
lea rdx, [0x14029b020]
mov qword [rax - 0xa], 0
mov byte [rax - 2], 0
mov bl, byte [rcx + rdx]
mov byte [rax - 1], bl
cmp qword [rsi], 0
je 0x14005cea3
movzx ebp, word [rsi + 0x18]
mov word [rax], bp
inc rcx
add rax, 0x10
add rsi, 0x28
cmp rcx, 0x59
jne 0x14005ce71
jmp 0x14005ceab
mov byte [rax - 1], 0
xor ebp, ebp
jmp 0x14005ce8d
mov ecx, dword [0x14029b018]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400ccfe0
mov rax, rdi
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rax, [rsp + 0x3f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x4000
mov r9d, 0x610
mov rcx, r14
mov rdx, rsi
mov r8d, 2
call fcn.140002d70
mov rdi, rax
jmp 0x14005cd3e
call fcn.14011f1c0
int3