Function at 0x417e40
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push r12
push rdi
push rsi
push rbx
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp - 8], rcx
mov rcx, qword [0x0049d438]
test rcx, rcx
je 0x41804f
call sym.pthread_mutex_lock
mov rax, qword [rbp - 8]
add rax, 0x38
mov rcx, rax
mov qword [rbp - 0x10], rax
call sym.pthread_mutex_lock
mov rcx, qword [0x0049d470]
test rcx, rcx
je 0x418076
cmp dword [rcx], 1
je 0x417e94
call sym._pthread_once_raw.part.1.constprop.4
mov rax, qword [0x0049d468]
test rax, rax
je 0x418099
mov rdi, qword [rbp - 8]
mov ecx, dword [rax]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rcx, qword [rbp - 0x10]
mov dword [rdi + 0x70], eax
call sym.pthread_mutex_unlock
lea rcx, [rdi + 0xd0]
mov rdx, rbp
call sym._setjmp
test eax, eax
jne 0x417fdd
mov rcx, qword [0x0049d438]
test rcx, rcx
je 0x41810b
call sym.pthread_mutex_unlock
mov rax, qword [rbp - 8]
mov rcx, qword [rax + 8]
call qword [rax + 0x10]
mov rbx, rax
nop
nop
mov rcx, qword [0x0049d438]
test rcx, rcx
je 0x4180e4
call sym.pthread_mutex_lock
mov rax, qword [rbp - 8]
mov rcx, qword [rax + 0x1d8]
mov qword [rax + 8], rbx
test rcx, rcx
jne 0x417ff7
mov rcx, qword [rbp - 0x10]
call sym.pthread_mutex_lock
mov rax, qword [rbp - 8]
mov rcx, qword [rax + 0x30]
mov rsi, qword [rax + 8]
test rcx, rcx
je 0x417f4e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp - 8]
cmp qword [rax + 0x28], 0
mov qword [rax + 0x30], 0
je 0x418005
mov rdi, qword [rbp - 0x10]
mov rax, qword [rbp - 8]
mov rcx, rdi
mov dword [rax + 0xbc], 1
call sym.pthread_mutex_unlock
mov rcx, rdi
call sym.pthread_mutex_destroy
lea r12, [sym.__shmem_winpthreads_init_mtx_pthr_locked_shmem]
lea rdi, str.mtx_pthr_locked_shmem
mov rbx, qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x417fa4
xor ecx, ecx
call rbx
mov rcx, qword [0x0049d438]
test rcx, rcx
je 0x417fc1
call sym.pthread_mutex_unlock
test eax, eax
je 0x417fa0
mov ecx, esi
call qword [sym.imp.msvcrt.dll__endthreadex]
mov rcx, rdi
mov r8, r12
mov edx, 8
call sym.__shmem_winpthreads_grab
mov qword [0x0049d438], rax
mov rcx, rax
jmp 0x417fb0
mov rcx, qword [0x0049d438]
test rcx, rcx
je 0x4180bd
call sym.pthread_mutex_lock
jmp 0x417f2e
call sym._pthread_cleanup_dest.part.2
nop dword [rax]
jmp 0x417f2e
mov rdi, qword [rbp - 0x10]
mov dword [rax], 0xdeadbeef
mov rbx, rax
mov rcx, rdi
call sym.pthread_mutex_unlock
mov rcx, rdi
call sym.pthread_mutex_destroy
cmp qword [rbx + 0x1d0], 0
je 0x418156
mov rax, qword [0x0049d468]
test rax, rax
je 0x418132
xor edx, edx
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x417f87
lea rcx, str.mtx_pthr_locked_shmem
lea r8, [sym.__shmem_winpthreads_init_mtx_pthr_locked_shmem]
mov edx, 8
call sym.__shmem_winpthreads_grab
mov qword [0x0049d438], rax
mov rcx, rax
jmp 0x417e61
lea rcx, str._pthread_tls_once_shmem
xor r8d, r8d
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x0049d470], rax
mov rcx, rax
jmp 0x417e8a
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x0049d468], rax
jmp 0x417ea4
lea rcx, str.mtx_pthr_locked_shmem
lea r8, [sym.__shmem_winpthreads_init_mtx_pthr_locked_shmem]
mov edx, 8
call sym.__shmem_winpthreads_grab
mov qword [0x0049d438], rax
mov rcx, rax
jmp 0x417fed
lea rcx, str.mtx_pthr_locked_shmem
lea r8, [sym.__shmem_winpthreads_init_mtx_pthr_locked_shmem]
mov edx, 8
call sym.__shmem_winpthreads_grab
mov qword [0x0049d438], rax
mov rcx, rax
jmp 0x417f11
lea rcx, str.mtx_pthr_locked_shmem
lea r8, [sym.__shmem_winpthreads_init_mtx_pthr_locked_shmem]
mov edx, 8
call sym.__shmem_winpthreads_grab
mov qword [0x0049d438], rax
mov rcx, rax
jmp 0x417eec
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x0049d468], rax
jmp 0x418040
mov rcx, qword [rbp - 8]
call sym.push_pthread_mem.part.0
jmp 0x418030