Function at 0x501490
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c1e70
mov eax, dword fs:[0]
push eax
sub esp, 0x88c
mov eax, dword [0x68cc00]
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 - 0x894], ebx
call fcn.0046d400
cmp byte [ebp + 0xc], 0
je 0x5014ea
mov esi, 1
jmp 0x5014f7
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 0x501525
cmp dword [eax + 0x88], 0
jne 0x501525
mov ecx, edi
call fcn.0046d4a0
test al, al
je 0x501525
mov eax, dword [edi + 4]
mov dword [eax + 0x88], 0x42
mov ecx, dword [ebp - 0x87c]
cmp dword [ecx + 0x294], 0xffffffff
jne 0x501549
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 0x501b46
mov eax, dword [edi + 4]
mov dword [ebp - 0x890], 0x32
test eax, eax
je 0x501570
mov eax, dword [eax + 0x88]
mov edx, 0x32
cmp eax, edx
cmovb eax, edx
mov dword [ebp - 0x890], eax
test esi, esi
je 0x5018bb
xor eax, eax
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x884], ecx
xor edi, edi
cmp byte [ebp + 0xc], al
jne 0x5015c2
mov eax, dword [ebp - 0x890]
mov edi, esi
sub edi, ecx
cmp esi, edi
cmovbe edi, eax
test eax, eax
je 0x5015a3
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.00429fb0
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 0x501625
push 0
call fcn.004014f0
add esp, 4
cmp dword [ebp - 0x1c], 0x3004bc8d
je 0x501638
push 0
call fcn.004014f0
add esp, 4
mov eax, dword [ebp - 0x87c]
mov edx, dword [eax + 0x294]
test edx, edx
js 0x501acc
mov ecx, dword [ebp - 0x860]
xor eax, eax
test ecx, ecx
je 0x50166e
nop dword [eax + eax]
cmp dword [ebp + eax*4 - 0x85c], edx
je 0x50166e
inc eax
cmp eax, ecx
jb 0x501660
cmp eax, ecx
jne 0x501687
cmp ecx, 0x200
jae 0x501687
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.00429fd0
xor eax, eax
mov byte [ebp - 4], 1
mov dword [ebp - 0x878], eax
cmp byte [ebp + 0x10], al
je 0x5017af
push 0x854
call fcn.005af5bb
mov esi, eax
add esp, 4
mov dword [ebp - 0x898], esi
mov byte [ebp - 4], 2
test esi, esi
je 0x5016ef
mov ecx, esi
call fcn.00429fb0
mov dword [esi], vtable.ckFdSet.0
mov dword [esi + 8], 0x3004bc8d
mov dword [esi + 0x850], 0x3004bc8d
jmp 0x5016f1
xor esi, esi
lea eax, [esi + 0xc]
mov byte [ebp - 4], 1
mov dword [eax], 0
push 0x40
mov dword [ebp - 0x878], eax
lea eax, [esi + 0x810]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp dword [esi + 8], 0x3004bc8d
je 0x50172a
push 0
call fcn.004014f0
add esp, 4
cmp dword [esi + 0x850], 0x3004bc8d
je 0x501740
push 0
call fcn.004014f0
add esp, 4
mov eax, dword [ebp - 0x87c]
mov dword [ebp - 0x870], esi
mov ecx, dword [eax + 0x294]
mov dword [ebp - 0x88c], ecx
test ecx, ecx
js 0x501abd
mov edx, dword [ebp - 0x878]
xor eax, eax
mov edx, dword [edx]
test edx, edx
je 0x50178f
mov ebx, dword [ebp - 0x88c]
lea ecx, [esi + 0x10]
cmp dword [ecx], ebx
je 0x501783
inc eax
add ecx, 4
cmp eax, edx
jb 0x501777
mov ebx, dword [ebp - 0x894]
mov ecx, dword [ebp - 0x88c]
cmp eax, edx
jne 0x5017a9
cmp edx, 0x200
jae 0x5017a9
mov dword [esi + eax*4 + 0x10], ecx
mov eax, dword [ebp - 0x878]
inc dword [eax]
jmp 0x5017af
mov eax, dword [ebp - 0x878]
lea ecx, [ebp - 0x18]
push ecx
push eax
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 0x501a4f
test esi, esi
js 0x501a4f
jg 0x5018ff
cmp byte [ebp + 0xc], 0
jne 0x5018e3
mov eax, dword [ebp - 0x884]
mov esi, dword [ebp - 0x880]
add eax, edi
mov dword [ebp - 0x884], eax
cmp eax, esi
jae 0x501877
mov edi, dword [ebp - 0x888]
mov ecx, edi
push ebx
call fcn.0046d560
test al, al
jne 0x501855
lea ecx, [ebp - 0x874]
call fcn.0042a070
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.0042a050
mov ecx, dword [ebp - 0x884]
jmp 0x50158b
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.0042a070
jmp 0x501ace
lea ecx, [ebp - 0x874]
call fcn.0042a070
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.0042a050
mov edi, dword [ebp - 0x888]
mov ecx, dword [ebp - 0x87c]
cmp byte [ebp + 0x10], 0
je 0x501af8
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.00448710
jmp 0x501b42
mov eax, dword [ebp - 0x888]
lea ecx, [ebp - 0x874]
xor bl, bl
mov byte [eax + 0x14], 1
call fcn.0042a070
jmp 0x501ace
mov edi, dword [ebp - 0x87c]
lea eax, [ebp - 0x860]
push eax
push dword [edi + 0x294]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x501abd
mov edx, dword [ebp - 0x878]
test edx, edx
je 0x5019d2
push edx
push dword [edi + 0x294]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5019d2
mov eax, dword [ebx]
mov ecx, ebx
push str.Connection_attempt_failed.
call dword [eax + 0x18]
mov esi, dword [ebp - 0x880]
mov ecx, ebx
push esi
push str.maxWaitTimeMs
call fcn.00448710
mov edi, dword [ebp - 0x884]
cmp esi, edi
jbe 0x5019b3
lea eax, [edi - 0x4e20]
cmp eax, 0x7d0
ja 0x5019b3
mov eax, dword [ebx]
mov ecx, ebx
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 [ebx]
mov ecx, ebx
push str.The_default_settings_result_in_an_overall_21_second_timeout.
call dword [eax + 0x18]
mov eax, dword [ebx]
mov ecx, ebx
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 [ebx]
mov ecx, ebx
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 [ebx]
mov ecx, ebx
push str._2__A_firewall_is_blocking_your_connection_attempt_from_reaching_the_server.
call dword [eax + 0x18]
push edi
push str.totalMsWaitedSoFar
mov ecx, ebx
call fcn.00448710
lea ecx, [ebp - 0x874]
xor bl, bl
call fcn.0042a070
jmp 0x501ace
push 0
push str.nfds
mov ecx, ebx
call fcn.00448710
push esi
push str.nStatus
mov ecx, ebx
call fcn.00448710
push dword [edi + 0x294]
mov ecx, ebx
push str.socketNum
call fcn.00448710
mov esi, dword [ebp - 0x880]
mov ecx, ebx
push esi
push str.timeoutMs
call fcn.00448710
movzx eax, byte [ebp + 0xc]
mov ecx, ebx
push eax
push str.bPoll
call fcn.00448710
movzx eax, byte [ebp + 0x10]
mov ecx, ebx
push eax
push str.bForConnect
call fcn.00448710
mov eax, dword [ebx]
mov ecx, ebx
push str.Socket_select_for_writeability_returned_unexpected_result_
call dword [eax + 0x18]
lea ecx, [ebp - 0x874]
mov bl, 1
call fcn.0042a070
jmp 0x501ace
mov ecx, ebx
call fcn.00448fd0
push 0
push str.nfds
mov ecx, ebx
call fcn.00448710
mov eax, dword [ebp - 0x87c]
mov ecx, ebx
push dword [eax + 0x294]
push str.socketNum
call fcn.00448710
mov esi, dword [ebp - 0x880]
mov ecx, ebx
push esi
push str.timeoutMs
call fcn.00448710
movzx eax, byte [ebp + 0xc]
mov ecx, ebx
push eax
push str.bPoll
call fcn.00448710
movzx eax, byte [ebp + 0x10]
mov ecx, ebx
push eax
push str.bForConnect
call fcn.00448710
mov eax, dword [ebx]
mov ecx, ebx
push str.Socket_select_for_writeable_returned_an_error_
call dword [eax + 0x14]
lea ecx, [ebp - 0x874]
mov bl, 1
call fcn.0042a070
jmp 0x501ace
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.0042a050
mov al, bl
jmp 0x501b48
push dword [ecx + 0x294]
mov ecx, ebx
push str.socketNum
call fcn.00448710
push esi
push str.timeoutMs
mov ecx, ebx
call fcn.00448710
movzx eax, byte [ebp + 0xc]
mov ecx, ebx
push eax
push str.bPoll
call fcn.00448710
push 0
push str.bForConnect
mov ecx, ebx
call fcn.00448710
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.005af5a8
mov esp, ebp
pop ebp
ret 0x14