Calculating the exact mass of a large cube in GR is a difficult problem. Probably materials strong enough to hold a large mass in a cube don't exist, anyway. It is only for very large cubes that the fine points in the GR analysis become important.
Let me skip ahead and give the approximate answer, before I put you to sleep:
The total energy of the cube can be approximated by taking the intergal of all sources of non-gravitational energy in the cube (this includes, for example, thermal energy, chemical bond energy - i.e. energy due to the electormagnetic forces between atoms, etc.) over the volume of the cube, and subtracting from this the "gravitational self energy" or "gravitational binding energy" of the cube. The last is not a GR concept, though, it is a Newtonian concept that we are using to approximate the GR calculation.
To get mass, you have to divide the total energy by c^2 if you are using conventional units. (In geometric units, c=1).
In Newtonian theory gravity couples to mass, so we use E/c^2 for the "mass" in calculating the Newtonian binding energy. As far as GR is concerned, we don't really talk about mass, though, we just talk about energy. Gravity couples to all forms of energy. Gravity coupling to mass is a Newtonian concept - gravity copuling to energy is the GR concept.
Here is a rough outline of the full GR procedure which is considerably more complicated than the above.
1) Solve Einstein's equations, G_{\mu\nu} = 8 \pi T_{\mu \nu} for a cubical boundary condition. This is easier said than done - I am not aware of any analytical solutions for a cube.
2) Determine the metric g_{\mu\nu} associated with the Eintein tensor G_{\mu\nu} for the above solution.
3) If (and only if) the cube is stationary and thus has a time-invariant metric, we can use the Komar mass intergal. Otherwise we need to use the ADM mass formula, which doesn't give much physical insight. (We can use it to get a number, though, as long as the cube is in asymptotically flat space-time).
I'm a bit confused about how anything in a cube can be moving. Having moving things in the cube isn't a problem per se, unless it makes the metric a function of time. Unfortuanately, I don't see how you can have a cube with macroscopic moving parts where the metric is not a function of time - the cube just isn't symmetrical enough. Microscopic moving things are OK, though (such as vibarating, rotating, or wiggling atoms) - thermal energy is just fine.
4) Using the Komar formula we can find the mass of the cube as a volume intergal of the stress-energy tensor and the metric coefficients we solved for in the Earlier steps.
The Komar formula is the following volume intergal.
https://www.physicsforums.com/showpost.php?p=1025357&postcount=33
\int_{\Sigma} (2-g^{00} g_{00}) T_{00} - g_{00}g^{11} T_{11} - g_{00} g^{22} T_{22} - g_{00} g^{33} T_{33}<br />
You can think of T^{00} as being the density of the cube - the total amount of energy of all sorts (except gravitational energy) contained in the volume element dx dy dz. (x,y,z here are coordinates).
This includes the thermal energy (energy due to vibrating, rotating atoms mentioned earlier), chemical bond energy (energy in the electromagnetic fields between atoms), and any other source of energy - except gravitational energy. (I said this before, but it's probably worth repeating :-)).
T_{00} in the above formula is then g_{00}^2 T^{00}.
The other terms (T_{11}), etc. are related to the stresses in the cube. A trivial consequence of solving Einstein's equation will be to find the complete set of mechanical stresses in the cube.
You see that the metric coefficients we calculated earlier play a strong role in the mass formula.
You will also (if you haven't fallen asleep yet) see that the mass of the cube is not just the intergal of the energy terms. Pressure terms (the stresses I mentioned earler, i.e. T_{11}, etc) contribute to the mass as well. In short, "pressure causes gravity".
For a small cube, we can make various approximations to approximate the above complete but very hard calculation. We know that gravity will be nearly Newtonian, we can use Newtonian theory to calculate the gravity, and find the metric coefficients. This leads to the approximate result I described earlier - "total non-gravitational energy" minus "gravitational binding energy".
The contributions of the pressure terms to mass are generally ignored in this approximate answer (total energy - binding energy) BTW - that's part of the whole PPN approximation system. Pressure terms arent terribly significant even in objects as large as the Sun.