Function at 0x140023b90
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 [0x140577180]
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 0x140023c8b
lea r8, [rsi + 8]
test r8, r8
je 0x140023c8b
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 0x140023c8b
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 0x140023c8b
mov r9d, r9d
lea rax, [0x14036f940]
mov rdx, qword [rax + r9*8]
add rdx, qword [r8 + 0x348]
cmp rdx, qword [r8 + 0x350]
jae 0x140023c8b
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 0x140023c8b
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 0x140023cb0
test rcx, rcx
je 0x140024469
mov r11, rsp
push rbp
push rsi
lea rbp, [r11 - 0xa18]
sub rsp, 0xb08
mov rax, qword [0x14035e2b0]
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 [0x140577180]
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 0x140024007
mov ecx, 0xa50
call fcn.1400306e0
mov rdi, rax
test rax, rax
je 0x14002446a
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.1401e1b90
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.1401e1b90
lea rcx, [rdi + 8]
mov qword [rbp + 0x9a8], rbx
lea rdx, [rsp + 0x70]
mov byte [rbp + 0x9b0], bl
mov r8d, 0xa48
call fcn.1401e14e0
mov ecx, dword [0x140577180]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x14002447c
add rdi, 8
cmp byte [rdi + 0x330], bl
je 0x140024020
mov dl, 1
mov rcx, rdi
call fcn.140030d00
mov rdi, rax
mov qword [rsp + 0xb00], r13
mov qword [rsp + 0xaf8], r14
mov qword [rsp + 0xaf0], r15
cmp byte [rdi + 0x330], bl
jne 0x1400241ee
lea r9, [rdi + 0x1b0]
mov qword [rsp + 0x20], rsi
lea r8, [0x140376320]
mov rdx, rdi
lea rcx, [rsp + 0x40]
lea r14, [rdi + 0x358]
call fcn.14002aed0
lea r13, [0x14036f940]
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 0x1400240a1
mov rdx, rsi
mov rcx, rdi
call fcn.140021330
jmp 0x140024189
test dl, dl
je 0x1400240fd
lea rax, [r9 + r9*2]
lea rbx, [r14 + rax*8]
movzx eax, word [r14 + rax*8 + 0x1a]
cmp word [rbx + 8], ax
jne 0x14002414b
mov rax, qword [0x140376270]
movzx edx, word [rax + r9*2]
test dx, dx
jne 0x1400240de
mov rdx, rsi
mov rcx, rdi
call fcn.140058770
jmp 0x140024189
mov ecx, dword [0x140357ccc]
lea r8, [rbx + 8]
mov eax, edx
mov rdx, r14
shr eax, cl
mov rcx, rdi
mov dword [rsp + 0x20], eax
call fcn.14005d710
jmp 0x140024141
cmp r9d, dword [0x140376260]
jae 0x14002415c
lea rax, [r9 + r9*2]
lea rbx, [r14 + rax*8]
movzx eax, word [r14 + rax*8 + 0x1a]
cmp word [rbx + 8], ax
jne 0x14002414b
mov ecx, dword [0x140357cd8]
lea r8, [rbx + 8]
mov rax, qword [0x140376270]
movzx edx, word [rax + r9*2]
shr edx, cl
mov rcx, rdi
mov dword [rsp + 0x20], edx
mov rdx, r14
call fcn.14005d310
movzx eax, word [rbx + 0x1a]
cmp word [rbx + 8], ax
je 0x140024189
mov rax, qword [rbx + 8]
sub rax, 8
mov qword [rbx + 8], rax
mov qword [rax], rsi
jmp 0x140024189
lea r9, [rdi + 0x1b0]
mov qword [rsp + 0x20], rsi
lea r8, [0x140376320]
mov rdx, rdi
lea rcx, [rbp + 0x9c0]
call fcn.14002b090
mov rcx, rdi
mov rdx, qword [rax]
call fcn.14005bf00
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 0x140024429
lea rdx, [rbp + 0x9c0]
jmp 0x140024421
mov qword [rsp + 0xb38], r12
cmp byte [rdi + 1], bl
jne 0x140024206
cmp byte [rdi], bl
je 0x140024206
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.140038ec0
lea r9, [rdi + 0x1b0]
mov qword [rsp + 0x20], rsi
lea r8, [0x140376320]
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.14002aed0
lea r13, [0x14036f940]
movsd xmm0, qword [rax]
mov r14d, dword [rax + 8]
movsd qword [rsp + 0x30], xmm0
mov r12d, dword [rsp + 0x30]
shr r14d, 8
cmp byte [0x1403671c5], 0
mov r13, qword [r13 + r12*8]
je 0x140024280
mov rdx, r13
mov rcx, rsi
call qword [0x140357080]
test rbx, rbx
jne 0x140024295
mov rdx, rsi
mov rcx, rdi
call fcn.140021330
jmp 0x1400243cb
test r14b, r14b
je 0x14002432b
lea rax, [r12 + r12*2]
lea r14, [rbx + rax*8]
movzx eax, word [rbx + rax*8 + 0x1a]
cmp word [r14 + 8], ax
je 0x1400242c6
mov rax, qword [r14 + 8]
sub rax, 8
mov qword [r14 + 8], rax
mov qword [rax], rsi
jmp 0x1400243cb
mov rax, qword [0x140376270]
movzx edx, word [rax + r12*2]
test dx, dx
jne 0x1400242e7
mov rdx, rsi
mov rcx, rdi
call fcn.140058770
jmp 0x1400243cb
mov ecx, dword [0x140357ccc]
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.14005d710
movzx eax, word [r14 + 0x1a]
cmp word [r14 + 8], ax
je 0x1400243cb
mov rax, qword [r14 + 8]
sub rax, 8
mov qword [r14 + 8], rax
mov qword [rax], rsi
jmp 0x1400243cb
cmp r12d, dword [0x140376260]
jae 0x1400243a0
lea rax, [r12 + r12*2]
lea r14, [rbx + rax*8]
movzx eax, word [rbx + rax*8 + 0x1a]
cmp word [r14 + 8], ax
je 0x140024359
mov rax, qword [r14 + 8]
sub rax, 8
mov qword [r14 + 8], rax
mov qword [rax], rsi
jmp 0x1400243cb
mov ecx, dword [0x140357cd8]
lea r8, [r14 + 8]
mov rax, qword [0x140376270]
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.14005d310
movzx eax, word [r14 + 0x1a]
cmp word [r14 + 8], ax
je 0x1400243cb
mov rax, qword [r14 + 8]
sub rax, 8
mov qword [r14 + 8], rax
mov qword [rax], rsi
jmp 0x1400243cb
lea r9, [rdi + 0x1b0]
mov qword [rsp + 0x20], rsi
lea r8, [0x140376320]
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.14002b090
mov rcx, rdi
mov rdx, qword [rax]
call fcn.14005bf00
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 0x140024429
lea rdx, [rsp + 0x40]
mov rcx, rdi
call fcn.140063e40
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.1401dee10
add rsp, 0xb08
pop rsi
pop rbp
ret
lea rcx, str._jemalloc_:_Error_allocating_TSD_n
call fcn.14002eb70
call fcn.1401f3454
int3
lea rcx, str._jemalloc_:_Error_setting_TSD_n
call fcn.14002eb70
call fcn.1401f3454
int3