Function at 0x4faf80
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x28
mov eax, dword [0x632f90]
xor eax, esp
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x2c]
push ebx
push ebp
mov ebp, dword [esp + 0x40]
push esi
or esi, 0xffffffff
or ebx, esi
cmp eax, 2
je 0x4fafad
cmp eax, 1
je 0x4fafad
lea eax, [esi + 2]
jmp 0x4fafaf
xor eax, eax
cmp dword [esp + 0x40], 0
jne 0x4fb181
test eax, eax
jne 0x4fb181
test ebp, ebp
jne 0x4fafe6
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00526f37
add esp, 0x28
ret
push edi
push 0
push dword [esp + 0x44]
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
test edi, edi
js 0x4fb16b
xorps xmm0, xmm0
mov eax, 2
push 0x7f000001
movlpd qword [esp + 0x20], xmm0
mov word [esp + 0x18], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x18], eax
xor eax, eax
mov word [esp + 0x16], ax
lea eax, [esp + 0x14]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x4fb143
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x4fb143
push 0
push dword [esp + 0x44]
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
test esi, esi
js 0x4fb143
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x10
push eax
lea eax, [esp + 0x28]
xorps xmm0, xmm0
push eax
push edi
movups xmmword [esp + 0x30], xmm0
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x4fb143
cmp dword [esp + 0x10], 0x10
jne 0x4fb13c
push 0x10
lea eax, [esp + 0x28]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4fb143
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x10
push eax
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov ebx, eax
test ebx, ebx
js 0x4fb143
cmp dword [esp + 0x10], 0x10
jne 0x4fb13c
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x28]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x4fb143
cmp dword [esp + 0x10], 0x10
jne 0x4fb13c
mov ax, word [esp + 0x14]
cmp ax, word [esp + 0x24]
jne 0x4fb13c
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x28]
jne 0x4fb13c
mov ax, word [esp + 0x16]
cmp ax, word [esp + 0x26]
jne 0x4fb13c
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
mov dword [ebp], esi
xor eax, eax
pop esi
mov dword [ebp + 4], ebx
pop ebp
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00526f37
add esp, 0x28
ret
mov ebp, 0x2745
jmp 0x4fb14b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
cmp esi, 0xffffffff
je 0x4fb15c
push esi
call edi
cmp ebx, 0xffffffff
je 0x4fb164
push ebx
call edi
push ebp
call dword [sym.imp.WS2_32.dll_WSASetLastError]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00526f37
add esp, 0x28
ret
push 0x273f
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ecx, dword [esp + 0x30]
or eax, 0xffffffff
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00526f37
add esp, 0x28
ret