Function at 0x5cb490
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
sub esp, 0x318
test edx, edx
je 0x5cb4bb
mov ecx, dword [ebp + 0xc]
xor eax, eax
test ecx, ecx
je 0x5cb4bb
nop dword [eax]
cmp dword [edx + eax*8], 0xffffffff
jne 0x5cb4ef
inc eax
cmp eax, ecx
jb 0x5cb4b0
mov ecx, dword [ebp + 0x10]
mov eax, ecx
mov edx, dword [ebp + 0x14]
or eax, edx
je 0x5cb7f8
test edx, edx
jg 0x5cb7e5
jl 0x5cb4dd
test ecx, ecx
jae 0x5cb7da
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret
push ebx
push esi
push edi
xor edi, edi
xor esi, esi
xor edx, edx
mov dword [ebp - 0x110], edi
or ebx, 0xffffffff
mov dword [ebp - 0x214], esi
xor eax, eax
mov dword [ebp - 0x318], edx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 8]
xor ebx, ebx
mov word [ecx + eax*8 + 6], bx
mov ecx, dword [ecx + eax*8]
mov ebx, dword [ebp - 4]
cmp ecx, 0xffffffff
je 0x5cb61c
jae 0x5cb649
mov ebx, dword [ebp + 8]
movzx ebx, word [ebx + eax*8 + 4]
test ebx, 0x710
je 0x5cb619
cmp ecx, dword [ebp - 4]
mov eax, ecx
cmovbe eax, dword [ebp - 4]
mov dword [ebp - 4], eax
test ebx, 0x300
je 0x5cb58d
xor eax, eax
test edi, edi
je 0x5cb570
cmp dword [ebp + eax*4 - 0x10c], ecx
je 0x5cb570
inc eax
cmp eax, edi
jb 0x5cb562
cmp eax, edi
jne 0x5cb58d
cmp edi, 0x40
jae 0x5cb58d
mov dword [ebp + eax*4 - 0x10c], ecx
mov edi, dword [ebp - 0x110]
inc edi
mov dword [ebp - 0x110], edi
test bl, 0x10
je 0x5cb5cb
xor eax, eax
test esi, esi
je 0x5cb5ae
nop dword [eax + eax]
cmp dword [ebp + eax*4 - 0x210], ecx
je 0x5cb5ae
inc eax
cmp eax, esi
jb 0x5cb5a0
cmp eax, esi
jne 0x5cb5cb
cmp esi, 0x40
jae 0x5cb5cb
mov dword [ebp + eax*4 - 0x210], ecx
mov esi, dword [ebp - 0x214]
inc esi
mov dword [ebp - 0x214], esi
test ebx, 0x600
je 0x5cb616
xor eax, eax
test edx, edx
je 0x5cb5ee
nop dword [eax]
cmp dword [ebp + eax*4 - 0x314], ecx
je 0x5cb5ee
inc eax
cmp eax, edx
jb 0x5cb5e0
cmp eax, edx
jne 0x5cb60b
cmp edx, 0x40
jae 0x5cb60b
mov dword [ebp + eax*4 - 0x314], ecx
mov edx, dword [ebp - 0x318]
inc edx
mov dword [ebp - 0x318], edx
mov ebx, dword [ebp - 4]
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ebx
jmp 0x5cb61c
mov eax, dword [ebp - 8]
mov ebx, dword [ebp - 4]
inc eax
mov dword [ebp - 8], eax
cmp eax, dword [ebp + 0xc]
jb 0x5cb515
test edi, edi
jne 0x5cb69a
test esi, esi
jne 0x5cb69a
test edx, edx
jne 0x5cb69a
mov ecx, dword [ebp + 0x10]
mov eax, ecx
mov edx, dword [ebp + 0x14]
or eax, edx
mov dword [ebp - 8], edx
jne 0x5cb65e
jmp 0x5cb6ed
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
test edx, edx
jg 0x5cb683
jl 0x5cb668
test ecx, ecx
jae 0x5cb678
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or esi, 0xffffffff
jmp 0x5cb6ed
test edx, edx
jl 0x5cb68f
jg 0x5cb683
cmp ecx, 0xffffffff
jb 0x5cb68f
mov ecx, 0xfffffffe
mov dword [ebp - 8], 0
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
jmp 0x5cb6ed
push dword [ebp + 0x14]
lea eax, [ebp - 0xc]
push dword [ebp + 0x10]
push eax
call fcn.005deb00
add esp, 0xc
lea esi, [ebp - 0x318]
lea ecx, [ebp - 0x214]
push eax
xor eax, eax
cmp dword [ebp - 0x318], eax
cmove esi, eax
cmp dword [ebp - 0x214], eax
push esi
cmove ecx, eax
xor edi, edi
cmp dword [ebp - 0x110], edi
lea eax, [ebp - 0x110]
push ecx
cmove eax, edi
push eax
lea eax, [ebx + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
test esi, esi
jg 0x5cb70f
cmp esi, 0xffffffff
jne 0x5cb706
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ecx, ecx
cmp eax, 0x2714
cmove esi, ecx
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 8]
xor edi, edi
add esi, 6
mov ebx, 0x200
nop dword [eax]
xor eax, eax
mov word [esi], ax
mov eax, dword [esi - 6]
cmp eax, 0xffffffff
je 0x5cb7c4
lea ecx, [ebp - 0x110]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5cb76c
movzx ecx, word [esi - 2]
test ecx, 0x100
je 0x5cb756
mov eax, 0x100
or word [esi], ax
movzx eax, word [esi]
movzx eax, ax
test ecx, 0x300
je 0x5cb76c
or eax, 0x300
mov word [esi], ax
lea eax, [ebp - 0x214]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5cb789
test byte [esi - 2], 0x10
je 0x5cb789
or word [esi], 0x10
lea eax, [ebp - 0x318]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5cb7bd
movzx ecx, word [esi - 2]
test ebx, ecx
je 0x5cb7a7
or word [esi], bx
movzx eax, word [esi]
movzx eax, ax
test ecx, 0x400
je 0x5cb7bd
or eax, 0x400
mov word [esi], ax
cmp word [esi], 0
je 0x5cb7c4
inc edi
add esi, 8
sub dword [ebp + 0xc], 1
jne 0x5cb720
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edx, edx
jl 0x5cb7f1
jg 0x5cb7e5
cmp ecx, 0xffffffff
jb 0x5cb7f1
mov ecx, 0xfffffffe
mov dword [ebp - 8], 0
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
mov esp, ebp
pop ebp
ret