First-principles theory of tunneling currents in metal-oxide-semiconductor structures