Function at 0x40da70
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 sub.msvcrt.dll__fpreset
mov eax, dword [0x41ca80]
test eax, eax
je 0x40dc6f
mov esi, dword [eax + 0x30]
test esi, esi
jne 0x40dc90
mov dword [eax + 0x30], 0x415070
mov eax, 0x415070
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 [0x41ca80]
test eax, eax
je 0x40de72
mov ecx, dword [eax + 0x14]
test ecx, ecx
je 0x40dcd8
mov eax, dword [eax + 0x14]
cmp dword [eax], 1
je 0x40dced
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x41ca80]
test eax, eax
je 0x40de49
mov edi, dword [eax + 0x18]
test edi, edi
je 0x40dcfd
mov eax, dword [eax + 0x18]
mov esi, dword [ebp - 0x1c]
mov dword [esp + 4], esi
mov eax, dword [eax]
mov dword [esp], eax
call sym._TlsSetValue_8
sub esp, 8
call sym._GetCurrentThreadId_0
mov dword [esi + 0x3c], eax
mov dword [esp], ebx
call sym._pthread_mutex_unlock
lea eax, [esi + 0x70]
mov dword [esp], eax
call sym.__setjmp
mov edx, eax
mov eax, dword [0x41ca80]
test edx, edx
jne 0x40dd10
test eax, eax
je 0x40ddef
mov ecx, dword [eax + 0x30]
test ecx, ecx
je 0x40de06
mov eax, dword [eax + 0x30]
mov dword [esp], eax
mov ebx, pe_nt_image_headers32
call sym._pthread_mutex_unlock
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx + 8]
test eax, eax
je 0x40db81
mov edx, dword [ecx + 4]
mov dword [esp], edx
call eax
mov ebx, eax
mov eax, dword [0x41ca80]
test eax, eax
je 0x40ddc7
mov edi, dword [eax + 0x30]
test edi, edi
je 0x40ddde
mov eax, dword [eax + 0x30]
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 0x40dbb9
call sym.__pthread_cleanup_dest.part.0
mov esi, dword [ebp - 0x1c]
lea ebx, [esi + 0x1c]
mov dword [esp], ebx
call sym._pthread_mutex_lock
mov eax, esi
mov esi, dword [esi + 4]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x40dbde
mov dword [esp], eax
call sym._CloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x18], 0
mov eax, dword [eax + 0x14]
test eax, eax
je 0x40dd33
mov dword [esp], ebx
call sym._pthread_mutex_unlock
mov dword [esp], ebx
call sym._pthread_mutex_destroy
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x1c], 0xffffffff
mov dword [eax + 0x68], 1
mov ebx, 0x415070
jmp 0x40dc52
mov edx, dword [eax + 0x30]
test edx, edx
setne dl
test dl, dl
je 0x40dc98
test eax, eax
je 0x40dcc8
mov eax, dword [eax + 0x30]
mov dword [esp], eax
call sym._pthread_mutex_unlock
test eax, eax
jne 0x40dcad
mov dword [esp], 0
call sym._Sleep_4
sub esp, 4
mov eax, dword [0x41ca80]
test eax, eax
jne 0x40dc20
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x30]
test eax, eax
mov eax, dword [0x41ca80]
setne dl
jmp 0x40dc28
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x41ca80]
mov ebx, dword [edx + 0x30]
test ebx, ebx
je 0x40daa6
test eax, eax
jne 0x40dc90
call sym.___shmem3_winpthreads_tdm_init_local_region
nop
mov eax, dword [eax + 0x30]
jmp 0x40dab2
mov dword [eax + 0x30], 0x415070
mov eax, ebx
mov dword [esp], eax
call sym._pthread_mutex_unlock
test eax, eax
je 0x40dc43
mov dword [esp], esi
call sym.__endthreadex
lea esp, [ebp - 0x10]
mov eax, esi
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
call sym.___shmem3_winpthreads_tdm_init_local_region
jmp 0x40dc34
mov dword [eax + 0x14], 0x41ca5c
mov eax, 0x41ca5c
cmp dword [eax], 1
jne 0x40daec
mov eax, dword [0x41ca80]
mov edi, dword [eax + 0x18]
test edi, edi
jne 0x40db09
mov dword [eax + 0x18], 0x415078
mov eax, 0x415078
jmp 0x40db0c
test eax, eax
je 0x40dd9f
mov ecx, dword [eax + 0x30]
test ecx, ecx
je 0x40ddb6
mov eax, dword [eax + 0x30]
mov dword [esp], eax
call sym._pthread_mutex_lock
jmp 0x40dbb9
mov edi, dword [ebp - 0x1c]
mov dword [edi], 0xdeadbeef
mov dword [esp], ebx
call sym._pthread_mutex_unlock
mov dword [esp], ebx
call sym._pthread_mutex_destroy
test edi, edi
je 0x40dd61
mov eax, dword [ebp - 0x1c]
mov edi, dword [eax + 0xb0]
test edi, edi
je 0x40de3f
mov eax, dword [0x41ca80]
test eax, eax
je 0x40de17
mov ebx, dword [eax + 0x18]
test ebx, ebx
jne 0x40de37
mov dword [eax + 0x18], 0x415078
mov eax, 0x415078
mov dword [esp + 4], 0
mov eax, dword [eax]
mov dword [esp], eax
call sym._TlsSetValue_8
sub esp, 8
jmp 0x40dc14
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x41ca80]
mov edx, dword [edx + 0x30]
test edx, edx
jne 0x40decb
mov dword [eax + 0x30], 0x415070
mov eax, 0x415070
jmp 0x40dd26
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x41ca80]
mov esi, dword [edx + 0x30]
test esi, esi
jne 0x40deb9
mov dword [eax + 0x30], 0x415070
mov eax, 0x415070
jmp 0x40db9c
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x41ca80]
mov edx, dword [edx + 0x30]
test edx, edx
jne 0x40dea7
mov dword [eax + 0x30], 0x415070
mov eax, 0x415070
jmp 0x40db60
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x41ca80]
mov ecx, dword [edx + 0x18]
test ecx, ecx
je 0x40dd79
test eax, eax
jne 0x40de37
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x18]
jmp 0x40dd85
call sym._push_pthread_mem.part.0
jmp 0x40dd61
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x41ca80]
mov esi, dword [edx + 0x18]
test esi, esi
je 0x40dcfd
test eax, eax
jne 0x40db09
call sym.___shmem3_winpthreads_tdm_init_local_region
jmp 0x40db09
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x41ca80]
mov edx, dword [edx + 0x14]
test edx, edx
je 0x40dcd8
test eax, eax
jne 0x40dae0
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x14]
cmp dword [eax], 1
jne 0x40daec
jmp 0x40daf1
test eax, eax
jne 0x40db5d
call sym.___shmem3_winpthreads_tdm_init_local_region
jmp 0x40db5d
test eax, eax
jne 0x40db99
call sym.___shmem3_winpthreads_tdm_init_local_region
jmp 0x40db99
test eax, eax
jne 0x40dd23
call sym.___shmem3_winpthreads_tdm_init_local_region
jmp 0x40dd23