Function at 0x50c8d0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5fcacb
mov eax, dword fs:[0]
push eax
sub esp, 0x888
mov eax, dword [0x6baac0]
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 - 0x878], ecx
mov edi, dword [ebp + 0x14]
mov ecx, edi
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0x888], edi
mov dword [ebp - 0x87c], esi
call fcn.004efd30
cmp byte [ebp + 0xc], 0
je 0x50c92a
mov ebx, 1
jmp 0x50c937
mov ebx, dword [ebp + 8]
mov eax, 0x1499700
test ebx, ebx
cmove ebx, eax
mov eax, dword [edi + 4]
mov dword [ebp - 0x890], ebx
test eax, eax
je 0x50c965
cmp dword [eax + 0x88], 0
jne 0x50c965
mov ecx, edi
call fcn.004efdd0
test al, al
je 0x50c965
mov eax, dword [edi + 4]
mov dword [eax + 0x88], 0x42
mov edx, dword [ebp - 0x878]
cmp dword [edx + 0x294], 0xffffffff
jne 0x50c989
mov eax, dword [esi]
mov ecx, esi
push str.invalid_socket__not_ready_for_writing.
call dword [eax + 0x14]
mov byte [edi + 0x12], 1
jmp 0x50cf74
mov eax, dword [edi + 4]
mov dword [ebp - 0x88c], 0x32
test eax, eax
je 0x50c9b0
mov eax, dword [eax + 0x88]
mov ecx, 0x32
cmp eax, ecx
cmovb eax, ecx
mov dword [ebp - 0x88c], eax
xor ecx, ecx
mov dword [ebp - 0x884], ecx
test ebx, ebx
je 0x50cc95
xor eax, eax
xor edx, edx
xor edi, edi
mov esi, 1
cmp byte [ebp + 0xc], al
jne 0x50ca0d
mov eax, dword [ebp - 0x88c]
mov edi, ebx
sub edi, ecx
cmp ebx, edi
cmovbe edi, eax
test eax, eax
je 0x50c9e8
cmp edi, eax
cmova edi, eax
cmp edi, ebx
jbe 0x50c9f3
test ebx, ebx
mov edi, ebx
cmove edi, esi
mov eax, 0x10624dd3
mov ecx, edi
mul 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.00420630
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 0x50ca70
push 0
call fcn.0040c4e0
add esp, 4
cmp dword [ebp - 0x1c], 0x3004bc8d
je 0x50ca83
push 0
call fcn.0040c4e0
add esp, 4
mov eax, dword [ebp - 0x878]
mov edx, dword [eax + 0x294]
test edx, edx
js 0x50cefc
mov ecx, dword [ebp - 0x860]
xor eax, eax
test ecx, ecx
je 0x50cab1
cmp dword [ebp + eax*4 - 0x85c], edx
je 0x50cab1
inc eax
cmp eax, ecx
jb 0x50caa3
cmp eax, ecx
jne 0x50caca
cmp ecx, 0x200
jae 0x50caca
mov dword [ebp + eax*4 - 0x85c], edx
inc dword [ebp - 0x860]
xorps xmm0, xmm0
lea ecx, [ebp - 0x874]
movq qword [ebp - 0x874], xmm0
call fcn.00420650
xor ecx, ecx
mov byte [ebp - 4], 1
mov dword [ebp - 0x880], ecx
cmp byte [ebp + 0x10], cl
je 0x50cbda
push 0x854
call sub.mfc140.dll_Ordinal_1507
mov esi, eax
add esp, 4
mov dword [ebp - 0x894], esi
mov byte [ebp - 4], 2
test esi, esi
je 0x50cb32
mov ecx, esi
call fcn.00420630
mov dword [esi], vtable.ckFdSet.0
mov dword [esi + 8], 0x3004bc8d
mov dword [esi + 0x850], 0x3004bc8d
jmp 0x50cb34
xor esi, esi
lea eax, [esi + 0xc]
mov byte [ebp - 4], 1
mov dword [eax], 0
push 0x40
mov dword [ebp - 0x880], eax
lea eax, [esi + 0x810]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp dword [esi + 8], 0x3004bc8d
je 0x50cb6d
push 0
call fcn.0040c4e0
add esp, 4
cmp dword [esi + 0x850], 0x3004bc8d
je 0x50cb83
push 0
call fcn.0040c4e0
add esp, 4
mov eax, dword [ebp - 0x878]
mov dword [ebp - 0x870], esi
mov ebx, dword [eax + 0x294]
test ebx, ebx
js 0x50ceed
mov ecx, dword [ebp - 0x880]
xor eax, eax
mov edx, dword [ecx]
test edx, edx
je 0x50cbc2
lea ecx, [esi + 0x10]
nop
cmp dword [ecx], ebx
je 0x50cbbc
inc eax
add ecx, 4
cmp eax, edx
jb 0x50cbb0
mov ecx, dword [ebp - 0x880]
cmp eax, edx
jne 0x50cbd4
cmp edx, 0x200
jae 0x50cbd4
mov dword [esi + eax*4 + 0x10], ebx
inc dword [ecx]
mov ebx, dword [ebp - 0x890]
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 esi, eax
cmp esi, 0xffffffff
je 0x50ce7f
test esi, esi
js 0x50ce7f
jg 0x50cd26
cmp byte [ebp + 0xc], 0
jne 0x50cd0a
mov eax, dword [ebp - 0x884]
add eax, edi
mov dword [ebp - 0x884], eax
test ebx, ebx
je 0x50cc2d
cmp eax, ebx
jae 0x50ccbd
mov esi, dword [ebp - 0x87c]
mov edi, dword [ebp - 0x888]
mov ecx, edi
push esi
call fcn.004efe90
test al, al
jne 0x50cce8
lea ecx, [ebp - 0x874]
call fcn.004206f0
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.004206d0
mov ecx, dword [ebp - 0x884]
cmp ecx, ebx
jb 0x50c9c0
mov edx, dword [ebp - 0x878]
cmp byte [ebp + 0x10], 0
mov ecx, esi
je 0x50cf28
mov eax, dword [esi]
push str.timeout_waiting_for_connect_to_complete_
call dword [eax + 0x14]
push ebx
push str.timeoutMs
mov ecx, esi
call fcn.00431470
jmp 0x50cf70
lea ecx, [ebp - 0x874]
call fcn.004206f0
lea ecx, [ebp - 0x86c]
mov dword [ebp - 4], 0xffffffff
call fcn.00506660
mov esi, dword [ebp - 0x87c]
mov edi, dword [ebp - 0x888]
jmp 0x50cc8f
mov byte [edi + 0x11], 1
mov ecx, esi
mov eax, dword [esi]
push str.socket_write_aborted_by_application..
call dword [eax + 0x14]
lea ecx, [ebp - 0x874]
xor bl, bl
call fcn.004206f0
jmp 0x50cefe
mov eax, dword [ebp - 0x888]
lea ecx, [ebp - 0x874]
xor bl, bl
mov byte [eax + 0x10], 1
call fcn.004206f0
jmp 0x50cefe
mov edi, dword [ebp - 0x878]
lea eax, [ebp - 0x860]
push eax
push dword [edi + 0x294]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x50ceed
mov eax, dword [ebp - 0x880]
test eax, eax
je 0x50cdf9
push eax
push dword [edi + 0x294]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x50cdf9
mov edi, dword [ebp - 0x87c]
mov ecx, edi
push str.Connection_attempt_failed.
mov eax, dword [edi]
call dword [eax + 0x18]
push ebx
push str.maxWaitTimeMs
mov ecx, edi
call fcn.00431470
mov esi, dword [ebp - 0x884]
cmp ebx, esi
jbe 0x50cdda
lea eax, [esi - 0x4e20]
cmp eax, 0x7d0
ja 0x50cdda
mov eax, dword [edi]
mov ecx, edi
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 [edi]
mov ecx, edi
push str.The_default_settings_result_in_an_overall_21_second_timeout.
call dword [eax + 0x18]
mov eax, dword [edi]
mov ecx, edi
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 [edi]
mov ecx, edi
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 [edi]
mov ecx, edi
push str._2__A_firewall_is_blocking_your_connection_attempt_from_reaching_the_server.
call dword [eax + 0x18]
push esi
push str.totalMsWaitedSoFar
mov ecx, edi
call fcn.00431470
lea ecx, [ebp - 0x874]
xor bl, bl
call fcn.004206f0
jmp 0x50cefe
mov edi, dword [ebp - 0x87c]
mov ecx, edi
push 0
push str.nfds
call fcn.00431470
push esi
push str.nStatus
mov ecx, edi
call fcn.00431470
mov eax, dword [ebp - 0x878]
mov ecx, edi
push dword [eax + 0x294]
push str.socketNum
call fcn.00431470
push ebx
push str.timeoutMs
mov ecx, edi
call fcn.00431470
movzx eax, byte [ebp + 0xc]
mov ecx, edi
push eax
push str.bPoll
call fcn.00431470
movzx eax, byte [ebp + 0x10]
mov ecx, edi
push eax
push str.bForConnect
call fcn.00431470
mov eax, dword [edi]
mov ecx, edi
push str.Socket_select_for_writeability_returned_unexpected_result_
call dword [eax + 0x18]
lea ecx, [ebp - 0x874]
mov bl, 1
call fcn.004206f0
jmp 0x50cefe
mov edi, dword [ebp - 0x87c]
mov ecx, edi
call fcn.00431cd0
push 0
push str.nfds
mov ecx, edi
call fcn.00431470
mov eax, dword [ebp - 0x878]
mov ecx, edi
push dword [eax + 0x294]
push str.socketNum
call fcn.00431470
push ebx
push str.timeoutMs
mov ecx, edi
call fcn.00431470
movzx eax, byte [ebp + 0xc]
mov ecx, edi
push eax
push str.bPoll
call fcn.00431470
movzx eax, byte [ebp + 0x10]
mov ecx, edi
push eax
push str.bForConnect
call fcn.00431470
mov eax, dword [edi]
mov ecx, edi
push str.Socket_select_for_writeable_returned_an_error_
call dword [eax + 0x14]
lea ecx, [ebp - 0x874]
mov bl, 1
call fcn.004206f0
jmp 0x50cefe
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.004206d0
mov al, bl
jmp 0x50cf76
push dword [edx + 0x294]
push str.socketNum
call fcn.00431470
push ebx
push str.timeoutMs
mov ecx, esi
call fcn.00431470
movzx eax, byte [ebp + 0xc]
mov ecx, esi
push eax
push str.bPoll
call fcn.00431470
push 0
push str.bForConnect
mov ecx, esi
call fcn.00431470
mov eax, dword [esi]
mov ecx, esi
push str.socket_is_not_ready_for_writing_
call dword [eax + 0x14]
mov byte [edi + 0x10], 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.005ebe04
mov esp, ebp
pop ebp
ret 0x14