Function at 0x140031280
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 [0x140131038]
xor rax, rsp
mov qword [rsp + 0x40], rax
test rcx, rcx
je 0x140031512
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 0x140031301
mov eax, edi
test edi, edi
jle 0x1400312e7
pause
dec eax
jne 0x1400312df
add ebp, edi
add edi, edi
cmp edi, 0x40
cmovge edi, r12d
cmp ebp, 0x3e8
jl 0x1400312cf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov rax, qword [r14]
mov rdi, qword [rax]
test rdi, rdi
je 0x1400314db
mov byte [rsp + 0x3f], 0
mov rcx, qword [rdi]
test rcx, rcx
je 0x140031335
mov rdx, rcx
not rdx
cmp qword [rdi + 8], rdx
jne 0x14003150d
bswap rcx
prefetcht0 byte [rcx]
jmp 0x140031337
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 0x140031351
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, [0x1401347a8]
mov r13d, 0x40
mov rcx, r14
call r15
test al, al
jne 0x140031409
mov eax, ebp
test ebp, ebp
jle 0x1400313ea
pause
dec eax
jne 0x1400313e1
add r12d, ebp
add ebp, ebp
cmp ebp, 0x40
cmovge ebp, r13d
cmp r12d, 0x3e8
jl 0x1400313d1
lea rcx, [0x1401347a8]
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov qword [rdi + 0x608], 0
mov rax, qword [0x1401347b0]
mov qword [0x1401347b0], rdi
mov qword [rdi + 0x600], rax
test rax, rax
je 0x140031435
mov qword [rax + 0x608], rdi
lea rcx, [0x1401347a8]
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, [0x14013bdc0]
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 0x1400314a3
movzx ebp, word [rsi + 0x18]
mov word [rax], bp
inc rcx
add rax, 0x10
add rsi, 0x28
cmp rcx, 0x59
jne 0x140031471
jmp 0x1400314ab
mov byte [rax - 1], 0
xor ebp, ebp
jmp 0x14003148d
mov ecx, dword [0x14013bdb8]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140079ea0
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.140003230
mov rdi, rax
jmp 0x14003133e
call fcn.1400a8e50
int3