When Agent Pride asks Sebastian who the gun is registered to Sebastian looks it up and gives him a name. Louisiana does not require firearm registration so there is no database to lookup the information from.
Patton is asked to run down the emails origin, after doing so in a rather fast method to get a viable result, Gregorio states - "What you just did is illegal." In actuality Email MIME Headers are public record and so is grabbing the info from them to locate the IP and Routing info from the source email. Using that info to actually act upon it if not a Law Enforcement Officer IS illegal, disseminating the info is not.