Function at 0x412b90
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov eax, dword [0x41f0a0]
test eax, eax
je 0x412dbc
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 [0x41f0bc]
test eax, eax
je 0x412e58
cmp dword [eax], 1
je 0x412bd2
call sym.__pthread_once_raw.part.1.constprop.5
mov eax, dword [0x41f0b8]
test eax, eax
je 0x412de2
mov ecx, dword [ebp + 8]
mov dword [esp + 4], ecx
mov eax, dword [eax]
mov dword [esp], eax
call sym._TlsSetValue_8
sub esp, 8
call sym._GetCurrentThreadId_0
mov edx, dword [ebp + 8]
mov dword [edx + 0x38], eax
mov dword [esp], ebx
call sym._pthread_mutex_unlock
mov eax, dword [ebp + 8]
add eax, 0x6c
mov dword [esp], eax
call sym.__setjmp
test eax, eax
mov eax, dword [0x41f0a0]
jne 0x412d32
test eax, eax
je 0x412d4d
mov dword [esp], eax
mov ebx, pe_nt_image_headers32
call sym._pthread_mutex_unlock
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
test eax, eax
je 0x412c4d
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
mov dword [esp], edx
call eax
mov ebx, eax
mov eax, dword [0x41f0a0]
test eax, eax
je 0x412d96
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
jne 0x412d43
mov eax, dword [ebp + 8]
lea esi, [eax + 0x1c]
mov dword [esp], esi
call sym._pthread_mutex_lock
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 4]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x412c9c
mov dword [esp], eax
call sym._CloseHandle_4
sub esp, 4
mov eax, dword [ebp + 8]
mov dword [eax + 0x18], 0
mov eax, dword [eax + 0x14]
test eax, eax
je 0x412e08
mov dword [esp], esi
call sym._pthread_mutex_unlock
mov dword [esp], esi
call sym._pthread_mutex_destroy
mov eax, dword [ebp + 8]
mov dword [eax + 0x64], 1
jmp 0x412ceb
mov dword [esp], eax
call sym._pthread_mutex_unlock
test eax, eax
jne 0x412d21
mov dword [esp], 0
call sym._Sleep_4
sub esp, 4
mov eax, dword [0x41f0a0]
test eax, eax
jne 0x412cd0
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 [esp], eax
mov dword [0x41f0a0], eax
call sym._pthread_mutex_unlock
test eax, eax
je 0x412cdc
mov dword [esp], ebx
call sym.__endthreadex
lea esp, [ebp - 8]
mov eax, ebx
pop ebx
pop esi
pop ebp
ret
test eax, eax
je 0x412d73
mov dword [esp], eax
call sym._pthread_mutex_lock
jmp 0x412c76
call sym.__pthread_cleanup_dest.part.3
jmp 0x412c76
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 [0x41f0a0], eax
jmp 0x412c29
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 [0x41f0a0], eax
jmp 0x412d36
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 [0x41f0a0], eax
jmp 0x412c5a
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 [0x41f0a0], eax
jmp 0x412ba5
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 [0x41f0b8], eax
jmp 0x412bdf
mov eax, dword [ebp + 8]
mov dword [eax], 0xdeadbeef
mov dword [esp], esi
call sym._pthread_mutex_unlock
mov dword [esp], esi
call sym._pthread_mutex_destroy
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x412e35
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0xac]
test edx, edx
je 0x412ea1
mov eax, dword [0x41f0b8]
test eax, eax
je 0x412e7e
mov dword [esp + 4], 0
mov eax, dword [eax]
mov dword [esp], eax
call sym._TlsSetValue_8
sub esp, 8
jmp 0x412ceb
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 [0x41f0bc], eax
jmp 0x412bc8
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 [0x41f0b8], eax
jmp 0x412e3e
call sym._push_pthread_mem.part.0
jmp 0x412e35