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

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ebx
push ecx
sub esp, 0x5c0
call dbg.__main
lea eax, [ebp - 0x5ac]
mov dword [esp + 4], eax
mov dword [esp], 0x202
mov eax, dword [sym.imp.WSOCK32.DLL_WSAStartup]
call eax
sub esp, 8
test eax, eax
setne al
test al, al
je 0x401583
mov eax, dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
call eax
mov ebx, eax
mov dword [esp + 4], str.Failed._Error_Code:
mov dword [esp], 0x488140
call method.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], ebx
mov ecx, eax
call method.std::ostream.operator___int_
sub esp, 4
mov dword [esp], method.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 method.std::ostream.operator___std::ostream____std::ostream__
sub esp, 4
mov eax, 1
jmp 0x40178f
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 2
mov eax, dword [sym.imp.WSOCK32.DLL_socket]
call eax
sub esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
sete al
test al, al
je 0x4015f7
mov eax, dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
call eax
mov ebx, eax
mov dword [esp + 4], str.Could_not_create_socket:
mov dword [esp], 0x488140
call method.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], ebx
mov ecx, eax
call method.std::ostream.operator___int_
sub esp, 4
mov dword [esp], method.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 method.std::ostream.operator___std::ostream____std::ostream__
sub esp, 4
mov eax, 1
jmp 0x40178f
mov dword [esp], str.127.0.0.1
mov eax, dword [sym.imp.WSOCK32.DLL_inet_addr]
call eax
sub esp, 4
mov dword [ebp - 0x18], eax
mov word [ebp - 0x1c], 2
mov dword [esp], 0x400
mov eax, dword [sym.imp.WSOCK32.DLL_htons]
call eax
sub esp, 4
mov word [ebp - 0x1a], ax
mov eax, 0x10
mov dword [esp + 8], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_connect]
call eax
sub esp, 0xc
shr eax, 0x1f
test al, al
je 0x401692
mov eax, dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
call eax
mov ebx, eax
mov dword [esp + 4], str.Connect_error:
mov dword [esp], 0x488140
call method.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], ebx
mov ecx, eax
call method.std::ostream.operator___int_
sub esp, 4
mov dword [esp], method.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 method.std::ostream.operator___std::ostream____std::ostream__
sub esp, 4
mov eax, 1
jmp 0x40178f
mov dword [esp + 4], str.Ket_noi_toi_server__n
mov dword [esp], 0x488140
call method.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.Gui_tin_nhan:
mov dword [esp], 0x488140
call method.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 - 0x41c]
mov dword [esp], eax
mov ecx, 0x487f00
call method.std::istream.getline_char__int_
sub esp, 8
lea eax, [ebp - 0x41c]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x41c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_send]
call eax
sub esp, 0x10
shr eax, 0x1f
test al, al
je 0x401755
mov eax, dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
call eax
mov ebx, eax
mov dword [esp + 4], str.Send_failed:
mov dword [esp], 0x488140
call method.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], ebx
mov ecx, eax
call method.std::ostream.operator___int_
sub esp, 4
mov dword [esp], method.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 method.std::ostream.operator___std::ostream____std::ostream__
sub esp, 4
mov eax, 1
jmp 0x40178f
mov dword [esp + 4], 0x48907b
lea eax, [ebp - 0x41c]
mov dword [esp], eax
call sym._strcmp
test eax, eax
jne 0x4016a6
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_closesocket]
call eax
sub esp, 4
mov eax, dword [sym.imp.WSOCK32.DLL_WSACleanup]
call eax
mov eax, 0
lea esp, [ebp - 8]
pop ecx
pop ebx
pop ebp
lea esp, [ecx - 4]
ret