Function at 0x4ca760
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
mov dword [ebp - 0x23c], ecx
mov eax, dword [ebp + 0x18]
mov byte [eax], 0
mov ecx, dword [ebp + 0x1c]
mov byte [ecx], 0
mov edx, dword [ebp + 0x14]
mov byte [edx], 0
mov eax, dword [ebp - 0x23c]
cmp dword [eax + 0xa4], 0xffffffff
jne 0x4ca7af
push 0x6370bc
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x10]
call eax
mov ecx, dword [ebp + 0x1c]
mov byte [ecx], 1
xor al, al
jmp 0x4caa55
cmp dword [ebp + 8], 0
jne 0x4ca7bc
mov dword [ebp + 8], 0x1499700
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 - 0x224], ecx
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x22c], edx
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x234], 0
jmp 0x4ca825
mov ecx, dword [ebp - 0x234]
add ecx, 1
mov dword [ebp - 0x234], ecx
mov edx, dword [ebp - 0x234]
cmp edx, dword [ebp - 0x220]
jae 0x4ca852
mov eax, dword [ebp - 0x234]
mov ecx, dword [ebp - 0x23c]
mov edx, dword [ebp + eax*4 - 0x21c]
cmp edx, dword [ecx + 0xa4]
jne 0x4ca850
jmp 0x4ca852
jmp 0x4ca816
mov eax, dword [ebp - 0x234]
cmp eax, dword [ebp - 0x220]
jne 0x4ca891
cmp dword [ebp - 0x220], 0x40
jae 0x4ca891
mov ecx, dword [ebp - 0x234]
mov edx, dword [ebp - 0x23c]
mov eax, dword [edx + 0xa4]
mov dword [ebp + ecx*4 - 0x21c], eax
mov ecx, dword [ebp - 0x220]
add ecx, 1
mov dword [ebp - 0x220], ecx
xor edx, edx
jne 0x4ca80a
mov dword [ebp - 0x230], 0
movzx eax, byte [ebp + 0xc]
test eax, eax
je 0x4ca954
mov dword [ebp - 0x118], 0
mov dword [ebp - 0x238], 0
jmp 0x4ca8d4
mov ecx, dword [ebp - 0x238]
add ecx, 1
mov dword [ebp - 0x238], ecx
mov edx, dword [ebp - 0x238]
cmp edx, dword [ebp - 0x118]
jae 0x4ca901
mov eax, dword [ebp - 0x238]
mov ecx, dword [ebp - 0x23c]
mov edx, dword [ebp + eax*4 - 0x114]
cmp edx, dword [ecx + 0xa4]
jne 0x4ca8ff
jmp 0x4ca901
jmp 0x4ca8c5
mov eax, dword [ebp - 0x238]
cmp eax, dword [ebp - 0x118]
jne 0x4ca940
cmp dword [ebp - 0x118], 0x40
jae 0x4ca940
mov ecx, dword [ebp - 0x238]
mov edx, dword [ebp - 0x23c]
mov eax, dword [edx + 0xa4]
mov dword [ebp + ecx*4 - 0x114], eax
mov ecx, dword [ebp - 0x118]
add ecx, 1
mov dword [ebp - 0x118], ecx
xor edx, edx
jne 0x4ca8b9
lea eax, [ebp - 0x118]
mov dword [ebp - 0x230], eax
mov dword [ebp - 8], 0
lea ecx, [ebp - 0x22c]
push ecx
mov edx, dword [ebp - 0x230]
push edx
lea eax, [ebp - 0x220]
push eax
push 0
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x4ca9a9
push 0x6370e4
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x10]
mov edx, dword [eax + 0x10]
call edx
mov eax, dword [ebp + 0x1c]
mov byte [eax], 1
xor al, al
jmp 0x4caa55
cmp dword [ebp - 4], 0
jle 0x4caa1f
lea ecx, [ebp - 0x220]
push ecx
mov edx, dword [ebp - 0x23c]
mov eax, dword [edx + 0xa4]
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4ca9d5
mov al, 1
jmp 0x4caa55
cmp dword [ebp - 0x230], 0
je 0x4caa07
mov ecx, dword [ebp - 0x230]
push ecx
mov edx, dword [ebp - 0x23c]
mov eax, dword [edx + 0xa4]
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4caa07
mov ecx, dword [ebp + 0x14]
mov byte [ecx], 1
xor al, al
jmp 0x4caa55
push str.Socket_select_after_connect_returned_0
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x10]
mov edx, dword [eax + 0x14]
call edx
xor al, al
jmp 0x4caa55
movzx eax, byte [ebp + 0xc]
test eax, eax
je 0x4caa3b
push str.timeout_waiting_for_connect_to_complete
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x10]
call eax
jmp 0x4caa4d
push str.socket_is_not_ready_for_writing
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x10]
call eax
mov ecx, dword [ebp + 0x18]
mov byte [ecx], 1
xor al, al
mov esp, ebp
pop ebp
ret 0x18