  X-ray observations provide essential and valuable insights into the
acceleration and propagation of non-thermal electrons during solar flares.
Improved X-ray spectral analysis requires a deeper understanding of the
dynamics of energetic electrons. Previous studies have demonstrated that the
dynamics of accelerated electrons of a few thermal speeds are more complex. To
better describe the energetic electrons after injection, a model considering
energy diffusion and thermalization effects in flare conditions (warm-target
model) has recently been developed for Hard X-ray spectral analysis. This model
has demonstrated how the low-energy cut-off, which can hardly be constrained in
cold-target modeling, can be determined. However, the power-law form may not be
the most suitable representation of injected electrons. The kappa distribution,
which is proposed as a physical consequence of electron acceleration, has shown
successful application in RHESSI spectral analysis. In this study, we employ
the kappa-form injected electrons in the warm-target model to analyze two
M-class flares, observed by RHESSI and STIX, respectively. The best-fit results
show that the kappa-form energetic electron spectrum generates lower
non-thermal energy when producing a similar photon spectrum in the fit range
compared to the power-law form. We also demonstrated that the fit parameters
associated with kappa-form electron spectrum can be well determined with small
fit uncertainty. Further, the kappa distribution, which covers the entire
electron energy range, enables the determination of key electron properties
such as total electron number density and average energy in the flare site,
providing valuable information on electron acceleration processes.
