Function at 0x48371a
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 [0x5345d0]
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.004b53e0
push 0x4f
lea eax, [ebp - 0x57]
push esi
push eax
mov byte [ebp - 0x1f9], 0
mov byte [ebp - 0x58], 0
call fcn.004b53e0
add esp, 0x18
mov edx, ebx
call fcn.0047c3ca
test eax, eax
je 0x483788
or eax, 0xffffffff
jmp 0x48396a
push 0x10
lea eax, [ebp - 0x68]
push esi
push eax
call fcn.004b53e0
add esp, 0xc
lea eax, [ebp - 0x1f8]
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x4837b9
push str.:7:TelNetConnect___FAILED:_WSAStartup___FAILED:_Winsock_could_not_be_initialized.
call fcn.004178df
pop ecx
jmp 0x483780
mov eax, dword [ebp + 8]
cmp eax, esi
jle 0x4837c9
cmp eax, 0x10000
jl 0x4837e2
cmp eax, esi
je 0x4837da
push eax
push ebx
push str.:7:TelNetConnect___was_given_an_invalid_port:__s___d
call fcn.00417db7
add esp, 0xc
call fcn.004816bb
mov dword [ebp + 8], eax
push 0x50
lea eax, [ebp - 0x58]
push eax
push ebx
call fcn.00442354
add esp, 0xc
test eax, eax
jne 0x48384a
push ebx
call sub.WSOCK32.dll_gethostbyname
mov esi, eax
test esi, esi
jne 0x483814
call sub.WSOCK32.dll_WSACleanup
push ebx
push str.:7:TelNetConnect___FAILED:_ResolveHostNameToIP__s__FAILED:_gethostbyname___also_failed.
call fcn.004178df
pop ecx
jmp 0x4837b6
push ebx
push ebx
push str.:7:TelNetConnect___encountered_a_problem:__ResolveHostNameToIP__s__FAILED__but_gethostbyname__s__SUCCEEDED_
call fcn.00417db7
add esp, 0xc
cmp word [esi + 0xa], 4
jle 0x483830
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.004b4cb0
add esp, 0xc
xor esi, esi
jmp 0x483855
lea ecx, [ebp - 0x58]
call fcn.0044227c
mov dword [ebp - 0x64], eax
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
jne 0x483876
call sub.WSOCK32.dll_WSACleanup
push str.:7:TelNetConnect___FAILED:_socket___returned_INVALID_SOCKET
jmp 0x4837b1
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 0x4838e1
push edi
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
push str.127.0.0.1
push ebx
call fcn.0047d058
test eax, eax
pop ecx
pop ecx
jne 0x483780
inc dword [0x642e24]
cmp dword [0x642e24], 3
jg 0x483780
push dword [ebp + 8]
push ebx
push str.:7:TelNetConnect___FAILED:_connect___FAILED_to_establish_the_connection:__s:_d
call fcn.004178df
add esp, 0xc
jmp 0x483780
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 0x483968
push esi
push 0xfb
mov esi, 0xff
push esi
push edi
call fcn.004839ad
push 1
lea ebx, [esi - 2]
push ebx
push esi
push edi
call fcn.004839ad
push 0
push ebx
push esi
push edi
call fcn.004839ad
push 0x1f
push 0xfb
push esi
push edi
call fcn.004839ad
add esp, 0x40
push 0x1f
push 0xfa
push esi
push edi
call fcn.004839ad
push 0
push 0x50
push 0
push edi
call fcn.004839ad
push 0xf0
push esi
push 0x19
push edi
call fcn.004839ad
add esp, 0x30
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b4c95
leave
ret