Function at 0x41122a
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 [0x4dd1e0]
test eax, eax
je 0x411436
cmp dword [eax + 0x30], 0
jne 0x411455
mov eax, dword [0x4dd1e0]
mov dword [eax + 0x30], 0x4d0028
mov eax, 0x4d0028
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 [0x4dd1e0]
test eax, eax
je 0x41147c
cmp dword [eax + 0x14], 0
jne 0x41145d
mov eax, dword [0x4dd1e0]
mov dword [eax + 0x14], 0x4dd1bc
mov eax, 0x4dd1bc
cmp dword [eax], 1
je 0x411472
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4dd1e0]
test eax, eax
je 0x4114ac
cmp dword [eax + 0x18], 0
jne 0x411465
mov eax, dword [0x4dd1e0]
mov dword [eax + 0x18], 0x4d0030
mov eax, 0x4d0030
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 [0x4dd1e0]
test eax, eax
jne 0x4114cd
test edx, edx
je 0x411548
cmp dword [edx + 0x30], 0
jne 0x4114f5
mov dword [edx + 0x30], 0x4d0028
mov eax, 0x4d0028
mov dword [esp], eax
call sym._pthread_mutex_unlock
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 8]
test eax, eax
je 0x41156e
mov edx, dword [edx + 4]
mov dword [esp], edx
call eax
mov ebx, eax
mov eax, dword [0x4dd1e0]
test eax, eax
je 0x411521
cmp dword [eax + 0x30], 0
jne 0x411540
mov dword [eax + 0x30], 0x4d0028
mov eax, 0x4d0028
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 0x41139e
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 0x4113c2
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 0x4115b3
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, 0x4d0028
mov eax, dword [0x4dd1e0]
test eax, eax
je 0x41158f
cmp dword [eax + 0x30], 0
je 0x411581
mov eax, dword [eax + 0x30]
mov dword [esp], eax
call sym._pthread_mutex_unlock
test eax, eax
jne 0x411578
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push eax
jmp 0x4113fc
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4dd1e0]
cmp dword [edx + 0x30], 0
je 0x411255
test eax, eax
jne 0x411455
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x30]
jmp 0x411266
mov eax, dword [eax + 0x14]
jmp 0x4112a4
mov eax, dword [0x4dd1e0]
mov eax, dword [eax + 0x18]
jmp 0x4112da
mov eax, dword [0x4dd1e0]
jmp 0x4112bf
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4dd1e0]
cmp dword [edx + 0x14], 0
je 0x411293
test eax, eax
jne 0x41145d
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x14]
cmp dword [eax], 1
jne 0x4112ad
jmp 0x4112b2
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4dd1e0]
cmp dword [edx + 0x18], 0
je 0x4112c9
test eax, eax
jne 0x41146a
call sym.___shmem3_winpthreads_tdm_init_local_region
jmp 0x41146a
test edx, edx
je 0x411502
cmp dword [edx + 0x30], 0
jne 0x4114fd
mov eax, dword [0x4dd1e0]
mov dword [eax + 0x30], 0x4d0028
mov eax, 0x4d0028
mov dword [esp], eax
call sym._pthread_mutex_lock
jmp 0x41139e
mov eax, dword [edx + 0x30]
jmp 0x41133e
mov eax, dword [edx + 0x30]
jmp 0x4114e8
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, dword [0x4dd1e0]
cmp dword [eax + 0x30], 0
je 0x4114d7
test edx, edx
jne 0x4114fd
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x30]
jmp 0x4114e8
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4dd1e0]
cmp dword [edx + 0x30], 0
je 0x411375
test eax, eax
jne 0x411540
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x30]
jmp 0x411381
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, dword [0x4dd1e0]
cmp dword [eax + 0x30], 0
je 0x411332
test edx, edx
jne 0x4114f5
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x30]
jmp 0x41133e
mov ebx, pe_nt_image_headers32
jmp 0x41135e
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__endthreadex]
mov dword [eax + 0x30], 0x4d0028
mov eax, esi
jmp 0x411416
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4dd1e0]
cmp dword [edx + 0x30], 0
je 0x411581
test eax, eax
jne 0x411413
call sym.___shmem3_winpthreads_tdm_init_local_region
jmp 0x411413
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 [0x4dd1e0]
test eax, eax
je 0x411608
cmp dword [eax + 0x18], 0
jne 0x411623
mov dword [eax + 0x18], 0x4d0030
mov eax, 0x4d0030
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 0x4113f7
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4dd1e0]
cmp dword [edx + 0x18], 0
je 0x4115e2
test eax, eax
jne 0x411623
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x18]
jmp 0x4115ee