User blog:Tetramur/Loader's number in Mathematica

It would be excellent if someone find a way to convert loader.c to Mathematica code and try to calculate some values of D(n). I want to verify that D(8) = 496 and D(9) = 2031616.