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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x970]
sub rsp, 0xa70
movzx eax, byte [rcx + 0x330]
mov rdi, rcx
cmp al, 1
je 0x1400316be
cmp al, 2
jne 0x140030fdf
call fcn.140031b60
jmp 0x1400316be
cmp al, 6
jne 0x1400316da
test dl, dl
jne 0x140031369
cmp byte [0x140374290], dl
je 0x1400316be
mov byte [rcx + 0x330], dl
call fcn.140030990
mov rcx, rdi
call fcn.140064390
mov rcx, rdi
call fcn.140031b60
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 rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
jne 0x140031342
mov ecx, 0xa80
call fcn.140020f00
mov rsi, rax
test rax, rax
je 0x140031a53
xor ebx, ebx
mov byte [rax], 0
xor eax, eax
mov word [rsp + 0x20], 0
xorps xmm0, xmm0
mov dword [rbp - 0x1e], eax
xor edx, edx
mov word [rbp - 0x1a], ax
mov r8d, 0xb0
mov qword [rbp - 0x10], rax
lea rcx, [rbp + 0x20]
mov byte [rbp - 8], al
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rbx
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 dword [rbp - 0x48], 0x3e8
mov dword [rbp - 0x44], 0x3e8
mov word [rbp - 0x40], 0xffff
movups xmmword [rbp - 0x3e], xmm0
mov qword [rbp - 0x18], rbx
movups xmmword [rbp - 0x2e], xmm0
mov qword [rbp], rbx
mov qword [rbp + 8], rbx
mov qword [rbp + 0x10], rbx
mov qword [rbp + 0x18], rbx
call fcn.1401e1df0
mov qword [rbp + 0xd0], 1
mov qword [rbp + 0xd8], rbx
mov qword [rbp + 0xe0], 1
mov qword [rbp + 0xe8], rbx
mov qword [rbp + 0xf0], 1
mov qword [rbp + 0xf8], rbx
mov qword [rbp + 0x100], 1
mov qword [rbp + 0x108], rbx
mov qword [rbp + 0x110], 1
mov qword [rbp + 0x118], rbx
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
xor eax, eax
mov qword [rbp + 0x210], 1
xor edx, edx
mov dword [rbp + 0x251], eax
mov r8d, 0x6d8
mov word [rbp + 0x255], ax
lea rcx, [rbp + 0x280]
mov byte [rbp + 0x257], al
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 byte [rbp + 0x250], 6
mov qword [rbp + 0x258], rbx
mov qword [rbp + 0x260], rbx
mov qword [rbp + 0x268], rbx
mov qword [rbp + 0x270], rbx
mov qword [rbp + 0x278], rbx
call fcn.1401e1df0
lea rcx, [rsi + 8]
mov qword [rbp + 0x958], rbx
lea rdx, [rsp + 0x20]
mov byte [rbp + 0x960], bl
mov r8d, 0xa48
call fcn.1401e1740
mov ecx, dword [0x14057b280]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140031a41
lea rcx, [rsi + 8]
cmp rcx, rdi
je 0x140031359
mov rdx, rdi
mov r8d, 0xa48
call fcn.1401e1740
mov rcx, rdi
mov byte [rsi], 1
call fcn.140030f20
jmp 0x1400316be
mov dl, 3
call fcn.140031ba0
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 rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
jne 0x14003169c
mov ecx, 0xa80
call fcn.140020f00
mov rsi, rax
test rax, rax
je 0x140031a53
xor ebx, ebx
mov byte [rax], 0
xor eax, eax
mov word [rsp + 0x20], 0
xorps xmm0, xmm0
mov dword [rbp - 0x1e], eax
xor edx, edx
mov word [rbp - 0x1a], ax
mov r8d, 0xb0
mov qword [rbp - 0x10], rax
lea rcx, [rbp + 0x20]
mov byte [rbp - 8], al
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rbx
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 dword [rbp - 0x48], 0x3e8
mov dword [rbp - 0x44], 0x3e8
mov word [rbp - 0x40], 0xffff
movups xmmword [rbp - 0x3e], xmm0
mov qword [rbp - 0x18], rbx
movups xmmword [rbp - 0x2e], xmm0
mov qword [rbp], rbx
mov qword [rbp + 8], rbx
mov qword [rbp + 0x10], rbx
mov qword [rbp + 0x18], rbx
call fcn.1401e1df0
mov qword [rbp + 0xd0], 1
mov qword [rbp + 0xd8], rbx
mov qword [rbp + 0xe0], 1
mov qword [rbp + 0xe8], rbx
mov qword [rbp + 0xf0], 1
mov qword [rbp + 0xf8], rbx
mov qword [rbp + 0x100], 1
mov qword [rbp + 0x108], rbx
mov qword [rbp + 0x110], 1
mov qword [rbp + 0x118], rbx
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
xor eax, eax
mov qword [rbp + 0x210], 1
xor edx, edx
mov dword [rbp + 0x251], eax
mov r8d, 0x6d8
mov word [rbp + 0x255], ax
lea rcx, [rbp + 0x280]
mov byte [rbp + 0x257], al
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 byte [rbp + 0x250], 6
mov qword [rbp + 0x258], rbx
mov qword [rbp + 0x260], rbx
mov qword [rbp + 0x268], rbx
mov qword [rbp + 0x270], rbx
mov qword [rbp + 0x278], rbx
call fcn.1401e1df0
lea rcx, [rsi + 8]
mov qword [rbp + 0x958], rbx
lea rdx, [rsp + 0x20]
mov byte [rbp + 0x960], bl
mov r8d, 0xa48
call fcn.1401e1740
mov ecx, dword [0x14057b280]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140031a41
lea rcx, [rsi + 8]
cmp rcx, rdi
je 0x1400316b3
mov r8d, 0xa48
mov rdx, rdi
call fcn.1401e1740
mov rcx, rdi
mov byte [rsi], 1
call fcn.140030f60
lea r11, [rsp + 0xa70]
mov rax, rdi
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret
cmp al, 3
jne 0x14003170a
test dl, dl
jne 0x1400316be
mov byte [rcx + 0x330], dl
call fcn.140030990
mov rcx, rdi
call fcn.140064390
dec byte [rdi + 1]
mov rcx, rdi
call fcn.140031b60
mov rcx, rdi
call fcn.140030f20
jmp 0x1400316be
cmp al, 4
jne 0x1400316be
mov dl, 5
call fcn.140031ba0
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 rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
jne 0x14003169c
mov ecx, 0xa80
call fcn.140020f00
mov rsi, rax
test rax, rax
je 0x140031a53
xor ebx, ebx
mov byte [rax], 0
xor eax, eax
mov word [rsp + 0x20], 0
xorps xmm0, xmm0
mov dword [rbp - 0x1e], eax
xor edx, edx
mov word [rbp - 0x1a], ax
mov r8d, 0xb0
mov qword [rbp - 0x10], rax
lea rcx, [rbp + 0x20]
mov byte [rbp - 8], al
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rbx
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 dword [rbp - 0x48], 0x3e8
mov dword [rbp - 0x44], 0x3e8
mov word [rbp - 0x40], 0xffff
movups xmmword [rbp - 0x3e], xmm0
mov qword [rbp - 0x18], rbx
movups xmmword [rbp - 0x2e], xmm0
mov qword [rbp], rbx
mov qword [rbp + 8], rbx
mov qword [rbp + 0x10], rbx
mov qword [rbp + 0x18], rbx
call fcn.1401e1df0
mov qword [rbp + 0xd0], 1
mov qword [rbp + 0xd8], rbx
mov qword [rbp + 0xe0], 1
mov qword [rbp + 0xe8], rbx
mov qword [rbp + 0xf0], 1
mov qword [rbp + 0xf8], rbx
mov qword [rbp + 0x100], 1
mov qword [rbp + 0x108], rbx
mov qword [rbp + 0x110], 1
mov qword [rbp + 0x118], rbx
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
xor eax, eax
mov qword [rbp + 0x210], 1
xor edx, edx
mov dword [rbp + 0x251], eax
mov r8d, 0x6d8
mov word [rbp + 0x255], ax
lea rcx, [rbp + 0x280]
mov byte [rbp + 0x257], al
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 byte [rbp + 0x250], 6
mov qword [rbp + 0x258], rbx
mov qword [rbp + 0x260], rbx
mov qword [rbp + 0x268], rbx
mov qword [rbp + 0x270], rbx
mov qword [rbp + 0x278], rbx
call fcn.1401e1df0
lea rcx, [rsi + 8]
mov qword [rbp + 0x958], rbx
lea rdx, [rsp + 0x20]
mov byte [rbp + 0x960], bl
mov r8d, 0xa48
call fcn.1401e1740
mov ecx, dword [0x14057b280]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x14003169c
lea rcx, str._jemalloc_:_Error_setting_TSD_n
call fcn.14002ee10
call fcn.1401f5dec
int3
lea rcx, str._jemalloc_:_Error_allocating_TSD_n
call fcn.14002ee10
call fcn.1401f5dec
int3