Function at 0x4176c0
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 [0x0049d3d8]
test rcx, rcx
je 0x4178cf
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 [0x0049d410]
test rcx, rcx
je 0x4178f6
cmp dword [rcx], 1
je 0x417714
call sym._pthread_once_raw.part.1.constprop.4
mov rax, qword [0x0049d408]
test rax, rax
je 0x417919
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 0x41785d
mov rcx, qword [0x0049d3d8]
test rcx, rcx
je 0x41798b
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 [0x0049d3d8]
test rcx, rcx
je 0x417964
call sym.pthread_mutex_lock
mov rax, qword [rbp - 8]
mov rcx, qword [rax + 0x1d8]
mov qword [rax + 8], rbx
test rcx, rcx
jne 0x417877
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 0x4177ce
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp - 8]
cmp qword [rax + 0x28], 0
mov qword [rax + 0x30], 0
je 0x417885
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 0x417824
xor ecx, ecx
call rbx
mov rcx, qword [0x0049d3d8]
test rcx, rcx
je 0x417841
call sym.pthread_mutex_unlock
test eax, eax
je 0x417820
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 [0x0049d3d8], rax
mov rcx, rax
jmp 0x417830
mov rcx, qword [0x0049d3d8]
test rcx, rcx
je 0x41793d
call sym.pthread_mutex_lock
jmp 0x4177ae
call sym._pthread_cleanup_dest.part.2
nop dword [rax]
jmp 0x4177ae
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 0x4179d6
mov rax, qword [0x0049d408]
test rax, rax
je 0x4179b2
xor edx, edx
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x417807
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 [0x0049d3d8], rax
mov rcx, rax
jmp 0x4176e1
lea rcx, str._pthread_tls_once_shmem
xor r8d, r8d
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x0049d410], rax
mov rcx, rax
jmp 0x41770a
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 [0x0049d408], rax
jmp 0x417724
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 [0x0049d3d8], rax
mov rcx, rax
jmp 0x41786d
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 [0x0049d3d8], rax
mov rcx, rax
jmp 0x417791
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 [0x0049d3d8], rax
mov rcx, rax
jmp 0x41776c
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 [0x0049d408], rax
jmp 0x4178c0
mov rcx, qword [rbp - 8]
call sym.push_pthread_mem.part.0
jmp 0x4178b0