Function at 0x140016a40
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 [0x1405f78c0]
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 0x140016d47
mov ecx, 0xa50
call fcn.140026730
mov r14, rax
test rax, rax
je 0x1400172dd
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.14027e650
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.14027e650
lea rcx, [r14 + 8]
mov qword [rbp + 0x9d8], rsi
lea rdx, [rbp - 0x60]
mov byte [rbp + 0x9e0], sil
mov r8d, 0xa48
call fcn.14027dfb0
mov ecx, dword [0x1405f78c0]
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x1400172ef
add r14, 8
mov qword [rsp + 0xaf8], r15
cmp byte [r14 + 0x330], sil
je 0x140016d69
xor edx, edx
mov rcx, r14
call fcn.140026d50
mov r14, rax
mov r15, rsi
test r14, r14
je 0x1400172c0
cmp byte [r14 + 1], sil
jg 0x1400172c0
mov ecx, r13d
lea r11, [0x140000000]
and ecx, 0x3f
mov rdx, rbx
shl rdx, cl
and rdx, 0xfffffffffffffffe
jne 0x140016e0d
cmp rdi, 0x1000
ja 0x140016dbf
lea rax, [rdi + 7]
shr rax, 3
movzx eax, byte [rax + r11 + 0x3f0900]
mov rsi, qword [r11 + rax*8 + 0x3f01c0]
jmp 0x140016f39
movabs rax, 0x7000000000000000
cmp rdi, rax
ja 0x140016f39
lea rax, [rdi*2 - 1]
test rax, rax
je 0x140017301
bsr rcx, rax
cmp rcx, 7
jae 0x140016df4
mov ecx, 4
jmp 0x140016df8
add rcx, 0xfffffffffffffffd
shl rbx, cl
dec rbx
lea rsi, [rbx + rdi]
not rbx
and rsi, rbx
jmp 0x140016f39
cmp rdi, 0x3800
ja 0x140016eae
cmp rdx, 0x1000
ja 0x140016eae
lea r8, [rdi - 1]
mov rax, rdx
add r8, rdx
neg rax
and r8, rax
cmp r8, 0x1000
ja 0x140016e5b
lea rax, [r8 + 7]
shr rax, 3
movzx eax, byte [rax + r11 + 0x3f0900]
mov rsi, qword [r11 + rax*8 + 0x3f01c0]
jmp 0x140016ea0
movabs rax, 0x7000000000000000
cmp r8, rax
ja 0x140016ea0
lea rax, [r8*2 - 1]
test rax, rax
je 0x140017301
bsr rcx, rax
cmp rcx, 7
jae 0x140016e8c
mov ecx, 4
jmp 0x140016e90
add rcx, 0xfffffffffffffffd
shl rbx, cl
dec rbx
lea rsi, [rbx + r8]
not rbx
and rsi, rbx
cmp rsi, 0x4000
jae 0x140016ec6
jmp 0x140016f39
movabs rax, 0x7000000000000000
cmp rdx, rax
ja 0x140016f39
cmp rdi, 0x4000
ja 0x140016ecd
mov esi, 0x4000
jmp 0x140016f0d
cmp rdi, rax
ja 0x140016f39
lea rax, [rdi*2 - 1]
test rax, rax
je 0x140017301
bsr rcx, rax
cmp rcx, 7
jae 0x140016ef4
mov ecx, 4
jmp 0x140016ef8
add rcx, 0xfffffffffffffffd
shl rbx, cl
dec rbx
lea rsi, [rdi + rbx]
not rbx
and rsi, rbx
cmp rsi, rdi
jb 0x140016f37
mov rax, qword [0x1405f78c8]
lea rcx, [rdx + 0xfff]
and rcx, 0xfffffffffffff000
add rax, 0xfffffffffffff000
add rcx, rsi
add rcx, rax
cmp rcx, rsi
cmovb rsi, r15
jmp 0x140016f39
xor esi, esi
lea rax, [rsi - 1]
movabs rcx, 0x6fffffffffffffff
cmp rax, rcx
ja 0x1400172c0
cmp rsi, 0x1000
ja 0x140016f70
lea rax, [rsi + 7]
shr rax, 3
movzx ecx, byte [rax + r11 + 0x3f0900]
mov dword [rsp + 0x30], ecx
jmp 0x140016f85
mov rcx, rsi
call fcn.140020880
mov ecx, eax
mov dword [rsp + 0x30], eax
lea r11, [0x140000000]
cmp byte [0x1403e7a49], r15b
je 0x140016f95
mov byte [rsp + 0x34], 1
jmp 0x140016fa1
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 0x140016fd6
mov eax, ecx
imul rcx, rax, 0x58
mov eax, dword [rcx + r11 + 0x5f6c70]
mov ecx, dword [rsp + 0x30]
mov qword [rsp + 0x58], rax
test r12, r12
je 0x1400172c0
nop
mov rdi, r12
mov r12, rdx
sub rdi, r15
mov qword [rsp + 0x60], rdi
cmp ecx, 0x24
jae 0x1400170b9
cmp rdi, rax
jb 0x1400170b9
test r10, r10
jne 0x140017074
test r13d, 0xfff00000
je 0x140017059
mov ebx, r13d
shr ebx, 0x14
dec ebx
cmp ebx, 0xffffffff
je 0x140017059
mov r10, qword [r11 + rbx*8 + 0x3e7a80]
nop
mov qword [rsp + 0x38], r10
nop
test r10, r10
jne 0x140017074
lea r8, [0x140288dc0]
mov edx, ebx
mov rcx, r14
call fcn.140016840
mov qword [rsp + 0x38], rax
mov r10, rax
test rax, rax
jne 0x140017074
cmp ebx, dword [0x1405f7934]
jae 0x1400172c0
xor edx, edx
mov rcx, r14
call fcn.140016150
mov qword [rsp + 0x38], rax
mov r10, rax
test rax, rax
je 0x1400172c0
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.14004eea0
mov r9, qword [rsp + 0x40]
mov r12, rax
mov ecx, dword [rsp + 0x30]
add r15, rax
cmp ecx, dword [0x1403f69a0]
jae 0x14001721a
cmp r12, rdi
jae 0x14001721a
test r9, r9
jne 0x140017174
mov eax, r13d
and eax, 0xfff00
je 0x14001713b
cmp eax, 0x100
je 0x14001721a
mov edx, r13d
sar edx, 8
and edx, 0xfff
sub edx, 2
cmp edx, 0xfffffffe
je 0x14001713b
cmp edx, 0xffffffff
je 0x14001721a
mov rax, qword [0x1403f69a8]
mov r8, qword [rax + rdx*8]
lea rbx, [rax + rdx*8]
test r8, r8
je 0x140017307
cmp r8, 1
jne 0x140017135
mov rcx, r14
call fcn.140054690
mov r8, rax
mov qword [rbx], rax
mov ecx, dword [rsp + 0x30]
jmp 0x14001714c
cmp byte [r14], 0
je 0x14001721a
lea r8, [r14 + 0x358]
test r8, r8
je 0x14001721a
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 0x14001721a
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.14027dfb0
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 0x1400171e0
mov word [rdx + 0x10], r8w
add qword [rdx + 8], r13
cmp byte [rsp + 0x34], 0
je 0x14001720a
test r13, r13
je 0x14001720a
mov rbx, r13
mov rcx, qword [rdi]
mov r8, rsi
xor edx, edx
call fcn.14027e650
lea rdi, [rdi + 8]
sub rbx, 1
jne 0x1400171f3
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 0x140017272
lea rdx, [rsp + 0x78]
mov rcx, r14
call fcn.140059e70
cmp r12, rdi
jae 0x140017295
mov rcx, qword [rsp + 0x68]
mov edx, r13d
call fcn.14001e8d0
test rax, rax
je 0x1400172c0
mov rcx, qword [rsp + 0x50]
mov qword [rcx + r15*8], rax
inc r15
mov r12, qword [rsp + 0x70]
cmp r15, r12
jae 0x1400172c0
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 0x140016fe0
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.140024be0
call fcn.14025c5b0
int3
lea rcx, str._jemalloc_:_Error_setting_TSD_n
call fcn.140024be0
call fcn.14025c5b0
int3
call fcn.14025c5b0
int3
lea rcx, str._jemalloc_:_invalid_tcache_id___u_._n
call fcn.140023900
call fcn.14025c5b0
int3