Skip to content

Instantly share code, notes, and snippets.

View heinermann's full-sized avatar
😺
Hello

Adam Heinermann heinermann

😺
Hello
View GitHub Profile
@heinermann
heinermann / Decompress.cpp
Last active March 6, 2024 14:22 — forked from ogarvey/Decompress.cpp
Decompiled Tetris Decompress method
#define g_p_BOLTcursor (*(byte **)(unaff_A5 + -0x15f0))
#define g_BOLT_bytes_available (*(int *)(unaff_A5 + -0x15f8))
#define NEXT_BYTE(r) nBytesAvailable--;\
if (nBytesAvailable < 0) { NextBlock(); pData = g_p_BOLTcursor; nBytesAvailable = g_BOLT_bytes_available; }\
r = *pData++;
byte * Decompress(byte *pResult, uint result_filesize, ushort flags)
{
@heinermann
heinermann / memcpyIP.c
Last active September 19, 2016 04:03 — forked from MichaelNecio/memcpyIP.c
Problem of the Week 1, What's up with compilers?
#include <string.h>
#include <stdio.h>
#include <stdint.h>
int main() {
uint32_t ip;
scanf("%u", &ip);
uint8_t octets[4];