obliteration icon indicating copy to clipboard operation
obliteration copied to clipboard

Find out budget parameters for the game process

Open ultimaweapon opened this issue 2 years ago • 9 comments

I suspect it get called by SceSysCore.

ultimaweapon avatar Nov 25 '23 05:11 ultimaweapon

@red-prig do you have any idea?

ultimaweapon avatar Nov 25 '23 05:11 ultimaweapon

@ultimaweapon Tried checking, he just returns Enosys.

SoffiMeower avatar Nov 25 '23 05:11 SoffiMeower

571 = int sys_budget_set (int key)

function sys_budget_set(key:Integer):Integer;
begin
 Exit(ENOSYS); //sceSblACMgrIsSystemUcred
end;

red-prig avatar Nov 25 '23 10:11 red-prig

If you have system rights, this function sets the budget identifier for this process.

red-prig avatar Nov 25 '23 10:11 red-prig

If running via SceSysCore, save the value and return 0.

red-prig avatar Nov 25 '23 10:11 red-prig

If running via SceSysCore, save the value and return 0.

Yeah this is what I'm looking for. Do you know how this syscall get called before the game binary got exec?

ultimaweapon avatar Nov 25 '23 11:11 ultimaweapon

First, rfork_thread is called to create a new process, then parameters are loaded in the entry procedure, and only after that execve is called, switching the execution point to another file.

processSpawn.txt

entry.txt

red-prig avatar Nov 25 '23 12:11 red-prig

Thanks!

ultimaweapon avatar Nov 25 '23 12:11 ultimaweapon

Our new target is syscall 568, which is used to create a budget. We need to find what budget it is created for a game process.

ultimaweapon avatar Nov 26 '23 11:11 ultimaweapon