Skip to content

Instantly share code, notes, and snippets.

View hLunaaa's full-sized avatar
💤
Sleeping

hLunaaa

💤
Sleeping
View GitHub Profile
@hLunaaa
hLunaaa / cpuid_rdtsc.hpp
Last active April 17, 2025 19:17
vm cpu detection via cpuid and rdtsc
#include <iostream>
#include <thread>
static constexpr u32 dynamic_cycles = 10,
standard_sleep = 500,
vm_cycle_ratio = 100,
cycle_ratio = 75;
// -- rdtsc --
// https://github.com/hfiref0x/VBoxHardenedLoader
@hLunaaa
hLunaaa / ia32e.hpp
Last active April 24, 2025 14:29
complete IA-32e paging for vtop
#pragma once
//
// https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.pdf
//
union virt_addr_t
{
struct
{