Function at 0x6601d0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
mov esi, dword [esp + 0x34]
xor ebx, ebx
push edi
mov ecx, esi
mov dword [esp + 0x10], ebx
call fcn.00468980
mov ebp, dword [esp + 0x40]
mov edi, eax
mov dword [esp + 0x18], edi
lea eax, [edi - 1]
cmp eax, 0x1f
ja case.0x660205.19
movzx eax, byte [eax + 0x660598]
jmp dword [eax*4 + 0x66058c]
mov ecx, esi
call fcn.00468dc0
mov ecx, dword [esp + 0x3c]
mov esi, eax
mov dword [esp + 0x40], esi
mov eax, dword [ecx + 4]
dec eax
push eax
push dword [ecx]
lea ecx, [esp + 0x28]
call fcn.0045fc50
push 1
push esi
mov ecx, ebp
call fcn.00661d20
mov ecx, eax
lea edx, [esp + 0x20]
mov eax, dword [ebp]
push edx
mov eax, dword [eax]
add eax, ecx
push eax
push edi
call fcn.006618a0
add esp, 0xc
test eax, eax
jne 0x6602ef
mov eax, dword [ebp]
inc ebx
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x40]
add dword [eax + 4], esi
mov esi, dword [ebp]
mov edi, dword [esi + 4]
add ebx, edi
mov ecx, dword [esi + 8]
and ecx, 0x3fffffff
mov dword [esp + 0x14], edi
cmp ecx, ebx
jge 0x660299
add ecx, ecx
mov eax, ebx
cmp ebx, ecx
push 1
cmovl eax, ecx
push eax
push esi
push 0x7d8954
call fcn.00467b80
add esp, 0x10
mov edx, dword [esi]
mov ecx, ebx
sub ecx, dword [esi + 4]
add edx, dword [esi + 4]
test ecx, ecx
jle 0x6602bd
mov edi, edx
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x14]
mov dword [esi + 4], ebx
lea ecx, [esp + 0x20]
mov eax, dword [ebp]
push ecx
mov dword [eax + 4], edi
mov eax, dword [ebp]
mov eax, dword [eax]
add eax, edi
push eax
push dword [esp + 0x20]
call fcn.006618a0
mov ebx, dword [esp + 0x1c]
add esp, 0xc
mov esi, dword [esp + 0x40]
test eax, eax
je 0x660257
lea ecx, [esp + 0x20]
call fcn.0045fcf0
jmp case.0x660205.19
mov ecx, dword [esp + 0x3c]
xor esi, esi
xor edi, edi
mov dword [esp + 0x14], esi
mov eax, dword [ecx + 4]
dec eax
test eax, eax
jle 0x6604c6
mov eax, dword [ecx]
movsx eax, byte [eax + edi]
cmp eax, 0x20
je 0x660333
cmp eax, 9
je 0x660333
cmp eax, 0xa
je 0x660333
cmp eax, 0xd
jne 0x6604b5
cmp esi, edi
je 0x6604ae
mov ebx, edi
mov dword [esp + 0x20], 0
sub ebx, esi
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], connect
lea esi, [ebx + 1]
mov dword [esp + 0x30], esi
test esi, esi
je 0x6603a8
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea edx, [esi + 0x7f]
and edx, 0xffffff80
mov ecx, dword [eax + 0xc]
lea ebp, [ecx + edx]
mov dword [esp + 0x1c], ebp
mov ebp, dword [esp + 0x40]
cmp edx, dword [eax + 8]
jg 0x66039c
lea ebp, [ecx + edx]
cmp ebp, dword [eax + 0x10]
mov ebp, dword [esp + 0x40]
ja 0x66039c
mov edx, dword [esp + 0x1c]
mov dword [eax + 0xc], edx
jmp 0x6603aa
push edx
mov ecx, eax
call fcn.0046a3c0
mov ecx, eax
jmp 0x6603aa
xor ecx, ecx
mov eax, esi
mov dword [esp + 0x20], ecx
or eax, 0x80000000
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x3c]
push ebx
mov ebx, dword [esp + 0x18]
mov eax, dword [eax]
add eax, ebx
push eax
push ecx
call fcn.0045d810
mov ecx, dword [esp + 0x34]
add esp, 0xc
and ecx, 0x3fffffff
cmp ecx, esi
jge 0x660400
add ecx, ecx
mov eax, esi
cmp esi, ecx
push 1
cmovl eax, ecx
push eax
lea eax, [esp + 0x28]
push eax
push 0x7d8954
call fcn.00467b80
add esp, 0x10
mov eax, dword [esp + 0x20]
mov ecx, ebp
sub eax, ebx
mov dword [esp + 0x24], esi
push 1
push 4
mov byte [eax + edi], 0
call fcn.00661d20
push dword [esp + 0x20]
mov ecx, dword [esp + 0x48]
push eax
call fcn.0048c370
mov eax, dword [ebp]
xor ecx, ecx
inc dword [esp + 0x10]
add dword [eax + 4], 4
mov ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x24]
cmp ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x30]
push dword [0x884adc]
cmove eax, ecx
add esi, 0x7f
mov dword [esp + 0x28], eax
and esi, 0xffffff80
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [ecx + 8]
jg 0x66047c
lea eax, [edx + ebx]
cmp eax, dword [ecx + 0xc]
jne 0x66047c
cmp dword [ecx + 0x14], ebx
je 0x66047c
mov dword [ecx + 0xc], ebx
jmp 0x660483
push edx
push ebx
call fcn.0046a590
mov eax, dword [esp + 0x28]
mov dword [esp + 0x24], 0
test eax, eax
js 0x6604aa
and eax, 0x3fffffff
mov ecx, 0x7d8954
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x24]
call dword [eax + 0x10]
mov ecx, dword [esp + 0x3c]
lea esi, [edi + 1]
mov dword [esp + 0x14], esi
mov eax, dword [ecx + 4]
inc edi
dec eax
cmp edi, eax
jl 0x660315
mov ebx, dword [esp + 0x10]
mov eax, dword [ecx + 4]
dec eax
cmp esi, eax
je 0x6604f6
push 1
push 4
mov ecx, ebp
call fcn.00661d20
mov ecx, dword [esp + 0x44]
mov edx, eax
mov eax, dword [esp + 0x3c]
mov eax, dword [eax]
add eax, esi
push eax
push edx
call fcn.0048c370
mov ecx, dword [ebp]
add dword [ecx + 4], 4
inc ebx
cmp dword [esp + 0x18], 0x1c
jne case.0x660205.19
mov eax, ebx
cdq
sub eax, edx
mov ebx, eax
sar ebx, 1
mov edi, dword [ebp]
mov dword [esp + 0x40], edi
mov eax, dword [edi + 4]
mov ecx, dword [edi + 8]
and ecx, 0x3fffffff
mov dword [esp + 0x1c], eax
lea esi, [eax + 0xf]
and esi, 0xfffffff0
cmp ecx, esi
jge 0x660541
add ecx, ecx
mov eax, esi
cmp esi, ecx
push 1
cmovl eax, ecx
push eax
push edi
push 0x7d8954
call fcn.00467b80
add esp, 0x10
mov edx, dword [edi]
mov ecx, esi
sub ecx, dword [edi + 4]
add edx, dword [edi + 4]
test ecx, ecx
jle 0x660565
mov edi, edx
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x40]
mov ecx, dword [esp + 0x1c]
mov dword [edi + 4], esi
mov eax, dword [ebp]
pop edi
pop esi
mov dword [eax + 4], ecx
mov ecx, dword [ebp]
pop ebp
mov eax, dword [ecx + 4]
add eax, 0xf
and eax, 0xfffffff0
mov dword [ecx + 4], eax
mov eax, ebx
pop ebx
add esp, 0x24
ret