Hi Leonardo,
You may be able to port your custom functionalities using git. For example, if your custom AtoM folder is located in /usr/share/nginx/atom-custom, you could clone a default AtoM 2.4.x version besides it ...
And check the differences between them with ...
git diff --no-index /usr/share/nginx/atom-default /usr/share/nginx/atom-custom
You could create a patch from that diff using ...
git diff --no-index /usr/share/nginx/atom-default /usr/share/nginx/atom-custom > /usr/share/nginx/atom.patch
You'll need to modify that patch file removing the diff from files you don't want (content from the .git or logs folders for example) and making the paths match to be be able to apply it over the new AtoM version (installed in /usr/share/nginx/atom-new for example) ...
cd /usr/share/nginx/atom-new
git apply /usr/share/nginx/atom.patch
However, that doesn't guarantee that the custom changes will work on the new version and you may need to modify them to make them work with the new AtoM code and dependencies.
Best regards.