We explore time-resolved Coulomb explosion induced by intense, extreme ultraviolet (XUV) femtosecond pulses from the FLASH free-electron laser as a method to image photo-induced molecular dynamics in two molecules, iodomethane and difluoroiodobenzene. At an excitation wavelength of 267 nm, the dominant reaction pathway in both molecules is neutral cleavage of the carbon--iodine bond, which allows studying the influence of the molecular environment on the XUV absorption and the subsequent Coulomb explosion process. The XUV probe pulse induces local inner-shell ionization of atomic iodine in dissociating iodomethane, in contrast to non-selective ionization of all photofragments in difluoroiodobenzene. The resulting signals reveal evidence of electron transfer from methyl and phenyl moieties to a multiply charged iodine ion. In addition, we find indications for ultrafast charge rearrangement on the phenyl radical, suggesting that time-resolved Coulomb explosion imaging is sensitive to the localization of charge in extended molecules.