Function at 0x140035bd0
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 [0x140166028]
xor rax, rsp
mov qword [rsp + 0x40], rax
test rcx, rcx
je 0x140035e62
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 0x140035c51
mov eax, edi
test edi, edi
jle 0x140035c37
pause
dec eax
jne 0x140035c2f
add ebp, edi
add edi, edi
cmp edi, 0x40
cmovge edi, r12d
cmp ebp, 0x3e8
jl 0x140035c1f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov rax, qword [r14]
mov rdi, qword [rax]
test rdi, rdi
je 0x140035e2b
mov byte [rsp + 0x3f], 0
mov rcx, qword [rdi]
test rcx, rcx
je 0x140035c85
mov rdx, rcx
not rdx
cmp qword [rdi + 8], rdx
jne 0x140035e5d
bswap rcx
prefetcht0 byte [rcx]
jmp 0x140035c87
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 0x140035ca1
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, [0x1401695f0]
mov r13d, 0x40
mov rcx, r14
call r15
test al, al
jne 0x140035d59
mov eax, ebp
test ebp, ebp
jle 0x140035d3a
pause
dec eax
jne 0x140035d31
add r12d, ebp
add ebp, ebp
cmp ebp, 0x40
cmovge ebp, r13d
cmp r12d, 0x3e8
jl 0x140035d21
lea rcx, [0x1401695f0]
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov qword [rdi + 0x608], 0
mov rax, qword [0x1401695f8]
mov qword [0x1401695f8], rdi
mov qword [rdi + 0x600], rax
test rax, rax
je 0x140035d85
mov qword [rax + 0x608], rdi
lea rcx, [0x1401695f0]
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, [0x140171960]
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 0x140035df3
movzx ebp, word [rsi + 0x18]
mov word [rax], bp
inc rcx
add rax, 0x10
add rsi, 0x28
cmp rcx, 0x59
jne 0x140035dc1
jmp 0x140035dfb
mov byte [rax - 1], 0
xor ebp, ebp
jmp 0x140035ddd
mov ecx, dword [0x140171950]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14007ed30
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.140003120
mov rdi, rax
jmp 0x140035c8e
call fcn.1400ae330
int3