Skip to content

Instantly share code, notes, and snippets.

@AmJayden
AmJayden / reconstructor.py
Created December 27, 2023 23:09
File and function name reconstructor for Wizard101, part of an https://advance.engineer/ article.
import idaapi
import idautils
import idc
class Reconstructor:
def __init__(self, debug_assert_fn):
# The following code iterates over all xrefs to `debug_assert` and if the xref is within a function, maps the start address of the function to the xref's address.
# This is okay and works even if `debug_assert` is called multiple times in the function because the function will always only have one name and file path.
referencing_fns = {
fn.start_ea: x.frm
@AmJayden
AmJayden / ud.hpp
Last active June 1, 2022 08:43
C++20 UM utils library
// now moved to https://github.com/AmJayden/udlib/
#pragma once
#include <optional>
#include <string>
#include <vector>
#include <array>
#include <algorithm>
#include <string_view>
#include <fstream>
@AmJayden
AmJayden / rot.hpp
Last active February 19, 2022 03:04
Compile time C++20 rot library
#pragma once
#include <algorithm>
#include <string>
namespace rott
{
namespace details
{
template <std::size_t sz>
struct comp_string
@AmJayden
AmJayden / logger.hpp
Created February 7, 2022 00:58
C++ ostream logger
#pragma once
#include <iostream>
#include <ctime>
#include <string>
#include <format>
#include <source_location>
namespace logger
{
namespace time