jigsaw wrote:As I understood, the syscall num is dynamically generated, i.e., is different from each time the app is loaded.
Correct.
jigsaw wrote:So the syscall number is not sth. that I can find in the .prx or EBOOT. Is that right?
Correct.
jigsaw wrote:Then how do I find it in live app? Could you give a hint?
I still don't understand. Let me clarify a thing first: there are 2 different kinds of executables (PRXs): official and homebrew. The executables have a section called "stubs", and it's where the executable lists all the imports it needs. Such imports come like this in the executable file:
- Code: Select all
jr $ra
nop
This, as you must have guessed, just does nothing but return to caller. This is the same for both official and homebrews.
Official executables (e.g. official games) are loaded by the kernel, and the kernel resolves the imports listed, transforming them into something like
- Code: Select all
jr $ra
syscall insertsyscallnumberhere
That is, the executable's imports are resolved in RAM before executing it.
For homebrews (non-signed), kernel of course won't load these, since they're not signed. So here comes HBL: it loads the homebrew in RAM and resolves the imports. How does HBL resolves the imports? Well it first looks if that import was used by another module previously loaded in RAM, like the exploited game's module. If not, it tries to guess it by using a method I called "syscall estimation". This was pretty much tuned up by JJS and works flawlessly in <6.60 firmwares, but does not work on 6.60 as we discussed before.
TL;DR: you cannot use syscalls for an import that's not already imported by kernel-loaded (not HBL-loaded) modules in 6.60.