Function at 0x14008a400
Capabilities:
Set thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x60
mov rax, qword [0x14013b028]
xor rax, rsp
mov qword [rsp + 0x58], rax
test rcx, rcx
je 0x14008a78c
mov rdi, rcx
mov r14d, dword [rcx + 8]
add r14, 0x518
mov byte [rsp + 0x3f], 0xaa
cmp byte [rcx + 2], 0
sete al
bsr rdx, r14
xor rdx, 0xffffffffffffffc0
lea rcx, [0x14011cbb0]
mov cl, byte [rdx + rcx + 0x41]
mov r8, r14
shr r8, cl
and r8d, 7
lea rcx, [0x14011cc00]
mov rcx, qword [rcx + rdx*8 + 0x208]
and rcx, r14
lea rdx, [r8 + rdx*8]
add rdx, 0x208
cmp rcx, 1
sbb rdx, 0xffffffffffffffff
lea rcx, [0x140129b18]
movzx ecx, word [rcx + rdx*2 + 0x400]
cmp cx, 0x6e
setb dl
and dl, al
movzx eax, dl
or eax, ecx
movzx eax, ax
lea r13, [rax + rax*4]
mov eax, r13d
lea r15, [rdi + rax*8]
add r15, 0x48
lea rbx, [rdi + 0x40]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x14008a71b
lea r12, [rdi + 0x48]
mov rax, qword [r15]
mov rsi, qword [rax]
test rsi, rsi
je 0x14008a728
mov byte [rsp + 0x3f], 0
mov r8, qword [rsi]
test r8, r8
je 0x14008a714
mov edx, r13d
mov rcx, r8
bswap rcx
mov r14d, dword [r12 + rdx*8 + 0x18]
mov rdx, rcx
xor rdx, rsi
cmp rdx, 0x1fffff
ja 0x14008a7a7
mov edx, ecx
and edx, 0x1fc000
je 0x14008a7a7
prefetcht0 byte [rcx]
mov qword [rax], rcx
mov ecx, dword [rax + 0x18]
lea edx, [rcx + 2]
and edx, 0x3ffe
and ecx, 0xffffc001
or ecx, edx
mov dword [rax + 0x18], ecx
mov rax, qword [rax + 0x10]
mov eax, dword [rax + 0x18]
add rax, qword [rdi + 0x1498]
mov qword [rdi + 0x1498], rax
mov rcx, qword [rdi + 0x14a0]
cmp rcx, rax
cmova rax, rcx
mov qword [rdi + 0x14a0], rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov dword [rsi], 0
mov byte [rsi + 4], 0
mov eax, 0xf1
xor ecx, ecx
mov dword [rsi + rax - 0x71], ecx
mov qword [rsi + rax - 0x79], rcx
mov byte [rsi + rax - 0x70], 0
mov dword [rsi + rax - 0x61], ecx
mov qword [rsi + rax - 0x69], rcx
mov byte [rsi + rax - 0x60], 0
mov dword [rsi + rax - 0x51], ecx
mov qword [rsi + rax - 0x59], rcx
mov byte [rsi + rax - 0x50], 0
mov dword [rsi + rax - 0x41], ecx
mov qword [rsi + rax - 0x49], rcx
mov byte [rsi + rax - 0x40], 0
mov dword [rsi + rax - 0x31], ecx
mov qword [rsi + rax - 0x39], rcx
mov byte [rsi + rax - 0x30], 0
mov dword [rsi + rax - 0x21], ecx
mov qword [rsi + rax - 0x29], rcx
mov byte [rsi + rax - 0x20], 0
mov dword [rsi + rax - 0x11], ecx
mov qword [rsi + rax - 0x19], rcx
mov byte [rsi + rax - 0x10], 0
mov dword [rsi + rax - 1], ecx
mov qword [rsi + rax - 9], rcx
mov byte [rsi + rax], 0
sub rax, 0xffffffffffffff80
cmp rax, 0x571
jne 0x14008a57b
mov qword [rsi + 0x4f8], rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [rsi + 0x500], eax
xorps xmm0, xmm0
movups xmmword [rsi + 0x508], xmm0
lea rcx, [0x14013d5a8]
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x14008a78f
mov qword [rsi + 0x510], 0
mov rax, qword [0x14013d5b0]
mov qword [0x14013d5b0], rsi
mov qword [rsi + 0x508], rax
test rax, rax
je 0x14008a654
mov qword [rax + 0x510], rsi
lea rcx, [0x14013d5a8]
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
xorps xmm0, xmm0
movups xmmword [rsi + 0x48], xmm0
movups xmmword [rsi + 0x38], xmm0
movups xmmword [rsi + 0x28], xmm0
movups xmmword [rsi + 0x18], xmm0
movups xmmword [rsi + 8], xmm0
lea rax, [rsi + 0x82]
xor ecx, ecx
lea rdx, [0x14014cea0]
nop dword [rax + rax]
mov qword [rax - 0xa], 0
mov byte [rax - 2], 0
movzx r8d, byte [rcx + rdx]
mov byte [rax - 1], r8b
movzx r8d, word [r12 + 0x18]
mov word [rax], r8w
cmp qword [r12], 0
je 0x14008a783
inc rcx
add rax, 0x10
add r12, 0x28
cmp rcx, 0x48
jne 0x14008a690
mov ecx, dword [0x14014ce98]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [0x140149910]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
mov qword [rax + 0x160], rsi
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400a1ff0
mov rax, rsi
add rsp, 0x60
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor ecx, ecx
jmp 0x14008a51d
mov rcx, rbx
call fcn.14005f010
jmp 0x14008a4c7
lea rax, [rsp + 0x3f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x4000
mov rcx, r15
mov rdx, rdi
mov r8d, 2
mov r9, r14
call fcn.14005f080
test rax, rax
je 0x14008a7a0
mov rsi, rax
and rax, 0xffffffffffe00000
mov ecx, esi
shr ecx, 9
and ecx, 0xfe0
add rax, rcx
add rax, 0x1000
movzx ecx, byte [rax + 0x1e]
and ecx, 0x3f
shl ecx, 5
sub rax, rcx
jmp 0x14008a537
mov byte [rax - 1], 0
jmp 0x14008a6ba
int3
lea rcx, [0x14013d5a8]
call fcn.14005f010
jmp 0x14008a628
xor esi, esi
jmp 0x14008a561
movaps xmm0, xmmword [0x14011bb10]
lea rsi, [rsp + 0x40]
movaps xmmword [rsi], xmm0
lea rdx, str.first
mov rcx, rsi
call fcn.1400d64a0
mov rcx, rsi
call fcn.140001e40
mov rcx, r14
call fcn.1400ff5d0
int3