Advertisement
Xeeynamo

SceShellSvc 0x8282C244

Jan 18th, 2016
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.98 KB | None | 0 0
  1. SceUID __cdecl ShellCreateMsgPipe(ShellResource *pMsgPipe, const char *name, unsigned int size, int partitionType, int unk08)
  2. {
  3.     struct Data {
  4.         unsigned int length;
  5.         int unk04;
  6.         int unk08;
  7.         int unk0C;
  8.         int unk10;
  9.     };
  10.  
  11.     unsigned int v14 = 0x82831614;
  12.     int partition = 0x40;
  13.     if (partitionType > 0)
  14.     {
  15.         if (partitionType > 1)
  16.         {
  17.             if (partitionType == 3)
  18.                 partition = 0x40 | 1; // SCE_MEMORY_PARTITION_KERNEL
  19.         }
  20.         else
  21.         {
  22.             sceClibPrintf(aSceipmiWarningIgnoredIpmiKer);
  23.         }
  24.     }
  25.  
  26.     void *param;
  27.     Data data;
  28.     if (unk08 != -1) // SCE_INVALID_UID
  29.     {
  30.         param = &data;
  31.         sceClibMemset(&data, sizeof(Data));
  32.         data.length = 20;
  33.         data.unk04 = 1;
  34.         data.unk08 = unk08;
  35.     }
  36.     else
  37.         param = 0;
  38.     SceUID result = sceKernelCreateMsgPipe(name, partition, 0x83, size, param);
  39.     if (result >= 0)
  40.     {
  41.         pMsgPipe->id = result;
  42.         pMsgPipe->type = 1; // ALLOCATED RESOURCE
  43.         result = 0; // SCE_KERNEL_OK
  44.     }
  45.     if (v14 |= 0x82831614)
  46.         _stack_chk_fail();
  47.     return result;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement