Function at 0x41cbf0
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov eax, dword [0x49ae28]
test eax, eax
je 0x41cd37
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 [0x49ae44]
test eax, eax
je 0x41cde1
call sym.__pthread_once_raw.constprop.5
mov eax, dword [0x49ae40]
test eax, eax
je 0x41cdbb
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 [0x49ae28]
je 0x41cd5d
test eax, eax
je 0x41ce07
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 0x41ccba
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 0x41ce5d
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 0x41ccf8
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push eax
mov eax, dword [0x49ae28]
test eax, eax
jne 0x41cd22
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 [0x49ae28], eax
mov dword [esp], eax
call sym._pthread_mutex_unlock
test eax, eax
je 0x41ccea
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 [0x49ae28], eax
jmp 0x41cc05
test eax, eax
je 0x41ce37
mov dword [esp], eax
call sym._pthread_mutex_unlock
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
test eax, eax
je 0x41ce2d
mov esi, dword [ebp + 8]
mov edx, dword [esi + 4]
mov dword [esp], edx
call eax
mov ebx, eax
mov eax, dword [0x49ae28]
test eax, eax
je 0x41ced1
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 0x41cc95
call sym.__pthread_cleanup_dest.part.3
jmp 0x41cc95
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 [0x49ae40], eax
jmp 0x41cc3a
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 [0x49ae44], eax
jmp 0x41cc28
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 [0x49ae28], eax
jmp 0x41cc8d
mov ebx, pe_nt_image_headers32
jmp 0x41cd88
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 [0x49ae28], eax
jmp 0x41cd65
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 0x41ce8d
mov eax, dword [ebp + 8]
cmp dword [eax + 0xac], 0
jne 0x41ce8d
call sym._push_pthread_mem.part.0
mov eax, dword [0x49ae40]
test eax, eax
jne 0x41ceb7
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 [0x49ae40], 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 0x41ccf8
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 [0x49ae28], eax
jmp 0x41cd95