Function at 0x411b50
Capabilities:
Create tcp socket
Create udp socket
Send data
Send data on socket
Set socket configuration
Start tcp server

Disassembly:
mov eax, 0x106c
call fcn.0042f240
mov eax, dword [0x46b600]
mov dword [esp + 0x1068], eax
xor eax, eax
mov dword [esp + 0x52], eax
push ebx
mov dword [esp + 0x5a], eax
push esi
mov dword [esp + 0x62], eax
or esi, 0xffffffff
mov ebx, ecx
mov word [esp + 0x58], 0
mov word [esp + 0x66], ax
mov dword [esp + 0xc], esi
mov byte [esp + 0xb], al
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
test eax, eax
mov dword [esp + 0x10], eax
je 0x411e53
push ebp
push edi
mov edi, dword [sym.imp.WS2_32.dll_socket]
push 0
push 2
push 2
call edi
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x1c], ebp
je 0x411e46
push 4
lea ecx, [esp + 0x30]
push ecx
push 0x20
push 0xffff
push ebp
mov dword [esp + 0x40], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x411e29
push 0
push 1
push 2
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x411e29
mov dx, word [ebx + 0x30]
mov edi, dword [sym.imp.WS2_32.dll_htonl]
push 0
mov word [esp + 0x64], 2
mov word [esp + 0x66], dx
call edi
mov dword [esp + 0x64], eax
push 0x10
lea eax, [esp + 0x64]
push eax
push esi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x411e29
push SysReAllocString
push esi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x411e29
mov ecx, dword [esp + 0x18]
push 8
push ecx
push esi
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x411e29
mov dx, word [ebx + 0x30]
push 0xffffffffffffffff
mov word [esp + 0x64], 2
mov word [esp + 0x66], dx
call edi
mov edi, dword [esp + 0x1080]
mov dword [esp + 0x64], eax
mov eax, edi
mov word [esp + 0x74], 0x1010
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x411c85
sub eax, edx
add eax, 0xa
mov dword [esp + 0x70], eax
mov eax, dword [ebx + 4]
lea edx, [esp + 0x7a]
mov dword [esp + 0x76], eax
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x411ca4
mov edx, dword [esp + 0x70]
push 0x10
lea ecx, [esp + 0x64]
push ecx
push 0
push edx
lea eax, [esp + 0x80]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
jne 0x411ce9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.CAutoFetch::P2PDownload_sendto_failed_with__d_n
call fcn.00416520
add esp, 8
jmp 0x411e29
mov edi, dword [esp + 0x1088]
mov ecx, dword [esp + 0x18]
mov edx, dword [ebx + 0x3c]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push edi
push 0
lea eax, [esp + 0x2c]
push eax
push 2
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edx
call ebp
test eax, eax
jne 0x411e25
lea esp, [esp]
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x34]
push ecx
push edx
push esi
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
cmp eax, 0xffffffff
je 0x411e25
test byte [esp + 0x34], 8
je 0x411d80
mov eax, dword [esp + 0x44]
test eax, eax
jne 0x411e25
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x64]
push ecx
push esi
mov dword [esp + 0x2c], 0x10
call dword [sym.imp.WS2_32.dll_accept]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x411d95
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x411e25
push edi
push 0
lea edx, [esp + 0x2c]
push edx
push 2
call ebp
test eax, eax
je 0x411d20
jmp 0x411e25
mov eax, dword [esp + 0x62]
push eax
call dword [sym.imp.WS2_32.dll_htons]
movzx edx, byte [esp + 0x67]
movzx ecx, ax
movzx eax, byte [esp + 0x66]
push ecx
movzx ecx, byte [esp + 0x69]
push edx
movzx edx, byte [esp + 0x6c]
push eax
push ecx
push edx
push str.socket_accepted_from__d._d._d._d__d__n
call fcn.00416520
mov ecx, dword [esp + 0x2c]
add esp, 0x18
push 4
lea eax, [esp + 0x34]
push eax
push 0x1002
push 0xffff
push ecx
mov dword [esp + 0x44], 0x4000
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x411e25
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [esp + 0x108c]
mov eax, dword [esp + 0x1084]
mov ecx, dword [esp + 0x1080]
push edx
mov edx, dword [esp + 0x18]
push edi
push eax
push ecx
push edx
mov ecx, ebx
or esi, 0xffffffff
call fcn.004118c0
mov byte [esp + 0x13], al
mov ebp, dword [esp + 0x1c]
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
push ebp
call edi
cmp esi, 0xffffffff
je 0x411e3a
push esi
call edi
mov eax, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x411e46
push eax
call edi
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
pop edi
pop ebp
mov ecx, dword [esp + 0x1070]
mov al, byte [esp + 0xb]
pop esi
pop ebx
call fcn.0042f2ae
add esp, 0x106c
ret 0x10