Function at 0x661610
Capabilities:
Check for time delay via gettickcount
Connect socket
Connect udp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x128
mov eax, dword [0x6ddfa0]
xor eax, dword [esp + 0x128]
push ebx
push ebp
mov ebp, dword [esp + 0x134]
mov dword [esp + 0x12c], eax
cmp dword [ebp + 0x1c], 3
push esi
push edi
mov bl, 0xff
jne 0x66169a
cmp dword [ebp], 0xffffffff
jne 0x66169a
mov eax, dword [ebp + 0x3c]
test eax, eax
je 0x661652
push eax
call fcn.00665256
add esp, 4
mov eax, 0xc
push 0xd
mov dword [ebp + 0x34], eax
mov dword [ebp + 0x38], eax
call fcn.0066536e
mov dword [ebp + 0x3c], eax
mov cl, 0xfe
mov byte [eax + 3], bl
mov byte [eax + 2], bl
mov byte [eax + 1], bl
mov byte [eax], bl
mov byte [eax + 7], cl
mov byte [eax + 6], cl
mov byte [eax + 5], cl
mov byte [eax + 4], cl
mov byte [eax + 0xa], 0
mov byte [eax + 9], 0
mov byte [eax + 8], 0
mov byte [eax + 0xb], 0xc
add esp, 4
mov dword [ebp + 0x1c], 4
cmp dword [ebp + 0x1c], 4
jne 0x6616b5
mov eax, dword [ebp + 0x30]
test eax, eax
je 0x6616b5
mov dword [ebp + 0x1c], 2
mov dword [ebp + 0x20], 0
mov eax, dword [ebp + 0x1c]
mov edi, 1
cmp eax, edi
jne 0x661754
mov edx, dword [ebp]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x24]
push ecx
push edx
mov dword [esp + 0x1c], 0x10
call sub.WS2_32.dll_accept
mov esi, eax
cmp esi, 0xffffffff
je 0x661afd
mov eax, dword [ebp]
push eax
call sub.WS2_32.dll_closesocket
mov eax, dword [ebp + 0x3c]
test eax, eax
mov dword [ebp], esi
mov dword [ebp + 0x1c], 3
mov dword [ebp + 0x28], 0
je 0x661715
push eax
call fcn.00665256
add esp, 4
mov eax, 0xc
push 0xd
mov dword [ebp + 0x34], eax
mov dword [ebp + 0x38], eax
call fcn.0066536e
mov dword [ebp + 0x3c], eax
add esp, 4
mov byte [eax + 3], bl
mov byte [eax + 2], bl
mov byte [eax + 1], bl
mov byte [eax], bl
mov byte [eax + 7], bl
mov byte [eax + 6], bl
mov byte [eax + 5], bl
mov byte [eax + 4], bl
mov byte [eax + 0xa], 0
mov byte [eax + 9], 0
mov byte [eax + 8], 0
mov byte [eax + 0xb], 0xc
cmp dword [ebp + 0x1c], 2
jne 0x6618d2
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
cmp eax, dword [ebp + 0x20]
jbe 0x6617c4
mov eax, dword [ebp]
cmp eax, 0xffffffff
je 0x661779
push eax
call sub.WS2_32.dll_closesocket
push 0
push edi
push 2
call sub.WS2_32.dll_socket
cmp eax, 0xffffffff
mov dword [ebp], eax
jne 0x661794
call sub.WS2_32.dll_WSAGetLastError
mov dword [esp + 0x14], eax
mov edx, dword [ebp]
lea ecx, [esp + 0x10]
push ecx
push 0x8004667e
push edx
mov dword [esp + 0x1c], edi
call sub.WS2_32.dll_ioctlsocket
mov ecx, dword [ebp]
push 0x10
lea eax, [ebp + 4]
push eax
push ecx
call sub.WS2_32.dll_connect
call esi
add eax, 0x7530
mov dword [ebp + 0x20], eax
mov eax, dword [ebp]
cmp eax, 0xffffffff
je 0x661afd
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x38], eax
lea eax, [esp + 0x34]
push eax
xor ecx, ecx
lea edx, [esp + 0x38]
push edx
push ecx
push edi
mov dword [esp + 0x30], ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x44], edi
call sub.WS2_32.dll_select
test eax, eax
je 0x661afd
mov edx, dword [ebp]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x18]
push ecx
push 0x1007
push 0xffff
push edx
mov dword [esp + 0x24], 4
call sub.WS2_32.dll_getsockopt
test eax, eax
mov dword [esp + 0x10], eax
jne 0x66192f
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x66192f
mov edx, dword [ebp]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x24]
push ecx
push edx
mov dword [esp + 0x1c], 0x10
call sub.WS2_32.dll_getsockname
mov eax, dword [esp + 0x24]
push eax
call sub.WS2_32.dll_ntohl
mov ecx, dword [esp + 0x22]
push ecx
mov dword [ebp + 0x14], eax
call sub.WS2_32.dll_ntohs
movzx edx, ax
mov eax, dword [ebp + 0x3c]
test eax, eax
mov dword [ebp + 0x18], edx
mov dword [ebp + 0x1c], 3
mov dword [ebp + 0x28], 0
je 0x661893
push eax
call fcn.00665256
add esp, 4
mov eax, 0xc
push 0xd
mov dword [ebp + 0x34], eax
mov dword [ebp + 0x38], eax
call fcn.0066536e
mov dword [ebp + 0x3c], eax
add esp, 4
mov byte [eax + 3], bl
mov byte [eax + 2], bl
mov byte [eax + 1], bl
mov byte [eax], bl
mov byte [eax + 7], bl
mov byte [eax + 6], bl
mov byte [eax + 5], bl
mov byte [eax + 4], bl
mov byte [eax + 0xa], 0
mov byte [eax + 9], 0
mov byte [eax + 8], 0
mov byte [eax + 0xb], 0xc
mov esi, dword [ebp]
cmp esi, 0xffffffff
je 0x661afd
mov edx, dword [ebp + 0x30]
xor edi, edi
cmp edx, edi
je 0x661995
mov ecx, dword [ebp + 0x28]
mov eax, dword [ebp + 0x24]
cmp ecx, eax
je 0x661995
push edi
sub eax, ecx
push eax
add ecx, edx
push ecx
push esi
call sub.WS2_32.dll_send
cmp eax, edi
mov dword [esp + 0x10], eax
jge 0x661979
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x661973
mov eax, dword [ebp]
push eax
call sub.WS2_32.dll_closesocket
mov dword [ebp], 0xffffffff
jmp 0x661afd
mov eax, dword [0x70f1a4]
and eax, 0xfff
add eax, 0x3e8
mov dword [ebp + 0x20], eax
call esi
add dword [ebp + 0x20], eax
mov ecx, dword [0x70f1a4]
imul ecx, ecx, 0x19660d
add ecx, 0x3c6ef35f
mov dword [0x70f1a4], ecx
mov edx, dword [ebp]
push edx
call sub.WS2_32.dll_closesocket
mov dword [ebp], 0xffffffff
jmp 0x661afd
mov eax, dword [esp + 0x10]
cmp eax, edi
jle 0x66197e
add dword [ebp + 0x28], eax
mov ecx, dword [ebp + 0x28]
cmp ecx, dword [ebp + 0x24]
jne 0x661995
mov edx, dword [ebp + 0x30]
push edx
call fcn.00665256
add esp, 4
mov dword [ebp + 0x30], edi
cmp dword [ebp + 0x3c], edi
jne 0x661a89
mov eax, dword [ebp + 0x34]
cmp eax, dword [ebp + 0x38]
jne 0x6619b0
mov dword [ebp + 0x34], 0xc
mov dword [ebp + 0x38], edi
mov eax, dword [ebp + 0x38]
mov ecx, dword [ebp + 0x34]
push edi
sub ecx, eax
push ecx
lea edx, [eax + ebp + 0x40]
mov eax, dword [ebp]
push edx
push eax
call sub.WS2_32.dll_recv
cmp eax, edi
mov dword [esp + 0x10], eax
jge 0x6619f7
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x6619f1
mov ecx, dword [ebp]
push ecx
call sub.WS2_32.dll_closesocket
mov dword [ebp], 0xffffffff
jmp 0x661afd
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0x66195e
cmp eax, edi
jle 0x661a04
add dword [ebp + 0x38], eax
mov eax, dword [ebp + 0x38]
cmp eax, dword [ebp + 0x34]
jne 0x661a89
movzx ecx, byte [ebp + 0x4a]
movzx edx, byte [ebp + 0x4b]
xor eax, eax
mov ah, byte [ebp + 0x48]
lea esi, [ebp + 0x40]
mov al, byte [esi + 9]
shl eax, 8
or eax, ecx
shl eax, 8
or eax, edx
cmp eax, 0xc
mov dword [ebp + 0x34], eax
jb 0x66191a
cmp eax, 0x8000
jg 0x66191a
inc eax
push eax
call fcn.0066536e
mov ecx, dword [ebp + 0x38]
mov dword [ebp + 0x3c], eax
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x38]
mov eax, dword [ebp + 0x34]
add esp, 4
cmp ecx, eax
jne 0x661a89
mov eax, dword [ebp + 0x30]
test eax, eax
je 0x661a89
mov edx, dword [ebp + 0x28]
cmp edx, dword [ebp + 0x24]
jne 0x661a89
push eax
call fcn.00665256
add esp, 4
mov dword [ebp + 0x30], 0
mov edx, dword [ebp + 0x3c]
test edx, edx
je 0x661afd
mov ecx, dword [ebp + 0x38]
mov eax, dword [ebp + 0x34]
cmp ecx, eax
jge 0x661afd
push 0
sub eax, ecx
push eax
add ecx, edx
push ecx
mov ecx, dword [ebp]
push ecx
call sub.WS2_32.dll_recv
test eax, eax
mov dword [esp + 0x10], eax
jge 0x661ac9
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x66195e
mov eax, dword [esp + 0x10]
test eax, eax
je 0x66191a
test eax, eax
jle 0x661ad6
add dword [ebp + 0x38], eax
mov ecx, dword [ebp + 0x38]
cmp ecx, dword [ebp + 0x34]
jne 0x661afd
mov eax, dword [ebp + 0x30]
test eax, eax
je 0x661afd
mov edx, dword [ebp + 0x28]
cmp edx, dword [ebp + 0x24]
jne 0x661afd
push eax
call fcn.00665256
add esp, 4
mov dword [ebp + 0x30], 0
mov ecx, dword [esp + 0x134]
xor ecx, dword [esp + 0x138]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
jmp fcn.006684c2