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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x52c
push ebx
push esi
call dword [0x46bf94]
xor esi, esi
mov ebx, 0x400
push ebx
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x52c]
push esi
push eax
mov dword [ebp - 8], esi
mov dword [ebp - 0x14], esi
call fcn.00428c40
add esp, 0xc
cmp dword [ebp + 8], esi
mov dword [ebp - 0x12c], esi
je 0x422856
push dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
call esi
inc eax
push eax
call fcn.0042819a
pop ecx
push dword [ebp + 8]
mov dword [ebp - 0xc], eax
call esi
mov esi, dword [ebp - 0xc]
push 0
inc eax
push eax
push dword [ebp + 8]
call fcn.0042343c
mov edx, dword [ebp - 0x12c]
xor esi, esi
xor eax, eax
cmp edx, esi
jbe 0x422771
mov ecx, dword [edi + 0x4c]
cmp dword [ebp + eax*4 - 0x128], ecx
je 0x422771
inc eax
cmp eax, edx
jb 0x422763
cmp eax, edx
jne 0x42278a
cmp edx, 0x40
jae 0x42278a
mov ecx, dword [edi + 0x4c]
mov dword [ebp + eax*4 - 0x128], ecx
inc dword [ebp - 0x12c]
lea eax, [ebp - 0x1c]
push eax
push esi
push esi
lea eax, [ebp - 0x12c]
push eax
push 1
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 1
jne 0x4227bc
push esi
push ebx
lea eax, [ebp - 0x52c]
push eax
push dword [edi + 0x4c]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, esi
jg 0x422752
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, ebx
mov dword [ebp - 0x10], eax
jbe 0x4227d7
mov dword [ebp - 0x14], 1
test eax, eax
je 0x422823
mov eax, dword [ebp - 0x10]
sub eax, esi
cmp eax, ebx
mov dword [ebp - 8], ebx
ja 0x4227ea
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
push 0
push dword [ebp - 8]
add eax, esi
push eax
push dword [edi + 0x4c]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x422880
add esi, dword [ebp - 8]
cmp dword [ebp - 0x14], 0
je 0x42281e
push dword [ebp - 0x10]
mov eax, dword [edi]
push esi
push dword [ebp - 0xc]
mov ecx, edi
call dword [eax + 0x10]
test eax, eax
je 0x422880
cmp dword [ebp - 0x10], esi
jne 0x4227db
mov eax, dword [edi + 0x4c]
xor ecx, ecx
push ecx
push ecx
mov dword [ebp - 0x128], eax
lea edx, [ebp - 0x12c]
push edx
xor eax, eax
inc eax
push ecx
push eax
mov dword [ebp - 0x12c], eax
call dword [sym.imp.WS2_32.dll_select]
push dword [ebp - 0xc]
mov dword [ebp - 8], eax
call fcn.004280b8
pop ecx
xor esi, esi
push ebx
lea eax, [ebp - 0x52c]
push esi
push eax
call fcn.00428c40
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
lea eax, [ebp - 0x52c]
add esp, 0xc
mov dword [ebp - 0xc], eax
call ebx
mov dword [ebp - 0x10], eax
jmp 0x422944
push dword [ebp - 0xc]
call fcn.004280b8
pop ecx
or eax, 0xffffffff
jmp 0x4229e1
mov edx, dword [ebp - 0x12c]
xor eax, eax
cmp edx, esi
jbe 0x4228ae
mov ecx, dword [edi + 0x4c]
cmp dword [ebp + eax*4 - 0x128], ecx
je 0x4228ae
inc eax
cmp eax, edx
jb 0x4228a0
cmp eax, edx
jne 0x4228c7
cmp edx, 0x40
jae 0x4228c7
mov ecx, dword [edi + 0x4c]
mov dword [ebp + eax*4 - 0x128], ecx
inc dword [ebp - 0x12c]
call ebx
sub eax, dword [ebp - 0x10]
xor edx, edx
mov ecx, 0x3e8
div ecx
mov ecx, dword [edi + 8]
mov dword [ebp - 0x18], esi
sub ecx, eax
lea eax, [ebp - 0x1c]
push eax
push esi
push esi
lea eax, [ebp - 0x12c]
push eax
push 1
mov dword [ebp - 0x1c], ecx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x422960
cmp eax, 1
jne 0x422944
push esi
lea eax, [ebp - 0x12c]
sub eax, dword [ebp - 0xc]
push eax
push dword [ebp - 0xc]
push dword [edi + 0x4c]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, esi
mov dword [ebp - 8], eax
jne 0x422924
or dword [ebp - 8], 0xffffffff
cmp dword [ebp - 8], 0xffffffff
je 0x422960
mov eax, dword [ebp - 8]
add dword [ebp - 0xc], eax
lea eax, [ebp - 0x52c]
push 0xa
push eax
call fcn.00429cc0
cmp eax, esi
pop ecx
pop ecx
jne 0x42295c
call ebx
mov ecx, dword [edi + 8]
sub eax, dword [ebp - 0x10]
imul ecx, ecx, 0x3e8
cmp eax, ecx
jb 0x422891
jmp 0x422960
mov byte [eax - 1], 0
lea eax, [ebp - 0x52c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
inc ebx
cmp ebx, 0x3fffffff
jle 0x42297c
xor eax, eax
jmp 0x422996
lea eax, [ebx + ebx]
call fcn.0042ff20
mov esi, esp
push dword [ebp - 0x20]
lea eax, [ebp - 0x52c]
push ebx
push eax
call fcn.0042346f
lea esi, [edi + 0x58]
call fcn.0040f4fc
cmp dword [ebp - 8], 0
je 0x4229dc
cmp dword [ebp - 8], 0xffffffff
je 0x4229dc
lea eax, [ebp - 0x52c]
push eax
mov byte [ebp - 0x529], 0
call fcn.00429cfe
cmp dword [esi + 0x18], 8
pop ecx
mov ebx, eax
jb 0x4229cb
mov esi, dword [esi + 4]
jmp 0x4229ce
add esi, 4
mov eax, dword [edi]
push esi
push ebx
push dword [ebp + 8]
mov ecx, edi
call dword [eax + 0xc]
jmp 0x4229df
or ebx, 0xffffffff
mov eax, ebx
lea esp, [ebp - 0x534]
pop esi
pop ebx
leave
ret 4