Function at 0x140049780
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov rax, rsp
push rbp
push rbx
lea rbp, [rax - 0x5f]
sub rsp, 0xf8
mov rbx, qword [0x1401ad680]
mov qword [rax - 0x18], rsi
mov rsi, rdx
mov qword [rax - 0x20], rdi
mov qword [rax - 0x30], r14
mov r14, rcx
mov ecx, dword [rbx + 0x40]
mov qword [rax - 0x38], r15
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [rbx + 0x40]
lea rdx, [rax + 1]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
lea rbx, [r14 + 0x18]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword gs:[0x58]
mov ecx, dword [0x1402374f4]
mov edx, 0x1c
mov rcx, qword [rax + rcx*8]
mov eax, dword [rdx + rcx]
cmp dword [0x1401ad7b0], eax
jg 0x140049b61
mov r15, qword [0x1401ad788]
xor edi, edi
test r15, r15
je 0x140049884
mov r8, r15
mov qword [rsp + 0xe0], r12
lea rdx, [rbp + 0x67]
lea rcx, [r14 + 0xb0]
call fcn.140043a20
mov edx, dword [rbp + 0x67]
cmp edx, 0xffffffff
je 0x140049836
lea rcx, [r14 + 0xb0]
call fcn.140047ce0
jmp 0x14004987c
mov r8, r15
lea rdx, [rbp + 0x77]
lea rcx, [r14 + 0x100]
call fcn.140043a20
movsxd rax, dword [rbp + 0x77]
cmp eax, 0xffffffff
je 0x140049862
mov rcx, rax
shl rcx, 5
add rcx, qword [r14 + 0x100]
jmp 0x140049865
mov rcx, rdi
test rcx, rcx
lea rax, [rcx + 8]
cmove rax, rdi
movups xmm0, xmmword [rax]
movups xmmword [0x140159378], xmm0
nop
int3
mov r12, qword [rsp + 0xe0]
mov r8, rsi
lea rdx, [rbp + 0x7f]
lea rcx, [r14 + 0xb0]
call fcn.140043a20
mov edx, dword [rbp + 0x7f]
cmp edx, 0xffffffff
je 0x1400498ad
lea rcx, [r14 + 0xb0]
call fcn.140047ce0
jmp 0x1400498f5
mov r8, rsi
lea rdx, [rsp + 0x20]
lea rcx, [r14 + 0x100]
call fcn.140043a20
movsxd rax, dword [rsp + 0x20]
cmp eax, 0xffffffff
je 0x1400498db
mov rcx, rax
shl rcx, 5
add rcx, qword [r14 + 0x100]
jmp 0x1400498de
mov rcx, rdi
test rcx, rcx
lea rax, [rcx + 8]
cmove rax, rdi
movups xmm0, xmmword [rax]
movups xmmword [0x140159378], xmm0
nop
int3
lea r15, [r14 + 0x100]
mov r8, rsi
mov rcx, r15
lea rdx, [rsp + 0x24]
call fcn.140043a20
movsxd rax, dword [rsp + 0x24]
cmp eax, 0xffffffff
je 0x140049922
mov rcx, rax
shl rcx, 5
add rcx, qword [r15]
jmp 0x140049925
mov rcx, rdi
test rcx, rcx
lea rax, [rcx + 8]
cmove rax, rdi
test rax, rax
je 0x140049946
movups xmm0, xmmword [rax]
movups xmmword [0x140159378], xmm0
nop
int3
mov r10d, dword [r15 + 0x28]
lea r9, [r15 + 0x10]
mov dword [rsp + 0x28], edi
mov r14d, 1
mov dword [rbp - 0x7d], r14d
mov r8d, edi
mov qword [rbp - 0x79], r9
mov dword [rbp - 0x71], 0xffffffff
mov qword [rbp - 0x6d], rdi
test r10d, r10d
je 0x1400499e0
mov rax, qword [r9 + 0x10]
test rax, rax
cmovne r9, rax
lea eax, [r10 - 1]
cdq
and edx, 0x1f
add edx, eax
mov ecx, dword [r9]
sar edx, 5
test ecx, ecx
jne 0x1400499b9
lea ecx, [rdi + 1]
add r8d, 0x20
mov dword [rsp + 0x28], ecx
mov edi, ecx
mov dword [rbp - 0x69], r8d
cmp ecx, edx
jg 0x1400499dc
movsxd rax, ecx
mov dword [rbp - 0x71], 0xffffffff
mov ecx, dword [r9 + rax*4]
test ecx, ecx
je 0x140049992
mov eax, ecx
neg eax
and ecx, eax
mov dword [rbp - 0x7d], ecx
add rcx, rcx
or rcx, r14
bsr rax, rcx
mov dword [rbp - 0x19], eax
dec eax
add eax, r8d
mov dword [rbp - 0x6d], eax
cmp eax, r10d
jle 0x1400499e0
mov dword [rbp - 0x6d], r10d
movups xmm4, xmmword [rbp - 0x71]
mov qword [rbp + 0x17], r15
movups xmm0, xmmword [rsp + 0x28]
mov qword [rbp - 0x11], r15
movups xmmword [rbp + 7], xmm4
mov qword [rbp - 0x29], r15
movups xmmword [rbp - 9], xmm0
mov word [rbp - 0x21], 0
movups xmm3, xmmword [rbp - 1]
movups xmm0, xmmword [rbp + 0xf]
movups xmm2, xmmword [rbp - 0x11]
movq rax, xmm3
movaps xmmword [rbp - 0x49], xmm3
movaps xmm1, xmm4
movaps xmmword [rbp - 0x59], xmm2
movq rcx, xmm4
unpckhpd xmm1, xmm4
movsd xmm0, xmm1
shr rcx, 0x20
movups xmmword [rbp + 0xf], xmm0
movaps xmmword [rbp - 0x39], xmm0
cmp ecx, dword [rax + 0x18]
jge 0x140049b0c
mov ecx, dword [rbp - 0x3d]
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [rbp - 0x59]
movsxd r8, ecx
shl r8, 5
add r8, qword [rax]
mov rcx, qword [r8]
cmp rsi, rcx
jl 0x140049a7d
add rcx, qword [r8 + 8]
cmp rsi, rcx
jge 0x140049a7d
movups xmm0, xmmword [r8 + 8]
movups xmmword [0x140159378], xmm0
nop
int3
mov eax, dword [rbp - 0x4d]
lea rcx, [rbp - 0x51]
not eax
and dword [rbp - 0x41], eax
call fcn.1400150a0
mov rax, qword [rbp - 0x49]
mov ecx, dword [rbp - 0x3d]
cmp ecx, dword [rax + 0x18]
jl 0x140049a50
cmp byte [rbp - 0x21], 0
je 0x140049b0c
cmp byte [rbp - 0x20], 0
je 0x140049b0c
mov r8, qword [rbp - 0x29]
mov r9d, dword [r8 + 8]
sub r9d, dword [r8 + 0x34]
cmp r9d, 4
jb 0x140049aec
mov ecx, r9d
shr ecx, 1
add ecx, 8
mov eax, ecx
dec ecx
add rcx, rcx
add rax, rax
or rcx, r14
or rax, r14
bsr rdx, rax
bsr rax, rcx
mov ecx, 0xffffffe0
sub ecx, edx
shl ecx, 0x1a
sar ecx, 0x1f
not ecx
and ecx, eax
shl r14d, cl
test r9d, r9d
jle 0x140049b0c
mov eax, dword [r8 + 0x48]
test eax, eax
je 0x140049b00
cmp eax, r14d
jl 0x140049b00
jle 0x140049b0c
mov rcx, r8
mov dword [r8 + 0x48], r14d
call fcn.140047830
mov r15, qword [rsp + 0xd0]
mov r14, qword [rsp + 0xd8]
mov rdi, qword [rsp + 0xe8]
mov rsi, qword [rsp + 0xf0]
test rbx, rbx
je 0x140049b3a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rbx, qword [0x1401ad680]
mov ecx, dword [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [rbx + 0x40]
lea rdx, [rax - 1]
add rsp, 0xf8
pop rbx
pop rbp
jmp qword [sym.imp.KERNEL32.dll_TlsSetValue]
lea rcx, [0x1401ad7b0]
call fcn.14010f50c
cmp dword [0x1401ad7b0], 0xffffffff
jne 0x1400497f7
lea rcx, [0x140114730]
call fcn.14010f270
lea rcx, [0x1401ad7b0]
call fcn.14010f4ac
jmp 0x1400497f7