We need to evaluate the integral
\[
\int (x - 4) \ln x \, dx.
\]
Using the integration by parts formula
\[
\int u \, dv = uv - \int v \, du,
\]
we choose
\[
u = \ln x \quad \text{and} \quad dv = (x - 4) \, dx.
\]
Calculating \(du\) and \(v\):
\[
du = \frac{1}{x} \, dx, \quad v = \int (x - 4) \, dx = \frac{x^2}{2} - 4x.
\]
Substituting \(u\), \(du\), \(v\), and \(dv\) into the integration by parts formula gives:
\[
\int (x - 4) \ln x \, dx = \ln x \left(\frac{x^2}{2} - 4x\right) - \int \left(\frac{x^2}{2} - 4x\right) \frac{1}{x} \, dx.
\]
The integral simplifies to:
\[
\int \left(\frac{x^2}{2} - 4x\right) \frac{1}{x} \, dx = \int \left(\frac{x}{2} - 4\right) \, dx = \frac{x^2}{4} - 4x.
\]
Combining all parts, we have:
\[
\int (x - 4) \ln x \, dx = \ln x \left(\frac{x^2}{2} - 4x\right) - \left(\frac{x^2}{4} - 4x\right) + C,
\]
where \(C\) is the constant of integration.
Thus, the evaluated integral is:
\[
\int (x - 4) \ln x \, dx = \frac{x^2}{2} \ln x - 4x - \frac{x^2}{4} + 4x + C = \frac{x^2}{2} \ln x - \frac{x^2}{4} + C.
\]
To verify, we differentiate the result:
\[
\frac{d}{dx} \left(\frac{x^2}{2} \ln x - \frac{x^2}{4} + C\right) = \left(\frac{x^2}{2} \cdot \frac{1}{x} + \ln x \cdot x\right) - \frac{x}{2} = (x - \frac{x^2}{4}) + \ln x \cdot x = (x - 4) \ln x.
\]
This confirms that our integration is correct.
\[
\boxed{\int (x - 4) \ln x \, dx = \frac{x^2}{2} \ln x - \frac{x^2}{4} + C}
\]