Skip to content

Instantly share code, notes, and snippets.

View alpozcan's full-sized avatar

Alp alpozcan

View GitHub Profile
import numpy as np
from scipy.special import expit as sigmoid
import torch
from torch import nn
def forget_gate(x, h, Weights_hf, Bias_hf, Weights_xf, Bias_xf, prev_cell_state):
forget_hidden = np.dot(Weights_hf, h) + Bias_hf
forget_eventx = np.dot(Weights_xf, x) + Bias_xf
return np.multiply( sigmoid(forget_hidden + forget_eventx), prev_cell_state )

Unity IL2CPP Reverse Engineering

Unity games are fun.

Modding them is more fun.

Most unity games ship as "Mono". This means .NET IL code is right there for your viewing pleasure and makes for one of the easiest modding experience you can have (outside of official mod support).

Recently, many Unity games have been shipping with "IL2CPP" which optimizes out the "just in time" compilation with actual compilation. This process makes the game perform better for the player, but it also obfuscates game code meaning we have less information to work with when attempting to reverse engineer. This document describes the process of reverse engineering a Unity game built with IL2CPP despite the limitations. Keep in mind the best process for reverse engineering will change as Unity Engine evolves and the tools available change, and so this may become outdated.