Function at 0x5025a0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c5ed0
mov eax, dword fs:[0]
push eax
sub esp, 0x88c
mov eax, dword [0x692c00]
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.0046ecc0
cmp byte [ebp + 0xc], 0
je 0x5025fa
mov esi, 1
jmp 0x502607
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 0x502635
cmp dword [eax + 0x88], 0
jne 0x502635
mov ecx, edi
call fcn.0046ed60
test al, al
je 0x502635
mov eax, dword [edi + 4]
mov dword [eax + 0x88], 0x42
mov ecx, dword [ebp - 0x87c]
cmp dword [ecx + 0x294], 0xffffffff
jne 0x502659
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 0x502c56
mov eax, dword [edi + 4]
mov dword [ebp - 0x890], 0x32
test eax, eax
je 0x502680
mov eax, dword [eax + 0x88]
mov edx, 0x32
cmp eax, edx
cmovb eax, edx
mov dword [ebp - 0x890], eax
test esi, esi
je 0x5029cb
xor eax, eax
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x884], ecx
xor edi, edi
cmp byte [ebp + 0xc], al
jne 0x5026d2
mov eax, dword [ebp - 0x890]
mov edi, esi
sub edi, ecx
cmp esi, edi
cmovbe edi, eax
test eax, eax
je 0x5026b3
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.0042a200
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 0x502735
push 0
call fcn.00401520
add esp, 4
cmp dword [ebp - 0x1c], 0x3004bc8d
je 0x502748
push 0
call fcn.00401520
add esp, 4
mov eax, dword [ebp - 0x87c]
mov edx, dword [eax + 0x294]
test edx, edx
js 0x502bdc
mov ecx, dword [ebp - 0x860]
xor eax, eax
test ecx, ecx
je 0x50277e
nop dword [eax + eax]
cmp dword [ebp + eax*4 - 0x85c], edx
je 0x50277e
inc eax
cmp eax, ecx
jb 0x502770
cmp eax, ecx
jne 0x502797
cmp ecx, 0x200
jae 0x502797
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.0042a220
xor eax, eax
mov byte [ebp - 4], 1
mov dword [ebp - 0x878], eax
cmp byte [ebp + 0x10], al
je 0x5028bf
push 0x854
call fcn.005b34db
mov esi, eax
add esp, 4
mov dword [ebp - 0x898], esi
mov byte [ebp - 4], 2
test esi, esi
je 0x5027ff
mov ecx, esi
call fcn.0042a200
mov dword [esi], vtable.ckFdSet.0
mov dword [esi + 8], 0x3004bc8d
mov dword [esi + 0x850], 0x3004bc8d
jmp 0x502801
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 0x50283a
push 0
call fcn.00401520
add esp, 4
cmp dword [esi + 0x850], 0x3004bc8d
je 0x502850
push 0
call fcn.00401520
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 0x502bcd
mov edx, dword [ebp - 0x878]
xor eax, eax
mov edx, dword [edx]
test edx, edx
je 0x50289f
mov ebx, dword [ebp - 0x88c]
lea ecx, [esi + 0x10]
cmp dword [ecx], ebx
je 0x502893
inc eax
add ecx, 4
cmp eax, edx
jb 0x502887
mov ebx, dword [ebp - 0x894]
mov ecx, dword [ebp - 0x88c]
cmp eax, edx
jne 0x5028b9
cmp edx, 0x200
jae 0x5028b9
mov dword [esi + eax*4 + 0x10], ecx
mov eax, dword [ebp - 0x878]
inc dword [eax]
jmp 0x5028bf
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 0x502b5f
test esi, esi
js 0x502b5f
jg 0x502a0f
cmp byte [ebp + 0xc], 0
jne 0x5029f3
mov eax, dword [ebp - 0x884]
mov esi, dword [ebp - 0x880]
add eax, edi
mov dword [ebp - 0x884], eax
cmp eax, esi
jae 0x502987
mov edi, dword [ebp - 0x888]
mov ecx, edi
push ebx
call fcn.0046ee20
test al, al
jne 0x502965
lea ecx, [ebp - 0x874]
call fcn.0042a2c0
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.0042a2a0
mov ecx, dword [ebp - 0x884]
jmp 0x50269b
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.0042a2c0
jmp 0x502bde
lea ecx, [ebp - 0x874]
call fcn.0042a2c0
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.0042a2a0
mov edi, dword [ebp - 0x888]
mov ecx, dword [ebp - 0x87c]
cmp byte [ebp + 0x10], 0
je 0x502c08
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.00448a10
jmp 0x502c52
mov eax, dword [ebp - 0x888]
lea ecx, [ebp - 0x874]
xor bl, bl
mov byte [eax + 0x14], 1
call fcn.0042a2c0
jmp 0x502bde
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 0x502bcd
mov edx, dword [ebp - 0x878]
test edx, edx
je 0x502ae2
push edx
push dword [edi + 0x294]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x502ae2
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.00448a10
mov edi, dword [ebp - 0x884]
cmp esi, edi
jbe 0x502ac3
lea eax, [edi - 0x4e20]
cmp eax, 0x7d0
ja 0x502ac3
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.00448a10
lea ecx, [ebp - 0x874]
xor bl, bl
call fcn.0042a2c0
jmp 0x502bde
push 0
push str.nfds
mov ecx, ebx
call fcn.00448a10
push esi
push str.nStatus
mov ecx, ebx
call fcn.00448a10
push dword [edi + 0x294]
mov ecx, ebx
push str.socketNum
call fcn.00448a10
mov esi, dword [ebp - 0x880]
mov ecx, ebx
push esi
push str.timeoutMs
call fcn.00448a10
movzx eax, byte [ebp + 0xc]
mov ecx, ebx
push eax
push str.bPoll
call fcn.00448a10
movzx eax, byte [ebp + 0x10]
mov ecx, ebx
push eax
push str.bForConnect
call fcn.00448a10
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.0042a2c0
jmp 0x502bde
mov ecx, ebx
call fcn.004492c0
push 0
push str.nfds
mov ecx, ebx
call fcn.00448a10
mov eax, dword [ebp - 0x87c]
mov ecx, ebx
push dword [eax + 0x294]
push str.socketNum
call fcn.00448a10
mov esi, dword [ebp - 0x880]
mov ecx, ebx
push esi
push str.timeoutMs
call fcn.00448a10
movzx eax, byte [ebp + 0xc]
mov ecx, ebx
push eax
push str.bPoll
call fcn.00448a10
movzx eax, byte [ebp + 0x10]
mov ecx, ebx
push eax
push str.bForConnect
call fcn.00448a10
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.0042a2c0
jmp 0x502bde
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.0042a2a0
mov al, bl
jmp 0x502c58
push dword [ecx + 0x294]
mov ecx, ebx
push str.socketNum
call fcn.00448a10
push esi
push str.timeoutMs
mov ecx, ebx
call fcn.00448a10
movzx eax, byte [ebp + 0xc]
mov ecx, ebx
push eax
push str.bPoll
call fcn.00448a10
push 0
push str.bForConnect
mov ecx, ebx
call fcn.00448a10
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.005b34c8
mov esp, ebp
pop ebp
ret 0x14