Hi Rafael, Yes using Ribbon Workbench is smart decision.
You can get the library name and function name through this step:
go to salesorder entity (make sure you have it in the solution component), right click, customize command.

Then you will see 'Commands', expand its area

After that you can see in the Actions (lookup) or just click the javascript function under the section Commands that you have expanded.

Then you will find the function name.
But based on your question, I think you already had its name and library just cannot find the code itself inside the function name? And your concern here is to get the code, Right or not?
You need to Debug and maybe using like IE Developer Tool.
If you are using onPremise then you can access this script using this path:
C:\Program Files\Microsoft Dynamics CRM\CRMWeb\_static\SFA\salesorder\salesorder.js
It's unsupported way to modify its physical file. So this is not recommended, but your case you only want to copy.
Okay, but I think you are using CRM Online so you cannot access through physical folder but you can use debugger to this library:
\_static\SFA\salesorder\salesorder.js
Anyway, I help you to paste the code I got here from my CRM:
function processOrder() {
Mscrm.RefreshPageCommandHandler.executeCommand(Mscrm.InlineCommands.OrderProcessOrder, null)
}
Another problem is the Mscrm.InlineCommands.OrderProcessOrder function.
Which is you can set a debugging point in your custom code if you have this code.
Has posted before here:
https://community.dynamics.com/crm/f/117/t/146349.aspx
But I think you can set a debugging there from your custom code then you can use F11 to move to the insider code.
Hope this helps you.
Thank you.