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

Disassembly:
push rbp
push rbx
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xdb0]
sub rsp, 0xeb0
mov rax, qword [0x1403e4f00]
xor rax, rsp
mov qword [rbp + 0xd90], rax
mov r12, rdx
mov qword [rsp + 0x68], rcx
mov r13, rcx
mov byte [rsp + 0x50], r9b
mov ecx, r8d
mov dword [rsp + 0x60], r8d
and ecx, 0x3f
mov r15d, 1
mov edx, r15d
mov r14d, r8d
shl rdx, cl
and rdx, 0xfffffffffffffffe
mov qword [rsp + 0x70], rdx
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 rdi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor ebx, ebx
test rdi, rdi
jne 0x140018127
mov ecx, 0xa50
call fcn.140026730
mov rdi, rax
test rax, rax
je 0x140018906
xorps xmm0, xmm0
mov byte [rax], bl
xor eax, eax
mov word [rbp + 0x10], bx
xor edx, edx
mov dword [rbp + 0xd2], eax
mov r8d, 0xb0
mov word [rbp + 0xd6], ax
lea rcx, [rbp + 0x110]
mov qword [rbp + 0xe0], rax
mov byte [rbp + 0xe8], al
mov qword [rbp + 0x18], rbx
mov qword [rbp + 0x20], rbx
mov qword [rbp + 0x28], rbx
mov qword [rbp + 0x30], rbx
mov qword [rbp + 0x38], rbx
mov qword [rbp + 0x40], rbx
mov qword [rbp + 0x48], rbx
mov qword [rbp + 0x50], rbx
mov qword [rbp + 0x58], rbx
mov qword [rbp + 0x60], rbx
mov qword [rbp + 0x68], rbx
mov qword [rbp + 0x70], rbx
mov qword [rbp + 0x78], rbx
mov qword [rbp + 0x80], rbx
mov qword [rbp + 0x88], rbx
mov qword [rbp + 0x90], rbx
mov qword [rbp + 0x98], rbx
mov qword [rbp + 0xa0], rbx
mov dword [rbp + 0xa8], 0x3e8
mov dword [rbp + 0xac], 0x3e8
mov word [rbp + 0xb0], 0xffff
movups xmmword [rbp + 0xb2], xmm0
mov qword [rbp + 0xd8], rbx
movups xmmword [rbp + 0xc2], xmm0
mov qword [rbp + 0xf0], rbx
mov qword [rbp + 0xf8], rbx
mov qword [rbp + 0x100], rbx
mov qword [rbp + 0x108], rbx
call fcn.14027e650
mov qword [rbp + 0x1c0], r15
mov qword [rbp + 0x1c8], rbx
mov qword [rbp + 0x1d0], r15
mov qword [rbp + 0x1d8], rbx
mov qword [rbp + 0x1e0], r15
mov qword [rbp + 0x1e8], rbx
mov qword [rbp + 0x1f0], r15
mov qword [rbp + 0x1f8], rbx
mov qword [rbp + 0x200], r15
mov qword [rbp + 0x208], rbx
mov qword [rbp + 0x210], r15
mov qword [rbp + 0x218], rbx
mov qword [rbp + 0x220], r15
mov qword [rbp + 0x228], rbx
mov qword [rbp + 0x230], r15
mov qword [rbp + 0x238], rbx
mov qword [rbp + 0x240], r15
mov qword [rbp + 0x248], rbx
mov qword [rbp + 0x250], r15
mov qword [rbp + 0x258], rbx
mov qword [rbp + 0x260], r15
mov qword [rbp + 0x268], rbx
mov qword [rbp + 0x270], r15
mov qword [rbp + 0x278], rbx
mov qword [rbp + 0x280], r15
mov qword [rbp + 0x288], rbx
mov qword [rbp + 0x290], r15
mov qword [rbp + 0x298], rbx
mov qword [rbp + 0x2a0], r15
mov qword [rbp + 0x2a8], rbx
mov qword [rbp + 0x2b0], r15
mov qword [rbp + 0x2b8], rbx
mov qword [rbp + 0x2c0], r15
mov qword [rbp + 0x2c8], rbx
mov qword [rbp + 0x2d0], r15
mov qword [rbp + 0x2d8], rbx
mov qword [rbp + 0x2e0], r15
mov qword [rbp + 0x2e8], rbx
mov qword [rbp + 0x2f0], r15
mov qword [rbp + 0x2f8], rbx
mov qword [rbp + 0x300], r15
xor eax, eax
mov qword [rbp + 0x308], rbx
xor edx, edx
mov dword [rbp + 0x341], eax
mov r8d, 0x6d8
mov word [rbp + 0x345], ax
lea rcx, [rbp + 0x370]
mov byte [rbp + 0x347], al
mov qword [rbp + 0x310], r15
mov qword [rbp + 0x318], rbx
mov qword [rbp + 0x320], r15
mov qword [rbp + 0x328], rbx
mov qword [rbp + 0x330], r15
mov qword [rbp + 0x338], rbx
mov byte [rbp + 0x340], 6
mov qword [rbp + 0x348], rbx
mov qword [rbp + 0x350], rbx
mov qword [rbp + 0x358], rbx
mov qword [rbp + 0x360], rbx
mov qword [rbp + 0x368], rbx
call fcn.14027e650
lea rcx, [rdi + 8]
mov qword [rbp + 0xa48], rbx
lea rdx, [rbp + 0x10]
mov byte [rbp + 0xa50], bl
mov r8d, 0xa48
call fcn.14027dfb0
mov ecx, dword [0x1405f78c0]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140018918
add rdi, 8
cmp byte [rdi + 0x330], bl
je 0x140018140
xor edx, edx
mov rcx, rdi
call fcn.140026d50
mov rdi, rax
cmp byte [0x1403e7a49], bl
je 0x14001814f
mov byte [rsp + 0x54], r15b
jmp 0x14001815c
mov eax, r14d
shr eax, 6
and al, r15b
mov dword [rsp + 0x54], eax
mov qword [rsp + 0xea8], rsi
lea rcx, [0x140000000]
test r14d, 0xfff00000
je 0x1400181e7
mov esi, r14d
shr esi, 0x14
dec esi
cmp esi, 0xffffffff
je 0x1400181e7
mov rcx, qword [rcx + rsi*8 + 0x3e7a80]
nop
mov qword [rsp + 0x58], rcx
nop
test rcx, rcx
jne 0x1400181ec
lea r8, [0x140288dc0]
mov edx, esi
mov rcx, rdi
call fcn.140016840
mov qword [rsp + 0x58], rax
mov rcx, rax
test rax, rax
jne 0x1400181ec
cmp esi, dword [0x1405f7934]
jb 0x1400181ec
xor eax, eax
mov rsi, qword [rsp + 0xea8]
mov rcx, qword [rbp + 0xd90]
xor rcx, rsp
call fcn.140249860
add rsp, 0xeb0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret
mov qword [rsp + 0x58], rbx
mov eax, r14d
and eax, 0xfff00
je 0x140018260
cmp eax, 0x100
je 0x140018243
mov edx, r14d
sar edx, 8
and edx, 0xfff
sub edx, 2
cmp edx, 0xfffffffe
je 0x140018260
cmp edx, 0xffffffff
je 0x140018243
mov rax, qword [0x1403f69a8]
mov rsi, qword [rax + rdx*8]
lea r14, [rax + rdx*8]
test rsi, rsi
je 0x14001892a
cmp rsi, r15
jne 0x140018246
mov rcx, rdi
call fcn.140054690
mov rsi, rax
mov qword [r14], rax
jmp 0x140018246
mov rsi, rbx
test rdi, rdi
jne 0x14001826e
lea rcx, [rbp + 0xa90]
call fcn.140024f30
lea r9, [rbp + 0xa90]
jmp 0x140018275
mov rsi, rbx
cmp byte [rdi], bl
je 0x14001826e
lea rsi, [rdi + 0x358]
lea r9, [rdi + 0x1b0]
lea r8, [0x1403f6a60]
mov qword [rsp + 0x20], r13
mov rdx, rdi
lea rcx, [rbp - 0x20]
call fcn.1400202f0
mov r9, qword [rsp + 0x70]
lea rcx, [0x140000000]
mov r11d, 4
movsd xmm0, qword [rax]
movsd qword [rbp - 0x80], xmm0
mov eax, dword [rbp - 0x80]
mov r13, qword [rcx + rax*8 + 0x3f01c0]
test r9, r9
jne 0x140018332
movabs r8, 0x7000000000000000
cmp r12, 0x1000
ja 0x1400182e9
lea rax, [r12 + 7]
shr rax, 3
movzx eax, byte [rax + rcx + 0x3f0900]
mov r14, qword [rcx + rax*8 + 0x3f01c0]
jmp 0x140018424
cmp r12, r8
jbe 0x1400182f6
mov r14, rbx
jmp 0x140018424
lea rax, [r12*2 - 1]
test rax, rax
je 0x140018900
bsr rcx, rax
cmp rcx, 7
jae 0x140018316
mov rcx, r11
jmp 0x14001831a
add rcx, 0xfffffffffffffffd
mov rax, r15
shl rax, cl
dec rax
lea r14, [r12 + rax]
not rax
and r14, rax
jmp 0x140018424
cmp r12, 0x3800
ja 0x1400183d5
cmp r9, 0x1000
ja 0x1400183d5
lea rdx, [r9 - 1]
mov rax, r9
add rdx, r12
neg rax
and rdx, rax
movabs r8, 0x7000000000000000
cmp rdx, 0x1000
ja 0x140018389
lea rax, [rdx + 7]
shr rax, 3
movzx eax, byte [rax + rcx + 0x3f0900]
mov r14, qword [rcx + rax*8 + 0x3f01c0]
jmp 0x1400183ca
cmp rdx, r8
jbe 0x140018393
mov r14, rbx
jmp 0x1400183ca
lea rax, [rdx*2 - 1]
test rax, rax
je 0x140018900
bsr rcx, rax
cmp rcx, 7
jae 0x1400183b3
mov rcx, r11
jmp 0x1400183b7
add rcx, 0xfffffffffffffffd
mov rax, r15
shl rax, cl
dec rax
lea r14, [rax + rdx]
not rax
and r14, rax
cmp r14, 0x4000
jae 0x1400183f6
jmp 0x140018424
movabs r8, 0x7000000000000000
cmp r9, r8
jbe 0x1400183e9
mov r14, rbx
jmp 0x140018424
cmp r12, 0x4000
ja 0x1400184d9
mov r14d, 0x4000
mov rcx, qword [0x1405f78c8]
lea rax, [r9 + 0xfff]
and rax, 0xfffffffffffff000
add rcx, 0xfffffffffffff000
add rax, r14
add rax, rcx
cmp rax, r14
cmovb r14, rbx
lea rax, [r14 - 1]
movabs rcx, 0x6fffffffffffffff
cmp rax, rcx
ja 0x1400181bb
movzx eax, byte [rsp + 0x50]
mov rcx, qword [rsp + 0x68]
mov byte [rbp + 0xa60], al
movsxd rax, dword [rsp + 0x60]
mov qword [rbp + 0xa78], rax
mov qword [rbp + 0xa68], rcx
mov qword [rbp + 0xa70], r12
mov qword [rbp + 0xa80], rbx
test r9, r9
je 0x1400187f4
lea rax, [r9 - 1]
test rcx, rax
je 0x1400187f4
cmp r12, 0x3800
ja 0x14001856f
cmp r9, 0x1000
ja 0x14001856f
lea rdx, [r9 - 1]
mov rax, r9
add rdx, r12
neg rax
and rdx, rax
cmp rdx, 0x1000
ja 0x140018526
lea rcx, [0x140000000]
lea rax, [rdx + 7]
shr rax, 3
movzx eax, byte [rax + rcx + 0x3f0900]
mov r8, qword [rcx + rax*8 + 0x3f01c0]
jmp 0x140018561
cmp r12, r8
ja 0x14001851e
lea rax, [r12*2 - 1]
test rax, rax
je 0x140018900
bsr rcx, rax
cmp rcx, 7
jae 0x1400184fe
mov rcx, r11
jmp 0x140018502
add rcx, 0xfffffffffffffffd
mov rax, r15
shl rax, cl
dec rax
lea r14, [rax + r12]
not rax
and r14, rax
cmp r14, r12
jae 0x1400183fc
mov r14, rbx
jmp 0x140018424
cmp rdx, r8
jbe 0x140018530
mov r8, rbx
jmp 0x140018561
lea rax, [rdx*2 - 1]
test rax, rax
je 0x140018900
bsr rax, rax
cmp eax, 7
jb 0x14001854e
lea r11, [rax - 3]
mov rcx, r11
shl r15, cl
dec r15
lea r8, [r15 + rdx]
not r15
and r8, r15
cmp r8, 0x4000
jae 0x140018581
jmp 0x1400185f6
cmp r9, r8
ja 0x1400187ee
cmp r12, 0x4000
ja 0x140018589
mov r8d, 0x4000
jmp 0x1400185cc
cmp r12, r8
ja 0x1400187ee
lea rax, [r12*2 - 1]
test rax, rax
je 0x140018900
bsr rax, rax
cmp eax, 7
jb 0x1400185b0
lea r11, [rax - 3]
mov rcx, r11
shl r15, cl
dec r15
lea r8, [r12 + r15]
not r15
and r8, r15
cmp r8, r12
jb 0x1400187ee
mov rcx, qword [0x1405f78c8]
lea rax, [r9 + 0xfff]
and rax, 0xfffffffffffff000
add rcx, 0xfffffffffffff000
add rax, r8
add rax, rcx
cmp rax, r8
jb 0x1400187ee
lea rax, [r8 - 1]
movabs rcx, 0x6fffffffffffffff
cmp rax, rcx
ja 0x1400187ee
mov eax, dword [rsp + 0x54]
mov rcx, rdi
mov rdx, qword [rsp + 0x58]
mov qword [rsp + 0x28], rsi
mov byte [rsp + 0x20], al
call fcn.14004fdd0
mov r15, rax
test rax, rax
je 0x1400187ee
cmp r12, r13
mov r8, r13
mov rcx, rax
cmovb r8, r12
mov r12, qword [rsp + 0x68]
mov rdx, r12
call fcn.14027dfb0
movzx eax, byte [rbp + 0xa60]
lea r9, [rbp + 0xa68]
neg al
mov r8, r15
mov rdx, r15
sbb ecx, ecx
add ecx, 8
call fcn.14002ee40
movzx eax, byte [rbp + 0xa60]
lea r8, [rbp + 0xa68]
neg al
mov rdx, r12
sbb ecx, ecx
add ecx, 4
call fcn.14002eef0
test rsi, rsi
jne 0x1400186a9
mov r8, r13
mov rdx, r12
mov rcx, rdi
call fcn.1400169c0
mov esi, dword [rsp + 0x54]
mov rbx, r15
jmp 0x14001882e
cmp r13, 0x1000
ja 0x1400186cc
lea rax, [r13 + 7]
shr rax, 3
lea rcx, [0x140000000]
movzx r9d, byte [rax + rcx + 0x3f0900]
jmp 0x1400186d7
mov rcx, r13
call fcn.140020880
mov r9d, eax
cmp r9d, 0x24
jae 0x14001873d
mov edx, r9d
lea rcx, [rdx + rdx*2]
lea rbx, [rsi + rcx*8]
movzx ecx, word [rsi + rcx*8 + 0x1a]
cmp word [rbx + 8], cx
jne 0x14001878c
mov rax, qword [0x1403f69b0]
movzx ecx, word [rax + rdx*2]
test cx, cx
jne 0x14001871e
mov rdx, r12
mov rcx, rdi
call fcn.14004e790
mov esi, dword [rsp + 0x54]
mov rbx, r15
jmp 0x14001882e
mov eax, ecx
lea r8, [rbx + 8]
mov ecx, dword [0x1403ddcac]
mov rdx, rsi
shr eax, cl
mov rcx, rdi
mov dword [rsp + 0x20], eax
call fcn.140053730
jmp 0x140018782
cmp r9d, dword [0x1403f69a0]
jae 0x1400187a7
mov ecx, r9d
lea rax, [rcx + rcx*2]
lea rbx, [rsi + rax*8]
movzx eax, word [rsi + rax*8 + 0x1a]
cmp word [rbx + 8], ax
jne 0x14001878c
mov rax, qword [0x1403f69b0]
lea r8, [rbx + 8]
movzx edx, word [rax + rcx*2]
mov ecx, dword [0x1403ddcb8]
shr edx, cl
mov rcx, rdi
mov dword [rsp + 0x20], edx
mov rdx, rsi
call fcn.140053330
movzx eax, word [rbx + 0x1a]
cmp word [rbx + 8], ax
je 0x1400187eb
mov rax, qword [rbx + 8]
mov esi, dword [rsp + 0x54]
sub rax, 8
mov qword [rbx + 8], rax
mov rbx, r15
mov qword [rax], r12
jmp 0x14001882e
test rdi, rdi
jne 0x1400187c1
lea rcx, [rbp + 0xc10]
call fcn.140024f30
lea r9, [rbp + 0xc10]
jmp 0x1400187c8
lea r9, [rdi + 0x1b0]
lea r8, [0x1403f6a60]
mov qword [rsp + 0x20], r12
mov rdx, rdi
lea rcx, [rbp - 0x10]
call fcn.1400204b0
mov rcx, rdi
mov rdx, qword [rax]
call fcn.140051f20
mov rbx, r15
mov esi, dword [rsp + 0x54]
jmp 0x14001882e
mov rdx, qword [rsp + 0x58]
lea rax, [rbp + 0xa60]
mov qword [rsp + 0x40], rax
mov r8, rcx
mov qword [rsp + 0x38], rsi
mov rcx, rdi
mov esi, dword [rsp + 0x54]
mov byte [rsp + 0x30], sil
mov qword [rsp + 0x28], r9
mov r9, r13
mov qword [rsp + 0x20], r12
call fcn.140050410
mov rbx, rax
test rbx, rbx
je 0x1400181bb
lea r8, [rdi + 0x338]
mov byte [rbp - 0x70], 1
mov qword [rbp - 0x68], r8
lea rcx, [rdi + 8]
mov qword [rbp - 0x60], rcx
lea rcx, [rdi + 0x10]
mov qword [rbp - 0x58], rcx
lea rcx, [rdi + 0x340]
mov qword [rbp - 0x50], rcx
mov rdx, qword [r8]
lea rax, [rdx + r14]
mov qword [r8], rax
mov rax, qword [rbp - 0x58]
mov rcx, qword [rax]
sub rcx, rdx
cmp r14, rcx
jb 0x140018886
lea rdx, [rbp - 0x70]
mov rcx, rdi
call fcn.140059e70
lea rcx, [rdi + 0x348]
mov byte [rbp - 0x48], 0
mov qword [rbp - 0x40], rcx
lea rax, [rdi + 0x18]
mov qword [rbp - 0x38], rax
lea rax, [rdi + 0x20]
mov qword [rbp - 0x30], rax
lea rax, [rdi + 0x350]
mov qword [rbp - 0x28], rax
mov rdx, qword [rcx]
lea rax, [rdx + r13]
mov qword [rcx], rax
mov rax, qword [rbp - 0x30]
mov rcx, qword [rax]
sub rcx, rdx
cmp r13, rcx
jb 0x1400188d5
lea rdx, [rbp - 0x48]
mov rcx, rdi
call fcn.140059e70
cmp byte [0x1403e7a44], 0
je 0x1400188f8
cmp r14, r13
jbe 0x1400188f8
test sil, sil
jne 0x1400188f8
sub r14, r13
lea rcx, [rbx + r13]
mov rdx, r14
call qword [0x1403dd068]
mov rax, rbx
jmp 0x1400181bd
call fcn.14025c5b0
int3
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
lea rcx, str._jemalloc_:_invalid_tcache_id___u_._n
call fcn.140023900
call fcn.14025c5b0
int3