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

Disassembly:
push rbp
push rsi
lea rbp, [rsp - 0xa18]
sub rsp, 0xb18
mov rax, qword [0x1403e4f00]
xor rax, rsp
mov qword [rbp + 0x9f8], rax
mov rsi, rcx
mov eax, 1
lock xadd qword [0x1403e7a50], rax
mov ecx, dword [0x1403dd070]
test ecx, ecx
jne 0x140018997
lea edx, [rcx + 1]
mov r9b, 1
mov rcx, rsi
mov r8d, 0x100
call fcn.140017dd0
jmp 0x140018f6e
cmp ecx, 1
jne 0x140018f87
mov qword [rsp + 0xb38], rbx
mov qword [rsp + 0xb40], 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 0x140018cd5
mov ecx, 0xa50
call fcn.140026730
mov rdi, rax
test rax, rax
je 0x140018f97
xorps xmm0, xmm0
mov byte [rax], bl
xor eax, eax
mov word [rbp - 0x70], bx
xor edx, edx
mov dword [rbp + 0x52], eax
mov r8d, 0xb0
mov word [rbp + 0x56], ax
lea rcx, [rbp + 0x90]
mov qword [rbp + 0x60], rax
mov byte [rbp + 0x68], al
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 qword [rbp + 8], rbx
mov qword [rbp + 0x10], rbx
mov qword [rbp + 0x18], rbx
mov qword [rbp + 0x20], rbx
mov dword [rbp + 0x28], 0x3e8
mov dword [rbp + 0x2c], 0x3e8
mov word [rbp + 0x30], 0xffff
movups xmmword [rbp + 0x32], xmm0
mov qword [rbp + 0x58], rbx
movups xmmword [rbp + 0x42], xmm0
mov qword [rbp + 0x70], rbx
mov qword [rbp + 0x78], rbx
mov qword [rbp + 0x80], rbx
mov qword [rbp + 0x88], rbx
call fcn.14027e650
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
mov qword [rbp + 0x268], rbx
mov qword [rbp + 0x270], 1
mov qword [rbp + 0x278], rbx
mov qword [rbp + 0x280], 1
xor eax, eax
mov qword [rbp + 0x288], rbx
xor edx, edx
mov dword [rbp + 0x2c1], eax
mov r8d, 0x6d8
mov word [rbp + 0x2c5], ax
lea rcx, [rbp + 0x2f0]
mov byte [rbp + 0x2c7], al
mov qword [rbp + 0x290], 1
mov qword [rbp + 0x298], rbx
mov qword [rbp + 0x2a0], 1
mov qword [rbp + 0x2a8], rbx
mov qword [rbp + 0x2b0], 1
mov qword [rbp + 0x2b8], rbx
mov byte [rbp + 0x2c0], 6
mov qword [rbp + 0x2c8], rbx
mov qword [rbp + 0x2d0], rbx
mov qword [rbp + 0x2d8], rbx
mov qword [rbp + 0x2e0], rbx
mov qword [rbp + 0x2e8], rbx
call fcn.14027e650
lea rcx, [rdi + 8]
mov qword [rbp + 0x9c8], rbx
lea rdx, [rbp - 0x70]
mov byte [rbp + 0x9d0], 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 0x140018fa9
mov qword [rsp + 0xb48], r12
add rdi, 8
mov qword [rsp + 0xb10], r13
mov qword [rsp + 0xb08], r14
mov qword [rsp + 0xb00], r15
cmp byte [rdi + 0x330], bl
je 0x140018d0e
xor edx, edx
mov rcx, rdi
call fcn.140026d50
mov rdi, rax
cmp byte [rdi + 1], bl
jne 0x140018d1e
cmp byte [rdi], bl
je 0x140018d1e
lea rbx, [rdi + 0x358]
xorps xmm0, xmm0
mov qword [rbp + 0x9e0], rsi
lea r8, [rbp + 0x9e0]
mov rdx, rsi
mov ecx, 3
movups xmmword [rbp + 0x9e8], xmm0
call fcn.14002eef0
lea r9, [rdi + 0x1b0]
mov qword [rsp + 0x20], rsi
lea r8, [0x1403f6a60]
mov rdx, rdi
lea rcx, [rsp + 0x68]
call fcn.1400202f0
lea r13, [0x1403f01c0]
movsd xmm0, qword [rax]
mov r14d, dword [rax + 8]
movsd qword [rsp + 0x58], xmm0
mov r12d, dword [rsp + 0x58]
shr r14d, 8
cmp byte [0x1403e7a45], 0
mov r13, qword [r13 + r12*8]
je 0x140018d9b
mov rdx, r13
mov rcx, rsi
call qword [0x1403dd060]
test rbx, rbx
jne 0x140018db0
mov rdx, rsi
mov rcx, rdi
call fcn.140016760
jmp 0x140018ee6
test r14b, r14b
je 0x140018e46
lea rax, [r12 + r12*2]
lea r14, [rbx + rax*8]
movzx eax, word [rbx + rax*8 + 0x1a]
cmp word [r14 + 8], ax
je 0x140018de1
mov rax, qword [r14 + 8]
sub rax, 8
mov qword [r14 + 8], rax
mov qword [rax], rsi
jmp 0x140018ee6
mov rax, qword [0x1403f69b0]
movzx ecx, word [rax + r12*2]
test cx, cx
jne 0x140018e02
mov rdx, rsi
mov rcx, rdi
call fcn.14004e790
jmp 0x140018ee6
mov eax, ecx
lea r8, [r14 + 8]
mov ecx, dword [0x1403ddcac]
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 0x140018ee6
mov rax, qword [r14 + 8]
sub rax, 8
mov qword [r14 + 8], rax
mov qword [rax], rsi
jmp 0x140018ee6
cmp r12d, dword [0x1403f69a0]
jae 0x140018ebb
lea rax, [r12 + r12*2]
lea r14, [rbx + rax*8]
movzx eax, word [rbx + rax*8 + 0x1a]
cmp word [r14 + 8], ax
je 0x140018e74
mov rax, qword [r14 + 8]
sub rax, 8
mov qword [r14 + 8], rax
mov qword [rax], rsi
jmp 0x140018ee6
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 0x140018ee6
mov rax, qword [r14 + 8]
sub rax, 8
mov qword [r14 + 8], rax
mov qword [rax], rsi
jmp 0x140018ee6
lea r9, [rdi + 0x1b0]
mov qword [rsp + 0x20], rsi
lea r8, [0x1403f6a60]
mov rdx, rdi
lea rcx, [rsp + 0x78]
call fcn.1400204b0
mov rcx, rdi
mov rdx, qword [rax]
call fcn.140051f20
mov r15, qword [rsp + 0xb00]
lea rcx, [rdi + 0x348]
mov r14, qword [rsp + 0xb08]
lea rax, [rdi + 0x18]
mov r12, qword [rsp + 0xb48]
mov qword [rsp + 0x40], rax
lea rax, [rdi + 0x20]
mov qword [rsp + 0x48], rax
lea rax, [rdi + 0x350]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x38], rcx
mov byte [rsp + 0x30], 0
mov rdx, qword [rcx]
lea rax, [rdx + r13]
mov qword [rcx], rax
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax]
sub rcx, rdx
cmp r13, rcx
mov r13, qword [rsp + 0xb10]
jb 0x140018f5c
lea rdx, [rsp + 0x30]
mov rcx, rdi
call fcn.140059e70
mov rbx, qword [rsp + 0xb38]
xor eax, eax
mov rdi, qword [rsp + 0xb40]
mov rcx, qword [rbp + 0x9f8]
xor rcx, rsp
call fcn.140249860
add rsp, 0xb18
pop rsi
pop rbp
ret
lea rcx, str.Called_realloc_non_null_ptr__0__with_zero_realloc:abort_set_n
call fcn.140059dd0
xor eax, eax
jmp 0x140018f6e
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