Function at 0x51c1c0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp + 0x14]
call fcn.00540570
mov ecx, dword [ebp + 0x14]
call fcn.005405c0
movzx eax, al
test eax, eax
je 0x51c200
mov ecx, dword [ebp + 0x14]
mov byte [ecx + 0xd], 1
push str.Wait_for_writeable_socket_aborted_by_app
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x14]
call edx
xor al, al
jmp 0x51c558
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0xa4], 0xffffffff
jne 0x51c22c
push 0x69990c
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp + 0x14]
mov byte [ecx + 0xe], 1
xor al, al
jmp 0x51c558
movzx edx, byte [ebp + 0xc]
test edx, edx
jne 0x51c241
cmp dword [ebp + 8], 0
jne 0x51c241
mov dword [ebp + 8], 0x14
mov eax, dword [ebp + 8]
xor edx, edx
mov ecx, 0x3e8
div ecx
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
imul edx, edx, 0x3e8
mov eax, dword [ebp + 8]
sub eax, edx
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
imul ecx, ecx, 0x3e8
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x2c]
add ecx, 0x250
call fcn.00517ab0
mov dword [ebp - 0x24], 0
jmp 0x51c299
mov ecx, dword [ebp - 0x24]
add ecx, 1
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x24]
cmp eax, dword [edx + 0x258]
jae 0x51c2c3
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [edx + ecx*4 + 0x25c]
cmp ecx, dword [eax + 0xa4]
jne 0x51c2c1
jmp 0x51c2c3
jmp 0x51c290
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x24]
cmp eax, dword [edx + 0x258]
jne 0x51c30b
mov ecx, dword [ebp - 0x2c]
cmp dword [ecx + 0x258], 0x200
jae 0x51c30b
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x2c]
mov ecx, dword [ecx + 0xa4]
mov dword [eax + edx*4 + 0x25c], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x258]
add eax, 1
mov ecx, dword [ebp - 0x2c]
mov dword [ecx + 0x258], eax
xor edx, edx
jne 0x51c287
mov dword [ebp - 0x20], 0
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x51c3cb
mov ecx, dword [ebp - 0x2c]
add ecx, 0x1a60
call fcn.00517ab0
mov dword [ebp - 0x28], 0
jmp 0x51c346
mov ecx, dword [ebp - 0x28]
add ecx, 1
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
cmp eax, dword [edx + 0x1a68]
jae 0x51c370
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [edx + ecx*4 + 0x1a6c]
cmp ecx, dword [eax + 0xa4]
jne 0x51c36e
jmp 0x51c370
jmp 0x51c33d
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
cmp eax, dword [edx + 0x1a68]
jne 0x51c3b8
mov ecx, dword [ebp - 0x2c]
cmp dword [ecx + 0x1a68], 0x200
jae 0x51c3b8
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x2c]
mov ecx, dword [ecx + 0xa4]
mov dword [eax + edx*4 + 0x1a6c], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x1a68]
add eax, 1
mov ecx, dword [ebp - 0x2c]
mov dword [ecx + 0x1a68], eax
xor edx, edx
jne 0x51c334
mov eax, dword [ebp - 0x2c]
add eax, 0x1a68
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x2c]
cmp dword [ecx + 0x254], 0x3004bc8d
je 0x51c3e4
push 0
call fcn.004f3eb0
add esp, 4
mov edx, dword [ebp - 0x2c]
cmp dword [edx + 0x1a5c], 0x3004bc8d
je 0x51c3fd
push 0
call fcn.004f3eb0
add esp, 4
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x1a64], 0x3004bc8d
je 0x51c416
push 0
call fcn.004f3eb0
add esp, 4
mov ecx, dword [ebp - 0x2c]
cmp dword [ecx + 0x326c], 0x3004bc8d
je 0x51c42f
push 0
call fcn.004f3eb0
add esp, 4
mov dword [ebp - 8], 0
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x2c]
add ecx, 0x258
push ecx
push 0
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x51c463
cmp dword [ebp - 4], 0
jge 0x51c498
mov ecx, dword [ebp + 0x18]
call fcn.004f51f0
push str.Socket_select_for_writeability_returned_an_error
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp - 0x2c]
call fcn.0051d5b0
mov ecx, dword [ebp + 0x14]
mov byte [ecx + 0xe], 1
xor al, al
jmp 0x51c558
cmp dword [ebp - 4], 0
jle 0x51c4ff
mov edx, dword [ebp - 0x2c]
add edx, 0x258
push edx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0xa4]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x51c4c4
mov al, 1
jmp 0x51c558
cmp dword [ebp - 0x20], 0
je 0x51c4e7
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0xa4]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x51c4e7
xor al, al
jmp 0x51c558
push str.Socket_select_after_connect_returned_0
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x18]
call edx
xor al, al
jmp 0x51c558
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x51c53d
push str.timeout_waiting_for_connect_to_complete
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp - 0x10]
push ecx
push str.numSec
mov ecx, dword [ebp + 0x18]
call fcn.004f50b0
mov edx, dword [ebp - 0x14]
push edx
push str.numMicroSec
mov ecx, dword [ebp + 0x18]
call fcn.004f50b0
jmp 0x51c54f
push str.socket_is_not_ready_for_writing
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp + 0x14]
mov byte [ecx + 0xc], 1
xor al, al
mov esp, ebp
pop ebp
ret 0x14