Function at 0x14002bd50
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 [0x140173028]
xor rax, rsp
mov qword [rsp + 0x40], rax
test rcx, rcx
je 0x14002c00a
movabs rax, 0xe69e32f3ad9ea63
cmp qword [0x1401765a0], rax
jne 0x14002c00d
mov rsi, rcx
mov eax, dword [rcx + 8]
lea r15, [rax + 0x2f8]
mov byte [rsp + 0x3f], 0xaa
cmp byte [rcx + 3], 0
jne 0x14002bdfd
cmp eax, 0x7fd07
ja 0x14002bdfd
mov edx, r15d
mov ecx, 0xffffffff
mov eax, 0x20
sub edx, 1
cmovae ecx, eax
je 0x14002bdc9
bsr eax, edx
xor eax, 0x1f
sub ecx, eax
mov eax, 1
shl eax, cl
movsxd rcx, eax
mov rax, rcx
shr rax, 1
lea rbp, [rax + rax*4]
shr rbp, 2
cmp rbp, r15
cmovb rbp, rcx
test rbp, rbp
je 0x14002bf8d
bsr rcx, rbp
xor rcx, 0x3f
jmp 0x14002be08
bsr rcx, r15
xor rcx, 0x3f
mov rbp, r15
mov edx, 0x40
sub rdx, rcx
lea rcx, [0x140158770]
mov cl, byte [rdx + rcx]
mov rax, rbp
shr rax, cl
and eax, 3
lea rcx, [0x1401587c0]
and rbp, qword [rcx + rdx*8]
lea rax, [rax + rdx*4]
cmp rbp, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x140158358]
movzx eax, word [rcx + rax*2 + 0x200]
lea rbx, [rax + rax*4]
lea r12, [rsi + rbx*8]
add r12, 0x48
lea r14, [rsi + 0x40]
mov edi, 1
xor r13d, r13d
mov rbp, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r14
call rbp
test al, al
jne 0x14002be9b
mov eax, edi
test edi, edi
jle 0x14002be80
pause
dec eax
jne 0x14002be77
add r13d, edi
add edi, edi
cmp edi, 0x10
mov eax, 0x10
cmovge edi, eax
cmp r13d, 0x40
jl 0x14002be68
mov rcx, r14
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r12]
mov rdi, qword [rax]
test rdi, rdi
je 0x14002bf97
mov byte [rsp + 0x3f], 0
mov rbp, qword [rdi]
test rbp, rbp
je 0x14002bee9
mov ecx, dword [rsi + rbx*8 + 0x60]
bswap rbp
mov rdx, rbp
xor rdx, rdi
cmp rdx, 0x1fffff
ja 0x14002bffe
mov edx, ebp
and edx, 0x1fc000
test rdx, rdx
je 0x14002bffe
prefetcht0 byte [rbp]
jmp 0x14002beeb
xor ebp, ebp
mov qword [rax], rbp
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 [rsi + 0xa98]
mov qword [rsi + 0xa98], rax
mov rcx, qword [rsi + 0xaa0]
cmp rcx, rax
cmovae rax, rcx
mov qword [rsi + 0xaa0], rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rcx, rdi
mov rdx, rsi
call fcn.14005a940
mov ecx, dword [0x1401825f8]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [0x14017c9f0]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
mov qword [rax + 0x120], rdi
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140083c00
mov rax, rdi
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 0x40
jmp 0x14002be08
lea rax, [rsp + 0x3f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x4000
mov rcx, r12
mov rdx, rsi
mov r8d, 2
mov r9, r15
call fcn.140019db0
test rax, rax
je 0x14002c003
mov rdi, rax
mov rcx, rax
and rcx, 0xffffffffffe00000
mov rdx, rax
shr rdx, 9
and edx, 0xfe0
lea rax, [rdx + rcx]
movzx ecx, byte [rdx + rcx + 0x101e]
and ecx, 0x3f
shl rcx, 5
sub rax, rcx
add rax, 0x1000
jmp 0x14002bf05
call fcn.1400b11d0
xor edi, edi
jmp 0x14002bf2f
int3
int3