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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x40
mov rdi, 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 rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
je 0x1400190bb
lea r8, [rsi + 8]
test r8, r8
je 0x1400190bb
mov rax, rdi
mov rcx, rdi
shr rax, 0x1e
and rcx, 0xffffffffc0000000
and eax, 0xf
add rax, 0x1b
add rax, rax
cmp qword [r8 + rax*8], rcx
jne 0x1400190bb
mov rcx, qword [r8 + rax*8 + 8]
mov rax, rdi
shr rax, 0xc
and eax, 0x3ffff
mov rdx, qword [rcx + rax*8]
movzx eax, dl
mov r9, rdx
and al, 1
shr dl, 1
and dl, 1
mov byte [rsp + 0x31], al
mov byte [rsp + 0x30], dl
mov eax, dword [rsp + 0x30]
shr eax, 8
shr r9, 0x30
test al, al
je 0x1400190bb
mov r9d, r9d
lea rax, [0x1403f01c0]
mov rdx, qword [rax + r9*8]
add rdx, qword [r8 + 0x348]
cmp rdx, qword [r8 + 0x350]
jae 0x1400190bb
lea rax, [r9 + 0x24]
lea rax, [rax + rax*2]
lea rcx, [r8 + rax*8]
movzx eax, word [r8 + rax*8 + 0x12]
cmp word [rcx], ax
je 0x1400190bb
add qword [rcx], 0xfffffffffffffff8
mov rax, qword [rcx]
mov qword [rax], rdi
mov qword [r8 + 0x348], rdx
mov rbx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret
mov rcx, rdi
mov rbx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
jmp 0x1400190e0
test rcx, rcx
je 0x140019899
mov r11, rsp
push rbp
push rsi
lea rbp, [r11 - 0xa18]
sub rsp, 0xb08
mov rax, qword [0x1403e4f00]
xor rax, rsp
mov qword [rbp + 0x9e8], rax
mov qword [r11 + 0x10], rbx
mov rsi, rcx
mov qword [r11 + 0x18], rdi
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 0x140019437
mov ecx, 0xa50
call fcn.140026730
mov rdi, rax
test rax, rax
je 0x14001989a
xorps xmm0, xmm0
mov byte [rax], bl
xor eax, eax
mov word [rsp + 0x70], bx
xor edx, edx
mov dword [rbp + 0x32], eax
mov r8d, 0xb0
mov word [rbp + 0x36], ax
lea rcx, [rbp + 0x70]
mov qword [rbp + 0x40], rax
mov byte [rbp + 0x48], al
mov qword [rsp + 0x78], rbx
mov qword [rbp - 0x80], rbx
mov qword [rbp - 0x78], rbx
mov qword [rbp - 0x70], rbx
mov qword [rbp - 0x68], rbx
mov qword [rbp - 0x60], rbx
mov qword [rbp - 0x58], rbx
mov qword [rbp - 0x50], rbx
mov qword [rbp - 0x48], rbx
mov qword [rbp - 0x40], rbx
mov qword [rbp - 0x38], rbx
mov qword [rbp - 0x30], rbx
mov qword [rbp - 0x28], rbx
mov qword [rbp - 0x20], rbx
mov qword [rbp - 0x18], rbx
mov qword [rbp - 0x10], rbx
mov qword [rbp - 8], rbx
mov qword [rbp], rbx
mov dword [rbp + 8], 0x3e8
mov dword [rbp + 0xc], 0x3e8
mov word [rbp + 0x10], 0xffff
movups xmmword [rbp + 0x12], xmm0
mov qword [rbp + 0x38], rbx
movups xmmword [rbp + 0x22], xmm0
mov qword [rbp + 0x50], rbx
mov qword [rbp + 0x58], rbx
mov qword [rbp + 0x60], rbx
mov qword [rbp + 0x68], rbx
call fcn.14027e650
mov qword [rbp + 0x120], 1
mov qword [rbp + 0x128], rbx
mov qword [rbp + 0x130], 1
mov qword [rbp + 0x138], rbx
mov qword [rbp + 0x140], 1
mov qword [rbp + 0x148], rbx
mov qword [rbp + 0x150], 1
mov qword [rbp + 0x158], rbx
mov qword [rbp + 0x160], 1
mov qword [rbp + 0x168], rbx
mov qword [rbp + 0x170], 1
mov qword [rbp + 0x178], rbx
mov qword [rbp + 0x180], 1
mov qword [rbp + 0x188], rbx
mov qword [rbp + 0x190], 1
mov qword [rbp + 0x198], rbx
mov qword [rbp + 0x1a0], 1
mov qword [rbp + 0x1a8], rbx
mov qword [rbp + 0x1b0], 1
mov qword [rbp + 0x1b8], rbx
mov qword [rbp + 0x1c0], 1
mov qword [rbp + 0x1c8], rbx
mov qword [rbp + 0x1d0], 1
mov qword [rbp + 0x1d8], rbx
mov qword [rbp + 0x1e0], 1
mov qword [rbp + 0x1e8], rbx
mov qword [rbp + 0x1f0], 1
mov qword [rbp + 0x1f8], rbx
mov qword [rbp + 0x200], 1
mov qword [rbp + 0x208], rbx
mov qword [rbp + 0x210], 1
mov qword [rbp + 0x218], rbx
mov qword [rbp + 0x220], 1
mov qword [rbp + 0x228], rbx
mov qword [rbp + 0x230], 1
mov qword [rbp + 0x238], rbx
mov qword [rbp + 0x240], 1
mov qword [rbp + 0x248], rbx
mov qword [rbp + 0x250], 1
mov qword [rbp + 0x258], rbx
mov qword [rbp + 0x260], 1
xor eax, eax
mov qword [rbp + 0x268], rbx
xor edx, edx
mov dword [rbp + 0x2a1], eax
mov r8d, 0x6d8
mov word [rbp + 0x2a5], ax
lea rcx, [rbp + 0x2d0]
mov byte [rbp + 0x2a7], al
mov qword [rbp + 0x270], 1
mov qword [rbp + 0x278], rbx
mov qword [rbp + 0x280], 1
mov qword [rbp + 0x288], rbx
mov qword [rbp + 0x290], 1
mov qword [rbp + 0x298], rbx
mov byte [rbp + 0x2a0], 6
mov qword [rbp + 0x2a8], rbx
mov qword [rbp + 0x2b0], rbx
mov qword [rbp + 0x2b8], rbx
mov qword [rbp + 0x2c0], rbx
mov qword [rbp + 0x2c8], rbx
call fcn.14027e650
lea rcx, [rdi + 8]
mov qword [rbp + 0x9a8], rbx
lea rdx, [rsp + 0x70]
mov byte [rbp + 0x9b0], 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 0x1400198ac
add rdi, 8
cmp byte [rdi + 0x330], bl
je 0x140019450
mov dl, 1
mov rcx, rdi
call fcn.140026d50
mov rdi, rax
mov qword [rsp + 0xb00], r13
mov qword [rsp + 0xaf8], r14
mov qword [rsp + 0xaf0], r15
cmp byte [rdi + 0x330], bl
jne 0x14001961e
lea r9, [rdi + 0x1b0]
mov qword [rsp + 0x20], rsi
lea r8, [0x1403f6a60]
mov rdx, rdi
lea rcx, [rsp + 0x40]
lea r14, [rdi + 0x358]
call fcn.1400202f0
lea r13, [0x1403f01c0]
movsd xmm0, qword [rax]
mov edx, dword [rax + 8]
movsd qword [rsp + 0x30], xmm0
mov r9d, dword [rsp + 0x30]
shr edx, 8
mov r15, qword [r13 + r9*8]
test r14, r14
jne 0x1400194d1
mov rdx, rsi
mov rcx, rdi
call fcn.140016760
jmp 0x1400195b9
test dl, dl
je 0x14001952d
lea rax, [r9 + r9*2]
lea rbx, [r14 + rax*8]
movzx eax, word [r14 + rax*8 + 0x1a]
cmp word [rbx + 8], ax
jne 0x14001957b
mov rax, qword [0x1403f69b0]
movzx edx, word [rax + r9*2]
test dx, dx
jne 0x14001950e
mov rdx, rsi
mov rcx, rdi
call fcn.14004e790
jmp 0x1400195b9
mov ecx, dword [0x1403ddcac]
lea r8, [rbx + 8]
mov eax, edx
mov rdx, r14
shr eax, cl
mov rcx, rdi
mov dword [rsp + 0x20], eax
call fcn.140053730
jmp 0x140019571
cmp r9d, dword [0x1403f69a0]
jae 0x14001958c
lea rax, [r9 + r9*2]
lea rbx, [r14 + rax*8]
movzx eax, word [r14 + rax*8 + 0x1a]
cmp word [rbx + 8], ax
jne 0x14001957b
mov ecx, dword [0x1403ddcb8]
lea r8, [rbx + 8]
mov rax, qword [0x1403f69b0]
movzx edx, word [rax + r9*2]
shr edx, cl
mov rcx, rdi
mov dword [rsp + 0x20], edx
mov rdx, r14
call fcn.140053330
movzx eax, word [rbx + 0x1a]
cmp word [rbx + 8], ax
je 0x1400195b9
mov rax, qword [rbx + 8]
sub rax, 8
mov qword [rbx + 8], rax
mov qword [rax], rsi
jmp 0x1400195b9
lea r9, [rdi + 0x1b0]
mov qword [rsp + 0x20], rsi
lea r8, [0x1403f6a60]
mov rdx, rdi
lea rcx, [rbp + 0x9c0]
call fcn.1400204b0
mov rcx, rdi
mov rdx, qword [rax]
call fcn.140051f20
lea rcx, [rdi + 0x348]
mov byte [rbp + 0x9c0], 0
mov qword [rbp + 0x9c8], rcx
lea rax, [rdi + 0x18]
mov qword [rbp + 0x9d0], rax
lea rax, [rdi + 0x20]
mov qword [rbp + 0x9d8], rax
lea rax, [rdi + 0x350]
mov qword [rbp + 0x9e0], rax
mov rdx, qword [rcx]
lea rax, [rdx + r15]
mov qword [rcx], rax
mov rax, qword [rbp + 0x9d8]
mov rcx, qword [rax]
sub rcx, rdx
cmp r15, rcx
jb 0x140019859
lea rdx, [rbp + 0x9c0]
jmp 0x140019851
mov qword [rsp + 0xb38], r12
cmp byte [rdi + 1], bl
jne 0x140019636
cmp byte [rdi], bl
je 0x140019636
lea rbx, [rdi + 0x358]
xorps xmm0, xmm0
mov qword [rbp + 0x9c0], rsi
lea r8, [rbp + 0x9c0]
mov rdx, rsi
xor ecx, ecx
movups xmmword [rbp + 0x9c8], xmm0
call fcn.14002eef0
lea r9, [rdi + 0x1b0]
mov qword [rsp + 0x20], rsi
lea r8, [0x1403f6a60]
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.1400202f0
lea r13, [0x1403f01c0]
movsd xmm0, qword [rax]
mov r14d, dword [rax + 8]
movsd qword [rsp + 0x30], xmm0
mov r12d, dword [rsp + 0x30]
shr r14d, 8
cmp byte [0x1403e7a45], 0
mov r13, qword [r13 + r12*8]
je 0x1400196b0
mov rdx, r13
mov rcx, rsi
call qword [0x1403dd060]
test rbx, rbx
jne 0x1400196c5
mov rdx, rsi
mov rcx, rdi
call fcn.140016760
jmp 0x1400197fb
test r14b, r14b
je 0x14001975b
lea rax, [r12 + r12*2]
lea r14, [rbx + rax*8]
movzx eax, word [rbx + rax*8 + 0x1a]
cmp word [r14 + 8], ax
je 0x1400196f6
mov rax, qword [r14 + 8]
sub rax, 8
mov qword [r14 + 8], rax
mov qword [rax], rsi
jmp 0x1400197fb
mov rax, qword [0x1403f69b0]
movzx edx, word [rax + r12*2]
test dx, dx
jne 0x140019717
mov rdx, rsi
mov rcx, rdi
call fcn.14004e790
jmp 0x1400197fb
mov ecx, dword [0x1403ddcac]
lea r8, [r14 + 8]
mov eax, edx
mov r9d, r12d
shr eax, cl
mov rdx, rbx
mov rcx, rdi
mov dword [rsp + 0x20], eax
call fcn.140053730
movzx eax, word [r14 + 0x1a]
cmp word [r14 + 8], ax
je 0x1400197fb
mov rax, qword [r14 + 8]
sub rax, 8
mov qword [r14 + 8], rax
mov qword [rax], rsi
jmp 0x1400197fb
cmp r12d, dword [0x1403f69a0]
jae 0x1400197d0
lea rax, [r12 + r12*2]
lea r14, [rbx + rax*8]
movzx eax, word [rbx + rax*8 + 0x1a]
cmp word [r14 + 8], ax
je 0x140019789
mov rax, qword [r14 + 8]
sub rax, 8
mov qword [r14 + 8], rax
mov qword [rax], rsi
jmp 0x1400197fb
mov ecx, dword [0x1403ddcb8]
lea r8, [r14 + 8]
mov rax, qword [0x1403f69b0]
mov r9d, r12d
movzx edx, word [rax + r12*2]
shr edx, cl
mov rcx, rdi
mov dword [rsp + 0x20], edx
mov rdx, rbx
call fcn.140053330
movzx eax, word [r14 + 0x1a]
cmp word [r14 + 8], ax
je 0x1400197fb
mov rax, qword [r14 + 8]
sub rax, 8
mov qword [r14 + 8], rax
mov qword [rax], rsi
jmp 0x1400197fb
lea r9, [rdi + 0x1b0]
mov qword [rsp + 0x20], rsi
lea r8, [0x1403f6a60]
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.1400204b0
mov rcx, rdi
mov rdx, qword [rax]
call fcn.140051f20
mov r12, qword [rsp + 0xb38]
lea rcx, [rdi + 0x348]
mov qword [rsp + 0x48], rcx
lea rax, [rdi + 0x18]
mov qword [rsp + 0x50], rax
lea rax, [rdi + 0x20]
mov qword [rsp + 0x58], rax
lea rax, [rdi + 0x350]
mov qword [rsp + 0x60], rax
mov byte [rsp + 0x40], 0
mov rdx, qword [rcx]
lea rax, [rdx + r13]
mov qword [rcx], rax
mov rax, qword [rsp + 0x58]
mov rcx, qword [rax]
sub rcx, rdx
cmp r13, rcx
jb 0x140019859
lea rdx, [rsp + 0x40]
mov rcx, rdi
call fcn.140059e70
mov r14, qword [rsp + 0xaf8]
mov r13, qword [rsp + 0xb00]
mov r15, qword [rsp + 0xaf0]
mov rbx, qword [rsp + 0xb28]
mov rdi, qword [rsp + 0xb30]
mov rcx, qword [rbp + 0x9e8]
xor rcx, rsp
call fcn.140249860
add rsp, 0xb08
pop rsi
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