Function at 0x417770
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov eax, dword [0x488da8]
test eax, eax
je 0x417985
mov dword [esp], eax
call sym._pthread_mutex_lock
mov eax, dword [ebp + 8]
add eax, 0x1c
mov dword [esp], eax
mov dword [ebp - 0xc], eax
call sym._pthread_mutex_lock
mov eax, dword [0x488dc4]
test eax, eax
je 0x4179ab
cmp dword [eax], 1
je 0x4177b5
call sym.__pthread_once_raw.part.1.constprop.4
mov eax, dword [0x488dc0]
test eax, eax
je 0x4179d1
mov ecx, dword [ebp + 8]
mov dword [esp + 4], ecx
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [ebp + 8]
mov dword [edx + 0x44], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._pthread_mutex_unlock
mov eax, dword [ebp + 8]
mov dword [esp + 4], 0
add eax, 0x78
mov dword [esp], eax
call sym.__setjmp3
test eax, eax
mov eax, dword [0x488da8]
jne 0x417913
test eax, eax
je 0x417a45
mov dword [esp], eax
call sym._pthread_mutex_unlock
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [ebp + 8]
call dword [eax + 8]
mov edx, dword [0x488da8]
test edx, edx
mov ebx, eax
je 0x417a1d
mov dword [esp], edx
call sym._pthread_mutex_lock
mov eax, dword [ebp + 8]
mov dword [eax + 4], ebx
mov eax, dword [eax + 0xbc]
test eax, eax
jne 0x417928
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._pthread_mutex_lock
mov eax, dword [ebp + 8]
mov esi, dword [eax + 4]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x417880
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x14]
mov dword [eax + 0x18], 0
test edx, edx
je 0x417935
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
mov dword [eax + 0x70], 1
mov dword [esp], ebx
call sym._pthread_mutex_unlock
mov dword [esp], ebx
call sym._pthread_mutex_destroy
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4178cc
mov dword [esp], 0
call ebx
sub esp, 4
mov eax, dword [0x488da8]
test eax, eax
je 0x4178f0
mov dword [esp], eax
call sym._pthread_mutex_unlock
test eax, eax
je 0x4178c0
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__endthreadex]
lea esi, [esi]
mov dword [esp + 8], sym.___shmem_winpthreads_init_mtx_pthr_locked_shmem
mov dword [esp + 4], 4
mov dword [esp], str.mtx_pthr_locked_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x488da8], eax
jmp 0x4178d5
test eax, eax
je 0x4179f7
mov dword [esp], eax
call sym._pthread_mutex_lock
jmp 0x41785c
call sym.__pthread_cleanup_dest.part.2
lea esi, [esi]
jmp 0x41785c
mov ebx, dword [ebp - 0xc]
mov dword [eax], 0xdeadbeef
mov dword [esp], ebx
call sym._pthread_mutex_unlock
mov dword [esp], ebx
call sym._pthread_mutex_destroy
mov eax, dword [ebp + 8]
cmp dword [eax + 0xb8], 0
je 0x417a91
mov eax, dword [0x488dc0]
test eax, eax
je 0x417a6b
mov dword [esp + 4], 0
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push eax
push eax
jmp 0x4178b2
mov dword [esp + 8], sym.___shmem_winpthreads_init_mtx_pthr_locked_shmem
mov dword [esp + 4], 4
mov dword [esp], str.mtx_pthr_locked_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x488da8], eax
jmp 0x417785
mov dword [esp + 8], 0
mov dword [esp + 4], 4
mov dword [esp], str._pthread_tls_once_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x488dc4], eax
jmp 0x4177ab
mov dword [esp + 8], sym.___shmem_winpthreads_init__pthread_tls_shmem
mov dword [esp + 4], 4
mov dword [esp], str._pthread_tls_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x488dc0], eax
jmp 0x4177c2
mov dword [esp + 8], sym.___shmem_winpthreads_init_mtx_pthr_locked_shmem
mov dword [esp + 4], 4
mov dword [esp], str.mtx_pthr_locked_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x488da8], eax
jmp 0x41791b
mov dword [esp + 8], sym.___shmem_winpthreads_init_mtx_pthr_locked_shmem
mov dword [esp + 4], 4
mov dword [esp], str.mtx_pthr_locked_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x488da8], eax
mov edx, eax
jmp 0x417840
mov dword [esp + 8], sym.___shmem_winpthreads_init_mtx_pthr_locked_shmem
mov dword [esp + 4], 4
mov dword [esp], str.mtx_pthr_locked_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x488da8], eax
jmp 0x417819
mov dword [esp + 8], sym.___shmem_winpthreads_init__pthread_tls_shmem
mov dword [esp + 4], 4
mov dword [esp], str._pthread_tls_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x488dc0], eax
jmp 0x41796b
call sym._push_pthread_mem.part.0
jmp 0x41795e