Advertisement
Guest User

Untitled

a guest
Dec 9th, 2020
587
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.56 KB | None | 0 0
  1.  
  2.  
  3. there should be an xml in your source. replace the code with this
  4. <?xml version="1.0" encoding="utf-8"?>
  5. <xex>
  6. <baseaddr addr="0x90DF0000"/>
  7. <sysdll/>
  8. <format>
  9. <compressed/>
  10. </format>
  11. <mediatypes>
  12. <default/>
  13. <allpackages/>
  14. </mediatypes>
  15. <gameregion>
  16. <all/>
  17. </gameregion>
  18. <section file="silent.xzp" name="silent" memory="RO"/>
  19. </xex>
  20. disable any offline dash stuff
  21.  
  22.  
  23.  
  24.  
  25.  
  26. HANDLE SIlent;
  27. //Add this functio to _kernelext.h found in xkelibs
  28. NTSYSAPI
  29. EXPORTNUM(305)
  30. DWORD
  31. NTAPI
  32. RtlSprintf(
  33. IN CHAR* Buffer,
  34. IN const CHAR* Format,
  35. ...
  36. );
  37.  
  38.  
  39.  
  40. PWCHAR vaS(const char* Text, ...) {
  41. CHAR Buffer[0x1000];
  42. CHAR MessageBuffer[0x100];
  43. static WCHAR Message[0x100];
  44. va_list pArgList;
  45. va_start(pArgList, Text);
  46. RtlVsprintf(Buffer, Text, pArgList);
  47. va_end(pArgList);
  48. RtlSprintf(MessageBuffer, Buffer);
  49. mbstowcs(Message, MessageBuffer, strlen(MessageBuffer) + 1);
  50. ZeroMemory(Buffer, sizeof(Buffer));
  51. ZeroMemory(MessageBuffer, sizeof(MessageBuffer));
  52. return Message;
  53. }
  54.  
  55.  
  56. //Dash Functions put above titlehooks
  57. //Below function hooks image & offline dash xml
  58. typedef DWORD(*tFunctionFromDashThatLoadsImages)(PWCHAR r3, CONST PWCHAR r4, DWORD Size);
  59. tFunctionFromDashThatLoadsImages OriginalFunctionFromDashThatLoadsImages;
  60. DWORD FunctionFromDashThatLoadsImagesHook(PWCHAR r3, CONST PWCHAR r4, DWORD Size) {
  61. bool customSize = false;
  62. if (wcscmp(r3, L"epix://dashhome-offline.xml") == 0) {
  63. customSize = true;
  64. r3 = vaS(Str("section://%X,silent#dashhome-offline.xml"), SIlent);
  65. }
  66. if (wcscmp(r3, L"epix://Offline_Slot_Home.jpg") == 0) {
  67. customSize = true;
  68. r3 = vaS(Str("section://%X,silent#Offline_Slot_Home.jpg"), SIlent);
  69. }
  70.  
  71. if (wcscmp(r3, L"common://ico_32x_alert.png") == 0) {
  72. customSize = true;
  73. r3 = vaS(Str("section://%X,silent#ico_32x_alert.png"), SIlent);
  74. }
  75.  
  76. if (wcscmp(r3, L"common://ico_32x_check.png") == 0) {
  77. customSize = true;
  78. r3 = vaS(Str("section://%X,silent#ico_32x_check.png"), SIlent);
  79. }
  80. return OriginalFunctionFromDashThatLoadsImages(r3, r4, customSize ? lstrlenW(r3) : Size);
  81. }
  82.  
  83. struct ManifestData {
  84. const wchar_t* pCommand;
  85. char _0x0004[0x18];
  86. const wchar_t* pParam;
  87. };
  88. //havent been able to get this to work yet. But basically it when a person selects a dash button it performs that action.
  89. typedef DWORD(*tManifestOnPressHandler)(ManifestData* r3, DWORD r4, DWORD r5);
  90. tManifestOnPressHandler OriginalManifestOnPressHandler;
  91. DWORD ManifestOnPressHandlerHook(ManifestData* r3, DWORD r4, DWORD r5) {
  92. DWORD dwLR = 0;
  93. __asm mflr dwLR
  94.  
  95.  
  96. if (dwLR == DashXmls::DashPressHook) {
  97. if (r3) {
  98. if (r3->pParam && (DWORD)r3->pParam > 0x30000000) {
  99. wstring ws(r3->pParam);
  100. string s(ws.begin(), ws.end());
  101. auto hash = xbox::utilities::Joaat(s.c_str());
  102.  
  103. switch (hash) {
  104. case 0x20085702: xbox::utilities::XNotifyUI2(L"Success!"); break;
  105. case 0x20fbe9b5: xbox::utilities::XNotifyUI2(L"Success!"); break;
  106. case 0x4e1e3fd9: xbox::utilities::XNotifyUI2(L"Success!"); break;
  107. case 0xc4663e41: xbox::utilities::XNotifyUI2(L"Success!"); break;
  108. case 0x50bf74c8: xbox::utilities::XNotifyUI2(L"Success!"); break;
  109. }
  110. }
  111. }
  112. }
  113.  
  114.  
  115. return OriginalManifestOnPressHandler(r3, r4, r5);
  116. }
  117.  
  118.  
  119. //put this under dash.xex in titlehooks
  120. HookFunction(0x92200360, FunctionFromDashThatLoadsImagesHook, &OriginalFunctionFromDashThatLoadsImages);//DashBuildHook
  121. //HookFunction(0x92324B88, ManifestOnPressHandlerHook, &OriginalManifestOnPressHandler);//DashPressNotify
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement