Skip to content

Instantly share code, notes, and snippets.

@jocopa3
jocopa3 / Enity.h
Last active June 28, 2016 06:04
Entity structure in 0.15.0
struct Entity
{
DWORD_PTR vtablePointer; //0x0000
DWORD unkInt0; //0x0008 ?
Vec3 pos; //0x000C Position
Vec3 oldPos; //0x0018 Old Position?
Vec3 somePos; //0x0024 Old Old Position?
Vec3 vel; //0x0030 Velocity
Vec2 rot; //0x003C Rotation
Vec2 oldRot; //0x0044 Rotation Old?
/*
This exports vtable entry symbols to a file.
Run this in the IDA Script Command window (File->Script Command...)
Each vtable segment in the output file is separated by an empty line.
*/
#include <idc.idc>
static getPointerAddress(loc)
@jocopa3
jocopa3 / TextureMod.cpp
Last active March 8, 2016 15:07
Reroutes any attempts made by Minecraft Win10 to access resources/textures to a folder in AppData
#include <Windows.h>
#include <atlbase.h>
#include <Shlobj.h>
#include <string>
#include "MinHook.h"
std::wstring MINECRAFT_LOCAL_PATH;
// Hooks a function at a given address given the hook function and trampoline function
BOOL setHook(LPVOID* origAddress, LPVOID* hookFunction, LPVOID* trampFunction)
@jocopa3
jocopa3 / HookByName.cpp
Last active March 4, 2016 19:51
Added extra check
#include <Windows.h>
#include <iostream>
#include "MinHook.h"
// Hooks a function at a given address given the hook function and trampoline function
BOOL setHook(LPVOID* origAddress, LPVOID* hookFunction, LPVOID* trampFunction)
{
if (MH_CreateHook(origAddress, hookFunction, reinterpret_cast<LPVOID*>(trampFunction)) != MH_OK)
{
return FALSE;
#include <Windows.h>
#include <stdint.h>
#include <Psapi.h>
#include "MinHook.h"
// Base address
static uintptr_t BaseAddress;
HANDLE process;
uintptr_t SlideAddress(uintptr_t offset) {
return BaseAddress + offset;