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
shinyquagsire23 / aboot-verify.py
Last active Jun 18, 2019
Python script for verifying ELF aboot images
View aboot-verify.py
#!/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
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
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"
7 [-] GETTABLE 0 0 -3 ; "LANDING_EFFECT"
8 [-] LOADK 1 -4 ; 85833409598
@shinyquagsire23
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);
app::sv_animcmd::frame();
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
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
{"CalibrationInformation":{"Cameras":[{"Intrinsics":{"ModelParameterCount":15,"ModelParameters":[0.5056072473526001,0.51121383905410767,0.41733670234680176,0.55639612674713135,0.536751925945282,0.49938720464706421,0.0064958259463310242,0.79876220226287842,0.56841433048248291,0.07316143810749054,0.00090526352869346738,-0.00026460731169208884,4.882114808424376E-5,-0.00015969532250892371,2.7959318161010742],"ModelType":"CALIBRATION_LensDistortionModelRational6KT"},"Location":"CALIBRATION_CameraLocationHT0","Purpose":"CALIBRATION_CameraPurposeHeadTracking","MetricRadius":2.7959318161010742,"Rt":{"Rotation":[1,0,0,0,1,0,0,0,1],"Translation":[0,0,0]},"SensorHeight":480,"SensorWidth":640,"Shutter":"CALIBRATION_ShutterTypeUndefined","ThermalAdjustmentParams":{"Params":[0,0,0,0,0,0,0,0,0,0,0,0]}},{"Intrinsics":{"ModelParameterCount":15,"ModelParameters":[0.49853116273880005,0.49842718243598938,0.41769698262214661,0.55702918767929077,0.54305106401443481,0.81650543212890625,0.0025251691695302725,0.79530555009841919,0.92
@shinyquagsire23
shinyquagsire23 / wmr-dec.py
Last active Oct 28, 2018
Windows Mixed Reality Calibration Decryption
View wmr-dec.py
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
shinyquagsire23 / rf-extract.py
Last active Dec 14, 2018
LEGO LOCO RFH/RFD unpacker
View rf-extract.py
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 = ""
View thumb.sh
#!/bin/bash
if [ "$1" = "" ]
then
echo "Usage: thumb <input file> {output file}"
exit
fi
if [ "$2" = "" ]
then
output=${1%.asm}.bin
View ardsitest.cpp
// Compile with g++ -lusb-1.0 ardsitest.cpp
#ifdef WIN32
#include <windows.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <cstring>
#include <libusb-1.0/libusb.h>
You can’t perform that action at this time.