Skip to content

Instantly share code, notes, and snippets.

@x1nixmzeng
x1nixmzeng / rs3Unscramble.c
Created July 3, 2012 16:44
The XOR function used in Z3Ex.dll
void rs3Unscramble( char *srcBuffer, DWORD srcSize, DWORD xorkey )
{
// Unscramble the 32-bit blocks
DWORD dBlocks = srcSize >> 2;
while( dBlocks )
{
DWORD tmp;
tmp = *(DWORD *)srcBuffer; // read 32-bit value
@x1nixmzeng
x1nixmzeng / gist:3716476
Created September 13, 2012 18:29
My Delphi code to parse all known GunZ replay/recording files
function gzrClass.ReadGzrPlayers( gzrFile: TMemoryStream ): gzreplayState;
const
GZR_OWNER : byte = 1;
var
i : uint32;
tmpName : array[0..31] of char;
charFlag : byte;
begin
Result := GZR_SUCCESS;
@x1nixmzeng
x1nixmzeng / prelen.bt
Last active July 31, 2021 20:43
Binary template for reading strings of known or unknown length
//--------------------------------------
//--- 010 Editor v5.0.0 Binary Template
//
// File: prelen.bt
// Author: x1nixmzeng/WRS
// Revision: v1.03
// Purpose: Reading strings of known length
// History
// v1.03 Added optional STR_ENCODING macro to specify the charset
// used to format the template results
@x1nixmzeng
x1nixmzeng / alien-isolation-bml.bt
Last active May 29, 2017 23:52
First Alien Isolation BML work
// superseeded by https://github.com/x1nixmzeng/AlienBML
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//--------------------------------------
//--- 010 Editor v5.0 Binary Template
//--- Author: WRS (xentax.com)
// Types ----
// annoyingly we can't pass a structure with a local string
@x1nixmzeng
x1nixmzeng / conker_caff_xbox.cc
Last active November 29, 2019 20:06
Conker
#include <cstdio>
typedef signed char s8;
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
u8 default_rbm[384] = {
0x43, 0x41, 0x46, 0x46, 0x32, 0x38, 0x2E, 0x30, 0x31, 0x2E, 0x30, 0x35, 0x2E, 0x30, 0x30, 0x33,
0x31, 0x00, 0x00, 0x00, 0x50, 0x5D, 0xC9, 0x02, 0x7A, 0x01, 0x00, 0x00, 0xF2, 0x01, 0x00, 0x00,
@x1nixmzeng
x1nixmzeng / IESv2.bt
Created January 25, 2015 01:25
IES binary template
//--------------------------------------
//--- 010 Editor v5.0 Binary Template
//
// File: IESv2.bt
// Author: WRS
// Revision: 2
// Purpose: IES Database Parser
//--------------------------------------
#include "prelen.bt"
@x1nixmzeng
x1nixmzeng / kl_loc.bt
Created April 11, 2015 14:06
Kane And Lynch LOC Binary Template
//--------------------------------------
//--- 010 Editor v5.0 Binary Template
//
// File: kl_loc.bt
// Author: x1nixmzeng/WRS
// Revision: 1
// Purpose: KaneAndLynch LOC files
//--------------------------------------
//////////////////////////////////////////////
@x1nixmzeng
x1nixmzeng / UnityPackedFont.bt
Last active July 31, 2021 20:43
Unity packed font binary template
//--------------------------------------
//--- 010 Editor v5.0 Binary Template
//--------------------------------------
// Unity binary font atlas format
// Documented by WRS
//--------------------------------------
struct UnityFontAtlas
{
uint unknown_0[2];
@x1nixmzeng
x1nixmzeng / Grabbed by the Ghoulies - Hashes.md
Created September 11, 2015 22:52
List of hashed resource names used in Grabbed by the Ghoulies (Xbox)

GTBG Hashes

Most non-BNL filenames are stored as hashes for Grabbed by the Ghoulies.

This is the case for the following directories:

  • demand/*
  • font/*
  • loctext/language/*
  • movie/*
@x1nixmzeng
x1nixmzeng / the_witness_mo.bt
Created January 28, 2016 00:01
The Witness MO format
//--------------------------------------
//--- 010 Editor v5.0 Binary Template
//
// File: the_witness_mo.bt
// Author: WRS
// Revision: 1
// Purpose: The Witness MO files
//--------------------------------------
uint magic; // ?? 2500072158