It's not really clear what you're trying to do as an end goal:
- Are you trying to reverse engineer a custom compiled binary?
- OR are you trying to grant systemctl to a non-root user?
Each of those should be composed as their own separate questions.
First, If you are trying to "decompile" a binary executable there is no real easy answer to turn it back into source code and if you have no access to the code or build methods you should just start over building a custom solution or do something else to accomplish your goal. A compiled binary executable doesn't even know what language it was originally written in, let alone being able to turn itself back into source code. You do have some basic ELF info though, so maybe start here: https://reverseengineering.stackexchange.com/
Secondly, to answer your primary question: (ignoring the reverse engineering binaries portion of the question), you can use the existing sudoer system to grant specific "root/sudo" commands to a non-root user. Here is an example sudoers line:
nancy ALL=(ALL) /usr/bin/systemctl restart nginx
This allows the nancy
user to run sudo systemctl restart nginx
but they are not allowed to do anything else with sudo. You can expand this out as necessary for your use-case and allow the user (or group) to run different specific commands.