Function at 0x424580
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov eax, dword [0x49a5f8]
test eax, eax
je 0x4246c7
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 [0x49a614]
test eax, eax
je 0x424771
call sym.__pthread_once_raw.constprop.5
mov eax, dword [0x49a610]
test eax, eax
je 0x42474b
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 [0x49a5f8]
je 0x4246ed
test eax, eax
je 0x424797
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 0x42464a
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 0x4247ed
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 0x424688
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push eax
mov eax, dword [0x49a5f8]
test eax, eax
jne 0x4246b2
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 [0x49a5f8], eax
mov dword [esp], eax
call sym._pthread_mutex_unlock
test eax, eax
je 0x42467a
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 [0x49a5f8], eax
jmp 0x424595
test eax, eax
je 0x4247c7
mov dword [esp], eax
call sym._pthread_mutex_unlock
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
test eax, eax
je 0x4247bd
mov esi, dword [ebp + 8]
mov edx, dword [esi + 4]
mov dword [esp], edx
call eax
mov ebx, eax
mov eax, dword [0x49a5f8]
test eax, eax
je 0x424861
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 0x424625
call sym.__pthread_cleanup_dest.part.3
jmp 0x424625
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 [0x49a610], eax
jmp 0x4245ca
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 [0x49a614], eax
jmp 0x4245b8
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 [0x49a5f8], eax
jmp 0x42461d
mov ebx, pe_nt_image_headers32
jmp 0x424718
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 [0x49a5f8], eax
jmp 0x4246f5
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 0x42481d
mov eax, dword [ebp + 8]
cmp dword [eax + 0xac], 0
jne 0x42481d
call sym._push_pthread_mem.part.0
mov eax, dword [0x49a610]
test eax, eax
jne 0x424847
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 [0x49a610], 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 0x424688
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 [0x49a5f8], eax
jmp 0x424725