Guess what, you have to do it manually, because currently there are no or even a single ai - analysis application to decompile code nor solve your task.However,if you're good at reverse engineering inline with machine learning,you can try to create some piece app to come to solving up your bigger problem.
Hint;Building a decompiler is not a simple task. Basically, you have to take the application that you are decompiling that is to say;
be it an executable or some other form of compiled application
And parse it into some kind of tree you can work with in memory. You can then analyze the flow of the program and try to find patterns that might suggest that for instance;
An if statement/variable/function/etc. was used in a certain location
in the code
Then, It's all really just like predicting: you'd have to know the patterns that the compiler makes in compiled code, then search for those patterns and replace them with equivalent human-readable source code.
Disclaimer :If you are really interested in writing a decompiler, you should get a book on the topic.
Hint To some review-here