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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x328
mov eax, dword [0x547e80]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
push edi
or edi, 0xffffffff
mov dword [ebp - 0x31c], esi
mov dword [ebp - 0x318], esi
mov dword [ebp - 0x314], esi
cmp ebx, edi
jne 0x40756e
cmp dword [ebp + 0xc], edi
jne 0x40756e
cmp dword [ebp + 0x10], edi
jne 0x40756e
push dword [ebp + 0x14]
call fcn.004074fa
pop ecx
jmp 0x40781d
mov eax, dword [ebp + 0x14]
cmp eax, esi
jle 0x40758c
mov dword [ebp - 0x314], eax
call fcn.00410335
mov dword [ebp - 0x31c], eax
mov dword [ebp - 0x318], edx
mov dword [ebp - 0x108], esi
mov dword [ebp - 0x20c], esi
cmp ebx, 0xffffffff
je 0x4075ba
xor esi, esi
inc esi
mov dword [ebp - 0x208], ebx
mov dword [ebp - 0x20c], esi
mov dword [ebp - 0x104], ebx
mov dword [ebp - 0x108], esi
mov edi, ebx
mov ecx, dword [ebp + 0xc]
cmp ecx, 0xffffffff
je 0x407633
xor eax, eax
test esi, esi
je 0x4075d6
cmp dword [ebp + eax*4 - 0x208], ecx
je 0x4075d6
inc eax
cmp eax, esi
jb 0x4075c8
cmp eax, esi
jne 0x4075f3
cmp esi, 0x40
jae 0x4075f3
mov dword [ebp + eax*4 - 0x208], ecx
mov esi, dword [ebp - 0x20c]
inc esi
mov dword [ebp - 0x20c], esi
xor eax, eax
cmp eax, dword [ebp - 0x108]
jae 0x407615
cmp dword [ebp + eax*4 - 0x104], ecx
je 0x40760f
inc eax
cmp eax, dword [ebp - 0x108]
jb 0x4075fd
cmp eax, dword [ebp - 0x108]
jne 0x40762d
cmp dword [ebp - 0x108], 0x40
jae 0x40762d
mov dword [ebp + eax*4 - 0x104], ecx
inc dword [ebp - 0x108]
cmp ecx, edi
jbe 0x407633
mov edi, ecx
mov edx, dword [ebp + 0x10]
xor ecx, ecx
mov dword [ebp - 0x310], ecx
cmp edx, 0xffffffff
je 0x407690
inc ecx
xor eax, eax
mov dword [ebp - 0x30c], edx
mov dword [ebp - 0x310], ecx
cmp eax, dword [ebp - 0x108]
jae 0x407672
cmp dword [ebp + eax*4 - 0x104], edx
je 0x40766c
inc eax
cmp eax, dword [ebp - 0x108]
jb 0x40765a
cmp eax, dword [ebp - 0x108]
jne 0x40768a
cmp dword [ebp - 0x108], 0x40
jae 0x40768a
mov dword [ebp + eax*4 - 0x104], edx
inc dword [ebp - 0x108]
cmp edx, edi
jbe 0x407690
mov edi, edx
xor eax, eax
cmp dword [ebp + 0x14], eax
jge 0x40769f
mov dword [ebp - 0x320], eax
jmp 0x4076ab
lea edx, [ebp - 0x328]
mov dword [ebp - 0x320], edx
inc edi
jmp 0x4076bc
mov esi, dword [ebp - 0x20c]
mov ecx, dword [ebp - 0x310]
xor eax, eax
cmp dword [ebp + 0x14], eax
jle 0x4076e0
mov eax, dword [ebp - 0x314]
cdq
mov ebx, 0x3e8
idiv ebx
mov ebx, dword [ebp + 8]
imul edx, edx, 0x3e8
mov dword [ebp - 0x324], edx
jmp 0x4076e8
jne 0x4076ee
mov dword [ebp - 0x324], eax
mov dword [ebp - 0x328], eax
push dword [ebp - 0x320]
neg ecx
lea eax, [ebp - 0x108]
push eax
sbb ecx, ecx
lea eax, [ebp - 0x310]
and ecx, eax
neg esi
sbb esi, esi
lea eax, [ebp - 0x20c]
push ecx
and esi, eax
push esi
push edi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x407775
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x40773b
cmp dword [0x551a84], 0
jne 0x407779
cmp eax, 0x2714
jne 0x407779
cmp dword [ebp + 0x14], 0
jle 0x4076ae
push dword [ebp - 0x318]
push dword [ebp - 0x31c]
call fcn.00410335
push edx
push eax
call fcn.0041034b
mov ecx, dword [ebp + 0x14]
sub ecx, eax
add esp, 0x10
mov dword [ebp - 0x314], ecx
test ecx, ecx
jg 0x4076ae
xor eax, eax
test eax, eax
jns 0x407781
or eax, 0xffffffff
jmp 0x40781d
jne 0x40778a
xor eax, eax
jmp 0x40781d
xor esi, esi
cmp ebx, 0xffffffff
je 0x4077b7
lea eax, [ebp - 0x20c]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4077a3
inc esi
lea eax, [ebp - 0x108]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4077b7
or esi, 4
cmp dword [ebp + 0xc], 0xffffffff
je 0x4077e9
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 0xc]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4077d3
or esi, 8
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 0xc]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4077e9
or esi, 4
cmp dword [ebp + 0x10], 0xffffffff
je 0x40781b
lea eax, [ebp - 0x310]
push eax
push dword [ebp + 0x10]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x407805
or esi, 2
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 0x10]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40781b
or esi, 4
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00446098
leave
ret