Function at 0x587b10
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x637d20
mov eax, dword fs:[0]
push eax
sub esp, 0x888
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 - 0x87c], ecx
mov edi, dword [ebp + 0x14]
mov ecx, edi
mov ebx, dword [ebp + 0x18]
mov dword [ebp - 0x888], edi
mov dword [ebp - 0x878], ebx
call fcn.004d90e0
cmp byte [ebp + 0xc], 0
je 0x587b6a
mov esi, 1
jmp 0x587b77
mov esi, dword [ebp + 8]
mov eax, 0x1499700
test esi, esi
cmove esi, eax
mov eax, dword [edi + 4]
mov dword [ebp - 0x880], esi
test eax, eax
je 0x587ba5
cmp dword [eax + 0x88], 0
jne 0x587ba5
mov ecx, edi
call fcn.004d9180
test al, al
je 0x587ba5
mov eax, dword [edi + 4]
mov dword [eax + 0x88], 0x42
mov ecx, dword [ebp - 0x87c]
cmp dword [ecx + 0x28c], 0xffffffff
jne 0x587bc9
mov eax, dword [ebx]
mov ecx, ebx
push str.invalid_socket__not_ready_for_writing.
call dword [eax + 0x14]
mov byte [edi + 0x16], 1
jmp 0x5881ba
mov eax, dword [edi + 4]
mov dword [ebp - 0x890], 0x32
test eax, eax
je 0x587bf0
mov eax, dword [eax + 0x88]
mov edx, 0x32
cmp eax, edx
cmovb eax, edx
mov dword [ebp - 0x890], eax
test esi, esi
je 0x587f1d
xor eax, eax
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x884], ecx
xor edi, edi
cmp byte [ebp + 0xc], al
jne 0x587c42
mov eax, dword [ebp - 0x890]
mov edi, esi
sub edi, ecx
cmp esi, edi
cmovbe edi, eax
test eax, eax
je 0x587c23
cmp edi, eax
cmova edi, eax
cmp edi, esi
mov eax, 0x10624dd3
cmova edi, esi
mul edi
mov ecx, edi
shr edx, 6
imul eax, edx, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
lea ecx, [ebp - 0x86c]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
call fcn.00476f40
mov dword [ebp - method.ckFdSet.virtual_0], vtable.ckFdSet.0
mov dword [ebp - 0x864], 0x3004bc8d
mov dword [ebp - 0x1c], 0x3004bc8d
push 0x40
lea eax, [ebp - 0x5c]
mov dword [ebp - 4], 0
push 0
push eax
mov dword [ebp - 0x860], 0
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp dword [ebp - 0x864], 0x3004bc8d
je 0x587ca5
push 0
call fcn.00401ab0
add esp, 4
cmp dword [ebp - 0x1c], 0x3004bc8d
je 0x587cb8
push 0
call fcn.00401ab0
add esp, 4
mov ebx, dword [ebp - 0x87c]
mov edx, dword [ebx + 0x28c]
test edx, edx
js 0x588140
mov ecx, dword [ebp - 0x860]
xor eax, eax
test ecx, ecx
je 0x587cee
nop dword [eax + eax]
cmp dword [ebp + eax*4 - 0x85c], edx
je 0x587cee
inc eax
cmp eax, ecx
jb 0x587ce0
cmp eax, ecx
jne 0x587d07
cmp ecx, 0x200
jae 0x587d07
mov dword [ebp + eax*4 - 0x85c], edx
inc dword [ebp - 0x860]
xorps xmm0, xmm0
lea ecx, [ebp - 0x874]
movlpd qword [ebp - 0x874], xmm0
call fcn.00476f60
xor ecx, ecx
mov byte [ebp - 4], 1
xor esi, esi
cmp byte [ebp + 0x10], cl
je 0x587e05
push 0x854
call fcn.006222af
mov esi, eax
add esp, 4
mov dword [ebp - 0x894], esi
mov byte [ebp - 4], 2
test esi, esi
je 0x587d6b
mov ecx, esi
call fcn.00476f40
mov dword [esi], vtable.ckFdSet.0
mov dword [esi + 8], 0x3004bc8d
mov dword [esi + 0x850], 0x3004bc8d
jmp 0x587d6d
xor esi, esi
lea eax, [esi + 0xc]
mov byte [ebp - 4], 1
mov dword [eax], 0
push 0x40
mov dword [ebp - 0x88c], eax
lea eax, [esi + 0x810]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp dword [esi + 8], 0x3004bc8d
je 0x587da6
push 0
call fcn.00401ab0
add esp, 4
cmp dword [esi + 0x850], 0x3004bc8d
je 0x587dbc
push 0
call fcn.00401ab0
add esp, 4
mov ebx, dword [ebx + 0x28c]
mov dword [ebp - 0x870], esi
test ebx, ebx
js 0x588131
mov ecx, dword [ebp - 0x88c]
xor eax, eax
mov edx, dword [ecx]
test edx, edx
je 0x587df3
lea ecx, [esi + 0x10]
cmp dword [ecx], ebx
je 0x587ded
inc eax
add ecx, 4
cmp eax, edx
jb 0x587de1
mov ecx, dword [ebp - 0x88c]
cmp eax, edx
jne 0x587e05
cmp edx, 0x200
jae 0x587e05
mov dword [esi + eax*4 + 0x10], ebx
inc dword [ecx]
lea eax, [ebp - 0x18]
push eax
push ecx
lea eax, [ebp - 0x860]
push eax
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x5880bd
test ebx, ebx
js 0x5880bd
jg 0x587f61
cmp byte [ebp + 0xc], 0
jne 0x587f45
mov eax, dword [ebp - 0x884]
mov esi, dword [ebp - 0x880]
add eax, edi
mov dword [ebp - 0x884], eax
cmp eax, esi
jae 0x587ed3
mov ebx, dword [ebp - 0x878]
mov edi, dword [ebp - 0x888]
mov ecx, edi
push ebx
call fcn.004d9240
test al, al
jne 0x587eb1
lea ecx, [ebp - 0x874]
call fcn.00477000
lea ecx, [ebp - 0x86c]
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - method.ckFdSet.virtual_0], vtable.ckFdSet.0
mov dword [ebp - 0x864], 0
mov dword [ebp - 0x1c], 0
call fcn.00476fe0
mov ecx, dword [ebp - 0x884]
jmp 0x587c0b
mov byte [edi + 0x15], 1
mov ecx, ebx
mov eax, dword [ebx]
push str.socket_write_aborted_by_application..
call dword [eax + 0x14]
lea ecx, [ebp - 0x874]
xor bl, bl
call fcn.00477000
jmp 0x588142
lea ecx, [ebp - 0x874]
call fcn.00477000
lea ecx, [ebp - 0x86c]
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - method.ckFdSet.virtual_0], vtable.ckFdSet.0
mov dword [ebp - 0x864], 0
mov dword [ebp - 0x1c], 0
call fcn.00476fe0
mov ebx, dword [ebp - 0x878]
mov edi, dword [ebp - 0x888]
mov ecx, dword [ebp - 0x87c]
cmp byte [ebp + 0x10], 0
je 0x58816c
mov eax, dword [ebx]
mov ecx, ebx
push str.timeout_waiting_for_connect_to_complete_
call dword [eax + 0x14]
push esi
push str.timeoutMs
mov ecx, ebx
call fcn.004b2d90
jmp 0x5881b6
mov eax, dword [ebp - 0x888]
lea ecx, [ebp - 0x874]
xor bl, bl
mov byte [eax + 0x14], 1
call fcn.00477000
jmp 0x588142
mov edi, dword [ebp - 0x87c]
lea eax, [ebp - 0x860]
push eax
push dword [edi + 0x28c]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x588131
test esi, esi
je 0x588037
lea eax, [esi + 0xc]
push eax
push dword [edi + 0x28c]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x588037
mov esi, dword [ebp - 0x878]
mov ecx, esi
push str.Connection_attempt_failed.
mov eax, dword [esi]
call dword [eax + 0x18]
mov edi, dword [ebp - 0x880]
mov ecx, esi
push edi
push str.maxWaitTimeMs
call fcn.004b2d90
mov ebx, dword [ebp - 0x884]
cmp edi, ebx
jbe 0x588018
lea eax, [ebx - 0x4e20]
cmp eax, 0x7d0
ja 0x588018
mov eax, dword [esi]
mov ecx, esi
push str.The_Windows_TCP_IP_stack_has_a_system_wide_retry_delay_and_retry_count_for_the_initial_connection.
call dword [eax + 0x18]
mov eax, dword [esi]
mov ecx, esi
push str.The_default_settings_result_in_an_overall_21_second_timeout.
call dword [eax + 0x18]
mov eax, dword [esi]
mov ecx, esi
push str.If_you_see_this_error_message_21_seconds_after_the_connection_attempt_is_initiated__it_usually_means_one_of_two_things:
call dword [eax + 0x18]
mov eax, dword [esi]
mov ecx, esi
push str._1__The_server_is_not_there__not_listening_for_connection_attempts_on_the_specified_IP_address_and_port_.
call dword [eax + 0x18]
mov eax, dword [esi]
mov ecx, esi
push str._2__A_firewall_is_blocking_your_connection_attempt_from_reaching_the_server.
call dword [eax + 0x18]
push ebx
push str.totalMsWaitedSoFar
mov ecx, esi
call fcn.004b2d90
lea ecx, [ebp - 0x874]
xor bl, bl
call fcn.00477000
jmp 0x588142
mov esi, dword [ebp - 0x878]
mov ecx, esi
push 0
push str.nfds
call fcn.004b2d90
push ebx
push str.nStatus
mov ecx, esi
call fcn.004b2d90
push dword [edi + 0x28c]
mov ecx, esi
push str.socketNum
call fcn.004b2d90
mov edi, dword [ebp - 0x880]
mov ecx, esi
push edi
push str.timeoutMs
call fcn.004b2d90
movzx eax, byte [ebp + 0xc]
mov ecx, esi
push eax
push str.bPoll
call fcn.004b2d90
movzx eax, byte [ebp + 0x10]
mov ecx, esi
push eax
push str.bForConnect
call fcn.004b2d90
mov eax, dword [esi]
mov ecx, esi
push str.Socket_select_for_writeability_returned_unexpected_result_
call dword [eax + 0x18]
lea ecx, [ebp - 0x874]
mov bl, 1
call fcn.00477000
jmp 0x588142
mov esi, dword [ebp - 0x878]
mov ecx, esi
call fcn.004b3640
push 0
push str.nfds
mov ecx, esi
call fcn.004b2d90
mov ecx, dword [ebp - 0x87c]
push dword [ecx + 0x28c]
mov ecx, esi
push str.socketNum
call fcn.004b2d90
mov edi, dword [ebp - 0x880]
mov ecx, esi
push edi
push str.timeoutMs
call fcn.004b2d90
movzx eax, byte [ebp + 0xc]
mov ecx, esi
push eax
push str.bPoll
call fcn.004b2d90
movzx eax, byte [ebp + 0x10]
mov ecx, esi
push eax
push str.bForConnect
call fcn.004b2d90
mov eax, dword [esi]
mov ecx, esi
push str.Socket_select_for_writeable_returned_an_error_
call dword [eax + 0x14]
lea ecx, [ebp - 0x874]
mov bl, 1
call fcn.00477000
jmp 0x588142
mov bl, 1
lea ecx, [ebp - 0x86c]
mov dword [ebp - method.ckFdSet.virtual_0], vtable.ckFdSet.0
mov dword [ebp - 0x864], 0
mov dword [ebp - 0x1c], 0
call fcn.00476fe0
mov al, bl
jmp 0x5881bc
push dword [ecx + 0x28c]
mov ecx, ebx
push str.socketNum
call fcn.004b2d90
push esi
push str.timeoutMs
mov ecx, ebx
call fcn.004b2d90
movzx eax, byte [ebp + 0xc]
mov ecx, ebx
push eax
push str.bPoll
call fcn.004b2d90
push 0
push str.bForConnect
mov ecx, ebx
call fcn.004b2d90
mov eax, dword [ebx]
mov ecx, ebx
push str.socket_is_not_ready_for_writing_
call dword [eax + 0x14]
mov byte [edi + 0x14], 1
xor al, al
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 0x14