Function at 0x418d2a
Capabilities:
Set thread local storage value

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x28
mov eax, dword [ecx]
mov dword [ebp - 0x1c], eax
call dbg._fpreset
mov eax, dword [0x4f51e0]
test eax, eax
je 0x418f36
cmp dword [eax + 0x30], 0
jne 0x418f55
mov eax, dword [0x4f51e0]
mov dword [eax + 0x30], 0x4e7028
mov eax, 0x4e7028
mov dword [esp], eax
call sym._pthread_mutex_lock
mov eax, dword [ebp - 0x1c]
lea ebx, [eax + 0x1c]
mov dword [esp], ebx
call sym._pthread_mutex_lock
mov eax, dword [0x4f51e0]
test eax, eax
je 0x418f7c
cmp dword [eax + 0x14], 0
jne 0x418f5d
mov eax, dword [0x4f51e0]
mov dword [eax + 0x14], 0x4f51bc
mov eax, 0x4f51bc
cmp dword [eax], 1
je 0x418f72
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4f51e0]
test eax, eax
je 0x418fac
cmp dword [eax + 0x18], 0
jne 0x418f65
mov eax, dword [0x4f51e0]
mov dword [eax + 0x18], 0x4e7030
mov eax, 0x4e7030
mov esi, dword [ebp - 0x1c]
mov dword [esp + 4], esi
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi + 0x3c], eax
mov dword [esp], ebx
call sym._pthread_mutex_unlock
lea eax, [esi + 0x70]
mov dword [esp + 4], 0
mov dword [esp], eax
call sym.__setjmp3
mov edx, dword [0x4f51e0]
test eax, eax
jne 0x418fcd
test edx, edx
je 0x419048
cmp dword [edx + 0x30], 0
jne 0x418ff5
mov dword [edx + 0x30], 0x4e7028
mov eax, 0x4e7028
mov dword [esp], eax
call sym._pthread_mutex_unlock
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 8]
test eax, eax
je 0x41906e
mov edx, dword [edx + 4]
mov dword [esp], edx
call eax
mov ebx, eax
mov eax, dword [0x4f51e0]
test eax, eax
je 0x419021
cmp dword [eax + 0x30], 0
jne 0x419040
mov dword [eax + 0x30], 0x4e7028
mov eax, 0x4e7028
mov dword [esp], eax
call sym._pthread_mutex_lock
mov eax, dword [ebp - 0x1c]
mov dword [eax + 4], ebx
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x418e9e
call sym.__pthread_cleanup_dest.part.0
mov ebx, dword [ebp - 0x1c]
lea esi, [ebx + 0x1c]
mov dword [esp], esi
call sym._pthread_mutex_lock
mov eax, ebx
mov ebx, dword [ebx + 4]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x418ec2
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x14], 0
mov dword [eax + 0x18], 0
je 0x4190b3
mov dword [esp], esi
call sym._pthread_mutex_unlock
mov dword [esp], esi
call sym._pthread_mutex_destroy
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x1c], 0xffffffff
mov dword [eax + 0x68], 1
mov esi, 0x4e7028
mov eax, dword [0x4f51e0]
test eax, eax
je 0x41908f
cmp dword [eax + 0x30], 0
je 0x419081
mov eax, dword [eax + 0x30]
mov dword [esp], eax
call sym._pthread_mutex_unlock
test eax, eax
jne 0x419078
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push eax
jmp 0x418efc
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4f51e0]
cmp dword [edx + 0x30], 0
je 0x418d55
test eax, eax
jne 0x418f55
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x30]
jmp 0x418d66
mov eax, dword [eax + 0x14]
jmp 0x418da4
mov eax, dword [0x4f51e0]
mov eax, dword [eax + 0x18]
jmp 0x418dda
mov eax, dword [0x4f51e0]
jmp 0x418dbf
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4f51e0]
cmp dword [edx + 0x14], 0
je 0x418d93
test eax, eax
jne 0x418f5d
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x14]
cmp dword [eax], 1
jne 0x418dad
jmp 0x418db2
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4f51e0]
cmp dword [edx + 0x18], 0
je 0x418dc9
test eax, eax
jne 0x418f6a
call sym.___shmem3_winpthreads_tdm_init_local_region
jmp 0x418f6a
test edx, edx
je 0x419002
cmp dword [edx + 0x30], 0
jne 0x418ffd
mov eax, dword [0x4f51e0]
mov dword [eax + 0x30], 0x4e7028
mov eax, 0x4e7028
mov dword [esp], eax
call sym._pthread_mutex_lock
jmp 0x418e9e
mov eax, dword [edx + 0x30]
jmp 0x418e3e
mov eax, dword [edx + 0x30]
jmp 0x418fe8
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, dword [0x4f51e0]
cmp dword [eax + 0x30], 0
je 0x418fd7
test edx, edx
jne 0x418ffd
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x30]
jmp 0x418fe8
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4f51e0]
cmp dword [edx + 0x30], 0
je 0x418e75
test eax, eax
jne 0x419040
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x30]
jmp 0x418e81
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, dword [0x4f51e0]
cmp dword [eax + 0x30], 0
je 0x418e32
test edx, edx
jne 0x418ff5
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x30]
jmp 0x418e3e
mov ebx, pe_nt_image_headers32
jmp 0x418e5e
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__endthreadex]
mov dword [eax + 0x30], 0x4e7028
mov eax, esi
jmp 0x418f16
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4f51e0]
cmp dword [edx + 0x30], 0
je 0x419081
test eax, eax
jne 0x418f13
call sym.___shmem3_winpthreads_tdm_init_local_region
jmp 0x418f13
mov edi, dword [ebp - 0x1c]
mov dword [edi], 0xdeadbeef
mov dword [esp], esi
call sym._pthread_mutex_unlock
mov dword [esp], esi
call sym._pthread_mutex_destroy
mov eax, edi
call sym._push_pthread_mem
mov eax, dword [0x4f51e0]
test eax, eax
je 0x419108
cmp dword [eax + 0x18], 0
jne 0x419123
mov dword [eax + 0x18], 0x4e7030
mov eax, 0x4e7030
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 0x418ef7
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4f51e0]
cmp dword [edx + 0x18], 0
je 0x4190e2
test eax, eax
jne 0x419123
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x18]
jmp 0x4190ee