> Windows Syscalls

Direct syscall generator

Generate direct syscall stubs in C, ASM, Rust, Nim and Go. Hell's Gate, Halo's Gate and SysWhispers-style.

nt-allocate-virtual-memory-ssn-hardcoded.c
// NtAllocateVirtualMemory — direct syscall stub
// Technique: SSN hardcoded (GCC/MinGW inline asm)
// SSN: 0x18 (winserver-2025)
// For defensive research, CTF and authorized red-team use only.

#include <windows.h>
#include <winternl.h>

extern NTSTATUS NtAllocateVirtualMemory(
    HANDLE         ProcessHandle,
    PVOID*         BaseAddress,
    ULONG_PTR      ZeroBits,
    PSIZE_T        RegionSize,
    ULONG          AllocationType,
    ULONG          Protect
);

__asm__(
    ".globl NtAllocateVirtualMemory\n"
    "NtAllocateVirtualMemory:\n"
    "    mov r10, rcx\n"
    "    mov eax, 0x18\n"
    "    syscall\n"
    "    ret\n"
);

// NOTE: MSVC has no x64 inline asm. Put the stub in a separate .asm file
//       and assemble with ml64 instead.

Generated stubs are for defensive research, CTF and authorized red-team use only.