private ShopElement ReadItem(ExtendedBinaryReader input, int offset, int itemLength)
        {
            var returnPos = input.Position;

            input.Seek(offset, SeekOrigin.Begin);
            var id             = input.ReadUInt16();
            var unknown        = input.ReadBytes(0x0C);
            var unknown2Offset = input.ReadUInt16();
            var title          = ReadSubtitle(input);

            var unknown2 = input.ReadBytes(itemLength - (unknown2Offset - offset));

            var item = new ShopElement {
                Id = id, Unknown1 = unknown, Title = title, Unknown2 = unknown2
            };

            input.Seek(returnPos, SeekOrigin.Begin);
            return(item);
        }
        private long WriteItem(ExtendedBinaryWriter output, IList <Subtitle> subtitles, ShopElement item, long outputOffset)
        {
            output.Write((ushort)outputOffset);
            var returnPos = output.Position;

            output.Seek(outputOffset, SeekOrigin.Begin);
            output.Write(item.Id);
            output.Write(item.Unknown1);
            output.Write((ushort)0x0000);

            var subtitle = subtitles.First(x => x.Offset == item.Title.Offset);

            var currentOffset = outputOffset + 2 + 0x0C + 4;

            currentOffset = WriteSubtitle(output, subtitle, currentOffset, true);
            output.Seek(outputOffset + 2 + 0x0C, SeekOrigin.Begin);
            output.Write((ushort)currentOffset);
            output.Seek(currentOffset, SeekOrigin.Begin);
            output.Write(item.Unknown2);
            currentOffset = output.Position;
            output.Seek(returnPos, SeekOrigin.Begin);

            return(currentOffset);
        }