Skip to content

Instantly share code, notes, and snippets.

@barncastle
barncastle / BrawlhallaDumper.zip
Last active November 19, 2023 04:11
Code for decrypting Blue Mammoth Games' Brawlhalla's SWZ files
@barncastle
barncastle / NeopetsPak.cs
Created August 28, 2022 20:05
Code for reading Neopets Java Mobile game's PAK files
using System;
using System.Collections.Generic;
using System.IO;
public class NeopetsPak
{
private static readonly HashSet<int> MidiFiles = new HashSet<int>
{
58, 57, 56, 49, 55
};
@barncastle
barncastle / ABA.cs
Last active November 13, 2023 10:28
Code for decrypting Pokémon HOME v2.0 Unity AssetBundles
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Text;
namespace ConsoleAppFramework
{
public static class ABA
{
@barncastle
barncastle / tex2dds.cpp
Last active September 21, 2023 09:18
Ghostbusters TEX converter by Jonathan Wilson - Fixed
/* Ghostbusters texture converter
Copyright 2010 Jonathan Wilson
The Ghostbusters texture converter is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version. See the file COPYING for more details.
*/
#include <stdio.h>
#include <string.h>
@barncastle
barncastle / Encryption.java
Last active August 1, 2023 14:37
Encryption logic from Joey For Reddit with all credentials
import javax.crypto.*;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.security.*;
import java.security.spec.InvalidKeySpecException;
import com.qiniu.util.Base64; // https://github.com/qiniu/java-sdk/blob/master/src/main/java/com/qiniu/util/Base64.java
class Scratch {
@barncastle
barncastle / MultiSimConverter.cs
Last active February 6, 2023 07:54
A tool to convert MultiSim project files between their uncompressed XML format and their compressed MS14/EWPRJ format
///
/// This code is licensed under the terms of the MIT license
///
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
namespace MultiSimConverter
@barncastle
barncastle / SoundSettings.cs
Last active November 12, 2022 02:49
Code for parsing TMNT: Shredder's Revenge's SoundSettings and SFXData files
// Paris.Engine.SoundSettings
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
public class SoundSettings
{
public GlobalSoundSettings Settings;
public List<SoundChannel> Channels = new List<SoundChannel>();
public List<SoundGroupInfo> SoundGroups = new List<SoundGroupInfo>();
@barncastle
barncastle / WoWMatrixCard.cs
Created July 27, 2022 15:00
C# re-implementation of the WoW Matrix Card 2FA system available from TBC (2.0.0.5991)
class WoWMatrixCard
{
public uint Width = 8; // SECURITYMATRIX_NUM_COLUMNS in SecurityMatrix.lua, default of 8
public uint Height = 10; // SECURITYMATRIX_NUM_ROWS in SecurityMatrix.lua, default of 10
public uint DigitCount = 2; // SECURITYMATRIX_NUM_MIN_DIGITS in SecurityMatrix.lua, default of 2
public uint ChallengeCount; // number of cells/rounds to be completed
public ulong Seed;
public uint[] Coordinates;
private readonly byte[] _IPad = new byte[0x40];
@barncastle
barncastle / DinoKingExtractor.zip
Last active October 14, 2022 16:39
File extraction and decompression for Sega's Dinosaur King for Naomi
@barncastle
barncastle / CookieRunDJBF.cs
Last active September 30, 2022 13:27
Code for decrypting Cookie Run Kakao DBJ files
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
namespace ConsoleAppFramework
{
public unsafe class CookieRunDJBF
{
private static readonly byte[] Key = new byte[]