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

Disassembly:
push 0x1c
mov eax, 0x100445d9
call fcn.1004248c
mov ebx, ecx
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov edx, dword [edi + 0x94]
mov ecx, dword [edx]
mov dword [ebp - 0x24], ecx
cmp eax, dword [esi + 4]
je 0x1005a151
cmp eax, dword [ebx + 0xc]
je 0x1005a151
cmp byte [esi], 0
je 0x1005a2c2
push 0xb0
push 0xa00000
push dword [0x100e510c]
call dword [sym.imp.MSDART.DLL_MpHeapAlloc]
add esp, 0xc
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x1005a116
push edi
mov ecx, eax
call fcn.10053a12
mov ecx, eax
xor ebx, ebx
jmp 0x1005a11a
xor ebx, ebx
mov ecx, ebx
test ecx, ecx
je 0x1005a14a
mov eax, dword [edi + 0x80]
cmp byte [eax + 0x10010578], 0
je 0x1005a137
mov dword [ecx + 0xa8], 3
push ecx
push ebx
mov ebx, dword [ebp - 0x1c]
push 0x2001
push dword [ebx + 0x10]
call dword [sym.imp.USER32.dll_PostMessageW]
xor eax, eax
jmp 0x1005a300
mov eax, dword [0x100e5110]
push dword [eax + 0xc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x1005a28b
push 0x20
xor ebx, ebx
mov dword [ebp - 4], ebx
push 0xa00000
push dword [0x100e510c]
mov byte [ebp - 0x11], bl
call dword [sym.imp.MSDART.DLL_MpHeapAlloc]
add esp, 0xc
mov dword [ebp - 0x20], eax
test eax, eax
je 0x1005a1b2
mov edx, dword [ebp - 0x18]
mov edi, eax
push 8
pop ecx
mov esi, edx
mov byte [ebp - 0x11], 1
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp + 8]
xor eax, eax
push 8
pop ecx
mov edi, edx
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 0xc]
mov byte [edx + 0x12], 1
cmp byte [esi], 0
je 0x1005a1ec
mov ecx, dword [esi + 8]
lea eax, [edi + 0x84]
push ebx
push ebx
push ebx
mov esi, dword [ecx]
push eax
push 1
push 0x800
push 0x100086e0
push dword [edi + 0x80]
push ecx
mov ecx, dword [esi + 0x18]
call dword [0x100e6364]
call dword [esi + 0x18]
mov esi, eax
mov dword [ebp - 0x1c], esi
jmp 0x1005a207
mov ebx, dword [ebp - 0x1c]
push edi
push esi
mov eax, dword [ebx]
mov esi, dword [eax + 0x2c]
mov ecx, esi
call dword [0x100e6364]
mov ecx, ebx
call esi
mov esi, eax
mov dword [ebp - 0x1c], eax
or dword [ebp - 4], 0xffffffff
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x1005a2d7
mov eax, dword [ebp - 0x18]
mov esi, ebx
push 8
pop ecx
mov edi, eax
push eax
mov eax, dword [0x100e5110]
rep movsd dword es:[edi], dword [esi]
push dword [eax + 0xc]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push ebx
push dword [0x100e510c]
call dword [sym.imp.MSDART.DLL_MpHeapFree]
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp - 0x1c]
pop ecx
pop ecx
jmp 0x1005a2d7
cmp byte [esi], 0
je 0x1005a2c2
mov ecx, dword [esi + 8]
lea eax, [edi + 0x84]
xor ebx, ebx
push ebx
push ebx
mov esi, dword [ecx]
push ebx
push eax
push 1
push 0x800
push 0x100086e0
push dword [edi + 0x80]
push ecx
mov ecx, dword [esi + 0x18]
call dword [0x100e6364]
call dword [esi + 0x18]
jmp 0x1005a2d5
mov eax, dword [ebx]
push edi
push esi
mov esi, dword [eax + 0x2c]
mov ecx, esi
call dword [0x100e6364]
mov ecx, ebx
call esi
mov esi, eax
mov eax, dword [edi + 0x80]
cmp byte [eax + 0x10010578], 0
je 0x1005a2fe
cmp dword [ebp - 0x24], 3
je 0x1005a2fe
mov eax, dword [edi + 0x94]
cmp dword [eax], 4
jne 0x1005a2fe
mov ecx, edi
call fcn.100d84da
mov eax, esi
call fcn.10042400
ret 8