Function at 0x478740
Capabilities:
Check for time delay via gettickcount
Get socket status

Disassembly:
sub esp, 0x31c
push ebx
mov ebx, dword [esp + 0x324]
push ebp
mov ebp, dword [esp + 0x32c]
push esi
xor esi, esi
push edi
xor edi, edi
cmp ebx, 0xffffffff
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], esi
jne 0x4787b0
cmp ebp, ebx
jne 0x4787b0
cmp dword [esp + 0x338], ebx
jne 0x4787b0
mov eax, dword [esp + 0x33c]
cmp eax, esi
je 0x4787a3
jge 0x47879c
push 0x2726
call dword [sym.imp.WSOCK32.dll_WSASetLastError]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x31c
ret
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x31c
ret
mov eax, dword [esp + 0x33c]
cmp eax, esi
jle 0x4787ca
mov edi, eax
call fcn.00466ae0
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
xor ecx, ecx
xor eax, eax
or esi, 0xffffffff
cmp ebx, 0xffffffff
mov dword [esp + 0x20], ecx
mov dword [esp + 0x124], eax
je 0x478800
mov eax, 1
mov ecx, eax
mov dword [esp + 0x128], ebx
mov dword [esp + 0x124], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ecx
mov esi, ebx
cmp ebp, 0xffffffff
je 0x478867
xor edx, edx
test eax, eax
jbe 0x47881e
jmp 0x478810
cmp dword [esp + edx*4 + 0x128], ebp
je 0x47881e
inc edx
cmp edx, eax
jb 0x478810
cmp edx, eax
jne 0x478835
cmp eax, 0x40
jae 0x478835
mov dword [esp + edx*4 + 0x128], ebp
inc dword [esp + 0x124]
xor eax, eax
test ecx, ecx
jbe 0x47884b
jmp 0x478840
cmp dword [esp + eax*4 + 0x24], ebp
je 0x47884b
inc eax
cmp eax, ecx
jb 0x478840
cmp eax, ecx
jne 0x478861
cmp ecx, 0x40
jae 0x478861
mov dword [esp + eax*4 + 0x24], ebp
mov ecx, dword [esp + 0x20]
inc ecx
mov dword [esp + 0x20], ecx
cmp ebp, esi
jbe 0x478867
mov esi, ebp
mov edx, dword [esp + 0x338]
cmp edx, 0xffffffff
mov dword [esp + 0x228], 0
je 0x4788b8
xor eax, eax
test ecx, ecx
mov dword [esp + 0x22c], edx
mov dword [esp + 0x228], 1
jbe 0x4788a1
cmp dword [esp + eax*4 + 0x24], edx
je 0x4788a1
inc eax
cmp eax, ecx
jb 0x478896
cmp eax, ecx
jne 0x4788b2
cmp ecx, 0x40
jae 0x4788b2
mov dword [esp + eax*4 + 0x24], edx
inc dword [esp + 0x20]
cmp edx, esi
jbe 0x4788b8
mov esi, edx
mov ebp, dword [esp + 0x33c]
xor ebx, ebx
test ebp, ebp
setl bl
lea eax, [esp + 0x18]
lea ebp, [esi + 1]
dec ebx
and ebx, eax
mov eax, dword [esp + 0x33c]
xor ecx, ecx
cmp eax, ecx
jle 0x4788f7
mov eax, edi
cdq
mov ecx, 0x3e8
idiv ecx
imul edx, edx, 0x3e8
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
jmp 0x478901
jne 0x478901
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
push ebx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x230]
push eax
lea ecx, [esp + 0x130]
push ecx
push ebp
call dword [sym.imp.WSOCK32.dll_select]
mov esi, eax
cmp esi, 0xffffffff
jne 0x478978
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
test eax, eax
je 0x478936
cmp eax, 0x2714
jne 0x478978
mov eax, dword [esp + 0x33c]
test eax, eax
jle 0x4788d0
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push edx
push eax
call fcn.00466ae0
push edx
push eax
call fcn.00466b00
mov edi, dword [esp + 0x34c]
sub edi, eax
add esp, 0x10
test edi, edi
jg 0x4788d0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x31c
ret
test esi, esi
jl 0x47878e
je 0x4787a3
mov edi, dword [esp + 0x330]
xor esi, esi
cmp edi, 0xffffffff
je 0x4789bd
lea ecx, [esp + 0x124]
push ecx
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4789ab
mov esi, 1
lea edx, [esp + 0x20]
push edx
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4789bd
or esi, 4
mov edi, dword [esp + 0x334]
cmp edi, 0xffffffff
je 0x4789f0
lea eax, [esp + 0x124]
push eax
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4789de
or esi, 8
lea ecx, [esp + 0x20]
push ecx
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4789f0
or esi, 4
mov edi, dword [esp + 0x338]
cmp edi, 0xffffffff
je 0x478a23
lea edx, [esp + 0x228]
push edx
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x478a11
or esi, 2
lea eax, [esp + 0x20]
push eax
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x478a23
or esi, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x31c
ret