Function at 0x5bae60
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
sub esp, 0x318
test edx, edx
je 0x5bae8b
mov ecx, dword [ebp + 0xc]
xor eax, eax
test ecx, ecx
je 0x5bae8b
nop dword [eax]
cmp dword [edx + eax*8], 0xffffffff
jne 0x5baebf
inc eax
cmp eax, ecx
jb 0x5bae80
mov ecx, dword [ebp + 0x10]
mov eax, ecx
mov edx, dword [ebp + 0x14]
or eax, edx
je 0x5bb1c8
test edx, edx
jg 0x5bb1b5
jl 0x5baead
test ecx, ecx
jae 0x5bb1aa
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 0x5bafec
jae 0x5bb019
mov ebx, dword [ebp + 8]
movzx ebx, word [ebx + eax*8 + 4]
test ebx, 0x710
je 0x5bafe9
cmp ecx, dword [ebp - 4]
mov eax, ecx
cmovbe eax, dword [ebp - 4]
mov dword [ebp - 4], eax
test ebx, 0x300
je 0x5baf5d
xor eax, eax
test edi, edi
je 0x5baf40
cmp dword [ebp + eax*4 - 0x10c], ecx
je 0x5baf40
inc eax
cmp eax, edi
jb 0x5baf32
cmp eax, edi
jne 0x5baf5d
cmp edi, 0x40
jae 0x5baf5d
mov dword [ebp + eax*4 - 0x10c], ecx
mov edi, dword [ebp - 0x110]
inc edi
mov dword [ebp - 0x110], edi
test bl, 0x10
je 0x5baf9b
xor eax, eax
test esi, esi
je 0x5baf7e
nop dword [eax + eax]
cmp dword [ebp + eax*4 - 0x210], ecx
je 0x5baf7e
inc eax
cmp eax, esi
jb 0x5baf70
cmp eax, esi
jne 0x5baf9b
cmp esi, 0x40
jae 0x5baf9b
mov dword [ebp + eax*4 - 0x210], ecx
mov esi, dword [ebp - 0x214]
inc esi
mov dword [ebp - 0x214], esi
test ebx, 0x600
je 0x5bafe6
xor eax, eax
test edx, edx
je 0x5bafbe
nop dword [eax]
cmp dword [ebp + eax*4 - 0x314], ecx
je 0x5bafbe
inc eax
cmp eax, edx
jb 0x5bafb0
cmp eax, edx
jne 0x5bafdb
cmp edx, 0x40
jae 0x5bafdb
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 0x5bafec
mov eax, dword [ebp - 8]
mov ebx, dword [ebp - 4]
inc eax
mov dword [ebp - 8], eax
cmp eax, dword [ebp + 0xc]
jb 0x5baee5
test edi, edi
jne 0x5bb06a
test esi, esi
jne 0x5bb06a
test edx, edx
jne 0x5bb06a
mov ecx, dword [ebp + 0x10]
mov eax, ecx
mov edx, dword [ebp + 0x14]
or eax, edx
mov dword [ebp - 8], edx
jne 0x5bb02e
jmp 0x5bb0bd
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 0x5bb053
jl 0x5bb038
test ecx, ecx
jae 0x5bb048
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or esi, 0xffffffff
jmp 0x5bb0bd
test edx, edx
jl 0x5bb05f
jg 0x5bb053
cmp ecx, 0xffffffff
jb 0x5bb05f
mov ecx, 0xfffffffe
mov dword [ebp - 8], 0
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
jmp 0x5bb0bd
push dword [ebp + 0x14]
lea eax, [ebp - 0xc]
push dword [ebp + 0x10]
push eax
call fcn.005ce4d0
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 0x5bb0df
cmp esi, 0xffffffff
jne 0x5bb0d6
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 0x5bb194
lea ecx, [ebp - 0x110]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5bb13c
movzx ecx, word [esi - 2]
test ecx, 0x100
je 0x5bb126
mov eax, 0x100
or word [esi], ax
movzx eax, word [esi]
movzx eax, ax
test ecx, 0x300
je 0x5bb13c
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 0x5bb159
test byte [esi - 2], 0x10
je 0x5bb159
or word [esi], 0x10
lea eax, [ebp - 0x318]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5bb18d
movzx ecx, word [esi - 2]
test ebx, ecx
je 0x5bb177
or word [esi], bx
movzx eax, word [esi]
movzx eax, ax
test ecx, 0x400
je 0x5bb18d
or eax, 0x400
mov word [esi], ax
cmp word [esi], 0
je 0x5bb194
inc edi
add esi, 8
sub dword [ebp + 0xc], 1
jne 0x5bb0f0
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edx, edx
jl 0x5bb1c1
jg 0x5bb1b5
cmp ecx, 0xffffffff
jb 0x5bb1c1
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