Function at 0x140004f40
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x40
mov rax, qword [0x14002d030]
xor rax, rsp
mov qword [rsp + 0x38], rax
xor r8d, r8d
mov qword [rcx], 0xffffffffffffffff
mov rdi, rcx
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
mov esi, 2
mov ecx, esi
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140004fb8
cmp dword [0x14002da14], 4
jg 0x140004fae
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, eax
lea rdx, str.pgpipe:_could_not_create_socket:_error_code__d
lea ecx, [rsi + 2]
call fcn.1400166d0
mov eax, 0xffffffff
jmp 0x140005176
mov r8d, dword [rsp + 0x20]
lea rdx, [rsp + 0x28]
xor eax, eax
mov rcx, rbx
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x2c], 0x100007f
mov qword [rsp + 0x30], rax
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x140005007
cmp dword [0x14002da14], 4
jg 0x14000509a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.pgpipe:_could_not_bind:_error_code__d
jmp 0x14000508d
mov edx, 1
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x140005032
cmp dword [0x14002da14], 4
jg 0x14000509a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.pgpipe:_could_not_listen:_error_code__d
jmp 0x14000508d
lea r8, [rsp + 0x20]
mov rcx, rbx
lea rdx, [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x140005062
cmp dword [0x14002da14], 4
jg 0x14000509a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.pgpipe:_getsockname___failed:_error_code__d
jmp 0x14000508d
xor r8d, r8d
mov ecx, esi
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
cmp rax, 0xffffffffffffffff
jne 0x1400050ad
cmp dword [0x14002da14], 4
jg 0x14000509a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.pgpipe:_could_not_create_second_socket:_error_code__d
mov r8d, eax
mov ecx, 4
call fcn.1400166d0
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffffff
jmp 0x140005176
mov r8d, dword [rsp + 0x20]
lea rdx, [rsp + 0x28]
movsxd rcx, eax
mov dword [rdi + 4], eax
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x14000510c
cmp dword [0x14002da14], 4
jg 0x1400050eb
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.pgpipe:_could_not_connect_socket:_error_code__d
mov ecx, 4
mov r8d, eax
call fcn.1400166d0
movsxd rcx, dword [rdi + 4]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, rbx
mov dword [rdi + 4], 0xffffffff
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffffff
jmp 0x140005176
lea r8, [rsp + 0x20]
mov rcx, rbx
lea rdx, [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_accept]
cmp rax, 0xffffffffffffffff
jne 0x140005169
cmp dword [0x14002da14], 4
jg 0x140005148
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.pgpipe:_could_not_accept_connection:_error_code__d
mov ecx, 4
mov r8d, eax
call fcn.1400166d0
movsxd rcx, dword [rdi + 4]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, rbx
mov dword [rdi + 4], 0xffffffff
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffffff
jmp 0x140005176
mov rcx, rbx
mov dword [rdi], eax
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.14001e2e0
mov rbx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret