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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x328
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
je 0x478284
xor eax, eax
cmp dword [ebp + 0xc], esi
jbe 0x478284
cmp dword [ebx + eax*8], 0xffffffff
jne 0x478292
inc eax
cmp eax, dword [ebp + 0xc]
jb 0x478278
push dword [ebp + 0x10]
call fcn.00477f69
pop ecx
jmp 0x47850f
mov eax, dword [ebp + 0x10]
cmp eax, esi
jle 0x4782a7
mov dword [ebp - 0xc], eax
call fcn.0047ff7b
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], edx
or dword [ebp - 8], 0xffffffff
push edi
xor ecx, ecx
xor edi, edi
and dword [ebp - 4], ecx
mov dword [ebp - 0x120], ecx
mov dword [ebp - 0x224], esi
mov dword [ebp - 0x328], edi
mov edx, dword [ebp - 4]
shl edx, 3
lea eax, [edx + ebx + 4]
mov edx, dword [edx + ebx]
and word [eax + 2], 0
cmp edx, 0xffffffff
je 0x478399
movzx ebx, word [eax]
test bl, 7
je 0x478396
cmp edx, dword [ebp - 8]
jbe 0x4782f4
mov dword [ebp - 8], edx
test bl, 1
je 0x47832a
xor eax, eax
test ecx, ecx
jbe 0x47830d
cmp dword [ebp + eax*4 - 0x11c], edx
je 0x47830d
inc eax
cmp eax, ecx
jb 0x4782ff
cmp eax, ecx
jne 0x47832a
cmp ecx, 0x40
jae 0x47832a
mov dword [ebp + eax*4 - 0x11c], edx
mov ecx, dword [ebp - 0x120]
inc ecx
mov dword [ebp - 0x120], ecx
test bl, 4
je 0x478360
xor eax, eax
test esi, esi
jbe 0x478343
cmp dword [ebp + eax*4 - 0x220], edx
je 0x478343
inc eax
cmp eax, esi
jb 0x478335
cmp eax, esi
jne 0x478360
cmp esi, 0x40
jae 0x478360
mov dword [ebp + eax*4 - 0x220], edx
mov esi, dword [ebp - 0x224]
inc esi
mov dword [ebp - 0x224], esi
test bl, 2
je 0x478396
xor eax, eax
test edi, edi
jbe 0x478379
cmp dword [ebp + eax*4 - 0x324], edx
je 0x478379
inc eax
cmp eax, edi
jb 0x47836b
cmp eax, edi
jne 0x478396
cmp edi, 0x40
jae 0x478396
mov dword [ebp + eax*4 - 0x324], edx
mov edi, dword [ebp - 0x328]
inc edi
mov dword [ebp - 0x328], edi
mov ebx, dword [ebp + 8]
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jb 0x4782c5
xor ebx, ebx
cmp ecx, ebx
jne 0x4783c4
cmp esi, ebx
jne 0x4783c4
cmp edi, ebx
jne 0x4783c4
push dword [ebp + 0x10]
call fcn.00477f69
pop ecx
jmp 0x47850e
cmp dword [ebp + 0x10], ebx
jge 0x4783ce
mov dword [ebp - 4], ebx
jmp 0x4783d4
lea eax, [ebp - 0x1c]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
jmp 0x4783ef
mov ecx, dword [ebp - 0x120]
mov esi, dword [ebp - 0x224]
mov edi, dword [ebp - 0x328]
cmp dword [ebp + 0x10], ebx
jle 0x47840f
mov eax, dword [ebp - 0xc]
cdq
mov ebx, 0x3e8
idiv ebx
imul edx, edx, 0x3e8
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], edx
xor ebx, ebx
jmp 0x478417
jne 0x478417
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
push dword [ebp - 4]
neg edi
sbb edi, edi
lea eax, [ebp - 0x328]
and edi, eax
neg esi
sbb esi, esi
lea eax, [ebp - 0x224]
and esi, eax
neg ecx
push edi
sbb ecx, ecx
lea eax, [ebp - 0x120]
push esi
and ecx, eax
push ecx
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x478498
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, ebx
je 0x478468
cmp dword [0x4baa48], ebx
jne 0x47849c
cmp eax, 0x2714
jne 0x47849c
cmp dword [ebp + 0x10], ebx
jle 0x4783dd
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.0047ff7b
push edx
push eax
call fcn.0047ff91
mov ecx, dword [ebp + 0x10]
sub ecx, eax
add esp, 0x10
cmp ecx, ebx
mov dword [ebp - 0xc], ecx
jg 0x4783dd
xor eax, eax
cmp eax, ebx
jge 0x4784a1
or eax, 0xffffffff
jmp 0x47850e
jne 0x4784a7
xor eax, eax
jmp 0x47850e
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
add esi, 6
mov eax, dword [esi - 6]
and word [esi], 0
cmp eax, 0xffffffff
je 0x478506
lea ecx, [ebp - 0x120]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4784d1
or word [esi], 1
lea eax, [ebp - 0x224]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4784e8
or word [esi], 4
lea eax, [ebp - 0x328]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4784ff
or word [esi], 2
cmp word [esi], 0
je 0x478506
inc ebx
add esi, 8
dec edi
jne 0x4784b0
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret