When transforming bones you do not move them in 'world' space. They should inherit their parents transformation, so all bones has to be moved in relation to their parent.
Also issues with the scale\translation matrix in 3dsmax can cause similar looking issues. This can be checked for by re-importing the FBX back into 3dsmax, if it looks good after doing that then it's the issue is in the code.