Function at 0x40ad34
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x94
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004130e4
mov eax, dword [ebp + 8]
mov dword [eax], 0x419288
mov eax, dword [ebp + 8]
add eax, 0x10
mov dword [esp], eax
call fcn.00412d08
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0
mov eax, dword [ebp + 8]
mov dword [eax + 0x20], 0
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [edx + 0x24], eax
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov dword [edx + 0x28], eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x2c], 0xffffffff
mov eax, dword [ebp + 8]
mov dword [eax + 0x30], 0
mov eax, dword [ebp + 8]
mov byte [eax + 0x34], 0
mov ebx, dword [ebp + 8]
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov dword [esp], 2
call sub.WS2_32.DLL_socket
sub esp, 0xc
mov dword [ebx + 8], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 8], 0xffffffff
jne 0x40ade0
mov dword [esp], str.socket
call sub.msvcrt.dll_perror
jmp 0x40afc0
mov word [ebp - 0x18], 2
mov dword [esp], 0x162e
call sub.WS2_32.DLL_htons
sub esp, 4
mov word [ebp - 0x16], ax
mov dword [ebp - 0x14], 0
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x18]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov dword [esp], eax
call sub.WS2_32.DLL_bind
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x40ae36
mov dword [esp], str.bind
call sub.msvcrt.dll_perror
jmp 0x40afc0
mov dword [ebp - 0x1c], 1
mov dword [esp + 0x10], 4
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x20
mov dword [esp + 4], 0xffff
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov dword [esp], eax
call sub.WS2_32.DLL_setsockopt
sub esp, 0x14
mov ebx, dword [ebp + 8]
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov dword [esp], 0x17
call sub.WS2_32.DLL_socket
sub esp, 0xc
mov dword [ebx + 0xc], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0xc], 0xffffffff
je 0x40afc0
mov word [ebp - 0x48], 0x17
mov dword [esp], 0x162e
call sub.WS2_32.DLL_htons
sub esp, 4
mov word [ebp - 0x46], ax
mov dword [ebp - 0x30], 0
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x48]
add eax, 8
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov dword [esp + 8], 0x1c
lea eax, [ebp - 0x48]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.WS2_32.DLL_bind
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x40af2e
mov dword [esp], str.bind6
call sub.msvcrt.dll_perror
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.WS2_32.DLL_closesocket
sub esp, 4
mov eax, dword [ebp + 8]
mov dword [eax + 0xc], 0xffffffff
jmp 0x40afc0
mov dword [esp + 8], 0x14
mov dword [esp + 4], 0
lea eax, [ebp - 0x68]
mov dword [esp], eax
call sub.msvcrt.dll_memset
lea eax, [ebp - 0x68]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x6c]
mov byte [eax], 0xff
mov eax, dword [ebp - 0x6c]
inc eax
mov byte [eax], 2
mov eax, dword [ebp - 0x6c]
add eax, 0xf
mov byte [eax], 1
mov dword [esp + 0x10], 0x14
lea eax, [ebp - 0x68]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xc
mov dword [esp + 4], 0x29
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.WS2_32.DLL_setsockopt
sub esp, 0x14
test eax, eax
jns 0x40afc0
mov dword [esp], str.IPV6_ADD_MEMBERSHIP
call sub.msvcrt.dll_perror
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.WS2_32.DLL_closesocket
sub esp, 4
mov eax, dword [ebp + 8]
mov dword [eax + 0xc], 0xffffffff
mov ebx, dword [ebp - 4]
leave
ret