Function at 0x41f120
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov eax, dword [0x6e2ee8]
test eax, eax
je 0x41f267
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 [0x6e2f04]
test eax, eax
je 0x41f311
call sym.__pthread_once_raw.constprop.5
mov eax, dword [0x6e2f00]
test eax, eax
je 0x41f2eb
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 [0x6e2ee8]
je 0x41f28d
test eax, eax
je 0x41f337
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 0x41f1ea
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 0x41f38d
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 0x41f228
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push eax
mov eax, dword [0x6e2ee8]
test eax, eax
jne 0x41f252
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 [0x6e2ee8], eax
mov dword [esp], eax
call sym._pthread_mutex_unlock
test eax, eax
je 0x41f21a
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 [0x6e2ee8], eax
jmp 0x41f135
test eax, eax
je 0x41f367
mov dword [esp], eax
call sym._pthread_mutex_unlock
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
test eax, eax
je 0x41f35d
mov esi, dword [ebp + 8]
mov edx, dword [esi + 4]
mov dword [esp], edx
call eax
mov ebx, eax
mov eax, dword [0x6e2ee8]
test eax, eax
je 0x41f401
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 0x41f1c5
call sym.__pthread_cleanup_dest.part.3
jmp 0x41f1c5
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 [0x6e2f00], eax
jmp 0x41f16a
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 [0x6e2f04], eax
jmp 0x41f158
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 [0x6e2ee8], eax
jmp 0x41f1bd
mov ebx, pe_nt_image_headers32
jmp 0x41f2b8
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 [0x6e2ee8], eax
jmp 0x41f295
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 0x41f3bd
mov eax, dword [ebp + 8]
cmp dword [eax + 0xac], 0
jne 0x41f3bd
call sym._push_pthread_mem.part.0
mov eax, dword [0x6e2f00]
test eax, eax
jne 0x41f3e7
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 [0x6e2f00], 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 0x41f228
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 [0x6e2ee8], eax
jmp 0x41f2c5