It might be easiest to reverse engineer the x,y,z values.
If I may make a dummy file instead, with header
0 0.0 0.0 0.0
5 0.2 0.1 0.0
5 0.2 -0.1 0.0
12 0.0 0.0 0.3
then we have 12 data points with
x = 0.0, y = 0.0, z = 0, 0.3, 0.6, ...
Then 12 data points with
x = 0.2, y = -0.1, z = 0, 0.3, 0.6, ...
Then 12 data points with
x = 0.4, y = -0.2, z = 0, 0.3, 0.6, ...
and so on (increasing x by 0.2 and y by -0.1 for each block of 12)
After 60 data points, we move to
x = 0.2, y = 0.1, z = 0, 0.3, 0.6, ... (12 points)
x = 0.4, y = 0.0, z = 0, 0.3, 0.6, ... (12 points)
x = 0.6, y = -0.1, z = 0, 0.3, 0.6, ... (12 points)
and so on (again increasing x by 0.2 and y by -0.1 for each block of 12)
After another 60 data points, we move to
x = 0.4, y = 0.2, z = 0, 0.3, 0.6, ... (12 points)
x = 0.6, y = 0.1, z = 0, 0.3, 0.6, ... (12 points)
x = 0.8, y = 0.0, z = 0, 0.3, 0.6, ... (12 points)
and so on.
I have attached 2 codes, one which prints the x,y,z coordinates for the points in my dummy example (cube_rev_eng_1.py), and another which does it for your header (cube_rev_eng_2.py).
WARNING: the second code generates a lot of output, you will want to pipe the output to a file!
Finally, I attach a general tool (cube_rev_eng.py) which can read a general Cube file (well, at least those produced by ATK) and print the values in the following format:
X Y Z value
Again, this generates a lot of output!