geoip: moved asn lookups into their own function