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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10d7760
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x115e76c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x24], ecx
mov eax, dword [ebp - 0x24]
add eax, 0x1c
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp + 8], 0
je 0x1011ead
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 0xc]
jl 0x1011ec1
push 0x10f
push 0x10e66d0
call fcn.0100a6d0
test eax, eax
je 0x1011ec1
int3
mov ecx, dword [ebp - 0x24]
cmp dword [ecx + 0x10], 0
jne 0x1011ede
push 0x110
push 0x10e6708
call fcn.0100a6d0
test eax, eax
je 0x1011ede
int3
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x10]
mov edx, dword [ebp + 8]
mov eax, dword [ecx + edx*8]
and eax, 1
jne 0x1011f03
push 0x111
push 0x10e6740
call fcn.0100a6d0
test eax, eax
je 0x1011f03
int3
cmp dword [ebp + 8], 0
jle 0x1011f14
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp + 8]
cmp eax, dword [edx + 0xc]
jl 0x1011f26
mov ecx, dword [ebp - 0x24]
add ecx, 0x1c
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1012117
mov edx, dword [ebp - 0x24]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x1011f54
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 8]
jl 0x10120bf
cmp dword [ebp + 0xc], 0
je 0x10120bf
cmp dword [ebp - 0x14], 0
jne 0x101200c
mov dword [ebp - 4], 0
push 0x10
call fcn.010119b0
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x1011f88
mov ecx, dword [ebp - 0x20]
call fcn.010127a0
mov dword [ebp - 0x2c], eax
jmp 0x1011f8f
mov dword [ebp - 0x2c], 0
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x14], ecx
jmp 0x1011fd8
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 8], 0
mov edx, dword [ebp - 0x14]
mov dword [edx + 0xc], 0
mov eax, dword [ebp - 0x14]
mov dword [eax + 4], 0
mov ecx, dword [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 0x24]
add ecx, 0x14
call fcn.0100a6b0
mov edx, dword [ebp - 0x14]
cmp dword [edx + 0xc], 0
jne 0x1012034
push 4
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0xc]
push ecx
call fcn.010056f0
add esp, 8
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x18], eax
jmp 0x1012058
push 2
push 4
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 0xc]
push eax
call fcn.010056f0
add esp, 8
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x1012070
mov eax, dword [ebp - 0x24]
add eax, 0x1c
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.01006290
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
mov dword [ecx + 0xc], edx
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x14]
mov edx, dword [eax + 0xc]
sub edx, dword [ecx + 8]
shl edx, 2
push edx
push 0
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 8]
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0xc]
lea ecx, [eax + ecx*4]
push ecx
call fcn.010a0510
add esp, 0xc
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0xc]
mov dword [edx + 8], ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov edx, dword [ebp - 0x14]
cmp dword [edx + 0xc], 0
je 0x10120d3
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 8]
jl 0x10120e7
push 0x142
push 0x10e67b0
call fcn.0100a6d0
test eax, eax
je 0x10120e7
int3
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0xc], 0
je 0x101210a
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 8]
jge 0x101210a
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0xc]
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ecx + edx*4], eax
mov ecx, dword [ebp - 0x24]
add ecx, 0x1c
push ecx
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