Function at 0x41813a
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 [0x432320]
test eax, eax
je 0x418346
cmp dword [eax + 0x30], 0
jne 0x418365
mov eax, dword [0x432320]
mov dword [eax + 0x30], 0x428028
mov eax, 0x428028
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 [0x432320]
test eax, eax
je 0x41838c
cmp dword [eax + 0x14], 0
jne 0x41836d
mov eax, dword [0x432320]
mov dword [eax + 0x14], 0x4322f4
mov eax, 0x4322f4
cmp dword [eax], 1
je 0x418382
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x432320]
test eax, eax
je 0x4183bc
cmp dword [eax + 0x18], 0
jne 0x418375
mov eax, dword [0x432320]
mov dword [eax + 0x18], 0x428030
mov eax, 0x428030
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 [0x432320]
test eax, eax
jne 0x4183dd
test edx, edx
je 0x418458
cmp dword [edx + 0x30], 0
jne 0x418405
mov dword [edx + 0x30], 0x428028
mov eax, 0x428028
mov dword [esp], eax
call sym._pthread_mutex_unlock
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 8]
test eax, eax
je 0x41847e
mov edx, dword [edx + 4]
mov dword [esp], edx
call eax
mov ebx, eax
mov eax, dword [0x432320]
test eax, eax
je 0x418431
cmp dword [eax + 0x30], 0
jne 0x418450
mov dword [eax + 0x30], 0x428028
mov eax, 0x428028
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 0x4182ae
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 0x4182d2
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 0x4184c3
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, 0x428028
mov eax, dword [0x432320]
test eax, eax
je 0x41849f
cmp dword [eax + 0x30], 0
je 0x418491
mov eax, dword [eax + 0x30]
mov dword [esp], eax
call sym._pthread_mutex_unlock
test eax, eax
jne 0x418488
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push eax
jmp 0x41830c
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x432320]
cmp dword [edx + 0x30], 0
je 0x418165
test eax, eax
jne 0x418365
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x30]
jmp 0x418176
mov eax, dword [eax + 0x14]
jmp 0x4181b4
mov eax, dword [0x432320]
mov eax, dword [eax + 0x18]
jmp 0x4181ea
mov eax, dword [0x432320]
jmp 0x4181cf
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x432320]
cmp dword [edx + 0x14], 0
je 0x4181a3
test eax, eax
jne 0x41836d
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x14]
cmp dword [eax], 1
jne 0x4181bd
jmp 0x4181c2
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x432320]
cmp dword [edx + 0x18], 0
je 0x4181d9
test eax, eax
jne 0x41837a
call sym.___shmem3_winpthreads_tdm_init_local_region
jmp 0x41837a
test edx, edx
je 0x418412
cmp dword [edx + 0x30], 0
jne 0x41840d
mov eax, dword [0x432320]
mov dword [eax + 0x30], 0x428028
mov eax, 0x428028
mov dword [esp], eax
call sym._pthread_mutex_lock
jmp 0x4182ae
mov eax, dword [edx + 0x30]
jmp 0x41824e
mov eax, dword [edx + 0x30]
jmp 0x4183f8
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, dword [0x432320]
cmp dword [eax + 0x30], 0
je 0x4183e7
test edx, edx
jne 0x41840d
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x30]
jmp 0x4183f8
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x432320]
cmp dword [edx + 0x30], 0
je 0x418285
test eax, eax
jne 0x418450
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x30]
jmp 0x418291
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, dword [0x432320]
cmp dword [eax + 0x30], 0
je 0x418242
test edx, edx
jne 0x418405
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x30]
jmp 0x41824e
mov ebx, pe_nt_image_headers32
jmp 0x41826e
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__endthreadex]
mov dword [eax + 0x30], 0x428028
mov eax, esi
jmp 0x418326
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x432320]
cmp dword [edx + 0x30], 0
je 0x418491
test eax, eax
jne 0x418323
call sym.___shmem3_winpthreads_tdm_init_local_region
jmp 0x418323
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 [0x432320]
test eax, eax
je 0x418518
cmp dword [eax + 0x18], 0
jne 0x418533
mov dword [eax + 0x18], 0x428030
mov eax, 0x428030
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 0x418307
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x432320]
cmp dword [edx + 0x18], 0
je 0x4184f2
test eax, eax
jne 0x418533
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x18]
jmp 0x4184fe