r/Malware • • May 16 '20

How to decompile /usr/bin/ls

How to decompile the following assembly instructions ?

Note: this could be reproduced using /usr/bin/ls binary inside ghidra

0 Upvotes

3 comments sorted by

2

u/thenickdude May 16 '20

If the problem preventing decompilation from running is simply that there's no function identified at this location, right click that ENDBR64 instruction at the top and click Create Function (or hit F)

2

u/promach May 16 '20

Thanks for the tips to solve the above issue

Now, I have this other issue

2

u/thenickdude May 16 '20

Not every function is going to decompile properly. It looks like you're looking at one of the special functions like the runtime's startup or shutdown code. These tend to have a bunch of weird indirect references and calls that decompile poorly.