Function at 0x140021610
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 [0x140577180]
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 0x140021917
mov ecx, 0xa50
call fcn.1400306e0
mov r14, rax
test rax, rax
je 0x140021ead
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.1401e1b90
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.1401e1b90
lea rcx, [r14 + 8]
mov qword [rbp + 0x9d8], rsi
lea rdx, [rbp - 0x60]
mov byte [rbp + 0x9e0], sil
mov r8d, 0xa48
call fcn.1401e14e0
mov ecx, dword [0x140577180]
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140021ebf
add r14, 8
mov qword [rsp + 0xaf8], r15
cmp byte [r14 + 0x330], sil
je 0x140021939
xor edx, edx
mov rcx, r14
call fcn.140030d00
mov r14, rax
mov r15, rsi
test r14, r14
je 0x140021e90
cmp byte [r14 + 1], sil
jg 0x140021e90
mov ecx, r13d
lea r11, [0x140000000]
and ecx, 0x3f
mov rdx, rbx
shl rdx, cl
and rdx, 0xfffffffffffffffe
jne 0x1400219dd
cmp rdi, 0x1000
ja 0x14002198f
lea rax, [rdi + 7]
shr rax, 3
movzx eax, byte [rax + r11 + 0x370080]
mov rsi, qword [r11 + rax*8 + 0x36f940]
jmp 0x140021b09
movabs rax, 0x7000000000000000
cmp rdi, rax
ja 0x140021b09
lea rax, [rdi*2 - 1]
test rax, rax
je 0x140021ed1
bsr rcx, rax
cmp rcx, 7
jae 0x1400219c4
mov ecx, 4
jmp 0x1400219c8
add rcx, 0xfffffffffffffffd
shl rbx, cl
dec rbx
lea rsi, [rbx + rdi]
not rbx
and rsi, rbx
jmp 0x140021b09
cmp rdi, 0x3800
ja 0x140021a7e
cmp rdx, 0x1000
ja 0x140021a7e
lea r8, [rdi - 1]
mov rax, rdx
add r8, rdx
neg rax
and r8, rax
cmp r8, 0x1000
ja 0x140021a2b
lea rax, [r8 + 7]
shr rax, 3
movzx eax, byte [rax + r11 + 0x370080]
mov rsi, qword [r11 + rax*8 + 0x36f940]
jmp 0x140021a70
movabs rax, 0x7000000000000000
cmp r8, rax
ja 0x140021a70
lea rax, [r8*2 - 1]
test rax, rax
je 0x140021ed1
bsr rcx, rax
cmp rcx, 7
jae 0x140021a5c
mov ecx, 4
jmp 0x140021a60
add rcx, 0xfffffffffffffffd
shl rbx, cl
dec rbx
lea rsi, [rbx + r8]
not rbx
and rsi, rbx
cmp rsi, 0x4000
jae 0x140021a96
jmp 0x140021b09
movabs rax, 0x7000000000000000
cmp rdx, rax
ja 0x140021b09
cmp rdi, 0x4000
ja 0x140021a9d
mov esi, 0x4000
jmp 0x140021add
cmp rdi, rax
ja 0x140021b09
lea rax, [rdi*2 - 1]
test rax, rax
je 0x140021ed1
bsr rcx, rax
cmp rcx, 7
jae 0x140021ac4
mov ecx, 4
jmp 0x140021ac8
add rcx, 0xfffffffffffffffd
shl rbx, cl
dec rbx
lea rsi, [rdi + rbx]
not rbx
and rsi, rbx
cmp rsi, rdi
jb 0x140021b07
mov rax, qword [0x140577188]
lea rcx, [rdx + 0xfff]
and rcx, 0xfffffffffffff000
add rax, 0xfffffffffffff000
add rcx, rsi
add rcx, rax
cmp rcx, rsi
cmovb rsi, r15
jmp 0x140021b09
xor esi, esi
lea rax, [rsi - 1]
movabs rcx, 0x6fffffffffffffff
cmp rax, rcx
ja 0x140021e90
cmp rsi, 0x1000
ja 0x140021b40
lea rax, [rsi + 7]
shr rax, 3
movzx ecx, byte [rax + r11 + 0x370080]
mov dword [rsp + 0x30], ecx
jmp 0x140021b55
mov rcx, rsi
call fcn.14002b460
mov ecx, eax
mov dword [rsp + 0x30], eax
lea r11, [0x140000000]
cmp byte [0x1403671c9], r15b
je 0x140021b65
mov byte [rsp + 0x34], 1
jmp 0x140021b71
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 0x140021ba6
mov eax, ecx
imul rcx, rax, 0x58
mov eax, dword [rcx + r11 + 0x576530]
mov ecx, dword [rsp + 0x30]
mov qword [rsp + 0x58], rax
test r12, r12
je 0x140021e90
nop
mov rdi, r12
mov r12, rdx
sub rdi, r15
mov qword [rsp + 0x60], rdi
cmp ecx, 0x24
jae 0x140021c89
cmp rdi, rax
jb 0x140021c89
test r10, r10
jne 0x140021c44
test r13d, 0xfff00000
je 0x140021c29
mov ebx, r13d
shr ebx, 0x14
dec ebx
cmp ebx, 0xffffffff
je 0x140021c29
mov r10, qword [r11 + rbx*8 + 0x367200]
nop
mov qword [rsp + 0x38], r10
nop
test r10, r10
jne 0x140021c44
lea r8, [0x1402246d0]
mov edx, ebx
mov rcx, r14
call fcn.140021410
mov qword [rsp + 0x38], rax
mov r10, rax
test rax, rax
jne 0x140021c44
cmp ebx, dword [0x1405771f4]
jae 0x140021e90
xor edx, edx
mov rcx, r14
call fcn.140020d20
mov qword [rsp + 0x38], rax
mov r10, rax
test rax, rax
je 0x140021e90
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.140058e80
mov r9, qword [rsp + 0x40]
mov r12, rax
mov ecx, dword [rsp + 0x30]
add r15, rax
cmp ecx, dword [0x140376260]
jae 0x140021dea
cmp r12, rdi
jae 0x140021dea
test r9, r9
jne 0x140021d44
mov eax, r13d
and eax, 0xfff00
je 0x140021d0b
cmp eax, 0x100
je 0x140021dea
mov edx, r13d
sar edx, 8
and edx, 0xfff
sub edx, 2
cmp edx, 0xfffffffe
je 0x140021d0b
cmp edx, 0xffffffff
je 0x140021dea
mov rax, qword [0x140376268]
mov r8, qword [rax + rdx*8]
lea rbx, [rax + rdx*8]
test r8, r8
je 0x140021ed7
cmp r8, 1
jne 0x140021d05
mov rcx, r14
call fcn.14005e670
mov r8, rax
mov qword [rbx], rax
mov ecx, dword [rsp + 0x30]
jmp 0x140021d1c
cmp byte [r14], 0
je 0x140021dea
lea r8, [r14 + 0x358]
test r8, r8
je 0x140021dea
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 0x140021dea
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.1401e14e0
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 0x140021db0
mov word [rdx + 0x10], r8w
add qword [rdx + 8], r13
cmp byte [rsp + 0x34], 0
je 0x140021dda
test r13, r13
je 0x140021dda
mov rbx, r13
mov rcx, qword [rdi]
mov r8, rsi
xor edx, edx
call fcn.1401e1b90
lea rdi, [rdi + 8]
sub rbx, 1
jne 0x140021dc3
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 0x140021e42
lea rdx, [rsp + 0x78]
mov rcx, r14
call fcn.140063e40
cmp r12, rdi
jae 0x140021e65
mov rcx, qword [rsp + 0x68]
mov edx, r13d
call fcn.1400294b0
test rax, rax
je 0x140021e90
mov rcx, qword [rsp + 0x50]
mov qword [rcx + r15*8], rax
inc r15
mov r12, qword [rsp + 0x70]
cmp r15, r12
jae 0x140021e90
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 0x140021bb0
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.14002eb70
call fcn.1401f3454
int3
lea rcx, str._jemalloc_:_Error_setting_TSD_n
call fcn.14002eb70
call fcn.1401f3454
int3
call fcn.1401f3454
int3
lea rcx, str._jemalloc_:_invalid_tcache_id___u_._n
call fcn.14002d890
call fcn.1401f3454
int3