Function at 0x4cf90e
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1fc
mov eax, dword [0x5c4e68]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
xor esi, esi
mov word [ebp - 0x68], si
lea edi, [ebp - 0x66]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x18e
stosw word es:[edi], ax
lea eax, [ebp - 0x1f6]
push esi
push eax
mov ebx, ecx
mov word [ebp - 0x1f8], si
call fcn.005117f0
add esp, 0xc
push 0x4f
lea eax, [ebp - 0x57]
push esi
push eax
mov byte [ebp - 0x1f9], 0
mov byte [ebp - 0x58], 0
call fcn.005117f0
add esp, 0xc
mov edx, ebx
call fcn.004c3b34
test eax, eax
je 0x4cf97f
or eax, 0xffffffff
jmp 0x4cfb8c
push 0x10
lea eax, [ebp - 0x68]
push esi
push eax
call fcn.005117f0
add esp, 0xc
lea eax, [ebp - 0x1f8]
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x4cf9b0
push str.:7:TelNetConnect___FAILED:_WSAStartup___FAILED:_Winsock_could_not_be_initialized.
call fcn.004265da
pop ecx
jmp 0x4cf977
mov eax, dword [ebp + 8]
cmp eax, esi
jle 0x4cf9c0
cmp eax, 0x10000
jl 0x4cf9d9
cmp eax, esi
je 0x4cf9d1
push eax
push ebx
push str.:7:TelNetConnect___was_given_an_invalid_port:__s___d
call fcn.00426c01
add esp, 0xc
call fcn.004cd282
mov dword [ebp + 8], eax
push 0x50
lea eax, [ebp - 0x58]
push eax
push ebx
call fcn.00467d56
add esp, 0xc
test eax, eax
jne 0x4cfa41
push ebx
call sub.WSOCK32.dll_gethostbyname
mov esi, eax
test esi, esi
jne 0x4cfa0b
call sub.WSOCK32.dll_WSACleanup
push ebx
push str.:7:TelNetConnect___FAILED:_ResolveHostNameToIP__s__FAILED:_gethostbyname___also_failed.
call fcn.004265da
pop ecx
jmp 0x4cf9ad
push ebx
push ebx
push str.:7:TelNetConnect___encountered_a_problem:__ResolveHostNameToIP__s__FAILED__but_gethostbyname__s__SUCCEEDED_
call fcn.00426c01
add esp, 0xc
cmp word [esi + 0xa], 4
jle 0x4cfa27
mov word [esi + 0xa], 4
movsx eax, word [esi + 0xa]
push eax
mov eax, dword [esi + 0xc]
push dword [eax]
lea eax, [ebp - 0x64]
push eax
call fcn.00512a90
add esp, 0xc
xor esi, esi
jmp 0x4cfa4c
lea ecx, [ebp - 0x58]
call fcn.00467c7e
mov dword [ebp - 0x64], eax
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
jne 0x4cfa6d
call sub.WSOCK32.dll_WSACleanup
push str.:7:TelNetConnect___FAILED:_socket___returned_INVALID_SOCKET
jmp 0x4cf9a8
push dword [ebp + 8]
call sub.WSOCK32.dll_htons
mov word [ebp - 0x66], ax
push 0x10
lea eax, [ebp - 0x68]
push eax
push edi
mov word [ebp - 0x68], 2
call sub.WSOCK32.dll_connect
test eax, eax
je 0x4cfb03
push edi
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
push str.127.0.0.1
push ebx
call fcn.004c48c1
test eax, eax
pop ecx
pop ecx
jne 0x4cf977
push str.10.210.27.10
push ebx
call fcn.004c48c1
test eax, eax
pop ecx
pop ecx
je 0x4cfacd
call fcn.0048a53c
test eax, eax
jne 0x4cf977
inc dword [0x6db9ec]
cmp dword [0x6db9ec], 3
jg 0x4cf977
call fcn.00415b45
test eax, eax
jne 0x4cf977
push dword [ebp + 8]
push ebx
push str.:7:TelNetConnect___FAILED:_connect___FAILED_to_establish_the_connection:__s:_d
call fcn.004265da
add esp, 0xc
jmp 0x4cf977
push 1
lea eax, [ebp - 0x1f9]
push eax
push 8
push 0xffff
push edi
mov byte [ebp - 0x1f9], 1
call sub.WSOCK32.dll_setsockopt
cmp dword [ebp + 0xc], esi
je 0x4cfb8a
push esi
push 0xfb
mov esi, 0xff
push esi
push edi
call fcn.004cfbcf
push 1
lea ebx, [esi - 2]
push ebx
push esi
push edi
call fcn.004cfbcf
push 0
push ebx
push esi
push edi
call fcn.004cfbcf
push 0x1f
push 0xfb
push esi
push edi
call fcn.004cfbcf
add esp, 0x40
push 0x1f
push 0xfa
push esi
push edi
call fcn.004cfbcf
push 0
push 0x50
push 0
push edi
call fcn.004cfbcf
push 0xf0
push esi
push 0x19
push edi
call fcn.004cfbcf
add esp, 0x30
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0051291c
leave
ret