Function at 0x517360
Capabilities:
Get socket status

Disassembly:
sub esp, 0x358
mov eax, dword [0x5cab48]
xor eax, esp
mov dword [esp + 0x354], eax
mov edx, dword [esp + 0x35c]
push ebx
push ebp
mov ebp, dword [esp + 0x36c]
xor eax, eax
push esi
xorps xmm0, xmm0
push edi
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ebp
movlpd qword [esp + 0x28], xmm0
mov dword [esp + 0x30], 0
mov dword [esp + 0x14], eax
test edx, edx
je 0x517533
mov ecx, dword [esp + 0x370]
test ecx, ecx
je 0x517533
lea esp, [esp]
cmp dword [edx + eax*8], 0xffffffff
jne 0x5173d0
inc eax
cmp eax, ecx
jb 0x5173c0
jmp 0x517533
test ebp, ebp
jle 0x5173fa
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x18], ebp
call fcn.0051f080
movq xmm1, qword [eax + 8]
movq xmm0, qword [eax]
mov edx, dword [esp + 0x1c]
add esp, 4
movq qword [esp + 0x38], xmm1
jmp 0x51740c
movq xmm0, qword [esp + 0x30]
movq qword [esp + 0x38], xmm0
movsd xmm0, qword [esp + 0x28]
xor edi, edi
xor ebx, ebx
xor esi, esi
or eax, 0xffffffff
movsd qword [esp + 0x28], xmm0
mov dword [esp + 0x58], edi
mov dword [esp + 0x15c], ebx
mov dword [esp + 0x260], esi
mov dword [esp + 0x10], eax
xor ebp, ebp
xor ecx, ecx
mov word [edx + ebp*8 + 6], cx
mov ecx, dword [edx + ebp*8]
cmp ecx, 0xffffffff
je 0x517515
movzx edx, word [edx + ebp*8 + 4]
test edx, 0x710
je 0x517511
cmp ecx, eax
cmova eax, ecx
mov dword [esp + 0x10], eax
test edx, 0x300
je 0x517491
xor eax, eax
test edi, edi
je 0x51747b
mov edi, edi
cmp dword [esp + eax*4 + 0x5c], ecx
je 0x51747b
inc eax
cmp eax, edi
jb 0x517470
cmp eax, edi
jne 0x517491
cmp edi, 0x40
jae 0x517491
mov dword [esp + eax*4 + 0x5c], ecx
mov edi, dword [esp + 0x58]
inc edi
mov dword [esp + 0x58], edi
test dl, 0x10
je 0x5174cd
xor eax, eax
test ebx, ebx
je 0x5174ae
lea esp, [esp]
cmp dword [esp + eax*4 + 0x160], ecx
je 0x5174ae
inc eax
cmp eax, ebx
jb 0x5174a0
cmp eax, ebx
jne 0x5174cd
cmp ebx, 0x40
jae 0x5174cd
mov dword [esp + eax*4 + 0x160], ecx
mov ebx, dword [esp + 0x15c]
inc ebx
mov dword [esp + 0x15c], ebx
test edx, 0x600
je 0x51750d
xor eax, eax
test esi, esi
je 0x5174ee
jmp 0x5174e0
cmp dword [esp + eax*4 + 0x264], ecx
je 0x5174ee
inc eax
cmp eax, esi
jb 0x5174e0
cmp eax, esi
jne 0x51750d
cmp esi, 0x40
jae 0x51750d
mov dword [esp + eax*4 + 0x264], ecx
mov esi, dword [esp + 0x260]
inc esi
mov dword [esp + 0x260], esi
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
inc ebp
cmp ebp, dword [esp + 0x370]
jb 0x517433
mov ebp, dword [esp + 0x1c]
test edi, edi
jne 0x517554
test ebx, ebx
jne 0x517554
test esi, esi
jne 0x517554
test ebp, ebp
je 0x517720
jns 0x517719
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x517722
xor ecx, ecx
test ebp, ebp
lea eax, [esp + 0x20]
cmovs eax, ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x14]
test ebp, ebp
jle 0x5175a1
mov eax, 0x10624dd3
imul ecx
mov eax, dword [esp + 0x14]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov dword [esp + 0x20], ecx
imul ecx, ecx, 0x3e8
sub eax, ecx
imul eax, eax, 0x3e8
mov dword [esp + 0x24], eax
jmp 0x5175b3
jne 0x5175b3
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
push dword [esp + 0x1c]
xor ecx, ecx
test esi, esi
lea eax, [esp + 0x264]
cmove eax, ecx
push eax
test ebx, ebx
lea eax, [esp + 0x164]
cmove eax, ecx
push eax
lea eax, [esp + 0x64]
test edi, edi
cmove eax, ecx
push eax
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x517697
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x517612
cmp dword [0x5cd56c], 0
jne 0x51754c
cmp eax, 0x2714
jne 0x51754c
test ebp, ebp
jg 0x51762d
mov edi, dword [esp + 0x58]
mov ebx, dword [esp + 0x15c]
mov esi, dword [esp + 0x260]
jmp 0x51756c
lea eax, [esp + 0x48]
push eax
call fcn.0051f080
movsd xmm0, qword [esp + 0x2c]
sub esp, 0xc
mov ecx, esp
sub esp, 0x10
movq qword [ecx], xmm0
movq xmm0, qword [esp + 0x58]
movq qword [ecx + 8], xmm0
movq xmm0, qword [eax]
mov ecx, esp
movq qword [ecx], xmm0
movq xmm0, qword [eax + 8]
movq qword [ecx + 8], xmm0
call fcn.0051f120
mov ecx, ebp
sub ecx, eax
add esp, 0x20
mov dword [esp + 0x14], ecx
test ecx, ecx
jle 0x517720
mov edi, dword [esp + 0x58]
mov ebx, dword [esp + 0x15c]
mov esi, dword [esp + 0x260]
jmp 0x517570
test eax, eax
js 0x51754c
je 0x517720
mov esi, dword [esp + 0x18]
xor edi, edi
add esi, 6
mov ebp, 0x300
mov ebx, 0x400
xor eax, eax
mov word [esi], ax
mov eax, dword [esi - 6]
cmp eax, 0xffffffff
je 0x517709
lea ecx, [esp + 0x58]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5176d3
or word [esi], bp
lea eax, [esp + 0x15c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5176eb
or word [esi], 0x10
lea eax, [esp + 0x260]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x517702
or word [esi], bx
cmp word [esi], 0
je 0x517709
inc edi
add esi, 8
dec dword [esp + 0x370]
jne 0x5176b4
mov eax, edi
jmp 0x517722
push ebp
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
mov ecx, dword [esp + 0x364]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0055423a
add esp, 0x358
ret