diff --git a/Il2CppInspector.Common/FileFormatStreams/AABReader.cs b/Il2CppInspector.Common/FileFormatStreams/AABReader.cs index ed22e29..c5b2198 100644 --- a/Il2CppInspector.Common/FileFormatStreams/AABReader.cs +++ b/Il2CppInspector.Common/FileFormatStreams/AABReader.cs @@ -13,7 +13,7 @@ using System.Linq; namespace Il2CppInspector { // This is a wrapper for multiple binary files of different architectures within a single AAB - internal class AABReader : FileFormatStream + public class AABReader : FileFormatStream { private ZipArchive zip; private ZipArchiveEntry[] binaryFiles; diff --git a/Il2CppInspector.Common/FileFormatStreams/APKReader.cs b/Il2CppInspector.Common/FileFormatStreams/APKReader.cs index 4869ff9..af411b9 100644 --- a/Il2CppInspector.Common/FileFormatStreams/APKReader.cs +++ b/Il2CppInspector.Common/FileFormatStreams/APKReader.cs @@ -13,7 +13,7 @@ using System.Linq; namespace Il2CppInspector { // This is a wrapper for multiple binary files of different architectures within a single APK - internal class APKReader : FileFormatStream + public class APKReader : FileFormatStream { private ZipArchive zip; private ZipArchiveEntry[] binaryFiles; diff --git a/Il2CppInspector.Common/FileFormatStreams/ElfReader.cs b/Il2CppInspector.Common/FileFormatStreams/ElfReader.cs index 9f845a2..42fac72 100644 --- a/Il2CppInspector.Common/FileFormatStreams/ElfReader.cs +++ b/Il2CppInspector.Common/FileFormatStreams/ElfReader.cs @@ -15,7 +15,7 @@ using NoisyCowStudios.Bin2Object; namespace Il2CppInspector { - internal class ElfReader32 : ElfReader + public class ElfReader32 : ElfReader { public ElfReader32() : base() { ElfReloc.GetRelocType = info => (Elf) (info & 0xff); @@ -28,7 +28,7 @@ namespace Il2CppInspector protected override void WriteWord(uint value) => Write(value); } - internal class ElfReader64 : ElfReader + public class ElfReader64 : ElfReader { public ElfReader64() : base() { ElfReloc.GetRelocType = info => (Elf) (info & 0xffff_ffff); @@ -46,7 +46,7 @@ namespace Il2CppInspector uint GetPLTAddress(); } - internal abstract class ElfReader : FileFormatStream, IElfReader + public abstract class ElfReader : FileFormatStream, IElfReader where TWord : struct where TPHdr : Ielf_phdr, new() where TSym : Ielf_sym, new() diff --git a/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/Elf.cs b/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/Elf.cs index 94965ed..06870f6 100644 --- a/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/Elf.cs +++ b/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/Elf.cs @@ -109,7 +109,7 @@ namespace Il2CppInspector } #pragma warning disable CS0649 - internal class elf_header where TWord : struct + public class elf_header where TWord : struct { // 0x7f followed by ELF in ascii public uint m_dwFormat; @@ -158,7 +158,7 @@ namespace Il2CppInspector public ushort e_shtrndx; } - internal interface Ielf_phdr where TWord : struct + public interface Ielf_phdr where TWord : struct { uint p_type { get; } TWord p_offset { get; set; } @@ -168,7 +168,7 @@ namespace Il2CppInspector uint p_flags { get; } } - internal class elf_32_phdr : Ielf_phdr { + public class elf_32_phdr : Ielf_phdr { public uint p_type => f_p_type; public uint p_offset { get => f_p_offset; set => f_p_offset = value; } public uint p_filesz { get => f_p_filesz; set => f_p_filesz = value; } @@ -186,7 +186,7 @@ namespace Il2CppInspector public uint p_align; } - internal class elf_64_phdr : Ielf_phdr + public class elf_64_phdr : Ielf_phdr { public uint p_type => f_p_type; public ulong p_offset { get => f_p_offset; set => f_p_offset = value; } @@ -205,7 +205,7 @@ namespace Il2CppInspector public ulong p_align; } - internal class elf_shdr where TWord : struct + public class elf_shdr where TWord : struct { public uint sh_name; public uint sh_type; @@ -219,7 +219,7 @@ namespace Il2CppInspector public TWord sh_entsize; } - internal interface Ielf_sym where TWord : struct + public interface Ielf_sym where TWord : struct { uint st_name { get; } TWord st_value { get; } @@ -228,7 +228,7 @@ namespace Il2CppInspector Elf type { get; } } - internal class elf_32_sym : Ielf_sym + public class elf_32_sym : Ielf_sym { public uint st_name => f_st_name; public uint st_value => f_st_value; @@ -244,7 +244,7 @@ namespace Il2CppInspector public ushort f_st_shndx; } - internal class elf_64_sym : Ielf_sym + public class elf_64_sym : Ielf_sym { public uint st_name => f_st_name; public ulong st_value => f_st_value; @@ -260,19 +260,19 @@ namespace Il2CppInspector public ulong st_size; } - internal class elf_dynamic where TWord : struct + public class elf_dynamic where TWord : struct { public TWord d_tag; public TWord d_un; } - internal class elf_rel where TWord : struct + public class elf_rel where TWord : struct { public TWord r_offset; public TWord r_info; } - internal class elf_rela where TWord : struct + public class elf_rela where TWord : struct { public TWord r_offset; public TWord r_info; diff --git a/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/MachO.cs b/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/MachO.cs index 157b5ce..dd48252 100644 --- a/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/MachO.cs +++ b/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/MachO.cs @@ -65,7 +65,7 @@ namespace Il2CppInspector N_OSO = 0x66, } - internal class MachOHeader where TWord : struct + public class MachOHeader where TWord : struct { public uint Magic; public uint CPUType; @@ -76,13 +76,13 @@ namespace Il2CppInspector public TWord Flags; } - internal class MachOLoadCommand + public class MachOLoadCommand { public uint Command; public uint Size; } - internal class MachOSegmentCommand where TWord : struct + public class MachOSegmentCommand where TWord : struct { // MachOLoadCommand [String(FixedSize = 16)] @@ -97,7 +97,7 @@ namespace Il2CppInspector public uint Flags; } - internal class MachOSection where TWord : struct + public class MachOSection where TWord : struct { [String(FixedSize = 16)] public string Name; @@ -114,14 +114,14 @@ namespace Il2CppInspector public TWord Reserved2; } - internal class MachOLinkEditDataCommand + public class MachOLinkEditDataCommand { // MachOLoadCommand public uint Offset; public uint Size; } - internal class MachODyldInfoCommand + public class MachODyldInfoCommand { public uint RebaseOffset; public uint RebaseSize; @@ -135,7 +135,7 @@ namespace Il2CppInspector public uint ExportSize; } - internal class MachOSymtabCommand + public class MachOSymtabCommand { public uint SymOffset; public uint NumSyms; @@ -143,7 +143,7 @@ namespace Il2CppInspector public uint StrSize; } - internal class MachOEncryptionInfo + public class MachOEncryptionInfo { // MachOLoadCommand public uint CryptOffset; @@ -151,7 +151,7 @@ namespace Il2CppInspector public uint CryptID; } - internal class MachO_nlist where TWord : struct + public class MachO_nlist where TWord : struct { public MachO_NType n_type => (MachO_NType) f_n_type; public uint n_strx; @@ -161,7 +161,7 @@ namespace Il2CppInspector public TWord n_value; } - internal class MachO_relocation_info + public class MachO_relocation_info { public int r_address; public uint r_data; diff --git a/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/PE.cs b/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/PE.cs index 5aea7b8..7726bcb 100644 --- a/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/PE.cs +++ b/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/PE.cs @@ -25,7 +25,7 @@ namespace Il2CppInspector #pragma warning disable CS0649 // _IMAGE_FILE_HEADER - internal class COFFHeader + public class COFFHeader { public ushort Machine; public ushort NumberOfSections; @@ -37,7 +37,7 @@ namespace Il2CppInspector } // _IMAGE_OPTIONAL_HEADER - internal interface IPEOptHeader + public interface IPEOptHeader { PE ExpectedMagic { get; } ushort Magic { get; } @@ -46,7 +46,7 @@ namespace Il2CppInspector RvaEntry[] DataDirectory { get; } } - internal class PEOptHeader32 : IPEOptHeader + public class PEOptHeader32 : IPEOptHeader { public PE ExpectedMagic => PE.IMAGE_NT_OPTIONAL_HDR32_MAGIC; public ushort Magic => f_Magic; @@ -89,7 +89,7 @@ namespace Il2CppInspector } // _IMAGE_OPTIONAL_HEADER64 - internal class PEOptHeader64 : IPEOptHeader + public class PEOptHeader64 : IPEOptHeader { public PE ExpectedMagic => PE.IMAGE_NT_OPTIONAL_HDR64_MAGIC; public ushort Magic => f_Magic; @@ -130,14 +130,14 @@ namespace Il2CppInspector public RvaEntry[] f_DataDirectory; } - internal class RvaEntry + public class RvaEntry { public uint VirtualAddress; public uint Size; } // _IMAGE_SECTION_HEADER - internal class PESection + public class PESection { public PE Characteristics => (PE) f_Characteristics; @@ -155,7 +155,7 @@ namespace Il2CppInspector } // _IMAGE_EXPORT_DIRECTORY - internal class PEExportDirectory + public class PEExportDirectory { public uint Characteristics; public uint TimeDateStamp; diff --git a/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/SElf.cs b/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/SElf.cs index 733eddb..48267cc 100644 --- a/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/SElf.cs +++ b/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/SElf.cs @@ -9,13 +9,13 @@ using NoisyCowStudios.Bin2Object; namespace Il2CppInspector { - internal enum SElfConsts : uint + public enum SElfConsts : uint { Magic = 0x1D3D154F } [Flags] - internal enum SElfEntryFlags : ulong + public enum SElfEntryFlags : ulong { Ordered = 0x1, Encrypted = 0x2, @@ -30,7 +30,7 @@ namespace Il2CppInspector } // SCE-specific definitions for e_type - internal enum SElfETypes : ushort + public enum SElfETypes : ushort { ET_SCE_EXEC = 0xFE00, ET_SCE_RELEXEC = 0xFE04, @@ -48,7 +48,7 @@ namespace Il2CppInspector } // SCE-specific definitions for program header type - internal enum SElfPTypes : uint + public enum SElfPTypes : uint { PT_SCE_RELA = 0x60000000, PT_SCE_DYNLIBDATA = 0x61000000, @@ -60,7 +60,7 @@ namespace Il2CppInspector } // Extended info types - internal enum SElfExInfoTypes + public enum SElfExInfoTypes { PTYPE_FAKE = 0x1, PTYPE_NPDRM_EXEC = 0x4, @@ -73,7 +73,7 @@ namespace Il2CppInspector } #pragma warning disable CS0649 - internal class SElfHeader + public class SElfHeader { public uint Magic; public byte Version; @@ -89,7 +89,7 @@ namespace Il2CppInspector public uint Padding; } - internal class SElfEntry + public class SElfEntry { public ulong Flags; public ulong FileOffset; @@ -102,7 +102,7 @@ namespace Il2CppInspector public ushort SegmentIndex => (ushort) ((Flags & (ulong) SElfEntryFlags.SegmentIndexMask) >> 20); } - internal class SElfSCEData + public class SElfSCEData { public ulong ProductAuthID; public ulong ProductType; diff --git a/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/UB.cs b/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/UB.cs index a2aa4aa..2daf249 100644 --- a/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/UB.cs +++ b/Il2CppInspector.Common/FileFormatStreams/FormatLayouts/UB.cs @@ -15,14 +15,14 @@ namespace Il2CppInspector } // Big-endian - internal class FatHeader + public class FatHeader { public uint Magic; public uint NumArch; } // Big-endian - internal class FatArch + public class FatArch { public uint CPUType; public uint CPUSubType; diff --git a/Il2CppInspector.Common/FileFormatStreams/MachOReader.cs b/Il2CppInspector.Common/FileFormatStreams/MachOReader.cs index dd97d45..5dbbe0d 100644 --- a/Il2CppInspector.Common/FileFormatStreams/MachOReader.cs +++ b/Il2CppInspector.Common/FileFormatStreams/MachOReader.cs @@ -13,7 +13,7 @@ using NoisyCowStudios.Bin2Object; namespace Il2CppInspector { - internal class MachOReader32 : MachOReader + public class MachOReader32 : MachOReader { public override int Bits => 32; @@ -33,7 +33,7 @@ namespace Il2CppInspector } } - internal class MachOReader64 : MachOReader + public class MachOReader64 : MachOReader { public override int Bits => 64; @@ -55,7 +55,7 @@ namespace Il2CppInspector // We need this convoluted generic TReader declaration so that "static T FileFormatReader.Load(Stream)" // is inherited to MachOReader32/64 with a correct definition of T - internal abstract class MachOReader : FileFormatStream + public abstract class MachOReader : FileFormatStream where TWord : struct where TReader : FileFormatStream where TConvert : IWordConverter, new() diff --git a/Il2CppInspector.Common/FileFormatStreams/PEReader.cs b/Il2CppInspector.Common/FileFormatStreams/PEReader.cs index bc07128..e4f7641 100644 --- a/Il2CppInspector.Common/FileFormatStreams/PEReader.cs +++ b/Il2CppInspector.Common/FileFormatStreams/PEReader.cs @@ -17,7 +17,7 @@ namespace Il2CppInspector // References: // PE Header file: https://github.com/dotnet/llilc/blob/master/include/clr/ntimage.h // PE format specification: https://docs.microsoft.com/en-us/windows/win32/debug/pe-format?redirectedfrom=MSDN - internal class PEReader : FileFormatStream + public class PEReader : FileFormatStream { [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)] private extern static IntPtr LoadLibrary(string lpLibFileName); diff --git a/Il2CppInspector.Common/FileFormatStreams/ProcessMapReader.cs b/Il2CppInspector.Common/FileFormatStreams/ProcessMapReader.cs index d8fa011..4e089b1 100644 --- a/Il2CppInspector.Common/FileFormatStreams/ProcessMapReader.cs +++ b/Il2CppInspector.Common/FileFormatStreams/ProcessMapReader.cs @@ -15,7 +15,7 @@ namespace Il2CppInspector // This is a wrapper for a Linux memory dump // The supplied file is a text file containing the output of "cat /proc/["self"|process-id]/maps" // We re-construct libil2cpp.so from the *.bin files and return it as the first image - internal class ProcessMapReader : FileFormatStream + public class ProcessMapReader : FileFormatStream { private BinaryObjectStream il2cpp; diff --git a/Il2CppInspector.Common/FileFormatStreams/SElfReader.cs b/Il2CppInspector.Common/FileFormatStreams/SElfReader.cs index 52fee43..aa373df 100644 --- a/Il2CppInspector.Common/FileFormatStreams/SElfReader.cs +++ b/Il2CppInspector.Common/FileFormatStreams/SElfReader.cs @@ -24,7 +24,7 @@ namespace Il2CppInspector // https://www.psxhax.com/threads/ps4-self-spkg-file-format-documentation-detailed-for-scene-devs.6636/ // https://wiki.henkaku.xyz/vita/images/a/a2/Vita_SDK_specifications.pdf // https://www.psxhax.com/threads/make-fself-gui-for-flat_zs-make_fself-py-script-by-cfwprophet.3494/ - internal class SElfReader : FileFormatStream + public class SElfReader : FileFormatStream { public override string DefaultFilename => "libil2cpp.so"; diff --git a/Il2CppInspector.Common/FileFormatStreams/UBReader.cs b/Il2CppInspector.Common/FileFormatStreams/UBReader.cs index 200bd6b..0f2721f 100644 --- a/Il2CppInspector.Common/FileFormatStreams/UBReader.cs +++ b/Il2CppInspector.Common/FileFormatStreams/UBReader.cs @@ -9,7 +9,7 @@ using NoisyCowStudios.Bin2Object; namespace Il2CppInspector { - internal class UBReader : FileFormatStream + public class UBReader : FileFormatStream { private FatHeader header; diff --git a/Il2CppInspector.Common/FileFormatStreams/WordConversions.cs b/Il2CppInspector.Common/FileFormatStreams/WordConversions.cs index 21089bb..9663e1f 100644 --- a/Il2CppInspector.Common/FileFormatStreams/WordConversions.cs +++ b/Il2CppInspector.Common/FileFormatStreams/WordConversions.cs @@ -10,7 +10,7 @@ namespace Il2CppInspector { // NOTE: What we really should have done here is add a TWord type parameter to FileFormatReader // then we could probably avoid most of this - interface IWordConverter where TWord : struct + public interface IWordConverter where TWord : struct { TWord Add(TWord a, TWord b); TWord Sub(TWord a, TWord b); @@ -25,7 +25,7 @@ namespace Il2CppInspector uint[] UIntArray(TWord[] a); } - internal class Convert32 : IWordConverter + public class Convert32 : IWordConverter { public uint Add(uint a, uint b) => a + b; public uint Sub(uint a, uint b) => a - b; @@ -40,7 +40,7 @@ namespace Il2CppInspector public uint[] UIntArray(uint[] a) => a; } - internal class Convert64 : IWordConverter + public class Convert64 : IWordConverter { public ulong Add(ulong a, ulong b) => a + b; public ulong Sub(ulong a, ulong b) => a - b;