Function at 0x41581b
Capabilities:
Check for time delay via gettickcount
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
sub esp, 0x244
push esi
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 8], esi
jne 0x415845
mov eax, 0x80004005
jmp 0x415a17
cmp dword [ebp + 0x14], 0
push edi
push 4
pop edi
je 0x415888
push edi
lea eax, [ebp - 4]
push eax
push 0x20
push 0xffff
push esi
mov dword [ebp - 4], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x41587e
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0x80004005
jmp 0x415a16
push 0xffffffffffffffff
call dword [sym.imp.WS2_32.dll_htonl]
jmp 0x41588e
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 4]
push 0x2db
mov dword [ebp - 0x28], eax
mov word [ebp - 0x2c], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x2a], ax
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4158b3
lea eax, [ebp - 0x244]
and dword [ebp - 4], 0
mov esi, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edi
push ebx
mov eax, dword [ebp - 0xc]
dec dword [ebp - 0xc]
test eax, eax
je 0x4159fc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
push 0x10
lea eax, [ebp - 0x2c]
push eax
movzx eax, byte [esi + 1]
mov ebx, 0x1f4
add edi, ebx
push 0
inc eax
inc eax
push eax
push esi
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_sendto]
movzx ecx, byte [esi + 1]
inc ecx
inc ecx
cmp eax, ecx
jne 0x4159d7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, edi
sub ebx, eax
test ebx, ebx
jle 0x4159e4
mov eax, dword [ebp - 8]
mov dword [ebp - 0x13c], eax
mov eax, ebx
cdq
mov ecx, 0x3e8
idiv ecx
lea ecx, [ebp - 0x140]
mov dword [ebp - 0x140], 1
mov dword [ebp - 0x1c], eax
imul edx, edx, 0x3e8
lea eax, [ebp - 0x1c]
push eax
xor eax, eax
push eax
push eax
push ecx
push eax
mov dword [ebp - 0x18], edx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
mov dword [ebp + 8], eax
jle 0x4159b1
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x3c]
push eax
push 0
push 0x101
push dword [ebp - 0x10]
mov dword [ebp - 0x14], 0x10
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_recvfrom]
test eax, eax
jle 0x4159b7
mov ecx, dword [ebp - 0x10]
cmp byte [ecx], 2
jne 0x4159b1
cmp dword [ebp + 0xc], 0
jne 0x4159ce
mov al, byte [esi + 1]
cmp byte [ecx + 1], al
jne 0x4159b1
movzx eax, al
push eax
add ecx, 2
push ecx
lea eax, [esi + 2]
push eax
call fcn.0041e4c4
add esp, 0xc
test eax, eax
je 0x4159ce
cmp dword [ebp + 8], 0
jge 0x4159c6
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
and dword [ebp + 8], 0
cmp dword [ebp + 8], 0
jne 0x415905
jmp 0x4159e4
mov dword [ebp - 4], 1
jmp 0x4159e4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 4], 0
jne 0x4159fc
cmp dword [ebp + 0x14], 0
je 0x4158c1
xor byte [esi], 0x80
jmp 0x4158c1
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 4]
test eax, eax
pop ebx
je 0x415a16
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp + 0x10]
mov dword [edx + 4], ecx
pop edi
pop esi
leave
ret 0x10