Function at 0x140011442
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Convert ip address from string
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
jmp 0x140015570
push rbp
push rdi
mov eax, 0x1948
call fcn.140011127
sub rsp, rax
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x4ca
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rax, qword [0x140026040]
xor rax, rbp
mov qword [rbp + 0x1918], rax
lea rcx, [0x14002c0f8]
call fcn.14001160e
nop
lea rdx, [rbp + 0x10]
mov cx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [rbp + 0x1c4], eax
cmp dword [rbp + 0x1c4], 0
je 0x14001560e
lea rdx, str.WSAStartup_failed:
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400110b4
mov edx, dword [rbp + 0x1c4]
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
lea rdx, [0x140011041]
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
mov eax, 1
jmp 0x140015aa0
mov r8d, 6
mov edx, 1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbp + 0x1e8], rax
cmp qword [rbp + 0x1e8], 0xffffffffffffffff
jne 0x140015687
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp + 0x1904], eax
lea rdx, str.Error_at_socket__:
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400110b4
mov ecx, dword [rbp + 0x1904]
mov edx, ecx
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
lea rdx, [0x140011041]
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
call qword [sym.imp.WS2_32.dll_WSACleanup]
nop
mov eax, 1
jmp 0x140015aa0
mov eax, 2
mov word [rbp + 0x208], ax
mov cx, 0x12ae
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp + 0x20a], ax
lea r8, [rbp + 0x20c]
lea rdx, str.127.0.0.1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_pton]
nop
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rbp + 0x208]
mov rcx, qword [rbp + 0x1e8]
call qword [sym.imp.WS2_32.dll_connect]
mov dword [rbp + 0x1c4], eax
cmp dword [rbp + 0x1c4], 0xffffffff
jne 0x140015747
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp + 0x1904], eax
lea rdx, str.Unable_to_connect_to_server:
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400110b4
mov ecx, dword [rbp + 0x1904]
mov edx, ecx
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
lea rdx, [0x140011041]
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
mov rcx, qword [rbp + 0x1e8]
call qword [sym.imp.WS2_32.dll_closesocket]
nop
call qword [sym.imp.WS2_32.dll_WSACleanup]
nop
mov eax, 1
jmp 0x140015aa0
lea rdx, str.Successfully_connected_to_the_server_
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400110b4
lea rdx, [0x140011041]
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
lea rax, str.Hello__this_is_a_large_message_that_needs_to_be_sent_in_multiple_packetsfdsjfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpacketsfdsjffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpacketsfdsjffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpacketsfdsjffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpacketsfdsjffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpacketsfdsjffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpacketsfdsjffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpacketsfdsjffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpacketsfdsjffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpacketsfdsjffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpacketsfdsjffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpacketsfdsjffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpacketsfdsjffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpacketsfdsjffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpacketsfdsjfffffffffffffffffffffffffffffff
mov qword [rbp + 0x238], rax
mov rcx, qword [rbp + 0x238]
call fcn.1400112a3
mov qword [rbp + 0x258], rax
mov qword [rbp + 0x278], 0
mov rax, qword [rbp + 0x258]
cmp qword [rbp + 0x278], rax
jae 0x1400158ee
mov rax, qword [rbp + 0x278]
mov rcx, qword [rbp + 0x258]
sub rcx, rax
mov rax, rcx
cmp rax, 0x1000
jbe 0x1400157d4
mov qword [rbp + 0x1908], 0x1000
jmp 0x1400157ef
mov rax, qword [rbp + 0x278]
mov rcx, qword [rbp + 0x258]
sub rcx, rax
mov rax, rcx
mov qword [rbp + 0x1908], rax
mov rax, qword [rbp + 0x1908]
mov qword [rbp + 0x298], rax
mov rax, qword [rbp + 0x278]
mov rcx, qword [rbp + 0x238]
add rcx, rax
mov rax, rcx
xor r9d, r9d
mov r8d, dword [rbp + 0x298]
mov rdx, rax
mov rcx, qword [rbp + 0x1e8]
call qword [sym.imp.WS2_32.dll_send]
mov dword [rbp + 0x1c4], eax
cmp dword [rbp + 0x1c4], 0xffffffff
jne 0x14001589a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp + 0x1904], eax
lea rdx, str.send_failed:
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400110b4
mov ecx, dword [rbp + 0x1904]
mov edx, ecx
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
lea rdx, [0x140011041]
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
mov rcx, qword [rbp + 0x1e8]
call qword [sym.imp.WS2_32.dll_closesocket]
nop
call qword [sym.imp.WS2_32.dll_WSACleanup]
nop
mov eax, 1
jmp 0x140015aa0
movsxd rax, dword [rbp + 0x1c4]
mov rcx, qword [rbp + 0x278]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x278], rax
lea rdx, str.Bytes_Sent:
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400110b4
mov rdx, qword [rbp + 0x278]
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_long_unsigned___int64_____ptr64]
lea rdx, [0x140011041]
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
jmp 0x140015797
lea rdx, str.Receiving_data...
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400110b4
lea rdx, [0x140011041]
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
xor eax, eax
cmp eax, 1
je 0x140015a7b
xor r9d, r9d
mov r8d, 0x1000
lea rdx, [rbp + 0x2c0]
mov rcx, qword [rbp + 0x1e8]
call qword [sym.imp.WS2_32.dll_recv]
mov dword [rbp + 0x1c4], eax
cmp dword [rbp + 0x1c4], 0
jle 0x140015a02
lea rdx, str.Bytes_received:
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400110b4
mov edx, dword [rbp + 0x1c4]
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
lea rdx, [0x140011041]
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
movsxd rax, dword [rbp + 0x1c4]
mov r8, rax
lea rdx, [rbp + 0x2c0]
lea rcx, [rbp + 0x18d8]
call fcn.1400110a5
mov qword [rbp + 0x1908], rax
mov rax, qword [rbp + 0x1908]
mov qword [rbp + 0x1910], rax
lea rdx, str.Received_data:
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400110b4
mov rdx, qword [rbp + 0x1910]
mov rcx, rax
call fcn.140011587
lea rdx, [0x140011041]
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
lea rcx, [rbp + 0x18d8]
call fcn.14001112c
nop
cmp dword [rbp + 0x1c4], 0x1000
jge 0x140015a00
jmp 0x140015a7b
jmp 0x140015a76
cmp dword [rbp + 0x1c4], 0
jne 0x140015a33
lea rdx, str.Connection_closed
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400110b4
lea rdx, [0x140011041]
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
jmp 0x140015a7b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp + 0x1904], eax
lea rdx, str.recv_failed:
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400110b4
mov ecx, dword [rbp + 0x1904]
mov edx, ecx
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
lea rdx, [0x140011041]
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
jmp 0x140015a7b
jmp 0x140015912
mov rcx, qword [rbp + 0x1e8]
call qword [sym.imp.WS2_32.dll_closesocket]
nop
call qword [sym.imp.WS2_32.dll_WSACleanup]
nop
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
call qword [sym.imp.MSVCP140D.dll_public:_int___cdecl_std::basic_istream_char__struct_std::char_traits_char__::get_void____ptr64]
nop
xor eax, eax
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, reloc.WS2_32.dll_closesocket
call fcn.14001151e
mov rax, rdi
mov rcx, qword [rbp + 0x1918]
xor rcx, rbp
call fcn.1400112fd
lea rsp, [rbp + 0x1928]
pop rdi
pop rbp
ret