To determine the amount of protein on a dry matter basis you need to subtract the moisture percentage from the total of 100% to get the dry matter percentage. Then divide the crude protein with the dry matter percentage and multiply it by 100.
For example the calculation for a food that has 10% crude protein and 75% moisture:
100% - 75% moisture = 25% dry matter; 10% protein / 25% = 0.4%; 0.4% x 100 = 40% protein content in the dry matter.
The same formula works for calculating the dry matter percentages of fat and fiber.