Function at 0x418160
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov eax, dword [0x488de8]
test eax, eax
je 0x418375
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 [0x488e04]
test eax, eax
je 0x41839b
cmp dword [eax], 1
je 0x4181a5
call sym.__pthread_once_raw.part.1.constprop.4
mov eax, dword [0x488e00]
test eax, eax
je 0x4183c1
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 [0x488de8]
jne 0x418303
test eax, eax
je 0x418435
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 [0x488de8]
test edx, edx
mov ebx, eax
je 0x41840d
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 0x418318
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 0x418270
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 0x418325
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 0x4182bc
mov dword [esp], 0
call ebx
sub esp, 4
mov eax, dword [0x488de8]
test eax, eax
je 0x4182e0
mov dword [esp], eax
call sym._pthread_mutex_unlock
test eax, eax
je 0x4182b0
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 [0x488de8], eax
jmp 0x4182c5
test eax, eax
je 0x4183e7
mov dword [esp], eax
call sym._pthread_mutex_lock
jmp 0x41824c
call sym.__pthread_cleanup_dest.part.2
lea esi, [esi]
jmp 0x41824c
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 0x418481
mov eax, dword [0x488e00]
test eax, eax
je 0x41845b
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 0x4182a2
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 [0x488de8], eax
jmp 0x418175
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 [0x488e04], eax
jmp 0x41819b
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 [0x488e00], eax
jmp 0x4181b2
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 [0x488de8], eax
jmp 0x41830b
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 [0x488de8], eax
mov edx, eax
jmp 0x418230
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 [0x488de8], eax
jmp 0x418209
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 [0x488e00], eax
jmp 0x41835b
call sym._push_pthread_mem.part.0
jmp 0x41834e