Function at 0x42c550
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push esi
push ebx
sub esp, 0x20
mov eax, dword [0x4e3900]
test eax, eax
je 0x42c720
mov ebx, dword [eax + 0x14]
test ebx, ebx
jne 0x42c5e8
mov dword [eax + 0x14], 0x4e38dc
mov edx, 0x4e38dc
cmp dword [edx], 1
je 0x42c58b
mov eax, edx
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4e3900]
test eax, eax
je 0x42c5c0
mov edx, dword [eax + 0x18]
test edx, edx
jne 0x42c5e0
mov dword [eax + 0x18], 0x4d00f4
mov eax, 0x4d00f4
mov eax, dword [eax]
mov dword [esp], eax
call sym._TlsGetValue_4
sub esp, 4
mov ebx, eax
test eax, eax
je 0x42c5f0
add esp, 0x20
mov eax, ebx
pop ebx
pop esi
pop edi
ret
call sym.___shmem3_winpthreads_tdm_init_local_region
mov eax, dword [eax + 0x18]
test eax, eax
mov eax, dword [0x4e3900]
je 0x42c592
test eax, eax
jne 0x42c5e0
call sym.___shmem3_winpthreads_tdm_init_local_region
lea esi, [esi]
mov eax, dword [eax + 0x18]
jmp 0x42c59e
mov edx, dword [eax + 0x14]
jmp 0x42c576
call sym._pop_pthread_mem
mov edi, dword [entry3]
mov esi, eax
test edi, edi
je 0x42c5b1
test eax, eax
je 0x42c5b1
mov dword [eax + 0x24], 1
call sym._GetCurrentThreadId_0
mov dword [esi + 0x3c], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call sym._CreateEventA_16
mov dword [esi + 0x1c], 0xffffffff
mov dword [esi + 0x18], eax
sub esp, 0x10
lea eax, [esi + 0x38]
mov dword [esp], eax
call sym._pthread_spin_destroy
cmp eax, 1
je 0x42c795
mov dword [esi + 0x38], 0xffffffff
mov dword [esi + 0x64], 0
mov dword [esi + 0x14], 0
call sym._GetCurrentProcess_0
mov edi, eax
call sym._GetCurrentThread_0
mov ebx, eax
call sym._GetCurrentProcess_0
lea edx, [esi + 0x14]
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._DuplicateHandle_28
sub esp, 0x1c
test eax, eax
je sym.___pthread_self_lite.cold
mov eax, dword [esi + 0x14]
mov dword [esp], eax
call sym._GetThreadPriority_4
mov dword [esi + 0x68], 0
mov dword [esi + 0x6c], eax
movzx eax, byte [esi + 0x20]
sub esp, 4
and eax, 0xffffffcf
or eax, 0x10
mov byte [esi + 0x20], al
mov eax, dword [0x4e3900]
test eax, eax
je 0x42c770
mov ecx, dword [eax + 0x18]
test ecx, ecx
je 0x42c758
mov eax, dword [eax + 0x18]
mov dword [esp + 4], esi
mov eax, dword [eax]
mov dword [esp], eax
call sym._TlsSetValue_8
sub esp, 8
test eax, eax
je sym.___pthread_self_lite.cold
mov ebx, esi
add esp, 0x20
mov eax, ebx
pop ebx
pop esi
pop edi
ret
call sym.___shmem3_winpthreads_tdm_init_local_region
mov ecx, dword [eax + 0x14]
mov eax, dword [0x4e3900]
test ecx, ecx
je 0x42c56a
test eax, eax
jne 0x42c5e8
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, dword [eax + 0x14]
cmp dword [edx], 1
jne 0x42c57b
jmp 0x42c582
mov dword [eax + 0x18], 0x4d00f4
mov eax, 0x4d00f4
jmp 0x42c6f7
call sym.___shmem3_winpthreads_tdm_init_local_region
mov edx, eax
mov eax, dword [0x4e3900]
mov edx, dword [edx + 0x18]
test edx, edx
je 0x42c758
test eax, eax
jne 0x42c6f4
call sym.___shmem3_winpthreads_tdm_init_local_region
jmp 0x42c6f4
call sym._replace_spin_keys.part.0
lea esi, [esi]