Function at 0x580d70
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x34c
xor ebx, ebx
or esi, 0xffffffff
mov dword [ebp - 0x128], 0
cmp ebx, dword [ebp + 8]
jge 0x580dc9
mov edx, dword [ebp - 0x128]
xor eax, eax
cmp edx, 0
jbe 0x580fc5
mov edi, dword [ebp + 0xc]
mov ecx, dword [edi + ebx*4]
cmp dword [ebp + eax*4 - 0x124], ecx
je 0x580db5
inc eax
cmp edx, eax
ja 0x580da7
cmp edx, eax
je 0x580fd3
cmp ecx, esi
jle 0x580dc3
mov esi, ecx
inc ebx
cmp ebx, dword [ebp + 8]
jl 0x580d90
xor ebx, ebx
mov dword [ebp - 0x238], 0
cmp ebx, dword [ebp + 0x10]
jge 0x580e36
lea esi, [esi]
mov edx, dword [ebp - 0x238]
xor eax, eax
cmp edx, 0
jbe 0x580fef
mov edi, dword [ebp + 0x14]
mov ecx, dword [edi + ebx*4]
cmp dword [ebp + eax*4 - 0x234], ecx
je 0x580ff5
inc eax
cmp edx, eax
ja 0x580df7
cmp edx, eax
jne 0x580ffd
cmp eax, 0x3f
ja 0x580ffd
mov dword [ebp + eax*4 - 0x234], ecx
inc eax
mov dword [ebp - 0x238], eax
cmp ecx, esi
jg 0x581005
inc ebx
cmp ebx, dword [ebp + 0x10]
jl 0x580de0
xor ebx, ebx
mov dword [ebp - 0x348], 0
cmp ebx, dword [ebp + 0x18]
jge 0x580ea6
mov edx, dword [ebp - 0x348]
xor eax, eax
cmp edx, 0
jbe 0x58100d
mov edi, dword [ebp + 0x1c]
mov ecx, dword [edi + ebx*4]
mov esi, esi
cmp dword [ebp + eax*4 - 0x344], ecx
je 0x581013
inc eax
cmp edx, eax
ja 0x580e60
cmp edx, eax
jne 0x58101b
cmp eax, 0x3f
ja 0x58101b
mov dword [ebp + eax*4 - 0x344], ecx
inc eax
mov dword [ebp - 0x348], eax
cmp ecx, esi
jg 0x581023
lea esi, [esi]
inc ebx
cmp ebx, dword [ebp + 0x18]
jl 0x580e47
mov edx, dword [ebp + 0x20]
xor eax, eax
test edx, edx
js 0x580ef9
mov eax, dword [ebp + 0x20]
mov edx, 0x10624dd3
imul edx
sar edx, 6
mov eax, dword [ebp + 0x20]
sar eax, 0x1f
sub edx, eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x350], edx
lea edx, [edx + edx*4]
lea edx, [edx + edx*4]
lea edx, [edx + edx*4]
shl edx, 3
sub eax, edx
mov dword [ebp + 0x20], eax
mov edx, dword [ebp + 0x20]
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
mov dword [ebp - 0x34c], eax
lea eax, [ebp - 0x350]
sub esp, 0xc
lea edi, [ebp - 0x348]
push eax
lea eax, [ebp - 0x238]
push edi
lea edi, [ebp - 0x128]
push eax
lea eax, [esi + 1]
push edi
push eax
call sub.ws2_32.dll_select
add esp, 0xc
mov esi, eax
test eax, eax
js 0x580fbb
xor ebx, ebx
cmp ebx, dword [ebp + 8]
jge 0x580f55
nop
mov edx, dword [ebp + 0xc]
push eax
push eax
push edi
mov eax, dword [edx + ebx*4]
push eax
call sub.ws2_32.dll___WSAFDIsSet
pop edx
test eax, eax
pop ecx
jne 0x580f4f
mov eax, dword [ebp + 0xc]
mov dword [eax + ebx*4], 0
inc ebx
cmp ebx, dword [ebp + 8]
jl 0x580f30
xor ebx, ebx
cmp ebx, dword [ebp + 0x10]
jge 0x580f88
lea esi, [esi]
lea edx, [ebp - 0x238]
mov edi, dword [ebp + 0x14]
push eax
push eax
push edx
mov eax, dword [edi + ebx*4]
push eax
call sub.ws2_32.dll___WSAFDIsSet
pop edx
test eax, eax
pop ecx
jne 0x580f82
mov dword [edi + ebx*4], 0
inc ebx
cmp ebx, dword [ebp + 0x10]
jl 0x580f60
xor ebx, ebx
cmp ebx, dword [ebp + 0x18]
jge 0x580fbb
nop
mov edx, dword [ebp + 0x1c]
push eax
push eax
lea eax, [ebp - 0x348]
push eax
mov edi, dword [edx + ebx*4]
push edi
call sub.ws2_32.dll___WSAFDIsSet
pop edx
test eax, eax
pop ecx
jne 0x580fb5
mov edi, dword [ebp + 0x1c]
mov dword [edi + ebx*4], 0
inc ebx
cmp ebx, dword [ebp + 0x18]
jl 0x580f90
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [ebp + 0xc]
cmp edx, eax
mov ecx, dword [edi + ebx*4]
jne 0x580dbd
cmp eax, 0x3f
ja 0x580dbd
mov dword [ebp + eax*4 - 0x124], ecx
inc eax
mov dword [ebp - 0x128], eax
jmp 0x580dbd
mov edi, dword [ebp + 0x14]
mov ecx, dword [edi + ebx*4]
cmp edx, eax
je 0x580e11
cmp ecx, esi
jle 0x580e30
mov esi, ecx
inc ebx
jmp 0x580e31
mov edi, dword [ebp + 0x1c]
mov ecx, dword [edi + ebx*4]
cmp edx, eax
je 0x580e7a
cmp ecx, esi
jle 0x580ea0
mov esi, ecx
inc ebx
jmp 0x580ea1