Function at 0x5c7620
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
sub esp, 0x318
test edx, edx
je 0x5c764b
mov ecx, dword [ebp + 0xc]
xor eax, eax
test ecx, ecx
je 0x5c764b
nop dword [eax]
cmp dword [edx + eax*8], 0xffffffff
jne 0x5c767f
inc eax
cmp eax, ecx
jb 0x5c7640
mov ecx, dword [ebp + 0x10]
mov eax, ecx
mov edx, dword [ebp + 0x14]
or eax, edx
je 0x5c7988
test edx, edx
jg 0x5c7975
jl 0x5c766d
test ecx, ecx
jae 0x5c796a
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 0x5c77ac
jae 0x5c77d9
mov ebx, dword [ebp + 8]
movzx ebx, word [ebx + eax*8 + 4]
test ebx, 0x710
je 0x5c77a9
cmp ecx, dword [ebp - 4]
mov eax, ecx
cmovbe eax, dword [ebp - 4]
mov dword [ebp - 4], eax
test ebx, 0x300
je 0x5c771d
xor eax, eax
test edi, edi
je 0x5c7700
cmp dword [ebp + eax*4 - 0x10c], ecx
je 0x5c7700
inc eax
cmp eax, edi
jb 0x5c76f2
cmp eax, edi
jne 0x5c771d
cmp edi, 0x40
jae 0x5c771d
mov dword [ebp + eax*4 - 0x10c], ecx
mov edi, dword [ebp - 0x110]
inc edi
mov dword [ebp - 0x110], edi
test bl, 0x10
je 0x5c775b
xor eax, eax
test esi, esi
je 0x5c773e
nop dword [eax + eax]
cmp dword [ebp + eax*4 - 0x210], ecx
je 0x5c773e
inc eax
cmp eax, esi
jb 0x5c7730
cmp eax, esi
jne 0x5c775b
cmp esi, 0x40
jae 0x5c775b
mov dword [ebp + eax*4 - 0x210], ecx
mov esi, dword [ebp - 0x214]
inc esi
mov dword [ebp - 0x214], esi
test ebx, 0x600
je 0x5c77a6
xor eax, eax
test edx, edx
je 0x5c777e
nop dword [eax]
cmp dword [ebp + eax*4 - 0x314], ecx
je 0x5c777e
inc eax
cmp eax, edx
jb 0x5c7770
cmp eax, edx
jne 0x5c779b
cmp edx, 0x40
jae 0x5c779b
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 0x5c77ac
mov eax, dword [ebp - 8]
mov ebx, dword [ebp - 4]
inc eax
mov dword [ebp - 8], eax
cmp eax, dword [ebp + 0xc]
jb 0x5c76a5
test edi, edi
jne 0x5c782a
test esi, esi
jne 0x5c782a
test edx, edx
jne 0x5c782a
mov ecx, dword [ebp + 0x10]
mov eax, ecx
mov edx, dword [ebp + 0x14]
or eax, edx
mov dword [ebp - 8], edx
jne 0x5c77ee
jmp 0x5c787d
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 0x5c7813
jl 0x5c77f8
test ecx, ecx
jae 0x5c7808
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or esi, 0xffffffff
jmp 0x5c787d
test edx, edx
jl 0x5c781f
jg 0x5c7813
cmp ecx, 0xffffffff
jb 0x5c781f
mov ecx, 0xfffffffe
mov dword [ebp - 8], 0
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
jmp 0x5c787d
push dword [ebp + 0x14]
lea eax, [ebp - 0xc]
push dword [ebp + 0x10]
push eax
call fcn.005dac80
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 0x5c789f
cmp esi, 0xffffffff
jne 0x5c7896
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 0x5c7954
lea ecx, [ebp - 0x110]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5c78fc
movzx ecx, word [esi - 2]
test ecx, 0x100
je 0x5c78e6
mov eax, 0x100
or word [esi], ax
movzx eax, word [esi]
movzx eax, ax
test ecx, 0x300
je 0x5c78fc
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 0x5c7919
test byte [esi - 2], 0x10
je 0x5c7919
or word [esi], 0x10
lea eax, [ebp - 0x318]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5c794d
movzx ecx, word [esi - 2]
test ebx, ecx
je 0x5c7937
or word [esi], bx
movzx eax, word [esi]
movzx eax, ax
test ecx, 0x400
je 0x5c794d
or eax, 0x400
mov word [esi], ax
cmp word [esi], 0
je 0x5c7954
inc edi
add esi, 8
sub dword [ebp + 0xc], 1
jne 0x5c78b0
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edx, edx
jl 0x5c7981
jg 0x5c7975
cmp ecx, 0xffffffff
jb 0x5c7981
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