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

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x20
cmp dword [ebp + 0xc], 3
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], 0xfeedbab1
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], 1
je 0x417f48
lea esp, [ebp - 8]
mov eax, 1
pop ebx
pop esi
pop ebp
ret 0xc
mov eax, dword [0x488e00]
test eax, eax
je 0x4180d5
cmp dword [eax], 0xffffffff
je 0x417f3a
mov eax, dword [0x488e00]
test eax, eax
je 0x418126
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
mov ebx, eax
je 0x417f3a
test byte [eax + 0x20], 0x30
je 0x418027
mov eax, dword [eax + 0xbc]
test eax, eax
jne 0x4180c7
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x417fc5
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp], eax
call esi
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x417fb7
mov dword [esp], eax
call esi
sub esp, 4
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x14], 0
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call sym._pthread_mutex_destroy
mov eax, dword [ebp - 0x18]
mov esi, dword [ebx + 0xb8]
mov dword [ebx + 0x34], eax
mov eax, dword [ebp - 0x14]
test esi, esi
mov dword [ebx + 0x38], eax
mov eax, dword [ebp - 0x10]
mov dword [ebx + 0x3c], eax
mov eax, dword [ebp - 0xc]
mov dword [ebx + 0x40], eax
je 0x41814c
mov eax, dword [0x488e00]
test eax, eax
je 0x418100
mov dword [esp + 4], 0
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, 1
sub esp, 8
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret 0xc
mov ecx, dword [eax + 0x70]
mov eax, dword [eax + 0x18]
test ecx, ecx
jne 0x418081
test eax, eax
je 0x418041
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [ebx + 0xbc]
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x70], 1
test eax, eax
jne 0x4180c0
test byte [ebx + 0x24], 4
je 0x418098
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x417fbe
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x417fbe
test eax, eax
je 0x418091
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov dword [ebx + 0x18], 0
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call sym._pthread_mutex_destroy
mov eax, dword [ebp - 0x18]
mov dword [ebx + 0x34], eax
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x38], eax
mov eax, dword [ebp - 0x10]
mov dword [ebx + 0x3c], eax
mov eax, dword [ebp - 0xc]
mov dword [ebx + 0x40], eax
jmp 0x417f3a
call sym.__pthread_cleanup_dest.part.2
jmp 0x418059
call sym.__pthread_cleanup_dest.part.2
lea esi, [esi]
jmp 0x417f93
mov dword [esp + 8], sym.___shmem_winpthreads_init__pthread_tls_shmem
mov dword [esp + 4], 4
mov dword [esp], str._pthread_tls_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x488e00], eax
jmp 0x417f55
mov dword [esp + 8], sym.___shmem_winpthreads_init__pthread_tls_shmem
mov dword [esp + 4], 4
mov dword [esp], str._pthread_tls_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x488e00], eax
jmp 0x418003
mov dword [esp + 8], sym.___shmem_winpthreads_init__pthread_tls_shmem
mov dword [esp + 4], 4
mov dword [esp], str._pthread_tls_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x488e00], eax
jmp 0x417f67
mov eax, ebx
call sym._push_pthread_mem.part.0
jmp 0x417ff6