Function at 0x4a5bc4
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 [0x59a240]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
xor eax, eax
push esi
push edi
lea edi, [ebp - 0x64]
xor esi, esi
stosd dword es:[edi], eax
push 0x190
push esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x1f4]
push eax
call fcn.004e4da0
push 0x50
lea eax, [ebp - 0x54]
push esi
push eax
call fcn.004e4da0
push ebx
call fcn.0049f486
add esp, 0x1c
test eax, eax
jne 0x4a5c42
push 0x10
lea eax, [ebp - 0x64]
push esi
push eax
call fcn.004e4da0
add esp, 0xc
lea eax, [ebp - 0x1f4]
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x4a5c54
push str.:7:TelNetConnect___FAILED:_WSAStartup___FAILED:_Winsock_could_not_be_initialized.
call fcn.004255b9
pop ecx
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e3632
leave
ret
mov edi, dword [ebp + 0xc]
test edi, edi
jle 0x4a5c65
cmp edi, 0x10000
jl 0x4a5ca6
test edi, edi
je 0x4a5c76
push edi
push ebx
push str.:7:TelNetConnect___was_given_an_invalid_port:__s___d
call fcn.00425c08
add esp, 0xc
push 0x17
pop edi
push 0x55b67c
push str.telnet
call sub.WSOCK32.dll_getservbyname
test eax, eax
jne 0x4a5c99
push str.:5:GetDefaultTelNetPort___FAILED:_getservbyname__telnet____tcp___FAILED_to_obtain_the_telnet_service_port.
call fcn.00425c08
pop ecx
jmp 0x4a5ca6
movzx eax, word [eax + 8]
push eax
call sub.WSOCK32.dll_ntohs
movzx edi, ax
push 0x50
lea eax, [ebp - 0x54]
push eax
push ebx
call fcn.00463eb7
add esp, 0xc
test eax, eax
jne 0x4a5d15
push ebx
call sub.WSOCK32.dll_gethostbyname
mov esi, eax
test esi, esi
jne 0x4a5cdb
call sub.WSOCK32.dll_WSACleanup
push ebx
push str.:7:TelNetConnect___FAILED:_ResolveHostNameToIP__s__FAILED:_gethostbyname___also_failed.
call fcn.004255b9
pop ecx
jmp 0x4a5c41
push ebx
push ebx
push str.:7:TelNetConnect___encountered_a_problem:__ResolveHostNameToIP__s__FAILED__but_gethostbyname__s__SUCCEEDED_
call fcn.00425c08
movzx eax, word [esi + 0xa]
add esp, 0xc
mov ecx, eax
push 4
pop edx
cmp ax, dx
jle 0x4a5cfe
mov word [esi + 0xa], dx
mov ecx, edx
movsx eax, cx
push eax
mov eax, dword [esi + 0xc]
push dword [eax]
lea eax, [ebp - 0x60]
push eax
call fcn.004e4820
add esp, 0xc
jmp 0x4a5d22
lea eax, [ebp - 0x54]
push eax
call fcn.004607e0
pop ecx
mov dword [ebp - 0x60], eax
push 6
push 1
push 2
pop eax
push eax
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x4a5d45
call sub.WSOCK32.dll_WSACleanup
push str.:7:TelNetConnect___FAILED:_socket___returned_INVALID_SOCKET
jmp 0x4a5c3c
push edi
call sub.WSOCK32.dll_htons
push 2
mov word [ebp - 0x62], ax
pop eax
mov word [ebp - 0x64], ax
lea eax, [ebp - 0x64]
push 0x10
push eax
push esi
call sub.WSOCK32.dll_connect
test eax, eax
je 0x4a5dcc
push esi
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
push str.127.0.0.1
push ebx
call fcn.004a0f55
pop ecx
pop ecx
test eax, eax
jne 0x4a5c42
push str.10.210.27.10
push ebx
call fcn.004a0f55
pop ecx
pop ecx
test eax, eax
je 0x4a5da4
call fcn.0047d25f
test eax, eax
jne 0x4a5c42
mov eax, dword [0x69aa04]
inc eax
mov dword [0x69aa04], eax
cmp eax, 3
jg 0x4a5c42
push edi
push ebx
push str.:7:TelNetConnect___FAILED:_connect___FAILED_to_establish_the_connection:__s:_d
call fcn.004255b9
add esp, 0xc
jmp 0x4a5c42
push 1
lea eax, [ebp - 0x1f5]
mov byte [ebp - 0x1f5], 1
push eax
push 8
push 0xffff
push esi
call sub.WSOCK32.dll_setsockopt
cmp dword [ebp + 0x10], 0
je 0x4a5e58
push 0
mov ebx, 0xfb
push ebx
push 0xff
push esi
call fcn.004a7357
push 1
lea edi, [ebx + 2]
push edi
push 0xff
push esi
call fcn.004a7357
push 0
push edi
add edi, 2
push edi
push esi
call fcn.004a7357
push 0x1f
push ebx
push edi
push esi
call fcn.004a7357
add esp, 0x40
push 0x1f
push 0xfa
push edi
push esi
call fcn.004a7357
push 0
push 0x50
push 0
push esi
call fcn.004a7357
push 0xf0
push edi
push 0x19
push esi
call fcn.004a7357
add esp, 0x30
mov eax, esi
jmp 0x4a5c45