Function at 0x5a66b0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
mov eax, dword [0x703eb0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x1c]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x120], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x114], ecx
mov ecx, dword [ebp + 0x20]
mov byte [eax], 0
mov byte [esi], 0
push edi
mov dword [ebp - 0x118], esi
mov dword [ebp - 0x11c], eax
mov dword [ebp - 0x124], edx
mov dword [ebp - 0x10c], ecx
mov byte [edx], 0
test ebx, ebx
je 0x5a6713
cmp ebx, 0x32
jae 0x5a6713
mov ebx, 0x32
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x5a671f
mov edi, 0x1499700
mov edx, dword [ebp - 0x114]
cmp dword [edx + 0xa4], 0xffffffff
jne 0x5a6742
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
push str.Invalid_socket.
call edx
mov byte [esi], 1
jmp 0x5a68f3
xor eax, eax
mov dword [ebp - 0x110], eax
mov dl, 1
lea esp, [esp]
test edi, edi
je 0x5a675c
cmp eax, edi
jae 0x5a68ae
mov esi, ebx
test ebx, ebx
jne 0x5a6764
mov esi, edi
test edi, edi
je 0x5a677a
cmp edi, eax
jbe 0x5a677a
mov esi, edi
sub esi, eax
test ebx, ebx
je 0x5a677a
cmp esi, ebx
jbe 0x5a677a
mov esi, ebx
test dl, dl
je 0x5a678a
shr esi, 1
cmp esi, 0x32
jae 0x5a678a
mov esi, 0x32
mov eax, 0x10624dd3
mul esi
shr edx, 6
mov ecx, dword [ebp - 0x114]
mov dword [ebp - 0x12c], edx
imul edx, edx, 0x3e8
mov eax, esi
sub eax, edx
mov edx, dword [ecx + 0xa4]
imul eax, eax, 0x3e8
mov dword [ebp - 0x128], eax
lea eax, [ebp - 0x12c]
push eax
push 0
push 0
lea ecx, [ebp - 0x108]
push ecx
push 0
mov dword [ebp - 0x104], edx
mov dword [ebp - 0x108], 1
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x5a6843
test eax, eax
jne 0x5a6893
add dword [ebp - 0x110], esi
test edi, edi
je 0x5a6809
cmp dword [ebp - 0x110], edi
jae 0x5a68a8
mov esi, dword [ebp - 0x120]
test esi, esi
je 0x5a6830
test ebx, ebx
je 0x5a6830
push 0x73
push ebx
mov ecx, esi
call fcn.0056d6c0
mov ecx, esi
call fcn.0056d4d0
test al, al
jne 0x5a68d8
mov eax, dword [ebp - 0x110]
mov ecx, dword [ebp - 0x10c]
xor dl, dl
jmp 0x5a6750
mov edx, dword [ebp - 0x118]
mov ecx, dword [ebp - 0x10c]
mov byte [edx], 1
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
push str.Error_waiting_for_socket_to_become_ready_for_reading.
call edx
mov esi, dword [ebp - 0x114]
mov eax, dword [esi + 0xa4]
push 2
push eax
call dword [sym.imp.WS2_32.dll_shutdown]
mov ecx, dword [esi + 0xa4]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0xa4], 0xffffffff
mov byte [esi + 0xa0], 0
jmp 0x5a68f3
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00521602
mov esp, ebp
pop ebp
ret 0x1c
mov ecx, dword [ebp - 0x10c]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
push str.Timeout_waiting_to_read_socket_or_accept_connection
call eax
mov ecx, dword [ebp - 0x10c]
mov edx, dword [ecx]
mov eax, dword [edx + 0x2c]
push edi
push str.timeoutMs
call eax
mov ecx, dword [ebp - 0x124]
mov byte [ecx], 1
jmp 0x5a68f3
mov edx, dword [ebp - 0x11c]
mov ecx, dword [ebp - 0x10c]
mov byte [edx], 1
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
push str.socket_operation_aborted_by_application_callback
call edx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor al, al
pop ebx
call fcn.00521602
mov esp, ebp
pop ebp
ret 0x1c