Skip to content
Permalink
Browse files

Consistant formatting (nothing notable)

  • Loading branch information...
StudentBlake committed Jul 8, 2018
1 parent f8bd3a6 commit b371f2170258d0a098d685b472ccc4b56a31d7b3
@@ -16,5 +16,5 @@
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("206c6c47-87b1-477f-b6e6-f7e7c1a92f8f")]
[assembly: AssemblyFileVersion("1.2.3.0")]
[assembly: AssemblyVersion("1.2.3.0")]
[assembly: AssemblyFileVersion("1.2.4.0")]
[assembly: AssemblyVersion("1.2.4.0")]
@@ -18,18 +18,17 @@ View contents of XCI files and more!

Main Tab Metadata/Cert/Trimming | Partitions Tab NCA Extract/Hash Check
:-------------------------:|:-------------------------:
![main](https://imgur.com/NdYOcgW.jpg) | ![partitions](https://imgur.com/ehPoPWB.jpg)
![main](https://imgur.com/tO5oPq4.jpg) | ![partitions](https://imgur.com/U7FpWr2.jpg)

## Build Instructions
* Open `XCI Explorer.sln`
* Build -> Build Solution
* Add hactool.exe + dependencies + keys.txt to `XCI-Explorer/bin/Debug/` folder
* Run `XCI-Explorer.exe`
* Open **XCI Explorer.sln**
* Change *Debug* to *Release* in the dropdown menu
* Go to *Build*, then *Build Solution*
* Extract **hactool.zip** to `XCI-Explorer/bin/Release/` folder
* Run **XCI-Explorer.exe**

## Special Thanks
klks - CARD2, Hash Validation, bug fixes

## Disclaimer
This is not my original work. I just decompiled the executable and made minor changes.

I am NOT a developer and this has NOT been extensively tested!
This is not my original work. I just made minor changes with the help of others.
@@ -1,157 +1,125 @@
using System;
using System.IO;

namespace XCI_Explorer.Helpers
{
public class BetterBinaryReader : IDisposable
{
public string FileName;

public bool Initiated;

public Stream Stream;

private BinaryReader br;

public BetterBinaryReader()
{
Initiated = false;
}

public BetterBinaryReader(string file)
{
Initiated = false;
Load(file);
}

public BetterBinaryReader(Stream s)
{
Initiated = false;
FileName = "";
Stream = s;
br = new BinaryReader(Stream);
}

public void Dispose()
{
Initiated = false;
br.Close();
br = null;
Stream.Close();
Stream = null;
}

public void Load(string file)
{
FileName = file;
Stream = new FileStream(file, FileMode.Open);
br = new BinaryReader(Stream);
Initiated = true;
}

public void Seek(long o)
{
if (o > -1)
{
Stream.Seek(o, SeekOrigin.Begin);
}
}

public void Skip(long o)
{
Stream.Seek(o, SeekOrigin.Current);
}

public long Position()
{
return Stream.Position;
}

public int Read()
{
return br.ReadBytes(1)[0];
}

public int Read(byte[] buffer, int index, int count)
{
return br.Read(buffer, index, count);
}

public int Read(char[] buffer, int index, int count)
{
return br.Read(buffer, index, count);
}

public byte[] ReadBytes(int l)
{
if (l >= 0 && l <= 2147483647)
{
return br.ReadBytes(l);
}
return new byte[0];
}

public Stream ReadBytesButLonger(long l)
{
MemoryStream memoryStream = new MemoryStream();
for (long num = 0L; num < l; num++)
{
}
Console.WriteLine(memoryStream.Length);
return memoryStream;
}

public string ReadCharsAsString(int l)
{
return new string(br.ReadChars(l));
}

public short ReadShort()
{
return br.ReadInt16();
}

public short ReadInt16()
{
return br.ReadInt16();
}

public int ReadInt()
{
return br.ReadInt32();
}

public int ReadInt32()
{
return br.ReadInt32();
}

public long ReadLong()
{
return br.ReadInt64();
}

public long ReadInt64()
{
return br.ReadInt64();
}

public string ReadString()
{
return br.ReadString();
}

private long GreatestDivisor(long n)
{
long result = 0L;
for (long num = 1L; num < n / 64; num++)
{
if (n % num == 0L && num != n)
{
result = num;
}
}
return result;
}
}
namespace XCI_Explorer.Helpers {
public class BetterBinaryReader : IDisposable {
public string FileName;
public bool Initiated;
public Stream Stream;
private BinaryReader br;

public BetterBinaryReader() {
Initiated = false;
}

public BetterBinaryReader(string file) {
Initiated = false;
Load(file);
}

public BetterBinaryReader(Stream s) {
Initiated = false;
FileName = "";
Stream = s;
br = new BinaryReader(Stream);
}

public void Dispose() {
Initiated = false;
br.Close();
br = null;
Stream.Close();
Stream = null;
}

public void Load(string file) {
FileName = file;
Stream = new FileStream(file, FileMode.Open);
br = new BinaryReader(Stream);
Initiated = true;
}

public void Seek(long o) {
if (o > -1) {
Stream.Seek(o, SeekOrigin.Begin);
}
}

public void Skip(long o) {
Stream.Seek(o, SeekOrigin.Current);
}

public long Position() {
return Stream.Position;
}

public int Read() {
return br.ReadBytes(1)[0];
}

public int Read(byte[] buffer, int index, int count) {
return br.Read(buffer, index, count);
}

public int Read(char[] buffer, int index, int count) {
return br.Read(buffer, index, count);
}

public byte[] ReadBytes(int l) {
if (l >= 0 && l <= 2147483647) {
return br.ReadBytes(l);
}
return new byte[0];
}

public Stream ReadBytesButLonger(long l) {
MemoryStream memoryStream = new MemoryStream();
for (long num = 0L; num < l; num++) {
}
Console.WriteLine(memoryStream.Length);
return memoryStream;
}

public string ReadCharsAsString(int l) {
return new string(br.ReadChars(l));
}

public short ReadShort() {
return br.ReadInt16();
}

public short ReadInt16() {
return br.ReadInt16();
}

public int ReadInt() {
return br.ReadInt32();
}

public int ReadInt32() {
return br.ReadInt32();
}

public long ReadLong() {
return br.ReadInt64();
}

public long ReadInt64() {
return br.ReadInt64();
}

public string ReadString() {
return br.ReadString();
}

private long GreatestDivisor(long n) {
long result = 0L;
for (long num = 1L; num < n / 64; num++) {
if (n % num == 0L && num != n) {
result = num;
}
}
return result;
}
}
}
@@ -1,17 +1,14 @@
using System.Windows.Forms;

namespace XCI_Explorer.Helpers
{
public class BetterTreeNode : TreeNode
{
namespace XCI_Explorer.Helpers {
public class BetterTreeNode : TreeNode {
public long Offset;
public long Size;
public string ExpectedHash;
public string ActualHash;
public long HashedRegionSize;

public BetterTreeNode(string t)
{
public BetterTreeNode(string t) {
base.Text = t;
}
}
Oops, something went wrong.

0 comments on commit b371f21

Please sign in to comment.
You can’t perform that action at this time.