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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10077f45
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x10098140]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x10], eax
mov esi, dword [eax + 0x18]
push dword [0x1009e9b8]
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
lea eax, [esi + 0x14]
neg esi
sbb esi, esi
and esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x1000eacb
nop
cmp dword [eax], esi
je 0x1000eb1b
mov eax, dword [eax + 8]
test eax, eax
jne 0x1000eac0
mov eax, dword [ebx]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx]
cmp byte [eax + 0x38], 0
je 0x1000ec48
mov dword [edi + 0x14], 0
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x1000ec22
mov dword [ecx + 0x14], edi
mov dword [eax + 0x40], edi
mov eax, dword [ebx]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, dword [eax + 4]
mov eax, dword [ebx]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test esi, esi
je 0x1000ead7
mov eax, dword [ebx]
cmp byte [eax + 0x38], 0
jne 0x1000ead7
mov byte [eax + 0x38], 1
mov eax, dword [ebx]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx]
push dword [0x1009e994]
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
push dword [0x1009e994]
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x10]
mov ebx, dword [ebx]
mov dword [ebp - 0x10], ebx
mov eax, dword [ecx + 0x18]
mov dword [ebp + 8], eax
mov dword [ebp - 0x14], eax
push 0
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
push ecx
push edi
xorps xmm0, xmm0
mov dword [ebp - 0x24], 0
push eax
mov eax, dword [edi + 0x18]
movq qword [ebp - 0x2c], xmm0
call eax
add esp, 0x10
lea eax, [ebx + 0x20]
lea edi, [ebx + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebx + 0x3c]
test ecx, ecx
je 0x1000ebdf
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x1000ebc8
mov dword [eax + 0x14], ecx
jmp 0x1000ebcb
mov dword [ebx + 0x44], ecx
mov eax, dword [ebx + 0x40]
mov dword [ebx + 0x48], eax
mov dword [ebx + 0x3c], 0
mov dword [ebx + 0x40], 0
mov esi, dword [ebx + 0x44]
test esi, esi
push edi
setne al
mov byte [ebx + 0x38], al
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x1000ebff
push ecx
mov ecx, dword [ebp + 8]
push ebx
call fcn.1000cc90
push dword [ebp - 0x18]
push dword [0x1009e994]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dword [eax + 0x3c], edi
mov dword [eax + 0x40], edi
mov eax, dword [ebx]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov byte [eax + 0x38], 1
mov eax, dword [ebx]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx]
mov dword [edi + 0x14], 0
mov ecx, dword [eax + 0x48]
test ecx, ecx
je 0x1000ec6d
mov dword [ecx + 0x14], edi
jmp 0x1000ec70
mov dword [eax + 0x44], edi
mov dword [eax + 0x48], edi
push ecx
mov ecx, dword [ebp - 0x10]
push dword [ebx]
mov ecx, dword [ecx + 0x18]
call fcn.1000cc90
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8