Function at 0x660e17be
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 8]
and dword [ebp - 4], 0
push edi
push 0xd
mov ax, word [esi]
pop ebx
mov ecx, eax
and ecx, 0x9fff
movzx edi, cx
shr eax, 0xd
and eax, 1
cmp edi, 9
mov dword [ebp - 0x14], eax
jg 0x660e1857
je 0x660e1966
test edi, edi
jl 0x660e1800
cmp edi, 8
jle 0x660e1a7e
push 0x1ca
call fcn.66024fdc
push edi
push dword [ebp + 8]
call fcn.6601333f
mov eax, dword [ebp + 8]
pop ecx
pop ecx
mov word [eax + esi*2], 0x28
mov eax, dword [ebp + 8]
mov word [eax + esi*2 + 2], 0x29
mov eax, dword [ebp + 8]
and word [eax + ebx*2], 0
push dword [ebp - 4]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
leave
ret 4
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
test eax, eax
mov dword [ebp + 8], eax
jne 0x660e1830
push 0xe
call fcn.66024fdc
cmp edi, 0xa
jl 0x660e1800
cmp edi, 0xb
jle 0x660e1a7e
cmp edi, 0xc
je 0x660e1a66
cmp edi, ebx
je 0x660e1966
cmp edi, 0xe
je 0x660e1a7e
cmp edi, 0x11
je 0x660e1a7e
cmp edi, 0x24
jne 0x660e1800
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x24], 0
je 0x660e18a9
push ebx
call fcn.66024fdc
cmp dword [ebp - 0x14], 0
jne 0x660e18fc
mov esi, dword [esi + 0xc]
test esi, esi
je 0x660e18c8
mov eax, dword [esi]
lea ecx, [ebp + 8]
push ecx
push esi
call dword [eax + 0x1c]
test eax, eax
jge 0x660e1839
mov edi, dword [ebp + 8]
cmp dword [ebp - 0x14], 0
push edi
je 0x660e1843
call fcn.6602618b
mov esi, eax
pop ecx
lea ebx, [esi + 2]
push ebx
push 0
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
test eax, eax
mov dword [ebp + 8], eax
jne 0x660e180a
push 0xe
call fcn.66024fdc
mov cx, word [esi]
and cx, 0x4000
je 0x660e1932
mov eax, dword [esi + 8]
mov eax, dword [eax]
test eax, eax
je 0x660e1932
test byte [eax + 2], 0x20
je 0x660e1932
mov eax, dword [eax - 4]
lea edx, [ebp - 4]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
test eax, eax
jge 0x660e1953
push eax
call fcn.6600fcf2
push eax
call fcn.66024fdc
test cx, cx
jne 0x660e195b
mov esi, dword [esi + 8]
test byte [esi + 2], 0x20
je 0x660e195b
mov esi, dword [esi - 4]
test esi, esi
je 0x660e195b
mov eax, dword [esi]
lea ecx, [ebp - 4]
push ecx
push esi
call dword [eax + 0x1c]
jmp 0x660e1922
mov edi, dword [ebp - 4]
jmp 0x660e18cb
mov edi, dword [0x6610fff8]
jmp 0x660e18cb
test eax, eax
jne 0x660e1a66
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x24], 0
je 0x660e1986
push ebx
call fcn.66024fdc
test byte [esi + 1], 0x40
je 0x660e199f
mov eax, dword [esi + 8]
mov esi, dword [eax]
test esi, esi
jne 0x660e19a4
mov edi, 0x66055700
jmp 0x660e18cb
mov esi, dword [esi + 8]
jmp 0x660e1991
mov eax, dword [esi]
lea ecx, [ebp - 0xc]
push ecx
push 0x6602f230
push esi
call dword [eax]
xor ebx, ebx
cmp eax, ebx
jl 0x660e1a2e
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 8]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov esi, eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp esi, ebx
jl 0x660e1a7e
mov eax, dword [ebp - 8]
push ebx
push ebx
lea edx, [ebp + 8]
mov ecx, dword [eax]
push ebx
push edx
push 0xffffffffffffffff
push eax
call dword [ecx + 0x30]
mov esi, eax
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
cmp esi, ebx
jl 0x660e18c8
mov eax, dword [ebp + 8]
cmp word [eax], 0x5f
jne 0x660e183c
cmp eax, ebx
jne 0x660e1a5f
xor ecx, ecx
dec ecx
add eax, 2
push ecx
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
push dword [ebp + 8]
mov esi, eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, esi
jmp 0x660e183c
mov eax, dword [esi]
lea ecx, [ebp - 0x10]
push ecx
push 0x6602f1d0
push esi
call dword [eax]
mov esi, eax
cmp esi, ebx
jl 0x660e1a7e
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 8]
push edx
push 0x409
mov ecx, dword [eax]
push ebx
push eax
call dword [ecx + 0x10]
mov esi, eax
mov eax, dword [ebp - 0x10]
jmp 0x660e19ca
mov ecx, dword [eax - 4]
shr ecx, 1
jmp 0x660e1a10
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x24], 0
je 0x660e1a7e
push ebx
call fcn.66024fdc
mov edi, dword [edi*4 + 0x6610ffb0]
jmp 0x660e18cb