Skip to content

Instantly share code, notes, and snippets.

Brick 0x1F9F1

Block or report user

Report or block 0x1F9F1

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
@0x1F9F1
0x1F9F1 / read_bndb_snapshot.py
Created Feb 14, 2019
Convert a bndb snapshot to json
View read_bndb_snapshot.py
import struct
import json
if True:
import lzf # pip install python-lzf
else:
import ctypes
class lzf:
_lzf_dll = ctypes.CDLL('lzf.dll')
@0x1F9F1
0x1F9F1 / unpack_ce_trainer.py
Last active May 30, 2020
Unpack Cheat Engine Trainer
View unpack_ce_trainer.py
import zlib
import struct
import base64
import json
import os
import xml.etree.ElementTree as ET
ce_base85_char_map = dict(zip(
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%()*+,-./:;=?@[]^_{}',
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~'
@0x1F9F1
0x1F9F1 / bin2hex.cpp
Created Dec 9, 2018
SIMD Accelerated bytes to hex string
View bin2hex.cpp
#include <immintrin.h> // SSE
#include <emmintrin.h> // SSE2
#include <tmmintrin.h> // SSSE3
alignas(16) static constexpr const char hex_chars[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
void bin2hex(const byte* src, char* dst, size_t num) noexcept
{
if (num >= 8)
{
View clean_bndb.py
import sqlite3
import contextlib
import os
import sys
def clean_binja_snapshots(conn, limit = 1):
with conn as cur:
for section in [ 'snapshot', 'file_data' ]:
cur.execute(f'DELETE FROM {section} WHERE id NOT IN (SELECT id FROM {section} ORDER BY id DESC LIMIT ?)', (limit,))
View FindModule.cpp
#include <Windows.h>
#include <TlHelp32.h>
#include <functional>
typedef struct _UNICODE_STRING
{
USHORT Length;
USHORT MaximumLength;
PWSTR Buffer;
View ReadModStatic.cs
public static int GfxFVFOffset(int fvfFlags, int a2)
{
int result = 0;
if (a2 != 0x2)
{
result += 12;
if (a2 != 0x10)
{
@0x1F9F1
0x1F9F1 / scoped_seh.h
Last active Sep 12, 2018
A raii based SEH to C++ exception translater
View scoped_seh.h
#pragma once
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <stdexcept>
#include <cstdio>
class scoped_seh
{
View mem.h
/*
Copyright 2018 Brick
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
@0x1F9F1
0x1F9F1 / ArchiveReader.cs
Last active Nov 8, 2017
Midtown Madness Archive Reader
View ArchiveReader.cs
using System;
using System.Text;
using System.IO;
using System.Linq;
using System.IO.Compression;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading.Tasks;
public class MMArchiveHelper
You can’t perform that action at this time.