Function at 0x662130
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0xe0
push ebx
push ebp
push dword [esp + 0xf0]
mov ebx, ecx
lea ecx, [esp + 0x34]
call fcn.0045fbf0
cmp dword [ebx + 0xc], 0
je 0x66216d
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
mov ecx, dword [eax + ecx*4 - 4]
mov eax, dword [esp + 0xec]
mov dword [eax], ecx
dec dword [ebx + 0xc]
xor ebx, ebx
jmp 0x662314
mov ebp, dword [esp + 0xec]
lea eax, [esp + 0xb]
push eax
lea ecx, [esp + 0x34]
mov dword [ebp], 0
call fcn.0045fd10
cmp byte [eax], 0
jne 0x6621a5
push str.End_of_stream
lea ecx, [ebx + 0x14]
call fcn.0045d9a0
mov ebx, 1
jmp 0x662314
push esi
mov esi, dword [esp + 0x3c]
mov ecx, esi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], connect
mov eax, dword [esi]
push edi
push 0x20
call dword [eax + 0x1c]
mov eax, dword [esi]
lea ecx, [esp + 0x44]
push 0x20
push ecx
mov ecx, esi
call dword [eax + 0x10]
mov edi, eax
test edi, edi
je 0x6622c5
cmp byte [esp + 0x44], 0x3c
jne 0x66228e
cmp edi, 2
jl 0x6622c5
cmp byte [esp + 0x45], 0x3f
jne 0x662214
push 0
push esi
push 0x20
lea eax, [esp + 0x50]
push edi
push eax
call fcn.00662f40
jmp 0x6622a1
cmp edi, 4
jl 0x662244
push 3
lea eax, [esp + 0x49]
push eax
push 0x7247d4
call fcn.0045d3a0
add esp, 0xc
test eax, eax
jne 0x662244
push esi
push 0x20
lea eax, [esp + 0x4c]
push edi
push eax
call fcn.00662ec0
add esp, 0x10
jmp 0x6622a4
cmp dword [esp + 0x24], 0
je 0x6623d9
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x20]
mov edx, dword [esp + 0x24]
xor ecx, ecx
mov edi, dword [esp + 0x20]
test edx, edx
jle 0x66227c
mov al, byte [edi + ecx]
cmp al, 0x20
je 0x662277
cmp al, 9
je 0x662277
cmp al, 0xa
je 0x662277
cmp al, 0xd
jne 0x66227c
inc ecx
cmp ecx, edx
jl 0x662264
cmp ecx, edx
jne 0x66232a
mov dword [esp + 0x24], 0
jmp 0x6622a4
lea eax, [esp + 0x20]
push eax
push esi
push 0x20
lea eax, [esp + 0x50]
push edi
push eax
call fcn.00662fc0
add esp, 0x14
mov eax, dword [esi]
mov ecx, esi
push 0x20
call dword [eax + 0x1c]
mov eax, dword [esi]
lea ecx, [esp + 0x44]
push 0x20
push ecx
mov ecx, esi
call dword [eax + 0x10]
mov edi, eax
test edi, edi
jne 0x6621e4
lea eax, [ebx + 0x14]
push str.premature_end_of_stream
push eax
call fcn.0045da00
add esp, 8
mov ebx, 1
mov eax, dword [esp + 0x28]
mov dword [esp + 0x24], 0
pop edi
pop esi
test eax, eax
js 0x662304
and eax, 0x3fffffff
mov ecx, 0x7d8954
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x1c]
call dword [eax + 0x10]
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], connect
lea ecx, [esp + 0x30]
call fcn.0045fcf0
pop ebp
mov eax, ebx
pop ebx
add esp, 0xe0
ret 8
mov eax, dword [esp + 0x28]
and eax, 0x3fffffff
cmp edx, eax
jne 0x662353
push 1
lea eax, [esp + 0x24]
push eax
push 0x7d8954
call fcn.00467c00
mov edx, dword [esp + 0x30]
add esp, 0xc
mov edi, dword [esp + 0x20]
mov byte [edx + edi], 0
mov esi, dword [esp + 0x20]
inc dword [esp + 0x24]
push esi
push esi
call fcn.00662900
mov edi, eax
add esp, 8
cmp edi, 1
jne 0x6623a7
cmp byte [esi], 0
jne 0x6623a7
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push 0x10
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, 0x10
push 0
mov word [eax + 4], cx
mov ecx, eax
call fcn.00662ac0
mov dword [ebp], eax
xor ebx, ebx
jmp 0x6622db
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push 0x10
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, 0x10
push edi
push esi
mov word [eax + 4], cx
mov ecx, eax
call fcn.00662af0
mov dword [ebp], eax
xor ebx, ebx
jmp 0x6622db
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
push esi
push 0x20
lea eax, [esp + 0x50]
mov dword [esp + 0x24], 0
push edi
push eax
mov dword [esp + 0x30], connect
call fcn.00662f40
mov ecx, dword [esp + 0x2c]
add esp, 0x14
test ecx, ecx
jne 0x662416
push str.Empty_tag
jmp 0x662461
mov eax, dword [esp + 0x1c]
and eax, 0x3fffffff
cmp ecx, eax
jne 0x66243b
push 1
lea eax, [esp + 0x18]
push eax
push 0x7d8954
call fcn.00467c00
mov ecx, dword [esp + 0x24]
add esp, 0xc
mov eax, dword [esp + 0x14]
mov byte [ecx + eax], 0
mov eax, dword [esp + 0x14]
inc dword [esp + 0x18]
push eax
push eax
call fcn.00662900
mov ecx, eax
add esp, 8
cmp ecx, 0xffffffff
jne 0x662477
push str.Bad_tag
lea eax, [ebx + 0x14]
push eax
call fcn.0045da00
add esp, 8
mov ebx, 1
jmp 0x662619
mov edx, dword [esp + 0x14]
mov dword [esp + 0x18], ecx
cmp byte [edx + 1], 0x2f
jne 0x6624cf
lea eax, [edx + 2]
push eax
lea ecx, [esp + 0x68]
call fcn.0045e8b0
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push 0x10
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, 0x10
mov word [eax + 4], cx
mov ecx, eax
push dword [esp + 0x64]
call fcn.00662b20
lea ecx, [esp + 0x64]
mov dword [ebp], eax
call fcn.00469220
xor ebx, ebx
jmp 0x662619
cmp byte [edx + ecx - 1], 0x2f
lea esi, [edx + ecx]
sete al
mov byte [esp + 0x13], al
test al, al
je 0x6624f3
mov byte [esi - 1], 0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
dec ecx
mov dword [esp + 0x18], ecx
xor esi, esi
test ecx, ecx
jle 0x66250b
nop dword [eax]
cmp byte [edx + esi], 0x20
je 0x66250b
inc esi
cmp esi, ecx
jl 0x662500
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], connect
cmp esi, ecx
je 0x662548
lea eax, [esp + 0x2c]
push eax
lea eax, [edx + esi]
push eax
call fcn.00663050
mov eax, dword [esp + 0x1c]
add esp, 8
mov byte [eax + esi], 0
mov edx, dword [esp + 0x14]
mov dword [esp + 0x18], esi
push dword [0x884adc]
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea edi, [edx + 1]
call ebp
push 0x1c
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, 0x1c
push edi
mov word [eax + 4], cx
mov ecx, eax
call fcn.00662b50
mov esi, eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esi + 0x10]
call fcn.00663190
cmp byte [esp + 0x13], 0
je 0x6625b5
push dword [0x884adc]
call ebp
push 0x10
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, 0x10
push edi
mov word [eax + 4], cx
mov ecx, eax
call fcn.00662b20
mov edx, dword [ebx]
mov ecx, ebx
push eax
call dword [edx + 0x10]
mov eax, dword [esp + 0xf4]
xor ebx, ebx
mov edi, dword [esp + 0x30]
sub edi, 1
mov dword [eax], esi
js 0x6625e7
mov eax, dword [esp + 0x2c]
lea esi, [eax + edi*8]
lea ecx, [esi + 4]
call fcn.0045d990
mov ecx, esi
call fcn.0045d990
sub esi, 8
sub edi, 1
jns 0x6625d0
mov eax, dword [esp + 0x34]
mov dword [esp + 0x30], ebx
test eax, eax
js 0x66260d
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 3
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x30]
call dword [eax + 0x10]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x34], connect
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
test eax, eax
js 0x6622db
and eax, 0x3fffffff
mov ecx, 0x7d8954
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x18]
call dword [eax + 0x10]
jmp 0x6622db