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

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov rsi, qword [0x14017ebe0]
mov rax, qword [rsi]
test rax, rax
je 0x1400a3f10
cmp qword [rax + 0x28], 0
jne 0x1400a3ef8
lea rcx, [0x140210a58]
cmp dword [rcx], 1
mov qword [rax + 0x28], rcx
je 0x1400a3f05
call sym._pthread_once_raw.part.0.constprop.0.isra.0
mov rax, qword [rsi]
test rax, rax
je 0x1400a3da0
cmp qword [rax + 0x30], 0
jne 0x1400a3dc0
lea rdx, [0x1400c1b48]
mov qword [rax + 0x30], rdx
mov rax, rdx
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x1400a3dd4
mov rax, r12
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call sym.__shmem3_winpthreads_tdm_init_local_region
cmp qword [rax + 0x30], 0
mov rax, qword [rsi]
je 0x1400a3d70
test rax, rax
jne 0x1400a3dc0
call sym.__shmem3_winpthreads_tdm_init_local_region
nop dword [rax]
mov rax, qword [rax + 0x30]
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
jne 0x1400a3d8e
call sym.pop_pthread_mem
cmp qword [sym.__dyn_tls_pthread], 0
mov rbx, rax
je 0x1400a3d8e
test rax, rax
je 0x1400a3d8e
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ecx, ecx
xor r9d, r9d
xor r8d, r8d
mov dword [rbx + 0x70], eax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call sym.pthread_spin_destroy
cmp eax, 1
je 0x1400a3f7d
mov rbp, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x68], 0xffffffffffffffff
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rbp
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r12, rax
call rbp
mov dword [rsp + 0x30], 2
mov r8, rdi
mov rdx, r12
mov dword [rsp + 0x28], 0
mov rcx, rax
lea r9, [rbx + 0x28]
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je sym.__pthread_self_lite.cold
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [rbx + 0xbc], 0
mov dword [rbx + 0xc0], eax
movzx eax, byte [rbx + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
mov rax, qword [rsi]
test rax, rax
je 0x1400a3f58
cmp qword [rax + 0x30], 0
je 0x1400a3f40
mov rax, qword [rax + 0x30]
mov ecx, dword [rax]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je sym.__pthread_self_lite.cold
mov r12, rbx
mov rax, r12
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rax + 0x28]
cmp dword [rcx], 1
jne 0x1400a3d5c
mov rax, qword [rsi]
jmp 0x1400a3d69
call sym.__shmem3_winpthreads_tdm_init_local_region
cmp qword [rax + 0x28], 0
mov rax, qword [rsi]
je 0x1400a3d48
test rax, rax
jne 0x1400a3ef8
call sym.__shmem3_winpthreads_tdm_init_local_region
mov rcx, qword [rax + 0x28]
cmp dword [rcx], 1
jne 0x1400a3d5c
jmp 0x1400a3d61
lea rdx, [0x1400c1b48]
mov qword [rax + 0x30], rdx
mov rax, rdx
jmp 0x1400a3ece
call sym.__shmem3_winpthreads_tdm_init_local_region
mov r8, rax
mov rax, qword [rsi]
cmp qword [r8 + 0x30], 0
je 0x1400a3f40
test rax, rax
jne 0x1400a3eca
call sym.__shmem3_winpthreads_tdm_init_local_region
jmp 0x1400a3eca
call sym.replace_spin_keys.part.0
nop word cs:[rax + rax]
nop dword [rax]