Function at 0x41ba50
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov eax, dword [0x494e28]
test eax, eax
je 0x41bb97
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 [0x494e44]
test eax, eax
je 0x41bc41
call sym.__pthread_once_raw.constprop.5
mov eax, dword [0x494e40]
test eax, eax
je 0x41bc1b
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 [0x494e28]
je 0x41bbbd
test eax, eax
je 0x41bc67
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 0x41bb1a
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 0x41bcbd
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 0x41bb58
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push eax
mov eax, dword [0x494e28]
test eax, eax
jne 0x41bb82
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 [0x494e28], eax
mov dword [esp], eax
call sym._pthread_mutex_unlock
test eax, eax
je 0x41bb4a
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 [0x494e28], eax
jmp 0x41ba65
test eax, eax
je 0x41bc97
mov dword [esp], eax
call sym._pthread_mutex_unlock
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
test eax, eax
je 0x41bc8d
mov esi, dword [ebp + 8]
mov edx, dword [esi + 4]
mov dword [esp], edx
call eax
mov ebx, eax
mov eax, dword [0x494e28]
test eax, eax
je 0x41bd31
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 0x41baf5
call sym.__pthread_cleanup_dest.part.3
jmp 0x41baf5
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 [0x494e40], eax
jmp 0x41ba9a
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 [0x494e44], eax
jmp 0x41ba88
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 [0x494e28], eax
jmp 0x41baed
mov ebx, pe_nt_image_headers32
jmp 0x41bbe8
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 [0x494e28], eax
jmp 0x41bbc5
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 0x41bced
mov eax, dword [ebp + 8]
cmp dword [eax + 0xac], 0
jne 0x41bced
call sym._push_pthread_mem.part.0
mov eax, dword [0x494e40]
test eax, eax
jne 0x41bd17
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 [0x494e40], 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 0x41bb58
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 [0x494e28], eax
jmp 0x41bbf5