Function at 0x542ea0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b1524
mov eax, dword fs:[0]
push eax
sub esp, 0x880
mov eax, dword [0x676664]
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 ebx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0x86c], ecx
mov ecx, ebx
mov dword [ebp - 0x874], ebx
call fcn.004aef00
cmp byte [ebp + 0xc], 0
je 0x542ef7
mov edi, 1
mov dword [ebp + 8], edi
jmp 0x542f07
cmp dword [ebp + 8], 0
jne 0x542f04
mov dword [ebp + 8], 0x1499700
mov edi, dword [ebp + 8]
mov eax, dword [ebx + 4]
test eax, eax
je 0x542f2f
cmp dword [eax + 0x88], 0
jne 0x542f2f
mov ecx, ebx
call fcn.004aef20
test al, al
je 0x542f2f
mov eax, dword [ebx + 4]
mov dword [eax + 0x88], 0x42
mov ecx, dword [ebp - 0x86c]
cmp dword [ecx + 0x294], 0xffffffff
jne 0x542f55
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.invalid_socket__not_ready_for_writing.
mov ecx, esi
call eax
mov byte [ebx + 0x16], 1
jmp 0x54356e
mov eax, dword [ebx + 4]
mov ecx, 0x32
mov dword [ebp - 0x870], ecx
test eax, eax
je 0x542f81
mov eax, dword [eax + 0x88]
mov dword [ebp - 0x870], eax
cmp eax, ecx
jae 0x542f7f
mov dword [ebp - 0x870], ecx
jmp 0x542f81
mov ecx, eax
mov dword [ebp - 0x880], 0
test edi, edi
je 0x543429
xor eax, eax
xor edx, edx
mov dword [ebp - 0x868], eax
cmp byte [ebp + 0xc], al
jne 0x54300a
mov eax, edi
sub eax, dword [ebp - 0x880]
mov dword [ebp - 0x868], ecx
cmp edi, eax
jbe 0x542fba
mov dword [ebp - 0x868], eax
test ecx, ecx
je 0x542fcc
cmp dword [ebp - 0x868], ecx
jbe 0x542fcc
mov dword [ebp - 0x868], ecx
cmp dword [ebp - 0x868], edi
jbe 0x542fe8
mov dword [ebp - 0x868], edi
test edi, edi
jne 0x542fe8
mov dword [ebp - 0x868], 1
mov ecx, dword [ebp - 0x868]
mov eax, 0x10624dd3
mul ecx
shr edx, 6
mov edi, edx
imul edi, edi, 0x3e8
mov eax, ecx
sub eax, edi
imul eax, eax, 0x3e8
lea ecx, [ebp - 0x864]
mov dword [ebp - 0x888], edx
mov dword [ebp - 0x884], eax
call fcn.004421a0
mov edi, 0x3004bc8d
mov dword [ebp - method.ckFdSet.virtual_0], vtable.ckFdSet.0
mov dword [ebp - 0x85c], edi
mov dword [ebp - 0x14], edi
xor ebx, ebx
push 0x40
lea ecx, [ebp - 0x54]
push ebx
push ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x858], ebx
call sub.MSVCR100.dll_memset
add esp, 0xc
cmp dword [ebp - 0x85c], edi
je 0x543064
push ebx
call fcn.00464950
add esp, 4
cmp dword [ebp - 0x14], edi
je 0x543072
push ebx
call fcn.00464950
add esp, 4
mov edx, dword [ebp - 0x86c]
mov edx, dword [edx + 0x294]
cmp edx, ebx
jl 0x5433d7
mov ecx, dword [ebp - 0x858]
xor eax, eax
cmp ecx, ebx
jbe 0x5430a0
cmp dword [ebp + eax*4 - 0x854], edx
je 0x5430a0
inc eax
cmp eax, ecx
jb 0x543092
cmp eax, ecx
jne 0x5430b9
cmp ecx, 0x200
jae 0x5430b9
mov dword [ebp + eax*4 - 0x854], edx
inc dword [ebp - 0x858]
lea ecx, [ebp - 0x87c]
call fcn.00442200
cmp byte [ebp + 0x10], 0
mov byte [ebp - 4], 1
je 0x5431a6
push 0x854
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
add esp, 4
mov dword [ebp - 0x88c], edi
mov byte [ebp - 4], 2
test edi, edi
je 0x54310e
mov ecx, edi
call fcn.004421a0
mov eax, 0x3004bc8d
mov dword [edi], vtable.ckFdSet.0
mov dword [edi + 8], eax
mov dword [edi + 0x850], eax
mov ebx, edi
jmp 0x543110
xor ebx, ebx
push 0x40
lea eax, [ebx + 0x810]
push 0
push eax
mov byte [ebp - 4], 1
mov dword [ebx + 0xc], 0
call sub.MSVCR100.dll_memset
add esp, 0xc
cmp dword [ebx + 8], 0x3004bc8d
je 0x543141
push 0
call fcn.00464950
add esp, 4
cmp dword [ebx + 0x850], 0x3004bc8d
je 0x543157
push 0
call fcn.00464950
add esp, 4
mov ecx, dword [ebp - 0x86c]
mov edx, dword [ecx + 0x294]
mov dword [ebp - 0x878], ebx
test edx, edx
js 0x5433c8
xor eax, eax
cmp dword [ebx + 0xc], eax
jbe 0x54318d
lea ecx, [ebx + 0x10]
jmp 0x543180
cmp dword [ecx], edx
je 0x54318d
inc eax
add ecx, 4
cmp eax, dword [ebx + 0xc]
jb 0x543180
mov ecx, dword [ebx + 0xc]
cmp eax, ecx
jne 0x5431a3
cmp ecx, 0x200
jae 0x5431a3
mov dword [ebx + eax*4 + 0x10], edx
inc dword [ebx + 0xc]
add ebx, 0xc
lea edx, [ebp - 0x888]
push edx
push ebx
lea eax, [ebp - 0x858]
push eax
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
mov edi, eax
cmp edi, 0xffffffff
je 0x543470
test edi, edi
js 0x543470
jg 0x543262
cmp byte [ebp + 0xc], 0
jne 0x5433f0
mov edi, dword [ebp - 0x880]
add edi, dword [ebp - 0x868]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x880], edi
test ebx, ebx
je 0x543203
cmp edi, ebx
jae 0x5433ff
mov ecx, dword [ebp - 0x874]
push esi
call fcn.004aef30
test al, al
jne 0x543453
lea ecx, [ebp - 0x87c]
mov byte [ebp - 4], al
call fcn.00442210
xor eax, eax
lea ecx, [ebp - 0x864]
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - method.ckFdSet.virtual_0], vtable.ckFdSet.0
mov dword [ebp - 0x85c], eax
mov dword [ebp - 0x14], eax
call fcn.004421b0
cmp edi, ebx
mov edi, dword [ebp + 8]
jae 0x543423
mov ecx, dword [ebp - 0x870]
jmp 0x542f93
mov edx, dword [ebp - 0x86c]
mov eax, dword [edx + 0x294]
lea ecx, [ebp - 0x858]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x5433c8
test ebx, ebx
je 0x543354
mov ecx, dword [ebp - 0x86c]
mov edx, dword [ecx + 0x294]
push ebx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x543354
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
push str.Connection_attempt_failed.
mov ecx, esi
call edx
mov edi, dword [ebp + 8]
push edi
push str.maxWaitTimeMs
mov ecx, esi
call fcn.0044e8c0
mov ebx, dword [ebp - 0x880]
cmp edi, ebx
jbe 0x543321
lea eax, [ebx - 0x4e20]
cmp eax, 0x7d0
ja 0x543321
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
push str.The_Windows_TCP_IP_stack_has_a_system_wide_retry_delay_and_retry_count_for_the_initial_connection.
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
push str.The_default_settings_result_in_an_overall_21_second_timeout.
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
push str.If_you_see_this_error_message_21_seconds_after_the_connection_attempt_is_initiated__it_usually_means_one_of_two_things:
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
push str._1__The_server_is_not_there__not_listening_for_connection_attempts_on_the_specified_IP_address_and_port_.
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
push str._2__A_firewall_is_blocking_your_connection_attempt_from_reaching_the_server.
mov ecx, esi
call eax
push ebx
push str.totalMsWaitedSoFar
mov ecx, esi
call fcn.0044e8c0
lea ecx, [ebp - 0x87c]
mov byte [ebp - 4], 0
call fcn.00442210
lea ecx, [ebp - 0x864]
mov dword [ebp - 4], 0xffffffff
call fcn.00541b50
jmp 0x54356e
push 0
push str.nfds
mov ecx, esi
call fcn.0044e8c0
push edi
push str.nStatus
mov ecx, esi
call fcn.0044e8c0
mov ecx, dword [ebp - 0x86c]
mov edx, dword [ecx + 0x294]
push edx
push str.socketNum
mov ecx, esi
call fcn.0044e8c0
mov eax, dword [ebp + 8]
push eax
push str.timeoutMs
mov ecx, esi
call fcn.0044e8c0
movzx ecx, byte [ebp + 0xc]
push ecx
push str.bPoll
mov ecx, esi
call fcn.0044e8c0
movzx edx, byte [ebp + 0x10]
push edx
push str.bForConnect
mov ecx, esi
call fcn.0044e8c0
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
push str.Socket_select_for_writeability_returned_unexpected_result_
mov ecx, esi
call edx
lea ecx, [ebp - 0x87c]
mov byte [ebp - 4], 0
call fcn.00442210
lea ecx, [ebp - 0x864]
mov dword [ebp - 4], 0xffffffff
call fcn.00541b50
mov al, 1
jmp 0x543570
mov eax, dword [ebp - 0x874]
mov byte [eax + 0x14], 1
jmp 0x54332e
lea ecx, [ebp - 0x87c]
mov byte [ebp - 4], 0
call fcn.00442210
lea ecx, [ebp - 0x864]
mov dword [ebp - 4], 0xffffffff
call fcn.00541b50
mov edi, dword [ebp + 8]
mov ebx, dword [ebp - 0x874]
cmp byte [ebp + 0x10], 0
je 0x543517
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.timeout_waiting_for_connect_to_complete_
mov ecx, esi
call edx
push edi
push str.timeoutMs
mov ecx, esi
call fcn.0044e8c0
jmp 0x54356a
mov ecx, dword [ebp - 0x874]
mov byte [ecx + 0x15], 1
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.socket_write_aborted_by_application..
mov ecx, esi
call eax
jmp 0x54332e
mov ecx, esi
call fcn.0044ea80
xor edi, edi
push edi
push str.nfds
mov ecx, esi
call fcn.0044e8c0
mov ecx, dword [ebp - 0x86c]
mov edx, dword [ecx + 0x294]
push edx
push str.socketNum
mov ecx, esi
call fcn.0044e8c0
mov eax, dword [ebp + 8]
push eax
push str.timeoutMs
mov ecx, esi
call fcn.0044e8c0
movzx ecx, byte [ebp + 0xc]
push ecx
push str.bPoll
mov ecx, esi
call fcn.0044e8c0
movzx edx, byte [ebp + 0x10]
push edx
push str.bForConnect
mov ecx, esi
call fcn.0044e8c0
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Socket_select_for_writeable_returned_an_error_
mov ecx, esi
call edx
lea ecx, [ebp - 0x87c]
mov byte [ebp - 4], 0
call fcn.00442210
lea ecx, [ebp - 0x864]
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - method.ckFdSet.virtual_0], vtable.ckFdSet.0
mov dword [ebp - 0x85c], edi
mov dword [ebp - 0x14], edi
call fcn.004421b0
mov al, 1
jmp 0x543570
mov eax, dword [ebp - 0x86c]
mov ecx, dword [eax + 0x294]
push ecx
push str.socketNum
mov ecx, esi
call fcn.0044e8c0
push edi
push str.timeoutMs
mov ecx, esi
call fcn.0044e8c0
movzx edx, byte [ebp + 0xc]
push edx
push str.bPoll
mov ecx, esi
call fcn.0044e8c0
push 0
push str.bForConnect
mov ecx, esi
call fcn.0044e8c0
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.socket_is_not_ready_for_writing_
mov ecx, esi
call edx
mov byte [ebx + 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.0059af98
mov esp, ebp
pop ebp
ret 0x14