Function at 0x4c629b
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, 0x1f8
mov eax, dword [0x6294a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
xor esi, esi
mov word [ebp - 0x64], si
lea edi, [ebp - 0x62]
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 - 0x1f2]
push esi
push eax
mov ebx, ecx
mov word [ebp - 0x1f4], si
call fcn.00508d00
push 0x4f
lea eax, [ebp - 0x53]
push esi
push eax
mov byte [ebp - 0x1f5], 0
mov byte [ebp - 0x54], 0
call fcn.00508d00
push ebx
call fcn.004010dc
add esp, 0x1c
test eax, eax
je 0x4c6308
or eax, 0xffffffff
jmp 0x4c6529
push 0x10
lea eax, [ebp - 0x64]
push esi
push eax
call fcn.00508d00
add esp, 0xc
lea eax, [ebp - 0x1f4]
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x4c6339
push str.:7:TelNetConnect___FAILED:_WSAStartup___FAILED:_Winsock_could_not_be_initialized.
call fcn.004020c2
pop ecx
jmp 0x4c6300
mov eax, dword [ebp + 8]
cmp eax, esi
jle 0x4c6349
cmp eax, 0x10000
jl 0x4c638f
cmp eax, esi
je 0x4c635a
push eax
push ebx
push str.:7:TelNetConnect___was_given_an_invalid_port:__s___d
call fcn.00401375
add esp, 0xc
push 0x17
pop esi
push 0x5da5d8
push str.telnet
call sub.WSOCK32.dll_getservbyname
test eax, eax
jne 0x4c637d
push str.:5:GetDefaultTelNetPort___FAILED:_getservbyname__telnet____tcp___FAILED_to_obtain_the_telnet_service_port.
call fcn.00401375
pop ecx
jmp 0x4c638a
movzx eax, word [eax + 8]
push eax
call sub.WSOCK32.dll_ntohs
movzx esi, ax
mov dword [ebp + 8], esi
xor esi, esi
push 0x50
lea eax, [ebp - 0x54]
push eax
push ebx
call fcn.00401901
add esp, 0xc
test eax, eax
jne 0x4c63fa
push ebx
call sub.WSOCK32.dll_gethostbyname
mov esi, eax
test esi, esi
jne 0x4c63c4
call sub.WSOCK32.dll_WSACleanup
push ebx
push str.:7:TelNetConnect___FAILED:_ResolveHostNameToIP__s__FAILED:_gethostbyname___also_failed.
call fcn.004020c2
pop ecx
jmp 0x4c6336
push ebx
push ebx
push str.:7:TelNetConnect___encountered_a_problem:__ResolveHostNameToIP__s__FAILED__but_gethostbyname__s__SUCCEEDED_
call fcn.00401375
add esp, 0xc
cmp word [esi + 0xa], 4
jle 0x4c63e0
mov word [esi + 0xa], 4
movsx eax, word [esi + 0xa]
push eax
mov eax, dword [esi + 0xc]
push dword [eax]
lea eax, [ebp - 0x60]
push eax
call fcn.00507fb0
add esp, 0xc
xor esi, esi
jmp 0x4c6407
lea eax, [ebp - 0x54]
push eax
call fcn.004017d5
pop ecx
mov dword [ebp - 0x60], eax
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
jne 0x4c6428
call sub.WSOCK32.dll_WSACleanup
push str.:7:TelNetConnect___FAILED:_socket___returned_INVALID_SOCKET
jmp 0x4c6331
push dword [ebp + 8]
call sub.WSOCK32.dll_htons
mov word [ebp - 0x62], ax
push 0x10
lea eax, [ebp - 0x64]
push eax
push edi
mov word [ebp - 0x64], 2
call sub.WSOCK32.dll_connect
test eax, eax
je 0x4c64a0
push edi
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
push str.127.0.0.1
push ebx
call fcn.004020db
test eax, eax
pop ecx
pop ecx
jne 0x4c6300
push str.10.210.27.10
push ebx
call fcn.004020db
inc dword [0x75f16c]
cmp dword [0x75f16c], 3
pop ecx
pop ecx
jg 0x4c6300
push dword [ebp + 8]
push ebx
push str.:7:TelNetConnect___FAILED:_connect___FAILED_to_establish_the_connection:__s:_d
call fcn.004020c2
add esp, 0xc
jmp 0x4c6300
push 1
lea eax, [ebp - 0x1f5]
push eax
push 8
push 0xffff
push edi
mov byte [ebp - 0x1f5], 1
call sub.WSOCK32.dll_setsockopt
cmp dword [ebp + 0xc], esi
je 0x4c6527
push esi
push 0xfb
mov esi, 0xff
push esi
push edi
call fcn.004c33d6
push 1
lea ebx, [esi - 2]
push ebx
push esi
push edi
call fcn.004c33d6
push 0
push ebx
push esi
push edi
call fcn.004c33d6
push 0x1f
push 0xfb
push esi
push edi
call fcn.004c33d6
add esp, 0x40
push 0x1f
push 0xfa
push esi
push edi
call fcn.004c33d6
push 0
push 0x50
push 0
push edi
call fcn.004c33d6
push 0xf0
push esi
push 0x19
push edi
call fcn.004c33d6
add esp, 0x30
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00508cf0
leave
ret