Function at 0x140022c40
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 [0x1403622b0]
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 [0x14057b280]
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 0x140022f97
mov ecx, 0xa50
call fcn.140030980
mov rdi, rax
test rax, rax
je 0x140023776
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.1401e1df0
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.1401e1df0
lea rcx, [rdi + 8]
mov qword [rbp + 0xa48], rbx
lea rdx, [rbp + 0x10]
mov byte [rbp + 0xa50], bl
mov r8d, 0xa48
call fcn.1401e1740
mov ecx, dword [0x14057b280]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140023788
add rdi, 8
cmp byte [rdi + 0x330], bl
je 0x140022fb0
xor edx, edx
mov rcx, rdi
call fcn.140030fa0
mov rdi, rax
cmp byte [0x14036b1c9], bl
je 0x140022fbf
mov byte [rsp + 0x54], r15b
jmp 0x140022fcc
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 0x140023057
mov esi, r14d
shr esi, 0x14
dec esi
cmp esi, 0xffffffff
je 0x140023057
mov rcx, qword [rcx + rsi*8 + 0x36b200]
nop
mov qword [rsp + 0x58], rcx
nop
test rcx, rcx
jne 0x14002305c
lea r8, [0x140229750]
mov edx, esi
mov rcx, rdi
call fcn.1400216b0
mov qword [rsp + 0x58], rax
mov rcx, rax
test rax, rax
jne 0x14002305c
cmp esi, dword [0x14057b2f4]
jb 0x14002305c
xor eax, eax
mov rsi, qword [rsp + 0xea8]
mov rcx, qword [rbp + 0xd90]
xor rcx, rsp
call fcn.1401df0b0
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 0x1400230d0
cmp eax, 0x100
je 0x1400230b3
mov edx, r14d
sar edx, 8
and edx, 0xfff
sub edx, 2
cmp edx, 0xfffffffe
je 0x1400230d0
cmp edx, 0xffffffff
je 0x1400230b3
mov rax, qword [0x14037a358]
mov rsi, qword [rax + rdx*8]
lea r14, [rax + rdx*8]
test rsi, rsi
je 0x14002379a
cmp rsi, r15
jne 0x1400230b6
mov rcx, rdi
call fcn.14005e910
mov rsi, rax
mov qword [r14], rax
jmp 0x1400230b6
mov rsi, rbx
test rdi, rdi
jne 0x1400230de
lea rcx, [rbp + 0xa90]
call fcn.14002f160
lea r9, [rbp + 0xa90]
jmp 0x1400230e5
mov rsi, rbx
cmp byte [rdi], bl
je 0x1400230de
lea rsi, [rdi + 0x358]
lea r9, [rdi + 0x1b0]
lea r8, [0x14037a420]
mov qword [rsp + 0x20], r13
mov rdx, rdi
lea rcx, [rbp - 0x20]
call fcn.14002b170
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 + 0x373940]
test r9, r9
jne 0x1400231a2
movabs r8, 0x7000000000000000
cmp r12, 0x1000
ja 0x140023159
lea rax, [r12 + 7]
shr rax, 3
movzx eax, byte [rax + rcx + 0x374080]
mov r14, qword [rcx + rax*8 + 0x373940]
jmp 0x140023294
cmp r12, r8
jbe 0x140023166
mov r14, rbx
jmp 0x140023294
lea rax, [r12*2 - 1]
test rax, rax
je 0x140023770
bsr rcx, rax
cmp rcx, 7
jae 0x140023186
mov rcx, r11
jmp 0x14002318a
add rcx, 0xfffffffffffffffd
mov rax, r15
shl rax, cl
dec rax
lea r14, [r12 + rax]
not rax
and r14, rax
jmp 0x140023294
cmp r12, 0x3800
ja 0x140023245
cmp r9, 0x1000
ja 0x140023245
lea rdx, [r9 - 1]
mov rax, r9
add rdx, r12
neg rax
and rdx, rax
movabs r8, 0x7000000000000000
cmp rdx, 0x1000
ja 0x1400231f9
lea rax, [rdx + 7]
shr rax, 3
movzx eax, byte [rax + rcx + 0x374080]
mov r14, qword [rcx + rax*8 + 0x373940]
jmp 0x14002323a
cmp rdx, r8
jbe 0x140023203
mov r14, rbx
jmp 0x14002323a
lea rax, [rdx*2 - 1]
test rax, rax
je 0x140023770
bsr rcx, rax
cmp rcx, 7
jae 0x140023223
mov rcx, r11
jmp 0x140023227
add rcx, 0xfffffffffffffffd
mov rax, r15
shl rax, cl
dec rax
lea r14, [rax + rdx]
not rax
and r14, rax
cmp r14, 0x4000
jae 0x140023266
jmp 0x140023294
movabs r8, 0x7000000000000000
cmp r9, r8
jbe 0x140023259
mov r14, rbx
jmp 0x140023294
cmp r12, 0x4000
ja 0x140023349
mov r14d, 0x4000
mov rcx, qword [0x14057b288]
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 0x14002302b
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 0x140023664
lea rax, [r9 - 1]
test rcx, rax
je 0x140023664
cmp r12, 0x3800
ja 0x1400233df
cmp r9, 0x1000
ja 0x1400233df
lea rdx, [r9 - 1]
mov rax, r9
add rdx, r12
neg rax
and rdx, rax
cmp rdx, 0x1000
ja 0x140023396
lea rcx, [0x140000000]
lea rax, [rdx + 7]
shr rax, 3
movzx eax, byte [rax + rcx + 0x374080]
mov r8, qword [rcx + rax*8 + 0x373940]
jmp 0x1400233d1
cmp r12, r8
ja 0x14002338e
lea rax, [r12*2 - 1]
test rax, rax
je 0x140023770
bsr rcx, rax
cmp rcx, 7
jae 0x14002336e
mov rcx, r11
jmp 0x140023372
add rcx, 0xfffffffffffffffd
mov rax, r15
shl rax, cl
dec rax
lea r14, [rax + r12]
not rax
and r14, rax
cmp r14, r12
jae 0x14002326c
mov r14, rbx
jmp 0x140023294
cmp rdx, r8
jbe 0x1400233a0
mov r8, rbx
jmp 0x1400233d1
lea rax, [rdx*2 - 1]
test rax, rax
je 0x140023770
bsr rax, rax
cmp eax, 7
jb 0x1400233be
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 0x1400233f1
jmp 0x140023466
cmp r9, r8
ja 0x14002365e
cmp r12, 0x4000
ja 0x1400233f9
mov r8d, 0x4000
jmp 0x14002343c
cmp r12, r8
ja 0x14002365e
lea rax, [r12*2 - 1]
test rax, rax
je 0x140023770
bsr rax, rax
cmp eax, 7
jb 0x140023420
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 0x14002365e
mov rcx, qword [0x14057b288]
lea rax, [r9 + 0xfff]
and rax, 0xfffffffffffff000
add rcx, 0xfffffffffffff000
add rax, r8
add rax, rcx
cmp rax, r8
jb 0x14002365e
lea rax, [r8 - 1]
movabs rcx, 0x6fffffffffffffff
cmp rax, rcx
ja 0x14002365e
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.14005a050
mov r15, rax
test rax, rax
je 0x14002365e
cmp r12, r13
mov r8, r13
mov rcx, rax
cmovb r8, r12
mov r12, qword [rsp + 0x68]
mov rdx, r12
call fcn.1401e1740
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.1400390b0
movzx eax, byte [rbp + 0xa60]
lea r8, [rbp + 0xa68]
neg al
mov rdx, r12
sbb ecx, ecx
add ecx, 4
call fcn.140039160
test rsi, rsi
jne 0x140023519
mov r8, r13
mov rdx, r12
mov rcx, rdi
call fcn.140021830
mov esi, dword [rsp + 0x54]
mov rbx, r15
jmp 0x14002369e
cmp r13, 0x1000
ja 0x14002353c
lea rax, [r13 + 7]
shr rax, 3
lea rcx, [0x140000000]
movzx r9d, byte [rax + rcx + 0x374080]
jmp 0x140023547
mov rcx, r13
call fcn.14002b700
mov r9d, eax
cmp r9d, 0x24
jae 0x1400235ad
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 0x1400235fc
mov rax, qword [0x14037a360]
movzx ecx, word [rax + rdx*2]
test cx, cx
jne 0x14002358e
mov rdx, r12
mov rcx, rdi
call fcn.140058a10
mov esi, dword [rsp + 0x54]
mov rbx, r15
jmp 0x14002369e
mov eax, ecx
lea r8, [rbx + 8]
mov ecx, dword [0x14035bccc]
mov rdx, rsi
shr eax, cl
mov rcx, rdi
mov dword [rsp + 0x20], eax
call fcn.14005d9b0
jmp 0x1400235f2
cmp r9d, dword [0x14037a350]
jae 0x140023617
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 0x1400235fc
mov rax, qword [0x14037a360]
lea r8, [rbx + 8]
movzx edx, word [rax + rcx*2]
mov ecx, dword [0x14035bcd8]
shr edx, cl
mov rcx, rdi
mov dword [rsp + 0x20], edx
mov rdx, rsi
call fcn.14005d5b0
movzx eax, word [rbx + 0x1a]
cmp word [rbx + 8], ax
je 0x14002365b
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 0x14002369e
test rdi, rdi
jne 0x140023631
lea rcx, [rbp + 0xc10]
call fcn.14002f160
lea r9, [rbp + 0xc10]
jmp 0x140023638
lea r9, [rdi + 0x1b0]
lea r8, [0x14037a420]
mov qword [rsp + 0x20], r12
mov rdx, rdi
lea rcx, [rbp - 0x10]
call fcn.14002b330
mov rcx, rdi
mov rdx, qword [rax]
call fcn.14005c1a0
mov rbx, r15
mov esi, dword [rsp + 0x54]
jmp 0x14002369e
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.14005a690
mov rbx, rax
test rbx, rbx
je 0x14002302b
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 0x1400236f6
lea rdx, [rbp - 0x70]
mov rcx, rdi
call fcn.1400640e0
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 0x140023745
lea rdx, [rbp - 0x48]
mov rcx, rdi
call fcn.1400640e0
cmp byte [0x14036b1c4], 0
je 0x140023768
cmp r14, r13
jbe 0x140023768
test sil, sil
jne 0x140023768
sub r14, r13
lea rcx, [rbx + r13]
mov rdx, r14
call qword [0x14035b088]
mov rax, rbx
jmp 0x14002302d
call fcn.1401f5dec
int3
lea rcx, str._jemalloc_:_Error_allocating_TSD_n
call fcn.14002ee10
call fcn.1401f5dec
int3
lea rcx, str._jemalloc_:_Error_setting_TSD_n
call fcn.14002ee10
call fcn.1401f5dec
int3
lea rcx, str._jemalloc_:_invalid_tcache_id___u_._n
call fcn.14002db30
call fcn.1401f5dec
int3