Function at 0x517740
Capabilities:
Get socket status

Disassembly:
sub esp, 0x354
mov eax, dword [0x5cab48]
xor eax, esp
mov dword [esp + 0x350], eax
push ebx
push ebp
mov ebp, dword [esp + 0x370]
xor eax, eax
push esi
xorps xmm0, xmm0
push edi
movlpd qword [esp + 0x24], xmm0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x10], eax
test ebp, ebp
jl 0x517794
jg 0x51778b
mov edi, dword [esp + 0x374]
cmp edi, 0x7fffffff
jb 0x51779b
mov edi, accept
xor ebp, ebp
jmp 0x51779b
mov edi, dword [esp + 0x374]
mov ecx, dword [esp + 0x368]
mov ebx, dword [esp + 0x36c]
cmp ecx, 0xffffffff
jne 0x5177e3
cmp ebx, 0xffffffff
jne 0x5177e3
cmp dword [esp + 0x370], ebx
jne 0x5177e3
test edi, edi
je 0x5177dc
jns 0x5177d5
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x517b2f
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x517b2f
test ebp, ebp
jl 0x517816
jg 0x5177ed
test edi, edi
je 0x517816
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x14], edi
call fcn.0051f080
movq xmm1, qword [eax + 8]
movq xmm0, qword [eax]
mov ecx, dword [esp + 0x36c]
add esp, 4
movq qword [esp + 0x34], xmm1
jmp 0x517828
movq xmm0, qword [esp + 0x2c]
movq qword [esp + 0x34], xmm0
movsd xmm0, qword [esp + 0x24]
xor eax, eax
xor esi, esi
or edx, 0xffffffff
movsd qword [esp + 0x24], xmm0
mov dword [esp + 0x25c], eax
mov dword [esp + 0x54], esi
cmp ecx, 0xffffffff
je 0x517864
mov esi, 1
mov eax, esi
mov dword [esp + 0x58], ecx
mov dword [esp + 0x54], esi
mov dword [esp + 0x260], ecx
mov dword [esp + 0x25c], eax
mov edx, ecx
cmp ebx, 0xffffffff
je 0x5178c9
xor ecx, ecx
test esi, esi
je 0x51787b
nop
cmp dword [esp + ecx*4 + 0x58], ebx
je 0x51787b
inc ecx
cmp ecx, esi
jb 0x517870
cmp ecx, esi
jne 0x517891
cmp esi, 0x40
jae 0x517891
mov dword [esp + ecx*4 + 0x58], ebx
mov esi, dword [esp + 0x54]
inc esi
mov dword [esp + 0x54], esi
xor ecx, ecx
test eax, eax
je 0x5178a5
cmp dword [esp + ecx*4 + 0x260], ebx
je 0x5178a5
inc ecx
cmp ecx, eax
jb 0x517897
cmp ecx, eax
jne 0x5178c4
cmp eax, 0x40
jae 0x5178c4
mov dword [esp + ecx*4 + 0x260], ebx
mov eax, dword [esp + 0x25c]
inc eax
mov dword [esp + 0x25c], eax
cmp ebx, edx
cmova edx, ebx
mov ecx, dword [esp + 0x370]
mov dword [esp + 0x158], 0
cmp ecx, 0xffffffff
je 0x517942
mov dword [esp + 0x15c], ecx
xor ecx, ecx
mov dword [esp + 0x158], 1
test eax, eax
je 0x517915
mov ebx, dword [esp + 0x370]
nop
cmp dword [esp + ecx*4 + 0x260], ebx
je 0x51790e
inc ecx
cmp ecx, eax
jb 0x517900
mov ebx, dword [esp + 0x36c]
cmp ecx, eax
jne 0x517933
cmp eax, 0x40
jae 0x517933
mov eax, dword [esp + 0x370]
mov dword [esp + ecx*4 + 0x260], eax
inc dword [esp + 0x25c]
cmp dword [esp + 0x370], edx
cmova edx, dword [esp + 0x370]
test ebp, ebp
jg 0x517956
jl 0x51794c
test edi, edi
jae 0x517956
mov dword [esp + 0x14], 0
jmp 0x51795e
lea eax, [esp + 0x18]
mov dword [esp + 0x14], eax
lea eax, [edx + 1]
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x10]
lea esp, [esp]
test ebp, ebp
jl 0x5179a7
jg 0x51797a
test edi, edi
je 0x5179a7
mov eax, 0x10624dd3
imul ecx
mov eax, dword [esp + 0x10]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov dword [esp + 0x18], ecx
imul ecx, ecx, 0x3e8
sub eax, ecx
imul eax, eax, 0x3e8
mov dword [esp + 0x1c], eax
jmp 0x5179b5
mov eax, edi
or eax, ebp
jne 0x5179b5
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
push dword [esp + 0x14]
xor ecx, ecx
cmp dword [esp + 0x15c], ecx
lea eax, [esp + 0x260]
push eax
lea eax, [esp + 0x160]
cmove eax, ecx
push eax
lea eax, [esp + 0x60]
test esi, esi
cmove eax, ecx
push eax
push dword [esp + 0x30]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x517a85
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x517a14
cmp dword [0x5cd56c], 0
jne 0x5177cd
cmp eax, 0x2714
jne 0x5177cd
test ebp, ebp
jl 0x517a20
jg 0x517a29
test edi, edi
jne 0x517a29
mov edi, edi
mov esi, dword [esp + 0x54]
jmp 0x517965
lea eax, [esp + 0x44]
push eax
call fcn.0051f080
movsd xmm0, qword [esp + 0x28]
sub esp, 0xc
mov ecx, esp
sub esp, 0x10
movq qword [ecx], xmm0
movq xmm0, qword [esp + 0x54]
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, edi
sub ecx, eax
add esp, 0x20
mov dword [esp + 0x10], ecx
test ecx, ecx
jle 0x5177dc
mov esi, dword [esp + 0x54]
jmp 0x517970
test eax, eax
js 0x5177cd
je 0x5177dc
mov edi, dword [esp + 0x368]
xor esi, esi
cmp edi, 0xffffffff
je 0x517acb
lea eax, [esp + 0x54]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
lea eax, [esp + 0x25c]
push eax
mov ecx, 1
push edi
cmovne esi, ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x517acb
or esi, 4
cmp ebx, 0xffffffff
je 0x517af7
lea eax, [esp + 0x54]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x517ae2
or esi, 8
lea eax, [esp + 0x25c]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x517af7
or esi, 4
mov ebx, dword [esp + 0x370]
cmp ebx, 0xffffffff
je 0x517b2d
lea eax, [esp + 0x158]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x517b18
or esi, 2
lea eax, [esp + 0x25c]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x517b2d
or esi, 4
mov eax, esi
mov ecx, dword [esp + 0x360]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0055423a
add esp, 0x354
ret