Function at 0x405ef0
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:
sub esp, 0x2c
mov eax, dword [0x501230]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
mov ebx, dword [esp + 0x34]
push ebp
mov ebp, dword [sym.imp.WSOCK32.dll_socket]
push esi
push 6
push 1
push 2
call ebp
mov esi, eax
test esi, esi
jns 0x405f5d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call fcn.004067e0
add esp, 4
push eax
push str.cutil_portable_pipe
push str._s:_error_opening_socket___s_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004020f0
add esp, 0x10
or eax, 0xffffffff
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.004c75e8
add esp, 0x2c
ret
push edi
mov edi, dword [sym.imp.WSOCK32.dll_setsockopt]
lea eax, [esp + 0x10]
push 4
push eax
push 4
push 0xffff
push esi
mov dword [esp + 0x24], 1
call edi
test eax, eax
jne 0x406152
push 4
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 1
push eax
push 8
push 0xffff
push esi
call edi
test eax, eax
jne 0x406152
xorps xmm0, xmm0
mov eax, 2
push 0x7f000001
movlpd qword [esp + 0x24], xmm0
mov word [esp + 0x1c], ax
call dword [sym.imp.WSOCK32.dll_htonl]
mov dword [esp + 0x1c], eax
xor eax, eax
mov word [esp + 0x1a], ax
lea eax, [esp + 0x18]
push 0x10
push eax
push esi
call dword [sym.imp.WSOCK32.dll_bind]
test eax, eax
je 0x406026
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call fcn.004067e0
add esp, 4
push eax
push str.cutil_portable_pipe
push str._s:_error_on_binding___s_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004020f0
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.004c75e8
add esp, 0x2c
ret
push 1
push esi
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
je 0x406078
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call fcn.004067e0
add esp, 4
push eax
push str.cutil_portable_pipe
push str._s:_error_on_listen___s_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004020f0
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.004c75e8
add esp, 0x2c
ret
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0x10
push eax
lea eax, [esp + 0x2c]
xorps xmm0, xmm0
push eax
push esi
movups xmmword [esp + 0x34], xmm0
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
je 0x4060e2
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call fcn.004067e0
add esp, 4
push eax
push str.cutil_portable_pipe
push str._s:_getsockname_error___s_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004020f0
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.004c75e8
add esp, 0x2c
ret
push 0
push 1
push 2
call ebp
mov dword [ebx], eax
test eax, eax
jns 0x406135
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call fcn.004067e0
add esp, 4
push eax
push str.cutil_portable_pipe
push str._s:_error_opening_socket___s_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004020f0
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.004c75e8
add esp, 0x2c
ret
push 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], 1
push ecx
push 8
push 0xffff
push eax
call edi
test eax, eax
je 0x406197
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call fcn.004067e0
add esp, 4
push eax
push str.cutil_portable_pipe
push str._s:_error_on_setsockopt___s_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004020f0
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.004c75e8
add esp, 0x2c
ret
push dword [esp + 0x14]
lea eax, [esp + 0x2c]
push eax
push dword [ebx]
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
je 0x4061f1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call fcn.004067e0
add esp, 4
push eax
push str.cutil_portable_pipe
push str._s:_connect_error___s_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004020f0
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.004c75e8
add esp, 0x2c
ret
push 0
push 0
push esi
call dword [sym.imp.WSOCK32.dll_accept]
mov ebp, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov edi, eax
cmp edi, 0xffffffff
jne 0x406223
call ebp
mov esi, eax
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
call fcn.004068d0
mov dword [esi], eax
add esp, 4
mov dword [ebx + 4], edi
jmp 0x40622a
mov dword [ebx + 4], edi
test edi, edi
jns 0x40626b
call ebp
push dword [eax]
call fcn.004067e0
add esp, 4
push eax
push str.cutil_portable_pipe
push str._s:_accept_error___s_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004020f0
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.004c75e8
add esp, 0x2c
ret
push esi
call dword [sym.imp.WSOCK32.dll_closesocket]
cmp eax, 0xffffffff
jne 0x406290
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov esi, eax
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
call fcn.004068d0
add esp, 4
mov dword [esi], eax
mov ecx, dword [esp + 0x38]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004c75e8
add esp, 0x2c
ret