but the values of "stubentry->nidtable" is not nids, :(
Code: Select all
struct SceLibraryStubTable *stubentry;
SceModule *pMod;
void *stubTab;
int stubLen;
pMod = sceKernelFindModuleByUID(uid);
if(pMod != NULL)
{
int i = 0;
stubTab = pMod->stub_top;
stubLen = pMod->stub_size;
SceUID fd = sceIoOpen("ms0:/lib_nids.txt", PSP_O_WRONLY | PSP_O_CREAT | PSP_O_TRUNC, 0777);
while(i < stubLen)
{
stubentry = (struct SceLibraryStubTable *) (stubTab + i);
sceIoWrite(fd, stubentry->libname, strlen(stubentry->libname));
sceIoWrite(fd, stubentry->nidtable, stubentry->stubcount*4);
i += (stubentry->len * 4);
}
sceIoClose(fd);
}