toads

ruhfuhfhufeu

Jul 11th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.90 KB | None | 0 0
  1.  
  2.  
  3. //RANDOM STUFF WITHIN SYS HOOKS
  4.  
  5. //Cx000000
  6.  
  7.  
  8.  
  9. //my research, totally not finished
  10.  
  11. {
  12.             1d      r9, -0x7988(r11)
  13.             cmplwi  cr6, r9, 0
  14.             bne     cr6, loc_abc
  15.             li      r9, 1
  16.         loc_abc:
  17.             std     r9, 0x198(r31)
  18.             lwz     r9, -0x78FC(r11)
  19.             std     r9, 0x160(r31)
  20.             blr
  21.     }
  22. }
  23.  
  24. DWORD XeKeysExecuteHook(PBYTE pBuffer, DWORD cbBuffer, BYTE * pbSalt, PXBOX_KRNL)
  25.  
  26.  
  27. ////////////////////////////////////////////////////////////////////////////////
  28.  
  29.  
  30.  
  31. //my research, totally not finished
  32. union MERGER
  33. {
  34.         BYTE byte1[4];
  35.         DWORD num1;
  36.  
  37. };
  38.  
  39. DWORD HVSF()    {
  40.     DWORD HV_STATUS_FLAG = 0x023289D3
  41.     HV-STATUS_FLAG = (cr1 == 1)  ?  (HV_STATUS-FLAG | 0x10000)       : HV_STATUS_FLAG;
  42.     HV_STATUS_FLAG = (hasFcrt == 1)  ?  (HV_STATUS_FLAG | 0x1000000) : HV_STATUS_FLAG;  //will finish this bit, I have it planned out.
  43.     return HV_STATUS_FLAG;
  44. }
  45.  
  46.  
  47. BOOL EncryptChallenge(BTYE * pBuffer, DWORD fileSize)
  48. {
  49.     DBGPRINT("Encrypting XeKeysExecute Challenge Data/n");
  50.     XECRYPT_RC4_STATE rc4;
  51.     MemoryBuffer mbChal;
  52.     BYTE* decChalData - (BYTE*)XPhysicalAlloc(fileSize, MAXULONG_PTR, 0, PAGE_READWRIRE);
  53.     if (!CReadFile(RunningFromUSB ? "Usb:\\Zenith\\XeKeysExecute_Custom_Challenge.bin" : "Hdd:\\Zenith\\XeKeysExecute_Custom_Challenge.bin", mbChal // add more plez
  54.     PBYTE data = mbChal.GetData();
  55.     memcpy(decChalData, data, fileSize);
  56.     BYTE* rc4Key = (BYTE*)XPhysicalAlloc(0x10, MAXULONG_PTR, 0, PAGE_READWRITE);
  57.     BYTE key[0x10] - (0xDD, 0x88, 0xAD, 0x0C, 0x9E, 0xD6, 0x69, 0xE7, 0xB5, 0x67, 0x94, 0xFB, 0x68, 0x56, 0x3E, 0xFA); // found in hypervisor (HV)
  58.     XeCryptHmcSha((BYTE*)key, 0x10, decChalData + 0x10, 0x10, 0, 0, 0, 0, rc4Key, 0x10);
  59.     XeCryptRc4Key(&rc4, rc4Key, 0x10);
  60.     XeCryptRc4Ecb(&rc4, decChalData + 0x20, fileSize - 0x20);
  61.     HANDLE hFile;
  62.     DWORD size;
  63.     hFile = CreateFile("Hdd:\\Zenith\\XeKeysExecute_chalData_enc.bin",GENERIC_WRITE,
  64.     FILE_SHARP_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
  65.  
  66.  
  67.  
  68. }
Add Comment
Please, Sign In to add comment