Algebraic theory of dicritical divisors