Any way to add up two animations?

I’m using PUBG assets, and there are some animations that look like a mess visually. Then I think that these animations store relative bone transforms to apply to other poses, so I have tried to write a C++ function to multiply the transform of each bone by the transform of that in the other animation. But now I can see that not all of the bones work correctly. Is there any way to do this? Or what’s wrong with my code?

This is the target animation to apply the additive animation:

This is the additive animation:

This is the final result:


This is my code:

Thanks a lot!

I’ve tried to remove a component from the transform, but none of them cause the final result work better.