Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAaronLopezGarcia authored Jan 15, 2024
1 parent ef98ae7 commit be2592c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 8 additions & 5 deletions flash_dumper.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,16 @@ int sctrlKernelSetUserLevel(int level)
// Backup User Level
int previouslevel = KernelGetUserLevel();


u32 _sceKernelReleaseThreadEventHandler = FindFunction("sceThreadManager", "ThreadManForKernel", 0x72F3C145);
u32 _sceKernelReleaseThreadEventHandler = FindFunction("sceThreadManager", "ThreadManForUser", 0x72F3C145);

u32 addr = _sceKernelReleaseThreadEventHandler + 0x4;
do {
addr += 4;
} while ((_lw(addr)&0xFFF00000) != 0x24B00000);

u32 threadman_userlevel_struct = _lh(_sceKernelReleaseThreadEventHandler + 0x4)<<16;
threadman_userlevel_struct += (short)_lh(_sceKernelReleaseThreadEventHandler + 0x18);


threadman_userlevel_struct += (short)_lh(addr);

// Set User Level
_sw((level ^ 8) << 28, *(unsigned int *)(threadman_userlevel_struct) + 0x14);

Expand Down
2 changes: 2 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ static KernelFunctions _ktbl;
KernelFunctions* k_tbl = &_ktbl;

void ktest(){
int k1 = pspSdkSetK1(0);
pspDebugScreenPrintf("Got Kernel Access!\n");
scanKernelFunctions(k_tbl);
repairInstruction();
initDumperKernelThread();
pspSdkSetK1(k1);
}

int main(){
Expand Down

0 comments on commit be2592c

Please sign in to comment.