I am at work and don't have my notes right now...
4000 is the third save slot in that save file.
4001 is the level state byte
04 = level is locked and you need xxx stars to unlock
05 = level is unlocked
0B = you finished the level with Mario
4003 is the stamp byte.
0 = you don't got the stamp
1= you collected the stamp
4015 is the Star byte
1 = you have the first star of this Level
2 = you have the second star
3 = you have the first and the second Star
4 = you have the third star
5 = you have the first and third star
6 = you have the second and third star
7 = you have all three stars
4011 (4009) are the "flag pole" bytes
It is 80 F3 when you reach the top of the pole
And directly after that are the points.
I can't tell you more because I don't have my notes, as mentioned above.
@moonkitty
I think I can start to code at the weekend but I don't know how long I need to get this done.