Function at 0x401520
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push rbp
push rbx
sub rsp, 0x428
lea rbp, [rsp + 0x80]
call sym.__main
mov qword [rbp + 0x398], 0xffffffffffffffff
mov qword [rbp + 0x1d8], 0
mov qword [rbp + 0x390], 0
lea rax, str.run_app1
mov qword [rbp + 0x388], rax
mov dword [rbp + 0x384], 0x200
lea rax, [rbp + 0x1e0]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
mov dword [rbp + 0x380], eax
cmp dword [rbp + 0x380], 0
je 0x4015db
lea rax, str.WSAStartup_failed_with_error:
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
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 rcx, rax
mov eax, dword [rbp + 0x380]
mov edx, eax
call sym.std::ostream::operator___int_
mov rcx, rax
mov rax, qword [0x004044c0]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov eax, 1
jmp 0x401aaa
lea rax, [rbp + 0x1a0]
mov r8d, 0x30
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp + 0x1a4], 2
mov dword [rbp + 0x1a8], 1
mov dword [rbp + 0x1ac], 6
lea rdx, [rbp + 0x1d8]
lea rax, [rbp + 0x1a0]
mov r9, rdx
mov r8, rax
lea rax, str.27015
mov rdx, rax
lea rax, str.localhost
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_getaddrinfo]
call rax
mov dword [rbp + 0x380], eax
cmp dword [rbp + 0x380], 0
je 0x4016a1
lea rax, str.getaddrinfo_failed_with_error:
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
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 rcx, rax
mov eax, dword [rbp + 0x380]
mov edx, eax
call sym.std::ostream::operator___int_
mov rcx, rax
mov rax, qword [0x004044c0]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov eax, 1
jmp 0x401aaa
mov rax, qword [rbp + 0x1d8]
mov qword [rbp + 0x390], rax
jmp 0x4017b3
mov rax, qword [rbp + 0x390]
mov ecx, dword [rax + 0xc]
mov rax, qword [rbp + 0x390]
mov edx, dword [rax + 8]
mov rax, qword [rbp + 0x390]
mov eax, dword [rax + 4]
mov r8d, ecx
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov qword [rbp + 0x398], rax
cmp qword [rbp + 0x398], 0xffffffffffffffff
jne 0x401745
lea rax, str.socket_failed_with_error:
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
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 rbx, rax
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
mov rcx, rbx
call sym.std::ostream::operator___int_
mov rcx, rax
mov rax, qword [0x004044c0]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov eax, 1
jmp 0x401aaa
mov rax, qword [rbp + 0x390]
mov rax, qword [rax + 0x10]
mov ecx, eax
mov rax, qword [rbp + 0x390]
mov rdx, qword [rax + 0x20]
mov rax, qword [rbp + 0x398]
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
mov dword [rbp + 0x380], eax
cmp dword [rbp + 0x380], 0xffffffff
jne 0x4017c3
mov rax, qword [rbp + 0x398]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov qword [rbp + 0x398], 0xffffffffffffffff
nop
mov rax, qword [rbp + 0x390]
mov rax, qword [rax + 0x28]
mov qword [rbp + 0x390], rax
cmp qword [rbp + 0x390], 0
jne 0x4016b4
jmp 0x4017c4
nop
mov rax, qword [rbp + 0x1d8]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_freeaddrinfo]
call rax
cmp qword [rbp + 0x398], 0xffffffffffffffff
jne 0x40181f
lea rax, str.Unable_to_connect_to_server_
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
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 rcx, rax
mov rax, qword [0x004044c0]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov eax, 1
jmp 0x401aaa
mov rax, qword [rbp + 0x388]
mov rcx, rax
call sym.strlen
mov ecx, eax
mov rdx, qword [rbp + 0x388]
mov rax, qword [rbp + 0x398]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
mov dword [rbp + 0x380], eax
cmp dword [rbp + 0x380], 0xffffffff
jne 0x4018c9
lea rax, str.send_failed_with_error:
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
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 rbx, rax
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
mov rcx, rbx
call sym.std::ostream::operator___int_
mov rcx, rax
mov rax, qword [0x004044c0]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [rbp + 0x398]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov eax, 1
jmp 0x401aaa
lea rax, str.Command_sent:
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cout]
mov rcx, rax
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 rcx, rax
mov rax, qword [rbp + 0x388]
mov rdx, rax
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 rcx, rax
mov rax, qword [0x004044c0]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [rbp + 0x398]
mov edx, 1
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_shutdown]
call rax
mov dword [rbp + 0x380], eax
cmp dword [rbp + 0x380], 0xffffffff
jne 0x401994
lea rax, str.shutdown_failed_with_error:
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
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 rbx, rax
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
mov rcx, rbx
call sym.std::ostream::operator___int_
mov rcx, rax
mov rax, qword [0x004044c0]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [rbp + 0x398]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov eax, 1
jmp 0x401aaa
mov ecx, dword [rbp + 0x384]
lea rdx, [rbp - 0x60]
mov rax, qword [rbp + 0x398]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
mov dword [rbp + 0x380], eax
cmp dword [rbp + 0x380], 0
jle 0x401a05
lea rax, str.Response_received_from_server:
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cout]
mov rcx, rax
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 rcx, rax
lea rax, [rbp - 0x60]
mov rdx, rax
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 rcx, rax
mov rax, qword [0x004044c0]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
jmp 0x401a7c
cmp dword [rbp + 0x380], 0
jne 0x401a3b
lea rax, str.Connection_closed_by_server.
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cout]
mov rcx, rax
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 rcx, rax
mov rax, qword [0x004044c0]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
jmp 0x401a7c
lea rax, str.recv_failed_with_error:
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
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 rbx, rax
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
mov rcx, rbx
call sym.std::ostream::operator___int_
mov rcx, rax
mov rax, qword [0x004044c0]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
cmp dword [rbp + 0x380], 0
jg 0x401994
mov rax, qword [rbp + 0x398]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov eax, 0
add rsp, 0x428
pop rbx
pop rbp
ret