Function at 0x587800
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x637cc0
mov eax, dword fs:[0]
push eax
sub esp, 0x880
mov eax, dword [0x717f80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x88c], ecx
mov esi, dword [ebp + 0xc]
mov ebx, 1
cmp dword [ebp + 8], 0xabcd0123
mov ecx, esi
mov edi, dword [ebp + 0x10]
cmovne ebx, dword [ebp + 8]
mov dword [ebp - 0x880], esi
mov dword [ebp - 0x888], edi
call fcn.004d90e0
mov eax, dword [ebp - 0x88c]
cmp dword [eax + 0x28c], 0xffffffff
jne 0x587883
mov eax, dword [edi]
mov ecx, edi
push str.Invalid_socket.
call dword [eax + 0x14]
mov byte [esi + 0x16], 1
xor al, al
jmp 0x587ae7
mov eax, dword [esi + 4]
xor edi, edi
test eax, eax
je 0x5878a0
mov edi, dword [eax + 0x88]
test edi, edi
je 0x5878a0
mov eax, 0x32
cmp edi, eax
cmovb edi, eax
test ebx, ebx
mov eax, 0xc042c00
cmove ebx, eax
test edi, edi
jne 0x5878bf
mov ecx, esi
call fcn.004d9180
test al, al
mov ecx, 0x42
cmovne edi, ecx
lea ecx, [ebp - 0x878]
mov dword [ebp - 0x884], 0
mov byte [ebp - 0x879], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
call fcn.00476f40
mov dword [ebp - 0x878], 0x696660
mov dword [ebp - 0x870], 0x3004bc8d
mov dword [ebp - 0x28], 0x3004bc8d
mov dword [ebp - 4], 0
test ebx, ebx
je 0x587ab9
mov al, byte [ebp - 0x879]
xor ecx, ecx
mov esi, ebx
mov edx, 0x14d
sub esi, ecx
test edi, edi
jne 0x58792f
cmp esi, edx
cmovae esi, edx
jmp 0x587939
cmp edi, esi
cmovbe esi, edi
cmp esi, edi
cmova esi, edi
test al, al
je 0x58794a
shr esi, 1
mov eax, 1
cmp esi, 1
cmovb esi, eax
cmp esi, ebx
mov dword [ebp - 0x86c], 0
mov eax, 0x10624dd3
cmova esi, ebx
mul esi
mov ecx, esi
shr edx, 6
imul eax, edx, 0x3e8
push 0x40
push 0
mov dword [ebp - 0x18], edx
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x68]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp dword [ebp - 0x870], 0x3004bc8d
je 0x58799f
push 0
call fcn.00401ab0
add esp, 4
cmp dword [ebp - 0x28], 0x3004bc8d
je 0x5879b2
push 0
call fcn.00401ab0
add esp, 4
mov eax, dword [ebp - 0x88c]
mov edx, dword [eax + 0x28c]
test edx, edx
js 0x587aa7
mov ecx, dword [ebp - 0x86c]
xor eax, eax
test ecx, ecx
je 0x5879e0
cmp dword [ebp + eax*4 - 0x868], edx
je 0x5879e0
inc eax
cmp eax, ecx
jb 0x5879d2
cmp eax, ecx
jne 0x5879f9
cmp ecx, 0x200
jae 0x5879f9
mov dword [ebp + eax*4 - 0x868], edx
inc dword [ebp - 0x86c]
lea eax, [ebp - 0x18]
push eax
push 0
push 0
lea eax, [ebp - 0x86c]
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x587a7b
test eax, eax
js 0x587a7b
jne 0x587a77
cmp dword [ebp + 8], 0xabcd0123
je 0x587ab3
mov eax, dword [ebp - 0x884]
add eax, esi
mov esi, dword [ebp - 0x880]
mov dword [ebp - 0x884], eax
inc eax
cmp eax, ebx
jae 0x587ab9
push dword [ebp - 0x888]
mov ecx, esi
call fcn.004d9240
test al, al
jne 0x587a61
mov ecx, dword [ebp - 0x884]
cmp ecx, ebx
jae 0x587ab9
jmp 0x58791b
mov ecx, dword [ebp - 0x888]
mov byte [esi + 0x15], 1
push str.socket_operation_aborted_by_application
mov eax, dword [ecx]
call dword [eax + 0x14]
jmp 0x587abd
mov bl, 1
jmp 0x587abf
push str.waitReadableSocket
push dword [ebp - 0x888]
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x24]
movq qword [ebp - 0x24], xmm0
call fcn.004b2490
lea ecx, [ebp - 0x24]
call fcn.004b2630
jmp 0x587abd
mov eax, dword [ebp - 0x880]
mov byte [eax + 0x16], 1
jmp 0x587abd
mov esi, dword [ebp - 0x880]
mov byte [esi + 0x14], 1
xor bl, bl
lea ecx, [ebp - 0x878]
mov dword [ebp - 0x878], 0x696660
mov dword [ebp - 0x870], 0
mov dword [ebp - 0x28], 0
call fcn.00476fe0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00622073
mov esp, ebp
pop ebp
ret 0xc