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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003e976
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0x1c
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp - 0x18]
add eax, 0x1c
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp + 8], 0
jle 0x1000da98
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 0xc]
jl 0x1000daaa
mov eax, dword [ebp - 0x18]
add eax, 0x1c
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1000dc29
mov eax, dword [ebp - 0x18]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x1000dad7
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 8]
jl 0x1000dbf9
cmp dword [ebp + 0xc], 0
je 0x1000dbf9
cmp dword [ebp - 0x14], 0
jne 0x1000db4d
and dword [ebp - 4], 0
push 0x10
call fcn.1000d6ac
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x1000db08
mov eax, dword [ebp - 0x1c]
mov dword [eax], 0x1005b198
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x24], eax
jmp 0x1000db0c
and dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
jmp 0x1000db27
or dword [ebp - 4], 0xffffffff
jmp 0x1000db31
mov eax, dword [ebp - 0x14]
and dword [eax + 8], 0
mov eax, dword [ebp - 0x14]
and dword [eax + 0xc], 0
push dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
add ecx, 0x14
call fcn.1000d659
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0xc], 0
jne 0x1000db73
push 4
mov eax, dword [ebp - 0x18]
push dword [eax + 0xc]
call fcn.10008a69
pop ecx
pop ecx
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x20], eax
jmp 0x1000db94
push 2
push 4
mov eax, dword [ebp - 0x18]
push dword [eax + 0xc]
call fcn.10008a69
pop ecx
pop ecx
push eax
mov eax, dword [ebp - 0x14]
push dword [eax + 0xc]
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x1000dbac
mov eax, dword [ebp - 0x18]
add eax, 0x1c
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.10007648
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x20]
mov dword [eax + 0xc], ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
sub eax, dword [ecx + 8]
shl eax, 2
push eax
push 0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0xc]
lea eax, [ecx + eax*4]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ecx + 0xc]
mov dword [eax + 8], ecx
push dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0xc], 0
je 0x1000dc1c
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 8]
jge 0x1000dc1c
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [eax + ecx*4], edx
mov eax, dword [ebp - 0x18]
add eax, 0x1c
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 8