private byte[] createTicketData(string TitleID, string TitleKey)
        {
            byte[] ticket = TICKETTEMPLATE;

            ticket = ConvertingTools.connectByteArray(ConvertingTools.copyOfRange(ticket, 0, TK + 0x9C), ConvertingTools.HexStringToByteArray(TitleID), ConvertingTools.copyOfRange(ticket, TK + 0xA4, ticket.Length));
            ticket = ConvertingTools.connectByteArray(ConvertingTools.copyOfRange(ticket, 0, TK + 0x7F), ConvertingTools.HexStringToByteArray(TitleKey), ConvertingTools.copyOfRange(ticket, TK + 0x8F, ticket.Length));

            return(ticket);
        }
Beispiel #2
0
        private byte[] PatchData(byte[] data, string type)
        {
            if (blank_id)
            {
                data = ConvertingTools.connectByteArray(ConvertingTools.copyOfRange(data, 0x00, TK + 0x98), ConvertingTools.HexStringToByteArray("00000000"), ConvertingTools.copyOfRange(data, TK + 0x9C, data.Length));
                data = ConvertingTools.connectByteArray(ConvertingTools.copyOfRange(data, 0x00, TK + 0xDC), ConvertingTools.HexStringToByteArray("00000000"), ConvertingTools.copyOfRange(data, TK + 0xE0, data.Length));
            }

            if (type.Equals("Demo") && patch_demo)
            {
                data = ConvertingTools.connectByteArray(ConvertingTools.copyOfRange(data, 0x00, TK + 0x124), ConvertingTools.HexStringToByteArray("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), ConvertingTools.copyOfRange(data, TK + 0x164, data.Length));
            }
            else if (type.Equals("DLC") && patch_dlc)
            {
                data = ConvertingTools.connectByteArray(ConvertingTools.copyOfRange(data, 0x00, TK + 0x164), ConvertingTools.HexStringToByteArray("00010014000000ac000000140001001400000000000000280000000100000084000000840003000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), ConvertingTools.copyOfRange(data, TK + 0x210, data.Length));
            }

            return(data);
        }