Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- there should be an xml in your source. replace the code with this
- <?xml version="1.0" encoding="utf-8"?>
- <xex>
- <baseaddr addr="0x90DF0000"/>
- <sysdll/>
- <format>
- <compressed/>
- </format>
- <mediatypes>
- <default/>
- <allpackages/>
- </mediatypes>
- <gameregion>
- <all/>
- </gameregion>
- <section file="silent.xzp" name="silent" memory="RO"/>
- </xex>
- disable any offline dash stuff
- HANDLE SIlent;
- //Add this functio to _kernelext.h found in xkelibs
- NTSYSAPI
- EXPORTNUM(305)
- DWORD
- NTAPI
- RtlSprintf(
- IN CHAR* Buffer,
- IN const CHAR* Format,
- ...
- );
- PWCHAR vaS(const char* Text, ...) {
- CHAR Buffer[0x1000];
- CHAR MessageBuffer[0x100];
- static WCHAR Message[0x100];
- va_list pArgList;
- va_start(pArgList, Text);
- RtlVsprintf(Buffer, Text, pArgList);
- va_end(pArgList);
- RtlSprintf(MessageBuffer, Buffer);
- mbstowcs(Message, MessageBuffer, strlen(MessageBuffer) + 1);
- ZeroMemory(Buffer, sizeof(Buffer));
- ZeroMemory(MessageBuffer, sizeof(MessageBuffer));
- return Message;
- }
- //Dash Functions put above titlehooks
- //Below function hooks image & offline dash xml
- typedef DWORD(*tFunctionFromDashThatLoadsImages)(PWCHAR r3, CONST PWCHAR r4, DWORD Size);
- tFunctionFromDashThatLoadsImages OriginalFunctionFromDashThatLoadsImages;
- DWORD FunctionFromDashThatLoadsImagesHook(PWCHAR r3, CONST PWCHAR r4, DWORD Size) {
- bool customSize = false;
- if (wcscmp(r3, L"epix://dashhome-offline.xml") == 0) {
- customSize = true;
- r3 = vaS(Str("section://%X,silent#dashhome-offline.xml"), SIlent);
- }
- if (wcscmp(r3, L"epix://Offline_Slot_Home.jpg") == 0) {
- customSize = true;
- r3 = vaS(Str("section://%X,silent#Offline_Slot_Home.jpg"), SIlent);
- }
- if (wcscmp(r3, L"common://ico_32x_alert.png") == 0) {
- customSize = true;
- r3 = vaS(Str("section://%X,silent#ico_32x_alert.png"), SIlent);
- }
- if (wcscmp(r3, L"common://ico_32x_check.png") == 0) {
- customSize = true;
- r3 = vaS(Str("section://%X,silent#ico_32x_check.png"), SIlent);
- }
- return OriginalFunctionFromDashThatLoadsImages(r3, r4, customSize ? lstrlenW(r3) : Size);
- }
- struct ManifestData {
- const wchar_t* pCommand;
- char _0x0004[0x18];
- const wchar_t* pParam;
- };
- //havent been able to get this to work yet. But basically it when a person selects a dash button it performs that action.
- typedef DWORD(*tManifestOnPressHandler)(ManifestData* r3, DWORD r4, DWORD r5);
- tManifestOnPressHandler OriginalManifestOnPressHandler;
- DWORD ManifestOnPressHandlerHook(ManifestData* r3, DWORD r4, DWORD r5) {
- DWORD dwLR = 0;
- __asm mflr dwLR
- if (dwLR == DashXmls::DashPressHook) {
- if (r3) {
- if (r3->pParam && (DWORD)r3->pParam > 0x30000000) {
- wstring ws(r3->pParam);
- string s(ws.begin(), ws.end());
- auto hash = xbox::utilities::Joaat(s.c_str());
- switch (hash) {
- case 0x20085702: xbox::utilities::XNotifyUI2(L"Success!"); break;
- case 0x20fbe9b5: xbox::utilities::XNotifyUI2(L"Success!"); break;
- case 0x4e1e3fd9: xbox::utilities::XNotifyUI2(L"Success!"); break;
- case 0xc4663e41: xbox::utilities::XNotifyUI2(L"Success!"); break;
- case 0x50bf74c8: xbox::utilities::XNotifyUI2(L"Success!"); break;
- }
- }
- }
- }
- return OriginalManifestOnPressHandler(r3, r4, r5);
- }
- //put this under dash.xex in titlehooks
- HookFunction(0x92200360, FunctionFromDashThatLoadsImagesHook, &OriginalFunctionFromDashThatLoadsImages);//DashBuildHook
- //HookFunction(0x92324B88, ManifestOnPressHandlerHook, &OriginalManifestOnPressHandler);//DashPressNotify
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement