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

Disassembly:
push rbx
push rsi
push r13
sub rsp, 0x30
mov qword [rsp + 0x58], rdi
mov rdi, rcx
mov ecx, dword [rcx]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
xor r13d, r13d
mov rbx, rax
test rax, rax
jne 0x14002094b
lea ecx, [rax + 0xc]
call fcn.140012670
mov rbx, rax
test rax, rax
je 0x14002093d
mov qword [rax], r13
mov dword [rax + 8], r13d
jmp 0x140020940
mov rbx, r13
mov ecx, dword [rdi]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [rbx + 4]
lea rsi, [0x140362dc0]
test eax, eax
jne 0x140020e8f
mov eax, dword [rbx]
test eax, eax
je 0x14002096e
mov dword [rbx + 4], eax
mov dword [rbx], r13d
jmp 0x140020e85
lea rcx, [rdi + 8]
call fcn.1400207c0
mov dword [rbx + 4], eax
test eax, eax
jne 0x140020e85
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x28], r14
mov r14d, 0x40
lock xadd dword [0x140362e00], r14d
lea r12d, [r14 + 0x40]
cmp r12d, 0x4000000
jbe 0x1400209ce
mov r9d, 0x4000000
lea r8, str.Consumed__d_lock_free_links__there_are_no_more.
lea edx, [rax + 0x30]
lea rcx, [0x140264598]
call fcn.14008e490
call fcn.14008e540
mov ebp, r14d
cmp r14d, r12d
jae 0x140020a67
mov qword [rsp + 0x20], r15
lea r13, [0x140362dc0]
mov r15d, r14d
nop dword [rax]
mov rax, r15
mov esi, ebp
shr rax, 0xe
and esi, 0x3fff
lea rdi, [rax*8]
add rdi, r13
cmp qword [rdi + 0x88], 0
jne 0x140020a35
xor edx, edx
mov ecx, 0x60000
call fcn.140056af0
mov rcx, rax
xor eax, eax
lock cmpxchg qword [rdi + 0x88], rcx
je 0x140020a35
call fcn.14004db90
mov rax, qword [rdi + 0x88]
lea rcx, [rsi + rsi*2]
xor edx, edx
xorps xmm0, xmm0
inc ebp
inc r15
movups xmmword [rax + rcx*8], xmm0
mov qword [rax + rcx*8 + 0x10], rdx
cmp ebp, r12d
jb 0x1400209f0
mov r15, qword [rsp + 0x20]
lea rsi, [0x140362dc0]
xor r13d, r13d
mov r12, qword [rsp + 0x60]
lea edx, [r14 + 2]
mov r14, qword [rsp + 0x28]
mov r9d, 4
mov rbp, qword [rsp + 0x50]
lea r8d, [rdx - 2]
test r8d, r8d
jne 0x140020a8e
mov rcx, r13
jmp 0x140020aae
mov ecx, r8d
mov eax, r8d
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], r8d
lea r8d, [rdx - 1]
test r8d, r8d
jne 0x140020ace
mov rcx, r13
jmp 0x140020aee
mov ecx, r8d
mov eax, r8d
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], r8d
test edx, edx
jne 0x140020b09
mov rcx, r13
jmp 0x140020b27
mov ecx, edx
mov eax, edx
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
lea r8d, [rdx + 1]
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], edx
test r8d, r8d
jne 0x140020b46
mov rcx, r13
jmp 0x140020b66
mov ecx, r8d
mov eax, r8d
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], r8d
lea r8d, [rdx + 2]
test r8d, r8d
jne 0x140020b86
mov rcx, r13
jmp 0x140020ba6
mov ecx, r8d
mov eax, r8d
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], r8d
lea r8d, [rdx + 3]
test r8d, r8d
jne 0x140020bc6
mov rcx, r13
jmp 0x140020be6
mov ecx, r8d
mov eax, r8d
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], r8d
lea r8d, [rdx + 4]
test r8d, r8d
jne 0x140020c06
mov rcx, r13
jmp 0x140020c26
mov ecx, r8d
mov eax, r8d
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], r8d
lea r8d, [rdx + 5]
test r8d, r8d
jne 0x140020c46
mov rcx, r13
jmp 0x140020c66
mov ecx, r8d
mov eax, r8d
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], r8d
lea r8d, [rdx + 6]
test r8d, r8d
jne 0x140020c86
mov rcx, r13
jmp 0x140020ca6
mov ecx, r8d
mov eax, r8d
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], r8d
lea r8d, [rdx + 7]
test r8d, r8d
jne 0x140020cc6
mov rcx, r13
jmp 0x140020ce6
mov ecx, r8d
mov eax, r8d
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], r8d
lea r8d, [rdx + 8]
test r8d, r8d
jne 0x140020d06
mov rcx, r13
jmp 0x140020d26
mov ecx, r8d
mov eax, r8d
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], r8d
lea r8d, [rdx + 9]
test r8d, r8d
jne 0x140020d46
mov rcx, r13
jmp 0x140020d66
mov ecx, r8d
mov eax, r8d
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], r8d
lea r8d, [rdx + 0xa]
test r8d, r8d
jne 0x140020d86
mov rcx, r13
jmp 0x140020da6
mov ecx, r8d
mov eax, r8d
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], r8d
lea r8d, [rdx + 0xb]
test r8d, r8d
jne 0x140020dc6
mov rcx, r13
jmp 0x140020de6
mov ecx, r8d
mov eax, r8d
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], r8d
lea r8d, [rdx + 0xc]
test r8d, r8d
jne 0x140020e06
mov rcx, r13
jmp 0x140020e26
mov ecx, r8d
mov eax, r8d
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], r8d
lea r8d, [rdx + 0xd]
test r8d, r8d
jne 0x140020e46
mov rcx, r13
jmp 0x140020e66
mov ecx, r8d
mov eax, r8d
shr rax, 0xe
and ecx, 0x3fff
mov rax, qword [rsi + rax*8 + 0x88]
lea rcx, [rcx + rcx*2]
lea rcx, [rax + rcx*8]
mov qword [rcx], r13
add edx, 0x10
mov dword [rcx + 0x10], r13d
mov eax, dword [rbx + 4]
mov qword [rcx + 8], rax
mov dword [rbx + 4], r8d
sub r9, 1
jne 0x140020a80
mov eax, dword [rbx + 4]
mov dword [rbx + 8], 0x40
mov rdi, qword [rsp + 0x58]
test eax, eax
jne 0x140020e9d
mov rdx, r13
jmp 0x140020ebb
mov edx, eax
mov ecx, eax
shr rcx, 0xe
and edx, 0x3fff
mov rcx, qword [rsi + rcx*8 + 0x88]
lea rdx, [rdx + rdx*2]
lea rdx, [rcx + rdx*8]
mov ecx, dword [rdx + 8]
dec dword [rbx + 8]
mov dword [rbx + 4], ecx
mov qword [rdx + 8], r13
add rsp, 0x30
pop r13
pop rsi
pop rbx
ret