Function at 0x40e6fc
Capabilities:
Create raw socket
Create udp socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe80
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x180], ebx
mov dword [ebp - 0x17c], ebx
mov dword [ebp - 0x178], ebx
mov dword [ebp - 0x170], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x10], ecx
mov ebx, edx
mov esi, eax
xor eax, eax
push ebp
push 0x40ecd4
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0x7fff
call fcn.004028f8
mov dword [ebp - 4], eax
lea eax, [ebp - 0x154]
mov edx, dword [ebp - 4]
shr dx, 8
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x154]
lea eax, [ebp - 0x158]
call fcn.004028bc
lea eax, [ebp - 0x15c]
mov edx, dword [ebp - 4]
and edx, 0xff
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x15c]
lea eax, [ebp - 0x158]
mov cl, 2
call fcn.0040288c
lea edx, [ebp - 0x158]
lea eax, [ebp - 0x16c]
call fcn.004028bc
mov edx, 0x40ece4
lea eax, [ebp - 0x16c]
mov cl, 0xc
call fcn.0040288c
lea edx, [ebp - 0x16c]
lea eax, [ebp - 0xc]
call fcn.004036f0
mov eax, esi
call fcn.004038ec
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x40e825
cmp dword [ebp - 4], 0
je 0x40e825
mov eax, dword [ebp - 4]
push eax
call sub.wsock32.dll_ntohl
mov dword [ebp - 0x174], eax
push dword [ebp - 0x174]
call sub.wsock32.dll_inet_ntoa
mov edx, eax
lea eax, [ebp - 0x170]
call fcn.00403684
mov edx, dword [ebp - 0x170]
lea eax, [ebp - 0x14]
mov ecx, 0x40ecf8
call fcn.00403774
jmp 0x40e82f
lea eax, [ebp - 0x14]
mov edx, esi
call fcn.00403564
push dword [ebp - 0xc]
push ebp
lea edx, [ebp - 0x178]
mov eax, dword [ebp - 0x14]
call fcn.0040e4f8
pop ecx
push dword [ebp - 0x178]
push 0x40ed10
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004037e8
push 0
push 2
push 2
call sub.wsock32.dll_socket
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
je 0x40ec88
mov word [ebp - 0x4c], 2
push 0x35
call sub.wsock32.dll_htons
mov word [ebp - 0x4a], ax
mov dword [ebp - 0x48], ebx
push 0x10
lea eax, [ebp - 0x4c]
push eax
push 0
mov eax, dword [ebp - 0xc]
call fcn.00403728
push eax
lea eax, [ebp - 0xc]
call fcn.004038f8
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.wsock32.dll_sendto
mov ebx, eax
mov eax, dword [ebp - 0xc]
call fcn.00403728
cmp ebx, eax
je 0x40e8c5
mov eax, dword [ebp - 0x24]
push eax
call sub.wsock32.dll_closesocket
jmp 0x40ec88
push 0
mov eax, dword [ebp - 0x10]
mov ecx, 1
mov edx, dword [0x40e49c]
call fcn.004046b4
add esp, 4
push 0
lea eax, [ebp - 0x3c]
mov ecx, 1
mov edx, dword [0x40e4e4]
call fcn.004046b4
add esp, 4
call fcn.0040821c
fld xword [0x40ed18]
faddp st(1)
fstp qword [ebp - 0x30]
wait
lea eax, [ebp - 0x150]
call fcn.0040df64
lea edx, [ebp - 0x150]
mov eax, dword [ebp - 0x24]
call fcn.0040df54
call fcn.0040821c
fsubr qword [ebp - 0x30]
fmul dword [0x40ed24]
fmul dword [0x40ed28]
call fcn.00402864
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov ecx, 0x3e8
cdq
idiv ecx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 4]
mov ecx, 0x3e8
cdq
idiv ecx
imul eax, edx, 0x3e8
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x38]
push eax
push 0
push 0
lea eax, [ebp - 0x150]
push eax
push 0
call sub.wsock32.dll_select
test eax, eax
jg 0x40e985
mov eax, dword [ebp - 0x24]
push eax
call sub.wsock32.dll_closesocket
jmp 0x40ec88
lea eax, [ebp - 4]
push eax
push 0x4004667f
mov eax, dword [ebp - 0x24]
push eax
call sub.wsock32.dll_ioctlsocket
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 4]
call fcn.00403a5c
push 0
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0xc]
call fcn.004038f8
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.wsock32.dll_recv
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jg 0x40e9d1
mov eax, dword [ebp - 0x24]
push eax
call sub.wsock32.dll_closesocket
jmp 0x40ec88
cmp dword [ebp - 8], 0xd
jle 0x40ec60
xor edx, edx
push ebp
push 0x40ec56
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 8]
call fcn.00403a5c
mov eax, dword [ebp - 0xc]
test byte [eax + 3], 0xf
je 0x40ea0a
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x40ec60
mov dword [ebp - 4], 0xd
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax + 4]
shl eax, 8
mov edx, dword [ebp - 0xc]
movzx edx, byte [edx + 5]
add eax, edx
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x40ea73
jmp 0x40ea3f
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jle 0x40ea3f
call fcn.00408a20
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov al, byte [eax + edx - 1]
test al, al
je 0x40ea59
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
and al, 0xc0
cmp al, 0xc0
jne 0x40ea2f
add dword [ebp - 4], 5
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jle 0x40ea6a
call fcn.00408a20
dec dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 0
jne 0x40ea3f
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax + 6]
shl eax, 8
mov edx, dword [ebp - 0xc]
movzx edx, byte [edx + 7]
add eax, edx
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jle 0x40ec4c
push ebp
lea edx, [ebp - 0x17c]
lea eax, [ebp - 4]
call fcn.0040e5e4
pop ecx
mov edx, dword [ebp - 0x17c]
lea eax, [ebp - 0x18]
call fcn.00403564
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jle 0x40eabe
call fcn.00408a20
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
movzx eax, byte [eax + edx - 1]
mov esi, eax
shl esi, 8
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
movzx eax, byte [eax + edx]
add esi, eax
add dword [ebp - 4], 0xa
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jle 0x40eaeb
call fcn.00408a20
mov eax, dword [ebp - 4]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
movzx eax, byte [eax + edx - 3]
shl eax, 8
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
movzx edx, byte [edx + ecx - 2]
add eax, edx
add dword [ebp - 4], eax
cmp esi, 0xf
jne 0x40ec3f
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
call fcn.00403838
jne 0x40ec3f
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x20]
movzx eax, byte [eax + edx - 1]
mov esi, eax
shl esi, 8
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x20]
movzx eax, byte [eax + edx]
add esi, eax
add dword [ebp - 0x20], 2
push ebp
lea edx, [ebp - 0x180]
lea eax, [ebp - 0x20]
call fcn.0040e5e4
pop ecx
mov edx, dword [ebp - 0x180]
lea eax, [ebp - 0x18]
call fcn.00403564
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
call fcn.004044f8
mov edi, eax
mov eax, dword [ebp - 0x3c]
call fcn.00404500
mov ebx, eax
test ebx, ebx
jl 0x40eb9f
inc ebx
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x20]
cmp esi, dword [eax + edx*4]
jge 0x40eb99
mov edi, dword [ebp - 0x20]
jmp 0x40eb9f
inc dword [ebp - 0x20]
dec ebx
jne 0x40eb89
mov eax, dword [ebp - 0x3c]
call fcn.004044f8
inc eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
push eax
lea eax, [ebp - 0x3c]
mov ecx, 1
mov edx, dword [0x40e4e4]
call fcn.004046b4
add esp, 4
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x10]
mov ecx, 1
mov edx, dword [0x40e49c]
call fcn.004046b4
add esp, 4
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
call fcn.00404500
lea ebx, [edi + 1]
sub ebx, eax
jg 0x40ec29
dec ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x20]
mov eax, dword [eax + edx*4 - 4]
mov edx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x20]
mov dword [edx + ecx*4], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov edx, dword [ebp - 0x20]
lea eax, [eax + edx*4]
mov edx, dword [ebp - 0x10]
mov edx, dword [edx]
mov ecx, dword [ebp - 0x20]
mov edx, dword [edx + ecx*4 - 4]
call fcn.00403520
dec dword [ebp - 0x20]
inc ebx
jne 0x40ebf4
mov eax, dword [ebp - 0x3c]
mov dword [eax + edi*4], esi
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
lea eax, [eax + edi*4]
mov edx, dword [ebp - 0x18]
call fcn.00403520
dec dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 0
jg 0x40ea93
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x40ec60
call fcn.0040821c
fcomp qword [ebp - 0x30]
fnstsw ax
sahf
jae 0x40ec7f
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
call fcn.004044f8
test eax, eax
je 0x40e906
mov eax, dword [ebp - 0x24]
push eax
call sub.wsock32.dll_closesocket
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40ecdb
lea eax, [ebp - 0x180]
mov edx, 3
call fcn.004034f0
lea eax, [ebp - 0x170]
call fcn.004034cc
lea eax, [ebp - 0x3c]
mov edx, dword [0x40e4e4]
call fcn.004046c0
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.004034f0
lea eax, [ebp - 0xc]
call fcn.004034cc
ret