Function at 0x40dde0
Capabilities:
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x42d084]
xor eax, ebp
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], 0x10
mov dword [ebp - 8], 1
mov eax, dword [0x42f5cc]
and eax, 1
je 0x40de30
push str.solisten
push 0x42722c
mov ecx, dword [0x42f5c8]
push ecx
call fcn.00414be4
add esp, 0xc
mov edx, dword [0x42f5c8]
push edx
call fcn.00414b88
add esp, 4
mov eax, dword [0x42f5cc]
and eax, 1
je 0x40de8d
mov ecx, dword [0x42f5c8]
push ecx
push 0x20
call fcn.00415811
add esp, 8
movzx edx, word [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
push eax
push str.port___d
mov ecx, dword [0x42f5c8]
push ecx
call fcn.00414be4
add esp, 0xc
mov edx, dword [0x42f5c8]
push edx
push 0xa
call fcn.00415811
add esp, 8
mov eax, dword [0x42f5c8]
push eax
call fcn.00414b88
add esp, 4
mov ecx, dword [0x42f5cc]
and ecx, 1
je 0x40dee7
mov edx, dword [0x42f5c8]
push edx
push 0x20
call fcn.00415811
add esp, 8
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_htonl]
push eax
push str.laddr___x
mov ecx, dword [0x42f5c8]
push ecx
call fcn.00414be4
add esp, 0xc
mov edx, dword [0x42f5c8]
push edx
push 0xa
call fcn.00415811
add esp, 8
mov eax, dword [0x42f5c8]
push eax
call fcn.00414b88
add esp, 4
mov ecx, dword [0x42f5cc]
and ecx, 1
je 0x40df45
mov edx, dword [0x42f5c8]
push edx
push 0x20
call fcn.00415811
add esp, 8
movzx eax, word [ebp + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_htons]
movzx ecx, ax
push ecx
push str.lport___d
mov edx, dword [0x42f5c8]
push edx
call fcn.00414be4
add esp, 0xc
mov eax, dword [0x42f5c8]
push eax
push 0xa
call fcn.00415811
add esp, 8
mov ecx, dword [0x42f5c8]
push ecx
call fcn.00414b88
add esp, 4
mov edx, dword [0x42f5cc]
and edx, 1
je 0x40df9e
mov eax, dword [0x42f5c8]
push eax
push 0x20
call fcn.00415811
add esp, 8
mov ecx, dword [ebp + 0x14]
push ecx
call dword [sym.imp.WS2_32.dll_htonl]
push eax
push str.flags___x
mov edx, dword [0x42f5c8]
push edx
call fcn.00414be4
add esp, 0xc
mov eax, dword [0x42f5c8]
push eax
push 0xa
call fcn.00415811
add esp, 8
mov ecx, dword [0x42f5c8]
push ecx
call fcn.00414b88
add esp, 4
mov edx, dword [ebp + 0x14]
push edx
call dword [sym.imp.WS2_32.dll_htonl]
push eax
movzx eax, word [ebp + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_htons]
movzx ecx, ax
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htonl]
push eax
movzx eax, word [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_htons]
movzx ecx, ax
push ecx
push str.solisten_nport___d_nladdr___08x_nlport___d_nflags___x_n
mov edx, dword [str.._Xrnetwk.log]
push edx
call fcn.004063b0
push eax
call fcn.00406470
add esp, 0x1c
call fcn.0040cb50
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x40e001
xor eax, eax
jmp 0x40e1ad
mov eax, dword [ebp - 0x28]
push eax
call fcn.00411ad0
add esp, 4
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x30]
mov dword [ecx + 0x2b], edx
cmp dword [ebp - 0x30], 0
jne 0x40e032
mov eax, dword [ebp - 0x28]
push eax
call fcn.00415b3d
add esp, 4
xor eax, eax
jmp 0x40e1ad
push 0x42f400
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.00407340
add esp, 8
mov edx, dword [ebp + 0x14]
and edx, 0x200
je 0x40e05d
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 0x2b]
mov edx, 0x12c
mov word [ecx + 0xe], dx
mov eax, dword [ebp + 0x14]
or eax, 0x100
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0x27], eax
mov edx, dword [ebp - 0x28]
mov ax, word [ebp + 0x10]
mov word [edx + 0x22], ax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 0x1c], edx
mov eax, 2
mov word [ebp - 0x24], ax
cmp dword [0x42f668], 0
jne 0x40e097
cmp dword [ebp + 0x18], 0
je 0x40e0a0
mov dword [ebp - 0x10], 0
jmp 0x40e0a7
mov dword [ebp - 0x10], 0x7f000001
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x20], edx
mov ax, word [ebp + 8]
mov word [ebp - 0x22], ax
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jl 0x40e116
push 4
lea ecx, [ebp - 8]
push ecx
push 4
push 0xffff
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jl 0x40e116
push 0x10
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x40e116
push 1
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jge 0x40e143
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.0040cba0
add esp, 4
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
xor eax, eax
jmp 0x40e1ad
push 4
lea eax, [ebp - 8]
push eax
push 0x100
push 0xffff
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.WS2_32.dll_getsockname]
mov edx, dword [ebp - 0x28]
mov ax, word [ebp - 0x22]
mov word [edx + 0x20], ax
cmp dword [ebp - 0x20], 0
je 0x40e18b
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [0x42f3e0]
jne 0x40e198
mov edx, dword [ebp - 0x28]
mov eax, dword [0x42f3a4]
mov dword [edx + 0x18], eax
jmp 0x40e1a1
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x20]
mov dword [ecx + 0x18], edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 4]
mov dword [eax + 8], ecx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004149ef
mov esp, ebp
pop ebp
ret