Function at 0x517a90
Capabilities:
Get socket status

Disassembly:
sub esp, 0x368
mov eax, dword [0x592830]
xor eax, esp
mov dword [esp + 0x364], eax
push ebx
push ebp
mov ebp, dword [esp + 0x374]
push esi
push edi
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x360], ebp
mov dword [esp + 0x28], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x1c], 0
test ecx, ecx
je 0x517c69
xor eax, eax
test edx, edx
je 0x517c69
cmp dword [ecx + eax*8], 0xffffffff
jne 0x517b00
inc eax
cmp eax, edx
jb 0x517af0
jmp 0x517c69
test ebp, ebp
jle 0x517b34
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x20], ebp
call fcn.0051f970
mov ecx, dword [eax]
mov dword [esp + 0x2c], ecx
mov ecx, dword [eax + 4]
mov dword [esp + 0x24], ecx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x18]
add esp, 4
mov dword [esp + 0x44], eax
xor edi, edi
xor ebx, ebx
xor esi, esi
or ebp, 0xffffffff
xor eax, eax
mov dword [esp + 0x48], edi
mov dword [esp + 0x150], ebx
mov dword [esp + 0x258], esi
mov dword [esp + 0x10], eax
jmp 0x517b64
mov ecx, dword [esp + 0x14]
xor edx, edx
mov word [ecx + eax*8 + 6], dx
mov ecx, dword [ecx + eax*8]
mov edx, dword [esp + 0x18]
cmp ecx, 0xffffffff
je 0x517c45
mov edx, dword [esp + 0x14]
movzx edx, word [edx + eax*8 + 4]
test dl, 7
je 0x517c41
cmp ecx, ebp
jbe 0x517b93
mov ebp, ecx
test dl, 1
je 0x517bc1
xor eax, eax
test edi, edi
je 0x517bab
mov edi, edi
cmp dword [esp + eax*4 + 0x4c], ecx
je 0x517bab
inc eax
cmp eax, edi
jb 0x517ba0
cmp eax, edi
jne 0x517bc1
cmp edi, 0x40
jae 0x517bc1
mov dword [esp + eax*4 + 0x4c], ecx
mov edi, dword [esp + 0x48]
inc edi
mov dword [esp + 0x48], edi
test dl, 4
je 0x517bfd
xor eax, eax
test ebx, ebx
je 0x517bde
lea esp, [esp]
cmp dword [esp + eax*4 + 0x154], ecx
je 0x517bde
inc eax
cmp eax, ebx
jb 0x517bd0
cmp eax, ebx
jne 0x517bfd
cmp ebx, 0x40
jae 0x517bfd
mov dword [esp + eax*4 + 0x154], ecx
mov ebx, dword [esp + 0x150]
inc ebx
mov dword [esp + 0x150], ebx
test dl, 2
je 0x517c3d
xor eax, eax
test esi, esi
je 0x517c1e
jmp 0x517c10
cmp dword [esp + eax*4 + 0x25c], ecx
je 0x517c1e
inc eax
cmp eax, esi
jb 0x517c10
cmp eax, esi
jne 0x517c3d
cmp esi, 0x40
jae 0x517c3d
mov dword [esp + eax*4 + 0x25c], ecx
mov esi, dword [esp + 0x258]
inc esi
mov dword [esp + 0x258], esi
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
inc eax
mov dword [esp + 0x10], eax
cmp eax, edx
jb 0x517b60
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0x360]
test edi, edi
jne 0x517c8a
test ebx, ebx
jne 0x517c8a
test esi, esi
jne 0x517c8a
test ebp, ebp
je 0x517eaf
jns 0x517ea8
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x517eb1
xor eax, eax
test ebp, ebp
sets al
lea ecx, [esp + 0x30]
dec eax
and eax, ecx
mov dword [esp + 0x10], eax
lea esp, [esp]
test ebp, ebp
jle 0x517cd7
mov eax, 0x10624dd3
imul dword [esp + 0x1c]
mov eax, dword [esp + 0x1c]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov dword [esp + 0x30], ecx
imul ecx, ecx, 0x3e8
sub eax, ecx
imul eax, eax, 0x3e8
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x10]
jmp 0x517ce9
jne 0x517ce9
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
push eax
neg esi
sbb esi, esi
lea eax, [esp + 0x25c]
and esi, eax
neg ebx
sbb ebx, ebx
lea eax, [esp + 0x154]
and ebx, eax
neg edi
push esi
sbb edi, edi
lea eax, [esp + 0x50]
and edi, eax
mov eax, dword [esp + 0x2c]
push ebx
push edi
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x517e32
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x517d48
cmp dword [0x59fa7c], 0
jne 0x517c82
cmp eax, 0x2714
jne 0x517c82
test ebp, ebp
jg 0x517d67
mov edi, dword [esp + 0x48]
mov ebx, dword [esp + 0x150]
mov esi, dword [esp + 0x258]
mov eax, dword [esp + 0x10]
jmp 0x517ca0
lea eax, [esp + 0x38]
push eax
call fcn.0051f970
mov ecx, dword [eax]
mov ebx, dword [eax + 4]
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
add esp, 4
sub ecx, dword [esp + 0x28]
mov dword [esp + 0x36c], eax
sbb ebx, dword [esp + 0x20]
cmp ebx, 0x20c49b
jl 0x517db0
jg 0x517da0
cmp ecx, 0xa5e353f7
jb 0x517db0
or edi, 0xffffffff
mov dword [esp + 0x364], getsockopt
jmp 0x517e07
cmp ebx, 0xffdf3b64
jg 0x517dd4
jl 0x517dc2
cmp ecx, 0x5a1cac09
ja 0x517dd4
mov edi, 1
mov dword [esp + 0x364], getsockopt
jmp 0x517e07
sub edx, dword [esp + 0x2c]
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
push 0
shr eax, 0x1f
push 0x3e8
add eax, edx
cdq
push ebx
push ecx
mov edi, eax
mov esi, edx
call fcn.004f2c00
add edi, eax
adc esi, edx
mov dword [esp + 0x364], esi
mov eax, ebp
sub eax, edi
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x517eaf
mov edi, dword [esp + 0x48]
mov ebx, dword [esp + 0x150]
mov esi, dword [esp + 0x258]
mov eax, dword [esp + 0x10]
jmp 0x517ca0
test eax, eax
js 0x517c82
je 0x517eaf
mov esi, dword [esp + 0x14]
mov edi, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
mov ebp, dword [esp + 0x18]
xor ebx, ebx
add esi, 6
nop
xor eax, eax
mov word [esi], ax
mov eax, dword [esi - 6]
cmp eax, 0xffffffff
je 0x517e9e
lea ecx, [esp + 0x48]
push ecx
push eax
call edi
test eax, eax
je 0x517e6d
or word [esi], 1
lea eax, [esp + 0x150]
push eax
push dword [esi - 6]
call edi
test eax, eax
je 0x517e82
or word [esi], 4
lea eax, [esp + 0x258]
push eax
push dword [esi - 6]
call edi
test eax, eax
je 0x517e97
or word [esi], 2
cmp word [esi], 0
je 0x517e9e
inc ebx
add esi, 8
dec ebp
jne 0x517e50
mov eax, ebx
jmp 0x517eb1
push ebp
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
mov ecx, dword [esp + 0x374]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ebb9e
add esp, 0x368
ret