We investigated the role of electronic excitation, relaxation and transport processes in X-ray induced ultrafast demagnetization of magnetic multilayer systems. In what follows, we report on the results obtained with the newly developed modeling tool, XSPIN, which enables nanoscopic description of electronic processes occurring in X-ray irradiated ferromagnetic materials. With this tool, we have studied the specific response of Co/Pt multilayer system irradiated by an ultrafast XUV pulse at the M-edge of Co (photon energy ~ 60 eV). It was previously studied experimentally at the FERMI free-electron-laser facility, using the magnetic small-angle X-ray scattering technique. The XSPIN simulations show that the magnetic scattering signal from cobalt decreases -- on the femtosecond timescales considered -- due to electronic excitation, relaxation and transport processes both in the cobalt and in the platinum layers. The signal decrease scales with the increasing fluence of incoming radiation, following the trend observed in the experimental data. Confirmation of the predominant role of electronic processes for X-ray induced demagnetization in the regime below the structural damage threshold, achieved with our theoretical study, is a step towards quantitative control and manipulation of X-ray induced magnetic processes on femtosecond timescales.