Function at 0x140001000
Capabilities:
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
mov eax, 0x188a8
call fcn.140002230
sub rsp, rax
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x18890], rax
mov ecx, 0x202
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x140001073
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.WSAStartup_failed
call fcn.140001290
mov rcx, rax
lea rdx, [0x140001460]
call qword [sym.imp.MSVCP140.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]
mov eax, 1
mov rcx, qword [rsp + 0x18890]
xor rcx, rsp
call fcn.140001520
add rsp, 0x188a8
ret
xor r8d, r8d
mov qword [rsp + 0x188b0], rbx
mov qword [rsp + 0x188a0], rdi
mov edi, 2
mov ecx, edi
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x1400010d1
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_create_socket
call fcn.140001290
mov rcx, rax
lea rdx, [0x140001460]
call qword [sym.imp.MSVCP140.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]
call qword [sym.imp.WS2_32.dll_WSACleanup]
lea eax, [rdi - 1]
jmp 0x140001262
mov ecx, 0xa50
mov word [rsp + 0x28], di
mov dword [rsp + 0x2c], 0
call qword [sym.imp.WS2_32.dll_htons]
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x28]
mov rcx, rbx
mov word [rsp + 0x2a], ax
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x140001110
lea rdx, str.Bind_failed
jmp 0x14000117a
mov edx, 0x7fffffff
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x14000112c
lea rdx, str.Listen_failed
jmp 0x14000117a
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.waiting_for_connection...
call fcn.140001290
mov rcx, rax
lea rdx, [0x140001460]
call qword [sym.imp.MSVCP140.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]
lea r8, [rsp + 0x20]
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x38]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_accept]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400011af
lea rdx, str.error_accepting_connection
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001290
mov rcx, rax
lea rdx, [0x140001460]
call qword [sym.imp.MSVCP140.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]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
jmp 0x140001262
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.connected_
call fcn.140001290
mov rcx, rax
lea rdx, [0x140001460]
call qword [sym.imp.MSVCP140.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]
xor r9d, r9d
lea rdx, [rsp + 0x1f0]
mov r8d, 0x186a0
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x140001225
xor r9d, r9d
lea rdx, [rsp + 0x1f0]
mov r8d, eax
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_send]
xor r9d, r9d
lea rdx, [rsp + 0x1f0]
mov r8d, 0x186a0
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x1400011f0
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.error_while_getting_data
call fcn.140001290
mov rcx, rax
lea rdx, [0x140001460]
call qword [sym.imp.MSVCP140.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]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
mov rbx, qword [rsp + 0x188b0]
mov rdi, qword [rsp + 0x188a0]
mov rcx, qword [rsp + 0x18890]
xor rcx, rsp
call fcn.140001520
add rsp, 0x188a8
ret