Function at 0x470fb0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration
Start tcp server

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov esi, 0x320
mov rbp, qword [sym.imp.WS2_32.dll_socket]
test rcx, rcx
mov qword [rsp + 0xd0], rcx
mov dword [rsp + 0xd8], edx
je 0x471232
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
mov r12, qword [sym.imp.WS2_32.dll_htonl]
mov r15, qword [sym.imp.WS2_32.dll_bind]
mov r13, qword [sym.imp.WS2_32.dll_listen]
mov qword [rsp + 0x20], rax
jmp 0x47101e
mov rcx, rbx
call rdx
sub esi, 1
je 0x471140
mov dword [rsp + 0x44], 0x10
mov dword [rsp + 0x48], 1
mov r8d, 6
mov dword [rsp + 0x4c], 0
mov edx, 1
mov ecx, 2
call rbp
cmp rax, 0xffffffffffffffff
mov rbx, rax
je 0x471140
lea rdi, [rsp + 0x50]
mov edx, 2
xor ecx, ecx
mov word [rsp + 0x50], dx
mov word [rsp + 0x52], cx
mov ecx, 0x7f000001
call r12
mov rdx, rdi
mov dword [rsp + 0x54], eax
mov r8d, 0x10
mov rcx, rbx
call r15
test eax, eax
mov rdx, qword [sym.imp.WS2_32.dll_closesocket]
jne 0x471010
mov edx, 1
mov rcx, rbx
call r13
test eax, eax
mov rdx, qword [sym.imp.WS2_32.dll_closesocket]
jne 0x471010
lea r14, [rsp + 0x44]
mov rdx, rdi
mov rcx, rbx
mov r8, r14
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
mov rdx, qword [rsp + 0x20]
jne 0x471010
mov r8d, 6
mov edx, 1
mov ecx, 2
call rbp
cmp rax, 0xffffffffffffffff
mov qword [rsp + 0x28], rax
je 0x471224
mov rcx, rax
lea rax, [rsp + 0x48]
mov edx, 0x8004667e
mov qword [rsp + 0x38], rax
mov r8, rax
mov rax, qword [sym.imp.WS2_32.dll_ioctlsocket]
mov qword [rsp + 0x30], rax
call rax
test eax, eax
je 0x471180
mov rdx, qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, rbx
mov qword [rsp + 0x30], rdx
call rdx
mov rcx, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x30]
call rdx
sub esi, 1
jne 0x47101e
nop
mov rsi, qword [rsp + 0xd0]
mov rax, 0xffffffffffffffff
mov ecx, 0x274d
mov qword [rsi], rax
mov qword [rsi + 8], rax
call qword [sym.imp.WS2_32.dll_WSASetLastError]
xor eax, eax
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r8d, 0x10
mov rdx, rdi
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x4711a9
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x471118
mov dword [rsp + 0x44], 0x10
lea rdx, [rsp + 0x60]
mov r8, r14
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_accept]
cmp rax, 0xffffffffffffffff
mov rdi, rax
je 0x471118
mov dword [rsp + 0x44], 0x10
lea rdx, [rsp + 0x70]
mov r8, r14
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4711f8
mov eax, dword [rsp + 0x70]
cmp dword [rsp + 0x60], eax
je 0x471244
mov rdx, qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, rdi
mov qword [rsp + 0x30], rdx
call rdx
mov rdx, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x28]
mov qword [rsp + 0x28], rdx
call rdx
mov rdx, qword [rsp + 0x28]
jmp 0x471010
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x471015
mov ecx, 0x271e
call qword [sym.imp.WS2_32.dll_WSASetLastError]
xor eax, eax
jmp 0x471163
mov eax, dword [rsp + 0x74]
cmp dword [rsp + 0x64], eax
jne 0x4711f8
mov eax, dword [rsp + 0xd8]
test eax, eax
je 0x4712a0
mov r8, qword [rsp + 0x38]
mov edx, 0x8004667e
mov rcx, rdi
mov rax, qword [rsp + 0x30]
call rax
test eax, eax
sete al
test al, al
je 0x4711f8
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, qword [rsp + 0xd0]
mov rsi, qword [rsp + 0x28]
mov qword [rax], rdi
mov qword [rax + 8], rsi
mov eax, 1
jmp 0x471163
lea r8, [rsp + 0x4c]
mov edx, 0x8004667e
mov rcx, qword [rsp + 0x28]
mov rax, qword [rsp + 0x30]
call rax
test eax, eax
sete al
jmp 0x471272