Function at 0x47ca90
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 0x47ccf0
mov r13, qword [sym.imp.WS2_32.dll_htonl]
mov r12, qword [sym.imp.WS2_32.dll_bind]
mov r15, qword [sym.imp.WS2_32.dll_listen]
jmp 0x47caef
mov rcx, rbx
call r14
sub esi, 1
je 0x47cc80
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 0x47cc80
lea rdi, [rsp + 0x50]
mov ecx, 0x7f000001
mov dword [rsp + 0x50], 2
call r13
mov r8d, 0x10
mov dword [rsp + 0x54], eax
mov rdx, rdi
mov rcx, rbx
call r12
test eax, eax
mov r14, qword [sym.imp.WS2_32.dll_closesocket]
jne 0x47cae0
mov edx, 1
mov rcx, rbx
call r15
test eax, eax
mov r14, qword [sym.imp.WS2_32.dll_closesocket]
jne 0x47cae0
lea rax, [rsp + 0x44]
mov rdx, rdi
mov rcx, rbx
mov qword [rsp + 0x20], rax
mov r8, rax
mov rax, qword [sym.imp.WS2_32.dll_getsockname]
mov qword [rsp + 0x30], rax
call rax
test eax, eax
jne 0x47cae0
mov r8d, 6
mov edx, 1
mov ecx, 2
call rbp
cmp rax, 0xffffffffffffffff
mov qword [rsp + 0x28], rax
je 0x47cae0
mov rcx, rax
lea rax, [rsp + 0x48]
mov edx, 0x8004667e
mov r14, qword [sym.imp.WS2_32.dll_ioctlsocket]
mov qword [rsp + 0x38], rax
mov r8, rax
call r14
test eax, eax
jne 0x47ccd1
mov r8d, 0x10
mov rdx, rdi
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x47ccc0
mov dword [rsp + 0x44], 0x10
lea rdx, [rsp + 0x60]
mov r8, qword [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_accept]
cmp rax, 0xffffffffffffffff
mov rdi, rax
je 0x47ccd1
mov dword [rsp + 0x44], 0x10
lea rdx, [rsp + 0x70]
mov r8, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
mov rax, qword [rsp + 0x30]
call rax
test eax, eax
jne 0x47cc62
mov eax, dword [rsp + 0x70]
cmp dword [rsp + 0x60], eax
jne 0x47cc62
mov eax, dword [rsp + 0x74]
cmp dword [rsp + 0x64], eax
je 0x47ccff
mov rcx, rdi
mov r14, qword [sym.imp.WS2_32.dll_closesocket]
call r14
mov rcx, qword [rsp + 0x28]
call r14
jmp 0x47cae0
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
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x47cc00
mov rcx, rbx
mov r14, qword [sym.imp.WS2_32.dll_closesocket]
call r14
mov rcx, qword [rsp + 0x28]
call r14
jmp 0x47cae6
mov ecx, 0x271e
call qword [sym.imp.WS2_32.dll_WSASetLastError]
xor eax, eax
jmp 0x47cca3
mov eax, dword [rsp + 0xd8]
test eax, eax
je 0x47cd4e
mov r8, qword [rsp + 0x38]
mov edx, 0x8004667e
mov rcx, rdi
call r14
test eax, eax
sete al
test al, al
je 0x47cc62
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 0x47cca3
lea r8, [rsp + 0x4c]
mov edx, 0x8004667e
mov rcx, qword [rsp + 0x28]
call r14
test eax, eax
sete al
jmp 0x47cd1f