Sorry, I confused myself and thought about a different parameter.
Yes, the last argument of LookupAccountSid does tell what type of
account is that. But I'm not sure that what you suggest is a good
strategy: the fact that the current user is a member of Administrators
does not yet mean we can report that user as the file's owner.
How about testing the user's primary group in addition to UID? That
is,
(or (eql (nth 2 attrs) (user-uid))
(and (eq system-type 'windows-nt) (eql (nth 2 attrs) (user-gid)))