Function at 0x51c560
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebp + 0x14]
call fcn.00540570
movzx eax, byte [ebp + 0xc]
test eax, eax
jne 0x51c586
cmp dword [ebp + 8], 0
jne 0x51c586
mov dword [ebp + 8], 0x1499700
mov byte [ebp - 1], 0
mov ecx, dword [ebp + 0x14]
cmp dword [ecx + 4], 0
je 0x51c5a6
mov edx, dword [ebp + 0x14]
mov eax, dword [edx + 4]
cmp dword [eax + 0x88], 0
je 0x51c5a6
mov byte [ebp - 1], 1
movzx ecx, byte [ebp - 1]
test ecx, ecx
je 0x51c5bc
cmp dword [ebp + 8], 0
jne 0x51c5e5
movzx edx, byte [ebp + 0xc]
test edx, edx
je 0x51c5e5
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
movzx edx, byte [ebp + 0x10]
push edx
movzx eax, byte [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x40]
call fcn.0051c1c0
mov byte [ebp - 0xd], al
mov al, byte [ebp - 0xd]
jmp 0x51c95a
mov edx, dword [ebp - 0x40]
cmp dword [edx + 0xa4], 0xffffffff
jne 0x51c611
push str.invalid_socket__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 + 0xe], 1
xor al, al
jmp 0x51c95a
mov dword [ebp - 8], 0
mov edx, dword [ebp + 0x14]
cmp dword [edx + 4], 0
je 0x51c630
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 0x88]
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0x32
jae 0x51c63d
mov dword [ebp - 8], 0x32
mov dword [ebp - 0xc], 0
cmp dword [ebp + 8], 0
je 0x51c656
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 8]
jae 0x51c923
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x24], ecx
cmp dword [ebp + 8], 0
je 0x51c687
mov edx, dword [ebp + 8]
cmp edx, dword [ebp - 0xc]
jbe 0x51c687
mov eax, dword [ebp + 8]
sub eax, dword [ebp - 0xc]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 8], 0
je 0x51c687
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp - 8]
jbe 0x51c687
mov edx, dword [ebp - 8]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
xor edx, edx
mov ecx, 0x3e8
div ecx
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x20]
imul edx, edx, 0x3e8
mov eax, dword [ebp - 0x24]
sub eax, edx
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
imul ecx, ecx, 0x3e8
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x40]
add ecx, 0x250
call fcn.00517ab0
mov dword [ebp - 0x38], 0
jmp 0x51c6df
mov ecx, dword [ebp - 0x38]
add ecx, 1
mov dword [ebp - 0x38], ecx
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x38]
cmp eax, dword [edx + 0x258]
jae 0x51c709
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x40]
mov ecx, dword [edx + ecx*4 + 0x25c]
cmp ecx, dword [eax + 0xa4]
jne 0x51c707
jmp 0x51c709
jmp 0x51c6d6
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x38]
cmp eax, dword [edx + 0x258]
jne 0x51c751
mov ecx, dword [ebp - 0x40]
cmp dword [ecx + 0x258], 0x200
jae 0x51c751
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x40]
mov ecx, dword [ecx + 0xa4]
mov dword [eax + edx*4 + 0x25c], ecx
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 0x258]
add eax, 1
mov ecx, dword [ebp - 0x40]
mov dword [ecx + 0x258], eax
xor edx, edx
jne 0x51c6cd
mov dword [ebp - 0x34], 0
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x51c811
mov ecx, dword [ebp - 0x40]
add ecx, 0x1a60
call fcn.00517ab0
mov dword [ebp - 0x3c], 0
jmp 0x51c78c
mov ecx, dword [ebp - 0x3c]
add ecx, 1
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x3c]
cmp eax, dword [edx + 0x1a68]
jae 0x51c7b6
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x40]
mov ecx, dword [edx + ecx*4 + 0x1a6c]
cmp ecx, dword [eax + 0xa4]
jne 0x51c7b4
jmp 0x51c7b6
jmp 0x51c783
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x3c]
cmp eax, dword [edx + 0x1a68]
jne 0x51c7fe
mov ecx, dword [ebp - 0x40]
cmp dword [ecx + 0x1a68], 0x200
jae 0x51c7fe
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x40]
mov ecx, dword [ecx + 0xa4]
mov dword [eax + edx*4 + 0x1a6c], ecx
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 0x1a68]
add eax, 1
mov ecx, dword [ebp - 0x40]
mov dword [ecx + 0x1a68], eax
xor edx, edx
jne 0x51c77a
mov eax, dword [ebp - 0x40]
add eax, 0x1a68
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x18], 0
lea ecx, [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x40]
add eax, 0x258
push eax
push 0
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
je 0x51c844
cmp dword [ebp - 0x14], 0
jge 0x51c86e
push str.Socket_select_for_writeable_returned_an_error
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x14]
call edx
mov ecx, dword [ebp - 0x40]
call fcn.0051d5b0
mov eax, dword [ebp + 0x14]
mov byte [eax + 0xe], 1
xor al, al
jmp 0x51c95a
cmp dword [ebp - 0x14], 0
jle 0x51c8d9
mov ecx, dword [ebp - 0x40]
add ecx, 0x258
push ecx
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 0xa4]
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x51c89a
mov al, 1
jmp 0x51c95a
cmp dword [ebp - 0x34], 0
je 0x51c8c0
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 0xa4]
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x51c8c0
xor al, al
jmp 0x51c95a
push str.Socket_select_after_connect_returned_0.
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x18]
call eax
xor al, al
jmp 0x51c95a
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x24]
mov dword [ebp - 0xc], ecx
cmp dword [ebp + 8], 0
je 0x51c8f2
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp + 8]
jb 0x51c8f2
jmp 0x51c923
mov ecx, dword [ebp + 0x14]
call fcn.005405c0
movzx eax, al
test eax, eax
je 0x51c91e
mov ecx, dword [ebp + 0x14]
mov byte [ecx + 0xd], 1
push str.socket_write_aborted_by_application..
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 0x51c95a
jmp 0x51c644
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x51c93f
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
jmp 0x51c951
push str.socket_is_not_ready_for_writing_
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 + 0xc], 1
xor al, al
mov esp, ebp
pop ebp
ret 0x14