Function at 0x4165db
Capabilities:
Check for time delay via gettickcount
Create udp socket
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
push esi
call fcn.00417a0d
add eax, 5
xor edi, edi
push eax
push edi
call fcn.004162ae
push esi
mov dword [ebp - 4], eax
call fcn.00417a0d
add eax, 5
push eax
push edi
push dword [ebp - 4]
call sub.MSVCRT.dll_memset
push 1
push 0x2e
push dword [ebp - 4]
call sub.MSVCRT.dll_memset
add esp, 0x18
push esi
call fcn.00417a0d
add eax, 4
push eax
push esi
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_strncat]
add esp, 0xc
mov esi, 0x10000
push esi
push edi
call fcn.004162ae
push esi
push edi
push eax
mov dword [ebp + 0x10], eax
call sub.MSVCRT.dll_memset
mov eax, dword [ebp + 0x10]
push 0xe
push edi
push eax
lea esi, [eax + 0xfe00]
call sub.MSVCRT.dll_memset
push 0xe
push edi
push esi
call sub.MSVCRT.dll_memset
add esp, 0x24
push 0xffff
call fcn.004179a9
mov ecx, dword [ebp + 0x10]
push 1
mov word [ecx], ax
call sub.wsock32.dll_htons
mov ecx, dword [ebp + 0x10]
push 0x100
mov word [ecx + 4], ax
call sub.wsock32.dll_htons
mov ecx, dword [ebp + 0x10]
mov word [ecx + 2], ax
mov eax, dword [ebp + 0x10]
push dword [ebp - 4]
add eax, 0xc
mov dword [ebp - 0x14], eax
call fcn.00417a0d
xor ebx, ebx
cmp eax, edi
mov dword [ebp - 0x10], edi
jbe 0x4166ec
mov ecx, dword [ebp - 4]
mov cl, byte [ebx + ecx]
cmp cl, 0x2e
jne 0x4166e1
cmp dword [ebp - 0x10], edi
jne 0x4166cb
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x10], ecx
jmp 0x4166e7
mov edx, dword [ebp - 0x10]
mov cl, bl
sub cl, byte [ebp - 0x10]
add cl, byte [ebp - 0x14]
dec cl
mov byte [edx], cl
mov ecx, dword [ebp - 0x14]
add ecx, ebx
jmp 0x4166c6
mov edx, dword [ebp - 0x14]
mov byte [ebx + edx], cl
inc ebx
cmp ebx, eax
jb 0x4166b3
lea eax, [ebp - 4]
push eax
call fcn.004164ad
mov eax, dword [ebp - 0x10]
sub bl, al
add bl, byte [ebp - 0x14]
dec bl
mov byte [eax], bl
mov eax, dword [ebp + 0x10]
add eax, 0xc
push eax
call fcn.00417a0d
push dword [ebp + 0xc]
mov edi, eax
inc edi
call sub.wsock32.dll_htons
mov ecx, dword [ebp + 0x10]
inc edi
push 1
mov word [edi + ecx + 0xb], ax
inc edi
call sub.wsock32.dll_htons
mov ecx, dword [ebp + 0x10]
push 0x11
push 2
push 2
mov word [edi + ecx + 0xc], ax
call sub.wsock32.dll_socket
mov ecx, dword [0x4206a4]
push 4
mov dword [ebp - 0xc], ecx
lea ecx, [ebp - 0xc]
push ecx
push 0x1006
push 0xffff
push eax
mov dword [ebp - 0x14], eax
call sub.wsock32.dll_setsockopt
xor ebx, ebx
push 0x10
lea eax, [ebp - 0x28]
push ebx
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov word [ebp - 0x28], 2
push 0x35
call sub.wsock32.dll_htons
push dword [ebp + 8]
mov word [ebp - 0x26], ax
call sub.wsock32.dll_htonl
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x28]
push 0x10
push eax
add edi, 0x10
push ebx
push edi
push dword [ebp + 0x10]
push dword [ebp - 0x14]
call sub.wsock32.dll_sendto
test eax, eax
jg 0x4167c5
call fcn.00416b3c
push dword [ebp - 0x14]
call sub.wsock32.dll_closesocket
lea eax, [ebp + 0x10]
push eax
call fcn.004164ad
mov ecx, 0xffffffff
jmp 0x416aba
push dword [0x421a4c]
call dword [sym.imp.KERNEL32.DLL_Sleep]
mov edi, dword [sym.imp.KERNEL32.DLL_GetTickCount]
call edi
push ebx
push ebx
push ebx
mov ebx, 0x200
push ebx
push esi
push dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
call sub.wsock32.dll_recvfrom
mov dword [ebp + 8], eax
call edi
cmp dword [ebp + 8], 0
jg 0x41681b
call fcn.00416b3c
push dword [ebp - 0x14]
call sub.wsock32.dll_closesocket
lea eax, [ebp + 0x10]
push eax
call fcn.004164ad
xor eax, eax
mov ecx, 0xfffffffe
jmp 0x416abc
mov ecx, dword [0x421a4c]
add ecx, ecx
sub ecx, dword [ebp - 0x18]
add ecx, eax
shr ecx, 1
cmp ecx, 0x1388
mov dword [0x421a4c], ecx
jbe 0x416840
shr ecx, 1
mov dword [0x421a4c], ecx
push dword [ebp - 0x14]
call sub.wsock32.dll_closesocket
mov eax, dword [ebp + 0x14]
lea edi, [esi + 0xc]
and dword [eax], 0
mov eax, dword [ebp + 0x10]
mov dword [ebp + 8], eax
mov cx, word [eax]
cmp cx, word [esi]
jne 0x416a44
mov ax, word [esi + 6]
push eax
call sub.wsock32.dll_htons
mov word [esi + 6], ax
mov ax, word [esi + 4]
push eax
call sub.wsock32.dll_htons
push ebx
push 0
mov word [esi + 4], ax
push dword [ebp + 0x10]
call sub.MSVCRT.dll_memset
add esp, 0xc
push ebx
push 0
call fcn.004162ae
mov dword [ebp - 8], eax
cmp word [esi + 6], 0xa
jb 0x4168a5
mov word [esi + 6], 0xa
cmp word [esi + 6], 0
je 0x416a37
cmp word [esi + 4], 0
push ebx
push 0
push dword [ebp - 8]
je 0x4168da
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [ebp - 8]
push edi
push esi
call fcn.00416ac3
add eax, 4
dec word [esi + 4]
mov edi, eax
jmp 0x4168b0
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [ebp - 8]
push edi
push esi
call fcn.00416ac3
mov edi, eax
mov ax, word [edi]
push eax
call sub.wsock32.dll_htons
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
add edi, 4
cmp dword [eax], 0
jne 0x416911
push dword [edi]
call sub.wsock32.dll_htonl
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov ax, word [edi + 4]
add edi, 4
push eax
call sub.wsock32.dll_htons
inc edi
mov dword [ebp - 0x18], eax
inc edi
cmp word [ebp + 0xc], 0xf
jne 0x41696b
cmp word [ebp - 0x10], 0xf
jne 0x416a21
push dword [ebp + 8]
lea eax, [edi + 2]
push eax
push esi
call fcn.00416ac3
movzx eax, word [ebp - 0x18]
add edi, eax
cmp word [esi + 6], 1
jbe 0x416a26
push 1
push 0x420798
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_strncat]
add esp, 0xc
jmp 0x416a26
cmp word [ebp + 0xc], 1
jne 0x416a0a
cmp word [ebp - 0x10], 1
jne 0x416a21
mov ebx, dword [edi]
push 0x11
push 0
mov dword [ebp - 0x10], ebx
call fcn.004162ae
push 0x11
push 0
push eax
mov dword [ebp - 0x14], eax
call sub.MSVCRT.dll_memset
mov eax, ebx
and eax, 0xff
push eax
xor eax, eax
mov al, bh
push eax
xor eax, eax
mov al, byte [ebp - 0xe]
shr ebx, 0x18
push eax
push ebx
push str._d._d._d._d
push 0x10
push dword [ebp - 0x14]
call dword [sym.imp.MSVCRT.dll__snprintf]
mov ebx, dword [sym.imp.MSVCRT.dll_strncat]
push 0x11
push dword [ebp - 0x14]
push dword [ebp + 8]
call ebx
add esp, 0x34
lea eax, [ebp - 0x14]
push eax
call fcn.004164ad
cmp word [esi + 6], 1
jbe 0x4169f5
push 1
push 0x420798
push dword [ebp + 8]
call ebx
add esp, 0xc
movzx eax, word [ebp - 0x18]
add edi, eax
dec word [esi + 6]
mov ax, word [esi + 6]
mov ebx, 0x200
jmp 0x416a2e
cmp word [ebp + 0xc], 0xc
jne 0x416a21
cmp word [ebp - 0x10], 0xc
jne 0x416a21
push dword [ebp + 8]
push edi
jmp 0x41693c
movzx eax, ax
add edi, eax
dec word [esi + 6]
mov ax, word [esi + 6]
test ax, ax
jne 0x4168b0
lea eax, [ebp - 8]
push eax
call fcn.004164ad
xor ebx, ebx
jmp 0x416a59
xor ebx, ebx
cmp eax, ebx
je 0x416ab5
lea eax, [ebp + 0x10]
push eax
call fcn.004164ad
mov dword [ebp + 8], ebx
mov dword [ebp + 0x10], ebx
mov esi, dword [ebp + 8]
cmp esi, ebx
je 0x416aa4
push esi
call fcn.00417a0d
test eax, eax
je 0x416aa4
push esi
call fcn.00417a0d
inc eax
inc eax
push eax
push ebx
call fcn.004162ae
push esi
mov edi, eax
call fcn.00417a0d
push eax
push esi
push edi
call sub.MSVCRT.dll_memcpy
add esp, 0xc
cmp dword [ebp + 0x10], ebx
je 0x416a9d
lea eax, [ebp + 0x10]
push eax
call fcn.004164ad
mov dword [ebp + 0x10], ebx
mov eax, edi
jmp 0x416811
cmp dword [ebp + 0x10], ebx
je 0x416ab5
lea eax, [ebp + 0x10]
push eax
call fcn.004164ad
mov dword [ebp + 0x10], ebx
mov ecx, 0xfffffffd
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x10