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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x106c
call fcn.004299a0
and word [ebp - 0x20], 0
push esi
push edi
xor eax, eax
lea edi, [ebp - 0x1e]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
or esi, 0xffffffff
stosw word es:[edi], ax
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], esi
mov byte [ebp - 1], 0
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
test eax, eax
mov dword [ebp - 0x10], eax
je 0x41991d
mov edi, dword [sym.imp.WS2_32.dll_socket]
push 0
push 2
push 2
call edi
cmp eax, esi
mov dword [ebp - 0x24], eax
je 0x419914
push 4
lea ecx, [ebp - 0x28]
push ecx
push 0x20
push 0xffff
push eax
mov dword [ebp - 0x28], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, esi
je 0x4198f5
push 0
push 1
push 2
call edi
cmp eax, esi
mov dword [ebp - 8], eax
je 0x4198f5
mov ax, word [ebx + 0x30]
mov edi, dword [sym.imp.WS2_32.dll_htonl]
push 0
mov word [ebp - 0x20], 2
mov word [ebp - 0x1e], ax
call edi
mov dword [ebp - 0x1c], eax
push 0x10
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, esi
je 0x4198f5
push bind
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, esi
je 0x4198f5
push 8
push dword [ebp - 0x10]
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, esi
je 0x4198f5
mov ax, word [ebx + 0x30]
push esi
mov word [ebp - 0x20], 2
mov word [ebp - 0x1e], ax
call edi
push dword [ebp + 8]
mov dword [ebp - 0x1c], eax
mov word [ebp - 0x1068], 0x1010
call fcn.00426760
push dword [ebp + 8]
add eax, 0xa
mov dword [ebp - 0x106c], eax
mov eax, dword [ebx + 4]
mov dword [ebp - 0x1066], eax
lea eax, [ebp - 0x1062]
push eax
call fcn.004278c0
add esp, 0xc
push 0x10
lea eax, [ebp - 0x20]
push eax
push 0
push dword [ebp - 0x106c]
lea eax, [ebp - 0x106c]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, esi
jne 0x419800
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.CAutoFetch::P2PDownload_sendto_failed_with__d_n
call fcn.004101cb
pop ecx
pop ecx
jmp 0x4198f5
mov eax, dword [ebp - 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov dword [ebp - 0x38], eax
mov eax, dword [ebx + 0x3c]
mov dword [ebp - 0x34], eax
jmp 0x41986c
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 0x10]
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
cmp eax, esi
je 0x4198f5
test byte [ebp - 0x64], 8
je 0x41986c
cmp dword [ebp - 0x54], 0
jne 0x4198f5
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 8]
mov dword [ebp - 0x2c], 0x10
call dword [sym.imp.WS2_32.dll_accept]
cmp eax, esi
mov dword [ebp - 0xc], eax
jne 0x41987f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x4198f5
push dword [ebp + 0x10]
lea eax, [ebp - 0x38]
push 0
push eax
push 2
call edi
test eax, eax
je 0x419814
jmp 0x4198f5
push dword [ebp - 0x1e]
call dword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
push eax
movzx eax, byte [ebp - 0x19]
push eax
movzx eax, byte [ebp - 0x1a]
push eax
movzx eax, byte [ebp - 0x1b]
push eax
movzx eax, byte [ebp - 0x1c]
push eax
push str.socket_accepted_from__d._d._d._d__d__n
call fcn.004101cb
add esp, 0x18
push 4
lea eax, [ebp - 0x30]
push eax
push 0x1002
push 0xffff
push dword [ebp - 0xc]
mov dword [ebp - 0x30], 0x4000
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, esi
je 0x4198f5
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_closesocket]
push dword [ebp + 0x14]
mov dword [ebp - 8], esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 0xc]
push ebx
call fcn.00419926
mov byte [ebp - 1], al
push dword [ebp - 0x24]
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
cmp dword [ebp - 8], esi
je 0x41990a
push dword [ebp - 8]
call edi
cmp dword [ebp - 0xc], esi
je 0x419914
push dword [ebp - 0xc]
call edi
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov al, byte [ebp - 1]
pop edi
pop esi
leave
ret 0x10