1) casting source to uint32 is useless since it's an uint32 already
2) casting data (uint8*) to uint32* then trying to assign a value will write 3 bytes outside the valid range (DANGER!)
3) data isn't pointing at anything valid (DANGERx2!)
4) You should use static_cast and reinterpret_cast instead of the old C-style casts