Function at 0x4cf640
Capabilities:
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x31c
push ebx
push ebp
push esi
push edi
call fcn.004bb7c0
mov esi, dword [0xcecac8]
mov edi, 1
push 0x11
mov dword [0xcecac8], edi
call fcn.004bb740
add esp, 4
mov ebx, 2
mov dword [0xcecac8], esi
push 0
push ebx
push ebx
call sub.WSOCK32.dll_socket
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x10], ebp
jne 0x4cf6a3
push 0
push 0
push 0
push 0
push str.Socket_Creation_Failed
call fcn.004683f0
add esp, 0x14
jmp 0x4cf74a
mov cx, word [0x560b9c]
xor eax, eax
mov dword [esp + 0x1c], eax
push ecx
mov dword [esp + 0x24], eax
mov word [esp + 0x20], bx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
call sub.WSOCK32.dll_htons
lea edx, [esp + 0x1c]
push 0x10
push edx
push ebp
mov word [esp + 0x2a], ax
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x4cf776
push 0
push 0
push 0
push 0
push str.Bind_Failed
call fcn.004683f0
add esp, 0x14
mov esi, dword [0xcf16b8]
xor eax, eax
test esi, esi
jle 0x4cf73f
mov edx, 0xcf7ec4
mov ecx, dword [0xcf16a0]
mov edi, 0x14
mov word [ecx + eax*2], 0
mov esi, dword [edx]
test esi, esi
jne 0x4cf724
mov esi, 0xc8
mov ecx, dword [0xcf16a0]
add edx, 4
add word [ecx + eax*2], si
dec edi
jne 0x4cf719
mov ecx, dword [0xcf16b8]
inc eax
cmp eax, ecx
jl 0x4cf708
push ebp
call sub.WSOCK32.dll_closesocket
mov edi, 1
call fcn.004bb7d0
mov esi, dword [0xcecac8]
push 0x11
mov dword [0xcecac8], edi
call fcn.004bb740
add esp, 4
mov dword [0xcecac8], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x31c
ret
lea eax, [esp + 0x18]
mov dword [esp + 0x18], edi
push eax
push 0x8004667e
push ebp
call sub.WSOCK32.dll_ioctlsocket
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x12c]
rep stosd dword es:[edi], eax
mov eax, dword [0xcf16b8]
xor edi, edi
test eax, eax
jle 0x4cf7de
lea esi, [esp + 0x130]
mov ecx, dword [0xcf169c]
mov word [esi - 4], bx
mov edx, dword [ecx + edi*4]
push edx
call sub.WSOCK32.dll_htonl
mov dword [esi], eax
mov ax, word [0x560b9c]
push eax
call sub.WSOCK32.dll_htons
mov word [esi - 2], ax
mov eax, dword [0xcf16b8]
inc edi
add esi, 0x10
cmp edi, eax
jl 0x4cf7ac
xor eax, eax
mov dword [esp + 0x14], eax
mov ecx, dword [0xcf16b8]
xor ebx, ebx
test ecx, ecx
jle 0x4cf8bf
lea esi, [esp + 0x12c]
lea edi, [eax*4]
mov cx, word [0x560b9c]
mov dword [edi + 0xcf7ec4], 0
push ecx
call sub.WSOCK32.dll_htons
mov dl, byte [esp + 0x14]
mov word [esp + 0xac], ax
mov byte [esp + 0xae], bl
mov byte [esp + 0xaf], dl
call dword [0xd84224]
mov ecx, dword [esp + 0x10]
push 0x10
mov ebp, eax
push esi
push 0
lea eax, [esp + 0xb8]
push 0x28
push eax
push ecx
call sub.WSOCK32.dll_sendto
test eax, eax
jge 0x4cf885
add ebp, 0xfa0
call dword [0xd84224]
cmp ebp, eax
jl 0x4cf8a6
mov eax, dword [esp + 0x10]
push 0x10
push esi
push 0
lea edx, [esp + 0xb8]
push 0x28
push edx
push eax
call sub.WSOCK32.dll_sendto
test eax, eax
jl 0x4cf85e
call dword [0xd84224]
mov dword [edi + 0xcf88c4], eax
mov eax, dword [0xcf16b8]
inc ebx
add esi, 0x10
add edi, 0x50
cmp ebx, eax
jge 0x4cf8bb
jmp 0x4cf802
push 0
push 0
push 0
push 0
push str.Couldnt_send_for_4_seconds.
call fcn.004683f0
add esp, 0x14
mov ebp, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
inc eax
cmp eax, 0x14
mov dword [esp + 0x14], eax
jl 0x4cf7e4
call dword [0xd84224]
mov ebx, eax
xor edi, edi
push 0
push 0
push 0
lea ecx, [esp + 0x38]
push 0x28
push ecx
push ebp
mov byte [esp + 0x46], 0xff
mov byte [esp + 0x47], 0xff
call sub.WSOCK32.dll_recvfrom
test eax, eax
jge 0x4cf927
lea esi, [ebx + 0x1f40]
call dword [0xd84224]
cmp esi, eax
jl 0x4cf6f7
push 0
push 0
push 0
lea edx, [esp + 0x38]
push 0x28
push edx
push ebp
call sub.WSOCK32.dll_recvfrom
test eax, eax
jl 0x4cf902
call dword [0xd84224]
movsx edx, byte [esp + 0x2e]
movsx ecx, byte [esp + 0x2f]
test edx, edx
jl 0x4cf96f
mov esi, dword [0xcf16b8]
cmp edx, esi
jge 0x4cf96f
cmp ecx, 0x14
jge 0x4cf96f
lea edx, [edx + edx*4]
lea ecx, [ecx + edx*4]
shl ecx, 2
sub eax, dword [ecx + 0xcf88c4]
test eax, eax
mov dword [ecx + 0xcf7ec4], eax
jg 0x4cf98a
mov dword [ecx + 0xcf7ec4], 1
jmp 0x4cf98a
push 0
push 0
push 0
push 0
push str.Bogus_return_ping
call fcn.004683f0
mov esi, dword [0xcf16b8]
add esp, 0x14
lea eax, [esi + esi*4]
inc edi
shl eax, 2
cmp edi, eax
jne 0x4cf8db
jmp 0x4cf6fd