Function at 0x660e8032
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
and dword [ebp - 8], 0
push ebx
push esi
push edi
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, dword [ebp + 0xc]
add eax, 0x50
cmp dword [ebp + 0x10], 0
mov dword [ebp - 0xc], eax
mov ax, word [esi]
mov dword [ebp - 4], eax
je 0x660e8133
push dword [ebp + 0x10]
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x10]
push 2
push eax
push edi
call fcn.660e8a55
mov ebx, eax
test ebx, ebx
jne 0x660e8332
cmp word [ebp - 0x10], 9
je 0x660e8218
test byte [ebp - 3], 0x40
je 0x660e8127
mov dword [ebp - 8], esi
mov esi, dword [ebp - 0xc]
and dword [esi + 8], 0
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
movzx eax, dx
cmp eax, 0x24
jg 0x660e80ed
je 0x660e8218
cmp eax, 9
jg 0x660e83f8
je 0x660e8218
cmp eax, 4
jg 0x660e83c4
cmp eax, 3
jge 0x660e8435
test eax, eax
jl 0x660e80ed
cmp eax, 1
jle 0x660e826a
cmp eax, 2
je 0x660e842e
test dh, 0x20
je 0x660e83ba
and edx, 0xdfff
cmp dx, 9
mov dword [ebp - 0x10], edx
je 0x660e8218
cmp dx, 0xc
jbe 0x660e8174
cmp dx, 0x11
je 0x660e8174
cmp dx, 0xe
je 0x660e8174
mov eax, 0x1ca
pop edi
pop esi
pop ebx
leave
ret 0xc
mov ecx, esi
call sym.MSVBVM60.DLL___vbaFreeVar
jmp 0x660e809b
test ah, 0x40
je 0x660e814c
lea eax, [ebp - 0x20]
push esi
push eax
call fcn.660ff1de
and dword [ebp - 4], 0xbfff
lea esi, [ebp - 0x20]
mov edi, dword [ebp + 8]
push 0
lea eax, [ebp - 4]
push 2
push eax
push edi
call fcn.660e8a55
mov ebx, eax
test ebx, ebx
je 0x660e80a5
mov ecx, dword [ebp - 0xc]
call sym.MSVBVM60.DLL___vbaFreeVar
jmp 0x660e8332
xor ecx, ecx
cmp dword [ebp + 0x10], ecx
je 0x660e82e3
cmp dword [ebp - 8], ecx
mov dword [ebp + 0xc], ecx
je 0x660e8220
mov ecx, dword [ebp - 8]
mov di, word [ecx]
test di, 0x2000
je 0x660e8220
mov ecx, dword [ecx + 8]
mov ebx, dword [ecx]
test ebx, ebx
je 0x660e8220
mov cx, word [ebx + 2]
test cl, 0x16
je 0x660e8220
movzx esi, di
and esi, 0xffffbfff
cmp esi, eax
jne 0x660e8218
movzx eax, dx
push ecx
push dword [eax*4 + 0x66055a98]
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
call fcn.660e843c
test eax, eax
jne 0x660e8120
mov eax, dword [ebp + 0xc]
mov cx, word [eax]
cmp cx, word [ebx]
jne 0x660e8211
movzx ecx, cx
shl ecx, 3
lea edi, [ebx + 0x10]
lea esi, [eax + 0x10]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x660e8211
push eax
call dword [sym.imp.OLEAUT32.dll_SafeArrayDestroyData]
push dword [ebp + 0x10]
push 0
push ebx
push dword [ebp + 8]
call fcn.660e8549
jmp 0x660e8120
push eax
call dword [sym.imp.OLEAUT32.dll_SafeArrayDestroyData]
push 0xd
pop eax
jmp 0x660e8120
cmp dx, 8
jne 0x660e82cd
mov dword [ebp + 0xc], 0x100
push dword [ebp + 0xc]
lea edi, [esi + 8]
movzx eax, dx
push dword [eax*4 + 0x66055a98]
push edi
push dword [ebp + 8]
call fcn.660e843c
test eax, eax
jne 0x660e8120
mov ax, word [ebp - 4]
mov word [esi], ax
push dword [ebp + 0x10]
push 0
push dword [edi]
push dword [ebp + 8]
call fcn.660e8549
mov ebx, eax
test ebx, ebx
jne 0x660e8167
cmp dword [ebp + 0x10], ebx
je 0x660e827e
mov ax, word [ebp - 4]
mov word [esi], ax
cmp dword [ebp - 8], 0
je 0x660e8167
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
lea ecx, [ebp - 0x40]
mov ax, word [esi]
push ecx
and eax, 0xbfff
push eax
push edi
mov dword [ebp - 4], eax
call fcn.660e4463
test eax, eax
jge 0x660e8300
cmp eax, 0x80020009
je 0x660e82c3
push eax
call fcn.6602467a
mov ebx, eax
cmp ebx, 0x1b8
jne 0x660e8167
mov ebx, 0x1bb
jmp 0x660e8167
cmp dx, 0xc
jne 0x660e8231
mov dword [ebp + 0xc], 0x800
jmp 0x660e8231
push dword [esi + 8]
lea edi, [esi + 8]
push dword [ebp + 8]
call fcn.660e84fe
mov ebx, eax
test ebx, ebx
je 0x660e8259
jmp 0x660e8167
movzx eax, word [ebp - 4]
cmp eax, 8
jg 0x660e8353
je 0x660e8339
cmp eax, 2
je 0x660e83ab
jle 0x660e8362
cmp eax, 4
jle 0x660e8349
cmp eax, 7
jg 0x660e8362
mov eax, dword [esi + 8]
mov ecx, dword [edi + 8]
mov dword [eax], ecx
mov ecx, dword [edi + 0xc]
mov dword [eax + 4], ecx
and word [edi], 0
mov eax, ebx
jmp 0x660e8120
mov eax, dword [esi + 8]
mov eax, dword [eax]
test eax, eax
je 0x660e8349
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 8]
mov ecx, dword [edi + 8]
mov dword [eax], ecx
jmp 0x660e832e
cmp eax, 0xb
je 0x660e83ab
cmp eax, 0xe
je 0x660e8399
cmp eax, 0x11
je 0x660e838f
test byte [ebp - 3], 0x20
je 0x660e8387
push 0
push dword [esi + 8]
call fcn.660dfab6
mov ebx, eax
test ebx, ebx
jne 0x660e8167
mov eax, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov eax, dword [eax + 8]
jmp 0x660e834c
push 0xd
pop ebx
jmp 0x660e8167
mov eax, dword [esi + 8]
mov cl, byte [edi + 8]
mov byte [eax], cl
jmp 0x660e832e
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
mov edi, dword [eax + 8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0xc]
jmp 0x660e832e
mov eax, dword [esi + 8]
mov cx, word [edi + 8]
mov word [eax], cx
jmp 0x660e832e
mov ebx, 0x1ca
jmp 0x660e8167
cmp eax, 5
jl 0x660e80ed
cmp eax, 7
jle 0x660e83ed
cmp eax, 8
jne 0x660e80ed
push dword [ebp + 0x10]
lea eax, [esi + 8]
push eax
push edi
call fcn.660e7f38
jmp 0x660e8268
push dword [ebp + 0x10]
push 8
lea eax, [esi + 8]
push eax
jmp 0x660e8423
mov ecx, eax
sub ecx, 0xa
je 0x660e8435
dec ecx
je 0x660e842e
dec ecx
dec ecx
je 0x660e8218
dec ecx
je 0x660e841d
sub ecx, 3
jne 0x660e80ed
push dword [ebp + 0x10]
push 1
jmp 0x660e83f2
push dword [ebp + 0x10]
push 0x10
push esi
push edi
call fcn.660e8a55
jmp 0x660e8268
push dword [ebp + 0x10]
push 2
jmp 0x660e83f2
push dword [ebp + 0x10]
push 4
jmp 0x660e83f2