Function at 0x401460
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ecx
sub esp, 0x5c4
call sym.___main
lea eax, [ebp - 0x1a4]
mov dword [esp + 4], eax
mov dword [esp], 0x202
call sym._WSAStartup_8
sub esp, 8
test eax, eax
setne al
test al, al
je 0x4014b9
mov dword [esp + 4], str.WSAStartup_failed_n
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov eax, 1
jmp 0x401728
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
call sym._socket_12
sub esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x401504
mov dword [esp + 4], str.Error_creating_socket_n
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
call sym._WSACleanup_0
mov eax, 1
jmp 0x401728
mov word [ebp - 0x1b4], 2
mov dword [esp], 0x1f90
call sym._htons_4
sub esp, 4
mov word [ebp - 0x1b2], ax
mov dword [esp], str.192.168.56.1
call sym._inet_addr_4
sub esp, 4
mov dword [ebp - 0x1b0], eax
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x1b4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._connect_12
sub esp, 0xc
cmp eax, 0xffffffff
sete al
test al, al
je 0x401593
mov dword [esp + 4], str.Connection_failed_n
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
call sym._WSACleanup_0
mov eax, 1
jmp 0x401728
mov dword [esp + 4], str.Connected_to_server_n
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp + 4], str.Enter_message_for_server:
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp + 4], 0x400
lea eax, [ebp - 0x5b4]
mov dword [esp], eax
mov ecx, sym.imp.libstdc_6.dll_std::cin
call sym.std::istream::getline_char__int_
sub esp, 8
lea eax, [ebp - 0x5b4]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x5b4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._send_16
sub esp, 0x10
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x401645
mov dword [esp + 4], str.Send_failed_n
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
call sym._WSACleanup_0
mov eax, 1
jmp 0x401728
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x400
lea eax, [ebp - 0x5b4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._recv_16
sub esp, 0x10
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x4016a7
mov dword [esp + 4], str.Receive_failed_n
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
call sym._WSACleanup_0
mov eax, 1
jmp 0x401728
cmp dword [ebp - 0x14], 0
jne 0x4016dc
mov dword [esp + 4], str.Server_closed_connection_n
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
nop
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
call sym._WSACleanup_0
mov eax, 0
jmp 0x401728
lea edx, [ebp - 0x5b4]
mov eax, dword [ebp - 0x14]
add eax, edx
mov byte [eax], 0
mov dword [esp + 4], str.Server:
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov edx, eax
lea eax, [ebp - 0x5b4]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
jmp 0x4015a7
mov ecx, dword [ebp - 4]
leave
lea esp, [ecx - 4]
ret