Function at 0x140047150
Capabilities:
Set thread local storage value

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x58
mov rax, qword [0x14012c028]
xor rax, rsp
mov qword [rsp + 0x50], rax
test rcx, rcx
je 0x140047403
movabs rax, 0xe69e32f3ad9ea63
cmp qword [0x140132ef0], rax
jne 0x140047406
mov rsi, rcx
mov eax, dword [rcx + 8]
lea r14, [rax + 0x2f8]
mov byte [rsp + 0x3f], 0xaa
cmp byte [rcx + 3], 0
jne 0x1400471fa
cmp eax, 0x7fd07
ja 0x1400471fa
mov edx, r14d
mov ecx, 0xffffffff
mov eax, 0x20
sub edx, 1
cmovae ecx, eax
je 0x1400471c6
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 rbx, [rax + rax*4]
shr rbx, 2
cmp rbx, r14
cmovb rbx, rcx
test rbx, rbx
je 0x14004735a
bsr rcx, rbx
xor rcx, 0x3f
jmp 0x140047205
bsr rcx, r14
xor rcx, 0x3f
mov rbx, r14
mov edx, 0x40
sub rdx, rcx
lea rcx, [0x140116820]
mov cl, byte [rdx + rcx]
mov rax, rbx
shr rax, cl
and eax, 3
lea rcx, [0x140116870]
and rbx, qword [rcx + rdx*8]
lea rax, [rax + rdx*4]
cmp rbx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x140116410]
movzx eax, word [rcx + rax*2 + 0x200]
lea rbx, [rax + rax*4]
lea r12, [rsi + rbx*8]
add r12, 0x48
lea r15, [rsi + 0x40]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
jne 0x14004726b
mov rcx, r15
call fcn.14006c470
mov rax, qword [r12]
mov rdi, qword [rax]
test rdi, rdi
je 0x140047364
mov byte [rsp + 0x3f], 0
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400472b9
mov r14d, dword [rsi + rbx*8 + 0x60]
bswap rcx
mov rdx, rcx
xor rdx, rdi
cmp rdx, 0x1fffff
ja 0x1400473cb
mov edx, ecx
and edx, 0x1fc000
test rdx, rdx
je 0x1400473cb
prefetcht0 byte [rcx]
jmp 0x1400472bb
xor ecx, ecx
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 [rsi + 0xa98]
mov qword [rsi + 0xa98], rax
mov rcx, qword [rsi + 0xaa0]
cmp rcx, rax
cmova rax, rcx
mov qword [rsi + 0xaa0], rax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rcx, rdi
mov rdx, rsi
call fcn.14006d6f0
mov ecx, dword [0x140138004]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [0x140135458]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
mov qword [rax + 0x120], rdi
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.14008a8f0
mov rax, rdi
add rsp, 0x58
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov ecx, 0x40
jmp 0x140047205
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, r14
call fcn.14006ae60
test rax, rax
je 0x1400473fc
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 0x1400472d5
movaps xmm0, xmmword [0x1401161a0]
lea rsi, [rsp + 0x40]
movaps xmmword [rsi], xmm0
mov r8, qword [rdi]
lea rdx, [0x140116400]
mov rcx, rsi
call fcn.1400c25b0
mov rcx, rsi
call fcn.14006a0e0
mov rcx, r14
call fcn.1400c2690
xor edi, edi
jmp 0x1400472ff
int3
int3