Function at 0x1304cb80
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 0x1304cbd1
cmp ebp, ebx
jne 0x1304cbd1
cmp dword [esp + 0x338], ebx
jne 0x1304cbd1
mov eax, dword [esp + 0x33c]
push eax
call fcn.1304cb50
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x31c
ret
mov eax, dword [esp + 0x33c]
cmp eax, esi
jle 0x1304cbeb
mov edi, eax
call fcn.1305b400
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
xor ecx, ecx
xor edx, edx
or esi, 0xffffffff
cmp ebx, 0xffffffff
mov dword [esp + 0x20], ecx
mov dword [esp + 0x124], edx
je 0x1304cc21
mov edx, 1
mov ecx, edx
mov dword [esp + 0x128], ebx
mov dword [esp + 0x124], edx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ecx
mov esi, ebx
cmp ebp, 0xffffffff
je 0x1304cc8b
xor eax, eax
test edx, edx
jbe 0x1304cc40
lea esp, [esp]
cmp dword [esp + eax*4 + 0x128], ebp
je 0x1304cc40
add eax, 1
cmp eax, edx
jb 0x1304cc30
cmp eax, edx
jne 0x1304cc58
cmp edx, 0x40
jae 0x1304cc58
mov dword [esp + eax*4 + 0x128], ebp
add dword [esp + 0x124], 1
xor eax, eax
test ecx, ecx
jbe 0x1304cc6d
mov edi, edi
cmp dword [esp + eax*4 + 0x24], ebp
je 0x1304cc6d
add eax, 1
cmp eax, ecx
jb 0x1304cc60
cmp eax, ecx
jne 0x1304cc85
cmp ecx, 0x40
jae 0x1304cc85
mov dword [esp + eax*4 + 0x24], ebp
mov ecx, dword [esp + 0x20]
add ecx, 1
mov dword [esp + 0x20], ecx
cmp ebp, esi
jbe 0x1304cc8b
mov esi, ebp
mov edx, dword [esp + 0x338]
xor eax, eax
cmp edx, 0xffffffff
mov dword [esp + 0x228], eax
je 0x1304ccdb
test ecx, ecx
mov dword [esp + 0x22c], edx
mov dword [esp + 0x228], 1
jbe 0x1304ccc3
cmp dword [esp + eax*4 + 0x24], edx
je 0x1304ccc3
add eax, 1
cmp eax, ecx
jb 0x1304ccb6
cmp eax, ecx
jne 0x1304ccd5
cmp ecx, 0x40
jae 0x1304ccd5
mov dword [esp + eax*4 + 0x24], edx
add dword [esp + 0x20], 1
cmp edx, esi
jbe 0x1304ccdb
mov esi, edx
mov ebp, dword [sym.imp.WS2_32.dll_select]
xor ebx, ebx
cmp dword [esp + 0x33c], ebx
lea ecx, [esp + 0x18]
setl bl
sub ebx, 1
and ebx, ecx
add esi, 1
lea esp, [esp]
mov eax, dword [esp + 0x33c]
xor ecx, ecx
cmp eax, ecx
jle 0x1304cd38
mov eax, 0x10624dd3
imul edi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x18], eax
imul eax, eax, 0x3e8
mov edx, edi
sub edx, eax
imul edx, edx, 0x3e8
mov dword [esp + 0x1c], edx
jmp 0x1304cd42
jne 0x1304cd42
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
push ebx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x230]
push ecx
lea edx, [esp + 0x130]
push edx
push esi
call ebp
cmp eax, 0xffffffff
jne 0x1304cdbf
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x1304cd7a
cmp dword [0x131692d4], 0
jne 0x1304cdc3
cmp eax, 0x2714
jne 0x1304cdc3
cmp dword [esp + 0x33c], 0
jle 0x1304cd00
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.1305b400
push edx
push eax
call fcn.1305b430
mov edi, dword [esp + 0x34c]
sub edi, eax
add esp, 0x10
test edi, edi
jg 0x1304cd00
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x31c
ret
test eax, eax
jge 0x1304cdd1
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x31c
ret
jne 0x1304cde0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x31c
ret
mov edi, dword [esp + 0x330]
xor esi, esi
cmp edi, 0xffffffff
je 0x1304ce17
lea edx, [esp + 0x124]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1304ce05
mov esi, 1
lea eax, [esp + 0x20]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1304ce17
or esi, 4
mov edi, dword [esp + 0x334]
cmp edi, 0xffffffff
je 0x1304ce4a
lea ecx, [esp + 0x124]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1304ce38
or esi, 8
lea edx, [esp + 0x20]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1304ce4a
or esi, 4
mov edi, dword [esp + 0x338]
cmp edi, 0xffffffff
je 0x1304ce7d
lea eax, [esp + 0x228]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1304ce6b
or esi, 2
lea ecx, [esp + 0x20]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1304ce7d
or esi, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x31c
ret