Function at 0x4d8cda
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 [0x5f2e68]
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.005306b0
push 0x4f
lea eax, [ebp - 0x57]
push esi
push eax
mov byte [ebp - 0x1f9], 0
mov byte [ebp - 0x58], 0
call fcn.005306b0
add esp, 0x18
mov edx, ebx
call fcn.004ccc0d
test eax, eax
je 0x4d8d48
or eax, 0xffffffff
jmp 0x4d8f55
push 0x10
lea eax, [ebp - 0x68]
push esi
push eax
call fcn.005306b0
add esp, 0xc
lea eax, [ebp - 0x1f8]
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x4d8d79
push str.:7:TelNetConnect___FAILED:_WSAStartup___FAILED:_Winsock_could_not_be_initialized.
call fcn.0042b70b
pop ecx
jmp 0x4d8d40
mov eax, dword [ebp + 8]
cmp eax, esi
jle 0x4d8d89
cmp eax, 0x10000
jl 0x4d8da2
cmp eax, esi
je 0x4d8d9a
push eax
push ebx
push str.:7:TelNetConnect___was_given_an_invalid_port:__s___d
call fcn.0042bd38
add esp, 0xc
call fcn.004d664e
mov dword [ebp + 8], eax
push 0x50
lea eax, [ebp - 0x58]
push eax
push ebx
call fcn.004708b9
add esp, 0xc
test eax, eax
jne 0x4d8e0a
push ebx
call sub.WSOCK32.dll_gethostbyname
mov esi, eax
test esi, esi
jne 0x4d8dd4
call sub.WSOCK32.dll_WSACleanup
push ebx
push str.:7:TelNetConnect___FAILED:_ResolveHostNameToIP__s__FAILED:_gethostbyname___also_failed.
call fcn.0042b70b
pop ecx
jmp 0x4d8d76
push ebx
push ebx
push str.:7:TelNetConnect___encountered_a_problem:__ResolveHostNameToIP__s__FAILED__but_gethostbyname__s__SUCCEEDED_
call fcn.0042bd38
add esp, 0xc
cmp word [esi + 0xa], 4
jle 0x4d8df0
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.00531bb0
add esp, 0xc
xor esi, esi
jmp 0x4d8e15
lea ecx, [ebp - 0x58]
call fcn.004707e1
mov dword [ebp - 0x64], eax
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
jne 0x4d8e36
call sub.WSOCK32.dll_WSACleanup
push str.:7:TelNetConnect___FAILED:_socket___returned_INVALID_SOCKET
jmp 0x4d8d71
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 0x4d8ecc
push edi
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
push str.127.0.0.1
push ebx
call fcn.004cd9f0
test eax, eax
pop ecx
pop ecx
jne 0x4d8d40
push str.10.210.27.10
push ebx
call fcn.004cd9f0
test eax, eax
pop ecx
pop ecx
je 0x4d8e96
call fcn.004935a3
test eax, eax
jne 0x4d8d40
inc dword [0x709584]
cmp dword [0x709584], 3
jg 0x4d8d40
call fcn.00418463
test eax, eax
jne 0x4d8d40
push dword [ebp + 8]
push ebx
push str.:7:TelNetConnect___FAILED:_connect___FAILED_to_establish_the_connection:__s:_d
call fcn.0042b70b
add esp, 0xc
jmp 0x4d8d40
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 0x4d8f53
push esi
push 0xfb
mov esi, 0xff
push esi
push edi
call fcn.004d8f98
push 1
lea ebx, [esi - 2]
push ebx
push esi
push edi
call fcn.004d8f98
push 0
push ebx
push esi
push edi
call fcn.004d8f98
push 0x1f
push 0xfb
push esi
push edi
call fcn.004d8f98
add esp, 0x40
push 0x1f
push 0xfa
push esi
push edi
call fcn.004d8f98
push 0
push 0x50
push 0
push edi
call fcn.004d8f98
push 0xf0
push esi
push 0x19
push edi
call fcn.004d8f98
add esp, 0x30
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005317e7
leave
ret