Function at 0x41c6a0
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov eax, dword [0x491eb8]
test eax, eax
je 0x41c7e7
mov dword [esp], eax
call sym._pthread_mutex_lock
mov eax, dword [ebp + 8]
lea ebx, [eax + 0x1c]
mov dword [esp], ebx
call sym._pthread_mutex_lock
mov eax, dword [0x491ed4]
test eax, eax
je 0x41c891
call sym.__pthread_once_raw.constprop.5
mov eax, dword [0x491ed0]
test eax, eax
je 0x41c86b
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]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [ebp + 8]
mov dword [edx + 0x38], eax
mov dword [esp], ebx
call sym._pthread_mutex_unlock
mov eax, dword [ebp + 8]
mov dword [esp + 4], 0
add eax, 0x6c
mov dword [esp], eax
call sym.__setjmp3
test eax, eax
mov eax, dword [0x491eb8]
je 0x41c80d
test eax, eax
je 0x41c8b7
mov dword [esp], eax
call sym._pthread_mutex_lock
mov eax, dword [ebp + 8]
lea ebx, [eax + 0x1c]
mov dword [esp], ebx
call sym._pthread_mutex_lock
mov eax, dword [ebp + 8]
mov esi, dword [eax + 4]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x41c76a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov eax, dword [ebp + 8]
cmp dword [eax + 0x14], 0
mov dword [eax + 0x18], 0
je 0x41c90d
mov dword [esp], ebx
call sym._pthread_mutex_unlock
mov dword [esp], ebx
call sym._pthread_mutex_destroy
mov eax, dword [ebp + 8]
mov dword [eax + 0x64], 1
jmp 0x41c7a8
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push eax
mov eax, dword [0x491eb8]
test eax, eax
jne 0x41c7d2
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 [0x491eb8], eax
mov dword [esp], eax
call sym._pthread_mutex_unlock
test eax, eax
je 0x41c79a
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__endthreadex]
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 [0x491eb8], eax
jmp 0x41c6b5
test eax, eax
je 0x41c8e7
mov dword [esp], eax
call sym._pthread_mutex_unlock
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
test eax, eax
je 0x41c8dd
mov esi, dword [ebp + 8]
mov edx, dword [esi + 4]
mov dword [esp], edx
call eax
mov ebx, eax
mov eax, dword [0x491eb8]
test eax, eax
je 0x41c981
mov dword [esp], eax
call sym._pthread_mutex_lock
mov eax, dword [ebp + 8]
mov dword [eax + 4], ebx
mov eax, dword [eax + 0xb0]
test eax, eax
je 0x41c745
call sym.__pthread_cleanup_dest.part.3
jmp 0x41c745
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 [0x491ed0], eax
jmp 0x41c6ea
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 [0x491ed4], eax
jmp 0x41c6d8
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 [0x491eb8], eax
jmp 0x41c73d
mov ebx, pe_nt_image_headers32
jmp 0x41c838
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 [0x491eb8], eax
jmp 0x41c815
mov eax, dword [ebp + 8]
mov dword [eax], 0xdeadbeef
mov dword [esp], ebx
call sym._pthread_mutex_unlock
mov dword [esp], ebx
call sym._pthread_mutex_destroy
cmp dword [ebp + 8], 0
je 0x41c93d
mov eax, dword [ebp + 8]
cmp dword [eax + 0xac], 0
jne 0x41c93d
call sym._push_pthread_mem.part.0
mov eax, dword [0x491ed0]
test eax, eax
jne 0x41c967
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 [0x491ed0], eax
mov dword [esp + 4], 0
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edx
push edx
jmp 0x41c7a8
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 [0x491eb8], eax
jmp 0x41c845