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

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x184
mov dword [ebp - 0xc], str.internal_error
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 + 4], eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x44], 0
mov eax, dword [ebp + 8]
mov dword [eax + 0x40], 0
mov dword [ebp - 0x10], 1
mov dword [esp + 0x10], 4
lea eax, [ebp - 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x20
mov dword [esp + 4], 0xffff
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.WS2_32.DLL_setsockopt
sub esp, 0x14
test eax, eax
je 0x40845c
mov dword [esp], str.setsockopt
call sub.msvcrt.dll_perror
jmp 0x40860c
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov word [ebp - 0x28], 2
mov dword [ebp - 0x24], 0
mov word [ebp - 0x26], 0
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.WS2_32.DLL_bind
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x4084c0
mov dword [esp], 0x417a22
call sub.msvcrt.dll_perror
jmp 0x40860c
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004081b8
mov ebx, dword [ebp + 8]
mov dword [esp], 0
call sub.msvcrt.dll_time
and eax, 0xffff
mov dword [ebx + 0x48], eax
mov dword [ebp - 0x2c], 0
cmp dword [ebp - 0x2c], 2
ja 0x408605
mov dword [ebp - 0x30], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4c]
cmp eax, dword [ebp - 0x30]
jbe 0x4085fb
mov dword [ebp - 0x34], 0x64
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov eax, dword [ebp - 0x30]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00407e6e
test al, al
jne 0x408570
call sub.WS2_32.DLL_WSAGetLastError
mov dword [esp + 4], eax
mov dword [esp], str.sendto_error__d_n
call sub.msvcrt.dll_printf
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sub.msvcrt.dll_fflush
jmp 0x40860c
mov eax, dword [ebp - 0x30]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x34]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0x16
lea eax, [ebp - 0x58]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00407eba
test eax, eax
js 0x4085f1
cmp dword [ebp - 0x46], 0
jne 0x4085f1
cmp dword [ebp - 0x30], 0
je 0x4085db
mov dword [esp + 8], 6
mov edx, dword [ebp - 0x30]
mov eax, edx
add eax, eax
add eax, edx
add eax, eax
add eax, dword [ebp + 8]
add eax, 8
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
add eax, 8
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp + 8]
mov dword [eax + 0x4c], 1
mov dword [ebp - 0x15c], 1
jmp 0x40866c
lea eax, [ebp - 0x30]
inc dword [eax]
jmp 0x4084fa
lea eax, [ebp - 0x2c]
inc dword [eax]
jmp 0x4084e9
mov dword [ebp - 0xc], str.timed_out
mov eax, dword [ebp + 8]
add eax, 0x38
mov dword [esp], eax
call fcn.00408f8c
mov edx, eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0x5051
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x417a44
mov dword [esp + 4], 0x100
lea eax, [ebp - 0x158]
mov dword [esp], eax
call fcn.00411800
lea eax, [ebp - 0x158]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.00406488
mov dword [ebp - 0x15c], 0
mov eax, dword [ebp - 0x15c]
mov ebx, dword [ebp - 4]
leave
ret