Skip to content

Commit 8c9c8d4

Browse files
Update Shellcode.c
1 parent bf422c3 commit 8c9c8d4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Plugin_samples/Game_Plugin_Loader/shellcode/Shellcode.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,22 @@ typedef struct {
109109

110110

111111
static int __attribute__((used)) scePadReadState_Hook(int handle, OrbisPadData *pData, GameExtraStuff *restrict stuff){
112-
112+
int (*Hello)() = 0;
113113
volatile unsigned long long Hello_Game[2];
114114
Hello_Game[0] = 0x7266206f6c6c6548;
115115
Hello_Game[1] = 0x0000364f42206d6f;
116116

117+
volatile unsigned long long Hello_Game_sym[2];
118+
Hello_Game_sym[0] = 0x7266206f6c6c6548;
119+
117120
int ret = stuff->scePadReadState(handle, pData);
118121
int is_connected = (ret == 0 && handle > 0 && pData->connected);
119122

120123
if (is_connected && !stuff->loaded)
121124
{
122125
int res = stuff->sceKernelLoadStartModule(stuff->prx_path, 0, 0, 0, 0, 0);
126+
stuff->sceKernelDlsym(modu, (const char *)Hello_Game_sym, (void **)&Hello);
127+
Hello();
123128
(void)res;
124129
stuff->sceKernelDebugOutText(0, (const char*)Hello_Game);
125130
stuff->loaded = 1;

0 commit comments

Comments
 (0)