Skip to content

Instantly share code, notes, and snippets.

Fiddling with emulation/patching between schoolwork.

Max Thomas shinyquagsire23

Fiddling with emulation/patching between schoolwork.
Block or report user

Report or block shinyquagsire23

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
shinyquagsire23 /
Last active Jun 18, 2019
Python script for verifying ELF aboot images
#!/usr/bin/env python2
import struct
import sys
import hashlib
from pyasn1_modules import rfc2437,rfc2459
from pyasn1.codec.der import decoder
from pyasn1.codec.native import encoder
shinyquagsire23 / tbv_extract.c
Created May 7, 2019
TBV package extraction for Lionel Train Town
View tbv_extract.c
#include <stdint.h>
#include <stdio.h>
struct pkx_header
uint32_t magic1;
uint32_t magic2;
uint32_t magic3;
uint32_t type;
uint32_t comp_size;
shinyquagsire23 / assist_dec.txt
Last active Jan 6, 2019
lua vs lua2cpp vs luac vs nrooooooo tokens
View assist_dec.txt
function <?:27,31> (25 instructions at 0x563b8aad94d0)
0 params, 17 slots, 1 upvalue, 0 locals, 7 constants, 0 functions
1 [-] GETTABUP 0 0 -1 ; - "sv_animcmd"
2 [-] GETTABLE 0 0 -2 ; "is_excute"
3 [-] CALL 0 1 2
4 [-] TEST 0 0
5 [-] JMP 0 19 ; to 25
6 [-] GETTABUP 0 0 -1 ; - "sv_animcmd"
8 [-] LOADK 1 -4 ; 85833409598
shinyquagsire23 / ida_pseudocode.txt
Created Jan 6, 2019
nrooooooo convergence/divergence test: multiple ifs and if..else
View ida_pseudocode.txt
lib::L2CValue::L2CValue((lib::L2CValue *)&v21, 1);
lib::L2CAgent::clear_lua_stack((lib::L2CAgent *)v2);
lib::L2CAgent::push_lua_stack((lib::L2CAgent *)v2, (const lib::L2CValue *)&v21);
v4 = *(_QWORD *)(v2 + 8);
lib::L2CValue::as_number((lib::L2CValue *)&v21);
lib::L2CAgent::pop_lua_stack((L2CValue *)&v20, (lib::L2CAgent *)v2, 1);
lib::L2CValue::~L2CValue((lib::L2CValue *)&v20);
lib::L2CValue::~L2CValue((lib::L2CValue *)&v21);
lib::L2CAgent::clear_lua_stack((lib::L2CAgent *)v2);
shinyquagsire23 / main.c
Last active Dec 23, 2018
iPod 'Photo Database' extraction
View main.c
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <uchar.h>
#include <png.h>
typedef struct section
uint32_t magic;
uint32_t size;
View dell.dump.json
shinyquagsire23 /
Last active Oct 28, 2018
Windows Mixed Reality Calibration Decryption
import struct
random_garbage = [0x2F, 0xC8, 0x0F, 0x38, 0xDD, 0x00, 0xF6, 0x5C, 0xA1, 0x31, 0xEF, 0xF1, 0xEA, 0x6F, 0xA0,
0xF8, 0x26, 0xB5, 0x9B, 0x39, 0xCF, 0x3A, 0x88, 0xC8, 0x2E, 0x17, 0xC0, 0x63, 0x5B, 0x46, 0x27, 0xBB, 0x98,
0x2F, 0x0E, 0x2A, 0x90, 0x4B, 0x28, 0x2D, 0x82, 0x76, 0xE5, 0x28, 0x72, 0x50, 0x8A, 0xF0, 0xBF, 0x84, 0x54,
0x3B, 0xA8, 0x77, 0x91, 0xCE, 0x87, 0x80, 0x53, 0x2F, 0x07, 0xAD, 0x1B, 0x3F, 0x8C, 0x67, 0x33, 0x2E, 0xEB,
0x6A, 0x2A, 0x52, 0x77, 0x7C, 0x1F, 0x02, 0x11, 0x9E, 0x2A, 0x59, 0x5C, 0x94, 0x0E, 0x4F, 0xF5, 0x44, 0x54,
0x01, 0xE7, 0x8F, 0x66, 0xF0, 0xAD, 0x68, 0x71, 0x3C, 0x6D, 0x2E, 0x1C, 0xE3, 0x11, 0x46, 0xF7, 0x7F, 0x02,
0x6C, 0x15, 0xA0, 0x10, 0xEE, 0x3B, 0x14, 0xAE, 0x6C, 0xA7, 0x3F, 0xAF, 0x83, 0x6A, 0xD7, 0x12, 0x88, 0x53,
0xFE, 0xEB, 0x5C, 0x78, 0x85, 0xAF, 0x1F, 0x80, 0x7F, 0xB6, 0xDA, 0x7C, 0x0E, 0x84, 0xB5, 0x02, 0x8E, 0x92,
shinyquagsire23 /
Last active Dec 14, 2018
import struct
import os
contents = open("resource.RFH", "rb").read()
blob_f = open("resource.RFD", "rb")
def huff_decompress(data):
bits = 0
node = struct.unpack("<H", data[4:6])[0]
decomp = ""
if [ "$1" = "" ]
echo "Usage: thumb <input file> {output file}"
if [ "$2" = "" ]
View ardsitest.cpp
// Compile with g++ -lusb-1.0 ardsitest.cpp
#ifdef WIN32
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <cstring>
#include <libusb-1.0/libusb.h>
You can’t perform that action at this time.