Function at 0x40be40
Capabilities:
Check for time delay via gettickcount
Get socket status
Send data
Send data on socket

Disassembly:
sub esp, 0x278
push ebx
mov ebx, dword [sym.imp.USER32.dll_PeekMessageA]
mov edx, ecx
push ebp
mov ebp, dword [sym.imp.WS2_32.dll_send]
push esi
xor esi, esi
lea ecx, [edx + 4]
push edi
mov dword [esp + 0x14], edx
mov byte [esp + 0x13], 0
mov dword [esp + 0x1c], esi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], 0x1f
jmp 0x40be7c
mov edx, dword [esp + 0x14]
mov edi, dword [ecx]
cmp edi, 0xffffffff
je 0x40c0cc
xor eax, eax
mov byte [esp + 0x13], 1
mov al, byte [ecx + 0x16]
dec eax
je 0x40c093
sub eax, 2
je 0x40bf95
dec eax
jne 0x40c0cc
mov eax, 1
xor ecx, ecx
mov word [esp + 0x2c], ax
mov dword [esp + 0x80], eax
mov dword [esp + 0x38], eax
lea eax, [esp + 0x38]
push eax
lea edx, [esp + 0x84]
push ecx
push edx
push ecx
push ecx
mov dword [esp + 0x3c], 0x82020476
mov word [esp + 0x42], cx
mov dword [esp + 0x98], edi
mov dword [esp + 0x50], ecx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
je 0x40c0cc
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x18], eax
push esi
lea eax, [esp + 0x2c]
push 8
push eax
push edi
call ebp
cmp eax, 0xffffffff
je 0x40c0cc
add esi, eax
cmp esi, 8
jge 0x40c0cc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x18]
cmp eax, 0x1388
jae 0x40c0cc
push 1
push 0
push 0
lea ecx, [esp + 0x54]
push 0
push ecx
call ebx
test eax, eax
je 0x40bf71
lea edx, [esp + 0x48]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push 0
push 0
lea ecx, [esp + 0x54]
push 0
push ecx
call ebx
test eax, eax
jne 0x40bf48
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, 8
push 0
sub edx, esi
lea eax, [esp + esi + 0x2c]
push edx
push eax
push edi
call ebp
cmp eax, 0xffffffff
jne 0x40bf15
jmp 0x40c0cc
mov eax, dword [ecx + 0xc]
test eax, eax
jne 0x40bfa9
push esi
mov ecx, edx
call fcn.0040c110
jmp 0x40c0cc
mov eax, 1
lea edx, [esp + 0x40]
mov word [esp + 0x34], ax
xor ecx, ecx
mov dword [esp + 0x184], eax
mov dword [esp + 0x40], eax
push edx
lea eax, [esp + 0x188]
push ecx
push eax
push ecx
push ecx
mov dword [esp + 0x44], 0x82020476
mov word [esp + 0x4a], cx
mov dword [esp + 0x19c], edi
mov dword [esp + 0x58], ecx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
je 0x40c0cc
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push esi
lea ecx, [esp + 0x34]
push 8
push ecx
push edi
mov dword [esp + 0x28], eax
call ebp
cmp eax, 0xffffffff
je 0x40c0cc
add esi, eax
cmp esi, 8
jge 0x40c0cc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x18]
cmp eax, 0x1388
jae 0x40c0cc
push 1
push 0
push 0
lea edx, [esp + 0x70]
push 0
push edx
call ebx
test eax, eax
je 0x40c072
lea eax, [esp + 0x64]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea ecx, [esp + 0x64]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push 0
push 0
lea edx, [esp + 0x70]
push 0
push edx
call ebx
test eax, eax
jne 0x40c049
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, 8
push 0
sub eax, esi
lea ecx, [esp + esi + 0x34]
push eax
push ecx
push edi
call ebp
cmp eax, 0xffffffff
jne 0x40c016
jmp 0x40c0cc
mov eax, dword [esp + 0x28c]
mov edi, dword [ecx + 0xc]
mov eax, dword [eax]
sub eax, edi
cmp eax, 0x3a98
jbe 0x40c0cc
xor ecx, ecx
mov cx, word [edx + 0x2ec]
shl ecx, 0x10
or ecx, esi
push ecx
mov ecx, dword [0x4237c0]
call fcn.00406610
mov ecx, dword [esp + 0x14]
push esi
call fcn.0040bc60
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
inc esi
add ecx, 0x18
dec eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], eax
jne 0x40be78
mov eax, dword [esp + 0x14]
mov dl, byte [esp + 0x13]
pop edi
pop esi
pop ebp
mov byte [eax + 0x2ee], dl
pop ebx
add esp, 0x278
ret 4