Problem with the skined

Hi all. I am writing a loader for mdx format (load models from Warcraft). There were no problems with the geometry and materials, but there was an incident with the bones. I came across a problem that some bones do not have a parent when reading a file. I tried to build a hierarchy, but the skeleton doesn’t look right. I’ve tried adding bones (that don’t have a parent bone) to the root bone, but the skeleton is distorted. Has anyone encountered this problem? I would be grateful if anyone could tell me which direction to dig.
Sorry if my English is not very good. Thank you for your attention.