Skip to content

Instantly share code, notes, and snippets.

View mrsteyk's full-sized avatar
💔

Александр Герман mrsteyk

💔
  • Russia
View GitHub Profile
@mmozeiko
mmozeiko / MagicRingBuffer.h
Last active March 12, 2025 23:56
Magic RingBuffer for Windows, Linux and macOS
#pragma once
//
// Magic Ring Buffer
// https://gist.github.com/mmozeiko/3b09a340f3c53e5eaed699a1aea95250
//
// Sets up memory mapping so the same memory block follows itself in virtual address space:
//
// [abcd...xyz][abc...xyz]
//
@hfiref0x
hfiref0x / enetech_new.c
Created August 12, 2020 12:26
EneTech newest variant (May 2020) unlock, (app+dll)
#include <windows.h>
#include <cstdio>
#include "ntos.h"
#define WINIO_DEVICE_TYPE (DWORD)0x8010
#define WINIO_MAP_FUNCID (DWORD)0x810
#define WINIO_UNMAP_FUNCID (DWORD)0x811
#define IOCTL_WINIO_MAP_USER_PHYSICAL_MEMORY \