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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0xa00]
sub rsp, 0xb00
mov r13d, r9d
mov dword [rsp + 0x48], r9d
mov rdi, r8
mov qword [rsp + 0x68], r8
mov r12, rdx
mov qword [rsp + 0x70], rdx
mov qword [rsp + 0x50], rcx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x14057b280]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, ebx
mov r14, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor esi, esi
lea ebx, [rsi + 1]
test r14, r14
jne 0x140021bb7
mov ecx, 0xa50
call fcn.140030980
mov r14, rax
test rax, rax
je 0x14002214d
xorps xmm0, xmm0
mov byte [rax], sil
xor eax, eax
mov word [rbp - 0x60], si
xor edx, edx
mov dword [rbp + 0x62], eax
mov r8d, 0xb0
mov word [rbp + 0x66], ax
lea rcx, [rbp + 0xa0]
mov qword [rbp + 0x70], rax
mov byte [rbp + 0x78], al
mov qword [rbp - 0x58], rsi
mov qword [rbp - 0x50], rsi
mov qword [rbp - 0x48], rsi
mov qword [rbp - 0x40], rsi
mov qword [rbp - 0x38], rsi
mov qword [rbp - 0x30], rsi
mov qword [rbp - 0x28], rsi
mov qword [rbp - 0x20], rsi
mov qword [rbp - 0x18], rsi
mov qword [rbp - 0x10], rsi
mov qword [rbp - 8], rsi
mov qword [rbp], rsi
mov qword [rbp + 8], rsi
mov qword [rbp + 0x10], rsi
mov qword [rbp + 0x18], rsi
mov qword [rbp + 0x20], rsi
mov qword [rbp + 0x28], rsi
mov qword [rbp + 0x30], rsi
mov dword [rbp + 0x38], 0x3e8
mov dword [rbp + 0x3c], 0x3e8
mov word [rbp + 0x40], 0xffff
movups xmmword [rbp + 0x42], xmm0
mov qword [rbp + 0x68], rsi
movups xmmword [rbp + 0x52], xmm0
mov qword [rbp + 0x80], rsi
mov qword [rbp + 0x88], rsi
mov qword [rbp + 0x90], rsi
mov qword [rbp + 0x98], rsi
call fcn.1401e1df0
mov qword [rbp + 0x150], rbx
mov qword [rbp + 0x158], rsi
mov qword [rbp + 0x160], rbx
mov qword [rbp + 0x168], rsi
mov qword [rbp + 0x170], rbx
mov qword [rbp + 0x178], rsi
mov qword [rbp + 0x180], rbx
mov qword [rbp + 0x188], rsi
mov qword [rbp + 0x190], rbx
mov qword [rbp + 0x198], rsi
mov qword [rbp + 0x1a0], rbx
mov qword [rbp + 0x1a8], rsi
mov qword [rbp + 0x1b0], rbx
mov qword [rbp + 0x1b8], rsi
mov qword [rbp + 0x1c0], rbx
mov qword [rbp + 0x1c8], rsi
mov qword [rbp + 0x1d0], rbx
mov qword [rbp + 0x1d8], rsi
mov qword [rbp + 0x1e0], rbx
mov qword [rbp + 0x1e8], rsi
mov qword [rbp + 0x1f0], rbx
mov qword [rbp + 0x1f8], rsi
mov qword [rbp + 0x200], rbx
mov qword [rbp + 0x208], rsi
mov qword [rbp + 0x210], rbx
mov qword [rbp + 0x218], rsi
mov qword [rbp + 0x220], rbx
mov qword [rbp + 0x228], rsi
mov qword [rbp + 0x230], rbx
mov qword [rbp + 0x238], rsi
mov qword [rbp + 0x240], rbx
mov qword [rbp + 0x248], rsi
mov qword [rbp + 0x250], rbx
mov qword [rbp + 0x258], rsi
mov qword [rbp + 0x260], rbx
mov qword [rbp + 0x268], rsi
mov qword [rbp + 0x270], rbx
mov qword [rbp + 0x278], rsi
mov qword [rbp + 0x280], rbx
mov qword [rbp + 0x288], rsi
mov qword [rbp + 0x290], rbx
xor eax, eax
mov qword [rbp + 0x298], rsi
xor edx, edx
mov dword [rbp + 0x2d1], eax
mov r8d, 0x6d8
mov word [rbp + 0x2d5], ax
lea rcx, [rbp + 0x300]
mov byte [rbp + 0x2d7], al
mov qword [rbp + 0x2a0], rbx
mov qword [rbp + 0x2a8], rsi
mov qword [rbp + 0x2b0], rbx
mov qword [rbp + 0x2b8], rsi
mov qword [rbp + 0x2c0], rbx
mov qword [rbp + 0x2c8], rsi
mov byte [rbp + 0x2d0], 6
mov qword [rbp + 0x2d8], rsi
mov qword [rbp + 0x2e0], rsi
mov qword [rbp + 0x2e8], rsi
mov qword [rbp + 0x2f0], rsi
mov qword [rbp + 0x2f8], rsi
call fcn.1401e1df0
lea rcx, [r14 + 8]
mov qword [rbp + 0x9d8], rsi
lea rdx, [rbp - 0x60]
mov byte [rbp + 0x9e0], sil
mov r8d, 0xa48
call fcn.1401e1740
mov ecx, dword [0x14057b280]
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x14002215f
add r14, 8
mov qword [rsp + 0xaf8], r15
cmp byte [r14 + 0x330], sil
je 0x140021bd9
xor edx, edx
mov rcx, r14
call fcn.140030fa0
mov r14, rax
mov r15, rsi
test r14, r14
je 0x140022130
cmp byte [r14 + 1], sil
jg 0x140022130
mov ecx, r13d
lea r11, [0x140000000]
and ecx, 0x3f
mov rdx, rbx
shl rdx, cl
and rdx, 0xfffffffffffffffe
jne 0x140021c7d
cmp rdi, 0x1000
ja 0x140021c2f
lea rax, [rdi + 7]
shr rax, 3
movzx eax, byte [rax + r11 + 0x374080]
mov rsi, qword [r11 + rax*8 + 0x373940]
jmp 0x140021da9
movabs rax, 0x7000000000000000
cmp rdi, rax
ja 0x140021da9
lea rax, [rdi*2 - 1]
test rax, rax
je 0x140022171
bsr rcx, rax
cmp rcx, 7
jae 0x140021c64
mov ecx, 4
jmp 0x140021c68
add rcx, 0xfffffffffffffffd
shl rbx, cl
dec rbx
lea rsi, [rbx + rdi]
not rbx
and rsi, rbx
jmp 0x140021da9
cmp rdi, 0x3800
ja 0x140021d1e
cmp rdx, 0x1000
ja 0x140021d1e
lea r8, [rdi - 1]
mov rax, rdx
add r8, rdx
neg rax
and r8, rax
cmp r8, 0x1000
ja 0x140021ccb
lea rax, [r8 + 7]
shr rax, 3
movzx eax, byte [rax + r11 + 0x374080]
mov rsi, qword [r11 + rax*8 + 0x373940]
jmp 0x140021d10
movabs rax, 0x7000000000000000
cmp r8, rax
ja 0x140021d10
lea rax, [r8*2 - 1]
test rax, rax
je 0x140022171
bsr rcx, rax
cmp rcx, 7
jae 0x140021cfc
mov ecx, 4
jmp 0x140021d00
add rcx, 0xfffffffffffffffd
shl rbx, cl
dec rbx
lea rsi, [rbx + r8]
not rbx
and rsi, rbx
cmp rsi, 0x4000
jae 0x140021d36
jmp 0x140021da9
movabs rax, 0x7000000000000000
cmp rdx, rax
ja 0x140021da9
cmp rdi, 0x4000
ja 0x140021d3d
mov esi, 0x4000
jmp 0x140021d7d
cmp rdi, rax
ja 0x140021da9
lea rax, [rdi*2 - 1]
test rax, rax
je 0x140022171
bsr rcx, rax
cmp rcx, 7
jae 0x140021d64
mov ecx, 4
jmp 0x140021d68
add rcx, 0xfffffffffffffffd
shl rbx, cl
dec rbx
lea rsi, [rdi + rbx]
not rbx
and rsi, rbx
cmp rsi, rdi
jb 0x140021da7
mov rax, qword [0x14057b288]
lea rcx, [rdx + 0xfff]
and rcx, 0xfffffffffffff000
add rax, 0xfffffffffffff000
add rcx, rsi
add rcx, rax
cmp rcx, rsi
cmovb rsi, r15
jmp 0x140021da9
xor esi, esi
lea rax, [rsi - 1]
movabs rcx, 0x6fffffffffffffff
cmp rax, rcx
ja 0x140022130
cmp rsi, 0x1000
ja 0x140021de0
lea rax, [rsi + 7]
shr rax, 3
movzx ecx, byte [rax + r11 + 0x374080]
mov dword [rsp + 0x30], ecx
jmp 0x140021df5
mov rcx, rsi
call fcn.14002b700
mov ecx, eax
mov dword [rsp + 0x30], eax
lea r11, [0x140000000]
cmp byte [0x14036b1c9], r15b
je 0x140021e05
mov byte [rsp + 0x34], 1
jmp 0x140021e11
mov eax, r13d
shr eax, 6
and al, 1
mov dword [rsp + 0x34], eax
xor edx, edx
mov qword [rsp + 0x40], rdx
mov r9d, edx
mov qword [rsp + 0x38], rdx
mov r10d, edx
mov qword [rsp + 0x58], rdx
mov eax, edx
cmp ecx, 0x24
jae 0x140021e46
mov eax, ecx
imul rcx, rax, 0x58
mov eax, dword [rcx + r11 + 0x57a630]
mov ecx, dword [rsp + 0x30]
mov qword [rsp + 0x58], rax
test r12, r12
je 0x140022130
nop
mov rdi, r12
mov r12, rdx
sub rdi, r15
mov qword [rsp + 0x60], rdi
cmp ecx, 0x24
jae 0x140021f29
cmp rdi, rax
jb 0x140021f29
test r10, r10
jne 0x140021ee4
test r13d, 0xfff00000
je 0x140021ec9
mov ebx, r13d
shr ebx, 0x14
dec ebx
cmp ebx, 0xffffffff
je 0x140021ec9
mov r10, qword [r11 + rbx*8 + 0x36b200]
nop
mov qword [rsp + 0x38], r10
nop
test r10, r10
jne 0x140021ee4
lea r8, [0x140229750]
mov edx, ebx
mov rcx, r14
call fcn.1400216b0
mov qword [rsp + 0x38], rax
mov r10, rax
test rax, rax
jne 0x140021ee4
cmp ebx, dword [0x14057b2f4]
jae 0x140022130
xor edx, edx
mov rcx, r14
call fcn.140020fc0
mov qword [rsp + 0x38], rax
mov r10, rax
test rax, rax
je 0x140022130
mov r8d, dword [rsp + 0x30]
xor edx, edx
mov rax, rdi
mov rcx, rdi
div qword [rsp + 0x58]
mov rax, qword [rsp + 0x50]
sub rcx, rdx
mov rdx, r10
lea r9, [rax + r15*8]
mov eax, dword [rsp + 0x34]
mov byte [rsp + 0x28], al
mov qword [rsp + 0x20], rcx
mov rcx, r14
call fcn.140059120
mov r9, qword [rsp + 0x40]
mov r12, rax
mov ecx, dword [rsp + 0x30]
add r15, rax
cmp ecx, dword [0x14037a350]
jae 0x14002208a
cmp r12, rdi
jae 0x14002208a
test r9, r9
jne 0x140021fe4
mov eax, r13d
and eax, 0xfff00
je 0x140021fab
cmp eax, 0x100
je 0x14002208a
mov edx, r13d
sar edx, 8
and edx, 0xfff
sub edx, 2
cmp edx, 0xfffffffe
je 0x140021fab
cmp edx, 0xffffffff
je 0x14002208a
mov rax, qword [0x14037a358]
mov r8, qword [rax + rdx*8]
lea rbx, [rax + rdx*8]
test r8, r8
je 0x140022177
cmp r8, 1
jne 0x140021fa5
mov rcx, r14
call fcn.14005e910
mov r8, rax
mov qword [rbx], rax
mov ecx, dword [rsp + 0x30]
jmp 0x140021fbc
cmp byte [r14], 0
je 0x14002208a
lea r8, [r14 + 0x358]
test r8, r8
je 0x14002208a
mov eax, ecx
lea r9, [rax*2 + 1]
add r9, rax
lea r9, [r8 + r9*8]
mov qword [rsp + 0x40], r9
test r9, r9
je 0x14002208a
movzx ecx, word [r9 + 0x14]
mov rdx, rdi
sub cx, word [r9]
sub rdx, r12
shr cx, 3
movzx eax, cx
cmp rax, rdx
mov rax, qword [rsp + 0x50]
cmovbe dx, cx
movzx r13d, dx
mov rdx, qword [r9]
lea rdi, [rax + r15*8]
mov rcx, rdi
lea rbx, [r13*8]
mov r8, rbx
call fcn.1401e1740
mov rdx, qword [rsp + 0x40]
movzx ecx, word [rdx + 0x14]
add qword [rdx], rbx
movzx eax, cx
sub cx, word [rdx + 0x10]
mov r8, qword [rdx]
sub ax, r8w
shr cx, 3
shr ax, 3
cmp ax, cx
jae 0x140022050
mov word [rdx + 0x10], r8w
add qword [rdx + 8], r13
cmp byte [rsp + 0x34], 0
je 0x14002207a
test r13, r13
je 0x14002207a
mov rbx, r13
mov rcx, qword [rdi]
mov r8, rsi
xor edx, edx
call fcn.1401e1df0
lea rdi, [rdi + 8]
sub rbx, 1
jne 0x140022063
mov rdi, qword [rsp + 0x60]
add r12, r13
add r15, r13
mov r13d, dword [rsp + 0x48]
lea rcx, [r14 + 0x338]
mov byte [rsp + 0x78], 1
mov qword [rbp - 0x80], rcx
lea rax, [r14 + 8]
mov qword [rbp - 0x78], rax
mov r8, r12
imul r8, rsi
lea rax, [r14 + 0x10]
mov qword [rbp - 0x70], rax
lea rax, [r14 + 0x340]
mov qword [rbp - 0x68], rax
mov rdx, qword [rcx]
lea rax, [rdx + r8]
mov qword [rcx], rax
mov rax, qword [rbp - 0x70]
mov rcx, qword [rax]
sub rcx, rdx
cmp r8, rcx
jb 0x1400220e2
lea rdx, [rsp + 0x78]
mov rcx, r14
call fcn.1400640e0
cmp r12, rdi
jae 0x140022105
mov rcx, qword [rsp + 0x68]
mov edx, r13d
call fcn.140029750
test rax, rax
je 0x140022130
mov rcx, qword [rsp + 0x50]
mov qword [rcx + r15*8], rax
inc r15
mov r12, qword [rsp + 0x70]
cmp r15, r12
jae 0x140022130
mov r10, qword [rsp + 0x38]
lea r11, [0x140000000]
mov r9, qword [rsp + 0x40]
xor edx, edx
mov ecx, dword [rsp + 0x30]
mov rax, qword [rsp + 0x58]
jmp 0x140021e50
mov rax, r15
mov r15, qword [rsp + 0xaf8]
add rsp, 0xb00
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rcx, str._jemalloc_:_Error_allocating_TSD_n
call fcn.14002ee10
call fcn.1401f5dec
int3
lea rcx, str._jemalloc_:_Error_setting_TSD_n
call fcn.14002ee10
call fcn.1401f5dec
int3
call fcn.1401f5dec
int3
lea rcx, str._jemalloc_:_invalid_tcache_id___u_._n
call fcn.14002db30
call fcn.1401f5dec
int3