From 29fd63665aef8c54638a25f7f7714b6b44481a72 Mon Sep 17 00:00:00 2001
From: WindowsAPI <82195276+WindowsAPI@users.noreply.github.com>
Date: Sat, 27 Sep 2025 14:07:54 -0700
Subject: [PATCH 01/32] improve format for resolver functions
---
SysCaller/Wrapper/src/Resolver/Resolver.cpp | 113 ++++++++++++++------
1 file changed, 82 insertions(+), 31 deletions(-)
diff --git a/SysCaller/Wrapper/src/Resolver/Resolver.cpp b/SysCaller/Wrapper/src/Resolver/Resolver.cpp
index 3e79089..d980995 100644
--- a/SysCaller/Wrapper/src/Resolver/Resolver.cpp
+++ b/SysCaller/Wrapper/src/Resolver/Resolver.cpp
@@ -1,18 +1,19 @@
#if defined(SYSCALLER_DIRECT)
-#pragma message("SysCaller: Building via DIRECT syscall mode!")
+#pragma message("SysCaller: Building via DIRECT syscall mode")
#elif defined(SYSCALLER_INDIRECT)
-#pragma message("SysCaller: Building via INDIRECT syscall mode!")
+#pragma message("SysCaller: Building via INDIRECT syscall mode")
#elif defined(SYSCALLER_INLINE)
-#pragma message("SysCaller: Building via INLINE ASM syscall mode!")
+#pragma message("SysCaller: Building via INLINE ASM syscall mode")
#else
-#pragma message("SysCaller: No build mode specified, defaulting to DIRECT!")
+#pragma message("SysCaller: No build mode specified, defaulting to DIRECT")
#endif
#if defined(SYSCALLER_BINDINGS)
-#pragma message("SysCaller: Building with BINDINGS support! (DLL export)")
+#pragma message("SysCaller: Building with BINDINGS support (DLL export)")
#endif
#ifdef SYSCALLER_INDIRECT
+// Indirect syscall mode,include resolver implementation
#include "../../include/Resolver/Resolver.h"
#include
#include
@@ -25,99 +26,149 @@ static std::unordered_map syscallCache;
static HMODULE ntdllHandle = NULL;
static BOOL resolverInitialized = FALSE;
-HMODULE GetNtdllHandle() {
- if (ntdllHandle == NULL) {
+HMODULE GetNtdllHandle()
+{
+ if (ntdllHandle == NULL)
+ {
ntdllHandle = GetModuleHandleA("ntdll.dll");
- if (ntdllHandle == NULL) {
+
+ if (ntdllHandle == NULL)
+ {
ntdllHandle = LoadLibraryA("ntdll.dll");
}
}
+
return ntdllHandle;
}
-DWORD ExtractSyscallNumber(LPVOID functionAddress) {
- if (functionAddress == NULL) {
+DWORD ExtractSyscallNumber(LPVOID functionAddress)
+{
+ if (functionAddress == NULL)
+ {
return 0;
}
+
BYTE* bytes = (BYTE*)functionAddress;
- for (int i = 0; i < 64; i++) {
- if (bytes[i] == 0xB8) {
+
+ for (int i = 0; i < 64; i++)
+ {
+ if (bytes[i] == 0xB8)
+ {
DWORD syscallNumber = *(DWORD*)(&bytes[i + 1]);
- if (syscallNumber <= 0xFFFF) {
+
+ if (syscallNumber <= 0xFFFF)
+ {
return syscallNumber;
}
}
}
+
return 0;
}
-std::unordered_map ExtractSyscallsFromDll() {
+std::unordered_map ExtractSyscallsFromDll()
+{
std::unordered_map syscallNumbers;
HMODULE hNtdll = GetNtdllHandle();
- if (!hNtdll) {
+
+ if (!hNtdll)
+ {
return syscallNumbers;
}
+
PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER)hNtdll;
- if (dosHeader->e_magic != IMAGE_DOS_SIGNATURE) {
+
+ if (dosHeader->e_magic != IMAGE_DOS_SIGNATURE)
+ {
return syscallNumbers;
}
+
PIMAGE_NT_HEADERS ntHeaders = (PIMAGE_NT_HEADERS)((BYTE*)hNtdll + dosHeader->e_lfanew);
- if (ntHeaders->Signature != IMAGE_NT_SIGNATURE) {
+
+ if (ntHeaders->Signature != IMAGE_NT_SIGNATURE)
+ {
return syscallNumbers;
}
- if (ntHeaders->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress == 0) {
+
+ if (ntHeaders->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress == 0)
+ {
return syscallNumbers;
}
- PIMAGE_EXPORT_DIRECTORY exportDir = (PIMAGE_EXPORT_DIRECTORY)((BYTE*)hNtdll +
+
+ PIMAGE_EXPORT_DIRECTORY exportDir = (PIMAGE_EXPORT_DIRECTORY)((BYTE*)hNtdll +
ntHeaders->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress);
+
DWORD* functions = (DWORD*)((BYTE*)hNtdll + exportDir->AddressOfFunctions);
DWORD* names = (DWORD*)((BYTE*)hNtdll + exportDir->AddressOfNames);
WORD* ordinals = (WORD*)((BYTE*)hNtdll + exportDir->AddressOfNameOrdinals);
- for (DWORD i = 0; i < exportDir->NumberOfNames; i++) {
+
+ for (DWORD i = 0; i < exportDir->NumberOfNames; i++)
+ {
const char* funcName = (const char*)((BYTE*)hNtdll + names[i]);
- if (strncmp(funcName, "Nt", 2) != 0 && strncmp(funcName, "Zw", 2) != 0) {
+
+ if (strncmp(funcName, "Nt", 2) != 0 && strncmp(funcName, "Zw", 2) != 0)
+ {
continue;
}
+
DWORD funcRVA = functions[ordinals[i]];
- LPVOID funcAddress = (LPVOID)((BYTE*)hNtdll + funcRVA);
+ LPVOID funcAddress = (LPVOID)((BYTE*)hNtdll + funcRVA);
DWORD syscallNumber = ExtractSyscallNumber(funcAddress);
- if (syscallNumber > 0 && syscallNumber <= 0xFFFF) {
+
+ if (syscallNumber > 0 && syscallNumber <= 0xFFFF)
+ {
syscallNumbers[funcName] = syscallNumber;
}
}
+
return syscallNumbers;
}
-BOOL InitializeResolver() {
- if (resolverInitialized) {
+BOOL InitializeResolver()
+{
+ if (resolverInitialized)
+ {
return TRUE;
}
+
syscallCache = ExtractSyscallsFromDll();
- if (syscallCache.empty()) {
+
+ if (syscallCache.empty())
+ {
return FALSE;
}
+
resolverInitialized = TRUE;
return TRUE;
}
-DWORD GetSyscallNumber(const char* functionName) {
- if (!resolverInitialized) {
- if (!InitializeResolver()) {
+DWORD GetSyscallNumber(const char* functionName)
+{
+ if (!resolverInitialized)
+ {
+ if (!InitializeResolver())
+ {
return 0;
}
}
+
auto it = syscallCache.find(functionName);
- if (it != syscallCache.end()) {
+
+ if (it != syscallCache.end())
+ {
return it->second;
}
+
return 0;
}
-void CleanupResolver() {
+void CleanupResolver()
+{
syscallCache.clear();
resolverInitialized = FALSE;
}
#else
+// Not in indirect mode file compiles to nothing
#pragma message("SysCaller: Resolver.cpp skipped (SYSCALLER_INDIRECT not defined)")
#endif
From 47ffbb82bdde28ad55cf7656e208c52daa1feab9 Mon Sep 17 00:00:00 2001
From: WindowsAPI
Date: Sun, 28 Sep 2025 11:17:35 -0700
Subject: [PATCH 02/32] replace c++ style comments with c-style comments
'//' is used for optional/temporary code while '/* */' is used for actual comments.
---
.../Integrity/Verification/Verification.h | 2 +-
.../Direct/Encryption/DirectEncryptor.h | 12 +-
.../ControlFlow/IndirectControlFlow.h | 10 +-
.../Indirect/Encryptor/IndirectEncryptor.h | 12 -
.../Indirect/Stub/IndirectStubGenerator.h | 10 +-
Bind/resource.h | 2 +-
.../Integrity/Compatibility/Compatibility.cpp | 14 +-
.../Core/Integrity/Validator/Validator.cpp | 14 +-
.../Integrity/Verification/Verification.cpp | 32 +-
.../Direct/Encryption/DirectEncryptor.cpp | 4 +-
.../Direct/Mapping/DirectStubMapper.cpp | 16 +-
.../Direct/Stub/DirectJunkGenerator.cpp | 8 +-
.../ControlFlow/IndirectControlFlow.cpp | 48 +-
.../Indirect/Stub/IndirectJunkGenerator.cpp | 8 +-
Bind/src/Core/Obfuscation/Obfuscation.cpp | 24 +-
Bind/src/Core/Utils/Utils.cpp | 6 +-
Bind/src/GUI/Bars/StatusBar.cpp | 8 +-
Bind/src/GUI/Dialogs/ChangelogDialog.cpp | 2 +-
Bind/src/GUI/Dialogs/HashCompareDialog.cpp | 22 +-
Bind/src/GUI/Settings/Tabs/GeneralTab.cpp | 2 +-
Default/sysFunctions.h | 26 +-
Default/sysFunctions_k.h | 12 +-
README.md | 6 +-
SysCaller/Wrapper/include/Resolver/Resolver.h | 2 +-
SysCaller/Wrapper/include/Sys/sysConstants.h | 40 +-
SysCaller/Wrapper/include/Sys/sysExternals.h | 542 ++++-----
SysCaller/Wrapper/include/Sys/sysTypes.h | 196 ++--
SysCaller/Wrapper/include/syscaller.h | 166 +--
SysCaller/Wrapper/include/syscaller_config.h | 6 +-
SysCaller/Wrapper/src/DLL/dllmain.cpp | 16 +-
SysCaller/Wrapper/src/Resolver/Resolver.cpp | 3 +-
SysCaller/Wrapper/src/build_info.cpp | 6 +-
.../Wrapper/include/SysK/sysConstants_k.h | 41 +-
.../Wrapper/include/SysK/sysExternals_k.h | 1037 +++++++++--------
SysCallerK/Wrapper/include/SysK/sysTypes_k.h | 849 +++++++-------
SysCallerK/Wrapper/include/syscaller_k.h | 2 +-
SysCallerK/Wrapper/src/dummy.c | 2 +-
37 files changed, 1590 insertions(+), 1618 deletions(-)
delete mode 100644 Bind/include/Core/Obfuscation/Indirect/Encryptor/IndirectEncryptor.h
diff --git a/Bind/include/Core/Integrity/Verification/Verification.h b/Bind/include/Core/Integrity/Verification/Verification.h
index f90ec58..d54b238 100644
--- a/Bind/include/Core/Integrity/Verification/Verification.h
+++ b/Bind/include/Core/Integrity/Verification/Verification.h
@@ -55,7 +55,7 @@ class Verification : public QObject {
QString returnType;
int parameterCount;
QStringList errors;
- QList> typeDefinitions; // type, source_file
+ QList> typeDefinitions; /* type, source_file */
};
class TypeDefinitionTracker {
diff --git a/Bind/include/Core/Obfuscation/Direct/Encryption/DirectEncryptor.h b/Bind/include/Core/Obfuscation/Direct/Encryption/DirectEncryptor.h
index fa4498d..90ceaa8 100644
--- a/Bind/include/Core/Obfuscation/Direct/Encryption/DirectEncryptor.h
+++ b/Bind/include/Core/Obfuscation/Direct/Encryption/DirectEncryptor.h
@@ -10,11 +10,11 @@
namespace DirectObfuscation {
enum class EncryptionMethod {
- BasicXOR = 1, // simple XOR encryption
- MultiKeyXOR = 2, // multi key XOR encryption
- AddXORCombo = 3, // addition + XOR combination
- EnhancedXOR = 4, // enhanced XOR with larger keys
- OffsetShifting = 5 // offset shifting/masking
+ BasicXOR = 1, /* simple XOR encryption */
+ MultiKeyXOR = 2, /* multi key XOR encryption */
+ AddXORCombo = 3, /* addition + XOR combination */
+ EnhancedXOR = 4, /* enhanced XOR with larger keys */
+ OffsetShifting = 5 /* offset shifting/masking */
};
inline QString encryptionMethodToString(EncryptionMethod method) {
@@ -34,7 +34,7 @@ namespace DirectObfuscation {
if (str.contains("add", Qt::CaseInsensitive) || str.contains("combo", Qt::CaseInsensitive)) return EncryptionMethod::AddXORCombo;
if (str.contains("enhanced", Qt::CaseInsensitive)) return EncryptionMethod::EnhancedXOR;
if (str.contains("offset", Qt::CaseInsensitive) || str.contains("shifting", Qt::CaseInsensitive)) return EncryptionMethod::OffsetShifting;
- return EncryptionMethod::BasicXOR; // default
+ return EncryptionMethod::BasicXOR;
}
class Encryptor {
diff --git a/Bind/include/Core/Obfuscation/Indirect/ControlFlow/IndirectControlFlow.h b/Bind/include/Core/Obfuscation/Indirect/ControlFlow/IndirectControlFlow.h
index 35786da..cadbc68 100644
--- a/Bind/include/Core/Obfuscation/Indirect/ControlFlow/IndirectControlFlow.h
+++ b/Bind/include/Core/Obfuscation/Indirect/ControlFlow/IndirectControlFlow.h
@@ -9,10 +9,10 @@
namespace IndirectObfuscation {
enum class ControlFlowPattern {
- RegisterBased = 0, // register based opaque predicate
- ValueBased = 1, // value based opaque predicate
- FlagBased = 2, // flag based opaque predicate
- MixedJunkCode = 3 // mixed junk code with opaque predicate
+ RegisterBased = 0, /* register based opaque predicate */
+ ValueBased = 1, /* value based opaque predicate */
+ FlagBased = 2, /* flag based opaque predicate */
+ MixedJunkCode = 3 /* mixed junk code with opaque predicate */
};
inline QString controlFlowPatternToString(ControlFlowPattern pattern) {
@@ -29,7 +29,7 @@ namespace IndirectObfuscation {
if (str == "value") return ControlFlowPattern::ValueBased;
if (str == "flag") return ControlFlowPattern::FlagBased;
if (str == "mixed") return ControlFlowPattern::MixedJunkCode;
- return ControlFlowPattern::RegisterBased; // default
+ return ControlFlowPattern::RegisterBased;
}
class ControlFlow {
diff --git a/Bind/include/Core/Obfuscation/Indirect/Encryptor/IndirectEncryptor.h b/Bind/include/Core/Obfuscation/Indirect/Encryptor/IndirectEncryptor.h
deleted file mode 100644
index 706bbb0..0000000
--- a/Bind/include/Core/Obfuscation/Indirect/Encryptor/IndirectEncryptor.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#pragma once
-
-#include
-#include
-
-namespace IndirectObfuscation {
-
- class Encryptor {
- public:
- static QString generateEncryptedSyscallNumbers();
- };
-}
diff --git a/Bind/include/Core/Obfuscation/Indirect/Stub/IndirectStubGenerator.h b/Bind/include/Core/Obfuscation/Indirect/Stub/IndirectStubGenerator.h
index 3d27d7f..0d04ece 100644
--- a/Bind/include/Core/Obfuscation/Indirect/Stub/IndirectStubGenerator.h
+++ b/Bind/include/Core/Obfuscation/Indirect/Stub/IndirectStubGenerator.h
@@ -8,10 +8,10 @@
namespace IndirectObfuscation {
enum class ResolverCallMethod {
- RegisterPointer = 0, // register pointer call via R10
- StackIndirect = 1, // stack indirect call (16 byte aligned)
- StackScratch = 2, // stack scratch space indirect call
- RegisterShuffle = 3 // register shuffle call via R10
+ RegisterPointer = 0, /* register pointer call via R10 */
+ StackIndirect = 1, /* stack indirect call (16 byte aligned) */
+ StackScratch = 2, /* stack scratch space indirect call */
+ RegisterShuffle = 3 /* register shuffle call via R10 */
};
inline QString resolverCallMethodToString(ResolverCallMethod method) {
@@ -28,7 +28,7 @@ namespace IndirectObfuscation {
if (str == "stack") return ResolverCallMethod::StackIndirect;
if (str == "indirect") return ResolverCallMethod::StackScratch;
if (str == "shuffle") return ResolverCallMethod::RegisterShuffle;
- return ResolverCallMethod::RegisterPointer; // default
+ return ResolverCallMethod::RegisterPointer;
}
class StubGenerator {
diff --git a/Bind/resource.h b/Bind/resource.h
index c0c6f67..4685b18 100644
--- a/Bind/resource.h
+++ b/Bind/resource.h
@@ -3,4 +3,4 @@
#define IDI_ICON1 101
-#endif // RESOURCE_H
+#endif /* RESOURCE_H */
diff --git a/Bind/src/Core/Integrity/Compatibility/Compatibility.cpp b/Bind/src/Core/Integrity/Compatibility/Compatibility.cpp
index a82696d..b7ad804 100644
--- a/Bind/src/Core/Integrity/Compatibility/Compatibility.cpp
+++ b/Bind/src/Core/Integrity/Compatibility/Compatibility.cpp
@@ -126,15 +126,15 @@ QList Compatibility::readSyscalls(const QString& asm
if (vMatch.hasMatch())
{
- QString prefix = vMatch.captured(1); // "Sys", "SysK", or "SysInline"
- QString namePart = vMatch.captured(2); // the actual function name
- QString versionPart = vMatch.captured(3); // the version letter
+ QString prefix = vMatch.captured(1); /* "Sys", "SysK", or "SysInline" */
+ QString namePart = vMatch.captured(2); /* the actual function name */
+ QString versionPart = vMatch.captured(3); /* the version letter */
baseName = prefix + namePart;
if (!versionPart.isEmpty())
{
- // convert letter to version number A=2, B=3, C=4, etc
+ /* convert letter to version number A=2, B=3, C=4, etc */
version = versionPart.at(0).toLatin1() - 'A' + 2;
}
else
@@ -332,7 +332,7 @@ void Compatibility::validateSyscalls(const QString& asmFile, const QStringList&
for (const SyscallInfo& syscall : syscalls)
{
int version = syscall.version;
- int dllIndex = (version == 1) ? 0 : (version - 1); // version 1 = table 0, version 2 = table 1, etc.
+ int dllIndex = (version == 1) ? 0 : (version - 1); /* version 1 = table 0, version 2 = table 1, etc. */
qDebug() << QString("Debug: Checking Syscall '%1' (version %2) against Table %3")
.arg(syscall.name).arg(version).arg(dllIndex);
@@ -346,7 +346,7 @@ void Compatibility::validateSyscalls(const QString& asmFile, const QStringList&
QMap syscallNumbers = syscallTables[dllIndex];
- // remove version suffix for DLL lookup
+ /* remove version suffix for DLL lookup */
QString baseName = syscall.baseName;
QString expectedName;
@@ -374,7 +374,7 @@ void Compatibility::validateSyscalls(const QString& asmFile, const QStringList&
}
int actualOffset = syscallNumbers.value(expectedName, 0);
- // check for duplicates only within same table
+ /* check for duplicates only within same table */
bool isDuplicate = false;
QString dupType, dupWith;
diff --git a/Bind/src/Core/Integrity/Validator/Validator.cpp b/Bind/src/Core/Integrity/Validator/Validator.cpp
index 7612291..33d406f 100644
--- a/Bind/src/Core/Integrity/Validator/Validator.cpp
+++ b/Bind/src/Core/Integrity/Validator/Validator.cpp
@@ -320,7 +320,7 @@ void Validator::updateSyscalls(const QString& asmFile, const QMap>& syscallTab
if (inlineAssemblyMode && syscallName.startsWith("SysInline"))
{
- // convert back to Sys prefix for checking against selectedSyscalls
+ /* convert back to Sys prefix for checking against selectedSyscalls */
checkName = "Sys" + syscallName.mid(9);
}
else if (indirectAssemblyMode && syscallName.startsWith("SysIndirect"))
{
- // convert back to Sys prefix for checking against selectedSyscalls
+ /* convert back to Sys prefix for checking against selectedSyscalls */
checkName = "Sys" + syscallName.mid(11);
}
@@ -887,7 +887,7 @@ void Validator::updateHeaderFile(const QMap>& syscallTab
.arg(funcName) + Colors::ENDC());
continue;
}
- // add non versioned functions for table 0
+ /* add non versioned functions for table 0 */
if (syscallTables.contains(0))
{
QMap table0 = syscallTables[0];
@@ -926,7 +926,7 @@ void Validator::updateHeaderFile(const QMap>& syscallTab
}
}
- // add versioned functions for additional tables
+ /* add versioned functions for additional tables */
for (int tableIdx = 1; tableIdx < numTables; ++tableIdx)
{
if (!syscallTables.contains(tableIdx))
diff --git a/Bind/src/Core/Integrity/Verification/Verification.cpp b/Bind/src/Core/Integrity/Verification/Verification.cpp
index c434500..52eb3f0 100644
--- a/Bind/src/Core/Integrity/Verification/Verification.cpp
+++ b/Bind/src/Core/Integrity/Verification/Verification.cpp
@@ -142,7 +142,7 @@ void Verification::TypeDefinitionTracker::parseHeaderFiles()
typeDefinitions.insert(name, def);
}
}
- // parse comma types
+ /* parse comma types */
QRegularExpression commaRegex(R"(}\s*(\w+),\s*\*\s*(\w+);)");
QRegularExpressionMatchIterator commaMatches = commaRegex.globalMatch(content);
@@ -164,7 +164,7 @@ void Verification::TypeDefinitionTracker::parseHeaderFiles()
def2.definition = QString("typedef %1* %2").arg(baseType).arg(ptrType);
typeDefinitions.insert(ptrType, def2);
}
- // parse pointer types
+ /* parse pointer types */
QRegularExpression ptrRegex(R"(typedef\s+(?:struct\s+)?(?:_)?(\w+)\s*\*\s*(\w+);)");
QRegularExpressionMatchIterator ptrMatches = ptrRegex.globalMatch(content);
@@ -181,7 +181,7 @@ void Verification::TypeDefinitionTracker::parseHeaderFiles()
def.definition = QString("typedef %1* %2").arg(baseType).arg(ptrType);
typeDefinitions.insert(ptrType, def);
}
- // parse basic types
+ /* parse basic types */
QRegularExpression basicRegex(R"(typedef\s+(?:struct\s+)?(?:_)?(\w+)\s+(\w+);)");
QRegularExpressionMatchIterator basicMatches = basicRegex.globalMatch(content);
@@ -198,7 +198,7 @@ void Verification::TypeDefinitionTracker::parseHeaderFiles()
def.definition = QString("typedef %1 %2").arg(baseType).arg(newType);
typeDefinitions.insert(newType, def);
}
- // parse structs
+ /* parse structs */
QRegularExpression structRegex(R"(typedef\s+struct\s+(?:_)?(\w+)\s*\{[^}]+\}\s*(\w+)\s*,\s*\*\s*(\w+);)");
QRegularExpressionMatchIterator structMatches = structRegex.globalMatch(content);
@@ -220,7 +220,7 @@ void Verification::TypeDefinitionTracker::parseHeaderFiles()
def2.definition = QString("typedef %1* %2").arg(structName).arg(ptrName);
typeDefinitions.insert(ptrName, def2);
}
- // parse enums
+ /* parse enums */
QRegularExpression enumRegex(R"(typedef\s+enum\s+(?:_)?(\w+)\s*\{[^}]+\}\s*(\w+);)");
QRegularExpressionMatchIterator enumMatches = enumRegex.globalMatch(content);
@@ -236,7 +236,7 @@ void Verification::TypeDefinitionTracker::parseHeaderFiles()
def.definition = match.captured(0);
typeDefinitions.insert(enumName, def);
}
- // parse function pointers
+ /* parse function pointers */
QRegularExpression funcPtrRegex(R"(typedef\s+\w+\s*\(\s*\w+\s*\*\s*(\w+)\s*\)\s*\([^)]*\))");
QRegularExpressionMatchIterator funcPtrMatches = funcPtrRegex.globalMatch(content);
@@ -252,7 +252,7 @@ void Verification::TypeDefinitionTracker::parseHeaderFiles()
def.definition = QString("typedef function_ptr %1").arg(typeName);
typeDefinitions.insert(typeName, def);
}
- // parse const pointer types
+ /* parse const pointer types */
QRegularExpression constPtrRegex(R"(typedef\s+const\s+(\w+)\s*\*\s*(\w+);)");
QRegularExpressionMatchIterator constPtrMatches = constPtrRegex.globalMatch(content);
@@ -269,7 +269,7 @@ void Verification::TypeDefinitionTracker::parseHeaderFiles()
def.definition = QString("typedef const %1* %2").arg(baseType).arg(newType);
typeDefinitions.insert(newType, def);
}
- // parse WNF types
+ /* parse WNF types */
QRegularExpression wnfRegex(R"(typedef\s+(?:const\s+)?(?:struct\s+)?_?(\w+)\s*(?:\*\s*)?(\w+)(?:\s*,\s*\*\s*(\w+))?;)");
QRegularExpressionMatchIterator wnfMatches = wnfRegex.globalMatch(content);
@@ -698,13 +698,13 @@ std::optional Verification::getOffsetFromDll(const QString& syscallName, co
{
auto* verification = static_cast(N);
- // safety check for the callback parameters
+ /* safety check for the callback parameters */
if (!verification || fn.empty())
{
return 0;
}
- // use a safer string conversion
+ /* use a safer string conversion */
QString funcName;
try
@@ -721,11 +721,11 @@ std::optional Verification::getOffsetFromDll(const QString& syscallName, co
return 0;
}
- // get function RVA (addr is VA, subtract image base to get RVA)
+ /* get function RVA (addr is VA, subtract image base to get RVA) */
uint32_t funcRVA = static_cast(addr - verification->imageBase);
uint32_t fileOffset = 0;
- // safety check for RVA calculation
+ /* safety check for RVA calculation */
if (addr < verification->imageBase)
{
return 0;
@@ -811,7 +811,7 @@ Verification::TestResult Verification::testSyscall(const SyscallDefinition& sysc
}
}
- // validate return type
+ /* validate return type */
QStringList validReturnTypes = {"NTSTATUS", "BOOL", "HANDLE", "VOID", "ULONG", "ULONG_PTR", "UINT32", "UINT64"};
if (!validReturnTypes.contains(syscall.returnType))
@@ -819,7 +819,7 @@ Verification::TestResult Verification::testSyscall(const SyscallDefinition& sysc
result.errors.append(QString("Unexpected return type: %1").arg(syscall.returnType));
}
- // validate parameters
+ /* validate parameters */
for (const Parameter& param : syscall.parameters)
{
if (!validateParameterType(param.type))
@@ -828,7 +828,7 @@ Verification::TestResult Verification::testSyscall(const SyscallDefinition& sysc
}
}
- // validate offset
+ /* validate offset */
QString offset = syscall.offset.toLower().replace("h", "");
bool ok;
int offsetValue = offset.toInt(&ok, 16);
@@ -854,7 +854,7 @@ Verification::TestResult Verification::testSyscall(const SyscallDefinition& sysc
result.errors.append(QString("Invalid Syscall Offset Format: %1").arg(syscall.offset));
}
- // check type definitions
+ /* check type definitions */
for (const Parameter& param : syscall.parameters)
{
std::optional typeInfo = typeTracker.checkType(param.type, isKernelMode);
diff --git a/Bind/src/Core/Obfuscation/Direct/Encryption/DirectEncryptor.cpp b/Bind/src/Core/Obfuscation/Direct/Encryption/DirectEncryptor.cpp
index a1ce626..588ae0d 100644
--- a/Bind/src/Core/Obfuscation/Direct/Encryption/DirectEncryptor.cpp
+++ b/Bind/src/Core/Obfuscation/Direct/Encryption/DirectEncryptor.cpp
@@ -79,7 +79,7 @@ QPair> DirectObfuscation::Encryptor::encryptOffset(
encryptionData["mask"] = mask;
break;
}
- default: // default to basic xor
+ default: /* default to basic xor */
{
int key = getRandomInt(0x11, 0xFF);
encryptedOffset = realOffset ^ key;
@@ -154,7 +154,7 @@ QStringList DirectObfuscation::Encryptor::generateDecryptionSequence(const QStri
sequence << QString(" sub eax, 0%1h\n").arg(mask, 0, 16);
break;
}
- default: // default to basic xor
+ default: /* default to basic xor */
{
int key = encryptionData["key"].toInt();
sequence << QString(" mov eax, dword ptr [%1]\n").arg(offsetName);
diff --git a/Bind/src/Core/Obfuscation/Direct/Mapping/DirectStubMapper.cpp b/Bind/src/Core/Obfuscation/Direct/Mapping/DirectStubMapper.cpp
index 7323f25..9f81276 100644
--- a/Bind/src/Core/Obfuscation/Direct/Mapping/DirectStubMapper.cpp
+++ b/Bind/src/Core/Obfuscation/Direct/Mapping/DirectStubMapper.cpp
@@ -209,10 +209,10 @@ bool DirectObfuscation::StubMapper::processAssemblyFile(const QString& asmPath,
QSet usedOffsets;
QSet usedOffsetNames;
- QMap offsetNameMap; // maps fake offset to random name
- QMap syscallMap; // maps original syscall to random name
- QMap syscallOffsets; // maps original syscall to its offset
- QMap realToFakeOffset; // maps real offset to fake offset
+ QMap offsetNameMap; /* maps fake offset to random name */
+ QMap syscallMap; /* maps original syscall to random name */
+ QMap syscallOffsets; /* maps original syscall to its offset */
+ QMap realToFakeOffset; /* maps real offset to fake offset */
QList> syscallStubs;
QStringList currentStub;
@@ -345,7 +345,7 @@ bool DirectObfuscation::StubMapper::processAssemblyFile(const QString& asmPath,
QStringList aliases;
bool enableControlFlow = settings->value("obfuscation/control_flow_enabled", false).toBool();
- QMap functionSuffixes; // store suffixes for each function
+ QMap functionSuffixes; /* store suffixes for each function */
if (enableControlFlow)
{
@@ -444,7 +444,7 @@ bool DirectObfuscation::StubMapper::processAssemblyFile(const QString& asmPath,
QString originalSyscall = stubPair.first;
QStringList stubLines = stubPair.second;
bool skipRest = false;
- QString functionSuffix; // store the random suffix for this function
+ QString functionSuffix; /* store the random suffix for this function */
if (enableControlFlow && functionSuffixes.contains(originalSyscall))
{
@@ -718,7 +718,7 @@ bool DirectObfuscation::StubMapper::updateHeaderFile(const QString& headerPath,
newHeaderContent << line;
continue;
}
- // preserve c++ guards and extern blocks
+ /* preserve c++ guards and extern blocks */
if (line.contains("#ifdef __cplusplus") ||
line.contains("extern \"C\"") ||
line.trimmed() == "{" ||
@@ -806,7 +806,7 @@ bool DirectObfuscation::StubMapper::updateHeaderFile(const QString& headerPath,
}
}
newHeaderContent << "";
- newHeaderContent << "// Syscall Name Mappings";
+ newHeaderContent << "/* Syscall Name Mappings */";
for (auto it = syscallMap.begin(); it != syscallMap.end(); ++it)
{
diff --git a/Bind/src/Core/Obfuscation/Direct/Stub/DirectJunkGenerator.cpp b/Bind/src/Core/Obfuscation/Direct/Stub/DirectJunkGenerator.cpp
index 1448720..f831c40 100644
--- a/Bind/src/Core/Obfuscation/Direct/Stub/DirectJunkGenerator.cpp
+++ b/Bind/src/Core/Obfuscation/Direct/Stub/DirectJunkGenerator.cpp
@@ -14,10 +14,10 @@ void DirectObfuscation::JunkGenerator::setSettings(QSettings* settings)
QString DirectObfuscation::JunkGenerator::generateJunkInstructions(int minInst, int maxInst, bool useAdvanced)
{
- // rcx, rdx, r8, r9 are function parameters, NEVER touch these!
- // rbx, rsi, rdi, r12 are used to save rcx, rdx, r8, r9, NEVER touch these!
- // r10 is used for function pointer, NEVER touch this!
- // so we can ONLY safely use: r11, r13, r14, r15, rax
+ /* rcx, rdx, r8, r9 are function parameters, NEVER touch these!
+ rbx, rsi, rdi, r12 are used to save rcx, rdx, r8, r9, NEVER touch these!
+ r10 is used for function pointer, NEVER touch this!
+ so we can ONLY safely use: r11, r13, r14, r15, rax */
if (!settings)
{
diff --git a/Bind/src/Core/Obfuscation/Indirect/ControlFlow/IndirectControlFlow.cpp b/Bind/src/Core/Obfuscation/Indirect/ControlFlow/IndirectControlFlow.cpp
index 673fd22..7ec2c35 100644
--- a/Bind/src/Core/Obfuscation/Indirect/ControlFlow/IndirectControlFlow.cpp
+++ b/Bind/src/Core/Obfuscation/Indirect/ControlFlow/IndirectControlFlow.cpp
@@ -26,54 +26,54 @@ QString IndirectObfuscation::ControlFlow::generateControlFlowObfuscation()
QStringList controlFlowPatterns = {
QString(" ; Opaque Predicate - Register Based\n"
- " test r11, r11\n" // r11 is always 0, so test sets ZF=1
- " jnz fake_branch_%1\n" // Never taken (ZF=1, so jnz fails)
+ " test r11, r11\n" /* r11 is always 0, so test sets ZF=1 */
+ " jnz fake_branch_%1\n" /* never taken (ZF=1, so jnz fails) */
" ; Real code continues here\n"
" jmp real_code_%1\n"
"fake_branch_%1:\n"
- " nop\n" // Dead code
- " xor r13, r13\n" // Dead code
- " add r14, 0\n" // Dead code
+ " nop\n" /* dead code */
+ " xor r13, r13\n" /* dead code */
+ " add r14, 0\n" /* dead code */
"real_code_%1:\n")
.arg(QRandomGenerator::global()->bounded(1000, 999999)),
QString(" ; Opaque Predicate - Value Based\n"
- " mov r15, 0\n" // Set r15 to 0
- " cmp r15, 1\n" // Compare 0 with 1 (always false)
- " je fake_branch_%1\n" // Never taken
+ " mov r15, 0\n" /* set r15 to 0 */
+ " cmp r15, 1\n" /* compare 0 with 1 (always false) */
+ " je fake_branch_%1\n" /* never taken */
" ; Real code continues here\n"
" jmp real_code_%1\n"
"fake_branch_%1:\n"
- " push r11\n" // Dead code
- " pop r11\n" // Dead code
- " test r13, r13\n" // Dead code
+ " push r11\n" /* dead code */
+ " pop r11\n" /* dead code */
+ " test r13, r13\n" /* dead code */
"real_code_%1:\n")
.arg(QRandomGenerator::global()->bounded(1000, 999999)),
QString(" ; Opaque Predicate - Flag Based\n"
- " clc\n" // Clear carry flag
- " jc fake_branch_%1\n" // Never taken (CF=0)
+ " clc\n" /* clear carry flag */
+ " jc fake_branch_%1\n" /* never taken (CF=0) */
" ; Real code continues here\n"
" jmp real_code_%1\n"
"fake_branch_%1:\n"
- " lea r11, [r11]\n" // Dead code
- " mov r13, r13\n" // Dead code
- " xchg r14, r14\n" // Dead code
+ " lea r11, [r11]\n" /* dead code */
+ " mov r13, r13\n" /* dead code */
+ " xchg r14, r14\n" /* dead code */
"real_code_%1:\n")
.arg(QRandomGenerator::global()->bounded(1000, 999999)),
QString(" ; Opaque Predicate - Mixed Junk Code\n"
- " xor r11, r11\n" // r11 = 0
- " or r11, 0\n" // r11 still = 0
- " test r11, r11\n" // Test 0 (always zero)
- " jnz fake_branch_%1\n" // Never taken
+ " xor r11, r11\n" /* r11 = 0 */
+ " or r11, 0\n" /* r11 still = 0 */
+ " test r11, r11\n" /* test 0 (always zero) */
+ " jnz fake_branch_%1\n" /* never taken */
" ; Real code continues here\n"
" jmp real_code_%1\n"
"fake_branch_%1:\n"
- " pushfq\n" // Dead code
- " popfq\n" // Dead code
- " fnop\n" // Dead code
- " pause\n" // Dead code
+ " pushfq\n" /* dead code */
+ " popfq\n" /* dead code */
+ " fnop\n" /* dead code */
+ " pause\n" /* dead code */
"real_code_%1:\n")
.arg(QRandomGenerator::global()->bounded(1000, 999999))
};
diff --git a/Bind/src/Core/Obfuscation/Indirect/Stub/IndirectJunkGenerator.cpp b/Bind/src/Core/Obfuscation/Indirect/Stub/IndirectJunkGenerator.cpp
index b916432..ebc8098 100644
--- a/Bind/src/Core/Obfuscation/Indirect/Stub/IndirectJunkGenerator.cpp
+++ b/Bind/src/Core/Obfuscation/Indirect/Stub/IndirectJunkGenerator.cpp
@@ -9,10 +9,10 @@ IndirectObfuscation::JunkGenerator::JunkGenerator(QSettings* settings)
QString IndirectObfuscation::JunkGenerator::generateRegisterSafeJunk()
{
- // rcx, rdx, r8, r9 are function parameters, NEVER touch these!
- // rbx, rsi, rdi, r12 are used to save rcx, rdx, r8, r9, NEVER touch these!
- // r10 is used for function pointer, NEVER touch this!
- // so we can ONLY safely use: r11, r13, r14, r15, rax
+ /* rcx, rdx, r8, r9 are function parameters, NEVER touch these!
+ rbx, rsi, rdi, r12 are used to save rcx, rdx, r8, r9, NEVER touch these!
+ r10 is used for function pointer, NEVER touch this!
+ so we can ONLY safely use: r11, r13, r14, r15, rax */
QStringList safeJunkInstructions = {
" nop\n",
diff --git a/Bind/src/Core/Obfuscation/Obfuscation.cpp b/Bind/src/Core/Obfuscation/Obfuscation.cpp
index 5481a68..cf381c3 100644
--- a/Bind/src/Core/Obfuscation/Obfuscation.cpp
+++ b/Bind/src/Core/Obfuscation/Obfuscation.cpp
@@ -208,10 +208,10 @@ bool Obfuscation::processAssemblyFile(const QString& asmPath, const QString& hea
QSet usedNames;
QSet usedOffsets;
QSet usedOffsetNames;
- QMap offsetNameMap; // maps fake offset to random name
- QMap syscallMap; // maps original syscall to random name
- QMap syscallOffsets; // maps original syscall to its offset
- QMap realToFakeOffset; // maps real offset to fake offset
+ QMap offsetNameMap; /* maps fake offset to random name */
+ QMap syscallMap; /* maps original syscall to random name */
+ QMap syscallOffsets; /* maps original syscall to its offset */
+ QMap realToFakeOffset; /* maps real offset to fake offset */
QList> syscallStubs;
QStringList currentStub;
QString currentSyscall;
@@ -290,7 +290,7 @@ bool Obfuscation::processAssemblyFile(const QString& asmPath, const QString& hea
QStringList publics;
QStringList aliases;
bool enableControlFlow = settings->value("obfuscation/control_flow_enabled", false).toBool();
- QMap functionSuffixes; // store suffixes for each function
+ QMap functionSuffixes; /* store suffixes for each function */
if (enableControlFlow)
{
@@ -371,8 +371,8 @@ bool Obfuscation::processAssemblyFile(const QString& asmPath, const QString& hea
{
QString originalSyscall = stubPair.first;
QStringList stubLines = stubPair.second;
- bool skipRest = false; // flag to skip lines after mov eax
- QString functionSuffix; // store the random suffix for this function
+ bool skipRest = false; /* flag to skip lines after mov eax */
+ QString functionSuffix; /* store the random suffix for this function */
if (enableControlFlow && functionSuffixes.contains(originalSyscall))
{
@@ -404,7 +404,7 @@ bool Obfuscation::processAssemblyFile(const QString& asmPath, const QString& hea
{
if (skipRest)
{
- // only process ENDP line when skipping
+ /* only process ENDP line when skipping */
if (originalLine.contains(" ENDP"))
{
QString line = originalLine;
@@ -434,7 +434,7 @@ bool Obfuscation::processAssemblyFile(const QString& asmPath, const QString& hea
}
newContent << line;
- skipRest = false; // reset the flag after processing ENDP
+ skipRest = false; /* reset the flag after processing ENDP */
}
continue;
@@ -482,7 +482,7 @@ bool Obfuscation::processAssemblyFile(const QString& asmPath, const QString& hea
QMap encryptionData = encryptionDataMap.value(offsetName);
line = stubGen.generateChunkedSequence(offsetName, encryptionData, static_cast(encryptionMethod));
newContent << line;
- skipRest = true; // skip original syscall/ret
+ skipRest = true; /* skip original syscall/ret */
continue;
}
}
@@ -730,7 +730,7 @@ bool Obfuscation::updateHeaderFile(const QString& headerPath,
continue;
}
- // preserve c++ guards and extern blocks
+ /* preserve c++ guards and extern blocks */
if (line.contains("#ifdef __cplusplus") || line.contains("extern \"C\"") ||
line.trimmed() == "{" || line.trimmed() == "}" || line.contains("#endif"))
{
@@ -818,7 +818,7 @@ bool Obfuscation::updateHeaderFile(const QString& headerPath,
}
newHeaderContent << "";
- newHeaderContent << "// Syscall Name Mappings";
+ newHeaderContent << "/* Syscall Name Mappings */";
for (auto it = syscallMap.begin(); it != syscallMap.end(); ++it)
{
diff --git a/Bind/src/Core/Utils/Utils.cpp b/Bind/src/Core/Utils/Utils.cpp
index 479a139..5431604 100644
--- a/Bind/src/Core/Utils/Utils.cpp
+++ b/Bind/src/Core/Utils/Utils.cpp
@@ -464,11 +464,11 @@ QVariantMap StubHashGenerator::generateStubHashes(const QString& asmFilePath,
{
QString stubCode = asmContent.mid(startPos, endPos - startPos);
- // generate MD5 hash
+ /* generate MD5 hash */
QByteArray md5Hash = QCryptographicHash::hash(stubCode.toUtf8(), QCryptographicHash::Md5);
QString md5Hex = md5Hash.toHex();
- // generate SHA256 hash
+ /* generate SHA256 hash */
QByteArray sha256Hash = QCryptographicHash::hash(stubCode.toUtf8(), QCryptographicHash::Sha256);
QString sha256Hex = sha256Hash.toHex();
@@ -579,7 +579,7 @@ QPair StubHashGenerator::saveStubHashes(const QVariantMap& stubHa
formattedOutput["stubs"] = formattedStubs;
- // generate build ID
+ /* generate build ID */
QStringList allHashes;
QStringList sortedSyscalls = stubs.keys();
std::sort(sortedSyscalls.begin(), sortedSyscalls.end());
diff --git a/Bind/src/GUI/Bars/StatusBar.cpp b/Bind/src/GUI/Bars/StatusBar.cpp
index cbdb81f..4508cfb 100644
--- a/Bind/src/GUI/Bars/StatusBar.cpp
+++ b/Bind/src/GUI/Bars/StatusBar.cpp
@@ -47,22 +47,22 @@ void StatusBar::updateStatus(const QString& message, const QString& statusType)
if (statusType == "working")
{
icon = "⏳";
- color = "#FFA500"; // orange
+ color = "#FFA500"; /* orange */
}
else if (statusType == "success")
{
icon = "✅";
- color = "#00FF00"; // green
+ color = "#00FF00"; /* green */
}
else if (statusType == "error")
{
icon = "❌";
- color = "#FF0000"; // red
+ color = "#FF0000"; /* red */
}
else
{
icon = "⏺";
- color = "#666666"; // gray
+ color = "#666666"; /* gray */
}
statusIcon->setText(icon);
diff --git a/Bind/src/GUI/Dialogs/ChangelogDialog.cpp b/Bind/src/GUI/Dialogs/ChangelogDialog.cpp
index 0798363..1f80c7b 100644
--- a/Bind/src/GUI/Dialogs/ChangelogDialog.cpp
+++ b/Bind/src/GUI/Dialogs/ChangelogDialog.cpp
@@ -24,7 +24,7 @@ ChangelogDialog::ChangelogDialog(QWidget* parent)
resize(1150, 600);
setWindowIcon(QIcon(":/src/Res/Icons/logo.ico"));
setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);
- // setAttribute(Qt::WA_TranslucentBackground);
+ /* setAttribute(Qt::WA_TranslucentBackground); */
setupStylesheet();
setupUI();
populateChangelogs();
diff --git a/Bind/src/GUI/Dialogs/HashCompareDialog.cpp b/Bind/src/GUI/Dialogs/HashCompareDialog.cpp
index 8826c10..fddc0cf 100644
--- a/Bind/src/GUI/Dialogs/HashCompareDialog.cpp
+++ b/Bind/src/GUI/Dialogs/HashCompareDialog.cpp
@@ -82,7 +82,7 @@ void HashCompareDialog::initUI()
splitter = new QSplitter(Qt::Horizontal);
- // left side, hash file list
+ /* left side, hash file list */
auto* leftPanel = new QGroupBox("Hash Files");
auto* leftLayout = new QVBoxLayout(leftPanel);
@@ -102,7 +102,7 @@ void HashCompareDialog::initUI()
leftLayout->addWidget(compareBtn);
splitter->addWidget(leftPanel);
- // right side, hash table
+ /* right side, hash table */
auto* rightPanel = new QGroupBox("Hash Comparison");
auto* rightLayout = new QVBoxLayout(rightPanel);
@@ -193,7 +193,7 @@ void HashCompareDialog::loadHashFiles()
filters << "stub_hashes_*.json";
QFileInfoList files = dir.entryInfoList(filters, QDir::Files);
- // sort files in reverse order (newest first)
+ /* sort files in reverse order (newest first) */
std::sort(files.begin(), files.end(), [](const QFileInfo& a, const QFileInfo& b)
{
return a.fileName() > b.fileName();
@@ -397,7 +397,7 @@ void HashCompareDialog::displayComparison(const QStringList& files)
hashTable->setHorizontalHeaderLabels(headers);
- // create hash mapping for duplicate detection
+ /* create hash mapping for duplicate detection */
QMap>> hashMapping;
QStringList sortedSyscalls = allSyscalls.values();
std::sort(sortedSyscalls.begin(), sortedSyscalls.end());
@@ -448,13 +448,13 @@ void HashCompareDialog::displayComparison(const QStringList& files)
{
QList duplicateColors =
{
- QColor(255, 150, 150), // red
- QColor(150, 255, 150), // green
- QColor(150, 150, 255), // blue
- QColor(255, 255, 150), // yellow
- QColor(255, 150, 255), // purple
- QColor(150, 255, 255), // cyan
- QColor(255, 200, 150), // orange
+ QColor(255, 150, 150), /* red */
+ QColor(150, 255, 150), /* green */
+ QColor(150, 150, 255), /* blue */
+ QColor(255, 255, 150), /* yellow */
+ QColor(255, 150, 255), /* purple */
+ QColor(150, 255, 255), /* cyan */
+ QColor(255, 200, 150), /* orange */
};
int colorIndex = 0;
diff --git a/Bind/src/GUI/Settings/Tabs/GeneralTab.cpp b/Bind/src/GUI/Settings/Tabs/GeneralTab.cpp
index c8da96a..a0b19d3 100644
--- a/Bind/src/GUI/Settings/Tabs/GeneralTab.cpp
+++ b/Bind/src/GUI/Settings/Tabs/GeneralTab.cpp
@@ -713,7 +713,7 @@ void GeneralTab::createBackupFiles()
}
catch (...)
{
- // backup creation failed but dont stop the operation
+ /* backup creation failed but dont stop the operation */
}
}
diff --git a/Default/sysFunctions.h b/Default/sysFunctions.h
index 0a78e48..157aee2 100644
--- a/Default/sysFunctions.h
+++ b/Default/sysFunctions.h
@@ -3,7 +3,7 @@
#include "sysTypes.h"
#include "sysExternals.h"
-#ifdef _WIN64 // Only compile on 64bit systems.
+#ifdef _WIN64 /* only compile on 64bit systems */
#ifdef __cplusplus
extern "C" {
@@ -558,7 +558,7 @@ NTSTATUS SCCommitEnlistment(
NTSTATUS SCCommitRegistryTransaction(
HANDLE RegistryTransactionHandle,
- ULONG Flags // Reserved
+ ULONG Flags /* reserved */
);
NTSTATUS SCCommitTransaction(
@@ -613,7 +613,7 @@ NTSTATUS SCContinue(
NTSTATUS SCContinueEx(
PCONTEXT ContextRecord,
- PVOID ContinueArgument // Can be PKCONTINUE_ARGUMENT or BOOLEAN
+ PVOID ContinueArgument /* can be PKCONTINUE_ARGUMENT or BOOLEAN */
);
NTSTATUS SCConvertBetweenAuxiliaryCounterAndPerformanceCounter(
@@ -1596,7 +1596,7 @@ NTSTATUS SCLoadKeyEx(
HANDLE Event OPTIONAL,
ACCESS_MASK DesiredAccess OPTIONAL,
PHANDLE RootHandle OPTIONAL,
- PVOID Reserved OPTIONAL // previously PIO_STATUS_BLOCK
+ PVOID Reserved OPTIONAL /* previously PIO_STATUS_BLOCK */
);
NTSTATUS SCLockFile(
@@ -1713,7 +1713,7 @@ NTSTATUS SCNotifyChangeDirectoryFile(
PIO_APC_ROUTINE ApcRoutine OPTIONAL,
PVOID ApcContext OPTIONAL,
PIO_STATUS_BLOCK IoStatusBlock,
- PVOID Buffer, // FILE_NOTIFY_INFORMATION
+ PVOID Buffer, /* FILE_NOTIFY_INFORMATION */
ULONG Length,
ULONG CompletionFilter,
BOOLEAN WatchTree
@@ -2398,7 +2398,7 @@ NTSTATUS SCQuerySecurityAttributesToken(
HANDLE TokenHandle,
PUNICODE_STRING Attributes,
ULONG NumberOfAttributes,
- PVOID Buffer, // PTOKEN_SECURITY_ATTRIBUTES_INFORMATION
+ PVOID Buffer, /* PTOKEN_SECURITY_ATTRIBUTES_INFORMATION */
ULONG Length,
PULONG ReturnLength
);
@@ -2446,7 +2446,7 @@ NTSTATUS SCQuerySystemEnvironmentValueEx(
PCGUID VendorGuid,
PVOID Buffer OPTIONAL,
PULONG BufferLength,
- PULONG Attributes OPTIONAL // EFI_VARIABLE_*
+ PULONG Attributes OPTIONAL /* EFI_VARIABLE_* */
);
NTSTATUS SCQuerySystemInformation(
@@ -2786,7 +2786,7 @@ NTSTATUS SCRollbackEnlistment(
NTSTATUS SCRollbackRegistryTransaction(
HANDLE RegistryTransactionHandle,
- ULONG Flags // Reserved
+ ULONG Flags /* reserved */
);
NTSTATUS SCRollbackTransaction(
@@ -3102,8 +3102,8 @@ NTSTATUS SCSetSystemEnvironmentValueEx(
PCUNICODE_STRING VariableName,
PCGUID VendorGuid,
PVOID Buffer OPTIONAL,
- ULONG BufferLength, // 0 = delete variable
- ULONG Attributes // EFI_VARIABLE_*
+ ULONG BufferLength, /* 0 = delete variable */
+ ULONG Attributes /* EFI_VARIABLE_* */
);
NTSTATUS SCSetSystemInformation(
@@ -3115,7 +3115,7 @@ NTSTATUS SCSetSystemInformation(
NTSTATUS SCSetSystemPowerState(
POWER_ACTION SystemAction,
SYSTEM_POWER_STATE LightestSystemState,
- ULONG Flags // POWER_ACTION_* flags
+ ULONG Flags /* POWER_ACTION_* flags */
);
NTSTATUS SCSetSystemTime(
@@ -3124,7 +3124,7 @@ NTSTATUS SCSetSystemTime(
);
NTSTATUS SCSetThreadExecutionState(
- EXECUTION_STATE NewFlags, // ES_* flags
+ EXECUTION_STATE NewFlags, /* ES_* flags */
EXECUTION_STATE * PreviousFlags
);
@@ -3246,7 +3246,7 @@ NTSTATUS SCSystemDebugControl(
NTSTATUS SCTerminateEnclave(
PVOID BaseAddress,
- ULONG Flags // TERMINATE_ENCLAVE_FLAG_*
+ ULONG Flags /* TERMINATE_ENCLAVE_FLAG_* */
);
NTSTATUS SCTerminateJobObject(
diff --git a/Default/sysFunctions_k.h b/Default/sysFunctions_k.h
index 096c709..cd48da1 100644
--- a/Default/sysFunctions_k.h
+++ b/Default/sysFunctions_k.h
@@ -4,7 +4,7 @@
#include "sysExternals_k.h"
#include "sysConstants_k.h"
-#ifdef _WIN64 // Only compile on 64bit systems.
+#ifdef _WIN64 /* only compile on 64bit systems */
#ifdef __cplusplus
extern "C" {
@@ -559,7 +559,7 @@ NTSTATUS SCCommitEnlistment(
NTSTATUS SCCommitRegistryTransaction(
HANDLE RegistryTransactionHandle,
- ULONG Flags // Reserved
+ ULONG Flags /* reserved */
);
NTSTATUS SCCommitTransaction(
@@ -614,7 +614,7 @@ NTSTATUS SCContinue(
NTSTATUS SCContinueEx(
PCONTEXT ContextRecord,
- PVOID ContinueArgument // Can be PKCONTINUE_ARGUMENT or BOOLEAN
+ PVOID ContinueArgument /* can be PKCONTINUE_ARGUMENT or BOOLEAN */
);
NTSTATUS SCConvertBetweenAuxiliaryCounterAndPerformanceCounter(
@@ -1714,7 +1714,7 @@ NTSTATUS SCNotifyChangeDirectoryFile(
PIO_APC_ROUTINE ApcRoutine OPTIONAL,
PVOID ApcContext OPTIONAL,
PIO_STATUS_BLOCK IoStatusBlock,
- PVOID Buffer, // FILE_NOTIFY_INFORMATION
+ PVOID Buffer, /* FILE_NOTIFY_INFORMATION */
ULONG Length,
ULONG CompletionFilter,
BOOLEAN WatchTree
@@ -2399,7 +2399,7 @@ NTSTATUS SCQuerySecurityAttributesToken(
HANDLE TokenHandle,
PUNICODE_STRING Attributes,
ULONG NumberOfAttributes,
- PVOID Buffer, // PTOKEN_SECURITY_ATTRIBUTES_INFORMATION
+ PVOID Buffer, /* PTOKEN_SECURITY_ATTRIBUTES_INFORMATION */
ULONG Length,
PULONG ReturnLength
);
@@ -3469,4 +3469,4 @@ NTSTATUS SCYieldExecution(VOID);
}
#endif
-#endif
+#endif
\ No newline at end of file
diff --git a/README.md b/README.md
index 3fe07d6..94a5341 100644
--- a/README.md
+++ b/README.md
@@ -208,13 +208,13 @@ To use SysCaller from C, C++, Rust, Python, Go, or any other language that suppo
```
3. **Call syscalls directly:**
```cpp
- // User mode example
+ /* User mode example */
NTSTATUS status = SysAllocateVirtualMemory(
processHandle, &baseAddress, 0, ®ionSize,
MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
```
```cpp
- // Kernel mode example
+ /* Kernel mode example */
NTSTATUS status = SysKAllocateVirtualMemory(
ZwCurrentProcess(), &base, 0, ®ionSize,
MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
@@ -310,4 +310,4 @@ SysCaller is licensed under the GNU General Public License v3.0. See [LICENSE](L
SysCaller — Bridging the gap between user mode and kernel mode
-
+
\ No newline at end of file
diff --git a/SysCaller/Wrapper/include/Resolver/Resolver.h b/SysCaller/Wrapper/include/Resolver/Resolver.h
index cc94903..744c907 100644
--- a/SysCaller/Wrapper/include/Resolver/Resolver.h
+++ b/SysCaller/Wrapper/include/Resolver/Resolver.h
@@ -27,4 +27,4 @@ void CleanupResolver();
#ifdef __cplusplus
}
-#endif
+#endif
\ No newline at end of file
diff --git a/SysCaller/Wrapper/include/Sys/sysConstants.h b/SysCaller/Wrapper/include/Sys/sysConstants.h
index 1bfd667..f7fd263 100644
--- a/SysCaller/Wrapper/include/Sys/sysConstants.h
+++ b/SysCaller/Wrapper/include/Sys/sysConstants.h
@@ -1,36 +1,32 @@
#pragma once
#define CM_EXTENDED_PARAMETER_TYPE_BITS 8
-// ADD THESE TO GITHUB LATER
#define PAGE_SIZE 0x1000
#define PAGE_MASK 0xFFF
#define PAGE_SHIFT 0xC
-
-#define PAGE_NOACCESS 0x01 // Disables all access to the committed region of pages. An attempt to read from, write to, or execute the committed region results in an access violation.
-#define PAGE_READONLY 0x02 // Enables read-only access to the committed region of pages. An attempt to write or execute the committed region results in an access violation.
-#define PAGE_READWRITE 0x04 // Enables read-only or read/write access to the committed region of pages.
-#define PAGE_WRITECOPY 0x08 // Enables read-only or copy-on-write access to a mapped view of a file mapping object.
-#define PAGE_EXECUTE 0x10 // Enables execute access to the committed region of pages. An attempt to write to the committed region results in an access violation.
-#define PAGE_EXECUTE_READ 0x20 // Enables execute or read-only access to the committed region of pages. An attempt to write to the committed region results in an access violation.
-#define PAGE_EXECUTE_READWRITE 0x40 // Enables execute, read-only, or read/write access to the committed region of pages.
-#define PAGE_EXECUTE_WRITECOPY 0x80 // Enables execute, read-only, or copy-on-write access to a mapped view of a file mapping object.
-#define PAGE_GUARD 0x100 // Pages in the region become guard pages. Any attempt to access a guard page causes the system to raise a STATUS_GUARD_PAGE_VIOLATION exception.
-#define PAGE_NOCACHE 0x200 // Sets all pages to be non-cachable. Applications should not use this attribute. Using interlocked functions with memory that is mapped with SEC_NOCACHE can result in an EXCEPTION_ILLEGAL_INSTRUCTION exception.
-#define PAGE_WRITECOMBINE 0x400 // Sets all pages to be write-combined. Applications should not use this attribute. Using interlocked functions with memory that is mapped with SEC_NOCACHE can result in an EXCEPTION_ILLEGAL_INSTRUCTION exception.
-#define PAGE_REVERT_TO_FILE_MAP 0x80000000 // Pages in the region can revert modified copy-on-write pages to the original unmodified page when using the mapped view of a file mapping object.
-#define PAGE_ENCLAVE_THREAD_CONTROL 0x80000000 // Pages in the region contain a thread control structure (TCS) from the Intel Software Guard Extensions programming model.
-#define PAGE_TARGETS_NO_UPDATE 0x40000000 // Pages in the region will not update the CFG bitmap when the protection changes. The default behavior for VirtualProtect is to mark all locations as valid call targets for CFG.
-#define PAGE_TARGETS_INVALID 0x40000000 // Pages in the region are excluded from the CFG bitmap as valid targets. Any indirect call to locations in those pages will terminate the process using the __fastfail intrinsic.
-#define PAGE_ENCLAVE_UNVALIDATED 0x20000000 // Pages in the region are excluded from measurement with the EEXTEND instruction of the Intel Software Guard Extensions programming model.
+#define PAGE_NOACCESS 0x01 /* Disables all access to the committed region of pages. An attempt to read from, write to, or execute the committed region results in an access violation. */
+#define PAGE_READONLY 0x02 /* Enables read-only access to the committed region of pages. An attempt to write or execute the committed region results in an access violation. */
+#define PAGE_READWRITE 0x04 /* Enables read-only or read/write access to the committed region of pages. */
+#define PAGE_WRITECOPY 0x08 /* Enables read-only or copy-on-write access to a mapped view of a file mapping object. */
+#define PAGE_EXECUTE 0x10 /* Enables execute access to the committed region of pages. An attempt to write to the committed region results in an access violation. */
+#define PAGE_EXECUTE_READ 0x20 /* Enables execute or read-only access to the committed region of pages. An attempt to write to the committed region results in an access violation. */
+#define PAGE_EXECUTE_READWRITE 0x40 /* Enables execute, read-only, or read/write access to the committed region of pages. */
+#define PAGE_EXECUTE_WRITECOPY 0x80 /* Enables execute, read-only, or copy-on-write access to a mapped view of a file mapping object. */
+#define PAGE_GUARD 0x100 /* Pages in the region become guard pages. Any attempt to access a guard page causes the system to raise a STATUS_GUARD_PAGE_VIOLATION exception. */
+#define PAGE_NOCACHE 0x200 /* Sets all pages to be non-cachable. Applications should not use this attribute. Using interlocked functions with memory that is mapped with SEC_NOCACHE can result in an EXCEPTION_ILLEGAL_INSTRUCTION exception. */
+#define PAGE_WRITECOMBINE 0x400 /* Sets all pages to be write-combined. Applications should not use this attribute. Using interlocked functions with memory that is mapped with SEC_NOCACHE can result in an EXCEPTION_ILLEGAL_INSTRUCTION exception. */
+#define PAGE_REVERT_TO_FILE_MAP 0x80000000 /* Pages in the region can revert modified copy-on-write pages to the original unmodified page when using the mapped view of a file mapping object. */
+#define PAGE_ENCLAVE_THREAD_CONTROL 0x80000000 /* Pages in the region contain a thread control structure (TCS) from the Intel Software Guard Extensions programming model. */
+#define PAGE_TARGETS_NO_UPDATE 0x40000000 /* Pages in the region will not update the CFG bitmap when the protection changes. The default behavior for VirtualProtect is to mark all locations as valid call targets for CFG. */
+#define PAGE_TARGETS_INVALID 0x40000000 /* Pages in the region are excluded from the CFG bitmap as valid targets. Any indirect call to locations in those pages will terminate the process using the __fastfail intrinsic. */
+#define PAGE_ENCLAVE_UNVALIDATED 0x20000000 /* Pages in the region are excluded from measurement with the EEXTEND instruction of the Intel Software Guard Extensions programming model. */
#define PAGE_ENCLAVE_NO_CHANGE 0x20000000
#define PAGE_ENCLAVE_MASK 0x10000000
#define PAGE_ENCLAVE_DECOMMIT (PAGE_ENCLAVE_MASK | 0)
#define PAGE_ENCLAVE_SS_FIRST (PAGE_ENCLAVE_MASK | 1)
#define PAGE_ENCLAVE_SS_REST (PAGE_ENCLAVE_MASK | 2)
-//
-// Memory Region and Section Constants
-//
+/* Memory Region and Section Constants */
#define GENERIC_ALL 0x10000000
#define MEM_COMMIT 0x00001000
#define MEM_RESERVE 0x00002000
@@ -58,7 +54,7 @@
#define SEC_HUGE_PAGES 0x00020000
#define SEC_PARTITION_OWNER_HANDLE 0x00040000
#define SEC_64K_PAGES 0x00080000
-#define SEC_DRIVER_IMAGE 0x00100000 // rev
+#define SEC_DRIVER_IMAGE 0x00100000 /* rev */
#define SEC_BASED 0x00200000
#define SEC_NO_CHANGE 0x00400000
#define SEC_FILE 0x00800000
diff --git a/SysCaller/Wrapper/include/Sys/sysExternals.h b/SysCaller/Wrapper/include/Sys/sysExternals.h
index e1fb963..6f925c5 100644
--- a/SysCaller/Wrapper/include/Sys/sysExternals.h
+++ b/SysCaller/Wrapper/include/Sys/sysExternals.h
@@ -7,13 +7,13 @@ typedef struct _WNF_STATE_NAME
ULONG Data[2];
} WNF_STATE_NAME, * PWNF_STATE_NAME;
-// WNF Type ID
+/* WNF Type ID */
typedef struct _WNF_TYPE_ID
{
GUID TypeId;
} WNF_TYPE_ID, * PWNF_TYPE_ID;
-// General Types
+/* General Types */
typedef LONG NTSTATUS;
typedef ULONG LOGICAL;
typedef ULONG_PTR SIZE_T;
@@ -36,7 +36,7 @@ typedef LCID * PLCID;
typedef const GUID * LPCGUID;
typedef GUID * LPGUID;
-// ALPC Types
+/* ALPC Types */
typedef struct _PORT_MESSAGE * PPORT_MESSAGE;
typedef struct _PORT_VIEW * PPORT_VIEW;
typedef struct _REMOTE_PORT_VIEW * PREMOTE_PORT_VIEW;
@@ -48,7 +48,7 @@ typedef struct _ALPC_DATA_VIEW_ATTR * PALPC_DATA_VIEW_ATTR;
typedef struct _ALPC_SECURITY_ATTR * PALPC_SECURITY_ATTR;
typedef HANDLE PALPC_HANDLE;
-// Proccess & Thread Types
+/* Proccess & Thread Types */
typedef struct _OBJECT_TYPE * POBJECT_TYPE;
typedef NTSTATUS * PNTSTATUS;
typedef HANDLE AUDIT_EVENT_HANDLE;
@@ -60,60 +60,60 @@ typedef struct _TOKEN_SECURITY_ATTRIBUTES_INFORMATION * PTOKEN_SECURITY_ATTRIBUT
typedef struct _OBJECT_ATTRIBUTES * PCOBJECT_ATTRIBUTES;
typedef enum _MEMORY_RESERVE_TYPE MEMORY_RESERVE_TYPE;
-// Enum Classes & Types ->
+/* Enum Classes & Types -> */
-// ALPC Message Information Classes
+/* ALPC Message Information Classes */
typedef enum _ALPC_MESSAGE_INFORMATION_CLASS
{
- AlpcMessageSidInformation, // q: out SID
- AlpcMessageTokenModifiedIdInformation, // q: out LUID
+ AlpcMessageSidInformation, /* q: out SID */
+ AlpcMessageTokenModifiedIdInformation, /* q: out LUID */
AlpcMessageDirectStatusInformation,
- AlpcMessageHandleInformation, // ALPC_MESSAGE_HANDLE_INFORMATION
+ AlpcMessageHandleInformation, /* ALPC_MESSAGE_HANDLE_INFORMATION */
MaxAlpcMessageInfoClass
} ALPC_MESSAGE_INFORMATION_CLASS, * PALPC_MESSAGE_INFORMATION_CLASS;
-// ALPC Port Information Classes
+/* ALPC Port Information Classes */
typedef enum _ALPC_PORT_INFORMATION_CLASS
{
- AlpcBasicInformation, // q: out ALPC_BASIC_INFORMATION
- AlpcPortInformation, // s: in ALPC_PORT_ATTRIBUTES
- AlpcAssociateCompletionPortInformation, // s: in ALPC_PORT_ASSOCIATE_COMPLETION_PORT
- AlpcConnectedSIDInformation, // q: in SID
- AlpcServerInformation, // q: inout ALPC_SERVER_INFORMATION
- AlpcMessageZoneInformation, // s: in ALPC_PORT_MESSAGE_ZONE_INFORMATION
- AlpcRegisterCompletionListInformation, // s: in ALPC_PORT_COMPLETION_LIST_INFORMATION
- AlpcUnregisterCompletionListInformation, // s: VOID
- AlpcAdjustCompletionListConcurrencyCountInformation, // s: in ULONG
- AlpcRegisterCallbackInformation, // s: ALPC_REGISTER_CALLBACK // kernel-mode only
- AlpcCompletionListRundownInformation, // s: VOID // 10
+ AlpcBasicInformation, /* q: out ALPC_BASIC_INFORMATION */
+ AlpcPortInformation, /* s: in ALPC_PORT_ATTRIBUTES */
+ AlpcAssociateCompletionPortInformation, /* s: in ALPC_PORT_ASSOCIATE_COMPLETION_PORT */
+ AlpcConnectedSIDInformation, /* q: in SID */
+ AlpcServerInformation, /* q: inout ALPC_SERVER_INFORMATION */
+ AlpcMessageZoneInformation, /* s: in ALPC_PORT_MESSAGE_ZONE_INFORMATION */
+ AlpcRegisterCompletionListInformation, /* s: in ALPC_PORT_COMPLETION_LIST_INFORMATION */
+ AlpcUnregisterCompletionListInformation, /* s: VOID */
+ AlpcAdjustCompletionListConcurrencyCountInformation, /* s: in ULONG */
+ AlpcRegisterCallbackInformation, /* s: ALPC_REGISTER_CALLBACK, kernel-mode only */
+ AlpcCompletionListRundownInformation, /* s: VOID, 10 */
AlpcWaitForPortReferences,
- AlpcServerSessionInformation // q: ALPC_SERVER_SESSION_INFORMATION // since 19H2
+ AlpcServerSessionInformation /* q: ALPC_SERVER_SESSION_INFORMATION, since 19H2 */
} ALPC_PORT_INFORMATION_CLASS;
-// Atom Information Classes
+/* Atom Information Classes */
typedef enum _ATOM_INFORMATION_CLASS
{
AtomBasicInformation,
AtomTableInformation
} ATOM_INFORMATION_CLASS;
-// CPU Partition Information Classes
+/* CPU Partition Information Classes */
typedef enum _CPU_PARTITION_INFORMATION_CLASS
{
- CpuPartitionBasicInformation, // q: BASIC_CPU_PARTITION_INFORMATION
- CpuPartitionPerformanceInformation, // q: CPU_PARTITION_PERFORMANCE_INFORMATION
- CpuPartitionTopologyInformation, // q: CPU_PARTITION_TOPOLOGY_INFORMATION
- CpuPartitionAffinityInformation, // q; s: CPU_PARTITION_AFFINITY_INFORMATION
- CpuPartitionPolicyInformation, // q; s: CPU_PARTITION_POLICY_INFORMATION
- CpuPartitionSchedulingInformation, // q: CPU_PARTITION_SCHEDULING_INFORMATION
- CpuPartitionResourceControl, // s: CPU_PARTITION_RESOURCE_CONTROL_INFORMATION
- CpuPartitionPowerManagement, // q; s: CPU_PARTITION_POWER_MANAGEMENT_INFORMATION
- CpuPartitionStatistics, // q: CPU_PARTITION_STATISTICS_INFORMATION
- CpuPartitionDebugInformation, // q: CPU_PARTITION_DEBUG_INFORMATION
+ CpuPartitionBasicInformation, /* q: BASIC_CPU_PARTITION_INFORMATION */
+ CpuPartitionPerformanceInformation, /* q: CPU_PARTITION_PERFORMANCE_INFORMATION */
+ CpuPartitionTopologyInformation, /* q: CPU_PARTITION_TOPOLOGY_INFORMATION */
+ CpuPartitionAffinityInformation, /* q; s: CPU_PARTITION_AFFINITY_INFORMATION */
+ CpuPartitionPolicyInformation, /* q; s: CPU_PARTITION_POLICY_INFORMATION */
+ CpuPartitionSchedulingInformation, /* q: CPU_PARTITION_SCHEDULING_INFORMATION */
+ CpuPartitionResourceControl, /* s: CPU_PARTITION_RESOURCE_CONTROL_INFORMATION */
+ CpuPartitionPowerManagement, /* q; s: CPU_PARTITION_POWER_MANAGEMENT_INFORMATION */
+ CpuPartitionStatistics, /* q: CPU_PARTITION_STATISTICS_INFORMATION */
+ CpuPartitionDebugInformation, /* q: CPU_PARTITION_DEBUG_INFORMATION */
CpuPartitionMax
} CPU_PARTITION_INFORMATION_CLASS, * PCPU_PARTITION_INFORMATION_CLASS;
-// Debug States
+/* Debug States */
typedef enum _DBG_STATE
{
DbgIdle,
@@ -129,48 +129,48 @@ typedef enum _DBG_STATE
DbgUnloadDllStateChange
} DBG_STATE, * PDBG_STATE;
-// Debug Object Information Classes
+/* Debug Object Information Classes */
typedef enum _DEBUGOBJECTINFOCLASS
{
DebugObjectUnusedInformation,
- DebugObjectKillProcessOnExitInformation, // s: ULONG
+ DebugObjectKillProcessOnExitInformation, /* s: ULONG */
MaxDebugObjectInfoClass
} DEBUGOBJECTINFOCLASS, * PDEBUGOBJECTINFOCLASS;
-// Directory Notify Information Classes
+/* Directory Notify Information Classes */
typedef enum _DIRECTORY_NOTIFY_INFORMATION_CLASS {
DirectoryNotifyInformation,
DirectoryNotifyInformationEx,
DirectoryNotifyInformationMax
} DIRECTORY_NOTIFY_INFORMATION_CLASS;
-// ETW Trace Control Codes
+/* ETW Trace Control Codes */
typedef enum _ETWTRACECONTROLCODE
{
- EtwStartLoggerCode = 1, // inout WMI_LOGGER_INFORMATION
- EtwStopLoggerCode = 2, // inout WMI_LOGGER_INFORMATION
- EtwQueryLoggerCode = 3, // inout WMI_LOGGER_INFORMATION
- EtwUpdateLoggerCode = 4, // inout WMI_LOGGER_INFORMATION
- EtwFlushLoggerCode = 5, // inout WMI_LOGGER_INFORMATION
- EtwIncrementLoggerFile = 6, // inout WMI_LOGGER_INFORMATION
- EtwRealtimeTransition = 7, // inout WMI_LOGGER_INFORMATION
- // reserved
+ EtwStartLoggerCode = 1, /* inout WMI_LOGGER_INFORMATION */
+ EtwStopLoggerCode = 2, /* inout WMI_LOGGER_INFORMATION */
+ EtwQueryLoggerCode = 3, /* inout WMI_LOGGER_INFORMATION */
+ EtwUpdateLoggerCode = 4, /* inout WMI_LOGGER_INFORMATION */
+ EtwFlushLoggerCode = 5, /* inout WMI_LOGGER_INFORMATION */
+ EtwIncrementLoggerFile = 6, /* inout WMI_LOGGER_INFORMATION */
+ EtwRealtimeTransition = 7, /* inout WMI_LOGGER_INFORMATION */
+ /* reserved */
EtwRealtimeConnectCode = 11,
EtwActivityIdCreate = 12,
EtwWdiScenarioCode = 13,
- EtwRealtimeDisconnectCode = 14, // in HANDLE
+ EtwRealtimeDisconnectCode = 14, /* in HANDLE */
EtwRegisterGuidsCode = 15,
EtwReceiveNotification = 16,
- EtwSendDataBlock = 17, // ETW_ENABLE_NOTIFICATION_PACKET // ETW_SESSION_NOTIFICATION_PACKET
+ EtwSendDataBlock = 17, /* ETW_ENABLE_NOTIFICATION_PACKET, ETW_SESSION_NOTIFICATION_PACKET */
EtwSendReplyDataBlock = 18,
EtwReceiveReplyDataBlock = 19,
EtwWdiSemUpdate = 20,
- EtwEnumTraceGuidList = 21, // out GUID[]
- EtwGetTraceGuidInfo = 22, // in GUID, out ETW_TRACE_GUID_INFO
- EtwEnumerateTraceGuids = 23, // out TRACE_GUID_PROPERTIES[]
+ EtwEnumTraceGuidList = 21, /* out GUID[] */
+ EtwGetTraceGuidInfo = 22, /* in GUID, out ETW_TRACE_GUID_INFO */
+ EtwEnumerateTraceGuids = 23, /* out TRACE_GUID_PROPERTIES[] */
EtwRegisterSecurityProv = 24,
- EtwReferenceTimeCode = 25, // in ULONG LoggerId, out ETW_REF_CLOCK
- EtwTrackBinaryCode = 26, // in HANDLE
+ EtwReferenceTimeCode = 25, /* in ULONG LoggerId, out ETW_REF_CLOCK */
+ EtwTrackBinaryCode = 26, /* in HANDLE */
EtwAddNotificationEvent = 27,
EtwUpdateDisallowList = 28,
EtwSetEnableAllKeywordsCode = 29,
@@ -186,26 +186,26 @@ typedef enum _ETWTRACECONTROLCODE
EtwRegisterPrivateSession = 39,
EtwQuerySessionDemuxObject = 40,
EtwSetProviderBinaryTracking = 41,
- EtwMaxLoggers = 42, // out ULONG
- EtwMaxPmcCounter = 43, // out ULONG
- EtwQueryUsedProcessorCount = 44, // ULONG // since WIN11
+ EtwMaxLoggers = 42, /* out ULONG */
+ EtwMaxPmcCounter = 43, /* out ULONG */
+ EtwQueryUsedProcessorCount = 44, /* ULONG, since WIN11 */
EtwGetPmcOwnership = 45,
EtwGetPmcSessions = 46,
} ETWTRACECONTROLCODE;
-// Event Information Classes
+/* Event Information Classes */
typedef enum _EVENT_INFORMATION_CLASS
{
EventBasicInformation
} EVENT_INFORMATION_CLASS;
-// Event Types
+/* Event Types */
typedef enum _EVENT_TYPE {
NotificationEvent,
SynchronizationEvent,
} EVENT_TYPE;
-// Filter Boot Option Operations
+/* Filter Boot Option Operations */
typedef enum _FILTER_BOOT_OPTION_OPERATION {
FilterBootOptionAdd,
FilterBootOptionRemove,
@@ -213,34 +213,34 @@ typedef enum _FILTER_BOOT_OPTION_OPERATION {
FilterBootOptionQuery
} FILTER_BOOT_OPTION_OPERATION;
-// File System Information Classes
+/* File System Information Classes */
typedef enum _FSINFOCLASS
{
- FileFsVolumeInformation = 1, // q: FILE_FS_VOLUME_INFORMATION
- FileFsLabelInformation, // s: FILE_FS_LABEL_INFORMATION (requires FILE_WRITE_DATA to volume)
- FileFsSizeInformation, // q: FILE_FS_SIZE_INFORMATION
- FileFsDeviceInformation, // q: FILE_FS_DEVICE_INFORMATION
- FileFsAttributeInformation, // q: FILE_FS_ATTRIBUTE_INFORMATION
- FileFsControlInformation, // q, s: FILE_FS_CONTROL_INFORMATION (q: requires FILE_READ_DATA; s: requires FILE_WRITE_DATA to volume)
- FileFsFullSizeInformation, // q: FILE_FS_FULL_SIZE_INFORMATION
- FileFsObjectIdInformation, // q; s: FILE_FS_OBJECTID_INFORMATION (s: requires FILE_WRITE_DATA to volume)
- FileFsDriverPathInformation, // q: FILE_FS_DRIVER_PATH_INFORMATION
- FileFsVolumeFlagsInformation, // q; s: FILE_FS_VOLUME_FLAGS_INFORMATION (q: requires FILE_READ_ATTRIBUTES; s: requires FILE_WRITE_ATTRIBUTES to volume) // 10
- FileFsSectorSizeInformation, // q: FILE_FS_SECTOR_SIZE_INFORMATION // since WIN8
- FileFsDataCopyInformation, // q: FILE_FS_DATA_COPY_INFORMATION
- FileFsMetadataSizeInformation, // q: FILE_FS_METADATA_SIZE_INFORMATION // since THRESHOLD
- FileFsFullSizeInformationEx, // q: FILE_FS_FULL_SIZE_INFORMATION_EX // since REDSTONE5
- FileFsGuidInformation, // q: FILE_FS_GUID_INFORMATION // since 23H2
+ FileFsVolumeInformation = 1, /* q: FILE_FS_VOLUME_INFORMATION */
+ FileFsLabelInformation, /* s: FILE_FS_LABEL_INFORMATION (requires FILE_WRITE_DATA to volume) */
+ FileFsSizeInformation, /* q: FILE_FS_SIZE_INFORMATION */
+ FileFsDeviceInformation, /* q: FILE_FS_DEVICE_INFORMATION */
+ FileFsAttributeInformation, /* q: FILE_FS_ATTRIBUTE_INFORMATION */
+ FileFsControlInformation, /* q, s: FILE_FS_CONTROL_INFORMATION (q: requires FILE_READ_DATA; s: requires FILE_WRITE_DATA to volume) */
+ FileFsFullSizeInformation, /* q: FILE_FS_FULL_SIZE_INFORMATION */
+ FileFsObjectIdInformation, /* q; s: FILE_FS_OBJECTID_INFORMATION (s: requires FILE_WRITE_DATA to volume) */
+ FileFsDriverPathInformation, /* q: FILE_FS_DRIVER_PATH_INFORMATION */
+ FileFsVolumeFlagsInformation, /* q; s: FILE_FS_VOLUME_FLAGS_INFORMATION (q: requires FILE_READ_ATTRIBUTES; s: requires FILE_WRITE_ATTRIBUTES to volume), 10 */
+ FileFsSectorSizeInformation, /* q: FILE_FS_SECTOR_SIZE_INFORMATION, since WIN8 */
+ FileFsDataCopyInformation, /* q: FILE_FS_DATA_COPY_INFORMATION */
+ FileFsMetadataSizeInformation, /* q: FILE_FS_METADATA_SIZE_INFORMATION, since THRESHOLD */
+ FileFsFullSizeInformationEx, /* q: FILE_FS_FULL_SIZE_INFORMATION_EX, since REDSTONE5 */
+ FileFsGuidInformation, /* q: FILE_FS_GUID_INFORMATION, since 23H2 */
FileFsMaximumInformation
} FSINFOCLASS, * PFSINFOCLASS;
-// IO Completion Information Classes
+/* IO Completion Information Classes */
typedef enum _IO_COMPLETION_INFORMATION_CLASS
{
IoCompletionBasicInformation
} IO_COMPLETION_INFORMATION_CLASS;
-// IO Session Events
+/* IO Session Events */
typedef enum _IO_SESSION_EVENT
{
IoSessionEventIgnore,
@@ -253,7 +253,7 @@ typedef enum _IO_SESSION_EVENT
IoSessionEventMax
} IO_SESSION_EVENT;
-// IO Session States
+/* IO Session States */
typedef enum _IO_SESSION_STATE
{
IoSessionStateCreated = 1,
@@ -267,35 +267,35 @@ typedef enum _IO_SESSION_STATE
IoSessionStateMax
} IO_SESSION_STATE;
-// Key Information Classes
+/* Key Information Classes */
typedef enum _KEY_INFORMATION_CLASS
{
- KeyBasicInformation, // KEY_BASIC_INFORMATION
- KeyNodeInformation, // KEY_NODE_INFORMATION
- KeyFullInformation, // KEY_FULL_INFORMATION
- KeyNameInformation, // KEY_NAME_INFORMATION
- KeyCachedInformation, // KEY_CACHED_INFORMATION
- KeyFlagsInformation, // KEY_FLAGS_INFORMATION
- KeyVirtualizationInformation, // KEY_VIRTUALIZATION_INFORMATION
- KeyHandleTagsInformation, // KEY_HANDLE_TAGS_INFORMATION
- KeyTrustInformation, // KEY_TRUST_INFORMATION
- KeyLayerInformation, // KEY_LAYER_INFORMATION
+ KeyBasicInformation, /* KEY_BASIC_INFORMATION */
+ KeyNodeInformation, /* KEY_NODE_INFORMATION */
+ KeyFullInformation, /* KEY_FULL_INFORMATION */
+ KeyNameInformation, /* KEY_NAME_INFORMATION */
+ KeyCachedInformation, /* KEY_CACHED_INFORMATION */
+ KeyFlagsInformation, /* KEY_FLAGS_INFORMATION */
+ KeyVirtualizationInformation, /* KEY_VIRTUALIZATION_INFORMATION */
+ KeyHandleTagsInformation, /* KEY_HANDLE_TAGS_INFORMATION */
+ KeyTrustInformation, /* KEY_TRUST_INFORMATION */
+ KeyLayerInformation, /* KEY_LAYER_INFORMATION */
MaxKeyInfoClass
} KEY_INFORMATION_CLASS;
-// Key Value Information Classes
+/* Key Value Information Classes */
typedef enum _KEY_VALUE_INFORMATION_CLASS
{
- KeyValueBasicInformation, // KEY_VALUE_BASIC_INFORMATION
- KeyValueFullInformation, // KEY_VALUE_FULL_INFORMATION
- KeyValuePartialInformation, // KEY_VALUE_PARTIAL_INFORMATION
+ KeyValueBasicInformation, /* KEY_VALUE_BASIC_INFORMATION */
+ KeyValueFullInformation, /* KEY_VALUE_FULL_INFORMATION */
+ KeyValuePartialInformation, /* KEY_VALUE_PARTIAL_INFORMATION */
KeyValueFullInformationAlign64,
- KeyValuePartialInformationAlign64, // KEY_VALUE_PARTIAL_INFORMATION_ALIGN64
- KeyValueLayerInformation, // KEY_VALUE_LAYER_INFORMATION
+ KeyValuePartialInformationAlign64, /* KEY_VALUE_PARTIAL_INFORMATION_ALIGN64 */
+ KeyValueLayerInformation, /* KEY_VALUE_LAYER_INFORMATION */
MaxKeyValueInfoClass
} KEY_VALUE_INFORMATION_CLASS;
-// KProfile Sources
+/* KProfile Sources */
typedef enum _KPROFILE_SOURCE {
ProfileTime,
ProfileAlignmentFaults,
@@ -309,7 +309,7 @@ typedef enum _KPROFILE_SOURCE {
ProfileMaximum
} KPROFILE_SOURCE;
-// KThread State
+/* KThread State */
typedef enum _KTHREAD_STATE
{
Initialized,
@@ -325,77 +325,77 @@ typedef enum _KTHREAD_STATE
MaximumThreadState
} KTHREAD_STATE, *PKTHREAD_STATE;
-// KWait Reason
+/* KWait Reason */
typedef enum _KWAIT_REASON
{
- Executive, // Waiting for an executive event.
- FreePage, // Waiting for a free page.
- PageIn, // Waiting for a page to be read in.
- PoolAllocation, // Waiting for a pool allocation.
- DelayExecution, // Waiting due to a delay execution. // NtDelayExecution
- Suspended, // Waiting because the thread is suspended. // NtSuspendThread
- UserRequest, // Waiting due to a user request. // NtWaitForSingleObject
- WrExecutive, // Waiting for an executive event.
- WrFreePage, // Waiting for a free page.
- WrPageIn, // Waiting for a page to be read in.
- WrPoolAllocation, // Waiting for a pool allocation.
- WrDelayExecution, // Waiting due to a delay execution.
- WrSuspended, // Waiting because the thread is suspended.
- WrUserRequest, // Waiting due to a user request.
- WrEventPair, // Waiting for an event pair. // NtCreateEventPair
- WrQueue, // Waiting for a queue. // NtRemoveIoCompletion
- WrLpcReceive, // Waiting for an LPC receive.
- WrLpcReply, // Waiting for an LPC reply.
- WrVirtualMemory, // Waiting for virtual memory.
- WrPageOut, // Waiting for a page to be written out.
- WrRendezvous, // Waiting for a rendezvous.
- WrKeyedEvent, // Waiting for a keyed event. // NtCreateKeyedEvent
- WrTerminated, // Waiting for thread termination.
- WrProcessInSwap, // Waiting for a process to be swapped in.
- WrCpuRateControl, // Waiting for CPU rate control.
- WrCalloutStack, // Waiting for a callout stack.
- WrKernel, // Waiting for a kernel event.
- WrResource, // Waiting for a resource.
- WrPushLock, // Waiting for a push lock.
- WrMutex, // Waiting for a mutex.
- WrQuantumEnd, // Waiting for the end of a quantum.
- WrDispatchInt, // Waiting for a dispatch interrupt.
- WrPreempted, // Waiting because the thread was preempted.
- WrYieldExecution, // Waiting to yield execution.
- WrFastMutex, // Waiting for a fast mutex.
- WrGuardedMutex, // Waiting for a guarded mutex.
- WrRundown, // Waiting for a rundown.
- WrAlertByThreadId, // Waiting for an alert by thread ID.
- WrDeferredPreempt, // Waiting for a deferred preemption.
- WrPhysicalFault, // Waiting for a physical fault.
- WrIoRing, // Waiting for an I/O ring.
- WrMdlCache, // Waiting for an MDL cache.
- WrRcu, // Waiting for read-copy-update (RCU) synchronization.
+ Executive, /* Waiting for an executive event. */
+ FreePage, /* Waiting for a free page. */
+ PageIn, /* Waiting for a page to be read in. */
+ PoolAllocation, /* Waiting for a pool allocation. */
+ DelayExecution, /* Waiting due to a delay execution. NtDelayExecution */
+ Suspended, /* Waiting because the thread is suspended. NtSuspendThread */
+ UserRequest, /* Waiting due to a user request. NtWaitForSingleObject */
+ WrExecutive, /* Waiting for an executive event. */
+ WrFreePage, /* Waiting for a free page. */
+ WrPageIn, /* Waiting for a page to be read in. */
+ WrPoolAllocation, /* Waiting for a pool allocation. */
+ WrDelayExecution, /* Waiting due to a delay execution. */
+ WrSuspended, /* Waiting because the thread is suspended. */
+ WrUserRequest, /* Waiting due to a user request. */
+ WrEventPair, /* Waiting for an event pair. NtCreateEventPair */
+ WrQueue, /* Waiting for a queue. NtRemoveIoCompletion */
+ WrLpcReceive, /* Waiting for an LPC receive. */
+ WrLpcReply, /* Waiting for an LPC reply. */
+ WrVirtualMemory, /* Waiting for virtual memory. */
+ WrPageOut, /* Waiting for a page to be written out. */
+ WrRendezvous, /* Waiting for a rendezvous. */
+ WrKeyedEvent, /* Waiting for a keyed event. NtCreateKeyedEvent */
+ WrTerminated, /* Waiting for thread termination. */
+ WrProcessInSwap, /* Waiting for a process to be swapped in. */
+ WrCpuRateControl, /* Waiting for CPU rate control. */
+ WrCalloutStack, /* Waiting for a callout stack. */
+ WrKernel, /* Waiting for a kernel event. */
+ WrResource, /* Waiting for a resource. */
+ WrPushLock, /* Waiting for a push lock. */
+ WrMutex, /* Waiting for a mutex. */
+ WrQuantumEnd, /* Waiting for the end of a quantum. */
+ WrDispatchInt, /* Waiting for a dispatch interrupt. */
+ WrPreempted, /* Waiting because the thread was preempted. */
+ WrYieldExecution, /* Waiting to yield execution. */
+ WrFastMutex, /* Waiting for a fast mutex. */
+ WrGuardedMutex, /* Waiting for a guarded mutex. */
+ WrRundown, /* Waiting for a rundown. */
+ WrAlertByThreadId, /* Waiting for an alert by thread ID. */
+ WrDeferredPreempt, /* Waiting for a deferred preemption. */
+ WrPhysicalFault, /* Waiting for a physical fault. */
+ WrIoRing, /* Waiting for an I/O ring. */
+ WrMdlCache, /* Waiting for an MDL cache. */
+ WrRcu, /* Waiting for read-copy-update (RCU) synchronization. */
MaximumWaitReason
} KWAIT_REASON, *PKWAIT_REASON;
-// Memory Information CLasses
+/* Memory Information CLasses */
typedef enum _MEMORY_INFORMATION_CLASS
{
- MemoryBasicInformation, // q: MEMORY_BASIC_INFORMATION
- MemoryWorkingSetInformation, // q: MEMORY_WORKING_SET_INFORMATION
- MemoryMappedFilenameInformation, // q: UNICODE_STRING
- MemoryRegionInformation, // q: MEMORY_REGION_INFORMATION
- MemoryWorkingSetExInformation, // q: MEMORY_WORKING_SET_EX_INFORMATION // since VISTA
- MemorySharedCommitInformation, // q: MEMORY_SHARED_COMMIT_INFORMATION // since WIN8
- MemoryImageInformation, // q: MEMORY_IMAGE_INFORMATION
- MemoryRegionInformationEx, // MEMORY_REGION_INFORMATION
- MemoryPrivilegedBasicInformation, // MEMORY_BASIC_INFORMATION
- MemoryEnclaveImageInformation, // MEMORY_ENCLAVE_IMAGE_INFORMATION // since REDSTONE3
- MemoryBasicInformationCapped, // 10
- MemoryPhysicalContiguityInformation, // MEMORY_PHYSICAL_CONTIGUITY_INFORMATION // since 20H1
- MemoryBadInformation, // since WIN11
- MemoryBadInformationAllProcesses, // since 22H1
- MemoryImageExtensionInformation, // MEMORY_IMAGE_EXTENSION_INFORMATION // since 24H2
+ MemoryBasicInformation, /* q: MEMORY_BASIC_INFORMATION */
+ MemoryWorkingSetInformation, /* q: MEMORY_WORKING_SET_INFORMATION */
+ MemoryMappedFilenameInformation, /* q: UNICODE_STRING */
+ MemoryRegionInformation, /* q: MEMORY_REGION_INFORMATION */
+ MemoryWorkingSetExInformation, /* q: MEMORY_WORKING_SET_EX_INFORMATION, since VISTA */
+ MemorySharedCommitInformation, /* q: MEMORY_SHARED_COMMIT_INFORMATION, since WIN8 */
+ MemoryImageInformation, /* q: MEMORY_IMAGE_INFORMATION */
+ MemoryRegionInformationEx, /* MEMORY_REGION_INFORMATION */
+ MemoryPrivilegedBasicInformation, /* MEMORY_BASIC_INFORMATION */
+ MemoryEnclaveImageInformation, /* MEMORY_ENCLAVE_IMAGE_INFORMATION, since REDSTONE3 */
+ MemoryBasicInformationCapped, /* 10 */
+ MemoryPhysicalContiguityInformation, /* MEMORY_PHYSICAL_CONTIGUITY_INFORMATION, since 20H1 */
+ MemoryBadInformation, /* since WIN11 */
+ MemoryBadInformationAllProcesses, /* since 22H1 */
+ MemoryImageExtensionInformation, /* MEMORY_IMAGE_EXTENSION_INFORMATION, since 24H2 */
MaxMemoryInfoClass
} MEMORY_INFORMATION_CLASS;
-// Memory Reserve Type
+/* Memory Reserve Type */
typedef enum _MEMORY_RESERVE_TYPE
{
MemoryReserveUserApc,
@@ -403,72 +403,72 @@ typedef enum _MEMORY_RESERVE_TYPE
MemoryReserveTypeMax
} MEMORY_RESERVE_TYPE;
-// Mutant Information Classes
+/* Mutant Information Classes */
typedef enum _MUTANT_INFORMATION_CLASS
{
- MutantBasicInformation, // MUTANT_BASIC_INFORMATION
- MutantOwnerInformation // MUTANT_OWNER_INFORMATION
+ MutantBasicInformation, /* MUTANT_BASIC_INFORMATION */
+ MutantOwnerInformation /* MUTANT_OWNER_INFORMATION */
} MUTANT_INFORMATION_CLASS;
-// Partition Information Classses
+/* Partition Information Classses */
typedef enum _PARTITION_INFORMATION_CLASS
{
- SystemMemoryPartitionInformation, // q: MEMORY_PARTITION_CONFIGURATION_INFORMATION
- SystemMemoryPartitionMoveMemory, // s: MEMORY_PARTITION_TRANSFER_INFORMATION
- SystemMemoryPartitionAddPagefile, // s: MEMORY_PARTITION_PAGEFILE_INFORMATION
- SystemMemoryPartitionCombineMemory, // q; s: MEMORY_PARTITION_PAGE_COMBINE_INFORMATION
- SystemMemoryPartitionInitialAddMemory, // q; s: MEMORY_PARTITION_INITIAL_ADD_INFORMATION
- SystemMemoryPartitionGetMemoryEvents, // MEMORY_PARTITION_MEMORY_EVENTS_INFORMATION // since REDSTONE2
+ SystemMemoryPartitionInformation, /* q: MEMORY_PARTITION_CONFIGURATION_INFORMATION */
+ SystemMemoryPartitionMoveMemory, /* s: MEMORY_PARTITION_TRANSFER_INFORMATION */
+ SystemMemoryPartitionAddPagefile, /* s: MEMORY_PARTITION_PAGEFILE_INFORMATION */
+ SystemMemoryPartitionCombineMemory, /* q; s: MEMORY_PARTITION_PAGE_COMBINE_INFORMATION */
+ SystemMemoryPartitionInitialAddMemory, /* q; s: MEMORY_PARTITION_INITIAL_ADD_INFORMATION */
+ SystemMemoryPartitionGetMemoryEvents, /* MEMORY_PARTITION_MEMORY_EVENTS_INFORMATION */ /* since REDSTONE2 */
SystemMemoryPartitionSetAttributes,
SystemMemoryPartitionNodeInformation,
SystemMemoryPartitionCreateLargePages,
SystemMemoryPartitionDedicatedMemoryInformation,
- SystemMemoryPartitionOpenDedicatedMemory, // 10
+ SystemMemoryPartitionOpenDedicatedMemory, /* 10 */
SystemMemoryPartitionMemoryChargeAttributes,
SystemMemoryPartitionClearAttributes,
- SystemMemoryPartitionSetMemoryThresholds, // since WIN11
- SystemMemoryPartitionMemoryListCommand, // since 24H2
+ SystemMemoryPartitionSetMemoryThresholds, /* since WIN11 */
+ SystemMemoryPartitionMemoryListCommand, /* since 24H2 */
SystemMemoryPartitionMax
} PARTITION_INFORMATION_CLASS, * PPARTITION_INFORMATION_CLASS;
-// PlugPlay Control Classes
+/* PlugPlay Control Classes */
typedef enum _PLUGPLAY_CONTROL_CLASS
{
- PlugPlayControlEnumerateDevice, // PLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA
- PlugPlayControlRegisterNewDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
- PlugPlayControlDeregisterDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
- PlugPlayControlInitializeDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
- PlugPlayControlStartDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
- PlugPlayControlUnlockDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
- PlugPlayControlQueryAndRemoveDevice, // PLUGPLAY_CONTROL_QUERY_AND_REMOVE_DATA
- PlugPlayControlUserResponse, // PLUGPLAY_CONTROL_USER_RESPONSE_DATA
- PlugPlayControlGenerateLegacyDevice, // PLUGPLAY_CONTROL_LEGACY_DEVGEN_DATA
- PlugPlayControlGetInterfaceDeviceList, // PLUGPLAY_CONTROL_INTERFACE_LIST_DATA
- PlugPlayControlProperty, // PLUGPLAY_CONTROL_PROPERTY_DATA
- PlugPlayControlDeviceClassAssociation, // PLUGPLAY_CONTROL_CLASS_ASSOCIATION_DATA
- PlugPlayControlGetRelatedDevice, // PLUGPLAY_CONTROL_RELATED_DEVICE_DATA
- PlugPlayControlGetInterfaceDeviceAlias, // PLUGPLAY_CONTROL_INTERFACE_ALIAS_DATA
- PlugPlayControlDeviceStatus, // PLUGPLAY_CONTROL_STATUS_DATA
- PlugPlayControlGetDeviceDepth, // PLUGPLAY_CONTROL_DEPTH_DATA
- PlugPlayControlQueryDeviceRelations, // PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA
- PlugPlayControlTargetDeviceRelation, // PLUGPLAY_CONTROL_TARGET_RELATION_DATA
- PlugPlayControlQueryConflictList, // PLUGPLAY_CONTROL_CONFLICT_LIST
- PlugPlayControlRetrieveDock, // PLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA
- PlugPlayControlResetDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
- PlugPlayControlHaltDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
- PlugPlayControlGetBlockedDriverList, // PLUGPLAY_CONTROL_BLOCKED_DRIVER_DATA
- PlugPlayControlGetDeviceInterfaceEnabled, // PLUGPLAY_CONTROL_DEVICE_INTERFACE_ENABLED
+ PlugPlayControlEnumerateDevice, /* PLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA */
+ PlugPlayControlRegisterNewDevice, /* PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA */
+ PlugPlayControlDeregisterDevice, /* PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA */
+ PlugPlayControlInitializeDevice, /* PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA */
+ PlugPlayControlStartDevice, /* PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA */
+ PlugPlayControlUnlockDevice, /* PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA */
+ PlugPlayControlQueryAndRemoveDevice, /* PLUGPLAY_CONTROL_QUERY_AND_REMOVE_DATA */
+ PlugPlayControlUserResponse, /* PLUGPLAY_CONTROL_USER_RESPONSE_DATA */
+ PlugPlayControlGenerateLegacyDevice, /* PLUGPLAY_CONTROL_LEGACY_DEVGEN_DATA */
+ PlugPlayControlGetInterfaceDeviceList, /* PLUGPLAY_CONTROL_INTERFACE_LIST_DATA */
+ PlugPlayControlProperty, /* PLUGPLAY_CONTROL_PROPERTY_DATA */
+ PlugPlayControlDeviceClassAssociation, /* PLUGPLAY_CONTROL_CLASS_ASSOCIATION_DATA */
+ PlugPlayControlGetRelatedDevice, /* PLUGPLAY_CONTROL_RELATED_DEVICE_DATA */
+ PlugPlayControlGetInterfaceDeviceAlias, /* PLUGPLAY_CONTROL_INTERFACE_ALIAS_DATA */
+ PlugPlayControlDeviceStatus, /* PLUGPLAY_CONTROL_STATUS_DATA */
+ PlugPlayControlGetDeviceDepth, /* PLUGPLAY_CONTROL_DEPTH_DATA */
+ PlugPlayControlQueryDeviceRelations, /* PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA */
+ PlugPlayControlTargetDeviceRelation, /* PLUGPLAY_CONTROL_TARGET_RELATION_DATA */
+ PlugPlayControlQueryConflictList, /* PLUGPLAY_CONTROL_CONFLICT_LIST */
+ PlugPlayControlRetrieveDock, /* PLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA */
+ PlugPlayControlResetDevice, /* PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA */
+ PlugPlayControlHaltDevice, /* PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA */
+ PlugPlayControlGetBlockedDriverList, /* PLUGPLAY_CONTROL_BLOCKED_DRIVER_DATA */
+ PlugPlayControlGetDeviceInterfaceEnabled, /* PLUGPLAY_CONTROL_DEVICE_INTERFACE_ENABLED */
MaxPlugPlayControl
} PLUGPLAY_CONTROL_CLASS, * PPLUGPLAY_CONTROL_CLASS;
-// Port Information Classes
+/* Port Information Classes */
typedef enum _PORT_INFORMATION_CLASS
{
PortBasicInformation,
PortDumpInformation
} PORT_INFORMATION_CLASS;
-// Process State Change Types
+/* Process State Change Types */
typedef enum _PROCESS_STATE_CHANGE_TYPE
{
ProcessStateChangeSuspend,
@@ -476,7 +476,7 @@ typedef enum _PROCESS_STATE_CHANGE_TYPE
ProcessStateChangeMax,
} PROCESS_STATE_CHANGE_TYPE, * PPROCESS_STATE_CHANGE_TYPE;
-// PS Create States
+/* PS Create States */
typedef enum _PS_CREATE_STATE
{
PsCreateInitialState,
@@ -484,30 +484,30 @@ typedef enum _PS_CREATE_STATE
PsCreateFailOnSectionCreate,
PsCreateFailExeFormat,
PsCreateFailMachineMismatch,
- PsCreateFailExeName, // Debugger specified
+ PsCreateFailExeName, /* Debugger specified */
PsCreateSuccess,
PsCreateMaximumStates
} PS_CREATE_STATE;
-// Section Information Classes
+/* Section Information Classes */
typedef enum _SECTION_INFORMATION_CLASS
{
- SectionBasicInformation, // q; SECTION_BASIC_INFORMATION
- SectionImageInformation, // q; SECTION_IMAGE_INFORMATION
- SectionRelocationInformation, // q; ULONG_PTR RelocationDelta // name:wow64:whNtQuerySection_SectionRelocationInformation // since WIN7
- SectionOriginalBaseInformation, // q; PVOID BaseAddress // since REDSTONE
- SectionInternalImageInformation, // SECTION_INTERNAL_IMAGE_INFORMATION // since REDSTONE2
+ SectionBasicInformation, /* q; SECTION_BASIC_INFORMATION */
+ SectionImageInformation, /* q; SECTION_IMAGE_INFORMATION */
+ SectionRelocationInformation, /* q; ULONG_PTR RelocationDelta, name:wow64:whNtQuerySection_SectionRelocationInformation, since WIN7 */
+ SectionOriginalBaseInformation, /* q; PVOID BaseAddress, since REDSTONE */
+ SectionInternalImageInformation, /* SECTION_INTERNAL_IMAGE_INFORMATION, since REDSTONE2 */
MaxSectionInfoClass
} SECTION_INFORMATION_CLASS;
-// Section Inherit
+/* Section Inherit */
typedef enum _SECTION_INHERIT
{
ViewShare = 1,
ViewUnmap = 2
} SECTION_INHERIT;
-// Secure Setting Value Types
+/* Secure Setting Value Types */
typedef enum _SECURE_SETTING_VALUE_TYPE
{
SecureSettingValueTypeBoolean = 0,
@@ -517,53 +517,53 @@ typedef enum _SECURE_SETTING_VALUE_TYPE
SecureSettingValueTypeUnknown = 4
} SECURE_SETTING_VALUE_TYPE, * PSECURE_SETTING_VALUE_TYPE;
-// Semaphore Information Classes
+/* Semaphore Information Classes */
typedef enum _SEMAPHORE_INFORMATION_CLASS
{
SemaphoreBasicInformation
} SEMAPHORE_INFORMATION_CLASS;
-// Shutdown Actions
+/* Shutdown Actions */
typedef enum _SHUTDOWN_ACTION
{
ShutdownNoReboot,
ShutdownReboot,
ShutdownPowerOff,
- ShutdownRebootForRecovery // since WIN11
+ ShutdownRebootForRecovery /* since WIN11 */
} SHUTDOWN_ACTION;
-// Symbolic Link Info Classes
+/* Symbolic Link Info Classes */
typedef enum _SYMBOLIC_LINK_INFO_CLASS
{
- SymbolicLinkGlobalInformation = 1, // s: ULONG
- SymbolicLinkAccessMask, // s: ACCESS_MASK
+ SymbolicLinkGlobalInformation = 1, /* s: ULONG */
+ SymbolicLinkAccessMask, /* s: ACCESS_MASK */
MaxnSymbolicLinkInfoClass
} SYMBOLIC_LINK_INFO_CLASS;
-// SYSDBG Commands
+/* SYSDBG Commands */
typedef enum _SYSDBG_COMMAND
{
SysDbgQueryModuleInformation,
SysDbgQueryTraceInformation,
SysDbgSetTracepoint,
- SysDbgSetSpecialCall, // PVOID
- SysDbgClearSpecialCalls, // void
+ SysDbgSetSpecialCall, /* PVOID */
+ SysDbgClearSpecialCalls, /* void */
SysDbgQuerySpecialCalls,
SysDbgBreakPoint,
- SysDbgQueryVersion, // DBGKD_GET_VERSION64
- SysDbgReadVirtual, // SYSDBG_VIRTUAL
- SysDbgWriteVirtual, // SYSDBG_VIRTUAL
- SysDbgReadPhysical, // SYSDBG_PHYSICAL // 10
- SysDbgWritePhysical, // SYSDBG_PHYSICAL
- SysDbgReadControlSpace, // SYSDBG_CONTROL_SPACE
- SysDbgWriteControlSpace, // SYSDBG_CONTROL_SPACE
- SysDbgReadIoSpace, // SYSDBG_IO_SPACE
- SysDbgWriteIoSpace, // SYSDBG_IO_SPACE
- SysDbgReadMsr, // SYSDBG_MSR
- SysDbgWriteMsr, // SYSDBG_MSR
- SysDbgReadBusData, // SYSDBG_BUS_DATA
- SysDbgWriteBusData, // SYSDBG_BUS_DATA
- SysDbgCheckLowMemory, // 20
+ SysDbgQueryVersion, /* DBGKD_GET_VERSION64 */
+ SysDbgReadVirtual, /* SYSDBG_VIRTUAL */
+ SysDbgWriteVirtual, /* SYSDBG_VIRTUAL */
+ SysDbgReadPhysical, /* SYSDBG_PHYSICAL, 10 */
+ SysDbgWritePhysical, /* SYSDBG_PHYSICAL */
+ SysDbgReadControlSpace, /* SYSDBG_CONTROL_SPACE */
+ SysDbgWriteControlSpace, /* SYSDBG_CONTROL_SPACE */
+ SysDbgReadIoSpace, /* SYSDBG_IO_SPACE */
+ SysDbgWriteIoSpace, /* SYSDBG_IO_SPACE */
+ SysDbgReadMsr, /* SYSDBG_MSR */
+ SysDbgWriteMsr, /* SYSDBG_MSR */
+ SysDbgReadBusData, /* SYSDBG_BUS_DATA */
+ SysDbgWriteBusData, /* SYSDBG_BUS_DATA */
+ SysDbgCheckLowMemory, /* 20 */
SysDbgEnableKernelDebugger,
SysDbgDisableKernelDebugger,
SysDbgGetAutoKdEnable,
@@ -572,20 +572,20 @@ typedef enum _SYSDBG_COMMAND
SysDbgSetPrintBufferSize,
SysDbgGetKdUmExceptionEnable,
SysDbgSetKdUmExceptionEnable,
- SysDbgGetTriageDump, // SYSDBG_TRIAGE_DUMP
- SysDbgGetKdBlockEnable, // 30
+ SysDbgGetTriageDump, /* SYSDBG_TRIAGE_DUMP */
+ SysDbgGetKdBlockEnable, /* 30 */
SysDbgSetKdBlockEnable,
SysDbgRegisterForUmBreakInfo,
SysDbgGetUmBreakPid,
SysDbgClearUmBreakPid,
SysDbgGetUmAttachPid,
SysDbgClearUmAttachPid,
- SysDbgGetLiveKernelDump, // SYSDBG_LIVEDUMP_CONTROL
- SysDbgKdPullRemoteFile, // SYSDBG_KD_PULL_REMOTE_FILE
+ SysDbgGetLiveKernelDump, /* SYSDBG_LIVEDUMP_CONTROL */
+ SysDbgKdPullRemoteFile, /* SYSDBG_KD_PULL_REMOTE_FILE */
SysDbgMaxInfoClass
} SYSDBG_COMMAND, * PSYSDBG_COMMAND;
-// Thread State Change Types
+/* Thread State Change Types */
typedef enum _THREAD_STATE_CHANGE_TYPE
{
ThreadStateChangeSuspend,
@@ -593,26 +593,26 @@ typedef enum _THREAD_STATE_CHANGE_TYPE
ThreadStateChangeMax,
} THREAD_STATE_CHANGE_TYPE, * PTHREAD_STATE_CHANGE_TYPE;
-// Timer Information Classes
+/* Timer Information Classes */
typedef enum _TIMER_INFORMATION_CLASS
{
- TimerBasicInformation // TIMER_BASIC_INFORMATION
+ TimerBasicInformation /* TIMER_BASIC_INFORMATION */
} TIMER_INFORMATION_CLASS;
-// Timer Set Information Classes
+/* Timer Set Information Classes */
typedef enum _TIMER_SET_INFORMATION_CLASS
{
- TimerSetCoalescableTimer, // TIMER_SET_COALESCABLE_TIMER_INFO
+ TimerSetCoalescableTimer, /* TIMER_SET_COALESCABLE_TIMER_INFO */
MaxTimerInfoClass
} TIMER_SET_INFORMATION_CLASS;
-// Timer Types
+/* Timer Types */
typedef enum _TIMER_TYPE {
TimerNotification,
TimerSynchronization
} TIMER_TYPE;
-// VDM Service Classes
+/* VDM Service Classes */
typedef enum _VDMSERVICECLASS
{
VdmStartExecution,
@@ -633,21 +633,21 @@ typedef enum _VDMSERVICECLASS
VdmPreInitialize
} VDMSERVICECLASS, * PVDMSERVICECLASS;
-// Virtual Memory Information Classes
+/* Virtual Memory Information Classes */
typedef enum _VIRTUAL_MEMORY_INFORMATION_CLASS
{
- VmPrefetchInformation, // MEMORY_PREFETCH_INFORMATION
- VmPagePriorityInformation, // MEMORY_PAGE_PRIORITY_INFORMATION
- VmCfgCallTargetInformation, // CFG_CALL_TARGET_LIST_INFORMATION // REDSTONE2
- VmPageDirtyStateInformation, // REDSTONE3
- VmImageHotPatchInformation, // 19H1
- VmPhysicalContiguityInformation, // 20H1
+ VmPrefetchInformation, /* MEMORY_PREFETCH_INFORMATION */
+ VmPagePriorityInformation, /* MEMORY_PAGE_PRIORITY_INFORMATION */
+ VmCfgCallTargetInformation, /* CFG_CALL_TARGET_LIST_INFORMATION, REDSTONE2 */
+ VmPageDirtyStateInformation, /* REDSTONE3 */
+ VmImageHotPatchInformation, /* 19H1 */
+ VmPhysicalContiguityInformation, /* 20H1 */
VmVirtualMachinePrepopulateInformation,
VmRemoveFromWorkingSetInformation,
MaxVmInfoClass
} VIRTUAL_MEMORY_INFORMATION_CLASS;
-// Wait Types
+/* Wait Types */
typedef enum _WAIT_TYPE
{
WaitAll,
@@ -657,18 +657,18 @@ typedef enum _WAIT_TYPE
WaitDpc,
} WAIT_TYPE;
-// WNF Data Scope
+/* WNF Data Scope */
typedef enum _WNF_DATA_SCOPE
{
WnfDataScopeSystem,
WnfDataScopeSession,
WnfDataScopeUser,
WnfDataScopeProcess,
- WnfDataScopeMachine, // REDSTONE3
- WnfDataScopePhysicalMachine, // WIN11
+ WnfDataScopeMachine, /* REDSTONE3 */
+ WnfDataScopePhysicalMachine, /* WIN11 */
} WNF_DATA_SCOPE;
-// WNF State Name Information
+/* WNF State Name Information */
typedef enum _WNF_STATE_NAME_INFORMATION
{
WnfInfoStateNameExist,
@@ -676,7 +676,7 @@ typedef enum _WNF_STATE_NAME_INFORMATION
WnfInfoIsQuiescent
} WNF_STATE_NAME_INFORMATION;
-// WNF State Name Lifetime
+/* WNF State Name Lifetime */
typedef enum _WNF_STATE_NAME_LIFETIME
{
WnfWellKnownStateName,
@@ -685,24 +685,24 @@ typedef enum _WNF_STATE_NAME_LIFETIME
WnfTemporaryStateName
} WNF_STATE_NAME_LIFETIME;
-// Worker Factory Information Classes
+/* Worker Factory Information Classes */
typedef enum _WORKERFACTORYINFOCLASS
{
- WorkerFactoryTimeout, // LARGE_INTEGER
- WorkerFactoryRetryTimeout, // LARGE_INTEGER
- WorkerFactoryIdleTimeout, // s: LARGE_INTEGER
- WorkerFactoryBindingCount, // s: ULONG
- WorkerFactoryThreadMinimum, // s: ULONG
- WorkerFactoryThreadMaximum, // s: ULONG
- WorkerFactoryPaused, // ULONG or BOOLEAN
- WorkerFactoryBasicInformation, // q: WORKER_FACTORY_BASIC_INFORMATION
+ WorkerFactoryTimeout, /* LARGE_INTEGER */
+ WorkerFactoryRetryTimeout, /* LARGE_INTEGER */
+ WorkerFactoryIdleTimeout, /* s: LARGE_INTEGER */
+ WorkerFactoryBindingCount, /* s: ULONG */
+ WorkerFactoryThreadMinimum, /* s: ULONG */
+ WorkerFactoryThreadMaximum, /* s: ULONG */
+ WorkerFactoryPaused, /* ULONG or BOOLEAN */
+ WorkerFactoryBasicInformation, /* q: WORKER_FACTORY_BASIC_INFORMATION */
WorkerFactoryAdjustThreadGoal,
WorkerFactoryCallbackType,
- WorkerFactoryStackInformation, // 10
- WorkerFactoryThreadBasePriority, // s: ULONG
- WorkerFactoryTimeoutWaiters, // s: ULONG, since THRESHOLD
- WorkerFactoryFlags, // s: ULONG
- WorkerFactoryThreadSoftMaximum, // s: ULONG
- WorkerFactoryThreadCpuSets, // since REDSTONE5
+ WorkerFactoryStackInformation, /* 10 */
+ WorkerFactoryThreadBasePriority, /* s: ULONG */
+ WorkerFactoryTimeoutWaiters, /* s: ULONG, since THRESHOLD */
+ WorkerFactoryFlags, /* s: ULONG */
+ WorkerFactoryThreadSoftMaximum, /* s: ULONG */
+ WorkerFactoryThreadCpuSets, /* since REDSTONE5 */
MaxWorkerFactoryInfoClass
} WORKERFACTORYINFOCLASS, * PWORKERFACTORYINFOCLASS;
\ No newline at end of file
diff --git a/SysCaller/Wrapper/include/Sys/sysTypes.h b/SysCaller/Wrapper/include/Sys/sysTypes.h
index 910dcdf..8caaa6e 100644
--- a/SysCaller/Wrapper/include/Sys/sysTypes.h
+++ b/SysCaller/Wrapper/include/Sys/sysTypes.h
@@ -4,11 +4,11 @@
#include "sysExternals.h"
#include "sysConstants.h"
-// #define USE_PISID // Uncomment this line to use PISID instead of PSID
-#define USE_DYNAMIC_ARRAY // Uncomment this line to use dynamic array
-#define USE_POINTER_SUBAUTH // Uncomment this line to use pointer to an array for SubAuthority
+// #define USE_PISID /* Uncomment this line to use PISID instead of PSID */
+#define USE_DYNAMIC_ARRAY /* Uncomment this line to use dynamic array */
+#define USE_POINTER_SUBAUTH /* Uncomment this line to use pointer to an array for SubAuthority */
-// APC Routines
+/* APC Routines */
typedef VOID(NTAPI * PPS_APC_ROUTINE)(
_In_opt_ PVOID ApcArgument1,
_In_opt_ PVOID ApcArgument2,
@@ -31,13 +31,13 @@ typedef VOID(NTAPI * IO_APC_ROUTINE)(
_In_ ULONG Reserved
);
-// User Thread Start Routine
+/* User Thread Start Routine */
typedef VOID(*PUSER_THREAD_START_ROUTINE)(PVOID);
-// Timer APC Routine
+/* Timer APC Routine */
typedef TIMER_APC_ROUTINE* PTIMER_APC_ROUTINE;
-// Boot Options
+/* Boot Options */
typedef struct _BOOT_OPTIONS
{
ULONG Version;
@@ -48,35 +48,35 @@ typedef struct _BOOT_OPTIONS
WCHAR HeadlessRedirection[1];
} BOOT_OPTIONS, * PBOOT_OPTIONS;
-// CM Extended Parameter
+/* CM Extended Parameter */
typedef struct DECLSPEC_ALIGN(8) _CM_EXTENDED_PARAMETER
{
- // Bit field for the type of the extended parameter
+ /* Bit field for the type of the extended parameter */
struct
{
- ULONG64 Type : CM_EXTENDED_PARAMETER_TYPE_BITS; // Type of the extended parameter
- ULONG64 Reserved : 64 - CM_EXTENDED_PARAMETER_TYPE_BITS; // Reserved bits for future use
+ ULONG64 Type : CM_EXTENDED_PARAMETER_TYPE_BITS; /* Type of the extended parameter */
+ ULONG64 Reserved : 64 - CM_EXTENDED_PARAMETER_TYPE_BITS; /* Reserved bits for future use */
};
- // Union to hold different types of data
+ /* Union to hold different types of data */
union
{
- ULONG64 ULong64; // 64-bit unsigned long
- PVOID Pointer; // Pointer to any type
- SIZE_T Size; // Size type
- HANDLE Handle; // Handle type
- ULONG ULong; // 32-bit unsigned long
- ACCESS_MASK AccessMask; // Access mask type
+ ULONG64 ULong64; /* 64-bit unsigned long */
+ PVOID Pointer; /* Pointer to any type */
+ SIZE_T Size; /* Size type */
+ HANDLE Handle; /* Handle type */
+ ULONG ULong; /* 32-bit unsigned long */
+ ACCESS_MASK AccessMask; /* Access mask type */
};
} CM_EXTENDED_PARAMETER, * PCM_EXTENDED_PARAMETER;
-// DBGKM Create Thread
+/* DBGKM Create Thread */
typedef struct _DBGKM_CREATE_THREAD
{
ULONG SubSystemKey;
PVOID StartAddress;
} DBGKM_CREATE_THREAD, * PDBGKM_CREATE_THREAD;
-// DBGKM Create Process
+/* DBGKM Create Process */
typedef struct _DBGKM_CREATE_PROCESS
{
ULONG SubSystemKey;
@@ -87,26 +87,26 @@ typedef struct _DBGKM_CREATE_PROCESS
DBGKM_CREATE_THREAD InitialThread;
} DBGKM_CREATE_PROCESS, * PDBGKM_CREATE_PROCESS;
-// DBGKM Exception
+/* DBGKM Exception */
typedef struct _DBGKM_EXCEPTION
{
EXCEPTION_RECORD ExceptionRecord;
ULONG FirstChance;
} DBGKM_EXCEPTION, * PDBGKM_EXCEPTION;
-// DBGKM Exit Thread
+/* DBGKM Exit Thread */
typedef struct _DBGKM_EXIT_THREAD
{
NTSTATUS ExitStatus;
} DBGKM_EXIT_THREAD, * PDBGKM_EXIT_THREAD;
-// DBGKM Exit Process
+/* DBGKM Exit Process */
typedef struct _DBGKM_EXIT_PROCESS
{
NTSTATUS ExitStatus;
} DBGKM_EXIT_PROCESS, * PDBGKM_EXIT_PROCESS;
-// DBGKM Load DLL
+/* DBGKM Load DLL */
typedef struct _DBGKM_LOAD_DLL
{
HANDLE FileHandle;
@@ -116,20 +116,20 @@ typedef struct _DBGKM_LOAD_DLL
PVOID NamePointer;
} DBGKM_LOAD_DLL, * PDBGKM_LOAD_DLL;
-// DBGKM Unload DLL
+/* DBGKM Unload DLL */
typedef struct _DBGKM_UNLOAD_DLL
{
PVOID BaseAddress;
} DBGKM_UNLOAD_DLL, * PDBGKM_UNLOAD_DLL;
-// DBGUI Create Thread
+/* DBGUI Create Thread */
typedef struct _DBGUI_CREATE_THREAD
{
HANDLE HandleToThread;
DBGKM_CREATE_THREAD NewThread;
} DBGUI_CREATE_THREAD, * PDBGUI_CREATE_THREAD;
-// DBGUI Create Process
+/* DBGUI Create Process */
typedef struct _DBGUI_CREATE_PROCESS
{
HANDLE HandleToProcess;
@@ -137,7 +137,7 @@ typedef struct _DBGUI_CREATE_PROCESS
DBGKM_CREATE_PROCESS NewProcess;
} DBGUI_CREATE_PROCESS, * PDBGUI_CREATE_PROCESS;
-// DBGUI Wait State Change
+/* DBGUI Wait State Change */
typedef struct _DBGUI_WAIT_STATE_CHANGE
{
DBG_STATE NewState;
@@ -154,17 +154,17 @@ typedef struct _DBGUI_WAIT_STATE_CHANGE
} StateInfo;
} DBGUI_WAIT_STATE_CHANGE, * PDBGUI_WAIT_STATE_CHANGE;
-// File Basic Information
+/* File Basic Information */
typedef struct _FILE_BASIC_INFORMATION
{
- LARGE_INTEGER CreationTime; // Specifies the time that the file was created.
- LARGE_INTEGER LastAccessTime; // Specifies the time that the file was last accessed.
- LARGE_INTEGER LastWriteTime; // Specifies the time that the file was last written to.
- LARGE_INTEGER ChangeTime; // Specifies the last time the file was changed.
- ULONG FileAttributes; // Specifies one or more FILE_ATTRIBUTE_XXX flags.
+ LARGE_INTEGER CreationTime; /* Specifies the time that the file was created. */
+ LARGE_INTEGER LastAccessTime; /* Specifies the time that the file was last accessed. */
+ LARGE_INTEGER LastWriteTime; /* Specifies the time that the file was last written to. */
+ LARGE_INTEGER ChangeTime; /* Specifies the last time the file was changed. */
+ ULONG FileAttributes; /* Specifies one or more FILE_ATTRIBUTE_XXX flags. */
} FILE_BASIC_INFORMATION, * PFILE_BASIC_INFORMATION;
-// File IO Completion Information
+/* File IO Completion Information */
typedef struct _FILE_IO_COMPLETION_INFORMATION
{
PVOID KeyContext;
@@ -172,7 +172,7 @@ typedef struct _FILE_IO_COMPLETION_INFORMATION
IO_STATUS_BLOCK IoStatusBlock;
} FILE_IO_COMPLETION_INFORMATION, * PFILE_IO_COMPLETION_INFORMATION;
-// File Network Open Information
+/* File Network Open Information */
typedef struct _FILE_NETWORK_OPEN_INFORMATION
{
LARGE_INTEGER CreationTime;
@@ -184,7 +184,7 @@ typedef struct _FILE_NETWORK_OPEN_INFORMATION
ULONG FileAttributes;
} FILE_NETWORK_OPEN_INFORMATION, * PFILE_NETWORK_OPEN_INFORMATION;
-// File Path
+/* File Path */
typedef struct _FILE_PATH
{
ULONG Version;
@@ -193,7 +193,7 @@ typedef struct _FILE_PATH
_Field_size_bytes_(Length) UCHAR FilePath[1];
} FILE_PATH, * PFILE_PATH;
-// Initial TEB
+/* Initial TEB */
typedef struct _INITIAL_TEB
{
struct
@@ -206,14 +206,14 @@ typedef struct _INITIAL_TEB
PVOID StackAllocationBase;
} INITIAL_TEB, * PINITIAL_TEB;
-// Memory Range Entry
+/* Memory Range Entry */
typedef struct _MEMORY_RANGE_ENTRY
{
PVOID VirtualAddress;
SIZE_T NumberOfBytes;
} MEMORY_RANGE_ENTRY, * PMEMORY_RANGE_ENTRY;
-// NTPSS Memory Bulk Information
+/* NTPSS Memory Bulk Information */
typedef struct _NTPSS_MEMORY_BULK_INFORMATION
{
ULONG QueryFlags;
@@ -221,7 +221,7 @@ typedef struct _NTPSS_MEMORY_BULK_INFORMATION
PVOID NextValidAddress;
} NTPSS_MEMORY_BULK_INFORMATION, * PNTPSS_MEMORY_BULK_INFORMATION;
-// Object Boundary Descriptor
+/* Object Boundary Descriptor */
typedef struct _OBJECT_BOUNDARY_DESCRIPTOR
{
ULONG Version;
@@ -236,10 +236,10 @@ typedef struct _OBJECT_BOUNDARY_DESCRIPTOR
ULONG Reserved : 31;
};
};
- //OBJECT_BOUNDARY_ENTRY Entries[1];
+ /* OBJECT_BOUNDARY_ENTRY Entries[1]; */
} OBJECT_BOUNDARY_DESCRIPTOR, * POBJECT_BOUNDARY_DESCRIPTOR;
-// PS Attribute
+/* PS Attribute */
typedef struct _PS_ATTRIBUTE
{
ULONG_PTR Attribute;
@@ -252,21 +252,21 @@ typedef struct _PS_ATTRIBUTE
PSIZE_T ReturnLength;
} PS_ATTRIBUTE, * PPS_ATTRIBUTE;
-// PS Attribute List
+/* PS Attribute List */
typedef struct _PS_ATTRIBUTE_LIST
{
SIZE_T TotalLength;
PS_ATTRIBUTE Attributes[1];
} PS_ATTRIBUTE_LIST, * PPS_ATTRIBUTE_LIST;
-// PS Create Info
+/* PS Create Info */
typedef struct _PS_CREATE_INFO
{
SIZE_T Size;
PS_CREATE_STATE State;
union
{
- // PsCreateInitialState
+ /* PsCreateInitialState */
struct
{
union
@@ -285,22 +285,22 @@ typedef struct _PS_CREATE_INFO
};
ACCESS_MASK AdditionalFileAccess;
} InitState;
- // PsCreateFailOnSectionCreate
+ /* PsCreateFailOnSectionCreate */
struct
{
HANDLE FileHandle;
} FailSection;
- // PsCreateFailExeFormat
+ /* PsCreateFailExeFormat */
struct
{
USHORT DllCharacteristics;
} ExeFormat;
- // PsCreateFailExeName
+ /* PsCreateFailExeName */
struct
{
HANDLE IFEOKey;
} ExeName;
- // PsCreateSuccess
+ /* PsCreateSuccess */
struct
{
union
@@ -310,7 +310,7 @@ typedef struct _PS_CREATE_INFO
{
UCHAR ProtectedProcess : 1;
UCHAR AddressSpaceOverride : 1;
- UCHAR DevOverrideEnabled : 1; // from Image File Execution Options
+ UCHAR DevOverrideEnabled : 1; /* from Image File Execution Options */
UCHAR ManifestDetected : 1;
UCHAR ProtectedProcessLight : 1;
UCHAR SpareBits1 : 3;
@@ -331,14 +331,14 @@ typedef struct _PS_CREATE_INFO
};
} PS_CREATE_INFO, * PPS_CREATE_INFO;
-// SE File Cache Claim Information
+/* SE File Cache Claim Information */
typedef struct _SE_FILE_CACHE_CLAIM_INFORMATION
{
ULONG Size;
PVOID Claim;
} SE_FILE_CACHE_CLAIM_INFORMATION, * PSE_FILE_CACHE_CLAIM_INFORMATION;
-// SE Set File Cache Information
+/* SE Set File Cache Information */
typedef struct _SE_SET_FILE_CACHE_INFORMATION
{
ULONG Size;
@@ -346,63 +346,63 @@ typedef struct _SE_SET_FILE_CACHE_INFORMATION
SE_FILE_CACHE_CLAIM_INFORMATION OriginClaimInfo;
} SE_SET_FILE_CACHE_INFORMATION, * PSE_SET_FILE_CACHE_INFORMATION;
-// System Thread Information
+/* System Thread Information */
typedef struct _SYSTEM_THREAD_INFO
{
- LARGE_INTEGER KernelTime; // Number of 100-nanosecond intervals spent executing kernel code.
- LARGE_INTEGER UserTime; // Number of 100-nanosecond intervals spent executing user code.
- LARGE_INTEGER CreateTime; // System time when the thread was created.
- ULONG WaitTime; // Time spent in ready queue or waiting (depending on the thread state).
- PVOID StartAddress; // Start address of the thread.
- CLIENT_ID ClientId; // ID of the thread and the process owning the thread.
- KPRIORITY Priority; // Dynamic thread priority.
- KPRIORITY BasePriority; // Base thread priority.
- ULONG ContextSwitches; // Total context switches.
- KTHREAD_STATE ThreadState; // Current thread state.
- KWAIT_REASON WaitReason; // The reason the thread is waiting.
+ LARGE_INTEGER KernelTime; /* Number of 100-nanosecond intervals spent executing kernel code. */
+ LARGE_INTEGER UserTime; /* Number of 100-nanosecond intervals spent executing user code. */
+ LARGE_INTEGER CreateTime; /* System time when the thread was created. */
+ ULONG WaitTime; /* Time spent in ready queue or waiting (depending on the thread state). */
+ PVOID StartAddress; /* Start address of the thread. */
+ CLIENT_ID ClientId; /* ID of the thread and the process owning the thread. */
+ KPRIORITY Priority; /* Dynamic thread priority. */
+ KPRIORITY BasePriority; /* Base thread priority. */
+ ULONG ContextSwitches; /* Total context switches. */
+ KTHREAD_STATE ThreadState; /* Current thread state. */
+ KWAIT_REASON WaitReason; /* The reason the thread is waiting. */
} SYSTEM_THREAD_INFO, * PSYSTEM_THREAD_INFO;
-// System Process Information
+/* System Process Information */
typedef struct _SYSTEM_PROCESS_INFO
{
- ULONG NextEntryOffset; // The address of the previous item plus the value in the NextEntryOffset member. For the last item in the array, NextEntryOffset is 0.
- ULONG NumberOfThreads; // The NumberOfThreads member contains the number of threads in the process.
- ULONGLONG WorkingSetPrivateSize; // since VISTA
- ULONG HardFaultCount; // since WIN7
- ULONG NumberOfThreadsHighWatermark; // The peak number of threads that were running at any given point in time, indicative of potential performance bottlenecks related to thread management.
- ULONGLONG CycleTime; // The sum of the cycle time of all threads in the process.
- LARGE_INTEGER CreateTime; // Number of 100-nanosecond intervals since the creation time of the process. Not updated during system timezone changes resullting in an incorrect value.
+ ULONG NextEntryOffset; /* The address of the previous item plus the value in the NextEntryOffset member. For the last item in the array, NextEntryOffset is 0. */
+ ULONG NumberOfThreads; /* The NumberOfThreads member contains the number of threads in the process. */
+ ULONGLONG WorkingSetPrivateSize; /* since VISTA */
+ ULONG HardFaultCount; /* since WIN7 */
+ ULONG NumberOfThreadsHighWatermark; /* The peak number of threads that were running at any given point in time, indicative of potential performance bottlenecks related to thread management. */
+ ULONGLONG CycleTime; /* The sum of the cycle time of all threads in the process. */
+ LARGE_INTEGER CreateTime; /* Number of 100-nanosecond intervals since the creation time of the process. Not updated during system timezone changes resullting in an incorrect value. */
LARGE_INTEGER UserTime;
LARGE_INTEGER KernelTime;
- UNICODE_STRING ImageName; // The file name of the executable image.
+ UNICODE_STRING ImageName; /* The file name of the executable image. */
KPRIORITY BasePriority;
HANDLE UniqueProcessId;
HANDLE InheritedFromUniqueProcessId;
ULONG HandleCount;
ULONG SessionId;
- ULONG_PTR UniqueProcessKey; // since VISTA (requires SystemExtendedProcessInformation)
- SIZE_T PeakVirtualSize; // The peak size, in bytes, of the virtual memory used by the process.
- SIZE_T VirtualSize; // The current size, in bytes, of virtual memory used by the process.
- ULONG PageFaultCount; // The member of page faults for data that is not currently in memory.
- SIZE_T PeakWorkingSetSize; // The peak size, in kilobytes, of the working set of the process.
- SIZE_T WorkingSetSize; // The number of pages visible to the process in physical memory. These pages are resident and available for use without triggering a page fault.
- SIZE_T QuotaPeakPagedPoolUsage; // The peak quota charged to the process for pool usage, in bytes.
- SIZE_T QuotaPagedPoolUsage; // The quota charged to the process for paged pool usage, in bytes.
- SIZE_T QuotaPeakNonPagedPoolUsage; // The peak quota charged to the process for nonpaged pool usage, in bytes.
- SIZE_T QuotaNonPagedPoolUsage; // The current quota charged to the process for nonpaged pool usage.
- SIZE_T PagefileUsage; // The PagefileUsage member contains the number of bytes of page file storage in use by the process.
- SIZE_T PeakPagefileUsage; // The maximum number of bytes of page-file storage used by the process.
- SIZE_T PrivatePageCount; // The number of memory pages allocated for the use by the process.
- LARGE_INTEGER ReadOperationCount; // The total number of read operations performed.
- LARGE_INTEGER WriteOperationCount; // The total number of write operations performed.
- LARGE_INTEGER OtherOperationCount; // The total number of I/O operations performed other than read and write operations.
- LARGE_INTEGER ReadTransferCount; // The total number of bytes read during a read operation.
- LARGE_INTEGER WriteTransferCount; // The total number of bytes written during a write operation.
- LARGE_INTEGER OtherTransferCount; // The total number of bytes transferred during operations other than read and write operations.
- SYSTEM_THREAD_INFORMATION Threads[1]; // This type is not defined in the structure but was added for convenience.
+ ULONG_PTR UniqueProcessKey; /* since VISTA (requires SystemExtendedProcessInformation) */
+ SIZE_T PeakVirtualSize; /* The peak size, in bytes, of the virtual memory used by the process. */
+ SIZE_T VirtualSize; /* The current size, in bytes, of virtual memory used by the process. */
+ ULONG PageFaultCount; /* The member of page faults for data that is not currently in memory. */
+ SIZE_T PeakWorkingSetSize; /* The peak size, in kilobytes, of the working set of the process. */
+ SIZE_T WorkingSetSize; /* The number of pages visible to the process in physical memory. These pages are resident and available for use without triggering a page fault. */
+ SIZE_T QuotaPeakPagedPoolUsage; /* The peak quota charged to the process for pool usage, in bytes. */
+ SIZE_T QuotaPagedPoolUsage; /* The quota charged to the process for paged pool usage, in bytes. */
+ SIZE_T QuotaPeakNonPagedPoolUsage; /* The peak quota charged to the process for nonpaged pool usage, in bytes. */
+ SIZE_T QuotaNonPagedPoolUsage; /* The current quota charged to the process for nonpaged pool usage. */
+ SIZE_T PagefileUsage; /* The PagefileUsage member contains the number of bytes of page file storage in use by the process. */
+ SIZE_T PeakPagefileUsage; /* The maximum number of bytes of page-file storage used by the process. */
+ SIZE_T PrivatePageCount; /* The number of memory pages allocated for the use by the process. */
+ LARGE_INTEGER ReadOperationCount; /* The total number of read operations performed. */
+ LARGE_INTEGER WriteOperationCount; /* The total number of write operations performed. */
+ LARGE_INTEGER OtherOperationCount; /* The total number of I/O operations performed other than read and write operations. */
+ LARGE_INTEGER ReadTransferCount; /* The total number of bytes read during a read operation. */
+ LARGE_INTEGER WriteTransferCount; /* The total number of bytes written during a write operation. */
+ LARGE_INTEGER OtherTransferCount; /* The total number of bytes transferred during operations other than read and write operations. */
+ SYSTEM_THREAD_INFORMATION Threads[1]; /* This type is not defined in the structure but was added for convenience. */
} SYSTEM_PROCESS_INFO, * PSYSTEM_PROCESS_INFO;
-// Thread Basic Information
+/* Thread Basic Information */
typedef struct _THREAD_BASIC_INFO
{
NTSTATUS ExitStatus;
@@ -413,7 +413,7 @@ typedef struct _THREAD_BASIC_INFO
KPRIORITY BasePriority;
} THREAD_BASIC_INFO, * PTHREAD_BASIC_INFO;
-// T2 Set Parameters
+/* T2 Set Parameters */
typedef struct _T2_SET_PARAMETERS_V0
{
ULONG Version;
@@ -421,7 +421,7 @@ typedef struct _T2_SET_PARAMETERS_V0
LONGLONG NoWakeTolerance;
} T2_SET_PARAMETERS, * PT2_SET_PARAMETERS;
-// WNF Delivery Descriptor
+/* WNF Delivery Descriptor */
typedef struct _WNF_DELIVERY_DESCRIPTOR
{
ULONGLONG SubscriptionId;
@@ -433,7 +433,7 @@ typedef struct _WNF_DELIVERY_DESCRIPTOR
ULONG StateDataOffset;
} WNF_DELIVERY_DESCRIPTOR, * PWNF_DELIVERY_DESCRIPTOR;
-// Worker Factory Deferred Work
+/* Worker Factory Deferred Work */
typedef struct _WORKER_FACTORY_DEFERRED_WORK
{
PPORT_MESSAGE AlpcSendMessage;
diff --git a/SysCaller/Wrapper/include/syscaller.h b/SysCaller/Wrapper/include/syscaller.h
index 0109ad1..aeba4d2 100644
--- a/SysCaller/Wrapper/include/syscaller.h
+++ b/SysCaller/Wrapper/include/syscaller.h
@@ -1,83 +1,83 @@
-#pragma once
-
-/*
- * SysCaller SDK
- * Copyright (c) 2025 micREsoft
- *
- * License: GPLv3
- *
- * This software is free to use, modify, and distribute under the terms
- * of the GNU General Public License version 3.
- *
- * You MAY NOT sell this software or derivative versions without also releasing
- * their full source code under the same license.
- *
- * For more information, see https://www.gnu.org/licenses/gpl-3.0.html
- */
-
- /*
- * SysCaller Build Configuration
- *
- * Define one of these macros in syscaller_config.h:
- * - SYSCALLER_DIRECT : Direct syscalls (default if none specified)
- * - SYSCALLER_INDIRECT : Indirect syscalls with runtime resolution
- * - SYSCALLER_INLINE : Inline ASM syscalls
- *
- * Optional: Define SYSCALLER_BINDINGS if building for multi language bindings
- *
- * Examples:
- * - Direct syscalls (C++ only): SYSCALLER_DIRECT
- * - Direct syscalls (bindings): SYSCALLER_DIRECT;SYSCALLER_BINDINGS
- * - Indirect syscalls (C++ only): SYSCALLER_INDIRECT
- * - Indirect syscalls (bindings): SYSCALLER_INDIRECT;SYSCALLER_BINDINGS
- * - Inline syscalls (C++ only): SYSCALLER_INLINE
- * - Inline syscalls (bindings): SYSCALLER_INLINE;SYSCALLER_BINDINGS
- *
- */
-
-#define SYSCALLER_BUILD_CONFIG
-#include "syscaller_config.h"
-#undef SYSCALLER_BUILD_CONFIG
-
-#if !defined(SYSCALLER_DIRECT) && !defined(SYSCALLER_INDIRECT) && !defined(SYSCALLER_INLINE)
-#define SYSCALLER_DIRECT
-#endif
-
-#if (defined(SYSCALLER_DIRECT) && defined(SYSCALLER_INDIRECT)) || \
- (defined(SYSCALLER_DIRECT) && defined(SYSCALLER_INLINE)) || \
- (defined(SYSCALLER_INDIRECT) && defined(SYSCALLER_INLINE))
-#error "Only one syscall mode can be defined: SYSCALLER_DIRECT, SYSCALLER_INDIRECT, or SYSCALLER_INLINE"
-#endif
-
-#define WIN32_LEAN_AND_MEAN
-#define NOMINMAX
-#define _WINSOCK_DEPRECATED_NO_WARNINGS
-#ifdef _WIN64
-#define _AMD64_
-#endif
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#pragma comment(lib, "winhttp.lib")
-#pragma comment(lib, "ws2_32.lib")
-
-#include
-#include
-#include
-#include
-
-#include "Sys/sysTypes.h"
-#include "Sys/sysExternals.h"
-#include "Sys/sysFunctions.h"
-
-#if defined(SYSCALLER_INDIRECT)
-#include "Resolver/Resolver.h"
-#endif
+#pragma once
+
+/*
+ * SysCaller SDK
+ * Copyright (c) 2025 micREsoft
+ *
+ * License: GPLv3
+ *
+ * This software is free to use, modify, and distribute under the terms
+ * of the GNU General Public License version 3.
+ *
+ * You MAY NOT sell this software or derivative versions without also releasing
+ * their full source code under the same license.
+ *
+ * For more information, see https://www.gnu.org/licenses/gpl-3.0.html
+ */
+
+ /*
+ * SysCaller Build Configuration
+ *
+ * Define one of these macros in syscaller_config.h:
+ * - SYSCALLER_DIRECT : Direct syscalls (default if none specified)
+ * - SYSCALLER_INDIRECT : Indirect syscalls with runtime resolution
+ * - SYSCALLER_INLINE : Inline ASM syscalls
+ *
+ * Optional: Define SYSCALLER_BINDINGS if building for multi language bindings
+ *
+ * Examples:
+ * - Direct syscalls (C++ only): SYSCALLER_DIRECT
+ * - Direct syscalls (bindings): SYSCALLER_DIRECT;SYSCALLER_BINDINGS
+ * - Indirect syscalls (C++ only): SYSCALLER_INDIRECT
+ * - Indirect syscalls (bindings): SYSCALLER_INDIRECT;SYSCALLER_BINDINGS
+ * - Inline syscalls (C++ only): SYSCALLER_INLINE
+ * - Inline syscalls (bindings): SYSCALLER_INLINE;SYSCALLER_BINDINGS
+ *
+ */
+
+#define SYSCALLER_BUILD_CONFIG
+#include "syscaller_config.h"
+#undef SYSCALLER_BUILD_CONFIG
+
+#if !defined(SYSCALLER_DIRECT) && !defined(SYSCALLER_INDIRECT) && !defined(SYSCALLER_INLINE)
+#define SYSCALLER_DIRECT
+#endif
+
+#if (defined(SYSCALLER_DIRECT) && defined(SYSCALLER_INDIRECT)) || \
+ (defined(SYSCALLER_DIRECT) && defined(SYSCALLER_INLINE)) || \
+ (defined(SYSCALLER_INDIRECT) && defined(SYSCALLER_INLINE))
+#error "Only one syscall mode can be defined: SYSCALLER_DIRECT, SYSCALLER_INDIRECT, or SYSCALLER_INLINE"
+#endif
+
+#define WIN32_LEAN_AND_MEAN
+#define NOMINMAX
+#define _WINSOCK_DEPRECATED_NO_WARNINGS
+#ifdef _WIN64
+#define _AMD64_
+#endif
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#pragma comment(lib, "winhttp.lib")
+#pragma comment(lib, "ws2_32.lib")
+
+#include
+#include
+#include
+#include
+
+#include "Sys/sysTypes.h"
+#include "Sys/sysExternals.h"
+#include "Sys/sysFunctions.h"
+
+#if defined(SYSCALLER_INDIRECT)
+#include "Resolver/Resolver.h"
+#endif
\ No newline at end of file
diff --git a/SysCaller/Wrapper/include/syscaller_config.h b/SysCaller/Wrapper/include/syscaller_config.h
index c6eea25..b68c04d 100644
--- a/SysCaller/Wrapper/include/syscaller_config.h
+++ b/SysCaller/Wrapper/include/syscaller_config.h
@@ -9,13 +9,13 @@
* Uncomment one of the following lines & add to preprocessor definitions to select your build mode:
*/
-// Direct syscalls (default), no runtime resolution
+/* Direct syscalls (default), no runtime resolution */
#define SYSCALLER_DIRECT
-// Indirect syscalls, runtime resolution
+/* Indirect syscalls, runtime resolution */
// #define SYSCALLER_INDIRECT
-// Inline ASM syscalls, embedded assembly
+/* Inline ASM syscalls, embedded assembly */
// #define SYSCALLER_INLINE
/*
diff --git a/SysCaller/Wrapper/src/DLL/dllmain.cpp b/SysCaller/Wrapper/src/DLL/dllmain.cpp
index 2e9f2d3..b7e84b8 100644
--- a/SysCaller/Wrapper/src/DLL/dllmain.cpp
+++ b/SysCaller/Wrapper/src/DLL/dllmain.cpp
@@ -1,18 +1,19 @@
#if defined(SYSCALLER_DIRECT)
-#pragma message("SysCaller: Building via DIRECT syscall mode!")
+#pragma message("SysCaller: Building via DIRECT syscall mode")
#elif defined(SYSCALLER_INDIRECT)
-#pragma message("SysCaller: Building via INDIRECT syscall mode!")
+#pragma message("SysCaller: Building via INDIRECT syscall mode")
#elif defined(SYSCALLER_INLINE)
-#pragma message("SysCaller: Building via INLINE ASM syscall mode!")
+#pragma message("SysCaller: Building via INLINE ASM syscall mode")
#else
-#pragma message("SysCaller: Building via DIRECT syscall mode! (default)")
+#pragma message("SysCaller: Building via DIRECT syscall mode (default)")
#endif
#if defined(SYSCALLER_BINDINGS)
-#pragma message("SysCaller: Building with BINDINGS support! (DLL export)")
+#pragma message("SysCaller: Building with BINDINGS support (DLL export)")
#endif
#ifdef SYSCALLER_BINDINGS
+/* bindings mode enabled, include DLL export functionality */
#include
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
@@ -20,5 +21,6 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
}
#else
-#pragma message("SysCaller: dllmain.cpp skipped! (SYSCALLER_BINDINGS not defined)")
-#endif
+/* not in bindings mode file compiles to nothing */
+#pragma message("SysCaller: dllmain.cpp skipped (SYSCALLER_BINDINGS not defined)")
+#endif
\ No newline at end of file
diff --git a/SysCaller/Wrapper/src/Resolver/Resolver.cpp b/SysCaller/Wrapper/src/Resolver/Resolver.cpp
index d980995..aad471f 100644
--- a/SysCaller/Wrapper/src/Resolver/Resolver.cpp
+++ b/SysCaller/Wrapper/src/Resolver/Resolver.cpp
@@ -13,7 +13,6 @@
#endif
#ifdef SYSCALLER_INDIRECT
-// Indirect syscall mode,include resolver implementation
#include "../../include/Resolver/Resolver.h"
#include
#include
@@ -169,6 +168,6 @@ void CleanupResolver()
}
#else
-// Not in indirect mode file compiles to nothing
+/* not in indirect mode file compiles to nothing */
#pragma message("SysCaller: Resolver.cpp skipped (SYSCALLER_INDIRECT not defined)")
#endif
diff --git a/SysCaller/Wrapper/src/build_info.cpp b/SysCaller/Wrapper/src/build_info.cpp
index f7517d4..163f5af 100644
--- a/SysCaller/Wrapper/src/build_info.cpp
+++ b/SysCaller/Wrapper/src/build_info.cpp
@@ -1,6 +1,6 @@
/*
* SysCaller Build Information
- * This file is always compiled to show the current build configuration
+ * this file is always compiled to show the current build configuration
*/
#if defined(SYSCALLER_DIRECT)
@@ -27,5 +27,5 @@
#include "../include/syscaller.h"
-// Empty function ensures this TU is compiled and processed
-void SysCallerBuildInfo() {}
+/* empty function ensures this TU is compiled and processed */
+void SysCallerBuildInfo() {}
\ No newline at end of file
diff --git a/SysCallerK/Wrapper/include/SysK/sysConstants_k.h b/SysCallerK/Wrapper/include/SysK/sysConstants_k.h
index dd241e1..5afa122 100644
--- a/SysCallerK/Wrapper/include/SysK/sysConstants_k.h
+++ b/SysCallerK/Wrapper/include/SysK/sysConstants_k.h
@@ -6,39 +6,34 @@
#define TLS_MINIMUM_AVAILABLE 64
#define RTL_MAX_DRIVE_LETTERS 32
-// ADD THESE TO GITHUB LATER
#define PAGE_SIZE 0x1000
#define PAGE_MASK 0xFFF
-
#ifndef PAGE_SHIFT
#define PAGE_SHIFT 0xC
#endif
-
-#define PAGE_NOACCESS 0x01 // Disables all access to the committed region of pages. An attempt to read from, write to, or execute the committed region results in an access violation.
-#define PAGE_READONLY 0x02 // Enables read-only access to the committed region of pages. An attempt to write or execute the committed region results in an access violation.
-#define PAGE_READWRITE 0x04 // Enables read-only or read/write access to the committed region of pages.
-#define PAGE_WRITECOPY 0x08 // Enables read-only or copy-on-write access to a mapped view of a file mapping object.
-#define PAGE_EXECUTE 0x10 // Enables execute access to the committed region of pages. An attempt to write to the committed region results in an access violation.
-#define PAGE_EXECUTE_READ 0x20 // Enables execute or read-only access to the committed region of pages. An attempt to write to the committed region results in an access violation.
-#define PAGE_EXECUTE_READWRITE 0x40 // Enables execute, read-only, or read/write access to the committed region of pages.
-#define PAGE_EXECUTE_WRITECOPY 0x80 // Enables execute, read-only, or copy-on-write access to a mapped view of a file mapping object.
-#define PAGE_GUARD 0x100 // Pages in the region become guard pages. Any attempt to access a guard page causes the system to raise a STATUS_GUARD_PAGE_VIOLATION exception.
-#define PAGE_NOCACHE 0x200 // Sets all pages to be non-cachable. Applications should not use this attribute. Using interlocked functions with memory that is mapped with SEC_NOCACHE can result in an EXCEPTION_ILLEGAL_INSTRUCTION exception.
-#define PAGE_WRITECOMBINE 0x400 // Sets all pages to be write-combined. Applications should not use this attribute. Using interlocked functions with memory that is mapped with SEC_NOCACHE can result in an EXCEPTION_ILLEGAL_INSTRUCTION exception.
-#define PAGE_REVERT_TO_FILE_MAP 0x80000000 // Pages in the region can revert modified copy-on-write pages to the original unmodified page when using the mapped view of a file mapping object.
-#define PAGE_ENCLAVE_THREAD_CONTROL 0x80000000 // Pages in the region contain a thread control structure (TCS) from the Intel Software Guard Extensions programming model.
-#define PAGE_TARGETS_NO_UPDATE 0x40000000 // Pages in the region will not update the CFG bitmap when the protection changes. The default behavior for VirtualProtect is to mark all locations as valid call targets for CFG.
-#define PAGE_TARGETS_INVALID 0x40000000 // Pages in the region are excluded from the CFG bitmap as valid targets. Any indirect call to locations in those pages will terminate the process using the __fastfail intrinsic.
-#define PAGE_ENCLAVE_UNVALIDATED 0x20000000 // Pages in the region are excluded from measurement with the EEXTEND instruction of the Intel Software Guard Extensions programming model.
+#define PAGE_NOACCESS 0x01 /* Disables all access to the committed region of pages. An attempt to read from, write to, or execute the committed region results in an access violation. */
+#define PAGE_READONLY 0x02 /* Enables read-only access to the committed region of pages. An attempt to write or execute the committed region results in an access violation. */
+#define PAGE_READWRITE 0x04 /* Enables read-only or read/write access to the committed region of pages. */
+#define PAGE_WRITECOPY 0x08 /* Enables read-only or copy-on-write access to a mapped view of a file mapping object. */
+#define PAGE_EXECUTE 0x10 /* Enables execute access to the committed region of pages. An attempt to write to the committed region results in an access violation. */
+#define PAGE_EXECUTE_READ 0x20 /* Enables execute or read-only access to the committed region of pages. An attempt to write to the committed region results in an access violation. */
+#define PAGE_EXECUTE_READWRITE 0x40 /* Enables execute, read-only, or read/write access to the committed region of pages. */
+#define PAGE_EXECUTE_WRITECOPY 0x80 /* Enables execute, read-only, or copy-on-write access to a mapped view of a file mapping object. */
+#define PAGE_GUARD 0x100 /* Pages in the region become guard pages. Any attempt to access a guard page causes the system to raise a STATUS_GUARD_PAGE_VIOLATION exception. */
+#define PAGE_NOCACHE 0x200 /* Sets all pages to be non-cachable. Applications should not use this attribute. Using interlocked functions with memory that is mapped with SEC_NOCACHE can result in an EXCEPTION_ILLEGAL_INSTRUCTION exception. */
+#define PAGE_WRITECOMBINE 0x400 /* Sets all pages to be write-combined. Applications should not use this attribute. Using interlocked functions with memory that is mapped with SEC_NOCACHE can result in an EXCEPTION_ILLEGAL_INSTRUCTION exception. */
+#define PAGE_REVERT_TO_FILE_MAP 0x80000000 /* Pages in the region can revert modified copy-on-write pages to the original unmodified page when using the mapped view of a file mapping object. */
+#define PAGE_ENCLAVE_THREAD_CONTROL 0x80000000 /* Pages in the region contain a thread control structure (TCS) from the Intel Software Guard Extensions programming model. */
+#define PAGE_TARGETS_NO_UPDATE 0x40000000 /* Pages in the region will not update the CFG bitmap when the protection changes. The default behavior for VirtualProtect is to mark all locations as valid call targets for CFG. */
+#define PAGE_TARGETS_INVALID 0x40000000 /* Pages in the region are excluded from the CFG bitmap as valid targets. Any indirect call to locations in those pages will terminate the process using the __fastfail intrinsic. */
+#define PAGE_ENCLAVE_UNVALIDATED 0x20000000 /* Pages in the region are excluded from measurement with the EEXTEND instruction of the Intel Software Guard Extensions programming model. */
#define PAGE_ENCLAVE_NO_CHANGE 0x20000000
#define PAGE_ENCLAVE_MASK 0x10000000
#define PAGE_ENCLAVE_DECOMMIT (PAGE_ENCLAVE_MASK | 0)
#define PAGE_ENCLAVE_SS_FIRST (PAGE_ENCLAVE_MASK | 1)
#define PAGE_ENCLAVE_SS_REST (PAGE_ENCLAVE_MASK | 2)
-//
-// Memory Region and Section Constants
-//
+/* Memory Region and Section Constants */
#ifndef GENERIC_ALL
#define GENERIC_ALL 0x10000000
#endif
@@ -69,7 +64,7 @@
#define SEC_HUGE_PAGES 0x00020000
#define SEC_PARTITION_OWNER_HANDLE 0x00040000
#define SEC_64K_PAGES 0x00080000
-#define SEC_DRIVER_IMAGE 0x00100000 // rev
+#define SEC_DRIVER_IMAGE 0x00100000 /* rev */
#define SEC_BASED 0x00200000
#define SEC_NO_CHANGE 0x00400000
#define SEC_FILE 0x00800000
diff --git a/SysCallerK/Wrapper/include/SysK/sysExternals_k.h b/SysCallerK/Wrapper/include/SysK/sysExternals_k.h
index feec4d8..b4fdae3 100644
--- a/SysCallerK/Wrapper/include/SysK/sysExternals_k.h
+++ b/SysCallerK/Wrapper/include/SysK/sysExternals_k.h
@@ -7,7 +7,7 @@ typedef struct _SYSK_WNF_STATE_NAME
ULONG Data[2];
} SYSK_WNF_STATE_NAME, * SYSK_PWNF_STATE_NAME;
-// WNF Type ID
+/* WNF Type ID */
typedef struct _WNF_TYPE_ID
{
GUID TypeId;
@@ -15,7 +15,7 @@ typedef struct _WNF_TYPE_ID
typedef unsigned long DWORD;
-// General Types
+/* General Types */
typedef LONG NTSTATUS;
typedef ULONG LOGICAL;
typedef ULONG_PTR SIZE_T;
@@ -38,7 +38,7 @@ typedef LCID * PLCID;
typedef const GUID * LPCGUID;
typedef GUID * LPGUID;
-// ALPC Types
+/* ALPC Types */
typedef struct _PORT_MESSAGE * PPORT_MESSAGE;
typedef struct _PORT_VIEW * PPORT_VIEW;
typedef struct _REMOTE_PORT_VIEW * PREMOTE_PORT_VIEW;
@@ -50,7 +50,7 @@ typedef struct _ALPC_DATA_VIEW_ATTR * PALPC_DATA_VIEW_ATTR;
typedef struct _ALPC_SECURITY_ATTR * PALPC_SECURITY_ATTR;
typedef HANDLE PALPC_HANDLE;
-// Proccess & Thread Types
+/* Proccess & Thread Types */
typedef struct _OBJECT_TYPE * POBJECT_TYPE;
typedef NTSTATUS * PNTSTATUS;
typedef HANDLE AUDIT_EVENT_HANDLE;
@@ -60,61 +60,62 @@ typedef ULONG PROCESS_ACTIVITY_TYPE;
typedef struct _RTL_ATOM * PRTL_ATOM;
typedef struct _TOKEN_SECURITY_ATTRIBUTES_INFORMATION * PTOKEN_SECURITY_ATTRIBUTES_INFORMATION;
typedef struct _SYSK_OBJECT_ATTRIBUTES * PSYSK_COBJECT_ATTRIBUTES;
+typedef enum _MEMORY_RESERVE_TYPE MEMORY_RESERVE_TYPE;
-// Enum Classes & Types ->
+/* Enum Classes & Types -> */
-// ALPC Message Information Classes
+/* ALPC Message Information Classes */
typedef enum _ALPC_MESSAGE_INFORMATION_CLASS
{
- AlpcMessageSidInformation, // q: out SID
- AlpcMessageTokenModifiedIdInformation, // q: out LUID
+ AlpcMessageSidInformation, /* q: out SID */
+ AlpcMessageTokenModifiedIdInformation, /* q: out LUID */
AlpcMessageDirectStatusInformation,
- AlpcMessageHandleInformation, // ALPC_MESSAGE_HANDLE_INFORMATION
+ AlpcMessageHandleInformation, /* ALPC_MESSAGE_HANDLE_INFORMATION */
MaxAlpcMessageInfoClass
} ALPC_MESSAGE_INFORMATION_CLASS, * PALPC_MESSAGE_INFORMATION_CLASS;
-// ALPC Port Information Classes
+/* ALPC Port Information Classes */
typedef enum _ALPC_PORT_INFORMATION_CLASS
{
- AlpcBasicInformation, // q: out ALPC_BASIC_INFORMATION
- AlpcPortInformation, // s: in ALPC_PORT_ATTRIBUTES
- AlpcAssociateCompletionPortInformation, // s: in ALPC_PORT_ASSOCIATE_COMPLETION_PORT
- AlpcConnectedSIDInformation, // q: in SID
- AlpcServerInformation, // q: inout ALPC_SERVER_INFORMATION
- AlpcMessageZoneInformation, // s: in ALPC_PORT_MESSAGE_ZONE_INFORMATION
- AlpcRegisterCompletionListInformation, // s: in ALPC_PORT_COMPLETION_LIST_INFORMATION
- AlpcUnregisterCompletionListInformation, // s: VOID
- AlpcAdjustCompletionListConcurrencyCountInformation, // s: in ULONG
- AlpcRegisterCallbackInformation, // s: ALPC_REGISTER_CALLBACK // kernel-mode only
- AlpcCompletionListRundownInformation, // s: VOID // 10
+ AlpcBasicInformation, /* q: out ALPC_BASIC_INFORMATION */
+ AlpcPortInformation, /* s: in ALPC_PORT_ATTRIBUTES */
+ AlpcAssociateCompletionPortInformation, /* s: in ALPC_PORT_ASSOCIATE_COMPLETION_PORT */
+ AlpcConnectedSIDInformation, /* q: in SID */
+ AlpcServerInformation, /* q: inout ALPC_SERVER_INFORMATION */
+ AlpcMessageZoneInformation, /* s: in ALPC_PORT_MESSAGE_ZONE_INFORMATION */
+ AlpcRegisterCompletionListInformation, /* s: in ALPC_PORT_COMPLETION_LIST_INFORMATION */
+ AlpcUnregisterCompletionListInformation, /* s: VOID */
+ AlpcAdjustCompletionListConcurrencyCountInformation, /* s: in ULONG */
+ AlpcRegisterCallbackInformation, /* s: ALPC_REGISTER_CALLBACK, kernel-mode only */
+ AlpcCompletionListRundownInformation, /* s: VOID, 10 */
AlpcWaitForPortReferences,
- AlpcServerSessionInformation // q: ALPC_SERVER_SESSION_INFORMATION // since 19H2
+ AlpcServerSessionInformation /* q: ALPC_SERVER_SESSION_INFORMATION, since 19H2 */
} ALPC_PORT_INFORMATION_CLASS;
-// Atom Information Classes
+/* Atom Information Classes */
typedef enum _ATOM_INFORMATION_CLASS
{
AtomBasicInformation,
AtomTableInformation
} ATOM_INFORMATION_CLASS;
-// CPU Partition Information Classes
+/* CPU Partition Information Classes */
typedef enum _CPU_PARTITION_INFORMATION_CLASS
{
- CpuPartitionBasicInformation, // q: BASIC_CPU_PARTITION_INFORMATION
- CpuPartitionPerformanceInformation, // q: CPU_PARTITION_PERFORMANCE_INFORMATION
- CpuPartitionTopologyInformation, // q: CPU_PARTITION_TOPOLOGY_INFORMATION
- CpuPartitionAffinityInformation, // q; s: CPU_PARTITION_AFFINITY_INFORMATION
- CpuPartitionPolicyInformation, // q; s: CPU_PARTITION_POLICY_INFORMATION
- CpuPartitionSchedulingInformation, // q: CPU_PARTITION_SCHEDULING_INFORMATION
- CpuPartitionResourceControl, // s: CPU_PARTITION_RESOURCE_CONTROL_INFORMATION
- CpuPartitionPowerManagement, // q; s: CPU_PARTITION_POWER_MANAGEMENT_INFORMATION
- CpuPartitionStatistics, // q: CPU_PARTITION_STATISTICS_INFORMATION
- CpuPartitionDebugInformation, // q: CPU_PARTITION_DEBUG_INFORMATION
+ CpuPartitionBasicInformation, /* q: BASIC_CPU_PARTITION_INFORMATION */
+ CpuPartitionPerformanceInformation, /* q: CPU_PARTITION_PERFORMANCE_INFORMATION */
+ CpuPartitionTopologyInformation, /* q: CPU_PARTITION_TOPOLOGY_INFORMATION */
+ CpuPartitionAffinityInformation, /* q; s: CPU_PARTITION_AFFINITY_INFORMATION */
+ CpuPartitionPolicyInformation, /* q; s: CPU_PARTITION_POLICY_INFORMATION */
+ CpuPartitionSchedulingInformation, /* q: CPU_PARTITION_SCHEDULING_INFORMATION */
+ CpuPartitionResourceControl, /* s: CPU_PARTITION_RESOURCE_CONTROL_INFORMATION */
+ CpuPartitionPowerManagement, /* q; s: CPU_PARTITION_POWER_MANAGEMENT_INFORMATION */
+ CpuPartitionStatistics, /* q: CPU_PARTITION_STATISTICS_INFORMATION */
+ CpuPartitionDebugInformation, /* q: CPU_PARTITION_DEBUG_INFORMATION */
CpuPartitionMax
} CPU_PARTITION_INFORMATION_CLASS, * PCPU_PARTITION_INFORMATION_CLASS;
-// Debug States
+/* Debug States */
typedef enum _DBG_STATE
{
DbgIdle,
@@ -130,48 +131,48 @@ typedef enum _DBG_STATE
DbgUnloadDllStateChange
} DBG_STATE, * PDBG_STATE;
-// Debug Object Information Classes
+/* Debug Object Information Classes */
typedef enum _DEBUGOBJECTINFOCLASS
{
DebugObjectUnusedInformation,
- DebugObjectKillProcessOnExitInformation, // s: ULONG
+ DebugObjectKillProcessOnExitInformation, /* s: ULONG */
MaxDebugObjectInfoClass
} DEBUGOBJECTINFOCLASS, * PDEBUGOBJECTINFOCLASS;
-// Directory Notify Information Classes
+/* Directory Notify Information Classes */
typedef enum _SYSK_DIRECTORY_NOTIFY_INFORMATION_CLASS {
SysKDirectoryNotifyInformation,
SysKDirectoryNotifyInformationEx,
SysKDirectoryNotifyInformationMax
} SYSK_DIRECTORY_NOTIFY_INFORMATION_CLASS;
-// ETW Trace Control Codes
+/* ETW Trace Control Codes */
typedef enum _ETWTRACECONTROLCODE
{
- EtwStartLoggerCode = 1, // inout WMI_LOGGER_INFORMATION
- EtwStopLoggerCode = 2, // inout WMI_LOGGER_INFORMATION
- EtwQueryLoggerCode = 3, // inout WMI_LOGGER_INFORMATION
- EtwUpdateLoggerCode = 4, // inout WMI_LOGGER_INFORMATION
- EtwFlushLoggerCode = 5, // inout WMI_LOGGER_INFORMATION
- EtwIncrementLoggerFile = 6, // inout WMI_LOGGER_INFORMATION
- EtwRealtimeTransition = 7, // inout WMI_LOGGER_INFORMATION
- // reserved
+ EtwStartLoggerCode = 1, /* inout WMI_LOGGER_INFORMATION */
+ EtwStopLoggerCode = 2, /* inout WMI_LOGGER_INFORMATION */
+ EtwQueryLoggerCode = 3, /* inout WMI_LOGGER_INFORMATION */
+ EtwUpdateLoggerCode = 4, /* inout WMI_LOGGER_INFORMATION */
+ EtwFlushLoggerCode = 5, /* inout WMI_LOGGER_INFORMATION */
+ EtwIncrementLoggerFile = 6, /* inout WMI_LOGGER_INFORMATION */
+ EtwRealtimeTransition = 7, /* inout WMI_LOGGER_INFORMATION */
+ /* reserved */
EtwRealtimeConnectCode = 11,
EtwActivityIdCreate = 12,
EtwWdiScenarioCode = 13,
- EtwRealtimeDisconnectCode = 14, // in HANDLE
+ EtwRealtimeDisconnectCode = 14, /* in HANDLE */
EtwRegisterGuidsCode = 15,
EtwReceiveNotification = 16,
- EtwSendDataBlock = 17, // ETW_ENABLE_NOTIFICATION_PACKET // ETW_SESSION_NOTIFICATION_PACKET
+ EtwSendDataBlock = 17, /* ETW_ENABLE_NOTIFICATION_PACKET, ETW_SESSION_NOTIFICATION_PACKET */
EtwSendReplyDataBlock = 18,
EtwReceiveReplyDataBlock = 19,
EtwWdiSemUpdate = 20,
- EtwEnumTraceGuidList = 21, // out GUID[]
- EtwGetTraceGuidInfo = 22, // in GUID, out ETW_TRACE_GUID_INFO
- EtwEnumerateTraceGuids = 23, // out TRACE_GUID_PROPERTIES[]
+ EtwEnumTraceGuidList = 21, /* out GUID[] */
+ EtwGetTraceGuidInfo = 22, /* in GUID, out ETW_TRACE_GUID_INFO */
+ EtwEnumerateTraceGuids = 23, /* out TRACE_GUID_PROPERTIES[] */
EtwRegisterSecurityProv = 24,
- EtwReferenceTimeCode = 25, // in ULONG LoggerId, out ETW_REF_CLOCK
- EtwTrackBinaryCode = 26, // in HANDLE
+ EtwReferenceTimeCode = 25, /* in ULONG LoggerId, out ETW_REF_CLOCK */
+ EtwTrackBinaryCode = 26, /* in HANDLE */
EtwAddNotificationEvent = 27,
EtwUpdateDisallowList = 28,
EtwSetEnableAllKeywordsCode = 29,
@@ -187,26 +188,26 @@ typedef enum _ETWTRACECONTROLCODE
EtwRegisterPrivateSession = 39,
EtwQuerySessionDemuxObject = 40,
EtwSetProviderBinaryTracking = 41,
- EtwMaxLoggers = 42, // out ULONG
- EtwMaxPmcCounter = 43, // out ULONG
- EtwQueryUsedProcessorCount = 44, // ULONG // since WIN11
+ EtwMaxLoggers = 42, /* out ULONG */
+ EtwMaxPmcCounter = 43, /* out ULONG */
+ EtwQueryUsedProcessorCount = 44, /* ULONG, since WIN11 */
EtwGetPmcOwnership = 45,
EtwGetPmcSessions = 46,
} ETWTRACECONTROLCODE;
-// Event Information Classes
+/* Event Information Classes */
typedef enum _EVENT_INFORMATION_CLASS
{
EventBasicInformation
} EVENT_INFORMATION_CLASS;
-// Event Types
+/* Event Types */
typedef enum _SYSK_EVENT_TYPE {
SysKNotificationEvent,
SysKSynchronizationEvent,
} SYSK_EVENT_TYPE;
-// Filter Boot Option Operations
+/* Filter Boot Option Operations */
typedef enum _FILTER_BOOT_OPTION_OPERATION {
FilterBootOptionAdd,
FilterBootOptionRemove,
@@ -214,34 +215,34 @@ typedef enum _FILTER_BOOT_OPTION_OPERATION {
FilterBootOptionQuery
} FILTER_BOOT_OPTION_OPERATION;
-// File System Information Classes
+/* File System Information Classes */
typedef enum _SYSK_FSINFOCLASS
{
- SysKFileFsVolumeInformation = 1, // q: FILE_FS_VOLUME_INFORMATION
- SysKFileFsLabelInformation, // s: FILE_FS_LABEL_INFORMATION (requires FILE_WRITE_DATA to volume)
- SysKFileFsSizeInformation, // q: FILE_FS_SIZE_INFORMATION
- SysKFileFsDeviceInformation, // q: FILE_FS_DEVICE_INFORMATION
- SysKFileFsAttributeInformation, // q: FILE_FS_ATTRIBUTE_INFORMATION
- SysKFileFsControlInformation, // q, s: FILE_FS_CONTROL_INFORMATION (q: requires FILE_READ_DATA; s: requires FILE_WRITE_DATA to volume)
- SysKFileFsFullSizeInformation, // q: FILE_FS_FULL_SIZE_INFORMATION
- SysKFileFsObjectIdInformation, // q; s: FILE_FS_OBJECTID_INFORMATION (s: requires FILE_WRITE_DATA to volume)
- SysKFileFsDriverPathInformation, // q: FILE_FS_DRIVER_PATH_INFORMATION
- SysKFileFsVolumeFlagsInformation, // q; s: FILE_FS_VOLUME_FLAGS_INFORMATION (q: requires FILE_READ_ATTRIBUTES; s: requires FILE_WRITE_ATTRIBUTES to volume) // 10
- SysKFileFsSectorSizeInformation, // q: FILE_FS_SECTOR_SIZE_INFORMATION // since WIN8
- SysKFileFsDataCopyInformation, // q: FILE_FS_DATA_COPY_INFORMATION
- SysKFileFsMetadataSizeInformation, // q: FILE_FS_METADATA_SIZE_INFORMATION // since THRESHOLD
- SysKFileFsFullSizeInformationEx, // q: FILE_FS_FULL_SIZE_INFORMATION_EX // since REDSTONE5
- SysKFileFsGuidInformation, // q: FILE_FS_GUID_INFORMATION // since 23H2
+ SysKFileFsVolumeInformation = 1, /* q: FILE_FS_VOLUME_INFORMATION */
+ SysKFileFsLabelInformation, /* s: FILE_FS_LABEL_INFORMATION (requires FILE_WRITE_DATA to volume) */
+ SysKFileFsSizeInformation, /* q: FILE_FS_SIZE_INFORMATION */
+ SysKFileFsDeviceInformation, /* q: FILE_FS_DEVICE_INFORMATION */
+ SysKFileFsAttributeInformation, /* q: FILE_FS_ATTRIBUTE_INFORMATION */
+ SysKFileFsControlInformation, /* q, s: FILE_FS_CONTROL_INFORMATION (q: requires FILE_READ_DATA; s: requires FILE_WRITE_DATA to volume) */
+ SysKFileFsFullSizeInformation, /* q: FILE_FS_FULL_SIZE_INFORMATION */
+ SysKFileFsObjectIdInformation, /* q; s: FILE_FS_OBJECTID_INFORMATION (s: requires FILE_WRITE_DATA to volume) */
+ SysKFileFsDriverPathInformation, /* q: FILE_FS_DRIVER_PATH_INFORMATION */
+ SysKFileFsVolumeFlagsInformation, /* q; s: FILE_FS_VOLUME_FLAGS_INFORMATION (q: requires FILE_READ_ATTRIBUTES; s: requires FILE_WRITE_ATTRIBUTES to volume), 10 */
+ SysKFileFsSectorSizeInformation, /* q: FILE_FS_SECTOR_SIZE_INFORMATION, since WIN8 */
+ SysKFileFsDataCopyInformation, /* q: FILE_FS_DATA_COPY_INFORMATION */
+ SysKFileFsMetadataSizeInformation, /* q: FILE_FS_METADATA_SIZE_INFORMATION, since THRESHOLD */
+ SysKFileFsFullSizeInformationEx, /* q: FILE_FS_FULL_SIZE_INFORMATION_EX, since REDSTONE5 */
+ SysKFileFsGuidInformation, /* q: FILE_FS_GUID_INFORMATION, since 23H2 */
SysKFileFsMaximumInformation
} SYSK_FSINFOCLASS, * PSYSK_FSINFOCLASS;
-// IO Completion Information Classes
+/* IO Completion Information Classes */
typedef enum _IO_COMPLETION_INFORMATION_CLASS
{
IoCompletionBasicInformation
} IO_COMPLETION_INFORMATION_CLASS;
-// IO Session Events
+/* IO Session Events */
typedef enum _SYSK_IO_SESSION_EVENT
{
SysKIoSessionEventIgnore,
@@ -254,7 +255,7 @@ typedef enum _SYSK_IO_SESSION_EVENT
SysKIoSessionEventMax
} SYSK_IO_SESSION_EVENT;
-// IO Session States
+/* IO Session States */
typedef enum _SYSK_IO_SESSION_STATE
{
SysKIoSessionStateCreated = 1,
@@ -268,7 +269,7 @@ typedef enum _SYSK_IO_SESSION_STATE
SysKIoSessionStateMax
} SYSK_IO_SESSION_STATE;
-// Job Object Information Classes
+/* Job Object Information Classes */
typedef enum _JOBOBJECTINFOCLASS {
JobObjectBasicAccountingInformation = 1,
@@ -325,35 +326,35 @@ typedef enum _JOBOBJECTINFOCLASS {
JobObjectMax = 52
} JOBOBJECTINFOCLASS;
-// Key Information Classes
+/* Key Information Classes */
typedef enum _SYSK_KEY_INFORMATION_CLASS
{
- SysKKeyBasicInformation, // KEY_BASIC_INFORMATION
- SysKKeyNodeInformation, // KEY_NODE_INFORMATION
- SysKKeyFullInformation, // KEY_FULL_INFORMATION
- SysKKeyNameInformation, // KEY_NAME_INFORMATION
- SysKKeyCachedInformation, // KEY_CACHED_INFORMATION
- SysKKeyFlagsInformation, // KEY_FLAGS_INFORMATION
- SysKKeyVirtualizationInformation, // KEY_VIRTUALIZATION_INFORMATION
- SysKKeyHandleTagsInformation, // KEY_HANDLE_TAGS_INFORMATION
- SysKKeyTrustInformation, // KEY_TRUST_INFORMATION
- SysKKeyLayerInformation, // KEY_LAYER_INFORMATION
+ SysKKeyBasicInformation, /* KEY_BASIC_INFORMATION */
+ SysKKeyNodeInformation, /* KEY_NODE_INFORMATION */
+ SysKKeyFullInformation, /* KEY_FULL_INFORMATION */
+ SysKKeyNameInformation, /* KEY_NAME_INFORMATION */
+ SysKKeyCachedInformation, /* KEY_CACHED_INFORMATION */
+ SysKKeyFlagsInformation, /* KEY_FLAGS_INFORMATION */
+ SysKKeyVirtualizationInformation, /* KEY_VIRTUALIZATION_INFORMATION */
+ SysKKeyHandleTagsInformation, /* KEY_HANDLE_TAGS_INFORMATION */
+ SysKKeyTrustInformation, /* KEY_TRUST_INFORMATION */
+ SysKKeyLayerInformation, /* KEY_LAYER_INFORMATION */
SysKMaxKeyInfoClass
} SYSK_KEY_INFORMATION_CLASS;
-// Key Value Information Classes
+/* Key Value Information Classes */
typedef enum _SYSK_KEY_VALUE_INFORMATION_CLASS
{
- SysKKeyValueBasicInformation, // KEY_VALUE_BASIC_INFORMATION
- SysKKeyValueFullInformation, // KEY_VALUE_FULL_INFORMATION
- SysKKeyValuePartialInformation, // KEY_VALUE_PARTIAL_INFORMATION
+ SysKKeyValueBasicInformation, /* KEY_VALUE_BASIC_INFORMATION */
+ SysKKeyValueFullInformation, /* KEY_VALUE_FULL_INFORMATION */
+ SysKKeyValuePartialInformation, /* KEY_VALUE_PARTIAL_INFORMATION */
SysKKeyValueFullInformationAlign64,
- SysKKeyValuePartialInformationAlign64, // KEY_VALUE_PARTIAL_INFORMATION_ALIGN64
- SysKKeyValueLayerInformation, // KEY_VALUE_LAYER_INFORMATION
+ SysKKeyValuePartialInformationAlign64, /* KEY_VALUE_PARTIAL_INFORMATION_ALIGN64 */
+ SysKKeyValueLayerInformation, /* KEY_VALUE_LAYER_INFORMATION */
SysKMaxKeyValueInfoClass
} SYSK_KEY_VALUE_INFORMATION_CLASS;
-// KProfile Sources
+/* KProfile Sources */
typedef enum _SYSK_KPROFILE_SOURCE {
SysKProfileTime,
SysKProfileAlignmentFaults,
@@ -367,7 +368,7 @@ typedef enum _SYSK_KPROFILE_SOURCE {
SysKProfileMaximum
} SYSK_KPROFILE_SOURCE;
-// KThread State
+/* KThread State */
typedef enum _KTHREAD_STATE
{
Initialized,
@@ -383,77 +384,77 @@ typedef enum _KTHREAD_STATE
MaximumThreadState
} KTHREAD_STATE, *PKTHREAD_STATE;
-// KWait Reason
+/* KWait Reason */
typedef enum _SYSK_KWAIT_REASON
{
- SysKExecutive, // Waiting for an executive event.
- SysKFreePage, // Waiting for a free page.
- SysKPageIn, // Waiting for a page to be read in.
- SysKPoolAllocation, // Waiting for a pool allocation.
- SysKDelayExecution, // Waiting due to a delay execution. // NtDelayExecution
- SysKSuspended, // Waiting because the thread is suspended. // NtSuspendThread
- SysKUserRequest, // Waiting due to a user request. // NtWaitForSingleObject
- SysKWrExecutive, // Waiting for an executive event.
- SysKWrFreePage, // Waiting for a free page.
- SysKWrPageIn, // Waiting for a page to be read in.
- SysKWrPoolAllocation, // Waiting for a pool allocation.
- SysKWrDelayExecution, // Waiting due to a delay execution.
- SysKWrSuspended, // Waiting because the thread is suspended.
- SysKWrUserRequest, // Waiting due to a user request.
- SysKWrEventPair, // Waiting for an event pair. // NtCreateEventPair
- SysKWrQueue, // Waiting for a queue. // NtRemoveIoCompletion
- SysKWrLpcReceive, // Waiting for an LPC receive.
- SysKWrLpcReply, // Waiting for an LPC reply.
- SysKWrVirtualMemory, // Waiting for virtual memory.
- SysKWrPageOut, // Waiting for a page to be written out.
- SysKWrRendezvous, // Waiting for a rendezvous.
- SysKWrKeyedEvent, // Waiting for a keyed event. // NtCreateKeyedEvent
- SysKWrTerminated, // Waiting for thread termination.
- SysKWrProcessInSwap, // Waiting for a process to be swapped in.
- SysKWrCpuRateControl, // Waiting for CPU rate control.
- SysKWrCalloutStack, // Waiting for a callout stack.
- SysKWrKernel, // Waiting for a kernel event.
- SysKWrResource, // Waiting for a resource.
- SysKWrPushLock, // Waiting for a push lock.
- SysKWrMutex, // Waiting for a mutex.
- SysKWrQuantumEnd, // Waiting for the end of a quantum.
- SysKWrDispatchInt, // Waiting for a dispatch interrupt.
- SysKWrPreempted, // Waiting because the thread was preempted.
- SysKWrYieldExecution, // Waiting to yield execution.
- SysKWrFastMutex, // Waiting for a fast mutex.
- SysKWrGuardedMutex, // Waiting for a guarded mutex.
- SysKWrRundown, // Waiting for a rundown.
- SysKWrAlertByThreadId, // Waiting for an alert by thread ID.
- SysKWrDeferredPreempt, // Waiting for a deferred preemption.
- SysKWrPhysicalFault, // Waiting for a physical fault.
- SysKWrIoRing, // Waiting for an I/O ring.
- SysKWrMdlCache, // Waiting for an MDL cache.
- SysKWrRcu, // Waiting for read-copy-update (RCU) synchronization.
+ SysKExecutive, /* Waiting for an executive event. */
+ SysKFreePage, /* Waiting for a free page. */
+ SysKPageIn, /* Waiting for a page to be read in. */
+ SysKPoolAllocation, /* Waiting for a pool allocation. */
+ SysKDelayExecution, /* Waiting due to a delay execution. NtDelayExecution */
+ SysKSuspended, /* Waiting because the thread is suspended. NtSuspendThread */
+ SysKUserRequest, /* Waiting due to a user request. NtWaitForSingleObject */
+ SysKWrExecutive, /* Waiting for an executive event. */
+ SysKWrFreePage, /* Waiting for a free page. */
+ SysKWrPageIn, /* Waiting for a page to be read in. */
+ SysKWrPoolAllocation, /* Waiting for a pool allocation. */
+ SysKWrDelayExecution, /* Waiting due to a delay execution. */
+ SysKWrSuspended, /* Waiting because the thread is suspended. */
+ SysKWrUserRequest, /* Waiting due to a user request. */
+ SysKWrEventPair, /* Waiting for an event pair. NtCreateEventPair */
+ SysKWrQueue, /* Waiting for a queue. NtRemoveIoCompletion */
+ SysKWrLpcReceive, /* Waiting for an LPC receive. */
+ SysKWrLpcReply, /* Waiting for an LPC reply. */
+ SysKWrVirtualMemory, /* Waiting for virtual memory. */
+ SysKWrPageOut, /* Waiting for a page to be written out. */
+ SysKWrRendezvous, /* Waiting for a rendezvous. */
+ SysKWrKeyedEvent, /* Waiting for a keyed event. NtCreateKeyedEvent */
+ SysKWrTerminated, /* Waiting for thread termination. */
+ SysKWrProcessInSwap, /* Waiting for a process to be swapped in. */
+ SysKWrCpuRateControl, /* Waiting for CPU rate control. */
+ SysKWrCalloutStack, /* Waiting for a callout stack. */
+ SysKWrKernel, /* Waiting for a kernel event. */
+ SysKWrResource, /* Waiting for a resource. */
+ SysKWrPushLock, /* Waiting for a push lock. */
+ SysKWrMutex, /* Waiting for a mutex. */
+ SysKWrQuantumEnd, /* Waiting for the end of a quantum. */
+ SysKWrDispatchInt, /* Waiting for a dispatch interrupt. */
+ SysKWrPreempted, /* Waiting because the thread was preempted. */
+ SysKWrYieldExecution, /* Waiting to yield execution. */
+ SysKWrFastMutex, /* Waiting for a fast mutex. */
+ SysKWrGuardedMutex, /* Waiting for a guarded mutex. */
+ SysKWrRundown, /* Waiting for a rundown. */
+ SysKWrAlertByThreadId, /* Waiting for an alert by thread ID. */
+ SysKWrDeferredPreempt, /* Waiting for a deferred preemption. */
+ SysKWrPhysicalFault, /* Waiting for a physical fault. */
+ SysKWrIoRing, /* Waiting for an I/O ring. */
+ SysKWrMdlCache, /* Waiting for an MDL cache. */
+ SysKWrRcu, /* Waiting for read-copy-update (RCU) synchronization. */
SysKMaximumWaitReason
} SYSK_KWAIT_REASON, *PSYSK_KWAIT_REASON;
-// Memory Information CLasses
+/* Memory Information CLasses */
typedef enum _SYSK_MEMORY_INFORMATION_CLASS
{
- SysKMemoryBasicInformation, // q: MEMORY_BASIC_INFORMATION
- SysKMemoryWorkingSetInformation, // q: MEMORY_WORKING_SET_INFORMATION
- SysKMemoryMappedFilenameInformation, // q: UNICODE_STRING
- SysKMemoryRegionInformation, // q: MEMORY_REGION_INFORMATION
- SysKMemoryWorkingSetExInformation, // q: MEMORY_WORKING_SET_EX_INFORMATION // since VISTA
- SysKMemorySharedCommitInformation, // q: MEMORY_SHARED_COMMIT_INFORMATION // since WIN8
- SysKMemoryImageInformation, // q: MEMORY_IMAGE_INFORMATION
- SysKMemoryRegionInformationEx, // MEMORY_REGION_INFORMATION
- SysKMemoryPrivilegedBasicInformation, // MEMORY_BASIC_INFORMATION
- SysKMemoryEnclaveImageInformation, // MEMORY_ENCLAVE_IMAGE_INFORMATION // since REDSTONE3
- SysKMemoryBasicInformationCapped, // 10
- SysKMemoryPhysicalContiguityInformation, // MEMORY_PHYSICAL_CONTIGUITY_INFORMATION // since 20H1
- SysKMemoryBadInformation, // since WIN11
- SysKMemoryBadInformationAllProcesses, // since 22H1
- SysKMemoryImageExtensionInformation, // MEMORY_IMAGE_EXTENSION_INFORMATION // since 24H2
+ SysKMemoryBasicInformation, /* q: MEMORY_BASIC_INFORMATION */
+ SysKMemoryWorkingSetInformation, /* q: MEMORY_WORKING_SET_INFORMATION */
+ SysKMemoryMappedFilenameInformation, /* q: UNICODE_STRING */
+ SysKMemoryRegionInformation, /* q: MEMORY_REGION_INFORMATION */
+ SysKMemoryWorkingSetExInformation, /* q: MEMORY_WORKING_SET_EX_INFORMATION, since VISTA */
+ SysKMemorySharedCommitInformation, /* q: MEMORY_SHARED_COMMIT_INFORMATION, since WIN8 */
+ SysKMemoryImageInformation, /* q: MEMORY_IMAGE_INFORMATION */
+ SysKMemoryRegionInformationEx, /* MEMORY_REGION_INFORMATION */
+ SysKMemoryPrivilegedBasicInformation, /* MEMORY_BASIC_INFORMATION */
+ SysKMemoryEnclaveImageInformation, /* MEMORY_ENCLAVE_IMAGE_INFORMATION, since REDSTONE3 */
+ SysKMemoryBasicInformationCapped, /* 10 */
+ SysKMemoryPhysicalContiguityInformation, /* MEMORY_PHYSICAL_CONTIGUITY_INFORMATION, since 20H1 */
+ SysKMemoryBadInformation, /* since WIN11 */
+ SysKMemoryBadInformationAllProcesses, /* since 22H1 */
+ SysKMemoryImageExtensionInformation, /* MEMORY_IMAGE_EXTENSION_INFORMATION, since 24H2 */
SysKMaxMemoryInfoClass
} SYSK_MEMORY_INFORMATION_CLASS;
-// Memory Reserve Type
+/* Memory Reserve Type */
typedef enum _MEMORY_RESERVE_TYPE
{
MemoryReserveUserApc,
@@ -461,72 +462,72 @@ typedef enum _MEMORY_RESERVE_TYPE
MemoryReserveTypeMax
} MEMORY_RESERVE_TYPE;
-// Mutant Information Classes
+/* Mutant Information Classes */
typedef enum _MUTANT_INFORMATION_CLASS
{
- MutantBasicInformation, // MUTANT_BASIC_INFORMATION
- MutantOwnerInformation // MUTANT_OWNER_INFORMATION
+ MutantBasicInformation, /* MUTANT_BASIC_INFORMATION */
+ MutantOwnerInformation /* MUTANT_OWNER_INFORMATION */
} MUTANT_INFORMATION_CLASS;
-// Partition Information Classses
+/* Partition Information Classses */
typedef enum _SYSK_PARTITION_INFORMATION_CLASS
{
- SysKSystemMemoryPartitionInformation, // q: MEMORY_PARTITION_CONFIGURATION_INFORMATION
- SysKSystemMemoryPartitionMoveMemory, // s: MEMORY_PARTITION_TRANSFER_INFORMATION
- SysKSystemMemoryPartitionAddPagefile, // s: MEMORY_PARTITION_PAGEFILE_INFORMATION
- SysKSystemMemoryPartitionCombineMemory, // q; s: MEMORY_PARTITION_PAGE_COMBINE_INFORMATION
- SysKSystemMemoryPartitionInitialAddMemory, // q; s: MEMORY_PARTITION_INITIAL_ADD_INFORMATION
- SysKSystemMemoryPartitionGetMemoryEvents, // MEMORY_PARTITION_MEMORY_EVENTS_INFORMATION // since REDSTONE2
+ SysKSystemMemoryPartitionInformation, /* q: MEMORY_PARTITION_CONFIGURATION_INFORMATION */
+ SysKSystemMemoryPartitionMoveMemory, /* s: MEMORY_PARTITION_TRANSFER_INFORMATION */
+ SysKSystemMemoryPartitionAddPagefile, /* s: MEMORY_PARTITION_PAGEFILE_INFORMATION */
+ SysKSystemMemoryPartitionCombineMemory, /* q; s: MEMORY_PARTITION_PAGE_COMBINE_INFORMATION */
+ SysKSystemMemoryPartitionInitialAddMemory, /* q; s: MEMORY_PARTITION_INITIAL_ADD_INFORMATION */
+ SysKSystemMemoryPartitionGetMemoryEvents, /* MEMORY_PARTITION_MEMORY_EVENTS_INFORMATION, since REDSTONE2 */
SysKSystemMemoryPartitionSetAttributes,
SysKSystemMemoryPartitionNodeInformation,
SysKSystemMemoryPartitionCreateLargePages,
SysKSystemMemoryPartitionDedicatedMemoryInformation,
- SysKSystemMemoryPartitionOpenDedicatedMemory, // 10
+ SysKSystemMemoryPartitionOpenDedicatedMemory, /* 10 */
SysKSystemMemoryPartitionMemoryChargeAttributes,
SysKSystemMemoryPartitionClearAttributes,
- SysKSystemMemoryPartitionSetMemoryThresholds, // since WIN11
- SysKSystemMemoryPartitionMemoryListCommand, // since 24H2
+ SysKSystemMemoryPartitionSetMemoryThresholds, /* since WIN11 */
+ SysKSystemMemoryPartitionMemoryListCommand, /* since 24H2 */
SysKSystemMemoryPartitionMax
} SYSK_PARTITION_INFORMATION_CLASS, * SYSK_PPARTITION_INFORMATION_CLASS;
-// PlugPlay Control Classes
+/* PlugPlay Control Classes */
typedef enum _PLUGPLAY_CONTROL_CLASS
{
- PlugPlayControlEnumerateDevice, // PLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA
- PlugPlayControlRegisterNewDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
- PlugPlayControlDeregisterDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
- PlugPlayControlInitializeDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
- PlugPlayControlStartDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
- PlugPlayControlUnlockDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
- PlugPlayControlQueryAndRemoveDevice, // PLUGPLAY_CONTROL_QUERY_AND_REMOVE_DATA
- PlugPlayControlUserResponse, // PLUGPLAY_CONTROL_USER_RESPONSE_DATA
- PlugPlayControlGenerateLegacyDevice, // PLUGPLAY_CONTROL_LEGACY_DEVGEN_DATA
- PlugPlayControlGetInterfaceDeviceList, // PLUGPLAY_CONTROL_INTERFACE_LIST_DATA
- PlugPlayControlProperty, // PLUGPLAY_CONTROL_PROPERTY_DATA
- PlugPlayControlDeviceClassAssociation, // PLUGPLAY_CONTROL_CLASS_ASSOCIATION_DATA
- PlugPlayControlGetRelatedDevice, // PLUGPLAY_CONTROL_RELATED_DEVICE_DATA
- PlugPlayControlGetInterfaceDeviceAlias, // PLUGPLAY_CONTROL_INTERFACE_ALIAS_DATA
- PlugPlayControlDeviceStatus, // PLUGPLAY_CONTROL_STATUS_DATA
- PlugPlayControlGetDeviceDepth, // PLUGPLAY_CONTROL_DEPTH_DATA
- PlugPlayControlQueryDeviceRelations, // PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA
- PlugPlayControlTargetDeviceRelation, // PLUGPLAY_CONTROL_TARGET_RELATION_DATA
- PlugPlayControlQueryConflictList, // PLUGPLAY_CONTROL_CONFLICT_LIST
- PlugPlayControlRetrieveDock, // PLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA
- PlugPlayControlResetDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
- PlugPlayControlHaltDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
- PlugPlayControlGetBlockedDriverList, // PLUGPLAY_CONTROL_BLOCKED_DRIVER_DATA
- PlugPlayControlGetDeviceInterfaceEnabled, // PLUGPLAY_CONTROL_DEVICE_INTERFACE_ENABLED
+ PlugPlayControlEnumerateDevice, /* PLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA */
+ PlugPlayControlRegisterNewDevice, /* PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA */
+ PlugPlayControlDeregisterDevice, /* PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA */
+ PlugPlayControlInitializeDevice, /* PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA */
+ PlugPlayControlStartDevice, /* PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA */
+ PlugPlayControlUnlockDevice, /* PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA */
+ PlugPlayControlQueryAndRemoveDevice, /* PLUGPLAY_CONTROL_QUERY_AND_REMOVE_DATA */
+ PlugPlayControlUserResponse, /* PLUGPLAY_CONTROL_USER_RESPONSE_DATA */
+ PlugPlayControlGenerateLegacyDevice, /* PLUGPLAY_CONTROL_LEGACY_DEVGEN_DATA */
+ PlugPlayControlGetInterfaceDeviceList, /* PLUGPLAY_CONTROL_INTERFACE_LIST_DATA */
+ PlugPlayControlProperty, /* PLUGPLAY_CONTROL_PROPERTY_DATA */
+ PlugPlayControlDeviceClassAssociation, /* PLUGPLAY_CONTROL_CLASS_ASSOCIATION_DATA */
+ PlugPlayControlGetRelatedDevice, /* PLUGPLAY_CONTROL_RELATED_DEVICE_DATA */
+ PlugPlayControlGetInterfaceDeviceAlias, /* PLUGPLAY_CONTROL_INTERFACE_ALIAS_DATA */
+ PlugPlayControlDeviceStatus, /* PLUGPLAY_CONTROL_STATUS_DATA */
+ PlugPlayControlGetDeviceDepth, /* PLUGPLAY_CONTROL_DEPTH_DATA */
+ PlugPlayControlQueryDeviceRelations, /* PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA */
+ PlugPlayControlTargetDeviceRelation, /* PLUGPLAY_CONTROL_TARGET_RELATION_DATA */
+ PlugPlayControlQueryConflictList, /* PLUGPLAY_CONTROL_CONFLICT_LIST */
+ PlugPlayControlRetrieveDock, /* PLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA */
+ PlugPlayControlResetDevice, /* PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA */
+ PlugPlayControlHaltDevice, /* PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA */
+ PlugPlayControlGetBlockedDriverList, /* PLUGPLAY_CONTROL_BLOCKED_DRIVER_DATA */
+ PlugPlayControlGetDeviceInterfaceEnabled, /* PLUGPLAY_CONTROL_DEVICE_INTERFACE_ENABLED */
MaxPlugPlayControl
} PLUGPLAY_CONTROL_CLASS, * PPLUGPLAY_CONTROL_CLASS;
-// Port Information Classes
+/* Port Information Classes */
typedef enum _PORT_INFORMATION_CLASS
{
PortBasicInformation,
PortDumpInformation
} PORT_INFORMATION_CLASS;
-// Process State Change Types
+/* Process State Change Types */
typedef enum _PROCESS_STATE_CHANGE_TYPE
{
ProcessStateChangeSuspend,
@@ -534,7 +535,7 @@ typedef enum _PROCESS_STATE_CHANGE_TYPE
ProcessStateChangeMax,
} PROCESS_STATE_CHANGE_TYPE, * PPROCESS_STATE_CHANGE_TYPE;
-// PS Create States
+/* PS Create States */
typedef enum _PS_CREATE_STATE
{
PsCreateInitialState,
@@ -542,30 +543,30 @@ typedef enum _PS_CREATE_STATE
PsCreateFailOnSectionCreate,
PsCreateFailExeFormat,
PsCreateFailMachineMismatch,
- PsCreateFailExeName, // Debugger specified
+ PsCreateFailExeName, /* Debugger specified */
PsCreateSuccess,
PsCreateMaximumStates
} PS_CREATE_STATE;
-// Section Information Classes
+/* Section Information Classes */
typedef enum _SECTION_INFORMATION_CLASS
{
- SectionBasicInformation, // q; SECTION_BASIC_INFORMATION
- SectionImageInformation, // q; SECTION_IMAGE_INFORMATION
- SectionRelocationInformation, // q; ULONG_PTR RelocationDelta // name:wow64:whNtQuerySection_SectionRelocationInformation // since WIN7
- SectionOriginalBaseInformation, // q; PVOID BaseAddress // since REDSTONE
- SectionInternalImageInformation, // SECTION_INTERNAL_IMAGE_INFORMATION // since REDSTONE2
+ SectionBasicInformation, /* q; SECTION_BASIC_INFORMATION */
+ SectionImageInformation, /* q; SECTION_IMAGE_INFORMATION */
+ SectionRelocationInformation, /* q; ULONG_PTR RelocationDelta, name:wow64:whNtQuerySection_SectionRelocationInformation, since WIN7 */
+ SectionOriginalBaseInformation, /* q; PVOID BaseAddress, since REDSTONE */
+ SectionInternalImageInformation, /* SECTION_INTERNAL_IMAGE_INFORMATION, since REDSTONE2 */
MaxSectionInfoClass
} SECTION_INFORMATION_CLASS;
-// Section Inherit
+/* Section Inherit */
typedef enum _SYSK_SECTION_INHERIT
{
SysKViewShare = 1,
SysKViewUnmap = 2
} SYSK_SECTION_INHERIT;
-// Secure Setting Value Types
+/* Secure Setting Value Types */
typedef enum _SECURE_SETTING_VALUE_TYPE
{
SecureSettingValueTypeBoolean = 0,
@@ -575,53 +576,53 @@ typedef enum _SECURE_SETTING_VALUE_TYPE
SecureSettingValueTypeUnknown = 4
} SECURE_SETTING_VALUE_TYPE, * PSECURE_SETTING_VALUE_TYPE;
-// Semaphore Information Classes
+/* Semaphore Information Classes */
typedef enum _SEMAPHORE_INFORMATION_CLASS
{
SemaphoreBasicInformation
} SEMAPHORE_INFORMATION_CLASS;
-// Shutdown Actions
+/* Shutdown Actions */
typedef enum _SHUTDOWN_ACTION
{
ShutdownNoReboot,
ShutdownReboot,
ShutdownPowerOff,
- ShutdownRebootForRecovery // since WIN11
+ ShutdownRebootForRecovery /* since WIN11 */
} SHUTDOWN_ACTION;
-// Symbolic Link Info Classes
+/* Symbolic Link Info Classes */
typedef enum _SYMBOLIC_LINK_INFO_CLASS
{
- SymbolicLinkGlobalInformation = 1, // s: ULONG
- SymbolicLinkAccessMask, // s: ACCESS_MASK
+ SymbolicLinkGlobalInformation = 1, /* s: ULONG */
+ SymbolicLinkAccessMask, /* s: ACCESS_MASK */
MaxnSymbolicLinkInfoClass
} SYMBOLIC_LINK_INFO_CLASS;
-// SYSDBG Commands
+/* SYSDBG Commands */
typedef enum _SYSDBG_COMMAND
{
SysDbgQueryModuleInformation,
SysDbgQueryTraceInformation,
SysDbgSetTracepoint,
- SysDbgSetSpecialCall, // PVOID
- SysDbgClearSpecialCalls, // void
+ SysDbgSetSpecialCall, /* PVOID */
+ SysDbgClearSpecialCalls, /* void */
SysDbgQuerySpecialCalls,
SysDbgBreakPoint,
- SysDbgQueryVersion, // DBGKD_GET_VERSION64
- SysDbgReadVirtual, // SYSDBG_VIRTUAL
- SysDbgWriteVirtual, // SYSDBG_VIRTUAL
- SysDbgReadPhysical, // SYSDBG_PHYSICAL // 10
- SysDbgWritePhysical, // SYSDBG_PHYSICAL
- SysDbgReadControlSpace, // SYSDBG_CONTROL_SPACE
- SysDbgWriteControlSpace, // SYSDBG_CONTROL_SPACE
- SysDbgReadIoSpace, // SYSDBG_IO_SPACE
- SysDbgWriteIoSpace, // SYSDBG_IO_SPACE
- SysDbgReadMsr, // SYSDBG_MSR
- SysDbgWriteMsr, // SYSDBG_MSR
- SysDbgReadBusData, // SYSDBG_BUS_DATA
- SysDbgWriteBusData, // SYSDBG_BUS_DATA
- SysDbgCheckLowMemory, // 20
+ SysDbgQueryVersion, /* DBGKD_GET_VERSION64 */
+ SysDbgReadVirtual, /* SYSDBG_VIRTUAL */
+ SysDbgWriteVirtual, /* SYSDBG_VIRTUAL */
+ SysDbgReadPhysical, /* SYSDBG_PHYSICAL, 10 */
+ SysDbgWritePhysical, /* SYSDBG_PHYSICAL */
+ SysDbgReadControlSpace, /* SYSDBG_CONTROL_SPACE */
+ SysDbgWriteControlSpace, /* SYSDBG_CONTROL_SPACE */
+ SysDbgReadIoSpace, /* SYSDBG_IO_SPACE */
+ SysDbgWriteIoSpace, /* SYSDBG_IO_SPACE */
+ SysDbgReadMsr, /* SYSDBG_MSR */
+ SysDbgWriteMsr, /* SYSDBG_MSR */
+ SysDbgReadBusData, /* SYSDBG_BUS_DATA */
+ SysDbgWriteBusData, /* SYSDBG_BUS_DATA */
+ SysDbgCheckLowMemory, /* 20 */
SysDbgEnableKernelDebugger,
SysDbgDisableKernelDebugger,
SysDbgGetAutoKdEnable,
@@ -630,280 +631,280 @@ typedef enum _SYSDBG_COMMAND
SysDbgSetPrintBufferSize,
SysDbgGetKdUmExceptionEnable,
SysDbgSetKdUmExceptionEnable,
- SysDbgGetTriageDump, // SYSDBG_TRIAGE_DUMP
- SysDbgGetKdBlockEnable, // 30
+ SysDbgGetTriageDump, /* SYSDBG_TRIAGE_DUMP */
+ SysDbgGetKdBlockEnable, /* 30 */
SysDbgSetKdBlockEnable,
SysDbgRegisterForUmBreakInfo,
SysDbgGetUmBreakPid,
SysDbgClearUmBreakPid,
SysDbgGetUmAttachPid,
SysDbgClearUmAttachPid,
- SysDbgGetLiveKernelDump, // SYSDBG_LIVEDUMP_CONTROL
- SysDbgKdPullRemoteFile, // SYSDBG_KD_PULL_REMOTE_FILE
+ SysDbgGetLiveKernelDump, /* SYSDBG_LIVEDUMP_CONTROL */
+ SysDbgKdPullRemoteFile, /* SYSDBG_KD_PULL_REMOTE_FILE */
SysDbgMaxInfoClass
} SYSDBG_COMMAND, * PSYSDBG_COMMAND;
-// System Information Classes
+/* System Information Classes */
typedef enum _SYSTEM_INFORMATION_CLASS
{
- SystemBasicInformation, // q: SYSTEM_BASIC_INFORMATION
- SystemProcessorInformation, // q: SYSTEM_PROCESSOR_INFORMATION
- SystemPerformanceInformation, // q: SYSTEM_PERFORMANCE_INFORMATION
- SystemTimeOfDayInformation, // q: SYSTEM_TIMEOFDAY_INFORMATION
- SystemPathInformation, // not implemented
- SystemProcessInformation, // q: SYSTEM_PROCESS_INFORMATION
- SystemCallCountInformation, // q: SYSTEM_CALL_COUNT_INFORMATION
- SystemDeviceInformation, // q: SYSTEM_DEVICE_INFORMATION
- SystemProcessorPerformanceInformation, // q: SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION (EX in: USHORT ProcessorGroup)
- SystemFlagsInformation, // q: SYSTEM_FLAGS_INFORMATION
- SystemCallTimeInformation, // not implemented // SYSTEM_CALL_TIME_INFORMATION // 10
- SystemModuleInformation, // q: RTL_PROCESS_MODULES
- SystemLocksInformation, // q: RTL_PROCESS_LOCKS
- SystemStackTraceInformation, // q: RTL_PROCESS_BACKTRACES
- SystemPagedPoolInformation, // not implemented
- SystemNonPagedPoolInformation, // not implemented
- SystemHandleInformation, // q: SYSTEM_HANDLE_INFORMATION
- SystemObjectInformation, // q: SYSTEM_OBJECTTYPE_INFORMATION mixed with SYSTEM_OBJECT_INFORMATION
- SystemPageFileInformation, // q: SYSTEM_PAGEFILE_INFORMATION
- SystemVdmInstemulInformation, // q: SYSTEM_VDM_INSTEMUL_INFO
- SystemVdmBopInformation, // not implemented // 20
- SystemFileCacheInformation, // q: SYSTEM_FILECACHE_INFORMATION; s (requires SeIncreaseQuotaPrivilege) (info for WorkingSetTypeSystemCache)
- SystemPoolTagInformation, // q: SYSTEM_POOLTAG_INFORMATION
- SystemInterruptInformation, // q: SYSTEM_INTERRUPT_INFORMATION (EX in: USHORT ProcessorGroup)
- SystemDpcBehaviorInformation, // q: SYSTEM_DPC_BEHAVIOR_INFORMATION; s: SYSTEM_DPC_BEHAVIOR_INFORMATION (requires SeLoadDriverPrivilege)
- SystemFullMemoryInformation, // not implemented // SYSTEM_MEMORY_USAGE_INFORMATION
- SystemLoadGdiDriverInformation, // s (kernel-mode only)
- SystemUnloadGdiDriverInformation, // s (kernel-mode only)
- SystemTimeAdjustmentInformation, // q: SYSTEM_QUERY_TIME_ADJUST_INFORMATION; s: SYSTEM_SET_TIME_ADJUST_INFORMATION (requires SeSystemtimePrivilege)
- SystemSummaryMemoryInformation, // not implemented // SYSTEM_MEMORY_USAGE_INFORMATION
- SystemMirrorMemoryInformation, // s (requires license value "Kernel-MemoryMirroringSupported") (requires SeShutdownPrivilege) // 30
- SystemPerformanceTraceInformation, // q; s: (type depends on EVENT_TRACE_INFORMATION_CLASS)
- SystemObsolete0, // not implemented
- SystemExceptionInformation, // q: SYSTEM_EXCEPTION_INFORMATION
- SystemCrashDumpStateInformation, // s: SYSTEM_CRASH_DUMP_STATE_INFORMATION (requires SeDebugPrivilege)
- SystemKernelDebuggerInformation, // q: SYSTEM_KERNEL_DEBUGGER_INFORMATION
- SystemContextSwitchInformation, // q: SYSTEM_CONTEXT_SWITCH_INFORMATION
- SystemRegistryQuotaInformation, // q: SYSTEM_REGISTRY_QUOTA_INFORMATION; s (requires SeIncreaseQuotaPrivilege)
- SystemExtendServiceTableInformation, // s (requires SeLoadDriverPrivilege) // loads win32k only
- SystemPrioritySeparation, // s (requires SeTcbPrivilege)
- SystemVerifierAddDriverInformation, // s: UNICODE_STRING (requires SeDebugPrivilege) // 40
- SystemVerifierRemoveDriverInformation, // s: UNICODE_STRING (requires SeDebugPrivilege)
- SystemProcessorIdleInformation, // q: SYSTEM_PROCESSOR_IDLE_INFORMATION (EX: USHORT ProcessorGroup)
- SystemLegacyDriverInformation, // q: SYSTEM_LEGACY_DRIVER_INFORMATION
- SystemCurrentTimeZoneInformation, // q; s: RTL_TIME_ZONE_INFORMATION
- SystemLookasideInformation, // q: SYSTEM_LOOKASIDE_INFORMATION
- SystemTimeSlipNotification, // s: HANDLE (NtCreateEvent) (requires SeSystemtimePrivilege)
- SystemSessionCreate, // not implemented
- SystemSessionDetach, // not implemented
- SystemSessionInformation, // not implemented (SYSTEM_SESSION_INFORMATION)
- SystemRangeStartInformation, // q: SYSTEM_RANGE_START_INFORMATION // 50
- SystemVerifierInformation, // q: SYSTEM_VERIFIER_INFORMATION; s (requires SeDebugPrivilege)
- SystemVerifierThunkExtend, // s (kernel-mode only)
- SystemSessionProcessInformation, // q: SYSTEM_SESSION_PROCESS_INFORMATION
- SystemLoadGdiDriverInSystemSpace, // s: SYSTEM_GDI_DRIVER_INFORMATION (kernel-mode only) (same as SystemLoadGdiDriverInformation)
- SystemNumaProcessorMap, // q: SYSTEM_NUMA_INFORMATION
- SystemPrefetcherInformation, // q; s: PREFETCHER_INFORMATION // PfSnQueryPrefetcherInformation
- SystemExtendedProcessInformation, // q: SYSTEM_EXTENDED_PROCESS_INFORMATION
- SystemRecommendedSharedDataAlignment, // q: ULONG // KeGetRecommendedSharedDataAlignment
- SystemComPlusPackage, // q; s: ULONG
- SystemNumaAvailableMemory, // q: SYSTEM_NUMA_INFORMATION // 60
- SystemProcessorPowerInformation, // q: SYSTEM_PROCESSOR_POWER_INFORMATION (EX in: USHORT ProcessorGroup)
- SystemEmulationBasicInformation, // q: SYSTEM_BASIC_INFORMATION
- SystemEmulationProcessorInformation, // q: SYSTEM_PROCESSOR_INFORMATION
- SystemExtendedHandleInformation, // q: SYSTEM_HANDLE_INFORMATION_EX
- SystemLostDelayedWriteInformation, // q: ULONG
- SystemBigPoolInformation, // q: SYSTEM_BIGPOOL_INFORMATION
- SystemSessionPoolTagInformation, // q: SYSTEM_SESSION_POOLTAG_INFORMATION
- SystemSessionMappedViewInformation, // q: SYSTEM_SESSION_MAPPED_VIEW_INFORMATION
- SystemHotpatchInformation, // q; s: SYSTEM_HOTPATCH_CODE_INFORMATION
- SystemObjectSecurityMode, // q: ULONG // 70
- SystemWatchdogTimerHandler, // s: SYSTEM_WATCHDOG_HANDLER_INFORMATION // (kernel-mode only)
- SystemWatchdogTimerInformation, // q: SYSTEM_WATCHDOG_TIMER_INFORMATION // NtQuerySystemInformationEx // (kernel-mode only)
- SystemLogicalProcessorInformation, // q: SYSTEM_LOGICAL_PROCESSOR_INFORMATION (EX in: USHORT ProcessorGroup) // NtQuerySystemInformationEx
- SystemWow64SharedInformationObsolete, // not implemented
- SystemRegisterFirmwareTableInformationHandler, // s: SYSTEM_FIRMWARE_TABLE_HANDLER // (kernel-mode only)
- SystemFirmwareTableInformation, // SYSTEM_FIRMWARE_TABLE_INFORMATION
- SystemModuleInformationEx, // q: RTL_PROCESS_MODULE_INFORMATION_EX // since VISTA
- SystemVerifierTriageInformation, // not implemented
- SystemSuperfetchInformation, // q; s: SUPERFETCH_INFORMATION // PfQuerySuperfetchInformation
- SystemMemoryListInformation, // q: SYSTEM_MEMORY_LIST_INFORMATION; s: SYSTEM_MEMORY_LIST_COMMAND (requires SeProfileSingleProcessPrivilege) // 80
- SystemFileCacheInformationEx, // q: SYSTEM_FILECACHE_INFORMATION; s (requires SeIncreaseQuotaPrivilege) (same as SystemFileCacheInformation)
- SystemThreadPriorityClientIdInformation, // s: SYSTEM_THREAD_CID_PRIORITY_INFORMATION (requires SeIncreaseBasePriorityPrivilege) // NtQuerySystemInformationEx
- SystemProcessorIdleCycleTimeInformation, // q: SYSTEM_PROCESSOR_IDLE_CYCLE_TIME_INFORMATION[] (EX in: USHORT ProcessorGroup) // NtQuerySystemInformationEx
- SystemVerifierCancellationInformation, // SYSTEM_VERIFIER_CANCELLATION_INFORMATION // name:wow64:whNT32QuerySystemVerifierCancellationInformation
- SystemProcessorPowerInformationEx, // not implemented
- SystemRefTraceInformation, // q; s: SYSTEM_REF_TRACE_INFORMATION // ObQueryRefTraceInformation
- SystemSpecialPoolInformation, // q; s: SYSTEM_SPECIAL_POOL_INFORMATION (requires SeDebugPrivilege) // MmSpecialPoolTag, then MmSpecialPoolCatchOverruns != 0
- SystemProcessIdInformation, // q: SYSTEM_PROCESS_ID_INFORMATION
- SystemErrorPortInformation, // s (requires SeTcbPrivilege)
- SystemBootEnvironmentInformation, // q: SYSTEM_BOOT_ENVIRONMENT_INFORMATION // 90
- SystemHypervisorInformation, // q: SYSTEM_HYPERVISOR_QUERY_INFORMATION
- SystemVerifierInformationEx, // q; s: SYSTEM_VERIFIER_INFORMATION_EX
- SystemTimeZoneInformation, // q; s: RTL_TIME_ZONE_INFORMATION (requires SeTimeZonePrivilege)
- SystemImageFileExecutionOptionsInformation, // s: SYSTEM_IMAGE_FILE_EXECUTION_OPTIONS_INFORMATION (requires SeTcbPrivilege)
- SystemCoverageInformation, // q: COVERAGE_MODULES s: COVERAGE_MODULE_REQUEST // ExpCovQueryInformation (requires SeDebugPrivilege)
- SystemPrefetchPatchInformation, // SYSTEM_PREFETCH_PATCH_INFORMATION
- SystemVerifierFaultsInformation, // s: SYSTEM_VERIFIER_FAULTS_INFORMATION (requires SeDebugPrivilege)
- SystemSystemPartitionInformation, // q: SYSTEM_SYSTEM_PARTITION_INFORMATION
- SystemSystemDiskInformation, // q: SYSTEM_SYSTEM_DISK_INFORMATION
- SystemProcessorPerformanceDistribution, // q: SYSTEM_PROCESSOR_PERFORMANCE_DISTRIBUTION (EX in: USHORT ProcessorGroup) // NtQuerySystemInformationEx // 100
- SystemNumaProximityNodeInformation, // q; s: SYSTEM_NUMA_PROXIMITY_MAP
- SystemDynamicTimeZoneInformation, // q; s: RTL_DYNAMIC_TIME_ZONE_INFORMATION (requires SeTimeZonePrivilege)
- SystemCodeIntegrityInformation, // q: SYSTEM_CODEINTEGRITY_INFORMATION // SeCodeIntegrityQueryInformation
- SystemProcessorMicrocodeUpdateInformation, // s: SYSTEM_PROCESSOR_MICROCODE_UPDATE_INFORMATION
- SystemProcessorBrandString, // q: CHAR[] // HaliQuerySystemInformation -> HalpGetProcessorBrandString, info class 23
- SystemVirtualAddressInformation, // q: SYSTEM_VA_LIST_INFORMATION[]; s: SYSTEM_VA_LIST_INFORMATION[] (requires SeIncreaseQuotaPrivilege) // MmQuerySystemVaInformation
- SystemLogicalProcessorAndGroupInformation, // q: SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX (EX in: LOGICAL_PROCESSOR_RELATIONSHIP RelationshipType) // since WIN7 // NtQuerySystemInformationEx // KeQueryLogicalProcessorRelationship
- SystemProcessorCycleTimeInformation, // q: SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION[] (EX in: USHORT ProcessorGroup) // NtQuerySystemInformationEx
- SystemStoreInformation, // q; s: SYSTEM_STORE_INFORMATION (requires SeProfileSingleProcessPrivilege) // SmQueryStoreInformation
- SystemRegistryAppendString, // s: SYSTEM_REGISTRY_APPEND_STRING_PARAMETERS // 110
- SystemAitSamplingValue, // s: ULONG (requires SeProfileSingleProcessPrivilege)
- SystemVhdBootInformation, // q: SYSTEM_VHD_BOOT_INFORMATION
- SystemCpuQuotaInformation, // q; s: PS_CPU_QUOTA_QUERY_INFORMATION
- SystemNativeBasicInformation, // q: SYSTEM_BASIC_INFORMATION
- SystemErrorPortTimeouts, // SYSTEM_ERROR_PORT_TIMEOUTS
- SystemLowPriorityIoInformation, // q: SYSTEM_LOW_PRIORITY_IO_INFORMATION
- SystemTpmBootEntropyInformation, // q: BOOT_ENTROPY_NT_RESULT // ExQueryBootEntropyInformation
- SystemVerifierCountersInformation, // q: SYSTEM_VERIFIER_COUNTERS_INFORMATION
- SystemPagedPoolInformationEx, // q: SYSTEM_FILECACHE_INFORMATION; s (requires SeIncreaseQuotaPrivilege) (info for WorkingSetTypePagedPool)
- SystemSystemPtesInformationEx, // q: SYSTEM_FILECACHE_INFORMATION; s (requires SeIncreaseQuotaPrivilege) (info for WorkingSetTypeSystemPtes) // 120
- SystemNodeDistanceInformation, // q: USHORT[4*NumaNodes] // (EX in: USHORT NodeNumber) // NtQuerySystemInformationEx
- SystemAcpiAuditInformation, // q: SYSTEM_ACPI_AUDIT_INFORMATION // HaliQuerySystemInformation -> HalpAuditQueryResults, info class 26
- SystemBasicPerformanceInformation, // q: SYSTEM_BASIC_PERFORMANCE_INFORMATION // name:wow64:whNtQuerySystemInformation_SystemBasicPerformanceInformation
- SystemQueryPerformanceCounterInformation, // q: SYSTEM_QUERY_PERFORMANCE_COUNTER_INFORMATION // since WIN7 SP1
- SystemSessionBigPoolInformation, // q: SYSTEM_SESSION_POOLTAG_INFORMATION // since WIN8
- SystemBootGraphicsInformation, // q; s: SYSTEM_BOOT_GRAPHICS_INFORMATION (kernel-mode only)
- SystemScrubPhysicalMemoryInformation, // q; s: MEMORY_SCRUB_INFORMATION
- SystemBadPageInformation, // SYSTEM_BAD_PAGE_INFORMATION
- SystemProcessorProfileControlArea, // q; s: SYSTEM_PROCESSOR_PROFILE_CONTROL_AREA
- SystemCombinePhysicalMemoryInformation, // s: MEMORY_COMBINE_INFORMATION, MEMORY_COMBINE_INFORMATION_EX, MEMORY_COMBINE_INFORMATION_EX2 // 130
- SystemEntropyInterruptTimingInformation, // q; s: SYSTEM_ENTROPY_TIMING_INFORMATION
- SystemConsoleInformation, // q; s: SYSTEM_CONSOLE_INFORMATION
- SystemPlatformBinaryInformation, // q: SYSTEM_PLATFORM_BINARY_INFORMATION (requires SeTcbPrivilege)
- SystemPolicyInformation, // q: SYSTEM_POLICY_INFORMATION (Warbird/Encrypt/Decrypt/Execute)
- SystemHypervisorProcessorCountInformation, // q: SYSTEM_HYPERVISOR_PROCESSOR_COUNT_INFORMATION
- SystemDeviceDataInformation, // q: SYSTEM_DEVICE_DATA_INFORMATION
- SystemDeviceDataEnumerationInformation, // q: SYSTEM_DEVICE_DATA_INFORMATION
- SystemMemoryTopologyInformation, // q: SYSTEM_MEMORY_TOPOLOGY_INFORMATION
- SystemMemoryChannelInformation, // q: SYSTEM_MEMORY_CHANNEL_INFORMATION
- SystemBootLogoInformation, // q: SYSTEM_BOOT_LOGO_INFORMATION // 140
- SystemProcessorPerformanceInformationEx, // q: SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION_EX // (EX in: USHORT ProcessorGroup) // NtQuerySystemInformationEx // since WINBLUE
- SystemCriticalProcessErrorLogInformation, // CRITICAL_PROCESS_EXCEPTION_DATA
- SystemSecureBootPolicyInformation, // q: SYSTEM_SECUREBOOT_POLICY_INFORMATION
- SystemPageFileInformationEx, // q: SYSTEM_PAGEFILE_INFORMATION_EX
- SystemSecureBootInformation, // q: SYSTEM_SECUREBOOT_INFORMATION
- SystemEntropyInterruptTimingRawInformation, // q; s: SYSTEM_ENTROPY_TIMING_INFORMATION
- SystemPortableWorkspaceEfiLauncherInformation, // q: SYSTEM_PORTABLE_WORKSPACE_EFI_LAUNCHER_INFORMATION
- SystemFullProcessInformation, // q: SYSTEM_EXTENDED_PROCESS_INFORMATION with SYSTEM_PROCESS_INFORMATION_EXTENSION (requires admin)
- SystemKernelDebuggerInformationEx, // q: SYSTEM_KERNEL_DEBUGGER_INFORMATION_EX
- SystemBootMetadataInformation, // 150 // (requires SeTcbPrivilege)
- SystemSoftRebootInformation, // q: ULONG
- SystemElamCertificateInformation, // s: SYSTEM_ELAM_CERTIFICATE_INFORMATION
- SystemOfflineDumpConfigInformation, // q: OFFLINE_CRASHDUMP_CONFIGURATION_TABLE_V2
- SystemProcessorFeaturesInformation, // q: SYSTEM_PROCESSOR_FEATURES_INFORMATION
- SystemRegistryReconciliationInformation, // s: NULL (requires admin) (flushes registry hives)
- SystemEdidInformation, // q: SYSTEM_EDID_INFORMATION
- SystemManufacturingInformation, // q: SYSTEM_MANUFACTURING_INFORMATION // since THRESHOLD
- SystemEnergyEstimationConfigInformation, // q: SYSTEM_ENERGY_ESTIMATION_CONFIG_INFORMATION
- SystemHypervisorDetailInformation, // q: SYSTEM_HYPERVISOR_DETAIL_INFORMATION
- SystemProcessorCycleStatsInformation, // q: SYSTEM_PROCESSOR_CYCLE_STATS_INFORMATION (EX in: USHORT ProcessorGroup) // NtQuerySystemInformationEx // 160
+ SystemBasicInformation, /* q: SYSTEM_BASIC_INFORMATION */
+ SystemProcessorInformation, /* q: SYSTEM_PROCESSOR_INFORMATION */
+ SystemPerformanceInformation, /* q: SYSTEM_PERFORMANCE_INFORMATION */
+ SystemTimeOfDayInformation, /* q: SYSTEM_TIMEOFDAY_INFORMATION */
+ SystemPathInformation, /* not implemented */
+ SystemProcessInformation, /* q: SYSTEM_PROCESS_INFORMATION */
+ SystemCallCountInformation, /* q: SYSTEM_CALL_COUNT_INFORMATION */
+ SystemDeviceInformation, /* q: SYSTEM_DEVICE_INFORMATION */
+ SystemProcessorPerformanceInformation, /* q: SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION (EX in: USHORT ProcessorGroup) */
+ SystemFlagsInformation, /* q: SYSTEM_FLAGS_INFORMATION */
+ SystemCallTimeInformation, /* not implemented, SYSTEM_CALL_TIME_INFORMATION, 10 */
+ SystemModuleInformation, /* q: RTL_PROCESS_MODULES */
+ SystemLocksInformation, /* q: RTL_PROCESS_LOCKS */
+ SystemStackTraceInformation, /* q: RTL_PROCESS_BACKTRACES */
+ SystemPagedPoolInformation, /* not implemented */
+ SystemNonPagedPoolInformation, /* not implemented */
+ SystemHandleInformation, /* q: SYSTEM_HANDLE_INFORMATION */
+ SystemObjectInformation, /* q: SYSTEM_OBJECTTYPE_INFORMATION mixed with SYSTEM_OBJECT_INFORMATION */
+ SystemPageFileInformation, /* q: SYSTEM_PAGEFILE_INFORMATION */
+ SystemVdmInstemulInformation, /* q: SYSTEM_VDM_INSTEMUL_INFO */
+ SystemVdmBopInformation, /* not implemented, 20 */
+ SystemFileCacheInformation, /* q: SYSTEM_FILECACHE_INFORMATION; s (requires SeIncreaseQuotaPrivilege) (info for WorkingSetTypeSystemCache) */
+ SystemPoolTagInformation, /* q: SYSTEM_POOLTAG_INFORMATION */
+ SystemInterruptInformation, /* q: SYSTEM_INTERRUPT_INFORMATION (EX in: USHORT ProcessorGroup) */
+ SystemDpcBehaviorInformation, /* q: SYSTEM_DPC_BEHAVIOR_INFORMATION; s: SYSTEM_DPC_BEHAVIOR_INFORMATION (requires SeLoadDriverPrivilege) */
+ SystemFullMemoryInformation, /* not implemented, SYSTEM_MEMORY_USAGE_INFORMATION */
+ SystemLoadGdiDriverInformation, /* s (kernel-mode only) */
+ SystemUnloadGdiDriverInformation, /* s (kernel-mode only) */
+ SystemTimeAdjustmentInformation, /* q: SYSTEM_QUERY_TIME_ADJUST_INFORMATION; s: SYSTEM_SET_TIME_ADJUST_INFORMATION (requires SeSystemtimePrivilege) */
+ SystemSummaryMemoryInformation, /* not implemented, SYSTEM_MEMORY_USAGE_INFORMATION */
+ SystemMirrorMemoryInformation, /* s (requires license value "Kernel-MemoryMirroringSupported") (requires SeShutdownPrivilege), 30 */
+ SystemPerformanceTraceInformation, /* q; s: (type depends on EVENT_TRACE_INFORMATION_CLASS) */
+ SystemObsolete0, /* not implemented */
+ SystemExceptionInformation, /* q: SYSTEM_EXCEPTION_INFORMATION */
+ SystemCrashDumpStateInformation, /* s: SYSTEM_CRASH_DUMP_STATE_INFORMATION (requires SeDebugPrivilege) */
+ SystemKernelDebuggerInformation, /* q: SYSTEM_KERNEL_DEBUGGER_INFORMATION */
+ SystemContextSwitchInformation, /* q: SYSTEM_CONTEXT_SWITCH_INFORMATION */
+ SystemRegistryQuotaInformation, /* q: SYSTEM_REGISTRY_QUOTA_INFORMATION; s (requires SeIncreaseQuotaPrivilege) */
+ SystemExtendServiceTableInformation, /* s (requires SeLoadDriverPrivilege), loads win32k only */
+ SystemPrioritySeparation, /* s (requires SeTcbPrivilege) */
+ SystemVerifierAddDriverInformation, /* s: UNICODE_STRING (requires SeDebugPrivilege), 40 */
+ SystemVerifierRemoveDriverInformation, /* s: UNICODE_STRING (requires SeDebugPrivilege) */
+ SystemProcessorIdleInformation, /* q: SYSTEM_PROCESSOR_IDLE_INFORMATION (EX: USHORT ProcessorGroup) */
+ SystemLegacyDriverInformation, /* q: SYSTEM_LEGACY_DRIVER_INFORMATION */
+ SystemCurrentTimeZoneInformation, /* q; s: RTL_TIME_ZONE_INFORMATION */
+ SystemLookasideInformation, /* q: SYSTEM_LOOKASIDE_INFORMATION */
+ SystemTimeSlipNotification, /* s: HANDLE (NtCreateEvent) (requires SeSystemtimePrivilege) */
+ SystemSessionCreate, /* not implemented */
+ SystemSessionDetach, /* not implemented */
+ SystemSessionInformation, /* not implemented (SYSTEM_SESSION_INFORMATION) */
+ SystemRangeStartInformation, /* q: SYSTEM_RANGE_START_INFORMATION, 50 */
+ SystemVerifierInformation, /* q: SYSTEM_VERIFIER_INFORMATION; s (requires SeDebugPrivilege) */
+ SystemVerifierThunkExtend, /* s (kernel-mode only) */
+ SystemSessionProcessInformation, /* q: SYSTEM_SESSION_PROCESS_INFORMATION */
+ SystemLoadGdiDriverInSystemSpace, /* s: SYSTEM_GDI_DRIVER_INFORMATION (kernel-mode only) (same as SystemLoadGdiDriverInformation) */
+ SystemNumaProcessorMap, /* q: SYSTEM_NUMA_INFORMATION */
+ SystemPrefetcherInformation, /* q; s: PREFETCHER_INFORMATION, PfSnQueryPrefetcherInformation */
+ SystemExtendedProcessInformation, /* q: SYSTEM_EXTENDED_PROCESS_INFORMATION */
+ SystemRecommendedSharedDataAlignment, /* q: ULONG, KeGetRecommendedSharedDataAlignment */
+ SystemComPlusPackage, /* q; s: ULONG */
+ SystemNumaAvailableMemory, /* q: SYSTEM_NUMA_INFORMATION, 60 */
+ SystemProcessorPowerInformation, /* q: SYSTEM_PROCESSOR_POWER_INFORMATION (EX in: USHORT ProcessorGroup) */
+ SystemEmulationBasicInformation, /* q: SYSTEM_BASIC_INFORMATION */
+ SystemEmulationProcessorInformation, /* q: SYSTEM_PROCESSOR_INFORMATION */
+ SystemExtendedHandleInformation, /* q: SYSTEM_HANDLE_INFORMATION_EX */
+ SystemLostDelayedWriteInformation, /* q: ULONG */
+ SystemBigPoolInformation, /* q: SYSTEM_BIGPOOL_INFORMATION */
+ SystemSessionPoolTagInformation, /* q: SYSTEM_SESSION_POOLTAG_INFORMATION */
+ SystemSessionMappedViewInformation, /* q: SYSTEM_SESSION_MAPPED_VIEW_INFORMATION */
+ SystemHotpatchInformation, /* q; s: SYSTEM_HOTPATCH_CODE_INFORMATION */
+ SystemObjectSecurityMode, /* q: ULONG, 70 */
+ SystemWatchdogTimerHandler, /* s: SYSTEM_WATCHDOG_HANDLER_INFORMATION, (kernel-mode only) */
+ SystemWatchdogTimerInformation, /* q: SYSTEM_WATCHDOG_TIMER_INFORMATION, NtQuerySystemInformationEx, (kernel-mode only) */
+ SystemLogicalProcessorInformation, /* q: SYSTEM_LOGICAL_PROCESSOR_INFORMATION (EX in: USHORT ProcessorGroup), NtQuerySystemInformationEx */
+ SystemWow64SharedInformationObsolete, /* not implemented */
+ SystemRegisterFirmwareTableInformationHandler, /* s: SYSTEM_FIRMWARE_TABLE_HANDLER, (kernel-mode only) */
+ SystemFirmwareTableInformation, /* SYSTEM_FIRMWARE_TABLE_INFORMATION */
+ SystemModuleInformationEx, /* q: RTL_PROCESS_MODULE_INFORMATION_EX, since VISTA */
+ SystemVerifierTriageInformation, /* not implemented */
+ SystemSuperfetchInformation, /* q; s: SUPERFETCH_INFORMATION, PfQuerySuperfetchInformation */
+ SystemMemoryListInformation, /* q: SYSTEM_MEMORY_LIST_INFORMATION; s: SYSTEM_MEMORY_LIST_COMMAND (requires SeProfileSingleProcessPrivilege), 80 */
+ SystemFileCacheInformationEx, /* q: SYSTEM_FILECACHE_INFORMATION; s (requires SeIncreaseQuotaPrivilege) (same as SystemFileCacheInformation) */
+ SystemThreadPriorityClientIdInformation, /* s: SYSTEM_THREAD_CID_PRIORITY_INFORMATION (requires SeIncreaseBasePriorityPrivilege), NtQuerySystemInformationEx */
+ SystemProcessorIdleCycleTimeInformation, /* q: SYSTEM_PROCESSOR_IDLE_CYCLE_TIME_INFORMATION[] (EX in: USHORT ProcessorGroup), NtQuerySystemInformationEx */
+ SystemVerifierCancellationInformation, /* SYSTEM_VERIFIER_CANCELLATION_INFORMATION, name:wow64:whNT32QuerySystemVerifierCancellationInformation */
+ SystemProcessorPowerInformationEx, /* not implemented */
+ SystemRefTraceInformation, /* q; s: SYSTEM_REF_TRACE_INFORMATION, ObQueryRefTraceInformation */
+ SystemSpecialPoolInformation, /* q; s: SYSTEM_SPECIAL_POOL_INFORMATION (requires SeDebugPrivilege), MmSpecialPoolTag, then MmSpecialPoolCatchOverruns != 0 */
+ SystemProcessIdInformation, /* q: SYSTEM_PROCESS_ID_INFORMATION */
+ SystemErrorPortInformation, /* s (requires SeTcbPrivilege) */
+ SystemBootEnvironmentInformation, /* q: SYSTEM_BOOT_ENVIRONMENT_INFORMATION, 90 */
+ SystemHypervisorInformation, /* q: SYSTEM_HYPERVISOR_QUERY_INFORMATION */
+ SystemVerifierInformationEx, /* q; s: SYSTEM_VERIFIER_INFORMATION_EX */
+ SystemTimeZoneInformation, /* q; s: RTL_TIME_ZONE_INFORMATION (requires SeTimeZonePrivilege) */
+ SystemImageFileExecutionOptionsInformation, /* s: SYSTEM_IMAGE_FILE_EXECUTION_OPTIONS_INFORMATION (requires SeTcbPrivilege) */
+ SystemCoverageInformation, /* q: COVERAGE_MODULES s: COVERAGE_MODULE_REQUEST, ExpCovQueryInformation (requires SeDebugPrivilege) */
+ SystemPrefetchPatchInformation, /* SYSTEM_PREFETCH_PATCH_INFORMATION */
+ SystemVerifierFaultsInformation, /* s: SYSTEM_VERIFIER_FAULTS_INFORMATION (requires SeDebugPrivilege) */
+ SystemSystemPartitionInformation, /* q: SYSTEM_SYSTEM_PARTITION_INFORMATION */
+ SystemSystemDiskInformation, /* q: SYSTEM_SYSTEM_DISK_INFORMATION */
+ SystemProcessorPerformanceDistribution, /* q: SYSTEM_PROCESSOR_PERFORMANCE_DISTRIBUTION (EX in: USHORT ProcessorGroup) NtQuerySystemInformationEx, 100 */
+ SystemNumaProximityNodeInformation, /* q; s: SYSTEM_NUMA_PROXIMITY_MAP */
+ SystemDynamicTimeZoneInformation, /* q; s: RTL_DYNAMIC_TIME_ZONE_INFORMATION (requires SeTimeZonePrivilege) */
+ SystemCodeIntegrityInformation, /* q: SYSTEM_CODEINTEGRITY_INFORMATION, SeCodeIntegrityQueryInformation */
+ SystemProcessorMicrocodeUpdateInformation, /* s: SYSTEM_PROCESSOR_MICROCODE_UPDATE_INFORMATION */
+ SystemProcessorBrandString, /* q: CHAR[], HaliQuerySystemInformation -> HalpGetProcessorBrandString, info class 23 */
+ SystemVirtualAddressInformation, /* q: SYSTEM_VA_LIST_INFORMATION[]; s: SYSTEM_VA_LIST_INFORMATION[] (requires SeIncreaseQuotaPrivilege), MmQuerySystemVaInformation */
+ SystemLogicalProcessorAndGroupInformation, /* q: SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX (EX in: LOGICAL_PROCESSOR_RELATIONSHIP RelationshipType) since WIN7 NtQuerySystemInformationEx KeQueryLogicalProcessorRelationship */
+ SystemProcessorCycleTimeInformation, /* q: SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION[] (EX in: USHORT ProcessorGroup), NtQuerySystemInformationEx */
+ SystemStoreInformation, /* q; s: SYSTEM_STORE_INFORMATION (requires SeProfileSingleProcessPrivilege), SmQueryStoreInformation */
+ SystemRegistryAppendString, /* s: SYSTEM_REGISTRY_APPEND_STRING_PARAMETERS, 110 */
+ SystemAitSamplingValue, /* s: ULONG (requires SeProfileSingleProcessPrivilege) */
+ SystemVhdBootInformation, /* q: SYSTEM_VHD_BOOT_INFORMATION */
+ SystemCpuQuotaInformation, /* q; s: PS_CPU_QUOTA_QUERY_INFORMATION */
+ SystemNativeBasicInformation, /* q: SYSTEM_BASIC_INFORMATION */
+ SystemErrorPortTimeouts, /* SYSTEM_ERROR_PORT_TIMEOUTS */
+ SystemLowPriorityIoInformation, /* q: SYSTEM_LOW_PRIORITY_IO_INFORMATION */
+ SystemTpmBootEntropyInformation, /* q: BOOT_ENTROPY_NT_RESULT, ExQueryBootEntropyInformation */
+ SystemVerifierCountersInformation, /* q: SYSTEM_VERIFIER_COUNTERS_INFORMATION */
+ SystemPagedPoolInformationEx, /* q: SYSTEM_FILECACHE_INFORMATION; s (requires SeIncreaseQuotaPrivilege) (info for WorkingSetTypePagedPool) */
+ SystemSystemPtesInformationEx, /* q: SYSTEM_FILECACHE_INFORMATION; s (requires SeIncreaseQuotaPrivilege) (info for WorkingSetTypeSystemPtes) 120 */
+ SystemNodeDistanceInformation, /* q: USHORT[4*NumaNodes] (EX in: USHORT NodeNumber) NtQuerySystemInformationEx */
+ SystemAcpiAuditInformation, /* q: SYSTEM_ACPI_AUDIT_INFORMATION, HaliQuerySystemInformation -> HalpAuditQueryResults, info class 26 */
+ SystemBasicPerformanceInformation, /* q: SYSTEM_BASIC_PERFORMANCE_INFORMATION, name:wow64:whNtQuerySystemInformation_SystemBasicPerformanceInformation */
+ SystemQueryPerformanceCounterInformation, /* q: SYSTEM_QUERY_PERFORMANCE_COUNTER_INFORMATION, since WIN7 SP1 */
+ SystemSessionBigPoolInformation, /* q: SYSTEM_SESSION_POOLTAG_INFORMATION, since WIN8 */
+ SystemBootGraphicsInformation, /* q; s: SYSTEM_BOOT_GRAPHICS_INFORMATION (kernel-mode only) */
+ SystemScrubPhysicalMemoryInformation, /* q; s: MEMORY_SCRUB_INFORMATION */
+ SystemBadPageInformation, /* SYSTEM_BAD_PAGE_INFORMATION */
+ SystemProcessorProfileControlArea, /* q; s: SYSTEM_PROCESSOR_PROFILE_CONTROL_AREA */
+ SystemCombinePhysicalMemoryInformation, /* s: MEMORY_COMBINE_INFORMATION, MEMORY_COMBINE_INFORMATION_EX, MEMORY_COMBINE_INFORMATION_EX2, 130 */
+ SystemEntropyInterruptTimingInformation, /* q; s: SYSTEM_ENTROPY_TIMING_INFORMATION */
+ SystemConsoleInformation, /* q; s: SYSTEM_CONSOLE_INFORMATION */
+ SystemPlatformBinaryInformation, /* q: SYSTEM_PLATFORM_BINARY_INFORMATION (requires SeTcbPrivilege) */
+ SystemPolicyInformation, /* q: SYSTEM_POLICY_INFORMATION (Warbird/Encrypt/Decrypt/Execute) */
+ SystemHypervisorProcessorCountInformation, /* q: SYSTEM_HYPERVISOR_PROCESSOR_COUNT_INFORMATION */
+ SystemDeviceDataInformation, /* q: SYSTEM_DEVICE_DATA_INFORMATION */
+ SystemDeviceDataEnumerationInformation, /* q: SYSTEM_DEVICE_DATA_INFORMATION */
+ SystemMemoryTopologyInformation, /* q: SYSTEM_MEMORY_TOPOLOGY_INFORMATION */
+ SystemMemoryChannelInformation, /* q: SYSTEM_MEMORY_CHANNEL_INFORMATION */
+ SystemBootLogoInformation, /* q: SYSTEM_BOOT_LOGO_INFORMATION, 140 */
+ SystemProcessorPerformanceInformationEx, /* q: SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION_EX (EX in: USHORT ProcessorGroup) NtQuerySystemInformationEx since WINBLUE */
+ SystemCriticalProcessErrorLogInformation, /* CRITICAL_PROCESS_EXCEPTION_DATA */
+ SystemSecureBootPolicyInformation, /* q: SYSTEM_SECUREBOOT_POLICY_INFORMATION */
+ SystemPageFileInformationEx, /* q: SYSTEM_PAGEFILE_INFORMATION_EX */
+ SystemSecureBootInformation, /* q: SYSTEM_SECUREBOOT_INFORMATION */
+ SystemEntropyInterruptTimingRawInformation, /* q; s: SYSTEM_ENTROPY_TIMING_INFORMATION */
+ SystemPortableWorkspaceEfiLauncherInformation, /* q: SYSTEM_PORTABLE_WORKSPACE_EFI_LAUNCHER_INFORMATION */
+ SystemFullProcessInformation, /* q: SYSTEM_EXTENDED_PROCESS_INFORMATION with SYSTEM_PROCESS_INFORMATION_EXTENSION (requires admin) */
+ SystemKernelDebuggerInformationEx, /* q: SYSTEM_KERNEL_DEBUGGER_INFORMATION_EX */
+ SystemBootMetadataInformation, /* 150 (requires SeTcbPrivilege) */
+ SystemSoftRebootInformation, /* q: ULONG */
+ SystemElamCertificateInformation, /* s: SYSTEM_ELAM_CERTIFICATE_INFORMATION */
+ SystemOfflineDumpConfigInformation, /* q: OFFLINE_CRASHDUMP_CONFIGURATION_TABLE_V2 */
+ SystemProcessorFeaturesInformation, /* q: SYSTEM_PROCESSOR_FEATURES_INFORMATION */
+ SystemRegistryReconciliationInformation, /* s: NULL (requires admin) (flushes registry hives) */
+ SystemEdidInformation, /* q: SYSTEM_EDID_INFORMATION */
+ SystemManufacturingInformation, /* q: SYSTEM_MANUFACTURING_INFORMATION since THRESHOLD */
+ SystemEnergyEstimationConfigInformation, /* q: SYSTEM_ENERGY_ESTIMATION_CONFIG_INFORMATION */
+ SystemHypervisorDetailInformation, /* q: SYSTEM_HYPERVISOR_DETAIL_INFORMATION */
+ SystemProcessorCycleStatsInformation, /* q: SYSTEM_PROCESSOR_CYCLE_STATS_INFORMATION (EX in: USHORT ProcessorGroup) NtQuerySystemInformationEx, 160 */
SystemVmGenerationCountInformation,
- SystemTrustedPlatformModuleInformation, // q: SYSTEM_TPM_INFORMATION
- SystemKernelDebuggerFlags, // SYSTEM_KERNEL_DEBUGGER_FLAGS
- SystemCodeIntegrityPolicyInformation, // q; s: SYSTEM_CODEINTEGRITYPOLICY_INFORMATION
- SystemIsolatedUserModeInformation, // q: SYSTEM_ISOLATED_USER_MODE_INFORMATION
+ SystemTrustedPlatformModuleInformation, /* q: SYSTEM_TPM_INFORMATION */
+ SystemKernelDebuggerFlags, /* SYSTEM_KERNEL_DEBUGGER_FLAGS */
+ SystemCodeIntegrityPolicyInformation, /* q; s: SYSTEM_CODEINTEGRITYPOLICY_INFORMATION */
+ SystemIsolatedUserModeInformation, /* q: SYSTEM_ISOLATED_USER_MODE_INFORMATION */
SystemHardwareSecurityTestInterfaceResultsInformation,
- SystemSingleModuleInformation, // q: SYSTEM_SINGLE_MODULE_INFORMATION
- SystemAllowedCpuSetsInformation, // s: SYSTEM_WORKLOAD_ALLOWED_CPU_SET_INFORMATION
- SystemVsmProtectionInformation, // q: SYSTEM_VSM_PROTECTION_INFORMATION (previously SystemDmaProtectionInformation)
- SystemInterruptCpuSetsInformation, // q: SYSTEM_INTERRUPT_CPU_SET_INFORMATION // 170
- SystemSecureBootPolicyFullInformation, // q: SYSTEM_SECUREBOOT_POLICY_FULL_INFORMATION
+ SystemSingleModuleInformation, /* q: SYSTEM_SINGLE_MODULE_INFORMATION */
+ SystemAllowedCpuSetsInformation, /* s: SYSTEM_WORKLOAD_ALLOWED_CPU_SET_INFORMATION */
+ SystemVsmProtectionInformation, /* q: SYSTEM_VSM_PROTECTION_INFORMATION (previously SystemDmaProtectionInformation) */
+ SystemInterruptCpuSetsInformation, /* q: SYSTEM_INTERRUPT_CPU_SET_INFORMATION, 170 */
+ SystemSecureBootPolicyFullInformation, /* q: SYSTEM_SECUREBOOT_POLICY_FULL_INFORMATION */
SystemCodeIntegrityPolicyFullInformation,
- SystemAffinitizedInterruptProcessorInformation, // q: KAFFINITY_EX // (requires SeIncreaseBasePriorityPrivilege)
- SystemRootSiloInformation, // q: SYSTEM_ROOT_SILO_INFORMATION
- SystemCpuSetInformation, // q: SYSTEM_CPU_SET_INFORMATION // since THRESHOLD2
- SystemCpuSetTagInformation, // q: SYSTEM_CPU_SET_TAG_INFORMATION
+ SystemAffinitizedInterruptProcessorInformation, /* q: KAFFINITY_EX (requires SeIncreaseBasePriorityPrivilege) */
+ SystemRootSiloInformation, /* q: SYSTEM_ROOT_SILO_INFORMATION */
+ SystemCpuSetInformation, /* q: SYSTEM_CPU_SET_INFORMATION since THRESHOLD2 */
+ SystemCpuSetTagInformation, /* q: SYSTEM_CPU_SET_TAG_INFORMATION */
SystemWin32WerStartCallout,
- SystemSecureKernelProfileInformation, // q: SYSTEM_SECURE_KERNEL_HYPERGUARD_PROFILE_INFORMATION
- SystemCodeIntegrityPlatformManifestInformation, // q: SYSTEM_SECUREBOOT_PLATFORM_MANIFEST_INFORMATION // NtQuerySystemInformationEx // since REDSTONE
- SystemInterruptSteeringInformation, // q: in: SYSTEM_INTERRUPT_STEERING_INFORMATION_INPUT, out: SYSTEM_INTERRUPT_STEERING_INFORMATION_OUTPUT // NtQuerySystemInformationEx // 180
- SystemSupportedProcessorArchitectures, // p: in opt: HANDLE, out: SYSTEM_SUPPORTED_PROCESSOR_ARCHITECTURES_INFORMATION[] // NtQuerySystemInformationEx
- SystemMemoryUsageInformation, // q: SYSTEM_MEMORY_USAGE_INFORMATION
- SystemCodeIntegrityCertificateInformation, // q: SYSTEM_CODEINTEGRITY_CERTIFICATE_INFORMATION
- SystemPhysicalMemoryInformation, // q: SYSTEM_PHYSICAL_MEMORY_INFORMATION // since REDSTONE2
- SystemControlFlowTransition, // (Warbird/Encrypt/Decrypt/Execute)
- SystemKernelDebuggingAllowed, // s: ULONG
- SystemActivityModerationExeState, // s: SYSTEM_ACTIVITY_MODERATION_EXE_STATE
- SystemActivityModerationUserSettings, // q: SYSTEM_ACTIVITY_MODERATION_USER_SETTINGS
- SystemCodeIntegrityPoliciesFullInformation, // NtQuerySystemInformationEx
- SystemCodeIntegrityUnlockInformation, // SYSTEM_CODEINTEGRITY_UNLOCK_INFORMATION // 190
+ SystemSecureKernelProfileInformation, /* q: SYSTEM_SECURE_KERNEL_HYPERGUARD_PROFILE_INFORMATION */
+ SystemCodeIntegrityPlatformManifestInformation, /* q: SYSTEM_SECUREBOOT_PLATFORM_MANIFEST_INFORMATION NtQuerySystemInformationEx since REDSTONE */
+ SystemInterruptSteeringInformation, /* q: in: SYSTEM_INTERRUPT_STEERING_INFORMATION_INPUT, out: SYSTEM_INTERRUPT_STEERING_INFORMATION_OUTPUT NtQuerySystemInformationEx, 180 */
+ SystemSupportedProcessorArchitectures, /* p: in opt: HANDLE, out: SYSTEM_SUPPORTED_PROCESSOR_ARCHITECTURES_INFORMATION[] NtQuerySystemInformationEx */
+ SystemMemoryUsageInformation, /* q: SYSTEM_MEMORY_USAGE_INFORMATION */
+ SystemCodeIntegrityCertificateInformation, /* q: SYSTEM_CODEINTEGRITY_CERTIFICATE_INFORMATION */
+ SystemPhysicalMemoryInformation, /* q: SYSTEM_PHYSICAL_MEMORY_INFORMATION since REDSTONE2 */
+ SystemControlFlowTransition, /* (Warbird/Encrypt/Decrypt/Execute) */
+ SystemKernelDebuggingAllowed, /* s: ULONG */
+ SystemActivityModerationExeState, /* s: SYSTEM_ACTIVITY_MODERATION_EXE_STATE */
+ SystemActivityModerationUserSettings, /* q: SYSTEM_ACTIVITY_MODERATION_USER_SETTINGS */
+ SystemCodeIntegrityPoliciesFullInformation, /* NtQuerySystemInformationEx */
+ SystemCodeIntegrityUnlockInformation, /* SYSTEM_CODEINTEGRITY_UNLOCK_INFORMATION, 190 */
SystemIntegrityQuotaInformation,
- SystemFlushInformation, // q: SYSTEM_FLUSH_INFORMATION
- SystemProcessorIdleMaskInformation, // q: ULONG_PTR[ActiveGroupCount] // since REDSTONE3
- SystemSecureDumpEncryptionInformation, // NtQuerySystemInformationEx
- SystemWriteConstraintInformation, // SYSTEM_WRITE_CONSTRAINT_INFORMATION
- SystemKernelVaShadowInformation, // SYSTEM_KERNEL_VA_SHADOW_INFORMATION
- SystemHypervisorSharedPageInformation, // SYSTEM_HYPERVISOR_SHARED_PAGE_INFORMATION // since REDSTONE4
+ SystemFlushInformation, /* q: SYSTEM_FLUSH_INFORMATION */
+ SystemProcessorIdleMaskInformation, /* q: ULONG_PTR[ActiveGroupCount] since REDSTONE3 */
+ SystemSecureDumpEncryptionInformation, /* NtQuerySystemInformationEx */
+ SystemWriteConstraintInformation, /* SYSTEM_WRITE_CONSTRAINT_INFORMATION */
+ SystemKernelVaShadowInformation, /* SYSTEM_KERNEL_VA_SHADOW_INFORMATION */
+ SystemHypervisorSharedPageInformation, /* SYSTEM_HYPERVISOR_SHARED_PAGE_INFORMATION since REDSTONE4 */
SystemFirmwareBootPerformanceInformation,
- SystemCodeIntegrityVerificationInformation, // SYSTEM_CODEINTEGRITYVERIFICATION_INFORMATION
- SystemFirmwarePartitionInformation, // SYSTEM_FIRMWARE_PARTITION_INFORMATION // 200
- SystemSpeculationControlInformation, // SYSTEM_SPECULATION_CONTROL_INFORMATION // (CVE-2017-5715) REDSTONE3 and above.
- SystemDmaGuardPolicyInformation, // SYSTEM_DMA_GUARD_POLICY_INFORMATION
- SystemEnclaveLaunchControlInformation, // SYSTEM_ENCLAVE_LAUNCH_CONTROL_INFORMATION
- SystemWorkloadAllowedCpuSetsInformation, // SYSTEM_WORKLOAD_ALLOWED_CPU_SET_INFORMATION // since REDSTONE5
- SystemCodeIntegrityUnlockModeInformation, // SYSTEM_CODEINTEGRITY_UNLOCK_INFORMATION
- SystemLeapSecondInformation, // SYSTEM_LEAP_SECOND_INFORMATION
- SystemFlags2Information, // q: SYSTEM_FLAGS_INFORMATION
- SystemSecurityModelInformation, // SYSTEM_SECURITY_MODEL_INFORMATION // since 19H1
- SystemCodeIntegritySyntheticCacheInformation, // NtQuerySystemInformationEx
- SystemFeatureConfigurationInformation, // q: in: SYSTEM_FEATURE_CONFIGURATION_QUERY, out: SYSTEM_FEATURE_CONFIGURATION_INFORMATION; s: SYSTEM_FEATURE_CONFIGURATION_UPDATE // NtQuerySystemInformationEx // since 20H1 // 210
- SystemFeatureConfigurationSectionInformation, // q: in: SYSTEM_FEATURE_CONFIGURATION_SECTIONS_REQUEST, out: SYSTEM_FEATURE_CONFIGURATION_SECTIONS_INFORMATION // NtQuerySystemInformationEx
- SystemFeatureUsageSubscriptionInformation, // q: SYSTEM_FEATURE_USAGE_SUBSCRIPTION_DETAILS; s: SYSTEM_FEATURE_USAGE_SUBSCRIPTION_UPDATE
- SystemSecureSpeculationControlInformation, // SECURE_SPECULATION_CONTROL_INFORMATION
- SystemSpacesBootInformation, // since 20H2
- SystemFwRamdiskInformation, // SYSTEM_FIRMWARE_RAMDISK_INFORMATION
+ SystemCodeIntegrityVerificationInformation, /* SYSTEM_CODEINTEGRITYVERIFICATION_INFORMATION */
+ SystemFirmwarePartitionInformation, /* SYSTEM_FIRMWARE_PARTITION_INFORMATION, 200 */
+ SystemSpeculationControlInformation, /* SYSTEM_SPECULATION_CONTROL_INFORMATION (CVE-2017-5715) REDSTONE3 and above. */
+ SystemDmaGuardPolicyInformation, /* SYSTEM_DMA_GUARD_POLICY_INFORMATION */
+ SystemEnclaveLaunchControlInformation, /* SYSTEM_ENCLAVE_LAUNCH_CONTROL_INFORMATION */
+ SystemWorkloadAllowedCpuSetsInformation, /* SYSTEM_WORKLOAD_ALLOWED_CPU_SET_INFORMATION since REDSTONE5 */
+ SystemCodeIntegrityUnlockModeInformation, /* SYSTEM_CODEINTEGRITY_UNLOCK_INFORMATION */
+ SystemLeapSecondInformation, /* SYSTEM_LEAP_SECOND_INFORMATION */
+ SystemFlags2Information, /* q: SYSTEM_FLAGS_INFORMATION */
+ SystemSecurityModelInformation, /* SYSTEM_SECURITY_MODEL_INFORMATION since 19H1 */
+ SystemCodeIntegritySyntheticCacheInformation, /* NtQuerySystemInformationEx */
+ SystemFeatureConfigurationInformation, /* q: in: SYSTEM_FEATURE_CONFIGURATION_QUERY, out: SYSTEM_FEATURE_CONFIGURATION_INFORMATION; s: SYSTEM_FEATURE_CONFIGURATION_UPDATE NtQuerySystemInformationEx since 20H1, 210 */
+ SystemFeatureConfigurationSectionInformation, /* q: in: SYSTEM_FEATURE_CONFIGURATION_SECTIONS_REQUEST, out: SYSTEM_FEATURE_CONFIGURATION_SECTIONS_INFORMATION NtQuerySystemInformationEx */
+ SystemFeatureUsageSubscriptionInformation, /* q: SYSTEM_FEATURE_USAGE_SUBSCRIPTION_DETAILS; s: SYSTEM_FEATURE_USAGE_SUBSCRIPTION_UPDATE */
+ SystemSecureSpeculationControlInformation, /* SECURE_SPECULATION_CONTROL_INFORMATION */
+ SystemSpacesBootInformation, /* since 20H2 */
+ SystemFwRamdiskInformation, /* SYSTEM_FIRMWARE_RAMDISK_INFORMATION */
SystemWheaIpmiHardwareInformation,
- SystemDifSetRuleClassInformation, // s: SYSTEM_DIF_VOLATILE_INFORMATION (requires SeDebugPrivilege)
- SystemDifClearRuleClassInformation, // s: NULL (requires SeDebugPrivilege)
- SystemDifApplyPluginVerificationOnDriver, // SYSTEM_DIF_PLUGIN_DRIVER_INFORMATION (requires SeDebugPrivilege)
- SystemDifRemovePluginVerificationOnDriver, // SYSTEM_DIF_PLUGIN_DRIVER_INFORMATION (requires SeDebugPrivilege) // 220
- SystemShadowStackInformation, // SYSTEM_SHADOW_STACK_INFORMATION
- SystemBuildVersionInformation, // q: in: ULONG (LayerNumber), out: SYSTEM_BUILD_VERSION_INFORMATION // NtQuerySystemInformationEx // 222
- SystemPoolLimitInformation, // SYSTEM_POOL_LIMIT_INFORMATION (requires SeIncreaseQuotaPrivilege) // NtQuerySystemInformationEx
- SystemCodeIntegrityAddDynamicStore, // CodeIntegrity-AllowConfigurablePolicy-CustomKernelSigners
- SystemCodeIntegrityClearDynamicStores, // CodeIntegrity-AllowConfigurablePolicy-CustomKernelSigners
+ SystemDifSetRuleClassInformation, /* s: SYSTEM_DIF_VOLATILE_INFORMATION (requires SeDebugPrivilege) */
+ SystemDifClearRuleClassInformation, /* s: NULL (requires SeDebugPrivilege) */
+ SystemDifApplyPluginVerificationOnDriver, /* SYSTEM_DIF_PLUGIN_DRIVER_INFORMATION (requires SeDebugPrivilege) */
+ SystemDifRemovePluginVerificationOnDriver, /* SYSTEM_DIF_PLUGIN_DRIVER_INFORMATION (requires SeDebugPrivilege) 220 */
+ SystemShadowStackInformation, /* SYSTEM_SHADOW_STACK_INFORMATION */
+ SystemBuildVersionInformation, /* q: in: ULONG (LayerNumber), out: SYSTEM_BUILD_VERSION_INFORMATION NtQuerySystemInformationEx, 222 */
+ SystemPoolLimitInformation, /* SYSTEM_POOL_LIMIT_INFORMATION (requires SeIncreaseQuotaPrivilege) NtQuerySystemInformationEx */
+ SystemCodeIntegrityAddDynamicStore, /* CodeIntegrity-AllowConfigurablePolicy-CustomKernelSigners */
+ SystemCodeIntegrityClearDynamicStores, /* CodeIntegrity-AllowConfigurablePolicy-CustomKernelSigners */
SystemDifPoolTrackingInformation,
- SystemPoolZeroingInformation, // q: SYSTEM_POOL_ZEROING_INFORMATION
- SystemDpcWatchdogInformation, // q; s: SYSTEM_DPC_WATCHDOG_CONFIGURATION_INFORMATION
- SystemDpcWatchdogInformation2, // q; s: SYSTEM_DPC_WATCHDOG_CONFIGURATION_INFORMATION_V2
- SystemSupportedProcessorArchitectures2, // q: in opt: HANDLE, out: SYSTEM_SUPPORTED_PROCESSOR_ARCHITECTURES_INFORMATION[] // NtQuerySystemInformationEx // 230
- SystemSingleProcessorRelationshipInformation, // q: SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX // (EX in: PROCESSOR_NUMBER Processor) // NtQuerySystemInformationEx
- SystemXfgCheckFailureInformation, // q: SYSTEM_XFG_FAILURE_INFORMATION
- SystemIommuStateInformation, // SYSTEM_IOMMU_STATE_INFORMATION // since 22H1
- SystemHypervisorMinrootInformation, // SYSTEM_HYPERVISOR_MINROOT_INFORMATION
- SystemHypervisorBootPagesInformation, // SYSTEM_HYPERVISOR_BOOT_PAGES_INFORMATION
- SystemPointerAuthInformation, // SYSTEM_POINTER_AUTH_INFORMATION
- SystemSecureKernelDebuggerInformation, // NtQuerySystemInformationEx
- SystemOriginalImageFeatureInformation, // q: in: SYSTEM_ORIGINAL_IMAGE_FEATURE_INFORMATION_INPUT, out: SYSTEM_ORIGINAL_IMAGE_FEATURE_INFORMATION_OUTPUT // NtQuerySystemInformationEx
- SystemMemoryNumaInformation, // SYSTEM_MEMORY_NUMA_INFORMATION_INPUT, SYSTEM_MEMORY_NUMA_INFORMATION_OUTPUT // NtQuerySystemInformationEx
- SystemMemoryNumaPerformanceInformation, // SYSTEM_MEMORY_NUMA_PERFORMANCE_INFORMATION_INPUTSYSTEM_MEMORY_NUMA_PERFORMANCE_INFORMATION_INPUT, SYSTEM_MEMORY_NUMA_PERFORMANCE_INFORMATION_OUTPUT // since 24H2 // 240
+ SystemPoolZeroingInformation, /* q: SYSTEM_POOL_ZEROING_INFORMATION */
+ SystemDpcWatchdogInformation, /* q; s: SYSTEM_DPC_WATCHDOG_CONFIGURATION_INFORMATION */
+ SystemDpcWatchdogInformation2, /* q; s: SYSTEM_DPC_WATCHDOG_CONFIGURATION_INFORMATION_V2 */
+ SystemSupportedProcessorArchitectures2, /* q: in opt: HANDLE, out: SYSTEM_SUPPORTED_PROCESSOR_ARCHITECTURES_INFORMATION[] NtQuerySystemInformationEx, 230 */
+ SystemSingleProcessorRelationshipInformation, /* q: SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX (EX in: PROCESSOR_NUMBER Processor) NtQuerySystemInformationEx */
+ SystemXfgCheckFailureInformation, /* q: SYSTEM_XFG_FAILURE_INFORMATION */
+ SystemIommuStateInformation, /* SYSTEM_IOMMU_STATE_INFORMATION since 22H1 */
+ SystemHypervisorMinrootInformation, /* SYSTEM_HYPERVISOR_MINROOT_INFORMATION */
+ SystemHypervisorBootPagesInformation, /* SYSTEM_HYPERVISOR_BOOT_PAGES_INFORMATION */
+ SystemPointerAuthInformation, /* SYSTEM_POINTER_AUTH_INFORMATION */
+ SystemSecureKernelDebuggerInformation, /* NtQuerySystemInformationEx */
+ SystemOriginalImageFeatureInformation, /* q: in: SYSTEM_ORIGINAL_IMAGE_FEATURE_INFORMATION_INPUT, out: SYSTEM_ORIGINAL_IMAGE_FEATURE_INFORMATION_OUTPUT NtQuerySystemInformationEx */
+ SystemMemoryNumaInformation, /* SYSTEM_MEMORY_NUMA_INFORMATION_INPUT, SYSTEM_MEMORY_NUMA_INFORMATION_OUTPUT NtQuerySystemInformationEx */
+ SystemMemoryNumaPerformanceInformation, /* SYSTEM_MEMORY_NUMA_PERFORMANCE_INFORMATION_INPUTSYSTEM_MEMORY_NUMA_PERFORMANCE_INFORMATION_INPUT, SYSTEM_MEMORY_NUMA_PERFORMANCE_INFORMATION_OUTPUT since 24H2, 240 */
SystemCodeIntegritySignedPoliciesFullInformation,
- SystemSecureCoreInformation, // SystemSecureSecretsInformation
- SystemTrustedAppsRuntimeInformation, // SYSTEM_TRUSTEDAPPS_RUNTIME_INFORMATION
- SystemBadPageInformationEx, // SYSTEM_BAD_PAGE_INFORMATION
- SystemResourceDeadlockTimeout, // ULONG
- SystemBreakOnContextUnwindFailureInformation, // ULONG (requires SeDebugPrivilege)
- SystemOslRamdiskInformation, // SYSTEM_OSL_RAMDISK_INFORMATION
- SystemCodeIntegrityPolicyManagementInformation, // SYSTEM_CODEINTEGRITYPOLICY_MANAGEMENT // since 25H2
+ SystemSecureCoreInformation, /* SystemSecureSecretsInformation */
+ SystemTrustedAppsRuntimeInformation, /* SYSTEM_TRUSTEDAPPS_RUNTIME_INFORMATION */
+ SystemBadPageInformationEx, /* SYSTEM_BAD_PAGE_INFORMATION */
+ SystemResourceDeadlockTimeout, /* ULONG */
+ SystemBreakOnContextUnwindFailureInformation, /* ULONG (requires SeDebugPrivilege) */
+ SystemOslRamdiskInformation, /* SYSTEM_OSL_RAMDISK_INFORMATION */
+ SystemCodeIntegrityPolicyManagementInformation, /* SYSTEM_CODEINTEGRITYPOLICY_MANAGEMENT since 25H2 */
SystemMemoryNumaCacheInformation,
- SystemProcessorFeaturesBitMapInformation, // 250
- SystemRefTraceInformationEx, // SYSTEM_REF_TRACE_INFORMATION_EX
- SystemBasicProcessInformation, // SYSTEM_BASICPROCESS_INFORMATION
- SystemHandleCountInformation, // SYSTEM_HANDLECOUNT_INFORMATION
+ SystemProcessorFeaturesBitMapInformation, /* 250 */
+ SystemRefTraceInformationEx, /* SYSTEM_REF_TRACE_INFORMATION_EX */
+ SystemBasicProcessInformation, /* SYSTEM_BASICPROCESS_INFORMATION */
+ SystemHandleCountInformation, /* SYSTEM_HANDLECOUNT_INFORMATION */
MaxSystemInfoClass
} SYSTEM_INFORMATION_CLASS;
-// Thread State Change Types
+/* Thread State Change Types */
typedef enum _THREAD_STATE_CHANGE_TYPE
{
ThreadStateChangeSuspend,
@@ -911,26 +912,26 @@ typedef enum _THREAD_STATE_CHANGE_TYPE
ThreadStateChangeMax,
} THREAD_STATE_CHANGE_TYPE, * PTHREAD_STATE_CHANGE_TYPE;
-// Timer Information Classes
+/* Timer Information Classes */
typedef enum _TIMER_INFORMATION_CLASS
{
- TimerBasicInformation // TIMER_BASIC_INFORMATION
+ TimerBasicInformation /* TIMER_BASIC_INFORMATION */
} TIMER_INFORMATION_CLASS;
-// Timer Set Information Classes
+/* Timer Set Information Classes */
typedef enum _SYSK_TIMER_SET_INFORMATION_CLASS
{
- SysKTimerSetCoalescableTimer, // TIMER_SET_COALESCABLE_TIMER_INFO
+ SysKTimerSetCoalescableTimer, /* TIMER_SET_COALESCABLE_TIMER_INFO */
SysKMaxTimerInfoClass
} SYSK_TIMER_SET_INFORMATION_CLASS;
-// Timer Types
+/* Timer Types */
typedef enum _SYSK_TIMER_TYPE {
SysKTimerNotification,
SysKTimerSynchronization
} SYSK_TIMER_TYPE;
-// VDM Service Classes
+/* VDM Service Classes */
typedef enum _VDMSERVICECLASS
{
VdmStartExecution,
@@ -951,21 +952,21 @@ typedef enum _VDMSERVICECLASS
VdmPreInitialize
} VDMSERVICECLASS, * PVDMSERVICECLASS;
-// Virtual Memory Information Classes
+/* Virtual Memory Information Classes */
typedef enum _SYSK_VIRTUAL_MEMORY_INFORMATION_CLASS
{
- SysKVmPrefetchInformation, // MEMORY_PREFETCH_INFORMATION
- SysKVmPagePriorityInformation, // MEMORY_PAGE_PRIORITY_INFORMATION
- SysKVmCfgCallTargetInformation, // CFG_CALL_TARGET_LIST_INFORMATION // REDSTONE2
- SysKVmPageDirtyStateInformation, // REDSTONE3
- SysKVmImageHotPatchInformation, // 19H1
- SysKVmPhysicalContiguityInformation, // 20H1
+ SysKVmPrefetchInformation, /* MEMORY_PREFETCH_INFORMATION */
+ SysKVmPagePriorityInformation, /* MEMORY_PAGE_PRIORITY_INFORMATION */
+ SysKVmCfgCallTargetInformation, /* CFG_CALL_TARGET_LIST_INFORMATION REDSTONE2 */
+ SysKVmPageDirtyStateInformation, /* REDSTONE3 */
+ SysKVmImageHotPatchInformation, /* 19H1 */
+ SysKVmPhysicalContiguityInformation, /* 20H1 */
SysKVmVirtualMachinePrepopulateInformation,
SysKVmRemoveFromWorkingSetInformation,
SysKMaxVmInfoClass
} SYSK_VIRTUAL_MEMORY_INFORMATION_CLASS;
-// Wait Types
+/* Wait Types */
typedef enum _SYSK_WAIT_TYPE
{
SysKWaitAll,
@@ -975,18 +976,18 @@ typedef enum _SYSK_WAIT_TYPE
SysKWaitDpc,
} SYSK_WAIT_TYPE;
-// WNF Data Scope
+/* WNF Data Scope */
typedef enum _WNF_DATA_SCOPE
{
WnfDataScopeSystem,
WnfDataScopeSession,
WnfDataScopeUser,
WnfDataScopeProcess,
- WnfDataScopeMachine, // REDSTONE3
- WnfDataScopePhysicalMachine, // WIN11
+ WnfDataScopeMachine, /* REDSTONE3 */
+ WnfDataScopePhysicalMachine, /* WIN11 */
} WNF_DATA_SCOPE;
-// WNF State Name Information
+/* WNF State Name Information */
typedef enum _WNF_STATE_NAME_INFORMATION
{
WnfInfoStateNameExist,
@@ -994,7 +995,7 @@ typedef enum _WNF_STATE_NAME_INFORMATION
WnfInfoIsQuiescent
} WNF_STATE_NAME_INFORMATION;
-// WNF State Name Lifetime
+/* WNF State Name Lifetime */
typedef enum _WNF_STATE_NAME_LIFETIME
{
WnfWellKnownStateName,
@@ -1003,24 +1004,24 @@ typedef enum _WNF_STATE_NAME_LIFETIME
WnfTemporaryStateName
} WNF_STATE_NAME_LIFETIME;
-// Worker Factory Information Classes
+/* Worker Factory Information Classes */
typedef enum _WORKERFACTORYINFOCLASS
{
- WorkerFactoryTimeout, // LARGE_INTEGER
- WorkerFactoryRetryTimeout, // LARGE_INTEGER
- WorkerFactoryIdleTimeout, // s: LARGE_INTEGER
- WorkerFactoryBindingCount, // s: ULONG
- WorkerFactoryThreadMinimum, // s: ULONG
- WorkerFactoryThreadMaximum, // s: ULONG
- WorkerFactoryPaused, // ULONG or BOOLEAN
- WorkerFactoryBasicInformation, // q: WORKER_FACTORY_BASIC_INFORMATION
+ WorkerFactoryTimeout, /* LARGE_INTEGER */
+ WorkerFactoryRetryTimeout, /* LARGE_INTEGER */
+ WorkerFactoryIdleTimeout, /* s: LARGE_INTEGER */
+ WorkerFactoryBindingCount, /* s: ULONG */
+ WorkerFactoryThreadMinimum, /* s: ULONG */
+ WorkerFactoryThreadMaximum, /* s: ULONG */
+ WorkerFactoryPaused, /* ULONG or BOOLEAN */
+ WorkerFactoryBasicInformation, /* q: WORKER_FACTORY_BASIC_INFORMATION */
WorkerFactoryAdjustThreadGoal,
WorkerFactoryCallbackType,
- WorkerFactoryStackInformation, // 10
- WorkerFactoryThreadBasePriority, // s: ULONG
- WorkerFactoryTimeoutWaiters, // s: ULONG, since THRESHOLD
- WorkerFactoryFlags, // s: ULONG
- WorkerFactoryThreadSoftMaximum, // s: ULONG
- WorkerFactoryThreadCpuSets, // since REDSTONE5
+ WorkerFactoryStackInformation, /* 10 */
+ WorkerFactoryThreadBasePriority, /* s: ULONG */
+ WorkerFactoryTimeoutWaiters, /* s: ULONG, since THRESHOLD */
+ WorkerFactoryFlags, /* s: ULONG */
+ WorkerFactoryThreadSoftMaximum, /* s: ULONG */
+ WorkerFactoryThreadCpuSets, /* since REDSTONE5 */
MaxWorkerFactoryInfoClass
-} WORKERFACTORYINFOCLASS, * PWORKERFACTORYINFOCLASS;
+} WORKERFACTORYINFOCLASS, * PWORKERFACTORYINFOCLASS;
\ No newline at end of file
diff --git a/SysCallerK/Wrapper/include/SysK/sysTypes_k.h b/SysCallerK/Wrapper/include/SysK/sysTypes_k.h
index 92c2795..857c32a 100644
--- a/SysCallerK/Wrapper/include/SysK/sysTypes_k.h
+++ b/SysCallerK/Wrapper/include/SysK/sysTypes_k.h
@@ -1,25 +1,20 @@
#pragma once
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4201) // Disable nameless struct/union warnings (C4201)
-#endif
-
#include "sysExternals_k.h"
#include "sysConstants_k.h"
-// Forward declarations for cyclic dependencies
+/* Forward declarations for cyclic dependencies */
typedef struct _ACTIVATION_CONTEXT* PACTIVATION_CONTEXT;
typedef struct _ACTIVATION_CONTEXT_DATA* PACTIVATION_CONTEXT_DATA;
typedef struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME* PRTL_ACTIVATION_CONTEXT_STACK_FRAME;
typedef struct _ACTIVATION_CONTEXT_STACK* PACTIVATION_CONTEXT_STACK;
typedef struct _TEB* PTEB;
-// #define USE_PISID // Uncomment this line to use PISID instead of PSID
-#define USE_DYNAMIC_ARRAY // Uncomment this line to use dynamic array
-#define USE_POINTER_SUBAUTH // Uncomment this line to use pointer to an array for SubAuthority
+// #define USE_PISID /* Uncomment this line to use PISID instead of PSID */
+#define USE_DYNAMIC_ARRAY /* Uncomment this line to use dynamic array */
+#define USE_POINTER_SUBAUTH /* Uncomment this line to use pointer to an array for SubAuthority */
-// APC Routines
+/* APC Routines */
typedef VOID(NTAPI * PPS_APC_ROUTINE)(
_In_opt_ PVOID ApcArgument1,
_In_opt_ PVOID ApcArgument2,
@@ -44,13 +39,13 @@ typedef VOID(NTAPI * IO_APC_ROUTINE)(
typedef VOID(NTAPI * PENCLAVE_ROUTINE)(VOID);
-// User Thread Start Routine
+/* User Thread Start Routine */
typedef VOID(*PUSER_THREAD_START_ROUTINE)(PVOID);
-// Timer APC Routine
+/* Timer APC Routine */
typedef VOID(NTAPI* PACTIVATION_CONTEXT_NOTIFY_ROUTINE)(
- _In_ ULONG NotificationType, // ACTIVATION_CONTEXT_NOTIFICATION_*
+ _In_ ULONG NotificationType, /* ACTIVATION_CONTEXT_NOTIFICATION_* */
_In_ PACTIVATION_CONTEXT ActivationContext,
_In_ PACTIVATION_CONTEXT_DATA ActivationContextData,
_In_opt_ PVOID NotificationContext,
@@ -58,20 +53,20 @@ typedef VOID(NTAPI* PACTIVATION_CONTEXT_NOTIFY_ROUTINE)(
_Inout_ PBOOLEAN DisableThisNotification
);
-// Activation Context Data
+/* Activation Context Data */
typedef struct _ACTIVATION_CONTEXT_DATA
{
ULONG Magic;
ULONG HeaderSize;
ULONG FormatVersion;
ULONG TotalSize;
- ULONG DefaultTocOffset; // to ACTIVATION_CONTEXT_DATA_TOC_HEADER
- ULONG ExtendedTocOffset; // to ACTIVATION_CONTEXT_DATA_EXTENDED_TOC_HEADER
- ULONG AssemblyRosterOffset; // to ACTIVATION_CONTEXT_DATA_ASSEMBLY_ROSTER_HEADER
- ULONG Flags; // ACTIVATION_CONTEXT_FLAG_*
+ ULONG DefaultTocOffset; /* to ACTIVATION_CONTEXT_DATA_TOC_HEADER */
+ ULONG ExtendedTocOffset; /* to ACTIVATION_CONTEXT_DATA_EXTENDED_TOC_HEADER */
+ ULONG AssemblyRosterOffset; /* to ACTIVATION_CONTEXT_DATA_ASSEMBLY_ROSTER_HEADER */
+ ULONG Flags; /* ACTIVATION_CONTEXT_FLAG_* */
} ACTIVATION_CONTEXT_DATA, * PACTIVATION_CONTEXT_DATA;
-// Assembly Storage Map Entry
+/* Assembly Storage Map Entry */
typedef struct _ASSEMBLY_STORAGE_MAP_ENTRY
{
ULONG Flags;
@@ -79,7 +74,7 @@ typedef struct _ASSEMBLY_STORAGE_MAP_ENTRY
HANDLE Handle;
} ASSEMBLY_STORAGE_MAP_ENTRY, * PASSEMBLY_STORAGE_MAP_ENTRY;
-// Assembly Storage Map
+/* Assembly Storage Map */
typedef struct _ASSEMBLY_STORAGE_MAP
{
ULONG Flags;
@@ -87,7 +82,7 @@ typedef struct _ASSEMBLY_STORAGE_MAP
PASSEMBLY_STORAGE_MAP_ENTRY* AssemblyArray;
} ASSEMBLY_STORAGE_MAP, * PASSEMBLY_STORAGE_MAP;
-// Activation Context
+/* Activation Context */
typedef struct _ACTIVATION_CONTEXT
{
LONG RefCount;
@@ -101,25 +96,25 @@ typedef struct _ACTIVATION_CONTEXT
PASSEMBLY_STORAGE_MAP_ENTRY InlineStorageMapEntries[32];
} ACTIVATION_CONTEXT, * PACTIVATION_CONTEXT;
-// RTL Activation Context Stack Frame
+/* RTL Activation Context Stack Frame */
typedef struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME
{
struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME* Previous;
PACTIVATION_CONTEXT ActivationContext;
- ULONG Flags; // RTL_ACTIVATION_CONTEXT_STACK_FRAME_FLAG_*
+ ULONG Flags; /* RTL_ACTIVATION_CONTEXT_STACK_FRAME_FLAG_* */
} RTL_ACTIVATION_CONTEXT_STACK_FRAME, * PRTL_ACTIVATION_CONTEXT_STACK_FRAME;
-// Activation Context Stack Frame
+/* Activation Context Stack Frame */
typedef struct _ACTIVATION_CONTEXT_STACK
{
PRTL_ACTIVATION_CONTEXT_STACK_FRAME ActiveFrame;
LIST_ENTRY FrameListCache;
- ULONG Flags; // ACTIVATION_CONTEXT_STACK_FLAG_*
+ ULONG Flags; /* ACTIVATION_CONTEXT_STACK_FLAG_* */
ULONG NextCookieSequenceNumber;
ULONG StackId;
} ACTIVATION_CONTEXT_STACK, * PACTIVATION_CONTEXT_STACK;
-// Boot Options
+/* Boot Options */
typedef struct _BOOT_OPTIONS
{
ULONG Version;
@@ -136,35 +131,35 @@ typedef struct _CURDIR
HANDLE Handle;
} CURDIR, * PCURDIR;
-// CM Extended Parameter
+/* CM Extended Parameter */
typedef struct DECLSPEC_ALIGN(8) _CM_EXTENDED_PARAMETER
{
- // Bit field for the type of the extended parameter
+ /* Bit field for the type of the extended parameter */
struct
{
- ULONG64 Type : CM_EXTENDED_PARAMETER_TYPE_BITS; // Type of the extended parameter
- ULONG64 Reserved : 64 - CM_EXTENDED_PARAMETER_TYPE_BITS; // Reserved bits for future use
+ ULONG64 Type : CM_EXTENDED_PARAMETER_TYPE_BITS; /* Type of the extended parameter */
+ ULONG64 Reserved : 64 - CM_EXTENDED_PARAMETER_TYPE_BITS; /* Reserved bits for future use */
};
- // Union to hold different types of data
+ /* Union to hold different types of data */
union
{
- ULONG64 ULong64; // 64-bit unsigned long
- PVOID Pointer; // Pointer to any type
- SIZE_T Size; // Size type
- HANDLE Handle; // Handle type
- ULONG ULong; // 32-bit unsigned long
- ACCESS_MASK AccessMask; // Access mask type
+ ULONG64 ULong64; /* 64-bit unsigned long */
+ PVOID Pointer; /* Pointer to any type */
+ SIZE_T Size; /* Size type */
+ HANDLE Handle; /* Handle type */
+ ULONG ULong; /* 32-bit unsigned long */
+ ACCESS_MASK AccessMask; /* Access mask type */
};
} CM_EXTENDED_PARAMETER, * PCM_EXTENDED_PARAMETER;
-// DBGKM Create Thread
+/* DBGKM Create Thread */
typedef struct _DBGKM_CREATE_THREAD
{
ULONG SubSystemKey;
PVOID StartAddress;
} DBGKM_CREATE_THREAD, * PDBGKM_CREATE_THREAD;
-// DBGKM Create Process
+/* DBGKM Create Process */
typedef struct _DBGKM_CREATE_PROCESS
{
ULONG SubSystemKey;
@@ -175,26 +170,26 @@ typedef struct _DBGKM_CREATE_PROCESS
DBGKM_CREATE_THREAD InitialThread;
} DBGKM_CREATE_PROCESS, * PDBGKM_CREATE_PROCESS;
-// DBGKM Exception
+/* DBGKM Exception */
typedef struct _DBGKM_EXCEPTION
{
EXCEPTION_RECORD ExceptionRecord;
ULONG FirstChance;
} DBGKM_EXCEPTION, * PDBGKM_EXCEPTION;
-// DBGKM Exit Thread
+/* DBGKM Exit Thread */
typedef struct _DBGKM_EXIT_THREAD
{
NTSTATUS ExitStatus;
} DBGKM_EXIT_THREAD, * PDBGKM_EXIT_THREAD;
-// DBGKM Exit Process
+/* DBGKM Exit Process */
typedef struct _DBGKM_EXIT_PROCESS
{
NTSTATUS ExitStatus;
} DBGKM_EXIT_PROCESS, * PDBGKM_EXIT_PROCESS;
-// DBGKM Load DLL
+/* DBGKM Load DLL */
typedef struct _DBGKM_LOAD_DLL
{
HANDLE FileHandle;
@@ -204,20 +199,20 @@ typedef struct _DBGKM_LOAD_DLL
PVOID NamePointer;
} DBGKM_LOAD_DLL, * PDBGKM_LOAD_DLL;
-// DBGKM Unload DLL
+/* DBGKM Unload DLL */
typedef struct _DBGKM_UNLOAD_DLL
{
PVOID BaseAddress;
} DBGKM_UNLOAD_DLL, * PDBGKM_UNLOAD_DLL;
-// DBGUI Create Thread
+/* DBGUI Create Thread */
typedef struct _DBGUI_CREATE_THREAD
{
HANDLE HandleToThread;
DBGKM_CREATE_THREAD NewThread;
} DBGUI_CREATE_THREAD, * PDBGUI_CREATE_THREAD;
-// DBGUI Create Process
+/* DBGUI Create Process */
typedef struct _DBGUI_CREATE_PROCESS
{
HANDLE HandleToProcess;
@@ -225,7 +220,7 @@ typedef struct _DBGUI_CREATE_PROCESS
DBGKM_CREATE_PROCESS NewProcess;
} DBGUI_CREATE_PROCESS, * PDBGUI_CREATE_PROCESS;
-// DBGUI Wait State Change
+/* DBGUI Wait State Change */
typedef struct _DBGUI_WAIT_STATE_CHANGE
{
DBG_STATE NewState;
@@ -242,17 +237,17 @@ typedef struct _DBGUI_WAIT_STATE_CHANGE
} StateInfo;
} DBGUI_WAIT_STATE_CHANGE, * PDBGUI_WAIT_STATE_CHANGE;
-// File Basic Information
+/* File Basic Information */
typedef struct _SYSK_FILE_BASIC_INFORMATION
{
- LARGE_INTEGER CreationTime; // Specifies the time that the file was created.
- LARGE_INTEGER LastAccessTime; // Specifies the time that the file was last accessed.
- LARGE_INTEGER LastWriteTime; // Specifies the time that the file was last written to.
- LARGE_INTEGER ChangeTime; // Specifies the last time the file was changed.
- ULONG FileAttributes; // Specifies one or more FILE_ATTRIBUTE_XXX flags.
+ LARGE_INTEGER CreationTime; /* Specifies the time that the file was created. */
+ LARGE_INTEGER LastAccessTime; /* Specifies the time that the file was last accessed. */
+ LARGE_INTEGER LastWriteTime; /* Specifies the time that the file was last written to. */
+ LARGE_INTEGER ChangeTime; /* Specifies the last time the file was changed. */
+ ULONG FileAttributes; /* Specifies one or more FILE_ATTRIBUTE_XXX flags. */
} SYSK_FILE_BASIC_INFORMATION, * PSYSK_FILE_BASIC_INFORMATION;
-// File IO Completion Information
+/* File IO Completion Information */
typedef struct _FILE_IO_COMPLETION_INFORMATION
{
PVOID KeyContext;
@@ -260,7 +255,7 @@ typedef struct _FILE_IO_COMPLETION_INFORMATION
IO_STATUS_BLOCK IoStatusBlock;
} FILE_IO_COMPLETION_INFORMATION, * PFILE_IO_COMPLETION_INFORMATION;
-// File Network Open Information
+/* File Network Open Information */
typedef struct _SYSK_FILE_NETWORK_OPEN_INFORMATION
{
LARGE_INTEGER CreationTime;
@@ -272,7 +267,7 @@ typedef struct _SYSK_FILE_NETWORK_OPEN_INFORMATION
ULONG FileAttributes;
} SYSK_FILE_NETWORK_OPEN_INFORMATION, * PSYSK_FILE_NETWORK_OPEN_INFORMATION;
-// File Path
+/* File Path */
typedef struct _FILE_PATH
{
ULONG Version;
@@ -281,7 +276,7 @@ typedef struct _FILE_PATH
_Field_size_bytes_(Length) UCHAR FilePath[1];
} FILE_PATH, * PFILE_PATH;
-// GDI TEB Batch
+/* GDI TEB Batch */
typedef struct _GDI_TEB_BATCH
{
ULONG Offset;
@@ -289,7 +284,7 @@ typedef struct _GDI_TEB_BATCH
ULONG Buffer[GDI_BATCH_BUFFER_SIZE];
} GDI_TEB_BATCH, * PGDI_TEB_BATCH;
-// Initial TEB
+/* Initial TEB */
typedef struct _INITIAL_TEB
{
struct
@@ -302,21 +297,21 @@ typedef struct _INITIAL_TEB
PVOID StackAllocationBase;
} INITIAL_TEB, * PINITIAL_TEB;
-// Job Set Arrary
+/* Job Set Arrary */
typedef struct _JOB_SET_ARRAY {
HANDLE JobHandle;
DWORD MemberLevel;
DWORD Flags;
} JOB_SET_ARRAY, * PJOB_SET_ARRAY;
-// Memory Range Entry
+/* Memory Range Entry */
typedef struct _SYSK_MEMORY_RANGE_ENTRY
{
PVOID VirtualAddress;
SIZE_T NumberOfBytes;
} SYSK_MEMORY_RANGE_ENTRY, * PSYSK_MEMORY_RANGE_ENTRY;
-// NTPSS Memory Bulk Information
+/* NTPSS Memory Bulk Information */
typedef struct _NTPSS_MEMORY_BULK_INFORMATION
{
ULONG QueryFlags;
@@ -324,7 +319,7 @@ typedef struct _NTPSS_MEMORY_BULK_INFORMATION
PVOID NextValidAddress;
} NTPSS_MEMORY_BULK_INFORMATION, * PNTPSS_MEMORY_BULK_INFORMATION;
-// Object Boundary Descriptor
+/* Object Boundary Descriptor */
typedef struct _OBJECT_BOUNDARY_DESCRIPTOR
{
ULONG Version;
@@ -339,10 +334,10 @@ typedef struct _OBJECT_BOUNDARY_DESCRIPTOR
ULONG Reserved : 31;
};
};
- //OBJECT_BOUNDARY_ENTRY Entries[1];
+ /* OBJECT_BOUNDARY_ENTRY Entries[1]; */
} OBJECT_BOUNDARY_DESCRIPTOR, * POBJECT_BOUNDARY_DESCRIPTOR;
-// PS Attribute
+/* PS Attribute */
typedef struct _PS_ATTRIBUTE
{
ULONG_PTR Attribute;
@@ -355,21 +350,21 @@ typedef struct _PS_ATTRIBUTE
PSIZE_T ReturnLength;
} PS_ATTRIBUTE, * PPS_ATTRIBUTE;
-// PS Attribute List
+/* PS Attribute List */
typedef struct _PS_ATTRIBUTE_LIST
{
SIZE_T TotalLength;
PS_ATTRIBUTE Attributes[1];
} PS_ATTRIBUTE_LIST, * PPS_ATTRIBUTE_LIST;
-// PS Create Info
+/* PS Create Info */
typedef struct _PS_CREATE_INFO
{
SIZE_T Size;
PS_CREATE_STATE State;
union
{
- // PsCreateInitialState
+ /* PsCreateInitialState */
struct
{
union
@@ -388,22 +383,22 @@ typedef struct _PS_CREATE_INFO
};
ACCESS_MASK AdditionalFileAccess;
} InitState;
- // PsCreateFailOnSectionCreate
+ /* PsCreateFailOnSectionCreate */
struct
{
HANDLE FileHandle;
} FailSection;
- // PsCreateFailExeFormat
+ /* PsCreateFailExeFormat */
struct
{
USHORT DllCharacteristics;
} ExeFormat;
- // PsCreateFailExeName
+ /* PsCreateFailExeName */
struct
{
HANDLE IFEOKey;
} ExeName;
- // PsCreateSuccess
+ /* PsCreateSuccess */
struct
{
union
@@ -413,7 +408,7 @@ typedef struct _PS_CREATE_INFO
{
UCHAR ProtectedProcess : 1;
UCHAR AddressSpaceOverride : 1;
- UCHAR DevOverrideEnabled : 1; // from Image File Execution Options
+ UCHAR DevOverrideEnabled : 1; /* from Image File Execution Options */
UCHAR ManifestDetected : 1;
UCHAR ProtectedProcessLight : 1;
UCHAR SpareBits1 : 3;
@@ -434,7 +429,7 @@ typedef struct _PS_CREATE_INFO
};
} PS_CREATE_INFO, * PPS_CREATE_INFO;
-// RTL Drive Letter Current Directory
+/* RTL Drive Letter Current Directory */
typedef struct _RTL_DRIVE_LETTER_CURDIR
{
USHORT Flags;
@@ -443,7 +438,7 @@ typedef struct _RTL_DRIVE_LETTER_CURDIR
STRING DosPath;
} RTL_DRIVE_LETTER_CURDIR, * PRTL_DRIVE_LETTER_CURDIR;
-// RTL User Process Parameters
+/* RTL User Process Parameters */
typedef struct _RTL_USER_PROCESS_PARAMETERS
{
ULONG MaximumLength;
@@ -486,22 +481,22 @@ typedef struct _RTL_USER_PROCESS_PARAMETERS
PVOID PackageDependencyData;
ULONG ProcessGroupId;
ULONG LoaderThreads;
- UNICODE_STRING RedirectionDllName; // REDSTONE4
- UNICODE_STRING HeapPartitionName; // 19H1
+ UNICODE_STRING RedirectionDllName; /* REDSTONE4 */
+ UNICODE_STRING HeapPartitionName; /* 19H1 */
PULONGLONG DefaultThreadpoolCpuSetMasks;
ULONG DefaultThreadpoolCpuSetMaskCount;
ULONG DefaultThreadpoolThreadMaximum;
- ULONG HeapMemoryTypeMask; // WIN11
+ ULONG HeapMemoryTypeMask; /* WIN11 */
} RTL_USER_PROCESS_PARAMETERS, * PRTL_USER_PROCESS_PARAMETERS;
-// SE File Cache Claim Information
+/* SE File Cache Claim Information */
typedef struct _SE_FILE_CACHE_CLAIM_INFORMATION
{
ULONG Size;
PVOID Claim;
} SE_FILE_CACHE_CLAIM_INFORMATION, * PSE_FILE_CACHE_CLAIM_INFORMATION;
-// SE Set File Cache Information
+/* SE Set File Cache Information */
typedef struct _SE_SET_FILE_CACHE_INFORMATION
{
ULONG Size;
@@ -509,90 +504,90 @@ typedef struct _SE_SET_FILE_CACHE_INFORMATION
SE_FILE_CACHE_CLAIM_INFORMATION OriginClaimInfo;
} SE_SET_FILE_CACHE_INFORMATION, * PSE_SET_FILE_CACHE_INFORMATION;
-// System Thread Information
+/* System Thread Information */
typedef struct _SYSTEM_THREAD_INFORMATION
{
- LARGE_INTEGER KernelTime; // Number of 100-nanosecond intervals spent executing kernel code.
- LARGE_INTEGER UserTime; // Number of 100-nanosecond intervals spent executing user code.
- LARGE_INTEGER CreateTime; // The date and time when the thread was created.
- ULONG WaitTime; // The current time spent in ready queue or waiting (depending on the thread state).
- PVOID StartAddress; // The initial start address of the thread.
- CLIENT_ID ClientId; // The identifier of the thread and the process owning the thread.
- KPRIORITY Priority; // The dynamic priority of the thread.
- KPRIORITY BasePriority; // The starting priority of the thread.
- ULONG ContextSwitches; // The total number of context switches performed.
- KTHREAD_STATE ThreadState; // The current state of the thread.
- KWAIT_REASON WaitReason; // The current reason the thread is waiting.
+ LARGE_INTEGER KernelTime; /* Number of 100-nanosecond intervals spent executing kernel code. */
+ LARGE_INTEGER UserTime; /* Number of 100-nanosecond intervals spent executing user code. */
+ LARGE_INTEGER CreateTime; /* The date and time when the thread was created. */
+ ULONG WaitTime; /* The current time spent in ready queue or waiting (depending on the thread state). */
+ PVOID StartAddress; /* The initial start address of the thread. */
+ CLIENT_ID ClientId; /* The identifier of the thread and the process owning the thread. */
+ KPRIORITY Priority; /* The dynamic priority of the thread. */
+ KPRIORITY BasePriority; /* The starting priority of the thread. */
+ ULONG ContextSwitches; /* The total number of context switches performed. */
+ KTHREAD_STATE ThreadState; /* The current state of the thread. */
+ KWAIT_REASON WaitReason; /* The current reason the thread is waiting. */
} SYSTEM_THREAD_INFORMATION, * PSYSTEM_THREAD_INFORMATION;
-// System Process Information
+/* System Process Information */
typedef struct _SYSTEM_PROCESS_INFO
{
- ULONG NextEntryOffset; // The address of the previous item plus the value in the NextEntryOffset member. For the last item in the array, NextEntryOffset is 0.
- ULONG NumberOfThreads; // The NumberOfThreads member contains the number of threads in the process.
- ULONGLONG WorkingSetPrivateSize; // since VISTA
- ULONG HardFaultCount; // since WIN7
- ULONG NumberOfThreadsHighWatermark; // The peak number of threads that were running at any given point in time, indicative of potential performance bottlenecks related to thread management.
- ULONGLONG CycleTime; // The sum of the cycle time of all threads in the process.
- LARGE_INTEGER CreateTime; // Number of 100-nanosecond intervals since the creation time of the process. Not updated during system timezone changes resullting in an incorrect value.
+ ULONG NextEntryOffset; /* The address of the previous item plus the value in the NextEntryOffset member. For the last item in the array, NextEntryOffset is 0. */
+ ULONG NumberOfThreads; /* The NumberOfThreads member contains the number of threads in the process. */
+ ULONGLONG WorkingSetPrivateSize; /* since VISTA */
+ ULONG HardFaultCount; /* since WIN7 */
+ ULONG NumberOfThreadsHighWatermark; /* The peak number of threads that were running at any given point in time, indicative of potential performance bottlenecks related to thread management. */
+ ULONGLONG CycleTime; /* The sum of the cycle time of all threads in the process. */
+ LARGE_INTEGER CreateTime; /* Number of 100-nanosecond intervals since the creation time of the process. Not updated during system timezone changes resullting in an incorrect value. */
LARGE_INTEGER UserTime;
LARGE_INTEGER KernelTime;
- UNICODE_STRING ImageName; // The file name of the executable image.
+ UNICODE_STRING ImageName; /* The file name of the executable image. */
KPRIORITY BasePriority;
HANDLE UniqueProcessId;
HANDLE InheritedFromUniqueProcessId;
ULONG HandleCount;
ULONG SessionId;
- ULONG_PTR UniqueProcessKey; // since VISTA (requires SystemExtendedProcessInformation)
- SIZE_T PeakVirtualSize; // The peak size, in bytes, of the virtual memory used by the process.
- SIZE_T VirtualSize; // The current size, in bytes, of virtual memory used by the process.
- ULONG PageFaultCount; // The member of page faults for data that is not currently in memory.
- SIZE_T PeakWorkingSetSize; // The peak size, in kilobytes, of the working set of the process.
- SIZE_T WorkingSetSize; // The number of pages visible to the process in physical memory. These pages are resident and available for use without triggering a page fault.
- SIZE_T QuotaPeakPagedPoolUsage; // The peak quota charged to the process for pool usage, in bytes.
- SIZE_T QuotaPagedPoolUsage; // The quota charged to the process for paged pool usage, in bytes.
- SIZE_T QuotaPeakNonPagedPoolUsage; // The peak quota charged to the process for nonpaged pool usage, in bytes.
- SIZE_T QuotaNonPagedPoolUsage; // The current quota charged to the process for nonpaged pool usage.
- SIZE_T PagefileUsage; // The PagefileUsage member contains the number of bytes of page file storage in use by the process.
- SIZE_T PeakPagefileUsage; // The maximum number of bytes of page-file storage used by the process.
- SIZE_T PrivatePageCount; // The number of memory pages allocated for the use by the process.
- LARGE_INTEGER ReadOperationCount; // The total number of read operations performed.
- LARGE_INTEGER WriteOperationCount; // The total number of write operations performed.
- LARGE_INTEGER OtherOperationCount; // The total number of I/O operations performed other than read and write operations.
- LARGE_INTEGER ReadTransferCount; // The total number of bytes read during a read operation.
- LARGE_INTEGER WriteTransferCount; // The total number of bytes written during a write operation.
- LARGE_INTEGER OtherTransferCount; // The total number of bytes transferred during operations other than read and write operations.
- SYSTEM_THREAD_INFORMATION Threads[1]; // This type is not defined in the structure but was added for convenience.
+ ULONG_PTR UniqueProcessKey; /* since VISTA (requires SystemExtendedProcessInformation) */
+ SIZE_T PeakVirtualSize; /* The peak size, in bytes, of the virtual memory used by the process. */
+ SIZE_T VirtualSize; /* The current size, in bytes, of virtual memory used by the process. */
+ ULONG PageFaultCount; /* The member of page faults for data that is not currently in memory. */
+ SIZE_T PeakWorkingSetSize; /* The peak size, in kilobytes, of the working set of the process. */
+ SIZE_T WorkingSetSize; /* The number of pages visible to the process in physical memory. These pages are resident and available for use without triggering a page fault. */
+ SIZE_T QuotaPeakPagedPoolUsage; /* The peak quota charged to the process for pool usage, in bytes. */
+ SIZE_T QuotaPagedPoolUsage; /* The quota charged to the process for paged pool usage, in bytes. */
+ SIZE_T QuotaPeakNonPagedPoolUsage; /* The peak quota charged to the process for nonpaged pool usage, in bytes. */
+ SIZE_T QuotaNonPagedPoolUsage; /* The current quota charged to the process for nonpaged pool usage. */
+ SIZE_T PagefileUsage; /* The PagefileUsage member contains the number of bytes of page file storage in use by the process. */
+ SIZE_T PeakPagefileUsage; /* The maximum number of bytes of page-file storage used by the process. */
+ SIZE_T PrivatePageCount; /* The number of memory pages allocated for the use by the process. */
+ LARGE_INTEGER ReadOperationCount; /* The total number of read operations performed. */
+ LARGE_INTEGER WriteOperationCount; /* The total number of write operations performed. */
+ LARGE_INTEGER OtherOperationCount; /* The total number of I/O operations performed other than read and write operations. */
+ LARGE_INTEGER ReadTransferCount; /* The total number of bytes read during a read operation. */
+ LARGE_INTEGER WriteTransferCount; /* The total number of bytes written during a write operation. */
+ LARGE_INTEGER OtherTransferCount; /* The total number of bytes transferred during operations other than read and write operations. */
+ SYSTEM_THREAD_INFORMATION Threads[1]; /* This type is not defined in the structure but was added for convenience. */
} SYSTEM_PROCESS_INFO, * PSYSTEM_PROCESS_INFO;
-// tagSOleTlsData
+/* tagSOleTlsData */
typedef struct tagSOleTlsData
{
PVOID ThreadBase;
PVOID SmAllocator;
ULONG ApartmentID;
- ULONG Flags; // OLETLSFLAGS
+ ULONG Flags; /* OLETLSFLAGS */
LONG TlsMapIndex;
PVOID* TlsSlot;
ULONG ComInits;
ULONG OleInits;
ULONG Calls;
- PVOID ServerCall; // previously CallInfo (before TH1)
- PVOID CallObjectCache; // previously FreeAsyncCall (before TH1)
- PVOID ContextStack; // previously FreeClientCall (before TH1)
+ PVOID ServerCall; /* previously CallInfo (before TH1) */
+ PVOID CallObjectCache; /* previously FreeAsyncCall (before TH1) */
+ PVOID ContextStack; /* previously FreeClientCall (before TH1) */
PVOID ObjServer;
ULONG TIDCaller;
- // ... (other fields are version-dependant)
+ /* ... (other fields are version-dependant) */
} SOleTlsData, * PSOleTlsData;
-// TEB Active Frame Context
+/* TEB Active Frame Context */
typedef struct _TEB_ACTIVE_FRAME_CONTEXT
{
ULONG Flags;
PCSTR FrameName;
} TEB_ACTIVE_FRAME_CONTEXT, * PTEB_ACTIVE_FRAME_CONTEXT;
-// TEB Active Frame
+/* TEB Active Frame */
typedef struct _TEB_ACTIVE_FRAME
{
ULONG Flags;
@@ -600,172 +595,172 @@ typedef struct _TEB_ACTIVE_FRAME
PTEB_ACTIVE_FRAME_CONTEXT Context;
} TEB_ACTIVE_FRAME, * PTEB_ACTIVE_FRAME;
-// TEB
+/* TEB */
typedef struct _TEB
{
- //
- // Thread Information Block (TIB) contains the thread's stack, base and limit addresses, the current stack pointer, and the exception list.
- //
+ /*
+ Thread Information Block (TIB) contains the thread's stack, base and limit addresses, the current stack pointer, and the exception list.
+ */
NT_TIB NtTib;
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
PVOID EnvironmentPointer;
- //
- // Client ID for this thread.
- //
+ /*
+ Client ID for this thread.
+ */
CLIENT_ID ClientId;
- //
- // A handle to an active Remote Procedure Call (RPC) if the thread is currently involved in an RPC operation.
- //
+ /*
+ A handle to an active Remote Procedure Call (RPC) if the thread is currently involved in an RPC operation.
+ */
PVOID ActiveRpcHandle;
- //
- // A pointer to the __declspec(thread) local storage array.
- //
+ /*
+ A pointer to the __declspec(thread) local storage array.
+ */
PVOID ThreadLocalStoragePointer;
- //
- // A pointer to the Process Environment Block (PEB), which contains information about the process.
- //
+ /*
+ A pointer to the Process Environment Block (PEB), which contains information about the process.
+ */
PPEB ProcessEnvironmentBlock;
- //
- // The previous Win32 error value for this thread.
- //
+ /*
+ The previous Win32 error value for this thread.
+ */
ULONG LastErrorValue;
- //
- // The number of critical sections currently owned by this thread.
- //
+ /*
+ The number of critical sections currently owned by this thread.
+ */
ULONG CountOfOwnedCriticalSections;
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
PVOID CsrClientThread;
- //
- // Reserved for GDI/USER (Win32k).
- //
+ /*
+ Reserved for GDI/USER (Win32k).
+ */
PVOID Win32ThreadInfo;
ULONG User32Reserved[26];
ULONG UserReserved[5];
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
PVOID WOW32Reserved;
- //
- // The LCID of the current thread. (Kernel32!GetThreadLocale)
- //
+ /*
+ The LCID of the current thread. (Kernel32!GetThreadLocale)
+ */
LCID CurrentLocale;
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
ULONG FpSoftwareStatusRegister;
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
PVOID ReservedForDebuggerInstrumentation[16];
#ifdef _WIN64
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
PVOID SystemReserved1[25];
- //
- // Per-thread fiber local storage. (Teb->HasFiberData)
- //
+ /*
+ Per-thread fiber local storage. (Teb->HasFiberData)
+ */
PVOID HeapFlsData;
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
ULONG_PTR RngState[4];
#else
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
PVOID SystemReserved1[26];
#endif
- //
- // Placeholder compatibility mode. (ProjFs and Cloud Files)
- //
+ /*
+ Placeholder compatibility mode. (ProjFs and Cloud Files)
+ */
CHAR PlaceholderCompatibilityMode;
- //
- // Indicates whether placeholder hydration is always explicit.
- //
+ /*
+ Indicates whether placeholder hydration is always explicit.
+ */
BOOLEAN PlaceholderHydrationAlwaysExplicit;
- //
- // ProjFs and Cloud Files (reparse point) file virtualization.
- //
+ /*
+ ProjFs and Cloud Files (reparse point) file virtualization.
+ */
CHAR PlaceholderReserved[10];
- //
- // The process ID (PID) that the current COM server thread is acting on behalf of.
- //
+ /*
+ The process ID (PID) that the current COM server thread is acting on behalf of.
+ */
ULONG ProxiedProcessId;
- //
- // Pointer to the activation context stack for the current thread.
- //
+ /*
+ Pointer to the activation context stack for the current thread.
+ */
ACTIVATION_CONTEXT_STACK ActivationStack;
- //
- // Opaque operation on behalf of another user or process.
- //
+ /*
+ Opaque operation on behalf of another user or process.
+ */
UCHAR WorkingOnBehalfTicket[8];
- //
- // The last exception status for the current thread.
- //
+ /*
+ The last exception status for the current thread.
+ */
NTSTATUS ExceptionCode;
- //
- // Pointer to the activation context stack for the current thread.
- //
+ /*
+ Pointer to the activation context stack for the current thread.
+ */
PACTIVATION_CONTEXT_STACK ActivationContextStackPointer;
- //
- // The stack pointer (SP) of the current system call or exception during instrumentation.
- //
+ /*
+ The stack pointer (SP) of the current system call or exception during instrumentation.
+ */
ULONG_PTR InstrumentationCallbackSp;
- //
- // The program counter (PC) of the previous system call or exception during instrumentation.
- //
+ /*
+ The program counter (PC) of the previous system call or exception during instrumentation.
+ */
ULONG_PTR InstrumentationCallbackPreviousPc;
- //
- // The stack pointer (SP) of the previous system call or exception during instrumentation.
- //
+ /*
+ The stack pointer (SP) of the previous system call or exception during instrumentation.
+ */
ULONG_PTR InstrumentationCallbackPreviousSp;
#ifdef _WIN64
- //
- // The miniversion ID of the current transacted file operation.
- //
+ /*
+ The miniversion ID of the current transacted file operation.
+ */
ULONG TxFsContext;
#endif
- //
- // Indicates the state of the system call or exception instrumentation callback.
- //
+ /*
+ Indicates the state of the system call or exception instrumentation callback.
+ */
BOOLEAN InstrumentationCallbackDisabled;
#ifdef _WIN64
- //
- // Indicates the state of alignment exceptions for unaligned load/store operations.
- //
+ /*
+ Indicates the state of alignment exceptions for unaligned load/store operations.
+ */
BOOLEAN UnalignedLoadStoreExceptions;
#endif
#ifndef _WIN64
- //
- // SpareBytes.
- //
+ /*
+ SpareBytes.
+ */
UCHAR SpareBytes[23];
- //
- // The miniversion ID of the current transacted file operation.
- //
+ /*
+ The miniversion ID of the current transacted file operation.
+ */
ULONG TxFsContext;
#endif
- //
- // Reserved for GDI (Win32k).
- //
+ /*
+ Reserved for GDI (Win32k).
+ */
GDI_TEB_BATCH GdiTebBatch;
CLIENT_ID RealClientId;
HANDLE GdiCachedProcessHandle;
ULONG GdiClientPID;
ULONG GdiClientTID;
PVOID GdiThreadLocalInfo;
- //
- // Reserved for User32 (Win32k).
- //
+ /*
+ Reserved for User32 (Win32k).
+ */
ULONG_PTR Win32ClientInfo[WIN32_CLIENT_INFO_LENGTH];
- //
- // Reserved for opengl32.dll
- //
+ /*
+ Reserved for opengl32.dll
+ */
PVOID glDispatchTable[233];
ULONG_PTR glReserved1[29];
PVOID glReserved2;
@@ -774,81 +769,81 @@ typedef struct _TEB
PVOID glTable;
PVOID glCurrentRC;
PVOID glContext;
- //
- // The previous status value for this thread.
- //
+ /*
+ The previous status value for this thread.
+ */
NTSTATUS LastStatusValue;
- //
- // A static string for use by the application.
- //
+ /*
+ A static string for use by the application.
+ */
UNICODE_STRING StaticUnicodeString;
- //
- // A static buffer for use by the application.
- //
+ /*
+ A static buffer for use by the application.
+ */
WCHAR StaticUnicodeBuffer[STATIC_UNICODE_BUFFER_LENGTH];
- //
- // The maximum stack size and indicates the base of the stack.
- //
+ /*
+ The maximum stack size and indicates the base of the stack.
+ */
PVOID DeallocationStack;
- //
- // Data for Thread Local Storage. (TlsGetValue)
- //
+ /*
+ Data for Thread Local Storage. (TlsGetValue)
+ */
PVOID TlsSlots[TLS_MINIMUM_AVAILABLE];
- //
- // Reserved for TLS.
- //
+ /*
+ Reserved for TLS.
+ */
LIST_ENTRY TlsLinks;
- //
- // Reserved for NTVDM.
- //
+ /*
+ Reserved for NTVDM.
+ */
PVOID Vdm;
- //
- // Reserved for RPC.
- //
+ /*
+ Reserved for RPC.
+ */
PVOID ReservedForNtRpc;
- //
- // Reserved for Debugging (DebugActiveProcess).
- //
+ /*
+ Reserved for Debugging (DebugActiveProcess).
+ */
PVOID DbgSsReserved[2];
- //
- // The error mode for the current thread. (GetThreadErrorMode)
- //
+ /*
+ The error mode for the current thread. (GetThreadErrorMode)
+ */
ULONG HardErrorMode;
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
#ifdef _WIN64
PVOID Instrumentation[11];
#else
PVOID Instrumentation[9];
#endif
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
GUID ActivityId;
- //
- // The identifier of the service that created the thread. (svchost)
- //
+ /*
+ The identifier of the service that created the thread. (svchost)
+ */
PVOID SubProcessTag;
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
PVOID PerflibData;
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
PVOID EtwTraceData;
- //
- // The address of a socket handle during a blocking socket operation. (WSAStartup)
- //
+ /*
+ The address of a socket handle during a blocking socket operation. (WSAStartup)
+ */
HANDLE WinSockData;
- //
- // The number of function calls accumulated in the current GDI batch. (GdiSetBatchLimit)
- //
+ /*
+ The number of function calls accumulated in the current GDI batch. (GdiSetBatchLimit)
+ */
ULONG GdiBatchCount;
- //
- // The preferred processor for the current thread. (SetThreadIdealProcessor/SetThreadIdealProcessorEx)
- //
+ /*
+ The preferred processor for the current thread. (SetThreadIdealProcessor/SetThreadIdealProcessorEx)
+ */
union
{
PROCESSOR_NUMBER CurrentIdealProcessor;
@@ -861,191 +856,191 @@ typedef struct _TEB
UCHAR IdealProcessor;
};
};
- //
- // The minimum size of the stack available during any stack overflow exceptions. (SetThreadStackGuarantee)
- //
+ /*
+ The minimum size of the stack available during any stack overflow exceptions. (SetThreadStackGuarantee)
+ */
ULONG GuaranteedStackBytes;
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
PVOID ReservedForPerf;
- //
- // Reserved for Object Linking and Embedding (OLE)
- //
+ /*
+ Reserved for Object Linking and Embedding (OLE)
+ */
PSOleTlsData ReservedForOle;
- //
- // Indicates whether the thread is waiting on the loader lock.
- //
+ /*
+ Indicates whether the thread is waiting on the loader lock.
+ */
ULONG WaitingOnLoaderLock;
- //
- // The saved priority state for the thread.
- //
+ /*
+ The saved priority state for the thread.
+ */
PVOID SavedPriorityState;
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
ULONG_PTR ReservedForCodeCoverage;
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
PVOID ThreadPoolData;
- //
- // Pointer to the TLS (Thread Local Storage) expansion slots for the thread.
- //
+ /*
+ Pointer to the TLS (Thread Local Storage) expansion slots for the thread.
+ */
PVOID* TlsExpansionSlots;
#ifdef _WIN64
- PVOID ChpeV2CpuAreaInfo; // CHPEV2_CPUAREA_INFO // previously DeallocationBStore
- PVOID Unused; // previously BStoreLimit
+ PVOID ChpeV2CpuAreaInfo; /* CHPEV2_CPUAREA_INFO, previously DeallocationBStore */
+ PVOID Unused; /* previously BStoreLimit */
#endif
- //
- // The generation of the MUI (Multilingual User Interface) data.
- //
+ /*
+ The generation of the MUI (Multilingual User Interface) data.
+ */
ULONG MuiGeneration;
- //
- // Indicates whether the thread is impersonating another security context.
- //
+ /*
+ Indicates whether the thread is impersonating another security context.
+ */
ULONG IsImpersonating;
- //
- // Pointer to the NLS (National Language Support) cache.
- //
+ /*
+ Pointer to the NLS (National Language Support) cache.
+ */
PVOID NlsCache;
- //
- // Pointer to the AppCompat/Shim Engine data.
- //
+ /*
+ Pointer to the AppCompat/Shim Engine data.
+ */
PVOID pShimData;
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
ULONG HeapData;
- //
- // Handle to the current transaction associated with the thread.
- //
+ /*
+ Handle to the current transaction associated with the thread.
+ */
HANDLE CurrentTransactionHandle;
- //
- // Pointer to the active frame for the thread.
- //
+ /*
+ Pointer to the active frame for the thread.
+ */
PTEB_ACTIVE_FRAME ActiveFrame;
- //
- // Reserved for FLS (RtlProcessFlsData).
- //
+ /*
+ Reserved for FLS (RtlProcessFlsData).
+ */
PVOID FlsData;
- //
- // Pointer to the preferred languages for the current thread. (GetThreadPreferredUILanguages)
- //
+ /*
+ Pointer to the preferred languages for the current thread. (GetThreadPreferredUILanguages)
+ */
PVOID PreferredLanguages;
- //
- // Pointer to the user-preferred languages for the current thread. (GetUserPreferredUILanguages)
- //
+ /*
+ Pointer to the user-preferred languages for the current thread. (GetUserPreferredUILanguages)
+ */
PVOID UserPrefLanguages;
- //
- // Pointer to the merged preferred languages for the current thread. (MUI_MERGE_USER_FALLBACK)
- //
+ /*
+ Pointer to the merged preferred languages for the current thread. (MUI_MERGE_USER_FALLBACK)
+ */
PVOID MergedPrefLanguages;
- //
- // Indicates whether the thread is impersonating another user's language settings.
- //
+ /*
+ Indicates whether the thread is impersonating another user's language settings.
+ */
ULONG MuiImpersonation;
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
union
{
USHORT CrossTebFlags;
USHORT SpareCrossTebBits : 16;
};
- //
- // SameTebFlags modify the state and behavior of the current thread.
- //
+ /*
+ SameTebFlags modify the state and behavior of the current thread.
+ */
union
{
USHORT SameTebFlags;
struct
{
USHORT SafeThunkCall : 1;
- USHORT InDebugPrint : 1; // Indicates if the thread is currently in a debug print routine.
- USHORT HasFiberData : 1; // Indicates if the thread has local fiber-local storage (FLS).
- USHORT SkipThreadAttach : 1; // Indicates if the thread should suppress DLL_THREAD_ATTACH notifications.
+ USHORT InDebugPrint : 1; /* Indicates if the thread is currently in a debug print routine. */
+ USHORT HasFiberData : 1; /* Indicates if the thread has local fiber-local storage (FLS). */
+ USHORT SkipThreadAttach : 1; /* Indicates if the thread should suppress DLL_THREAD_ATTACH notifications. */
USHORT WerInShipAssertCode : 1;
- USHORT RanProcessInit : 1; // Indicates if the thread has run process initialization code.
- USHORT ClonedThread : 1; // Indicates if the thread is a clone of a different thread.
- USHORT SuppressDebugMsg : 1; // Indicates if the thread should suppress LOAD_DLL_DEBUG_INFO notifications.
+ USHORT RanProcessInit : 1; /* Indicates if the thread has run process initialization code. */
+ USHORT ClonedThread : 1; /* Indicates if the thread is a clone of a different thread. */
+ USHORT SuppressDebugMsg : 1; /* Indicates if the thread should suppress LOAD_DLL_DEBUG_INFO notifications. */
USHORT DisableUserStackWalk : 1;
USHORT RtlExceptionAttached : 1;
- USHORT InitialThread : 1; // Indicates if the thread is the initial thread of the process.
+ USHORT InitialThread : 1; /* Indicates if the thread is the initial thread of the process. */
USHORT SessionAware : 1;
- USHORT LoadOwner : 1; // Indicates if the thread is the owner of the process loader lock.
+ USHORT LoadOwner : 1; /* Indicates if the thread is the owner of the process loader lock. */
USHORT LoaderWorker : 1;
USHORT SkipLoaderInit : 1;
USHORT SkipFileAPIBrokering : 1;
};
};
- //
- // Pointer to the callback function that is called when a KTM transaction scope is entered.
- //
+ /*
+ Pointer to the callback function that is called when a KTM transaction scope is entered.
+ */
PVOID TxnScopeEnterCallback;
- //
- // Pointer to the callback function that is called when a KTM transaction scope is exited.
- ///
+ /*
+ Pointer to the callback function that is called when a KTM transaction scope is exited.
+ */
PVOID TxnScopeExitCallback;
- //
- // Pointer to optional context data for use by the application when a KTM transaction scope callback is called.
- //
+ /*
+ Pointer to optional context data for use by the application when a KTM transaction scope callback is called.
+ */
PVOID TxnScopeContext;
- //
- // The lock count of critical sections for the current thread.
- //
+ /*
+ The lock count of critical sections for the current thread.
+ */
ULONG LockCount;
- //
- // The offset to the WOW64 (Windows on Windows) TEB for the current thread.
- //
+ /*
+ The offset to the WOW64 (Windows on Windows) TEB for the current thread.
+ */
LONG WowTebOffset;
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
PVOID ResourceRetValue;
- //
- // Reserved for Windows Driver Framework (WDF).
- //
+ /*
+ Reserved for Windows Driver Framework (WDF).
+ */
PVOID ReservedForWdf;
- //
- // Reserved for the Microsoft C runtime (CRT).
- //
+ /*
+ Reserved for the Microsoft C runtime (CRT).
+ */
ULONGLONG ReservedForCrt;
- //
- // The Host Compute Service (HCS) container identifier.
- //
+ /*
+ The Host Compute Service (HCS) container identifier.
+ */
GUID EffectiveContainerId;
- //
- // Reserved for Kernel32!Sleep (SpinWait).
- //
- ULONGLONG LastSleepCounter; // since Win11
- //
- // Reserved for Kernel32!Sleep (SpinWait).
- //
+ /*
+ Reserved for Kernel32!Sleep (SpinWait).
+ */
+ ULONGLONG LastSleepCounter; /* since Win11 */
+ /*
+ Reserved for Kernel32!Sleep (SpinWait).
+ */
ULONG SpinCallCount;
- //
- // Extended feature disable mask (AVX).
- //
+ /*
+ Extended feature disable mask (AVX).
+ */
ULONGLONG ExtendedFeatureDisableMask;
- //
- // Reserved.
- //
- PVOID SchedulerSharedDataSlot; // since 24H2
- //
- // Reserved.
- //
+ /*
+ Reserved.
+ */
+ PVOID SchedulerSharedDataSlot; /* since 24H2 */
+ /*
+ Reserved.
+ */
PVOID HeapWalkContext;
- //
- // The primary processor group affinity of the thread.
- //
+ /*
+ The primary processor group affinity of the thread.
+ */
GROUP_AFFINITY PrimaryGroupAffinity;
- //
- // Read-copy-update (RCU) synchronization context.
- //
+ /*
+ Read-copy-update (RCU) synchronization context.
+ */
ULONG Rcu[2];
} TEB, * PTEB;
-// Thread Basic Information
+/* Thread Basic Information */
typedef struct _THREAD_BASIC_INFO
{
NTSTATUS ExitStatus;
@@ -1056,7 +1051,7 @@ typedef struct _THREAD_BASIC_INFO
KPRIORITY BasePriority;
} THREAD_BASIC_INFO, * PTHREAD_BASIC_INFO;
-// T2 Set Parameters
+/* T2 Set Parameters */
typedef struct _T2_SET_PARAMETERS_V0
{
ULONG Version;
@@ -1064,7 +1059,7 @@ typedef struct _T2_SET_PARAMETERS_V0
LONGLONG NoWakeTolerance;
} T2_SET_PARAMETERS, * PT2_SET_PARAMETERS;
-// WNF Delivery Descriptor
+/* WNF Delivery Descriptor */
typedef struct _WNF_DELIVERY_DESCRIPTOR
{
ULONGLONG SubscriptionId;
@@ -1076,15 +1071,11 @@ typedef struct _WNF_DELIVERY_DESCRIPTOR
ULONG StateDataOffset;
} WNF_DELIVERY_DESCRIPTOR, * PWNF_DELIVERY_DESCRIPTOR;
-// Worker Factory Deferred Work
+/* Worker Factory Deferred Work */
typedef struct _WORKER_FACTORY_DEFERRED_WORK
{
PPORT_MESSAGE AlpcSendMessage;
PVOID AlpcSendMessagePort;
ULONG AlpcSendMessageFlags;
ULONG Flags;
-} WORKER_FACTORY_DEFERRED_WORK, * PWORKER_FACTORY_DEFERRED_WORK;
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif
+} WORKER_FACTORY_DEFERRED_WORK, * PWORKER_FACTORY_DEFERRED_WORK;
\ No newline at end of file
diff --git a/SysCallerK/Wrapper/include/syscaller_k.h b/SysCallerK/Wrapper/include/syscaller_k.h
index e502a52..ed138a2 100644
--- a/SysCallerK/Wrapper/include/syscaller_k.h
+++ b/SysCallerK/Wrapper/include/syscaller_k.h
@@ -19,4 +19,4 @@
#include "SysK/sysTypes_k.h"
#include "SysK/sysExternals_k.h"
-#include "SysK/sysFunctions_k.h"
+#include "SysK/sysFunctions_k.h"
\ No newline at end of file
diff --git a/SysCallerK/Wrapper/src/dummy.c b/SysCallerK/Wrapper/src/dummy.c
index ff39c48..6a4aca4 100644
--- a/SysCallerK/Wrapper/src/dummy.c
+++ b/SysCallerK/Wrapper/src/dummy.c
@@ -1,3 +1,3 @@
-// Required for Visual Studio to parse C headers like ntifs.h
+/* required for Visual Studio to parse C headers like ntifs.h */
#include "syscaller_k.h"
\ No newline at end of file
From 292634aad5d26b07cd82f203f0a19667856ddbae Mon Sep 17 00:00:00 2001
From: WindowsAPI
Date: Sun, 28 Sep 2025 11:55:36 -0700
Subject: [PATCH 03/32] update release workflow and add changelogs for
v1.3.0/v1.3.1
Updated the GitHub Actions build workflow to use version v1.3.2 for release packaging and artifact naming. Added new changelog files for v1.3.0 and v1.3.1.
---
.github/workflows/build.yml | 18 +++++++--------
History/CHANGELOG_1.0.0.md | 32 ++++++++++++++------------
History/CHANGELOG_1.1.0.md | 44 ++++++++++++++++++-----------------
History/CHANGELOG_1.2.0.md | 32 ++++++++++++--------------
History/CHANGELOG_1.3.0.md | 46 +++++++++++++++++++++++++++++++++++++
History/CHANGELOG_1.3.1.md | 17 ++++++++++++++
6 files changed, 127 insertions(+), 62 deletions(-)
create mode 100644 History/CHANGELOG_1.3.0.md
create mode 100644 History/CHANGELOG_1.3.1.md
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0841cb7..32bf28f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -396,7 +396,7 @@ jobs:
- name: Create Release Package
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
run: |
- $version = "v1.3.1-${{ github.run_number }}"
+ $version = "v1.3.2"
$zipName = "Bind-$version.zip"
New-Item -ItemType Directory -Path "release-package" -Force
@@ -404,7 +404,7 @@ jobs:
Copy-Item "x64/Release/*" "release-package\" -Recurse
# Create README
- $version = "v1.3.1-${{ github.run_number }}"
+ $version = "v1.3.2"
$readmeText = "# SysCaller: Bind - v1.3.1`n`n"
$readmeText += "Build Date: $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss UTC')`n"
$readmeText += "Commit: ${{ github.sha }}`n"
@@ -430,7 +430,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Release-Package
- path: Bind/Bind-v1.3.1-*.zip
+ path: Bind/Bind-v1.3.2.zip
retention-days: 90
- name: Create GitHub Release
@@ -440,10 +440,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
- tag_name: v1.3.1-${{ github.run_number }}
- release_name: "SysCaller: Bind - v1.3.1-${{ github.run_number }}"
+ tag_name: v1.3.2
+ release_name: "SysCaller: Bind - v1.3.2"
body: |
- ## SysCaller: Bind - v1.3.1-${{ github.run_number }}
+ ## SysCaller: Bind - v1.3.2
**Build Date:** ${{ github.event.head_commit.timestamp }}
**Commit:** ${{ github.sha }}
@@ -466,6 +466,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: Bind/Bind-v1.3.1-${{ github.run_number }}.zip
- asset_name: Bind-v1.3.1-${{ github.run_number }}.zip
- asset_content_type: application/zip
+ asset_path: Bind/Bind-v1.3.2.zip
+ asset_name: Bind-v1.3.2.zip
+ asset_content_type: application/zip
\ No newline at end of file
diff --git a/History/CHANGELOG_1.0.0.md b/History/CHANGELOG_1.0.0.md
index 9bbab08..29f45a3 100644
--- a/History/CHANGELOG_1.0.0.md
+++ b/History/CHANGELOG_1.0.0.md
@@ -1,25 +1,27 @@
-# v1.0.0 – Initial Release
+# v1.0.0 - Initial Release
Released: **March 5, 2025**
---
-## What's New?
+## **What's New?**
-- **Integrity Checks**: Introduced validation, verification, & compatibility checks for all stubs.
-- **Dynamic Obfuscation**: Added an obfuscation engine for crafted stubs.
-- **Stub Craft (Manual Crafter)**: Early work began on manual stub crafting logic (WIP).
-- **Settings & Configuration**: Configurable settings.
-- **Backup & Restore**: Full project backup and restoration support.
-- **Tooltips & UX**: Added informative tooltips across the GUI.
-- **Drag & Drop**: Support for DLL file drag & drop into the interface.
-- **GUI Frontend**: Migrated from CLI to a full PyQt based GUI frontend.
-- **CMake Build Support**: Initial `CMakeLists.txt` build integration.
-- **Wrapper Modularization**: Began modularizing BuildTools & Wrapper logic.
-- **Documentation**: Created initial `README.md`.
+---
+
+- Introduced validation, verification, & compatibility checks for all stubs.
+- Added an obfuscation engine for crafted stubs.
+- Early work began on manual stub crafting logic (WIP).
+- Added Configurable settings.
+- Full project backup and restoration support.
+- Added informative tooltips across the GUI.
+- Support for DLL file drag & drop into the interface.
+- Migrated from CLI to a full PyQt based GUI frontend.
+- Initial `CMakeLists.txt` build integration.
+- Began modularizing BuildTools & Wrapper logic.
+- Created initial `README.md`.
---
-## Bug Fixes
+## **Bug Fixes**
-- N/A (Initial Stable Release)
+- N/A (Initial Stable Release)
\ No newline at end of file
diff --git a/History/CHANGELOG_1.1.0.md b/History/CHANGELOG_1.1.0.md
index 217d6a8..26d9f45 100644
--- a/History/CHANGELOG_1.1.0.md
+++ b/History/CHANGELOG_1.1.0.md
@@ -4,28 +4,30 @@ Released: **July 22, 2025**
---
-## What's New?
-
-- **Kernel Mode Support**: Added support for kernel mode / `Zw` syscalls.
-- **Debug Mode**: You can now build in debug mode with full support.
-- **Multiple Syscall Tables**: Support for switching and managing syscall tables.
-- **Stronger Regex Patterns**: Improved regex resilience and matching.
-- **Stub Hashing**: Each stub now has integrity hashes.
-- **Stub Hash Comparison**: Added support to compare hash values of stubs.
-- **Documentation**: New **README** and a detailed **WIKI** added.
-- **Global Profiles**: Save configurations globally as `.ini` files.
-- **Stub Mapper**: Added custom obfuscation via stub mapping.
-- **Changelog Viewer**: Changelog history now available in the GUI.
-- **GUI / UX Improvements**: Fixed layout, colors, DPI scaling, and architecture inconsistencies.
-- **Modular Wrappers**: Wrapper and build tools are now modularized.
-- **Project Updates**: Added `SysCaller` and `SysCallerK` directly into the solution.
+## **What's New?**
---
-## Bug Fixes:
+- Added support for kernel mode / `Zw` syscalls.
+- You can now build in debug mode with full support.
+- Support for switching and managing syscall tables.
+- Improved regex resilience and matching.
+- Each stub now has integrity hashes.
+- Added support to compare hash values of stubs.
+- New **README** and a detailed **WIKI** added.
+- Save configurations globally as `.ini` files.
+- Added custom obfuscation via stub mapping.
+- Changelog history now available in the GUI.
+- Fixed layout, colors, DPI scaling, and architecture inconsistencies.
+- Wrapper and build tools are now modularized.
+- Added `SysCaller` and `SysCallerK` directly into the solution.
-- **Removed Conflicts**: Removed `64bit` macro (already defined by WDK).
-- **Cleaned Structs**: Removed forward declaration of `MEMORY_RESERVE_TYPE`.
-- **Suppressed Warnings**: Disabled nameless struct/union compiler warnings.
-- **Grammar Fixes**: Fixed multiple grammatical issues across UI and docs.
-- **Regex Fixes**: Rewrote broken patterns using integrity check feedback.
+---
+
+## **Bug Fixes**
+
+- Removed `64bit` macro (already defined by WDK).
+- Removed forward declaration of `MEMORY_RESERVE_TYPE`.
+- Disabled nameless struct/union compiler warnings.
+- Fixed multiple grammatical issues across UI and docs.
+- Rewrote broken patterns using integrity check feedback.
\ No newline at end of file
diff --git a/History/CHANGELOG_1.2.0.md b/History/CHANGELOG_1.2.0.md
index 7de86c7..ad8991e 100644
--- a/History/CHANGELOG_1.2.0.md
+++ b/History/CHANGELOG_1.2.0.md
@@ -1,27 +1,25 @@
-# v1.2.0 – Changelog
+# v1.2.0 - Changelog
-Released: **July 28, 2025**
+Released: **July 29, 2025**
---
-## What's New?
+## **What's New?**
-- **C++ Refactor** Rewrote the entire BuildTools/GUI from Python (PyQt) to native C++ using Qt improving performance, stability maintainability, and integration with the core SDK.
-
-- **Bindings** Added support for any programming language with C bindings, making SysCaller accessible across a wider ecosystem.
-
-- **SysCaller: Bind** The BuildTools has been officially renamed to **Bind**, reflecting its role in connecting your project with SysCaller using clean GUI based binding, wrapping, and obfuscation features.
-
-- **Error Handling**: Improved error reporting and exception handling throughout Bind.
+---
-- **Enhanced Performance**: C++ BuildTools delivers significantly improved speed, native integration, and reduced memory footprint.
+- Rewrote the entire BuildTools/GUI from Python (PyQt) to native C++ using Qt improving performance, stability maintainability, and integration with the core SDK.
+- Added support for any programming language with C bindings, making SysCaller accessible across a wider ecosystem.
+- The BuildTools has been officially renamed to **Bind**, reflecting its role in connecting your project with SysCaller using clean GUI based binding, wrapping, and obfuscation features.
+- Improved error reporting and exception handling throughout Bind.
+- C++ BuildTools delivers significantly improved speed, native integration, and reduced memory footprint.
---
-## Bug Fixes
+## **Bug Fixes**
-- **Stub Hash Logic**: Fixed edge case where stub hashes could mismatch during integrity comparison.
-- **Obfuscation Output**: Resolved console output issues that caused issues.
-- **Dev Artifacts**: Removed placeholder comments, WIP debug code, and development macros.
-- **Build System**: Resolved various compilation issues and dependency conflicts.
-- **Memory Leaks**: Eliminated memory leaks present in the Python implementation.
+- Fixed edge case where stub hashes could mismatch during integrity comparison.
+- Resolved console output issues that caused issues.
+- Removed placeholder comments, WIP debug code, and development macros.
+- Resolved various compilation issues and dependency conflicts.
+- Eliminated memory leaks present in the Python implementation.
\ No newline at end of file
diff --git a/History/CHANGELOG_1.3.0.md b/History/CHANGELOG_1.3.0.md
new file mode 100644
index 0000000..02a60b4
--- /dev/null
+++ b/History/CHANGELOG_1.3.0.md
@@ -0,0 +1,46 @@
+# v1.3.0 - Changelog
+
+Released: **September 3, 2025**
+
+---
+
+## **What's New?**
+
+---
+
+- Added comprehensive support for Direct, Inline, and Indirect assembly modes
+- Added general tab support with assembly mode selection
+- Improved validation system supporting all three modes
+- Improved memory management in obfuscation pipeline
+- Improved error reporting throughout the system
+- Improved CMake support for all assembly modes
+- Improved Visual Studio solution files
+- Complete restructure of obfuscation system into focused, maintainable modules
+- Clear namespace separation: DO (Direct Obfuscation), ID (Indirect Obfuscation), SO (Shared Obfuscation)
+- Specialized components for better code organization and performance
+- Full implementation of inline/indirect syscalls, and obfuscation with runtime resolver support for indirect mode.
+- Resolver string encryption and conditional resolver logic
+- control flow, junk generation, string randomization and more for indirect stubs
+- (Inline obfuscation is coming in a future release!)
+- Unified custom title bars across all dialogs (Settings, Hash Compare, Stub Mapper, Changelog)
+- External QSS stylesheets for better maintainability
+- Enhanced dialog layouts and improved visual consistency
+- New ConfirmationDialog for better user interactions
+- Comprehensive build configuration macros and conditional compilation
+- Better error handling and build messages
+- Eliminated namespace conflicts through proper organization
+- Consistent header formatting across all files
+
+---
+
+## **Bug Fixes**
+
+- Removed rcx/r10 conflicting junk instructions that could interfere with syscall execution
+- Resolved missing module definition directives and exported functions
+- Resolved various compilation issues and dependency conflicts from modularization
+- Improved header formatting consistency across all source files
+- Improved CMake and Visual Studio solution files for new modular structure
+- Improved memory handling in obfuscation pipeline
+- Improved error reporting and build message system
+- Improved separation of concerns and consistent naming conventions
+- Many gui/grammer fixes.
\ No newline at end of file
diff --git a/History/CHANGELOG_1.3.1.md b/History/CHANGELOG_1.3.1.md
new file mode 100644
index 0000000..39296a9
--- /dev/null
+++ b/History/CHANGELOG_1.3.1.md
@@ -0,0 +1,17 @@
+# v1.3.1 - Changelog
+
+Released: **September 26, 2025**
+
+---
+
+## **What's New?**
+
+---
+
+- Added GitHub Actions workflows for Bind.
+- Added Enums to obfuscation and integrity modules.
+- Refactored the entire codebase for the future by ensuring proper usability/practices.
+
+## **Bug Fixes**
+
+- N/A (Stability Release)
\ No newline at end of file
From 85ad45133ec96c945b687e2c5503e0651c821f08 Mon Sep 17 00:00:00 2001
From: WindowsAPI
Date: Tue, 30 Sep 2025 12:54:55 -0700
Subject: [PATCH 04/32] refactor syscall resolver architecture
---
SysCaller/SysCaller.vcxproj | 75 ++-------
SysCaller/SysCaller.vcxproj.filters | 15 +-
.../Resolver/Methods/HashedExportResolver.h | 18 +++
.../Resolver/Methods/MemoryExportResolver.h | 18 +++
.../include/Resolver/Methods/PebLdrResolver.h | 18 +++
SysCaller/Wrapper/include/Resolver/PebUtils.h | 34 ++++
.../Resolver/{Resolver.h => ResolverBase.h} | 15 +-
SysCaller/Wrapper/include/syscaller.h | 20 ++-
SysCaller/Wrapper/include/syscaller_config.h | 17 +-
.../Resolver/Methods/HashedExportResolver.cpp | 147 ++++++++++++++++++
.../Resolver/Methods/MemoryExportResolver.cpp | 46 ++++++
.../src/Resolver/Methods/PebLdrResolver.cpp | 48 ++++++
SysCaller/Wrapper/src/Resolver/PebUtils.cpp | 60 +++++++
.../{Resolver.cpp => ResolverBase.cpp} | 56 ++-----
14 files changed, 469 insertions(+), 118 deletions(-)
create mode 100644 SysCaller/Wrapper/include/Resolver/Methods/HashedExportResolver.h
create mode 100644 SysCaller/Wrapper/include/Resolver/Methods/MemoryExportResolver.h
create mode 100644 SysCaller/Wrapper/include/Resolver/Methods/PebLdrResolver.h
create mode 100644 SysCaller/Wrapper/include/Resolver/PebUtils.h
rename SysCaller/Wrapper/include/Resolver/{Resolver.h => ResolverBase.h} (52%)
create mode 100644 SysCaller/Wrapper/src/Resolver/Methods/HashedExportResolver.cpp
create mode 100644 SysCaller/Wrapper/src/Resolver/Methods/MemoryExportResolver.cpp
create mode 100644 SysCaller/Wrapper/src/Resolver/Methods/PebLdrResolver.cpp
create mode 100644 SysCaller/Wrapper/src/Resolver/PebUtils.cpp
rename SysCaller/Wrapper/src/Resolver/{Resolver.cpp => ResolverBase.cpp} (70%)
diff --git a/SysCaller/SysCaller.vcxproj b/SysCaller/SysCaller.vcxproj
index 8a671bd..9d2b3a6 100644
--- a/SysCaller/SysCaller.vcxproj
+++ b/SysCaller/SysCaller.vcxproj
@@ -1,14 +1,6 @@
-
- Debug
- Win32
-
-
- Release
- Win32
-
Debug
x64
@@ -26,19 +18,6 @@
10.0
-
- Application
- true
- v143
- Unicode
-
-
- Application
- false
- v143
- true
- Unicode
-
StaticLibrary
true
@@ -46,7 +25,7 @@
Unicode
- StaticLibrary
+ DynamicLibrary
false
v143
true
@@ -58,12 +37,6 @@
-
-
-
-
-
-
@@ -84,34 +57,6 @@
false
false
-
-
- Level3
- true
- WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
-
-
- Console
- true
-
-
-
-
- Level3
- true
- true
- true
- WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
-
-
- Console
- true
- true
- true
-
-
Level3
@@ -119,7 +64,7 @@
_DEBUG;_CONSOLE;SYSCALLER_DIRECT;%(PreprocessorDefinitions)
true
stdcpp20
- C:\Program Files %28x86%29\Windows Kits\10\Include\10.0.26100.0\km;%(AdditionalIncludeDirectories)
+ C:\Program Files %28x86%29\Windows Kits\10\Include\10.0.26100.0\km;$(PROJECTDIR)Wrapper\include;%(AdditionalIncludeDirectories)
Console
@@ -138,7 +83,7 @@
NDEBUG;_CONSOLE;SYSCALLER_DIRECT;%(PreprocessorDefinitions)
true
stdcpp20
- C:\Program Files %28x86%29\Windows Kits\10\Include\10.0.26100.0\km;%(AdditionalIncludeDirectories)
+ C:\Program Files %28x86%29\Windows Kits\10\Include\10.0.26100.0\km;$(PROJECTDIR)Wrapper\include;%(AdditionalIncludeDirectories)
Console
@@ -160,18 +105,26 @@
-
+
+
+
+
+
-
+
+
+
+
+
@@ -180,4 +133,4 @@
-
+
\ No newline at end of file
diff --git a/SysCaller/SysCaller.vcxproj.filters b/SysCaller/SysCaller.vcxproj.filters
index 0384b57..fe8f356 100644
--- a/SysCaller/SysCaller.vcxproj.filters
+++ b/SysCaller/SysCaller.vcxproj.filters
@@ -2,17 +2,22 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SysCaller/Wrapper/include/Resolver/Methods/HashedExportResolver.h b/SysCaller/Wrapper/include/Resolver/Methods/HashedExportResolver.h
new file mode 100644
index 0000000..8f29f6f
--- /dev/null
+++ b/SysCaller/Wrapper/include/Resolver/Methods/HashedExportResolver.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DWORD GetSyscallNumber(const char* functionName);
+
+BOOL InitializeResolver();
+
+void CleanupResolver();
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/SysCaller/Wrapper/include/Resolver/Methods/MemoryExportResolver.h b/SysCaller/Wrapper/include/Resolver/Methods/MemoryExportResolver.h
new file mode 100644
index 0000000..b175a5a
--- /dev/null
+++ b/SysCaller/Wrapper/include/Resolver/Methods/MemoryExportResolver.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DWORD GetSyscallNumber(const char* functionName);
+
+BOOL InitializeResolver();
+
+void CleanupResolver();
+
+#ifdef __cplusplus
+}
+#endif
\ No newline at end of file
diff --git a/SysCaller/Wrapper/include/Resolver/Methods/PebLdrResolver.h b/SysCaller/Wrapper/include/Resolver/Methods/PebLdrResolver.h
new file mode 100644
index 0000000..8f29f6f
--- /dev/null
+++ b/SysCaller/Wrapper/include/Resolver/Methods/PebLdrResolver.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DWORD GetSyscallNumber(const char* functionName);
+
+BOOL InitializeResolver();
+
+void CleanupResolver();
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/SysCaller/Wrapper/include/Resolver/PebUtils.h b/SysCaller/Wrapper/include/Resolver/PebUtils.h
new file mode 100644
index 0000000..a1b0748
--- /dev/null
+++ b/SysCaller/Wrapper/include/Resolver/PebUtils.h
@@ -0,0 +1,34 @@
+#pragma once
+
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+__forceinline PPEB GetPeb()
+{
+#ifdef _WIN64
+ return (PPEB)__readgsqword(0x60);
+#else
+ return (PPEB)__readfsdword(0x30);
+#endif
+}
+
+typedef struct _LDR_DATA_TABLE_ENTRY_SYSCALLER {
+ LIST_ENTRY InMemoryOrderLinks;
+ PVOID Reserved1[2];
+ PVOID DllBase;
+ PVOID EntryPoint;
+ ULONG SizeOfImage;
+ UNICODE_STRING FullDllName;
+ UNICODE_STRING BaseDllName;
+} LDR_DATA_TABLE_ENTRY_SYSCALLER, *PLDR_DATA_TABLE_ENTRY_SYSCALLER;
+
+HMODULE FindNtdllBase();
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/SysCaller/Wrapper/include/Resolver/Resolver.h b/SysCaller/Wrapper/include/Resolver/ResolverBase.h
similarity index 52%
rename from SysCaller/Wrapper/include/Resolver/Resolver.h
rename to SysCaller/Wrapper/include/Resolver/ResolverBase.h
index 744c907..7dcb47b 100644
--- a/SysCaller/Wrapper/include/Resolver/Resolver.h
+++ b/SysCaller/Wrapper/include/Resolver/ResolverBase.h
@@ -2,6 +2,8 @@
#include
#include
+#include
+#include
#ifdef __cplusplus
extern "C" {
@@ -9,14 +11,14 @@ extern "C" {
/**
* @brief resolves a syscall number by function name at runtime
- * @param functionName the name of the Nt function
- * @return the syscall number, or -1 if not found
+ * @param functionName the name of the Nt/Zw function
+ * @return the syscall number or -1 if not found
*/
DWORD GetSyscallNumber(const char* functionName);
/**
* @brief initializes the resolver (optional, called automatically on first use)
- * @return TRUE if successful, FALSE otherwise
+ * @return TRUE if successful or FALSE otherwise
*/
BOOL InitializeResolver();
@@ -27,4 +29,9 @@ void CleanupResolver();
#ifdef __cplusplus
}
-#endif
\ No newline at end of file
+#endif
+
+/* internal functions for resolver methods */
+HMODULE GetNtdllHandleInternal();
+std::unordered_map ExtractSyscallsFromDllInternal();
+DWORD ExtractSyscallNumber(LPVOID functionAddress);
diff --git a/SysCaller/Wrapper/include/syscaller.h b/SysCaller/Wrapper/include/syscaller.h
index aeba4d2..e01fded 100644
--- a/SysCaller/Wrapper/include/syscaller.h
+++ b/SysCaller/Wrapper/include/syscaller.h
@@ -36,7 +36,7 @@
*/
#define SYSCALLER_BUILD_CONFIG
-#include "syscaller_config.h"
+#include
#undef SYSCALLER_BUILD_CONFIG
#if !defined(SYSCALLER_DIRECT) && !defined(SYSCALLER_INDIRECT) && !defined(SYSCALLER_INLINE)
@@ -74,10 +74,20 @@
#include
#include
-#include "Sys/sysTypes.h"
-#include "Sys/sysExternals.h"
-#include "Sys/sysFunctions.h"
+#include
+#include
+#include
#if defined(SYSCALLER_INDIRECT)
-#include "Resolver/Resolver.h"
+
+#if defined(SYSCALLER_RESOLVER_PEB_LDR)
+#include
+#elif defined(SYSCALLER_RESOLVER_MEMORY_EXPORT)
+#include
+#elif defined(SYSCALLER_RESOLVER_HASHED_EXPORT)
+#include
+#else
+#error "For SYSCALLER_INDIRECT mode, you must define one resolver: SYSCALLER_RESOLVER_PEB_LDR, SYSCALLER_RESOLVER_MEMORY_EXPORT, or SYSCALLER_RESOLVER_HASHED_EXPORT"
+#endif
+
#endif
\ No newline at end of file
diff --git a/SysCaller/Wrapper/include/syscaller_config.h b/SysCaller/Wrapper/include/syscaller_config.h
index b68c04d..20e6d3f 100644
--- a/SysCaller/Wrapper/include/syscaller_config.h
+++ b/SysCaller/Wrapper/include/syscaller_config.h
@@ -5,7 +5,7 @@
/*
* SysCaller Build Configuration
- *
+ *
* Uncomment one of the following lines & add to preprocessor definitions to select your build mode:
*/
@@ -23,3 +23,18 @@
* This will include dllmain.cpp in the build
*/
// #define SYSCALLER_BINDINGS
+
+/*
+ * Resolver Configuration (for SYSCALLER_INDIRECT mode)
+ *
+ * Choose one resolver method:
+ */
+
+/* Use PEB LDR traversal (no WinAPI calls) */
+// #define SYSCALLER_RESOLVER_PEB_LDR
+
+/* Use memory export parsing with GetModuleHandle (uses WinAPI) */
+// #define SYSCALLER_RESOLVER_MEMORY_EXPORT
+
+/* Use hashed export parsing (no WinAPI calls) */
+// #define SYSCALLER_RESOLVER_HASHED_EXPORT
diff --git a/SysCaller/Wrapper/src/Resolver/Methods/HashedExportResolver.cpp b/SysCaller/Wrapper/src/Resolver/Methods/HashedExportResolver.cpp
new file mode 100644
index 0000000..9ad4907
--- /dev/null
+++ b/SysCaller/Wrapper/src/Resolver/Methods/HashedExportResolver.cpp
@@ -0,0 +1,147 @@
+#if defined(SYSCALLER_DIRECT)
+#pragma message("SysCaller: Building via DIRECT syscall mode")
+#elif defined(SYSCALLER_INDIRECT)
+#pragma message("SysCaller: Building via INDIRECT syscall mode")
+#elif defined(SYSCALLER_INLINE)
+#pragma message("SysCaller: Building via INLINE ASM syscall mode")
+#else
+#pragma message("SysCaller: No build mode specified, defaulting to DIRECT")
+#endif
+
+#if defined(SYSCALLER_BINDINGS)
+#pragma message("SysCaller: Building with BINDINGS support (DLL export)")
+#endif
+
+#ifdef SYSCALLER_INDIRECT
+#ifdef SYSCALLER_RESOLVER_HASHED_EXPORT
+
+#include
+#include
+#include
+
+/* simple djb2 hash function for strings */
+constexpr DWORD HashString(const char* str)
+{
+ DWORD hash = 5381;
+ int c;
+ while ((c = *str++))
+ {
+ hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
+ }
+ return hash;
+}
+
+/* known syscall name hashes */
+static const DWORD knownSyscallHashes[] = {
+ HashString("NtQuerySystemInformation")
+};
+
+static const size_t numKnownHashes = sizeof(knownSyscallHashes) / sizeof(knownSyscallHashes[0]);
+
+DWORD HashStringRuntime(const char* str)
+{
+ DWORD hash = 5381;
+ int c;
+ while ((c = *str++))
+ {
+ hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
+ }
+ return hash;
+}
+
+bool IsKnownSyscallHash(DWORD hash)
+{
+ for (size_t i = 0; i < numKnownHashes; i++)
+ {
+ if (knownSyscallHashes[i] == hash)
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+std::unordered_map ExtractSyscallsFromDllHashedInternal()
+{
+ std::unordered_map syscallNumbers;
+ HMODULE hNtdll = GetNtdllHandleInternal();
+
+ if (!hNtdll)
+ {
+ return syscallNumbers;
+ }
+
+ PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER)hNtdll;
+
+ if (dosHeader->e_magic != IMAGE_DOS_SIGNATURE)
+ {
+ return syscallNumbers;
+ }
+
+ PIMAGE_NT_HEADERS ntHeaders = (PIMAGE_NT_HEADERS)((BYTE*)hNtdll + dosHeader->e_lfanew);
+
+ if (ntHeaders->Signature != IMAGE_NT_SIGNATURE)
+ {
+ return syscallNumbers;
+ }
+
+ if (ntHeaders->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress == 0)
+ {
+ return syscallNumbers;
+ }
+
+ PIMAGE_EXPORT_DIRECTORY exportDir = (PIMAGE_EXPORT_DIRECTORY)((BYTE*)hNtdll +
+ ntHeaders->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress);
+
+ DWORD* functions = (DWORD*)((BYTE*)hNtdll + exportDir->AddressOfFunctions);
+ DWORD* names = (DWORD*)((BYTE*)hNtdll + exportDir->AddressOfNames);
+ WORD* ordinals = (WORD*)((BYTE*)hNtdll + exportDir->AddressOfNameOrdinals);
+
+ for (DWORD i = 0; i < exportDir->NumberOfNames; i++)
+ {
+ const char* funcName = (const char*)((BYTE*)hNtdll + names[i]);
+ DWORD nameHash = HashStringRuntime(funcName);
+
+ if (IsKnownSyscallHash(nameHash))
+ {
+ DWORD funcRVA = functions[ordinals[i]];
+ LPVOID funcAddress = (LPVOID)((BYTE*)hNtdll + funcRVA);
+ DWORD syscallNumber = ExtractSyscallNumber(funcAddress);
+
+ if (syscallNumber > 0 && syscallNumber <= 0xFFFF)
+ {
+ syscallNumbers[funcName] = syscallNumber;
+ }
+ }
+ }
+
+ return syscallNumbers;
+}
+
+HMODULE GetNtdllHandleInternal()
+{
+ static HMODULE cachedNtdllHandle = NULL;
+
+ if (cachedNtdllHandle == NULL)
+ {
+ cachedNtdllHandle = FindNtdllBase();
+
+ if (cachedNtdllHandle == NULL)
+ {
+ /* peb traversal failed so this is a critical error, no fallback */
+ return NULL;
+ }
+ }
+
+ return cachedNtdllHandle;
+}
+
+#else
+/* not using HashedExportResolver */
+#pragma message("SysCaller: HashedExportResolver.cpp skipped (SYSCALLER_RESOLVER_HASHED_EXPORT not defined)")
+#endif
+
+#else
+/* not in indirect mode file compiles to nothing */
+#pragma message("SysCaller: HashedExportResolver.cpp skipped (SYSCALLER_INDIRECT not defined)")
+#endif
diff --git a/SysCaller/Wrapper/src/Resolver/Methods/MemoryExportResolver.cpp b/SysCaller/Wrapper/src/Resolver/Methods/MemoryExportResolver.cpp
new file mode 100644
index 0000000..02adcf2
--- /dev/null
+++ b/SysCaller/Wrapper/src/Resolver/Methods/MemoryExportResolver.cpp
@@ -0,0 +1,46 @@
+#if defined(SYSCALLER_DIRECT)
+#pragma message("SysCaller: Building via DIRECT syscall mode")
+#elif defined(SYSCALLER_INDIRECT)
+#pragma message("SysCaller: Building via INDIRECT syscall mode")
+#elif defined(SYSCALLER_INLINE)
+#pragma message("SysCaller: Building via INLINE ASM syscall mode")
+#else
+#pragma message("SysCaller: No build mode specified, defaulting to DIRECT")
+#endif
+
+#if defined(SYSCALLER_BINDINGS)
+#pragma message("SysCaller: Building with BINDINGS support (DLL export)")
+#endif
+
+#ifdef SYSCALLER_INDIRECT
+#ifdef SYSCALLER_RESOLVER_MEMORY_EXPORT
+
+#include
+#include
+
+HMODULE GetNtdllHandleInternal()
+{
+ static HMODULE cachedNtdllHandle = NULL;
+
+ if (cachedNtdllHandle == NULL)
+ {
+ cachedNtdllHandle = GetModuleHandleA("ntdll.dll");
+
+ if (cachedNtdllHandle == NULL)
+ {
+ cachedNtdllHandle = LoadLibraryA("ntdll.dll");
+ }
+ }
+
+ return cachedNtdllHandle;
+}
+
+#else
+/* not using MemoryExportResolver */
+#pragma message("SysCaller: MemoryExportResolver.cpp skipped (SYSCALLER_RESOLVER_MEMORY_EXPORT not defined)")
+#endif
+
+#else
+/* not in indirect mode file compiles to nothing */
+#pragma message("SysCaller: MemoryExportResolver.cpp skipped (SYSCALLER_INDIRECT not defined)")
+#endif
diff --git a/SysCaller/Wrapper/src/Resolver/Methods/PebLdrResolver.cpp b/SysCaller/Wrapper/src/Resolver/Methods/PebLdrResolver.cpp
new file mode 100644
index 0000000..ae33780
--- /dev/null
+++ b/SysCaller/Wrapper/src/Resolver/Methods/PebLdrResolver.cpp
@@ -0,0 +1,48 @@
+#if defined(SYSCALLER_DIRECT)
+#pragma message("SysCaller: Building via DIRECT syscall mode")
+#elif defined(SYSCALLER_INDIRECT)
+#pragma message("SysCaller: Building via INDIRECT syscall mode")
+#elif defined(SYSCALLER_INLINE)
+#pragma message("SysCaller: Building via INLINE ASM syscall mode")
+#else
+#pragma message("SysCaller: No build mode specified, defaulting to DIRECT")
+#endif
+
+#if defined(SYSCALLER_BINDINGS)
+#pragma message("SysCaller: Building with BINDINGS support (DLL export)")
+#endif
+
+#ifdef SYSCALLER_INDIRECT
+#ifdef SYSCALLER_RESOLVER_PEB_LDR
+
+#include
+#include
+#include
+
+HMODULE GetNtdllHandleInternal()
+{
+ static HMODULE cachedNtdllHandle = NULL;
+
+ if (cachedNtdllHandle == NULL)
+ {
+ cachedNtdllHandle = FindNtdllBase();
+
+ if (cachedNtdllHandle == NULL)
+ {
+ /* peb traversal failed so this is a critical error, no fallback */
+ return NULL;
+ }
+ }
+
+ return cachedNtdllHandle;
+}
+
+#else
+/* not using PEBLDRResolver */
+#pragma message("SysCaller: PebLdrResolver.cpp skipped (SYSCALLER_RESOLVER_PEB_LDR not defined)")
+#endif
+
+#else
+/* not in indirect mode file compiles to nothing */
+#pragma message("SysCaller: PebLdrResolver.cpp skipped (SYSCALLER_INDIRECT not defined)")
+#endif
diff --git a/SysCaller/Wrapper/src/Resolver/PebUtils.cpp b/SysCaller/Wrapper/src/Resolver/PebUtils.cpp
new file mode 100644
index 0000000..45f6916
--- /dev/null
+++ b/SysCaller/Wrapper/src/Resolver/PebUtils.cpp
@@ -0,0 +1,60 @@
+#include "../../include/Resolver/PebUtils.h"
+
+HMODULE FindNtdllBase()
+{
+ PPEB peb = GetPeb();
+
+ if (!peb || !peb->Ldr)
+ {
+ return NULL;
+ }
+
+ PPEB_LDR_DATA ldr = peb->Ldr;
+
+ /* walk InMemoryOrderModuleList (more reliable than InLoadOrder) */
+ PLIST_ENTRY head = &ldr->InMemoryOrderModuleList;
+ PLIST_ENTRY entry = head->Flink;
+
+ while (entry != head && entry)
+ {
+ /* get the LDR_DATA_TABLE_ENTRY from the list entry */
+ PLDR_DATA_TABLE_ENTRY_SYSCALLER ldrEntry = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY_SYSCALLER, InMemoryOrderLinks);
+
+ if (!ldrEntry || !ldrEntry->DllBase)
+ {
+ entry = entry->Flink;
+ continue;
+ }
+
+ /* check if this is ntdll.dll by examining the BaseDllName */
+ __try {
+ if (ldrEntry->BaseDllName.Length > 0 && ldrEntry->BaseDllName.Buffer)
+ {
+ /* convert to lowercase for comparison */
+ WCHAR baseNameLower[256] = {0};
+ size_t len = ldrEntry->BaseDllName.Length / sizeof(WCHAR);
+ if (len >= 256) len = 255;
+
+ for (size_t i = 0; i < len; i++)
+ {
+ baseNameLower[i] = (ldrEntry->BaseDllName.Buffer[i] >= L'A' && ldrEntry->BaseDllName.Buffer[i] <= L'Z') ?
+ ldrEntry->BaseDllName.Buffer[i] + 0x20 : ldrEntry->BaseDllName.Buffer[i];
+ }
+
+ if (wcsstr(baseNameLower, L"ntdll.dll") != NULL)
+ {
+ return (HMODULE)ldrEntry->DllBase;
+ }
+ }
+ }
+ __except (EXCEPTION_EXECUTE_HANDLER) {
+ /* skip this entry if we cant access the name */
+ entry = entry->Flink;
+ continue;
+ }
+
+ entry = entry->Flink;
+ }
+
+ return NULL;
+}
diff --git a/SysCaller/Wrapper/src/Resolver/Resolver.cpp b/SysCaller/Wrapper/src/Resolver/ResolverBase.cpp
similarity index 70%
rename from SysCaller/Wrapper/src/Resolver/Resolver.cpp
rename to SysCaller/Wrapper/src/Resolver/ResolverBase.cpp
index aad471f..9b3fdd5 100644
--- a/SysCaller/Wrapper/src/Resolver/Resolver.cpp
+++ b/SysCaller/Wrapper/src/Resolver/ResolverBase.cpp
@@ -1,44 +1,14 @@
-#if defined(SYSCALLER_DIRECT)
-#pragma message("SysCaller: Building via DIRECT syscall mode")
-#elif defined(SYSCALLER_INDIRECT)
-#pragma message("SysCaller: Building via INDIRECT syscall mode")
-#elif defined(SYSCALLER_INLINE)
-#pragma message("SysCaller: Building via INLINE ASM syscall mode")
-#else
-#pragma message("SysCaller: No build mode specified, defaulting to DIRECT")
-#endif
-
-#if defined(SYSCALLER_BINDINGS)
-#pragma message("SysCaller: Building with BINDINGS support (DLL export)")
-#endif
-
-#ifdef SYSCALLER_INDIRECT
-#include "../../include/Resolver/Resolver.h"
-#include
-#include
-#include
+#include "../../include/Resolver/ResolverBase.h"
#include
#include
-#include
+/* shared global state */
static std::unordered_map syscallCache;
static HMODULE ntdllHandle = NULL;
static BOOL resolverInitialized = FALSE;
-HMODULE GetNtdllHandle()
-{
- if (ntdllHandle == NULL)
- {
- ntdllHandle = GetModuleHandleA("ntdll.dll");
-
- if (ntdllHandle == NULL)
- {
- ntdllHandle = LoadLibraryA("ntdll.dll");
- }
- }
-
- return ntdllHandle;
-}
+HMODULE GetNtdllHandleInternal();
+std::unordered_map ExtractSyscallsFromDllInternal();
DWORD ExtractSyscallNumber(LPVOID functionAddress)
{
@@ -65,10 +35,16 @@ DWORD ExtractSyscallNumber(LPVOID functionAddress)
return 0;
}
-std::unordered_map ExtractSyscallsFromDll()
+std::unordered_map ExtractSyscallsFromDllInternal()
{
+#if defined(SYSCALLER_RESOLVER_HASHED_EXPORT)
+ /* forward declaration for the hashed resolver implementation */
+ std::unordered_map ExtractSyscallsFromDllHashedInternal();
+ return ExtractSyscallsFromDllHashedInternal();
+#else
+ /* default implementation for other resolver methods */
std::unordered_map syscallNumbers;
- HMODULE hNtdll = GetNtdllHandle();
+ HMODULE hNtdll = GetNtdllHandleInternal();
if (!hNtdll)
{
@@ -121,6 +97,7 @@ std::unordered_map ExtractSyscallsFromDll()
}
return syscallNumbers;
+#endif
}
BOOL InitializeResolver()
@@ -130,7 +107,7 @@ BOOL InitializeResolver()
return TRUE;
}
- syscallCache = ExtractSyscallsFromDll();
+ syscallCache = ExtractSyscallsFromDllInternal();
if (syscallCache.empty())
{
@@ -166,8 +143,3 @@ void CleanupResolver()
syscallCache.clear();
resolverInitialized = FALSE;
}
-
-#else
-/* not in indirect mode file compiles to nothing */
-#pragma message("SysCaller: Resolver.cpp skipped (SYSCALLER_INDIRECT not defined)")
-#endif
From a72b61fa3f091d977d096061418b4cfafc290fb6 Mon Sep 17 00:00:00 2001
From: WindowsAPI
Date: Wed, 1 Oct 2025 00:01:20 -0700
Subject: [PATCH 05/32] refactor resolver headers and add disk mapped resolver
Introduces DiskMappedResolver for parsing ntdll.dll directly from disk, updates project files and configuration to support the new resolver, and consolidates all resolver method headers into a single Resolver.h file
---
SysCaller/SysCaller.vcxproj | 5 +-
.../Resolver/Methods/MemoryExportResolver.h | 18 --
.../include/Resolver/Methods/PebLdrResolver.h | 18 --
.../HashedExportResolver.h => Resolver.h} | 0
SysCaller/Wrapper/include/syscaller.h | 10 +-
SysCaller/Wrapper/include/syscaller_config.h | 5 +-
.../Resolver/Methods/DiskMappedResolver.cpp | 199 ++++++++++++++++++
.../Resolver/Methods/HashedExportResolver.cpp | 2 +-
.../Resolver/Methods/MemoryExportResolver.cpp | 2 +-
.../src/Resolver/Methods/PebLdrResolver.cpp | 2 +-
SysCaller/Wrapper/src/Resolver/PebUtils.cpp | 2 +-
.../Wrapper/src/Resolver/ResolverBase.cpp | 12 +-
SysCaller/Wrapper/src/build_info.cpp | 2 +-
13 files changed, 227 insertions(+), 50 deletions(-)
delete mode 100644 SysCaller/Wrapper/include/Resolver/Methods/MemoryExportResolver.h
delete mode 100644 SysCaller/Wrapper/include/Resolver/Methods/PebLdrResolver.h
rename SysCaller/Wrapper/include/Resolver/{Methods/HashedExportResolver.h => Resolver.h} (100%)
create mode 100644 SysCaller/Wrapper/src/Resolver/Methods/DiskMappedResolver.cpp
diff --git a/SysCaller/SysCaller.vcxproj b/SysCaller/SysCaller.vcxproj
index 9d2b3a6..de3a105 100644
--- a/SysCaller/SysCaller.vcxproj
+++ b/SysCaller/SysCaller.vcxproj
@@ -105,9 +105,7 @@
-
-
-
+
@@ -120,6 +118,7 @@
+
diff --git a/SysCaller/Wrapper/include/Resolver/Methods/MemoryExportResolver.h b/SysCaller/Wrapper/include/Resolver/Methods/MemoryExportResolver.h
deleted file mode 100644
index b175a5a..0000000
--- a/SysCaller/Wrapper/include/Resolver/Methods/MemoryExportResolver.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#pragma once
-
-#include
-#include
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-DWORD GetSyscallNumber(const char* functionName);
-
-BOOL InitializeResolver();
-
-void CleanupResolver();
-
-#ifdef __cplusplus
-}
-#endif
\ No newline at end of file
diff --git a/SysCaller/Wrapper/include/Resolver/Methods/PebLdrResolver.h b/SysCaller/Wrapper/include/Resolver/Methods/PebLdrResolver.h
deleted file mode 100644
index 8f29f6f..0000000
--- a/SysCaller/Wrapper/include/Resolver/Methods/PebLdrResolver.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#pragma once
-
-#include
-#include
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-DWORD GetSyscallNumber(const char* functionName);
-
-BOOL InitializeResolver();
-
-void CleanupResolver();
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/SysCaller/Wrapper/include/Resolver/Methods/HashedExportResolver.h b/SysCaller/Wrapper/include/Resolver/Resolver.h
similarity index 100%
rename from SysCaller/Wrapper/include/Resolver/Methods/HashedExportResolver.h
rename to SysCaller/Wrapper/include/Resolver/Resolver.h
diff --git a/SysCaller/Wrapper/include/syscaller.h b/SysCaller/Wrapper/include/syscaller.h
index e01fded..c615c91 100644
--- a/SysCaller/Wrapper/include/syscaller.h
+++ b/SysCaller/Wrapper/include/syscaller.h
@@ -81,13 +81,15 @@
#if defined(SYSCALLER_INDIRECT)
#if defined(SYSCALLER_RESOLVER_PEB_LDR)
-#include
+#include
#elif defined(SYSCALLER_RESOLVER_MEMORY_EXPORT)
-#include
+#include
#elif defined(SYSCALLER_RESOLVER_HASHED_EXPORT)
-#include
+#include
+#elif defined(SYSCALLER_RESOLVER_DISK_MAPPED)
+#include
#else
-#error "For SYSCALLER_INDIRECT mode, you must define one resolver: SYSCALLER_RESOLVER_PEB_LDR, SYSCALLER_RESOLVER_MEMORY_EXPORT, or SYSCALLER_RESOLVER_HASHED_EXPORT"
+#error "For SYSCALLER_INDIRECT mode, you must define one resolver: SYSCALLER_RESOLVER_PEB_LDR, SYSCALLER_RESOLVER_MEMORY_EXPORT, SYSCALLER_RESOLVER_HASHED_EXPORT, or SYSCALLER_RESOLVER_DISK_MAPPED"
#endif
#endif
\ No newline at end of file
diff --git a/SysCaller/Wrapper/include/syscaller_config.h b/SysCaller/Wrapper/include/syscaller_config.h
index 20e6d3f..34d5fc4 100644
--- a/SysCaller/Wrapper/include/syscaller_config.h
+++ b/SysCaller/Wrapper/include/syscaller_config.h
@@ -33,8 +33,11 @@
/* Use PEB LDR traversal (no WinAPI calls) */
// #define SYSCALLER_RESOLVER_PEB_LDR
-/* Use memory export parsing with GetModuleHandle (uses WinAPI) */
+/* Use memory export parsing with GetModuleHandle (uses WinAPI to locate ntdll) */
// #define SYSCALLER_RESOLVER_MEMORY_EXPORT
/* Use hashed export parsing (no WinAPI calls) */
// #define SYSCALLER_RESOLVER_HASHED_EXPORT
+
+/* Use disk mapped ntdll.dll parsing (uses WinAPI for I/O funcs not locating ntdll) */
+// #define SYSCALLER_RESOLVER_DISK_MAPPED
diff --git a/SysCaller/Wrapper/src/Resolver/Methods/DiskMappedResolver.cpp b/SysCaller/Wrapper/src/Resolver/Methods/DiskMappedResolver.cpp
new file mode 100644
index 0000000..ff314a7
--- /dev/null
+++ b/SysCaller/Wrapper/src/Resolver/Methods/DiskMappedResolver.cpp
@@ -0,0 +1,199 @@
+#if defined(SYSCALLER_DIRECT)
+#pragma message("SysCaller: Building via DIRECT syscall mode")
+#elif defined(SYSCALLER_INDIRECT)
+#pragma message("SysCaller: Building via INDIRECT syscall mode")
+#elif defined(SYSCALLER_INLINE)
+#pragma message("SysCaller: Building via INLINE ASM syscall mode")
+#else
+#pragma message("SysCaller: No build mode specified, defaulting to DIRECT")
+#endif
+
+#if defined(SYSCALLER_BINDINGS)
+#pragma message("SysCaller: Building with BINDINGS support (DLL export)")
+#endif
+
+#ifdef SYSCALLER_INDIRECT
+#ifdef SYSCALLER_RESOLVER_DISK_MAPPED
+
+#include
+#include
+
+typedef struct _MAPPED_NTDLL_INFO {
+ HANDLE hFile;
+ HANDLE hMapping;
+ LPVOID pMappedBase;
+ PIMAGE_DOS_HEADER pDosHeader;
+ PIMAGE_NT_HEADERS pNtHeaders;
+ PIMAGE_EXPORT_DIRECTORY pExportDir;
+} MAPPED_NTDLL_INFO, *PMAPPED_NTDLL_INFO;
+
+PMAPPED_NTDLL_INFO MapNtdllFromDisk()
+{
+ static MAPPED_NTDLL_INFO mappedInfo = {0};
+ static BOOL initialized = FALSE;
+
+ if (initialized)
+ {
+ return &mappedInfo;
+ }
+
+ CHAR systemPath[MAX_PATH] = {0};
+ if (GetSystemDirectoryA(systemPath, MAX_PATH) == 0)
+ {
+ return NULL;
+ }
+
+ CHAR ntdllPath[MAX_PATH] = {0};
+ if (sprintf_s(ntdllPath, MAX_PATH, "%s\\ntdll.dll", systemPath) < 0)
+ {
+ return NULL;
+ }
+
+ mappedInfo.hFile = CreateFileA(ntdllPath, GENERIC_READ, FILE_SHARE_READ,
+ NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ if (mappedInfo.hFile == INVALID_HANDLE_VALUE)
+ {
+ return NULL;
+ }
+
+ /* create file mapping */
+ mappedInfo.hMapping = CreateFileMappingA(mappedInfo.hFile, NULL, PAGE_READONLY, 0, 0, NULL);
+ if (mappedInfo.hMapping == NULL)
+ {
+ CloseHandle(mappedInfo.hFile);
+ return NULL;
+ }
+
+ /* map the file into memory */
+ mappedInfo.pMappedBase = MapViewOfFile(mappedInfo.hMapping, FILE_MAP_READ, 0, 0, 0);
+ if (mappedInfo.pMappedBase == NULL)
+ {
+ CloseHandle(mappedInfo.hMapping);
+ CloseHandle(mappedInfo.hFile);
+ return NULL;
+ }
+
+ /* validate PE headers */
+ mappedInfo.pDosHeader = (PIMAGE_DOS_HEADER)mappedInfo.pMappedBase;
+ if (mappedInfo.pDosHeader->e_magic != IMAGE_DOS_SIGNATURE)
+ {
+ UnmapViewOfFile(mappedInfo.pMappedBase);
+ CloseHandle(mappedInfo.hMapping);
+ CloseHandle(mappedInfo.hFile);
+ return NULL;
+ }
+
+ mappedInfo.pNtHeaders = (PIMAGE_NT_HEADERS)((BYTE*)mappedInfo.pMappedBase + mappedInfo.pDosHeader->e_lfanew);
+ if (mappedInfo.pNtHeaders->Signature != IMAGE_NT_SIGNATURE)
+ {
+ UnmapViewOfFile(mappedInfo.pMappedBase);
+ CloseHandle(mappedInfo.hMapping);
+ CloseHandle(mappedInfo.hFile);
+ return NULL;
+ }
+
+ /* get export directory */
+ if (mappedInfo.pNtHeaders->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress == 0)
+ {
+ UnmapViewOfFile(mappedInfo.pMappedBase);
+ CloseHandle(mappedInfo.hMapping);
+ CloseHandle(mappedInfo.hFile);
+ return NULL;
+ }
+
+ mappedInfo.pExportDir = (PIMAGE_EXPORT_DIRECTORY)((BYTE*)mappedInfo.pMappedBase +
+ mappedInfo.pNtHeaders->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress);
+
+ initialized = TRUE;
+ return &mappedInfo;
+}
+
+/* cleanup mapped file */
+void UnmapNtdllFromDisk()
+{
+ static MAPPED_NTDLL_INFO mappedInfo = {0};
+ static BOOL initialized = FALSE;
+
+ if (!initialized)
+ {
+ /* check if we have mapped info */
+ PMAPPED_NTDLL_INFO pInfo = MapNtdllFromDisk();
+ if (!pInfo || !pInfo->pMappedBase) return;
+
+ /* copy the info to our static variable */
+ memcpy(&mappedInfo, pInfo, sizeof(MAPPED_NTDLL_INFO));
+ initialized = TRUE;
+ }
+
+ if (mappedInfo.pMappedBase)
+ {
+ UnmapViewOfFile(mappedInfo.pMappedBase);
+ mappedInfo.pMappedBase = NULL;
+ }
+
+ if (mappedInfo.hMapping)
+ {
+ CloseHandle(mappedInfo.hMapping);
+ mappedInfo.hMapping = NULL;
+ }
+
+ if (mappedInfo.hFile)
+ {
+ CloseHandle(mappedInfo.hFile);
+ mappedInfo.hFile = NULL;
+ }
+}
+
+std::unordered_map ExtractSyscallsFromDllDiskMappedInternal()
+{
+ std::unordered_map syscallNumbers;
+
+ /* map ntdll.dll from disk */
+ PMAPPED_NTDLL_INFO pMappedInfo = MapNtdllFromDisk();
+ if (!pMappedInfo || !pMappedInfo->pExportDir)
+ {
+ return syscallNumbers;
+ }
+
+ DWORD* functions = (DWORD*)((BYTE*)pMappedInfo->pMappedBase + pMappedInfo->pExportDir->AddressOfFunctions);
+ DWORD* names = (DWORD*)((BYTE*)pMappedInfo->pMappedBase + pMappedInfo->pExportDir->AddressOfNames);
+ WORD* ordinals = (WORD*)((BYTE*)pMappedInfo->pMappedBase + pMappedInfo->pExportDir->AddressOfNameOrdinals);
+
+ for (DWORD i = 0; i < pMappedInfo->pExportDir->NumberOfNames; i++)
+ {
+ const char* funcName = (const char*)((BYTE*)pMappedInfo->pMappedBase + names[i]);
+
+ if (strncmp(funcName, "Nt", 2) != 0 && strncmp(funcName, "Zw", 2) != 0)
+ {
+ continue;
+ }
+
+ DWORD funcRVA = functions[ordinals[i]];
+ LPVOID funcAddress = (LPVOID)((BYTE*)pMappedInfo->pMappedBase + funcRVA);
+ DWORD syscallNumber = ExtractSyscallNumber(funcAddress);
+
+ if (syscallNumber > 0 && syscallNumber <= 0xFFFF)
+ {
+ syscallNumbers[funcName] = syscallNumber;
+ }
+ }
+
+ return syscallNumbers;
+}
+
+/* (not needed for disk mapping but required by interface) */
+HMODULE GetNtdllHandleInternal()
+{
+ /* return a dummy handle since we read from disk */
+ return (HMODULE)0x1;
+}
+
+#else
+/* not using Disk Mapped resolver */
+#pragma message("SysCaller: DiskMappedResolver.cpp skipped (SYSCALLER_RESOLVER_DISK_MAPPED not defined)")
+#endif
+
+#else
+/* not in indirect mode file compiles to nothing */
+#pragma message("SysCaller: DiskMappedResolver.cpp skipped (SYSCALLER_INDIRECT not defined)")
+#endif
diff --git a/SysCaller/Wrapper/src/Resolver/Methods/HashedExportResolver.cpp b/SysCaller/Wrapper/src/Resolver/Methods/HashedExportResolver.cpp
index 9ad4907..a0e40a0 100644
--- a/SysCaller/Wrapper/src/Resolver/Methods/HashedExportResolver.cpp
+++ b/SysCaller/Wrapper/src/Resolver/Methods/HashedExportResolver.cpp
@@ -16,7 +16,7 @@
#ifdef SYSCALLER_RESOLVER_HASHED_EXPORT
#include
-#include
+#include
#include
/* simple djb2 hash function for strings */
diff --git a/SysCaller/Wrapper/src/Resolver/Methods/MemoryExportResolver.cpp b/SysCaller/Wrapper/src/Resolver/Methods/MemoryExportResolver.cpp
index 02adcf2..4b782bd 100644
--- a/SysCaller/Wrapper/src/Resolver/Methods/MemoryExportResolver.cpp
+++ b/SysCaller/Wrapper/src/Resolver/Methods/MemoryExportResolver.cpp
@@ -16,7 +16,7 @@
#ifdef SYSCALLER_RESOLVER_MEMORY_EXPORT
#include
-#include
+#include
HMODULE GetNtdllHandleInternal()
{
diff --git a/SysCaller/Wrapper/src/Resolver/Methods/PebLdrResolver.cpp b/SysCaller/Wrapper/src/Resolver/Methods/PebLdrResolver.cpp
index ae33780..4ee06ec 100644
--- a/SysCaller/Wrapper/src/Resolver/Methods/PebLdrResolver.cpp
+++ b/SysCaller/Wrapper/src/Resolver/Methods/PebLdrResolver.cpp
@@ -16,7 +16,7 @@
#ifdef SYSCALLER_RESOLVER_PEB_LDR
#include
-#include
+#include
#include
HMODULE GetNtdllHandleInternal()
diff --git a/SysCaller/Wrapper/src/Resolver/PebUtils.cpp b/SysCaller/Wrapper/src/Resolver/PebUtils.cpp
index 45f6916..0947f22 100644
--- a/SysCaller/Wrapper/src/Resolver/PebUtils.cpp
+++ b/SysCaller/Wrapper/src/Resolver/PebUtils.cpp
@@ -1,4 +1,4 @@
-#include "../../include/Resolver/PebUtils.h"
+#include
HMODULE FindNtdllBase()
{
diff --git a/SysCaller/Wrapper/src/Resolver/ResolverBase.cpp b/SysCaller/Wrapper/src/Resolver/ResolverBase.cpp
index 9b3fdd5..995e907 100644
--- a/SysCaller/Wrapper/src/Resolver/ResolverBase.cpp
+++ b/SysCaller/Wrapper/src/Resolver/ResolverBase.cpp
@@ -1,4 +1,4 @@
-#include "../../include/Resolver/ResolverBase.h"
+#include
#include
#include
@@ -41,6 +41,10 @@ std::unordered_map ExtractSyscallsFromDllInternal()
/* forward declaration for the hashed resolver implementation */
std::unordered_map ExtractSyscallsFromDllHashedInternal();
return ExtractSyscallsFromDllHashedInternal();
+#elif defined(SYSCALLER_RESOLVER_DISK_MAPPED)
+ /* forward declaration for the disk mapped resolver implementation */
+ std::unordered_map ExtractSyscallsFromDllDiskMappedInternal();
+ return ExtractSyscallsFromDllDiskMappedInternal();
#else
/* default implementation for other resolver methods */
std::unordered_map syscallNumbers;
@@ -142,4 +146,10 @@ void CleanupResolver()
{
syscallCache.clear();
resolverInitialized = FALSE;
+
+#if defined(SYSCALLER_RESOLVER_DISK_MAPPED)
+ /* cleanup disk mapped resources */
+ extern void UnmapNtdllFromDisk();
+ UnmapNtdllFromDisk();
+#endif
}
diff --git a/SysCaller/Wrapper/src/build_info.cpp b/SysCaller/Wrapper/src/build_info.cpp
index 163f5af..de0d8f9 100644
--- a/SysCaller/Wrapper/src/build_info.cpp
+++ b/SysCaller/Wrapper/src/build_info.cpp
@@ -25,7 +25,7 @@
#pragma message("[SysCaller] Resolver: SKIPPED (not required for direct/inline)")
#endif
-#include "../include/syscaller.h"
+#include
/* empty function ensures this TU is compiled and processed */
void SysCallerBuildInfo() {}
\ No newline at end of file
From f77260e1d319607ac1a978f7f53517eeda9fa289 Mon Sep 17 00:00:00 2001
From: WindowsAPI
Date: Wed, 1 Oct 2025 00:38:32 -0700
Subject: [PATCH 06/32] update version to v1.3.2
---
.github/workflows/build.yml | 2 +-
.../Dialogs/ObfuscationSelectionDialog.cpp | 2 +-
Bind/src/GUI/Dialogs/StubMapperDialog.cpp | 8 ++---
Bind/src/GUI/MainWindow.cpp | 24 +++++++-------
Bind/src/GUI/Panels/LeftPanel.cpp | 6 ++--
Bind/src/GUI/Settings/Tabs/GeneralTab.cpp | 32 +++++++++----------
Bind/src/GUI/Settings/Tabs/ProfileTab.cpp | 10 +++---
7 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 32bf28f..984cdac 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -405,7 +405,7 @@ jobs:
# Create README
$version = "v1.3.2"
- $readmeText = "# SysCaller: Bind - v1.3.1`n`n"
+ $readmeText = "# SysCaller: Bind - v1.3.2`n`n"
$readmeText += "Build Date: $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss UTC')`n"
$readmeText += "Commit: ${{ github.sha }}`n"
$readmeText += "Platform: Windows x64 (64-bit)`n"
diff --git a/Bind/src/GUI/Dialogs/ObfuscationSelectionDialog.cpp b/Bind/src/GUI/Dialogs/ObfuscationSelectionDialog.cpp
index 5c98576..cd4ae9c 100644
--- a/Bind/src/GUI/Dialogs/ObfuscationSelectionDialog.cpp
+++ b/Bind/src/GUI/Dialogs/ObfuscationSelectionDialog.cpp
@@ -13,7 +13,7 @@ ObfuscationSelectionDialog::ObfuscationSelectionDialog(QWidget* parent)
: QDialog(parent)
, selection(Cancelled)
{
- setWindowTitle("Bind - v1.3.1");
+ setWindowTitle("Bind - v1.3.2");
setFixedSize(450, 300);
setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);
setAttribute(Qt::WA_TranslucentBackground);
diff --git a/Bind/src/GUI/Dialogs/StubMapperDialog.cpp b/Bind/src/GUI/Dialogs/StubMapperDialog.cpp
index a351dca..1e40b1e 100644
--- a/Bind/src/GUI/Dialogs/StubMapperDialog.cpp
+++ b/Bind/src/GUI/Dialogs/StubMapperDialog.cpp
@@ -555,7 +555,7 @@ void StubMapperDialog::validateCurrentSettings()
}
else
{
- QMessageBox::warning(this, "Bind - v1.3.1", "Please select a Syscall first.");
+ QMessageBox::warning(this, "Bind - v1.3.2", "Please select a Syscall first.");
}
}
@@ -596,7 +596,7 @@ void StubMapperDialog::saveSettings()
}
settings->setValue("stub_mapper/syscall_settings", QVariant::fromValue(syscallSettings));
- QMessageBox::information(this, "Bind - v1.3.1", "Custom Syscall Settings have been saved successfully.");
+ QMessageBox::information(this, "Bind - v1.3.2", "Custom Syscall Settings have been saved successfully.");
accept();
}
@@ -668,10 +668,10 @@ bool StubMapperDialog::validateStubSettings(const QMap& setti
void StubMapperDialog::showValidationError(const QString& message)
{
- QMessageBox::critical(this, "Bind - v1.3.1", message);
+ QMessageBox::critical(this, "Bind - v1.3.2", message);
}
void StubMapperDialog::showValidationSuccess(const QString& message)
{
- QMessageBox::information(this, "Bind - v1.3.1", message);
+ QMessageBox::information(this, "Bind - v1.3.2", message);
}
diff --git a/Bind/src/GUI/MainWindow.cpp b/Bind/src/GUI/MainWindow.cpp
index acf84d0..dba680e 100644
--- a/Bind/src/GUI/MainWindow.cpp
+++ b/Bind/src/GUI/MainWindow.cpp
@@ -30,7 +30,7 @@ MainWindow::MainWindow(QWidget *parent)
, verificationThread(nullptr)
, obfuscationThread(nullptr)
{
- setWindowTitle("Bind - v1.3.1");
+ setWindowTitle("Bind - v1.3.2");
setMinimumSize(1400, 900);
setWindowFlags(Qt::FramelessWindowHint);
setAttribute(Qt::WA_TranslucentBackground);
@@ -149,7 +149,7 @@ void MainWindow::runValidation()
{
if (validatorThread && validatorThread->isRunning())
{
- QMessageBox::information(this, "Bind - v1.3.1", "Validation Check is already running. Please wait for it to complete.");
+ QMessageBox::information(this, "Bind - v1.3.2", "Validation Check is already running. Please wait for it to complete.");
return;
}
@@ -157,7 +157,7 @@ void MainWindow::runValidation()
if (dllPaths.isEmpty())
{
- QMessageBox::warning(this, "Bind - v1.3.1", "No DLL Paths specified. Please add at least one NTDLL path.");
+ QMessageBox::warning(this, "Bind - v1.3.2", "No DLL Paths specified. Please add at least one NTDLL path.");
return;
}
@@ -197,7 +197,7 @@ void MainWindow::runValidation()
{
leftPanel->updateStatus("Validation Failed!");
statusBar->updateStatus("Validation Failed!");
- QMessageBox::critical(this, "Bind - v1.3.1", message);
+ QMessageBox::critical(this, "Bind - v1.3.2", message);
}
validatorThread->deleteLater();
@@ -234,7 +234,7 @@ void MainWindow::runCompatibility()
{
if (compatibilityThread && compatibilityThread->isRunning())
{
- QMessageBox::information(this, "Bind - v1.3.1", "Compatibility Check is already running. Please wait for it to complete.");
+ QMessageBox::information(this, "Bind - v1.3.2", "Compatibility Check is already running. Please wait for it to complete.");
return;
}
@@ -242,7 +242,7 @@ void MainWindow::runCompatibility()
if (dllPaths.isEmpty())
{
- QMessageBox::warning(this, "Bind - v1.3.1", "No DLL Paths specified. Please add at least one NTDLL path.");
+ QMessageBox::warning(this, "Bind - v1.3.2", "No DLL Paths specified. Please add at least one NTDLL path.");
return;
}
@@ -282,7 +282,7 @@ void MainWindow::runCompatibility()
{
leftPanel->updateStatus("Compatibility Failed!");
statusBar->updateStatus("Compatibility Failed!");
- QMessageBox::critical(this, "Bind - v1.3.1", message);
+ QMessageBox::critical(this, "Bind - v1.3.2", message);
}
compatibilityThread->deleteLater();
@@ -296,7 +296,7 @@ void MainWindow::runVerification()
{
if (verificationThread && verificationThread->isRunning())
{
- QMessageBox::information(this, "Bind - v1.3.1", "Verification Check is already running. Please wait for it to complete.");
+ QMessageBox::information(this, "Bind - v1.3.2", "Verification Check is already running. Please wait for it to complete.");
return;
}
@@ -304,7 +304,7 @@ void MainWindow::runVerification()
if (dllPaths.isEmpty())
{
- QMessageBox::warning(this, "Bind - v1.3.1", "No DLL Paths specified. Please add at least one NTDLL path.");
+ QMessageBox::warning(this, "Bind - v1.3.2", "No DLL Paths specified. Please add at least one NTDLL path.");
return;
}
@@ -351,7 +351,7 @@ void MainWindow::runVerification()
{
leftPanel->updateStatus("Verification Failed!");
statusBar->updateStatus("Verification Failed!");
- QMessageBox::critical(this, "Bind - v1.3.1", message);
+ QMessageBox::critical(this, "Bind - v1.3.2", message);
}
verificationThread->deleteLater();
@@ -365,7 +365,7 @@ void MainWindow::runObfuscation()
{
if (obfuscationThread && obfuscationThread->isRunning())
{
- QMessageBox::information(this, "Bind - v1.3.1", "Syscall Obfuscation is already running. Please wait for it to complete.");
+ QMessageBox::information(this, "Bind - v1.3.2", "Syscall Obfuscation is already running. Please wait for it to complete.");
return;
}
@@ -437,7 +437,7 @@ void MainWindow::runObfuscation()
{
leftPanel->updateStatus("Obfuscation Failed!");
statusBar->updateStatus("Obfuscation Failed!");
- QMessageBox::critical(this, "Bind - v1.3.1", message);
+ QMessageBox::critical(this, "Bind - v1.3.2", message);
}
QSettings settings(PathUtils::getIniPath(), QSettings::IniFormat);
diff --git a/Bind/src/GUI/Panels/LeftPanel.cpp b/Bind/src/GUI/Panels/LeftPanel.cpp
index f540d89..734f9ed 100644
--- a/Bind/src/GUI/Panels/LeftPanel.cpp
+++ b/Bind/src/GUI/Panels/LeftPanel.cpp
@@ -52,12 +52,12 @@ LeftPanel::LeftPanel(QWidget* parent)
logoLabel->setAlignment(Qt::AlignCenter);
topSection->addWidget(logoLabel, 0, Qt::AlignCenter);
- versionLabel = new QLabel("v1.3.1", this);
+ versionLabel = new QLabel("v1.3.2", this);
versionLabel->setStyleSheet("color: #666666; font-size: 12px;");
versionLabel->setAlignment(Qt::AlignCenter);
versionLabel->setCursor(Qt::PointingHandCursor);
versionLabel->setTextFormat(Qt::RichText);
- versionLabel->setText("v1.3.1");
+ versionLabel->setText("v1.3.2");
topSection->addWidget(versionLabel, 0, Qt::AlignCenter);
layout->addLayout(topSection);
@@ -264,7 +264,7 @@ void LeftPanel::browseDll()
{
QString dllPath = QFileDialog::getOpenFileName(
this,
- "Bind - v1.3.1",
+ "Bind - v1.3.2",
"",
"DLL Files (*.dll);;All Files (*.*)"
);
diff --git a/Bind/src/GUI/Settings/Tabs/GeneralTab.cpp b/Bind/src/GUI/Settings/Tabs/GeneralTab.cpp
index a0b19d3..8d23fb8 100644
--- a/Bind/src/GUI/Settings/Tabs/GeneralTab.cpp
+++ b/Bind/src/GUI/Settings/Tabs/GeneralTab.cpp
@@ -281,7 +281,7 @@ void GeneralTab::saveSettings()
if (modeChanged)
{
- ConfirmationDialog infoDialog("Bind - v1.3.1", this);
+ ConfirmationDialog infoDialog("Bind - v1.3.2", this);
infoDialog.setMessage(QString("The syscall mode has been changed from %1 to %2.\n\n"
"This change affects which files are processed:\n"
"- Nt Mode: User mode files in SysCaller directory\n"
@@ -377,7 +377,7 @@ void GeneralTab::restoreDefaultFiles()
QString filePathText = isKernelMode ? "SysCallerK directory" : "SysCaller directory";
QString headerName = isKernelMode ? "sysFunctions_k.h" : "sysFunctions.h";
- ConfirmationDialog confirmDialog("Bind - v1.3.1", this);
+ ConfirmationDialog confirmDialog("Bind - v1.3.2", this);
confirmDialog.setMessage(QString("Are you sure you want to restore default %1 files?\n\n"
"This will overwrite your current syscaller.asm and %2 files in the %3.")
.arg(modeText, headerName, filePathText));
@@ -396,7 +396,7 @@ void GeneralTab::restoreDefaultFiles()
if (!QFile::exists(defaultAsmPath) || !QFile::exists(defaultHeaderPath))
{
- ConfirmationDialog warningDialog("Bind - v1.3.1", this);
+ ConfirmationDialog warningDialog("Bind - v1.3.2", this);
warningDialog.setMessage("Default files not found in Default directory.");
warningDialog.setButtons(false, false, true, false);
warningDialog.exec();
@@ -423,7 +423,7 @@ void GeneralTab::restoreDefaultFiles()
if (!asmCopied || !headerCopied)
{
- ConfirmationDialog errorDialog("Bind - v1.3.1", this);
+ ConfirmationDialog errorDialog("Bind - v1.3.2", this);
errorDialog.setMessage(QString("Failed to copy files:\nASM: %1\nHeader: %2")
.arg(asmCopied ? "Success" : "Failed")
.arg(headerCopied ? "Success" : "Failed"));
@@ -432,14 +432,14 @@ void GeneralTab::restoreDefaultFiles()
return;
}
- ConfirmationDialog infoDialog("Bind - v1.3.1", this);
+ ConfirmationDialog infoDialog("Bind - v1.3.2", this);
infoDialog.setMessage(QString("Default %1 files have been restored successfully!").arg(modeText));
infoDialog.setButtons(false, false, true, false);
infoDialog.exec();
}
catch (...)
{
- ConfirmationDialog errorDialog("Bind - v1.3.1", this);
+ ConfirmationDialog errorDialog("Bind - v1.3.2", this);
errorDialog.setMessage("An error occurred while restoring default files.");
errorDialog.setButtons(false, true, false);
errorDialog.exec();
@@ -455,7 +455,7 @@ void GeneralTab::restoreBackup(const QString& timestamp)
if (!completeBackups.contains(timestamp))
{
- ConfirmationDialog warningDialog("Bind - v1.3.1", this);
+ ConfirmationDialog warningDialog("Bind - v1.3.2", this);
warningDialog.setMessage(QString("Could not find complete backup set for timestamp %1").arg(timestamp));
warningDialog.setButtons(false, false, true, false);
warningDialog.exec();
@@ -478,14 +478,14 @@ void GeneralTab::restoreBackup(const QString& timestamp)
if (!missingFiles.isEmpty())
{
- ConfirmationDialog warningDialog("Bind - v1.3.1", this);
+ ConfirmationDialog warningDialog("Bind - v1.3.2", this);
warningDialog.setMessage(QString("Could not find the following backup files:\n%1").arg(missingFiles.join("\n")));
warningDialog.setButtons(false, false, true, false);
warningDialog.exec();
return;
}
- ConfirmationDialog confirmDialog("Bind - v1.3.1", this);
+ ConfirmationDialog confirmDialog("Bind - v1.3.2", this);
confirmDialog.setMessage(QString("Are you sure you want to restore from backup files dated %1?\n\n"
"This will overwrite your current syscaller.asm and sysFunctions.h files.")
.arg(formatTimestamp(timestamp)));
@@ -504,7 +504,7 @@ void GeneralTab::restoreBackup(const QString& timestamp)
if (QFile::exists(asmPath) && isFileLocked(asmPath))
{
- ConfirmationDialog warningDialog("Bind - v1.3.1", this);
+ ConfirmationDialog warningDialog("Bind - v1.3.2", this);
warningDialog.setMessage("The ASM file appears to be locked by another process. Close any applications that might be using it and try again.");
warningDialog.setButtons(false, false, true, false);
warningDialog.exec();
@@ -513,7 +513,7 @@ void GeneralTab::restoreBackup(const QString& timestamp)
if (QFile::exists(headerPath) && isFileLocked(headerPath))
{
- ConfirmationDialog warningDialog("Bind - v1.3.1", this);
+ ConfirmationDialog warningDialog("Bind - v1.3.2", this);
warningDialog.setMessage("The header file appears to be locked by another process. Close any applications that might be using it and try again.");
warningDialog.setButtons(false, false, true, false);
warningDialog.exec();
@@ -554,7 +554,7 @@ void GeneralTab::restoreBackup(const QString& timestamp)
if (asmRestored && headerRestored)
{
- ConfirmationDialog infoDialog("Bind - v1.3.1", this);
+ ConfirmationDialog infoDialog("Bind - v1.3.2", this);
infoDialog.setMessage(QString("Files have been restored from backup successfully!\n\nBackup date: %1")
.arg(formatTimestamp(timestamp)));
infoDialog.setButtons(false, false, true, false);
@@ -562,21 +562,21 @@ void GeneralTab::restoreBackup(const QString& timestamp)
}
else if (!asmRestored && headerRestored)
{
- ConfirmationDialog warningDialog("Bind - v1.3.1", this);
+ ConfirmationDialog warningDialog("Bind - v1.3.2", this);
warningDialog.setMessage("Only the header file was restored successfully. The ASM file could not be restored.");
warningDialog.setButtons(false, false, true, false);
warningDialog.exec();
}
else if (asmRestored && !headerRestored)
{
- ConfirmationDialog warningDialog("Bind - v1.3.1", this);
+ ConfirmationDialog warningDialog("Bind - v1.3.2", this);
warningDialog.setMessage("Only the ASM file was restored successfully. The header file could not be restored.");
warningDialog.setButtons(false, false, true, false);
warningDialog.exec();
}
else
{
- ConfirmationDialog errorDialog("Bind - v1.3.1", this);
+ ConfirmationDialog errorDialog("Bind - v1.3.2", this);
errorDialog.setMessage("Failed to restore both files from backup.");
errorDialog.setButtons(false, false, true, false);
errorDialog.exec();
@@ -584,7 +584,7 @@ void GeneralTab::restoreBackup(const QString& timestamp)
}
catch (...)
{
- ConfirmationDialog errorDialog("Bind - v1.3.1", this);
+ ConfirmationDialog errorDialog("Bind - v1.3.2", this);
errorDialog.setMessage("An error occurred while restoring backup files.");
errorDialog.setButtons(false, true, false);
errorDialog.exec();
diff --git a/Bind/src/GUI/Settings/Tabs/ProfileTab.cpp b/Bind/src/GUI/Settings/Tabs/ProfileTab.cpp
index 2f832e8..e66f674 100644
--- a/Bind/src/GUI/Settings/Tabs/ProfileTab.cpp
+++ b/Bind/src/GUI/Settings/Tabs/ProfileTab.cpp
@@ -97,19 +97,19 @@ void ProfileTab::exportProfile()
exportSettings.sync();
- QMessageBox::information(this, "Bind - v1.3.1",
+ QMessageBox::information(this, "Bind - v1.3.2",
QString("Profile exported to:\n%1")
.arg(QDir::toNativeSeparators(QFileInfo(path).absoluteFilePath())));
}
catch (...)
{
- QMessageBox::critical(this, "Bind - v1.3.1", "Failed to export profile.");
+ QMessageBox::critical(this, "Bind - v1.3.2", "Failed to export profile.");
}
}
void ProfileTab::importProfile()
{
- QString path = QFileDialog::getOpenFileName(this, "Bind - v1.3.1", "", "INI Files (*.ini);;All Files (*)");
+ QString path = QFileDialog::getOpenFileName(this, "Bind - v1.3.2", "", "INI Files (*.ini);;All Files (*)");
if (path.isEmpty())
{
@@ -126,7 +126,7 @@ void ProfileTab::importProfile()
QFile::remove(iniPath);
QFile::copy(path, iniPath);
- QMessageBox::information(this, "Bind - v1.3.1",
+ QMessageBox::information(this, "Bind - v1.3.2",
QString("Profile imported from:\n%1\n\nSysCaller will now restart to use the imported profile.")
.arg(QDir::toNativeSeparators(QFileInfo(path).absoluteFilePath())));
@@ -135,7 +135,7 @@ void ProfileTab::importProfile()
}
catch (...)
{
- QMessageBox::critical(this, "Bind - v1.3.1", "Failed to import profile.");
+ QMessageBox::critical(this, "Bind - v1.3.2", "Failed to import profile.");
}
}
From 95b52821d036cd12dce6a9eb40a12b5b7e95d300 Mon Sep 17 00:00:00 2001
From: WindowsAPI
Date: Fri, 3 Oct 2025 19:59:32 -0700
Subject: [PATCH 07/32] refactor includes to use angle brackets and absolute
paths
---
Default/sysFunctions.h | 6 ++--
Default/sysFunctions_k.h | 8 ++---
SysCaller/Wrapper/include/Sys/sysExternals.h | 4 +--
SysCaller/Wrapper/include/Sys/sysFunctions.h | 32 ++++++++---------
SysCaller/Wrapper/include/Sys/sysTypes.h | 6 ++--
.../Wrapper/src/Resolver/ResolverBase.cpp | 36 +++++++++++++++++++
.../Wrapper/include/SysK/sysExternals_k.h | 2 +-
SysCallerK/Wrapper/include/SysK/sysTypes_k.h | 4 +--
SysCallerK/Wrapper/include/syscaller_k.h | 8 ++---
9 files changed, 71 insertions(+), 35 deletions(-)
diff --git a/Default/sysFunctions.h b/Default/sysFunctions.h
index 157aee2..15aedde 100644
--- a/Default/sysFunctions.h
+++ b/Default/sysFunctions.h
@@ -1,7 +1,7 @@
#pragma once
-#include "../syscaller.h"
-#include "sysTypes.h"
-#include "sysExternals.h"
+#include
+#include
+#include
#ifdef _WIN64 /* only compile on 64bit systems */
diff --git a/Default/sysFunctions_k.h b/Default/sysFunctions_k.h
index cd48da1..4d4a816 100644
--- a/Default/sysFunctions_k.h
+++ b/Default/sysFunctions_k.h
@@ -1,8 +1,8 @@
#pragma once
-#include "../syscaller_k.h"
-#include "sysTypes_k.h"
-#include "sysExternals_k.h"
-#include "sysConstants_k.h"
+#include
+#include
+#include
+#include
#ifdef _WIN64 /* only compile on 64bit systems */
diff --git a/SysCaller/Wrapper/include/Sys/sysExternals.h b/SysCaller/Wrapper/include/Sys/sysExternals.h
index 6f925c5..c735b4d 100644
--- a/SysCaller/Wrapper/include/Sys/sysExternals.h
+++ b/SysCaller/Wrapper/include/Sys/sysExternals.h
@@ -1,6 +1,6 @@
#pragma once
-#include "../syscaller.h"
-#include "sysTypes.h"
+#include
+#include
typedef struct _WNF_STATE_NAME
{
diff --git a/SysCaller/Wrapper/include/Sys/sysFunctions.h b/SysCaller/Wrapper/include/Sys/sysFunctions.h
index 98d8c8b..ad6ec9c 100644
--- a/SysCaller/Wrapper/include/Sys/sysFunctions.h
+++ b/SysCaller/Wrapper/include/Sys/sysFunctions.h
@@ -1,9 +1,9 @@
#pragma once
-#include "../syscaller.h"
-#include "sysTypes.h"
-#include "sysExternals.h"
+#include
+#include
+#include
-#ifdef _WIN64 // Only compile on 64bit systems.
+#ifdef _WIN64 /* only compile on 64bit systems */
#ifdef __cplusplus
extern "C" {
@@ -558,7 +558,7 @@ NTSTATUS SCCommitEnlistment(
NTSTATUS SCCommitRegistryTransaction(
HANDLE RegistryTransactionHandle,
- ULONG Flags // Reserved
+ ULONG Flags /* reserved */
);
NTSTATUS SCCommitTransaction(
@@ -613,7 +613,7 @@ NTSTATUS SCContinue(
NTSTATUS SCContinueEx(
PCONTEXT ContextRecord,
- PVOID ContinueArgument // Can be PKCONTINUE_ARGUMENT or BOOLEAN
+ PVOID ContinueArgument /* can be PKCONTINUE_ARGUMENT or BOOLEAN */
);
NTSTATUS SCConvertBetweenAuxiliaryCounterAndPerformanceCounter(
@@ -1596,7 +1596,7 @@ NTSTATUS SCLoadKeyEx(
HANDLE Event OPTIONAL,
ACCESS_MASK DesiredAccess OPTIONAL,
PHANDLE RootHandle OPTIONAL,
- PVOID Reserved OPTIONAL // previously PIO_STATUS_BLOCK
+ PVOID Reserved OPTIONAL /* previously PIO_STATUS_BLOCK */
);
NTSTATUS SCLockFile(
@@ -1713,7 +1713,7 @@ NTSTATUS SCNotifyChangeDirectoryFile(
PIO_APC_ROUTINE ApcRoutine OPTIONAL,
PVOID ApcContext OPTIONAL,
PIO_STATUS_BLOCK IoStatusBlock,
- PVOID Buffer, // FILE_NOTIFY_INFORMATION
+ PVOID Buffer, /* FILE_NOTIFY_INFORMATION */
ULONG Length,
ULONG CompletionFilter,
BOOLEAN WatchTree
@@ -2398,7 +2398,7 @@ NTSTATUS SCQuerySecurityAttributesToken(
HANDLE TokenHandle,
PUNICODE_STRING Attributes,
ULONG NumberOfAttributes,
- PVOID Buffer, // PTOKEN_SECURITY_ATTRIBUTES_INFORMATION
+ PVOID Buffer, /* PTOKEN_SECURITY_ATTRIBUTES_INFORMATION */
ULONG Length,
PULONG ReturnLength
);
@@ -2446,7 +2446,7 @@ NTSTATUS SCQuerySystemEnvironmentValueEx(
PCGUID VendorGuid,
PVOID Buffer OPTIONAL,
PULONG BufferLength,
- PULONG Attributes OPTIONAL // EFI_VARIABLE_*
+ PULONG Attributes OPTIONAL /* EFI_VARIABLE_* */
);
NTSTATUS SCQuerySystemInformation(
@@ -2786,7 +2786,7 @@ NTSTATUS SCRollbackEnlistment(
NTSTATUS SCRollbackRegistryTransaction(
HANDLE RegistryTransactionHandle,
- ULONG Flags // Reserved
+ ULONG Flags /* reserved */
);
NTSTATUS SCRollbackTransaction(
@@ -3102,8 +3102,8 @@ NTSTATUS SCSetSystemEnvironmentValueEx(
PCUNICODE_STRING VariableName,
PCGUID VendorGuid,
PVOID Buffer OPTIONAL,
- ULONG BufferLength, // 0 = delete variable
- ULONG Attributes // EFI_VARIABLE_*
+ ULONG BufferLength, /* 0 = delete variable */
+ ULONG Attributes /* EFI_VARIABLE_* */
);
NTSTATUS SCSetSystemInformation(
@@ -3115,7 +3115,7 @@ NTSTATUS SCSetSystemInformation(
NTSTATUS SCSetSystemPowerState(
POWER_ACTION SystemAction,
SYSTEM_POWER_STATE LightestSystemState,
- ULONG Flags // POWER_ACTION_* flags
+ ULONG Flags /* POWER_ACTION_* flags */
);
NTSTATUS SCSetSystemTime(
@@ -3124,7 +3124,7 @@ NTSTATUS SCSetSystemTime(
);
NTSTATUS SCSetThreadExecutionState(
- EXECUTION_STATE NewFlags, // ES_* flags
+ EXECUTION_STATE NewFlags, /* ES_* flags */
EXECUTION_STATE * PreviousFlags
);
@@ -3246,7 +3246,7 @@ NTSTATUS SCSystemDebugControl(
NTSTATUS SCTerminateEnclave(
PVOID BaseAddress,
- ULONG Flags // TERMINATE_ENCLAVE_FLAG_*
+ ULONG Flags /* TERMINATE_ENCLAVE_FLAG_* */
);
NTSTATUS SCTerminateJobObject(
diff --git a/SysCaller/Wrapper/include/Sys/sysTypes.h b/SysCaller/Wrapper/include/Sys/sysTypes.h
index 8caaa6e..5af6258 100644
--- a/SysCaller/Wrapper/include/Sys/sysTypes.h
+++ b/SysCaller/Wrapper/include/Sys/sysTypes.h
@@ -1,8 +1,8 @@
#pragma once
-#include "../syscaller.h"
-#include "sysExternals.h"
-#include "sysConstants.h"
+#include
+#include
+#include
// #define USE_PISID /* Uncomment this line to use PISID instead of PSID */
#define USE_DYNAMIC_ARRAY /* Uncomment this line to use dynamic array */
diff --git a/SysCaller/Wrapper/src/Resolver/ResolverBase.cpp b/SysCaller/Wrapper/src/Resolver/ResolverBase.cpp
index 995e907..679fbed 100644
--- a/SysCaller/Wrapper/src/Resolver/ResolverBase.cpp
+++ b/SysCaller/Wrapper/src/Resolver/ResolverBase.cpp
@@ -1,15 +1,28 @@
#include
#include
#include
+#include
/* shared global state */
static std::unordered_map syscallCache;
static HMODULE ntdllHandle = NULL;
static BOOL resolverInitialized = FALSE;
+static CRITICAL_SECTION resolverLock;
HMODULE GetNtdllHandleInternal();
std::unordered_map ExtractSyscallsFromDllInternal();
+/* initialize the critical section for thread safety */
+void InitializeResolverLock()
+{
+ static BOOL lockInitialized = FALSE;
+ if (!lockInitialized)
+ {
+ InitializeCriticalSection(&resolverLock);
+ lockInitialized = TRUE;
+ }
+}
+
DWORD ExtractSyscallNumber(LPVOID functionAddress)
{
if (functionAddress == NULL)
@@ -106,19 +119,37 @@ std::unordered_map ExtractSyscallsFromDllInternal()
BOOL InitializeResolver()
{
+ /* ensure the lock is initialized */
+ InitializeResolverLock();
+
+ /* first check if already initialized (without lock for performance) */
+ if (resolverInitialized)
+ {
+ return TRUE;
+ }
+
+ /* acquire lock for initialization */
+ EnterCriticalSection(&resolverLock);
+
+ /* double check to see if another thread has initialized while we waited */
if (resolverInitialized)
{
+ LeaveCriticalSection(&resolverLock);
return TRUE;
}
+ /* clear the cache first to prevent destructor issues with corrupted state */
+ syscallCache.clear();
syscallCache = ExtractSyscallsFromDllInternal();
if (syscallCache.empty())
{
+ LeaveCriticalSection(&resolverLock);
return FALSE;
}
resolverInitialized = TRUE;
+ LeaveCriticalSection(&resolverLock);
return TRUE;
}
@@ -144,8 +175,13 @@ DWORD GetSyscallNumber(const char* functionName)
void CleanupResolver()
{
+ /* ensure the lock is initialized */
+ InitializeResolverLock();
+
+ EnterCriticalSection(&resolverLock);
syscallCache.clear();
resolverInitialized = FALSE;
+ LeaveCriticalSection(&resolverLock);
#if defined(SYSCALLER_RESOLVER_DISK_MAPPED)
/* cleanup disk mapped resources */
diff --git a/SysCallerK/Wrapper/include/SysK/sysExternals_k.h b/SysCallerK/Wrapper/include/SysK/sysExternals_k.h
index b4fdae3..69cf700 100644
--- a/SysCallerK/Wrapper/include/SysK/sysExternals_k.h
+++ b/SysCallerK/Wrapper/include/SysK/sysExternals_k.h
@@ -1,6 +1,6 @@
#pragma once
-#include "sysTypes_k.h"
+#include
typedef struct _SYSK_WNF_STATE_NAME
{
diff --git a/SysCallerK/Wrapper/include/SysK/sysTypes_k.h b/SysCallerK/Wrapper/include/SysK/sysTypes_k.h
index 857c32a..dc83c88 100644
--- a/SysCallerK/Wrapper/include/SysK/sysTypes_k.h
+++ b/SysCallerK/Wrapper/include/SysK/sysTypes_k.h
@@ -1,7 +1,7 @@
#pragma once
-#include "sysExternals_k.h"
-#include "sysConstants_k.h"
+#include
+#include
/* Forward declarations for cyclic dependencies */
typedef struct _ACTIVATION_CONTEXT* PACTIVATION_CONTEXT;
diff --git a/SysCallerK/Wrapper/include/syscaller_k.h b/SysCallerK/Wrapper/include/syscaller_k.h
index ed138a2..2afe352 100644
--- a/SysCallerK/Wrapper/include/syscaller_k.h
+++ b/SysCallerK/Wrapper/include/syscaller_k.h
@@ -15,8 +15,8 @@
* For more information, see https://www.gnu.org/licenses/gpl-3.0.html
*/
-#include "ntifs.h"
+#include
-#include "SysK/sysTypes_k.h"
-#include "SysK/sysExternals_k.h"
-#include "SysK/sysFunctions_k.h"
\ No newline at end of file
+#include
+#include
+#include
\ No newline at end of file
From e59bf2d5f1144df27182935cf241734f596223b3 Mon Sep 17 00:00:00 2001
From: WindowsAPI
Date: Sat, 18 Oct 2025 19:12:23 -0700
Subject: [PATCH 08/32] add DLL injection examples for Java (JNA/JNI) and
LuaJIT
DLL injection samples using direct syscalls via SysCaller for Java (JNA and JNI) and LuaJIT.
---
Bindings/Examples/Java/JNA/.classpath | 5 +
Bindings/Examples/Java/JNA/InjectDLL.java | 177 ++++++++++++++
Bindings/Examples/Java/JNA/README.md | 19 ++
.../Java/JNA/REPLACE_WITH_SysCaller.dll.txt | 0
.../Java/JNA/REPLACE_WITH_jna-5.18.1.jar.txt | 0
Bindings/Examples/Java/JNI/InjectDLL.java | 18 ++
Bindings/Examples/Java/JNI/InjectDLLNative.c | 84 +++++++
Bindings/Examples/Java/JNI/README.md | 25 ++
.../Java/JNI/REPLACE_WITH_SysCaller.dll.txt | 0
Bindings/Examples/LuaJIT/InjectDLL.lua | 224 ++++++++++++++++++
Bindings/Examples/LuaJIT/README.md | 19 ++
.../LuaJIT/REPLACE_WITH_SysCaller.dll.txt | 0
12 files changed, 571 insertions(+)
create mode 100644 Bindings/Examples/Java/JNA/.classpath
create mode 100644 Bindings/Examples/Java/JNA/InjectDLL.java
create mode 100644 Bindings/Examples/Java/JNA/README.md
create mode 100644 Bindings/Examples/Java/JNA/REPLACE_WITH_SysCaller.dll.txt
create mode 100644 Bindings/Examples/Java/JNA/REPLACE_WITH_jna-5.18.1.jar.txt
create mode 100644 Bindings/Examples/Java/JNI/InjectDLL.java
create mode 100644 Bindings/Examples/Java/JNI/InjectDLLNative.c
create mode 100644 Bindings/Examples/Java/JNI/README.md
create mode 100644 Bindings/Examples/Java/JNI/REPLACE_WITH_SysCaller.dll.txt
create mode 100644 Bindings/Examples/LuaJIT/InjectDLL.lua
create mode 100644 Bindings/Examples/LuaJIT/README.md
create mode 100644 Bindings/Examples/LuaJIT/REPLACE_WITH_SysCaller.dll.txt
diff --git a/Bindings/Examples/Java/JNA/.classpath b/Bindings/Examples/Java/JNA/.classpath
new file mode 100644
index 0000000..8c13587
--- /dev/null
+++ b/Bindings/Examples/Java/JNA/.classpath
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Bindings/Examples/Java/JNA/InjectDLL.java b/Bindings/Examples/Java/JNA/InjectDLL.java
new file mode 100644
index 0000000..352bc41
--- /dev/null
+++ b/Bindings/Examples/Java/JNA/InjectDLL.java
@@ -0,0 +1,177 @@
+import com.sun.jna.*;
+import com.sun.jna.ptr.*;
+
+public class InjectDLL {
+ public interface Kernel32 extends Library {
+ Kernel32 INSTANCE = Native.load("kernel32", Kernel32.class);
+
+ int PROCESS_ALL_ACCESS = 0x1F0FFF;
+ int WAIT_OBJECT_0 = 0x00000000;
+
+ Pointer OpenProcess(int dwDesiredAccess, boolean bInheritHandle, int dwProcessId);
+ boolean CloseHandle(Pointer hObject);
+ Pointer GetModuleHandleA(String name);
+ Pointer GetProcAddress(Pointer hModule, String name);
+ int WaitForSingleObject(Pointer hHandle, int dwMilliseconds);
+ int GetLastError();
+ int GetFullPathNameA(String lpFileName, int nBufferLength, byte[] lpBuffer, PointerByReference lpFilePart);
+ }
+
+ public interface SysCaller extends Library {
+ SysCaller INSTANCE = Native.load("SysCaller", SysCaller.class);
+
+ int SysAllocateVirtualMemoryEx(Pointer hProcess,
+ PointerByReference baseAddress,
+ SizeTByReference regionSize,
+ int allocationType,
+ int protect,
+ Pointer extendedParams,
+ int paramCount);
+
+ int SysWriteVirtualMemory(Pointer hProcess,
+ Pointer baseAddress,
+ Pointer buffer,
+ NativeLong bufferSize,
+ SizeTByReference bytesWritten);
+
+ int SysCreateThreadEx(PointerByReference threadHandle,
+ int desiredAccess,
+ Pointer objectAttributes,
+ Pointer processHandle,
+ Pointer startRoutine,
+ Pointer argument,
+ int createFlags,
+ NativeLong zeroBits,
+ NativeLong stackSize,
+ NativeLong maxStackSize,
+ Pointer attributeList);
+
+ int SysClose(Pointer handle);
+ }
+
+ private static boolean NT_SUCCESS(int status) {
+ return status >= 0;
+ }
+
+ public static class SizeTByReference extends ByReference {
+ public SizeTByReference() { super(NativeLong.SIZE); setValue(new NativeLong(0)); }
+ public SizeTByReference(NativeLong value) { super(NativeLong.SIZE); setValue(value); }
+ public void setValue(NativeLong value) {
+ if (NativeLong.SIZE == 8) getPointer().setLong(0, value.longValue());
+ else getPointer().setInt(0, value.intValue());
+ }
+ public NativeLong getValue() {
+ return new NativeLong(NativeLong.SIZE == 8 ? getPointer().getLong(0) : getPointer().getInt(0));
+ }
+ }
+
+ public static boolean injectDLL(Pointer hProcess, String dllPath) {
+ Kernel32 k32 = Kernel32.INSTANCE;
+ SysCaller sc = SysCaller.INSTANCE;
+
+ byte[] buf = new byte[260];
+ int n = k32.GetFullPathNameA(dllPath, buf.length, buf, null);
+ String abs = (n > 0 && n < buf.length) ? new String(buf, 0, n) : dllPath;
+ byte[] pathBytes = (abs + "\0").getBytes();
+
+ PointerByReference baseRef = new PointerByReference();
+ SizeTByReference region = new SizeTByReference(new NativeLong(pathBytes.length));
+ int status = sc.SysAllocateVirtualMemoryEx(
+ hProcess, baseRef, region, 0x3000, 0x40, Pointer.NULL, 0);
+ if (!NT_SUCCESS(status)) {
+ System.out.printf("[!] Failed to allocate path. Status: 0x%08X\n", status);
+ return false;
+ }
+ Pointer base = baseRef.getValue();
+ System.out.printf("[+] Allocated DLL path memory at: 0x%016X\n", Pointer.nativeValue(base));
+
+ Memory localPath = new Memory(pathBytes.length);
+ localPath.write(0, pathBytes, 0, pathBytes.length);
+ SizeTByReference written = new SizeTByReference();
+ status = sc.SysWriteVirtualMemory(hProcess, base, localPath, new NativeLong(pathBytes.length), written);
+ if (!NT_SUCCESS(status) || written.getValue().longValue() != pathBytes.length) {
+ System.out.printf("[!] Failed to write DLL path. Status: 0x%08X, Bytes written: %d\n", status, written.getValue().longValue());
+ return false;
+ }
+ System.out.println("[+] Successfully wrote DLL path to memory");
+
+ Pointer hKernel32 = k32.GetModuleHandleA("kernel32.dll");
+ if (hKernel32 == null) {
+ System.out.println("[!] Failed to get kernel32.dll handle");
+ return false;
+ }
+ Pointer loadLibrary = k32.GetProcAddress(hKernel32, "LoadLibraryA");
+ if (loadLibrary == null) {
+ System.out.println("[!] Failed to get LoadLibraryA address");
+ return false;
+ }
+ System.out.printf("[+] LoadLibraryA address: 0x%016X\n", Pointer.nativeValue(loadLibrary));
+
+ byte[] scode = new byte[1 + 3 + 2 + 8 + 2 + 8 + 2 + 4 + 1];
+ int i = 0;
+ scode[i++] = 0x48; scode[i++] = (byte)0x83; scode[i++] = (byte)0xEC; scode[i++] = 0x28;
+ scode[i++] = 0x48; scode[i++] = (byte)0xB9;
+ long pathAddr = Pointer.nativeValue(base);
+ for (int b = 0; b < 8; b++) scode[i++] = (byte)((pathAddr >>> (8*b)) & 0xFF);
+ scode[i++] = 0x48; scode[i++] = (byte)0xB8;
+ long llAddr = Pointer.nativeValue(loadLibrary);
+ for (int b = 0; b < 8; b++) scode[i++] = (byte)((llAddr >>> (8*b)) & 0xFF);
+ scode[i++] = (byte)0xFF; scode[i++] = (byte)0xD0;
+ scode[i++] = 0x48; scode[i++] = (byte)0x83; scode[i++] = (byte)0xC4; scode[i++] = 0x28;
+ scode[i++] = (byte)0xC3;
+
+ PointerByReference shellRef = new PointerByReference();
+ region = new SizeTByReference(new NativeLong(scode.length));
+ status = sc.SysAllocateVirtualMemoryEx(hProcess, shellRef, region, 0x3000, 0x40, Pointer.NULL, 0);
+ if (!NT_SUCCESS(status)) {
+ System.out.printf("[!] Failed to allocate shellcode. Status: 0x%08X\n", status);
+ return false;
+ }
+ Pointer shell = shellRef.getValue();
+ System.out.printf("[+] Allocated shellcode memory at: 0x%016X\n", Pointer.nativeValue(shell));
+ Memory scMem = new Memory(scode.length);
+ scMem.write(0, scode, 0, scode.length);
+ written = new SizeTByReference();
+ status = sc.SysWriteVirtualMemory(hProcess, shell, scMem, new NativeLong(scode.length), written);
+ if (!NT_SUCCESS(status) || written.getValue().longValue() != scode.length) {
+ System.out.printf("[!] Failed to write shellcode. Status: 0x%08X, Bytes written: %d\n", status, written.getValue().longValue());
+ return false;
+ }
+ System.out.println("[+] Successfully wrote shellcode");
+
+ PointerByReference hThreadRef = new PointerByReference();
+ status = sc.SysCreateThreadEx(hThreadRef, 0x1FFFFF, Pointer.NULL, hProcess, shell, Pointer.NULL,
+ 0, new NativeLong(0), new NativeLong(0), new NativeLong(0), Pointer.NULL);
+ Pointer hThread = hThreadRef.getValue();
+ if (!NT_SUCCESS(status) || hThread == null) {
+ System.out.printf("[!] Failed to create remote thread. Status: 0x%08X, Handle: %s\n", status, String.valueOf(hThread));
+ return false;
+ }
+ System.out.printf("[+] Created remote thread: 0x%016X\n", Pointer.nativeValue(hThread));
+
+ k32.WaitForSingleObject(hThread, 5000);
+ sc.SysClose(hThread);
+ System.out.printf("[+] Successfully injected %s!\n", dllPath);
+ return true;
+ }
+
+ public static void main(String[] args) {
+ if (args.length != 2) {
+ System.out.println("Usage: java InjectDLL ");
+ return;
+ }
+ int pid = Integer.parseInt(args[0]);
+ String dll = args[1];
+ Kernel32 k32 = Kernel32.INSTANCE;
+ Pointer hProcess = k32.OpenProcess(Kernel32.PROCESS_ALL_ACCESS, false, pid);
+ if (hProcess == null) {
+ System.out.printf("[!] Failed to open process %d\n", pid);
+ return;
+ }
+ try {
+ injectDLL(hProcess, dll);
+ } finally {
+ k32.CloseHandle(hProcess);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Bindings/Examples/Java/JNA/README.md b/Bindings/Examples/Java/JNA/README.md
new file mode 100644
index 0000000..5f4bc09
--- /dev/null
+++ b/Bindings/Examples/Java/JNA/README.md
@@ -0,0 +1,19 @@
+# DLL Injection via Direct Syscalls w/ SysCaller (Java/JNA)
+
+## Requirements
+
+- JDK 21
+- JNA jar on classpath (jna-5.x.jar)
+- `SysCaller.dll` and target `test.dll` placed alongside the Java sources (or on PATH)
+
+## Usage
+
+1) Compile:
+ javac -cp .;jna-5.18.1.jar InjectDLL.java
+2) Run:
+ java -cp .;jna-5.18.1.jar InjectDLL
+
+## Notes
+
+- The code resolves the DLL absolute path via `GetFullPathNameA` to avoid remote LoadLibrary path issues.
+- Uses the same allocation/write/thread creation flow as other samples.
diff --git a/Bindings/Examples/Java/JNA/REPLACE_WITH_SysCaller.dll.txt b/Bindings/Examples/Java/JNA/REPLACE_WITH_SysCaller.dll.txt
new file mode 100644
index 0000000..e69de29
diff --git a/Bindings/Examples/Java/JNA/REPLACE_WITH_jna-5.18.1.jar.txt b/Bindings/Examples/Java/JNA/REPLACE_WITH_jna-5.18.1.jar.txt
new file mode 100644
index 0000000..e69de29
diff --git a/Bindings/Examples/Java/JNI/InjectDLL.java b/Bindings/Examples/Java/JNI/InjectDLL.java
new file mode 100644
index 0000000..05b0fcc
--- /dev/null
+++ b/Bindings/Examples/Java/JNI/InjectDLL.java
@@ -0,0 +1,18 @@
+public class InjectDLL {
+ static {
+ System.loadLibrary("InjectDLLNative");
+ }
+
+ private static native boolean inject(int pid, String dllPath);
+
+ public static void main(String[] args) {
+ if (args.length != 2) {
+ System.out.println("Usage: java InjectDLL ");
+ return;
+ }
+ int pid = Integer.parseInt(args[0]);
+ String dll = args[1];
+ boolean ok = inject(pid, dll);
+ System.out.println(ok ? "[+] Injection succeeded" : "[!] Injection failed");
+ }
+}
diff --git a/Bindings/Examples/Java/JNI/InjectDLLNative.c b/Bindings/Examples/Java/JNI/InjectDLLNative.c
new file mode 100644
index 0000000..4b42288
--- /dev/null
+++ b/Bindings/Examples/Java/JNI/InjectDLLNative.c
@@ -0,0 +1,84 @@
+#include
+#include
+#include
+#include
+
+typedef DWORD NTSTATUS;
+typedef NTSTATUS (__stdcall *PFN_SysAllocateVirtualMemoryEx)(
+ HANDLE, PVOID*, SIZE_T*, DWORD, DWORD, PVOID, DWORD);
+typedef NTSTATUS (__stdcall *PFN_SysWriteVirtualMemory)(
+ HANDLE, PVOID, PVOID, SIZE_T, SIZE_T*);
+typedef NTSTATUS (__stdcall *PFN_SysCreateThreadEx)(
+ PHANDLE, DWORD, PVOID, HANDLE, PVOID, PVOID, DWORD,
+ SIZE_T, SIZE_T, SIZE_T, PVOID);
+typedef NTSTATUS (__stdcall *PFN_SysClose)(HANDLE);
+
+#define NT_SUCCESS(Status) ((int32_t)(Status) >= 0)
+
+static jboolean inject_internal(DWORD pid, const char* dllPath) {
+ HMODULE hSysCaller = LoadLibraryA("SysCaller.dll");
+ if (!hSysCaller) {
+ return JNI_FALSE;
+ }
+ PFN_SysAllocateVirtualMemoryEx SysAllocateVirtualMemoryEx = (PFN_SysAllocateVirtualMemoryEx)GetProcAddress(hSysCaller, "SysAllocateVirtualMemoryEx");
+ PFN_SysWriteVirtualMemory SysWriteVirtualMemory = (PFN_SysWriteVirtualMemory)GetProcAddress(hSysCaller, "SysWriteVirtualMemory");
+ PFN_SysCreateThreadEx SysCreateThreadEx = (PFN_SysCreateThreadEx)GetProcAddress(hSysCaller, "SysCreateThreadEx");
+ PFN_SysClose SysClose = (PFN_SysClose)GetProcAddress(hSysCaller, "SysClose");
+ if (!SysAllocateVirtualMemoryEx || !SysWriteVirtualMemory || !SysCreateThreadEx || !SysClose) {
+ return JNI_FALSE;
+ }
+
+ HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
+ if (!hProcess) return JNI_FALSE;
+
+ char absPath[MAX_PATH];
+ DWORD n = GetFullPathNameA(dllPath, MAX_PATH, absPath, NULL);
+ const char* usePath = (n > 0 && n < MAX_PATH) ? absPath : dllPath;
+ SIZE_T pathLen = (SIZE_T)strlen(usePath) + 1;
+
+ PVOID base = NULL; SIZE_T region = pathLen; NTSTATUS status;
+ status = SysAllocateVirtualMemoryEx(hProcess, &base, ®ion, MEM_COMMIT|MEM_RESERVE, PAGE_EXECUTE_READWRITE, NULL, 0);
+ if (!NT_SUCCESS(status)) { CloseHandle(hProcess); return JNI_FALSE; }
+
+ SIZE_T written = 0;
+ status = SysWriteVirtualMemory(hProcess, base, (PVOID)usePath, pathLen, &written);
+ if (!NT_SUCCESS(status) || written != pathLen) { CloseHandle(hProcess); return JNI_FALSE; }
+
+ HMODULE k32 = GetModuleHandleA("kernel32.dll");
+ FARPROC pLoadLib = GetProcAddress(k32, "LoadLibraryA");
+ if (!pLoadLib) { CloseHandle(hProcess); return JNI_FALSE; }
+
+ uint8_t sc[32]; int idx = 0;
+ sc[idx++] = 0x48; sc[idx++] = 0x83; sc[idx++] = 0xEC; sc[idx++] = 0x28;
+ sc[idx++] = 0x48; sc[idx++] = 0xB9; *(uint64_t*)(sc+idx) = (uint64_t)base; idx += 8;
+ sc[idx++] = 0x48; sc[idx++] = 0xB8; *(uint64_t*)(sc+idx) = (uint64_t)pLoadLib; idx += 8;
+ sc[idx++] = 0xFF; sc[idx++] = 0xD0;
+ sc[idx++] = 0x48; sc[idx++] = 0x83; sc[idx++] = 0xC4; sc[idx++] = 0x28;
+ sc[idx++] = 0xC3;
+ SIZE_T scSize = (SIZE_T)idx;
+
+ PVOID scAddr = NULL; region = scSize;
+ status = SysAllocateVirtualMemoryEx(hProcess, &scAddr, ®ion, MEM_COMMIT|MEM_RESERVE, PAGE_EXECUTE_READWRITE, NULL, 0);
+ if (!NT_SUCCESS(status)) { CloseHandle(hProcess); return JNI_FALSE; }
+ written = 0;
+ status = SysWriteVirtualMemory(hProcess, scAddr, sc, scSize, &written);
+ if (!NT_SUCCESS(status) || written != scSize) { CloseHandle(hProcess); return JNI_FALSE; }
+
+ HANDLE hThread = NULL;
+ status = SysCreateThreadEx(&hThread, 0x1FFFFF, NULL, hProcess, scAddr, NULL, 0, 0, 0, 0, NULL);
+ if (!NT_SUCCESS(status) || !hThread) { CloseHandle(hProcess); return JNI_FALSE; }
+ WaitForSingleObject(hThread, 5000);
+ SysClose(hThread);
+
+ CloseHandle(hProcess);
+ return JNI_TRUE;
+}
+
+JNIEXPORT jboolean JNICALL Java_InjectDLL_inject(JNIEnv* env, jclass cls, jint pid, jstring jpath) {
+ (void)cls;
+ const char* path = (*env)->GetStringUTFChars(env, jpath, NULL);
+ if (!path) return JNI_FALSE;
+ jboolean ok = inject_internal((DWORD)pid, path);
+ (*env)->ReleaseStringUTFChars(env, jpath, path);
+ return ok;
+}
diff --git a/Bindings/Examples/Java/JNI/README.md b/Bindings/Examples/Java/JNI/README.md
new file mode 100644
index 0000000..b28b2ee
--- /dev/null
+++ b/Bindings/Examples/Java/JNI/README.md
@@ -0,0 +1,25 @@
+# DLL Injection via Direct Syscalls w/ SysCaller (Java/JNI)
+
+## Requirements
+
+- JDK 21 (javac/java)
+- MSVC build tools (x64)
+- `SysCaller.dll` and `test.dll` in this directory (or on PATH)
+
+## Usage
+
+1) Generate JNI header inline (not strictly required with this C file):
+ javac .\InjectDLL.java
+
+2) Build native DLL (x64):
+ - Open "x64 Native Tools Command Prompt for VS" or call vcvars64.bat
+ - Compile:
+ cl /LD /I "%JAVA_HOME%\include" /I "%JAVA_HOME%\include\win32" InjectDLLNative.c /link /OUT:InjectDLLNative.dll
+
+3) Run:
+ java InjectDLL
+
+## Notes
+
+- The code resolves the DLL absolute path via `GetFullPathNameA` to avoid remote LoadLibrary path issues.
+- Uses the same allocation/write/thread creation flow as other samples.
diff --git a/Bindings/Examples/Java/JNI/REPLACE_WITH_SysCaller.dll.txt b/Bindings/Examples/Java/JNI/REPLACE_WITH_SysCaller.dll.txt
new file mode 100644
index 0000000..e69de29
diff --git a/Bindings/Examples/LuaJIT/InjectDLL.lua b/Bindings/Examples/LuaJIT/InjectDLL.lua
new file mode 100644
index 0000000..a65d394
--- /dev/null
+++ b/Bindings/Examples/LuaJIT/InjectDLL.lua
@@ -0,0 +1,224 @@
+local ffi = require("ffi")
+
+ffi.cdef[[
+typedef unsigned long DWORD;
+typedef int BOOL;
+typedef void* PVOID;
+typedef PVOID HANDLE;
+typedef size_t SIZE_T;
+typedef unsigned long long ULONG_PTR;
+typedef unsigned long ULONG;
+typedef long NTSTATUS;
+
+NTSTATUS SysAllocateVirtualMemoryEx(
+ HANDLE ProcessHandle,
+ PVOID *BaseAddress,
+ SIZE_T *RegionSize,
+ ULONG AllocationType,
+ ULONG Protect,
+ PVOID ExtendedParameters,
+ ULONG ExtendedCount
+);
+
+NTSTATUS SysWriteVirtualMemory(
+ HANDLE ProcessHandle,
+ PVOID BaseAddress,
+ PVOID Buffer,
+ SIZE_T BufferSize,
+ SIZE_T *NumberOfBytesWritten
+);
+
+NTSTATUS SysCreateThreadEx(
+ HANDLE *ThreadHandle,
+ ULONG DesiredAccess,
+ PVOID ObjectAttributes,
+ HANDLE ProcessHandle,
+ PVOID StartRoutine,
+ PVOID Argument,
+ ULONG CreateFlags,
+ SIZE_T ZeroBits,
+ SIZE_T StackSize,
+ SIZE_T MaximumStackSize,
+ PVOID AttributeList
+);
+
+NTSTATUS SysClose(HANDLE Handle);
+
+HANDLE OpenProcess(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwProcessId);
+BOOL CloseHandle(HANDLE hObject);
+HANDLE GetModuleHandleA(const char *lpModuleName);
+void* GetProcAddress(HANDLE hModule, const char *lpProcName);
+DWORD WaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds);
+DWORD GetFullPathNameA(const char* lpFileName, DWORD nBufferLength, char* lpBuffer, char** lpFilePart);
+]]
+
+local syscaller = ffi.load("SysCaller")
+local kernel32 = ffi.C
+
+local function NT_SUCCESS(status)
+ return tonumber(status) >= 0
+end
+
+local function pack_u64(val)
+ local buf = ffi.new("uint64_t[1]")
+ buf[0] = ffi.cast("uint64_t", val)
+ return ffi.string(buf, 8)
+end
+
+local function ptr_to_uint64(p)
+ return tonumber(ffi.cast("uintptr_t", p))
+end
+
+local function InjectDLL(process_handle, dll_path)
+ local MAX_PATH = 260
+ local outbuf = ffi.new("char[?]", MAX_PATH)
+ local ret = kernel32.GetFullPathNameA(dll_path, MAX_PATH, outbuf, nil)
+ local abs_path
+ if ret ~= 0 and ret < MAX_PATH then
+ abs_path = ffi.string(outbuf, ret)
+ else
+ abs_path = dll_path
+ end
+
+ local path_bytes = abs_path .. "\0"
+ local path_size = #path_bytes
+
+ local baseaddr = ffi.new("PVOID[1]")
+ local region_size = ffi.new("SIZE_T[1]", path_size)
+
+ local STATUS = syscaller.SysAllocateVirtualMemoryEx(
+ process_handle,
+ baseaddr,
+ region_size,
+ 0x3000,
+ 0x40,
+ nil,
+ 0
+ )
+ if not NT_SUCCESS(STATUS) then
+ print(string.format("[!] Failed to allocate memory for DLL path. Status: 0x%08X", tonumber(ffi.cast("unsigned int", STATUS))))
+ return false
+ end
+ local dll_path_addr = ptr_to_uint64(baseaddr[0])
+ print(string.format("[+] Allocated DLL path memory at: 0x%016X", dll_path_addr))
+
+ local bytes_written = ffi.new("SIZE_T[1]", 0)
+ local local_buf = ffi.new("char[?]", path_size, path_bytes)
+ STATUS = syscaller.SysWriteVirtualMemory(
+ process_handle,
+ baseaddr[0],
+ ffi.cast("PVOID", local_buf),
+ path_size,
+ bytes_written
+ )
+ if not NT_SUCCESS(STATUS) or tonumber(bytes_written[0]) ~= path_size then
+ print(string.format("[!] Failed to write DLL path. Status: 0x%08X, Bytes written: %d", tonumber(ffi.cast("unsigned int", STATUS)), tonumber(bytes_written[0])))
+ return false
+ end
+ print("[+] Successfully wrote DLL path to memory")
+
+ local h_kernel32 = kernel32.GetModuleHandleA("kernel32.dll")
+ if h_kernel32 == nil then
+ print("[!] Failed to get kernel32.dll handle")
+ return false
+ end
+ local load_library = kernel32.GetProcAddress(h_kernel32, "LoadLibraryA")
+ if load_library == nil then
+ print("[!] Failed to get LoadLibraryA address")
+ return false
+ end
+ local load_library_addr = ptr_to_uint64(load_library)
+ print(string.format("[+] LoadLibraryA address: 0x%016X", load_library_addr))
+
+ local sc = {}
+ sc[#sc+1] = string.char(0x48, 0x83, 0xEC, 0x28)
+ sc[#sc+1] = string.char(0x48, 0xB9) .. pack_u64(baseaddr[0])
+ sc[#sc+1] = string.char(0x48, 0xB8) .. pack_u64(load_library)
+ sc[#sc+1] = string.char(0xFF, 0xD0)
+ sc[#sc+1] = string.char(0x48, 0x83, 0xC4, 0x28)
+ sc[#sc+1] = string.char(0xC3)
+ local shellcode = table.concat(sc)
+ local shellcode_size = #shellcode
+
+ local shelladdr = ffi.new("PVOID[1]")
+ local shell_region = ffi.new("SIZE_T[1]", shellcode_size)
+ STATUS = syscaller.SysAllocateVirtualMemoryEx(
+ process_handle,
+ shelladdr,
+ shell_region,
+ 0x3000,
+ 0x40,
+ nil,
+ 0
+ )
+ if not NT_SUCCESS(STATUS) then
+ print(string.format("[!] Failed to allocate memory for shellcode. Status: 0x%08X", tonumber(ffi.cast("unsigned int", STATUS))))
+ return false
+ end
+ local shellcode_addr_val = ptr_to_uint64(shelladdr[0])
+ print(string.format("[+] Allocated shellcode memory at: 0x%016X", shellcode_addr_val))
+
+ local local_sc_buf = ffi.new("char[?]", shellcode_size, shellcode)
+ bytes_written[0] = 0
+ STATUS = syscaller.SysWriteVirtualMemory(
+ process_handle,
+ shelladdr[0],
+ ffi.cast("PVOID", local_sc_buf),
+ shellcode_size,
+ bytes_written
+ )
+ if not NT_SUCCESS(STATUS) or tonumber(bytes_written[0]) ~= shellcode_size then
+ print(string.format("[!] Failed to write shellcode. Status: 0x%08X, Bytes written: %d", tonumber(ffi.cast("unsigned int", STATUS)), tonumber(bytes_written[0])))
+ return false
+ end
+ print("[+] Successfully wrote shellcode")
+
+ local thread_handle = ffi.new("HANDLE[1]")
+ STATUS = syscaller.SysCreateThreadEx(
+ thread_handle,
+ 0x1FFFFF,
+ nil,
+ process_handle,
+ shelladdr[0],
+ nil,
+ 0,
+ 0,
+ 0,
+ 0,
+ nil
+ )
+ if not NT_SUCCESS(STATUS) or thread_handle[0] == nil then
+ print(string.format("[!] Failed to create remote thread. Status: 0x%08X, Handle: %s", tonumber(ffi.cast("unsigned int", STATUS)), tostring(thread_handle[0])))
+ return false
+ end
+ print(string.format("[+] Created remote thread: 0x%016X", ptr_to_uint64(thread_handle[0])))
+
+ kernel32.WaitForSingleObject(thread_handle[0], 5000)
+ STATUS = syscaller.SysClose(thread_handle[0])
+ print(string.format("[+] Successfully injected %s!", dll_path))
+ return true
+end
+
+local argc = #arg
+if argc ~= 2 then
+ print("Usage: luajit inject.lua ")
+ os.exit(1)
+end
+
+local pid = tonumber(arg[1])
+local dll_path = arg[2]
+
+local PROCESS_ALL_ACCESS = 0x1F0FFF
+local process_handle = ffi.C.OpenProcess(PROCESS_ALL_ACCESS, false, pid)
+if process_handle == nil then
+ print(string.format("[!] Failed to open process %d", pid))
+ os.exit(1)
+end
+
+local ok = InjectDLL(process_handle, dll_path)
+
+ffi.C.CloseHandle(process_handle)
+
+if not ok then
+ os.exit(1)
+end
\ No newline at end of file
diff --git a/Bindings/Examples/LuaJIT/README.md b/Bindings/Examples/LuaJIT/README.md
new file mode 100644
index 0000000..0ab7e67
--- /dev/null
+++ b/Bindings/Examples/LuaJIT/README.md
@@ -0,0 +1,19 @@
+# DLL Injection via Direct Syscalls w/ SysCaller (LuaJIT/FFI)
+
+## Requirements
+
+- LuaJIT (2.x)
+- `SysCaller.dll` placed alongside the Lua script (or on PATH)
+
+## Usage
+
+Run the script:
+```
+luajit injectdll.lua
+```
+
+## Notes
+
+- The script resolves the DLL absolute path via `GetFullPathNameA` to avoid remote LoadLibrary path issues.
+- Uses the same allocation/write/thread creation flow as other samples.
+- Shellcode is built dynamically with proper 64-bit address packing to prevent precision loss.
\ No newline at end of file
diff --git a/Bindings/Examples/LuaJIT/REPLACE_WITH_SysCaller.dll.txt b/Bindings/Examples/LuaJIT/REPLACE_WITH_SysCaller.dll.txt
new file mode 100644
index 0000000..e69de29
From 9b743704c5fd1000c0b2c9a963eda4297fe0723b Mon Sep 17 00:00:00 2001
From: WindowsAPI
Date: Sun, 19 Oct 2025 03:54:33 -0700
Subject: [PATCH 09/32] fix duplicate close block in header
Improves detection and handling of partially closed extern "C" blocks when updating header files. This should fix #28
---
.../Core/Integrity/Validator/Validator.cpp | 22 ++++++++++++++-----
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/Bind/src/Core/Integrity/Validator/Validator.cpp b/Bind/src/Core/Integrity/Validator/Validator.cpp
index 33d406f..a78ae85 100644
--- a/Bind/src/Core/Integrity/Validator/Validator.cpp
+++ b/Bind/src/Core/Integrity/Validator/Validator.cpp
@@ -986,17 +986,27 @@ void Validator::updateHeaderFile(const QMap>& syscallTab
for (int i = qMax(0, updatedLines.size() - searchWindow); i < updatedLines.size(); ++i)
{
tail += updatedLines[i];
+ tail += "\n";
}
- QRegularExpression externCloseRegex(R"(#ifdef\s+__cplusplus[\s\S]*?\}\s*\n\s*#endif)");
+ QRegularExpression externCloseRegex(R"(#ifdef\s+__cplusplus[\s\S]*?\}\s*#endif)");
+ QRegularExpression externPartialCloseRegex(R"(#ifdef\s+__cplusplus[\s\S]*?\}\s*$)");
if (!externCloseRegex.match(tail).hasMatch())
{
- updatedLines.append("");
- updatedLines.append("#ifdef __cplusplus");
- updatedLines.append("}");
- updatedLines.append("#endif");
- updatedLines.append("");
+ if (externPartialCloseRegex.match(tail).hasMatch())
+ {
+ updatedLines.append("#endif");
+ updatedLines.append("");
+ }
+ else
+ {
+ updatedLines.append("");
+ updatedLines.append("#ifdef __cplusplus");
+ updatedLines.append("}");
+ updatedLines.append("#endif");
+ updatedLines.append("");
+ }
}
int externOpenIdx = -1;
From 3b2e7be87ce805ee97233a00564ff7286632a732 Mon Sep 17 00:00:00 2001
From: WindowsAPI
Date: Sun, 19 Oct 2025 04:19:28 -0700
Subject: [PATCH 10/32] add DLL injection examples for Julia and D
DLL injection samples using direct syscalls via SysCaller for Julia and D.
---
Bindings/Examples/D/InjectDLL.d | 182 ++++++++++++++++++
Bindings/Examples/D/README.md | 20 ++
.../Examples/D/REPLACE_WITH_SysCaller.dll.txt | 0
Bindings/Examples/Julia/InjectDLL.jl | 151 +++++++++++++++
Bindings/Examples/Julia/README.md | 19 ++
.../Julia/REPLACE_WITH_SysCaller.dll.txt | 0
6 files changed, 372 insertions(+)
create mode 100644 Bindings/Examples/D/InjectDLL.d
create mode 100644 Bindings/Examples/D/README.md
create mode 100644 Bindings/Examples/D/REPLACE_WITH_SysCaller.dll.txt
create mode 100644 Bindings/Examples/Julia/InjectDLL.jl
create mode 100644 Bindings/Examples/Julia/README.md
create mode 100644 Bindings/Examples/Julia/REPLACE_WITH_SysCaller.dll.txt
diff --git a/Bindings/Examples/D/InjectDLL.d b/Bindings/Examples/D/InjectDLL.d
new file mode 100644
index 0000000..d3e7875
--- /dev/null
+++ b/Bindings/Examples/D/InjectDLL.d
@@ -0,0 +1,182 @@
+import core.sys.windows.windows;
+import core.stdc.stdint;
+import core.stdc.stdlib;
+import core.stdc.string;
+import std.stdio;
+import std.string;
+import std.conv;
+
+alias NTSTATUS = uint;
+
+extern(Windows) alias PFN_SysAllocateVirtualMemoryEx = NTSTATUS function(
+ HANDLE /*ProcessHandle*/,
+ void** /*BaseAddress*/,
+ size_t* /*RegionSize*/,
+ uint /*AllocationType*/,
+ uint /*Protect*/,
+ void* /*ExtendedParameters*/,
+ uint /*ExtendedCount*/
+);
+
+extern(Windows) alias PFN_SysWriteVirtualMemory = NTSTATUS function(
+ HANDLE /*ProcessHandle*/,
+ void* /*BaseAddress*/,
+ void* /*Buffer*/,
+ size_t /*BufferSize*/,
+ size_t* /*NumberOfBytesWritten*/
+);
+
+extern(Windows) alias PFN_SysCreateThreadEx = NTSTATUS function(
+ HANDLE* /*ThreadHandle*/,
+ uint /*DesiredAccess*/,
+ void* /*ObjectAttributes*/,
+ HANDLE /*ProcessHandle*/,
+ void* /*StartRoutine*/,
+ void* /*Argument*/,
+ uint /*CreateFlags*/,
+ size_t /*ZeroBits*/,
+ size_t /*StackSize*/,
+ size_t /*MaximumStackSize*/,
+ void* /*AttributeList*/
+);
+
+extern(Windows) alias PFN_SysClose = NTSTATUS function(HANDLE);
+
+enum MEM_COMMIT = 0x1000;
+enum MEM_RESERVE = 0x2000;
+enum PAGE_EXECUTE_READWRITE = 0x40;
+enum THREAD_ALL_ACCESS = 0x1FFFFF;
+enum PROCESS_ALL_ACCESS = 0x1F0FFF;
+
+bool NT_SUCCESS(NTSTATUS status) { return cast(int)status >= 0; }
+
+void appendLE64(ref ubyte[] arr, size_t value)
+{
+ foreach (i; 0 .. 8)
+ arr ~= cast(ubyte)((value >> (8*i)) & 0xFF);
+}
+
+int main(string[] args)
+{
+ if (args.length != 3)
+ {
+ writeln("Usage: InjectDLL ");
+ return 1;
+ }
+
+ uint pid = to!uint(args[1]);
+ string dllPath = args[2];
+
+ HMODULE hSysCaller = LoadLibraryA("SysCaller.dll");
+ if (hSysCaller is null)
+ {
+ writeln("[!] Failed to load SysCaller.dll");
+ return 1;
+ }
+ auto SysAllocateVirtualMemoryEx = cast(PFN_SysAllocateVirtualMemoryEx) GetProcAddress(hSysCaller, "SysAllocateVirtualMemoryEx");
+ auto SysWriteVirtualMemory = cast(PFN_SysWriteVirtualMemory) GetProcAddress(hSysCaller, "SysWriteVirtualMemory");
+ auto SysCreateThreadEx = cast(PFN_SysCreateThreadEx) GetProcAddress(hSysCaller, "SysCreateThreadEx");
+ auto SysClose = cast(PFN_SysClose) GetProcAddress(hSysCaller, "SysClose");
+ if (SysAllocateVirtualMemoryEx is null || SysWriteVirtualMemory is null || SysCreateThreadEx is null || SysClose is null)
+ {
+ writeln("[!] Failed to resolve SysCaller exports");
+ return 1;
+ }
+
+ HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
+ if (hProcess is null)
+ {
+ writefln("[!] Failed to open process %s", pid);
+ return 1;
+ }
+
+ char[260] pathBuf;
+ DWORD n = GetFullPathNameA(toStringz(dllPath), pathBuf.length, pathBuf.ptr, null);
+ string absPath = (n > 0 && n < pathBuf.length) ? pathBuf[0 .. n].idup : dllPath;
+ auto pathBytes = (absPath ~ '\0').dup;
+
+ void* baseAddress = null;
+ size_t regionSize = pathBytes.length;
+ NTSTATUS status = SysAllocateVirtualMemoryEx(hProcess, &baseAddress, ®ionSize, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE, null, 0);
+ if (!NT_SUCCESS(status))
+ {
+ writefln("[!] Failed to allocate memory for DLL path. Status: 0x%08X", status);
+ CloseHandle(hProcess);
+ return 1;
+ }
+ writefln("[+] Allocated DLL path memory at: 0x%016X", cast(size_t)baseAddress);
+
+ size_t bytesWritten = 0;
+ status = SysWriteVirtualMemory(hProcess, baseAddress, pathBytes.ptr, pathBytes.length, &bytesWritten);
+ if (!NT_SUCCESS(status) || bytesWritten != pathBytes.length)
+ {
+ writefln("[!] Failed to write DLL path. Status: 0x%08X, Bytes written: %s", status, bytesWritten);
+ CloseHandle(hProcess);
+ return 1;
+ }
+ writeln("[+] Successfully wrote DLL path to memory");
+
+ HMODULE hKernel32 = GetModuleHandleA("kernel32.dll");
+ if (hKernel32 is null)
+ {
+ writeln("[!] Failed to get kernel32.dll handle");
+ CloseHandle(hProcess);
+ return 1;
+ }
+ auto pLoadLibraryA = GetProcAddress(hKernel32, "LoadLibraryA");
+ if (pLoadLibraryA is null)
+ {
+ writeln("[!] Failed to get LoadLibraryA address");
+ CloseHandle(hProcess);
+ return 1;
+ }
+ writefln("[+] LoadLibraryA address: 0x%016X", cast(size_t)pLoadLibraryA);
+
+ ubyte[] sc;
+ sc ~= [cast(ubyte)0x48, 0x83, 0xEC, 0x28];
+ sc ~= [cast(ubyte)0x48, 0xB9];
+ appendLE64(sc, cast(size_t)baseAddress);
+ sc ~= [cast(ubyte)0x48, 0xB8];
+ appendLE64(sc, cast(size_t)pLoadLibraryA);
+ sc ~= [cast(ubyte)0xFF, 0xD0];
+ sc ~= [cast(ubyte)0x48, 0x83, 0xC4, 0x28];
+ sc ~= [cast(ubyte)0xC3];
+
+ void* scAddress = null;
+ regionSize = sc.length;
+ status = SysAllocateVirtualMemoryEx(hProcess, &scAddress, ®ionSize, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE, null, 0);
+ if (!NT_SUCCESS(status))
+ {
+ writefln("[!] Failed to allocate shellcode. Status: 0x%08X", status);
+ CloseHandle(hProcess);
+ return 1;
+ }
+ writefln("[+] Allocated shellcode memory at: 0x%016X", cast(size_t)scAddress);
+
+ bytesWritten = 0;
+ status = SysWriteVirtualMemory(hProcess, scAddress, sc.ptr, sc.length, &bytesWritten);
+ if (!NT_SUCCESS(status) || bytesWritten != sc.length)
+ {
+ writefln("[!] Failed to write shellcode. Status: 0x%08X, Bytes written: %s", status, bytesWritten);
+ CloseHandle(hProcess);
+ return 1;
+ }
+ writeln("[+] Successfully wrote shellcode");
+
+ HANDLE hThread = null;
+ status = SysCreateThreadEx(&hThread, THREAD_ALL_ACCESS, null, hProcess, scAddress, null, 0, 0, 0, 0, null);
+ if (!NT_SUCCESS(status) || hThread is null)
+ {
+ writefln("[!] Failed to create remote thread. Status: 0x%08X, Handle: %p", status, hThread);
+ CloseHandle(hProcess);
+ return 1;
+ }
+ writefln("[+] Created remote thread: 0x%016X", cast(size_t)hThread);
+
+ WaitForSingleObject(hThread, 5000);
+ SysClose(hThread);
+
+ CloseHandle(hProcess);
+ writefln("[+] Successfully injected %s!", dllPath);
+ return 0;
+}
\ No newline at end of file
diff --git a/Bindings/Examples/D/README.md b/Bindings/Examples/D/README.md
new file mode 100644
index 0000000..334900e
--- /dev/null
+++ b/Bindings/Examples/D/README.md
@@ -0,0 +1,20 @@
+# DLL Injection via Direct Syscalls w/ SysCaller (D)
+
+## Requirements
+
+- D compiler (DMD)
+- `SysCaller.dll` in this folder (or on PATH)
+
+## Usage
+
+From this folder:
+```
+dmd InjectDLL.d
+InjectDLL
+```
+
+## Notes
+
+- Resolves the DLL absolute path via `GetFullPathNameA` to avoid remote LoadLibrary path issues.
+- Uses the same allocation/write/thread creation flow as other samples.
+- Shellcode is built in D and embeds 64-bit addresses for the path buffer and `LoadLibraryA`.
diff --git a/Bindings/Examples/D/REPLACE_WITH_SysCaller.dll.txt b/Bindings/Examples/D/REPLACE_WITH_SysCaller.dll.txt
new file mode 100644
index 0000000..e69de29
diff --git a/Bindings/Examples/Julia/InjectDLL.jl b/Bindings/Examples/Julia/InjectDLL.jl
new file mode 100644
index 0000000..9162c3c
--- /dev/null
+++ b/Bindings/Examples/Julia/InjectDLL.jl
@@ -0,0 +1,151 @@
+using Printf
+
+const KERNEL32 = "kernel32"
+const SYSCALLER = "SysCaller"
+
+const MEM_COMMIT = 0x1000
+const MEM_RESERVE = 0x2000
+const PAGE_EXECUTE_READWRITE = 0x40
+const THREAD_ALL_ACCESS = 0x1FFFFF
+const PROCESS_ALL_ACCESS = 0x1F0FFF
+
+nt_success(status::Int32) = status >= 0
+
+function get_full_path(path::AbstractString)
+ buf = Vector{UInt8}(undef, 260)
+ n = ccall((:GetFullPathNameA, KERNEL32), UInt32,
+ (Cstring, UInt32, Ptr{UInt8}, Ptr{Ptr{UInt8}}),
+ path, UInt32(length(buf)), buf, C_NULL)
+ if n > 0 && n < length(buf)
+ return unsafe_string(pointer(buf), n)
+ else
+ return path
+ end
+end
+
+function open_process(pid::UInt32)
+ h = ccall((:OpenProcess, KERNEL32), Ptr{Cvoid},
+ (UInt32, Cint, UInt32), PROCESS_ALL_ACCESS, 0, pid)
+ return h
+end
+
+function close_handle(h::Ptr{Cvoid})
+ ccall((:CloseHandle, KERNEL32), Cint, (Ptr{Cvoid},), h)
+end
+
+function get_loadlibraryA()
+ k32 = ccall((:GetModuleHandleA, KERNEL32), Ptr{Cvoid}, (Cstring,), "kernel32.dll")
+ k32 == C_NULL && error("Failed to get kernel32.dll handle")
+ p = ccall((:GetProcAddress, KERNEL32), Ptr{Cvoid}, (Ptr{Cvoid}, Cstring), k32, "LoadLibraryA")
+ p == C_NULL && error("Failed to get LoadLibraryA address")
+ return p
+end
+
+function injectdll(hproc::Ptr{Cvoid}, dllpath::AbstractString)
+ abs = get_full_path(dllpath)
+ path_bytes = Vector{UInt8}(codeunits(abs))
+ push!(path_bytes, 0x00)
+
+ base_ref = Ref{Ptr{Cvoid}}(C_NULL)
+ region = Ref{Csize_t}(Csize_t(length(path_bytes)))
+ status = ccall((:SysAllocateVirtualMemoryEx, SYSCALLER), Int32,
+ (Ptr{Cvoid}, Ptr{Ptr{Cvoid}}, Ptr{Csize_t}, UInt32, UInt32, Ptr{Cvoid}, UInt32),
+ hproc, base_ref, region, MEM_COMMIT|MEM_RESERVE, PAGE_EXECUTE_READWRITE, C_NULL, 0)
+ if !nt_success(status)
+ @printf("[!] Failed to allocate memory for DLL path. Status: 0x%08X\n", UInt32(status))
+ return false
+ end
+ base = base_ref[]
+ @printf("[+] Allocated DLL path memory at: %p\n", base)
+
+ written = Ref{Csize_t}(0)
+ GC.@preserve path_bytes begin
+ status = ccall((:SysWriteVirtualMemory, SYSCALLER), Int32,
+ (Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}),
+ hproc, base, pointer(path_bytes), Csize_t(length(path_bytes)), written)
+ end
+ if !nt_success(status) || written[] != Csize_t(length(path_bytes))
+ @printf("[!] Failed to write DLL path. Status: 0x%08X, Bytes written: %d\n", UInt32(status), UInt64(written[]))
+ return false
+ end
+ println("[+] Successfully wrote DLL path to memory")
+
+ loadlib = get_loadlibraryA()
+ @printf("[+] LoadLibraryA address: %p\n", loadlib)
+
+ sc = UInt8[]
+ append!(sc, [0x48, 0x83, 0xEC, 0x28])
+ append!(sc, [0x48, 0xB9])
+ addr_path = UInt64(UInt(base))
+ for b in 0:7 push!(sc, UInt8((addr_path >> (8*b)) & 0xFF)) end
+ append!(sc, [0x48, 0xB8])
+ addr_ll = UInt64(UInt(loadlib))
+ for b in 0:7 push!(sc, UInt8((addr_ll >> (8*b)) & 0xFF)) end
+ append!(sc, [0xFF, 0xD0])
+ append!(sc, [0x48, 0x83, 0xC4, 0x28])
+ push!(sc, 0xC3)
+
+ sc_base_ref = Ref{Ptr{Cvoid}}(C_NULL)
+ region = Ref{Csize_t}(Csize_t(length(sc)))
+ status = ccall((:SysAllocateVirtualMemoryEx, SYSCALLER), Int32,
+ (Ptr{Cvoid}, Ptr{Ptr{Cvoid}}, Ptr{Csize_t}, UInt32, UInt32, Ptr{Cvoid}, UInt32),
+ hproc, sc_base_ref, region, MEM_COMMIT|MEM_RESERVE, PAGE_EXECUTE_READWRITE, C_NULL, 0)
+ if !nt_success(status)
+ @printf("[!] Failed to allocate shellcode. Status: 0x%08X\n", UInt32(status))
+ return false
+ end
+ sc_base = sc_base_ref[]
+ @printf("[+] Allocated shellcode memory at: %p\n", sc_base)
+
+ written[] = 0
+ GC.@preserve sc begin
+ status = ccall((:SysWriteVirtualMemory, SYSCALLER), Int32,
+ (Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}),
+ hproc, sc_base, pointer(sc), Csize_t(length(sc)), written)
+ end
+ if !nt_success(status) || written[] != Csize_t(length(sc))
+ @printf("[!] Failed to write shellcode. Status: 0x%08X, Bytes written: %d\n", UInt32(status), UInt64(written[]))
+ return false
+ end
+ println("[+] Successfully wrote shellcode")
+
+ thread_ref = Ref{Ptr{Cvoid}}(C_NULL)
+ status = ccall((:SysCreateThreadEx, SYSCALLER), Int32,
+ (Ptr{Ptr{Cvoid}}, UInt32, Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}, UInt32,
+ Csize_t, Csize_t, Csize_t, Ptr{Cvoid}),
+ thread_ref, THREAD_ALL_ACCESS, C_NULL, hproc, sc_base, C_NULL, 0,
+ Csize_t(0), Csize_t(0), Csize_t(0), C_NULL)
+ thr = thread_ref[]
+ if !nt_success(status) || thr == C_NULL
+ @printf("[!] Failed to create remote thread. Status: 0x%08X, Handle: %p\n", UInt32(status), thr)
+ return false
+ end
+ @printf("[+] Created remote thread: %p\n", thr)
+
+ ccall((:WaitForSingleObject, KERNEL32), UInt32, (Ptr{Cvoid}, UInt32), thr, 5000)
+ ccall((:SysClose, SYSCALLER), Int32, (Ptr{Cvoid},), thr)
+
+ println("[+] Successfully injected $(dllpath)!")
+ return true
+end
+
+function main()
+ if length(ARGS) != 2
+ println("Usage: julia InjectDLL.jl ")
+ return
+ end
+ pid = parse(UInt32, ARGS[1])
+ dll = ARGS[2]
+ hproc = open_process(pid)
+ if hproc == C_NULL
+ println("[!] Failed to open process ", pid)
+ return
+ end
+ try
+ injectdll(hproc, dll)
+ finally
+ close_handle(hproc)
+ end
+end
+
+main()
\ No newline at end of file
diff --git a/Bindings/Examples/Julia/README.md b/Bindings/Examples/Julia/README.md
new file mode 100644
index 0000000..abacd8b
--- /dev/null
+++ b/Bindings/Examples/Julia/README.md
@@ -0,0 +1,19 @@
+# DLL Injection via Direct Syscalls w/ SysCaller (Julia)
+
+## Requirements
+
+- Julia 1.12+
+- `SysCaller.dll` in this folder (or on PATH)
+
+## Usage
+
+From this folder:
+```
+julia InjectDLL.jl
+```
+
+## Notes
+
+- Resolves the DLL absolute path via `GetFullPathNameA` to avoid remote LoadLibrary path issues.
+- Uses the same allocation/write/thread creation flow as other samples.
+- Shellcode is generated in Julia and embeds 64-bit addresses for the path buffer and `LoadLibraryA`.
diff --git a/Bindings/Examples/Julia/REPLACE_WITH_SysCaller.dll.txt b/Bindings/Examples/Julia/REPLACE_WITH_SysCaller.dll.txt
new file mode 100644
index 0000000..e69de29
From 2a530763883313b6356c06ece71594e7e57d215e Mon Sep 17 00:00:00 2001
From: WindowsAPI
Date: Mon, 20 Oct 2025 16:04:59 -0700
Subject: [PATCH 11/32] add WIN32_LEAN_AND_MEAN and NOMINMAX to includes
This improves compilation times and avoids issues with min/max macros.
---
SysCaller/Wrapper/include/Resolver/PebUtils.h | 8 +++++++-
SysCaller/Wrapper/include/Resolver/Resolver.h | 8 +++++++-
SysCaller/Wrapper/include/Resolver/ResolverBase.h | 10 ++++++++--
3 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/SysCaller/Wrapper/include/Resolver/PebUtils.h b/SysCaller/Wrapper/include/Resolver/PebUtils.h
index a1b0748..00d0e5d 100644
--- a/SysCaller/Wrapper/include/Resolver/PebUtils.h
+++ b/SysCaller/Wrapper/include/Resolver/PebUtils.h
@@ -1,6 +1,12 @@
#pragma once
-#include
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#ifndef NOMINMAX
+#define NOMINMAX
+#endif
+#include
#include
#include
diff --git a/SysCaller/Wrapper/include/Resolver/Resolver.h b/SysCaller/Wrapper/include/Resolver/Resolver.h
index 8f29f6f..a59e396 100644
--- a/SysCaller/Wrapper/include/Resolver/Resolver.h
+++ b/SysCaller/Wrapper/include/Resolver/Resolver.h
@@ -1,6 +1,12 @@
#pragma once
-#include
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#ifndef NOMINMAX
+#define NOMINMAX
+#endif
+#include
#include
#ifdef __cplusplus
diff --git a/SysCaller/Wrapper/include/Resolver/ResolverBase.h b/SysCaller/Wrapper/include/Resolver/ResolverBase.h
index 7dcb47b..57880ef 100644
--- a/SysCaller/Wrapper/include/Resolver/ResolverBase.h
+++ b/SysCaller/Wrapper/include/Resolver/ResolverBase.h
@@ -1,6 +1,12 @@
#pragma once
-#include
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#ifndef NOMINMAX
+#define NOMINMAX
+#endif
+#include
#include
#include
#include
@@ -34,4 +40,4 @@ void CleanupResolver();
/* internal functions for resolver methods */
HMODULE GetNtdllHandleInternal();
std::unordered_map ExtractSyscallsFromDllInternal();
-DWORD ExtractSyscallNumber(LPVOID functionAddress);
+DWORD ExtractSyscallNumber(LPVOID functionAddress);
\ No newline at end of file
From d2043b2fcbf6496603401df26ae37757882c6d62 Mon Sep 17 00:00:00 2001
From: WindowsAPI
Date: Tue, 11 Nov 2025 22:13:25 -0800
Subject: [PATCH 12/32] refactor Bind structure & build config for v1.3.2
Removed Win32 platform support and solution/filter files from Bind. Updated Bind.vcxproj to use explicit x64 Qt/Vcpkg paths, set new output directories, and simplified build settings. Changed GitHub Actions workflow to match new build output locations. Migrated resource and artifact paths, and added missing headers for improved modularity.
---
.github/workflows/build.yml | 26 +-
Bind/Bind.sln | 31 -
Bind/Bind.vcxproj | 199 +-
Bind/Bind.vcxproj.filters | 396 -
.../Integrity/Compatibility/Compatibility.h | 14 +-
Bind/include/Core/Integrity/Integrity.h | 5 +
.../Core/Integrity/Validator/Validator.h | 16 +-
.../Integrity/Verification/Verification.h | 22 +-
.../Direct/ControlFlow/DirectControlFlow.h | 8 +-
Bind/include/Core/Obfuscation/Direct/Direct.h | 7 +
.../Direct/Encryption/DirectEncryptor.h | 8 +-
.../Direct/Mapping/DirectStubMapper.h | 12 +-
.../Direct/Stub/DirectJunkGenerator.h | 2 +-
.../Direct/Stub/DirectStubGenerator.h | 6 +-
.../ControlFlow/IndirectControlFlow.h | 6 +-
.../Indirect/Encryption/IndirectEncryptor.h | 2 +-
.../Core/Obfuscation/Indirect/Indirect.h | 6 +
.../Indirect/Stub/IndirectJunkGenerator.h | 2 +-
.../Indirect/Stub/IndirectStubGenerator.h | 4 +-
.../Core/Obfuscation/IndirectObfuscation.h | 6 +-
Bind/include/Core/Obfuscation/Obfuscation.h | 10 +-
Bind/include/Core/Obfuscation/Shared/Shared.h | 3 +
.../Obfuscation/Shared/Stub/NameGenerator.h | 2 +-
Bind/include/Core/Utils/Common.h | 8 +
Bind/include/Core/Utils/Constants.h | 32 +
Bind/include/Core/Utils/Dependencies.h | 9 +
Bind/include/Core/Utils/PathUtils.h | 4 +-
Bind/include/Core/Utils/QtDependencies.h | 69 +
Bind/include/Core/Utils/Utils.h | 7 +-
Bind/include/Core/Utils/Version.h | 11 +
Bind/include/GUI/Bars.h | 6 +
Bind/include/GUI/Bars/SettingsTitleBar.h | 3 +-
Bind/include/GUI/Bars/StatusBar.h | 1 +
Bind/include/GUI/Bars/TitleBar.h | 1 +
Bind/include/GUI/Buttons.h | 3 +
Bind/include/GUI/Dialogs.h | 8 +
Bind/include/GUI/Dialogs/ChangelogDialog.h | 2 +-
Bind/include/GUI/Dialogs/ConfirmationDialog.h | 6 +-
Bind/include/GUI/Dialogs/HashCompareDialog.h | 4 +-
.../GUI/Dialogs/ObfuscationSelectionDialog.h | 3 +-
Bind/include/GUI/Dialogs/SettingsDialog.h | 10 +-
Bind/include/GUI/Dialogs/StubMapperDialog.h | 28 +-
Bind/include/GUI/MainWindow.h | 30 +
Bind/include/GUI/Panels.h | 5 +
Bind/include/GUI/Panels/LeftPanel.h | 6 +-
Bind/include/GUI/Panels/OutputPanel.h | 3 +-
Bind/include/GUI/Panels/RightPanel.h | 3 +-
Bind/include/GUI/Settings.h | 8 +
Bind/include/GUI/Settings/Tabs/GeneralTab.h | 16 +-
.../Settings/Tabs/IndirectObfuscationTab.h | 9 +-
.../GUI/Settings/Tabs/InlineObfuscationTab.h | 4 +-
Bind/include/GUI/Settings/Tabs/IntegrityTab.h | 12 +-
.../GUI/Settings/Tabs/ObfuscationTab.h | 12 +-
Bind/include/GUI/Settings/Tabs/ProfileTab.h | 10 +-
Bind/include/GUI/Themes.h | 3 +
Bind/include/GUI/Themes/Colors.h | 3 +-
Bind/include/GUI/Threads.h | 6 +
.../include/GUI/Threads/CompatibilityThread.h | 7 +-
Bind/include/GUI/Threads/ObfuscationThread.h | 6 +-
Bind/include/GUI/Threads/ValidatorThread.h | 7 +-
Bind/include/GUI/Threads/VerificationThread.h | 8 +-
Bind/main.cpp | 39 -
Bind/resources.qrc | 20 -
.../Integrity/Compatibility/Compatibility.cpp | 21 +-
.../Core/Integrity/Validator/Validator.cpp | 22 +-
.../Integrity/Verification/Verification.cpp | 115 +-
.../Direct/ControlFlow/DirectControlFlow.cpp | 7 +-
.../Direct/Encryption/DirectEncryptor.cpp | 7 +-
.../Direct/Mapping/DirectStubMapper.cpp | 27 +-
.../Direct/Stub/DirectJunkGenerator.cpp | 8 +-
.../Direct/Stub/DirectStubGenerator.cpp | 11 +-
.../ControlFlow/IndirectControlFlow.cpp | 9 +-
.../Indirect/Encryption/IndirectEncryptor.cpp | 6 +-
.../Indirect/Stub/IndirectJunkGenerator.cpp | 8 +-
.../Indirect/Stub/IndirectStubGenerator.cpp | 8 +-
.../Core/Obfuscation/IndirectObfuscation.cpp | 49 +-
Bind/src/Core/Obfuscation/Obfuscation.cpp | 31 +-
.../Obfuscation/Shared/Stub/NameGenerator.cpp | 8 +-
Bind/src/Core/Utils/PathUtils.cpp | 66 +-
Bind/src/Core/Utils/Utils.cpp | 24 +-
Bind/src/GUI/Bars/ProgressBar.cpp | 2 +-
Bind/src/GUI/Bars/SettingsTitleBar.cpp | 10 +-
Bind/src/GUI/Bars/StatusBar.cpp | 30 +-
Bind/src/GUI/Bars/TitleBar.cpp | 10 +-
Bind/src/GUI/Buttons/BindButton.cpp | 13 +-
Bind/src/GUI/Dialogs/ChangelogDialog.cpp | 199 +-
Bind/src/GUI/Dialogs/ConfirmationDialog.cpp | 35 +-
Bind/src/GUI/Dialogs/HashCompareDialog.cpp | 61 +-
.../Dialogs/ObfuscationSelectionDialog.cpp | 54 +-
Bind/src/GUI/Dialogs/SettingsDialog.cpp | 61 +-
Bind/src/GUI/Dialogs/StubMapperDialog.cpp | 41 +-
Bind/src/GUI/MainWindow.cpp | 203 +-
Bind/src/GUI/Panels/LeftPanel.cpp | 94 +-
Bind/src/GUI/Panels/OutputPanel.cpp | 4 +-
Bind/src/GUI/Panels/RightPanel.cpp | 8 +-
Bind/src/GUI/Settings/Tabs/GeneralTab.cpp | 163 +-
.../Settings/Tabs/IndirectObfuscationTab.cpp | 9 +-
.../Settings/Tabs/InlineObfuscationTab.cpp | 7 +-
Bind/src/GUI/Settings/Tabs/IntegrityTab.cpp | 10 +-
Bind/src/GUI/Settings/Tabs/ObfuscationTab.cpp | 7 +-
Bind/src/GUI/Settings/Tabs/ProfileTab.cpp | 68 +-
Bind/src/GUI/Stylesheets/ChangelogDialog.qss | 142 +-
.../GUI/Stylesheets/ConfirmationDialog.qss | 59 +-
.../src/GUI/Stylesheets/HashCompareDialog.qss | 2 +-
.../ObfuscationSelectionDialog.qss | 49 +-
Bind/src/GUI/Stylesheets/SettingsDialog.qss | 27 +-
Bind/src/GUI/Stylesheets/StubMapperDialog.qss | 2 +-
Bind/src/GUI/Threads/CompatibilityThread.cpp | 7 +-
Bind/src/GUI/Threads/ObfuscationThread.cpp | 11 +-
Bind/src/GUI/Threads/ValidatorThread.cpp | 7 +-
Bind/src/GUI/Threads/VerificationThread.cpp | 6 +-
Bind/src/Res/Icons/green.png | Bin 0 -> 777 bytes
Bind/src/Res/Icons/hourglass.png | Bin 0 -> 716 bytes
Bind/src/Res/Icons/record.png | Bin 0 -> 529 bytes
Bind/src/Res/Icons/red.png | Bin 0 -> 728 bytes
Bind/src/Res/Icons/xmark.png | Bin 0 -> 544 bytes
Bind/{ => src/Res}/app.rc | 4 +-
Bind/{ => src/Res}/resource.h | 12 +-
Bind/src/Res/resources.qrc | 24 +
Bindings/Examples/C/InjectDLL.c | 2 +-
Bindings/Examples/C/InjectDLLObf.c | 2 +-
Bindings/Examples/C/README.md | 2 +-
Bindings/Examples/CSharp/Program.cs | 2 +-
Bindings/Examples/CSharp/ProgramObf.cs | 2 +-
Bindings/Examples/GO/README.md | 2 +-
Bindings/Examples/Nim/InjectDLL.nim | 2 +-
Bindings/Examples/Nim/InjectDLLObf.nim | 2 +-
Bindings/Examples/Python/InjectDLL.py | 2 +-
Bindings/Examples/Python/InjectDLLObf.py | 2 +-
Bindings/Examples/Python/README.md | 2 +-
Bindings/Examples/Rust/README.md | 2 +-
Bindings/Examples/Rust/cargo.toml | 2 +-
Default/{sysFunctions_k.h => SysFunctionsK.h} | 8 +-
Default/sysFunctions.h | 6 +-
Default/syscaller.asm | 2 +-
History/CHANGELOG_1.0.0.md | 2 -
History/CHANGELOG_1.1.0.md | 2 -
History/CHANGELOG_1.2.0.md | 2 -
History/CHANGELOG_1.3.0.md | 2 -
History/CHANGELOG_1.3.1.md | 4 +-
History/CHANGELOG_1.3.2.md | 52 +
README.md | 55 +-
SysCaller.sln | 10 +
SysCaller/SysCaller.vcxproj | 34 +-
SysCaller/Wrapper/CMakeLists.txt | 83 +-
SysCaller/Wrapper/include/Sys/sysExternals.h | 4 +-
SysCaller/Wrapper/include/Sys/sysFunctions.h | 8 +-
SysCaller/Wrapper/include/Sys/sysTypes.h | 6 +-
.../{syscaller_config.h => SysCallerConfig.h} | 6 +-
SysCaller/Wrapper/include/syscaller.h | 10 +-
.../src/{build_info.cpp => BuildInfo.cpp} | 2 +-
SysCaller/Wrapper/src/DLL/dllmain.cpp | 2 +-
.../Wrapper/src/Resolver/ResolverBase.cpp | 1 -
SysCallerK/SysCallerK.vcxproj | 24 +-
.../include/{syscaller_k.h => SysCallerK.h} | 44 +-
.../{sysConstants_k.h => SysKConstants.h} | 167 +-
.../{sysExternals_k.h => SysKExternals.h} | 2052 ++---
.../{sysFunctions_k.h => SysKFunctions.h} | 6942 ++++++++---------
.../SysK/{sysTypes_k.h => SysKTypes.h} | 2160 ++---
SysCallerK/Wrapper/src/dummy.c | 2 +-
160 files changed, 7547 insertions(+), 7264 deletions(-)
delete mode 100644 Bind/Bind.sln
delete mode 100644 Bind/Bind.vcxproj.filters
create mode 100644 Bind/include/Core/Integrity/Integrity.h
create mode 100644 Bind/include/Core/Obfuscation/Direct/Direct.h
create mode 100644 Bind/include/Core/Obfuscation/Indirect/Indirect.h
create mode 100644 Bind/include/Core/Obfuscation/Shared/Shared.h
create mode 100644 Bind/include/Core/Utils/Common.h
create mode 100644 Bind/include/Core/Utils/Constants.h
create mode 100644 Bind/include/Core/Utils/Dependencies.h
create mode 100644 Bind/include/Core/Utils/QtDependencies.h
create mode 100644 Bind/include/Core/Utils/Version.h
create mode 100644 Bind/include/GUI/Bars.h
create mode 100644 Bind/include/GUI/Buttons.h
create mode 100644 Bind/include/GUI/Dialogs.h
create mode 100644 Bind/include/GUI/Panels.h
create mode 100644 Bind/include/GUI/Settings.h
create mode 100644 Bind/include/GUI/Themes.h
create mode 100644 Bind/include/GUI/Threads.h
delete mode 100644 Bind/main.cpp
delete mode 100644 Bind/resources.qrc
create mode 100644 Bind/src/Res/Icons/green.png
create mode 100644 Bind/src/Res/Icons/hourglass.png
create mode 100644 Bind/src/Res/Icons/record.png
create mode 100644 Bind/src/Res/Icons/red.png
create mode 100644 Bind/src/Res/Icons/xmark.png
rename Bind/{ => src/Res}/app.rc (97%)
rename Bind/{ => src/Res}/resource.h (93%)
create mode 100644 Bind/src/Res/resources.qrc
rename Default/{sysFunctions_k.h => SysFunctionsK.h} (99%)
create mode 100644 History/CHANGELOG_1.3.2.md
rename SysCaller/Wrapper/include/{syscaller_config.h => SysCallerConfig.h} (86%)
rename SysCaller/Wrapper/src/{build_info.cpp => BuildInfo.cpp} (97%)
rename SysCallerK/Wrapper/include/{syscaller_k.h => SysCallerK.h} (79%)
rename SysCallerK/Wrapper/include/SysK/{sysConstants_k.h => SysKConstants.h} (98%)
rename SysCallerK/Wrapper/include/SysK/{sysExternals_k.h => SysKExternals.h} (98%)
rename SysCallerK/Wrapper/include/SysK/{sysFunctions_k.h => SysKFunctions.h} (95%)
rename SysCallerK/Wrapper/include/SysK/{sysTypes_k.h => SysKTypes.h} (96%)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 984cdac..c44fd90 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -270,7 +270,7 @@ jobs:
- name: Copy Vcpkg Dependencies (Debug)
run: |
Write-Host "Copying Vcpkg Dependencies for Debug Build..."
- $outputDir = "x64/Debug"
+ $outputDir = "Build/Bind/Debug"
$vcpkgBin = "${{ github.workspace }}/vcpkg/installed/x64-windows/bin"
# Copy Vcpkg Dependencies (Qt dependencies will be handled by windeployqt)
@@ -298,10 +298,10 @@ jobs:
Get-ChildItem "GeneratedFiles" -Name | Where-Object { $_ -like "*qrc*" } | ForEach-Object { Write-Host "Found RCC file: $_" }
}
- & $windeployqt "x64/Debug/Bind.exe" --debug --no-compiler-runtime --no-opengl-sw --force
+ & $windeployqt "Build/Bind/Debug/Bind.exe" --debug --no-compiler-runtime --no-opengl-sw --force
if ($LASTEXITCODE -eq 0) {
Write-Host "Qt deployment completed successfully for Debug build"
- Get-ChildItem "x64/Debug" -Name | Sort-Object
+ Get-ChildItem "Build/Bind/Debug" -Name | Sort-Object
} else {
Write-Host "windeployqt failed with exit code: $LASTEXITCODE"
}
@@ -322,7 +322,7 @@ jobs:
- name: Copy Vcpkg Dependencies (Release)
run: |
Write-Host "Copying Vcpkg Dependencies for Release Build..."
- $outputDir = "x64/Release"
+ $outputDir = "Build/Bind/Release"
$vcpkgBin = "${{ github.workspace }}/vcpkg/installed/x64-windows/bin"
# Copy Vcpkg Dependencies (Qt dependencies will be handled by windeployqt)
@@ -345,10 +345,10 @@ jobs:
if (Test-Path $windeployqt) {
Write-Host "Running windeployqt on Release executable..."
- & $windeployqt "x64/Release/Bind.exe" --release --no-compiler-runtime --no-opengl-sw --force
+ & $windeployqt "Build/Bind/Release/Bind.exe" --release --no-compiler-runtime --no-opengl-sw --force
if ($LASTEXITCODE -eq 0) {
Write-Host "Qt deployment completed successfully for Release build"
- Get-ChildItem "x64/Release" -Name | Sort-Object
+ Get-ChildItem "Build/Bind/Release" -Name | Sort-Object
} else {
Write-Host "windeployqt failed with exit code: $LASTEXITCODE"
}
@@ -358,18 +358,18 @@ jobs:
- name: Verify Executables Exist
run: |
- if (Test-Path "x64/Release/Bind.exe") {
+ if (Test-Path "Build/Bind/Release/Bind.exe") {
Write-Host "Bind.exe (Release) Built Successfully!"
- Get-Item "x64/Release/Bind.exe" | Select-Object Name, Length, LastWriteTime
+ Get-Item "Build/Bind/Release/Bind.exe" | Select-Object Name, Length, LastWriteTime
} else {
Write-Host "Bind.exe (Release) not found!"
Get-ChildItem -Recurse -Name "*.exe" | ForEach-Object { Write-Host "Found: $_" }
exit 1
}
- if (Test-Path "x64/Debug/Bind.exe") {
+ if (Test-Path "Build/Bind/Debug/Bind.exe") {
Write-Host "Bind.exe (Debug) Built Successfully!"
- Get-Item "x64/Debug/Bind.exe" | Select-Object Name, Length, LastWriteTime
+ Get-Item "Build/Bind/Debug/Bind.exe" | Select-Object Name, Length, LastWriteTime
} else {
Write-Host "Bind.exe (Debug) not found!"
}
@@ -383,14 +383,14 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Bind-Release
- path: Bind/x64/Release/
+ path: Bind/Build/Bind/Release/
retention-days: 30
- name: Upload Build Artifacts (Debug)
uses: actions/upload-artifact@v4
with:
name: Bind-Debug
- path: Bind/x64/Debug/
+ path: Bind/Build/Bind/Debug/
retention-days: 30
- name: Create Release Package
@@ -401,7 +401,7 @@ jobs:
New-Item -ItemType Directory -Path "release-package" -Force
- Copy-Item "x64/Release/*" "release-package\" -Recurse
+ Copy-Item "Build/Bind/Release/*" "release-package\" -Recurse
# Create README
$version = "v1.3.2"
diff --git a/Bind/Bind.sln b/Bind/Bind.sln
deleted file mode 100644
index b5f2aa1..0000000
--- a/Bind/Bind.sln
+++ /dev/null
@@ -1,31 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.14.36202.13 d17.14
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Bind", "Bind.vcxproj", "{CB747D1D-F2CC-431A-B521-5F818525B584}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {CB747D1D-F2CC-431A-B521-5F818525B584}.Debug|x64.ActiveCfg = Debug|x64
- {CB747D1D-F2CC-431A-B521-5F818525B584}.Debug|x64.Build.0 = Debug|x64
- {CB747D1D-F2CC-431A-B521-5F818525B584}.Debug|x86.ActiveCfg = Debug|Win32
- {CB747D1D-F2CC-431A-B521-5F818525B584}.Debug|x86.Build.0 = Debug|Win32
- {CB747D1D-F2CC-431A-B521-5F818525B584}.Release|x64.ActiveCfg = Release|x64
- {CB747D1D-F2CC-431A-B521-5F818525B584}.Release|x64.Build.0 = Release|x64
- {CB747D1D-F2CC-431A-B521-5F818525B584}.Release|x86.ActiveCfg = Release|Win32
- {CB747D1D-F2CC-431A-B521-5F818525B584}.Release|x86.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {3F1738C2-4D41-43BE-BF82-34DE2903C01F}
- EndGlobalSection
-EndGlobal
diff --git a/Bind/Bind.vcxproj b/Bind/Bind.vcxproj
index 49319c2..40b2a24 100644
--- a/Bind/Bind.vcxproj
+++ b/Bind/Bind.vcxproj
@@ -1,14 +1,6 @@
-
- Debug
- Win32
-
-
- Release
- Win32
-
Debug
x64
@@ -29,19 +21,6 @@
Bind
-
- Application
- true
- v143
- Unicode
-
-
- Application
- false
- v143
- true
- Unicode
-
Application
true
@@ -57,18 +36,13 @@
-
- $(QTDIR)
-
-
- $(QTDIR)
-
- $(QTDIR)
+ C:\Qt\5.15.2\msvc2019_64
debug
- $(QTDIR)
+ C:\Qt\5.15.2\msvc2019_64
+ 5.15.2_msvc2019_64
@@ -77,14 +51,6 @@
-
-
-
-
-
-
-
-
@@ -94,40 +60,20 @@
+
+ $(SolutionDir)Build\Bind\$(Configuration)\
+ $(SolutionDir)Build\Bind\int\$(Configuration)\
+
+
+ $(SolutionDir)Build\Bind\$(Configuration)\
+ $(SolutionDir)Build\Bind\int\$(Configuration)\
+
false
false
-
-
- Level3
- true
- WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
- true
-
-
- Console
- true
-
-
-
-
- Level3
- true
- true
- true
- WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
- true
-
-
- Console
- true
-
-
Level3
@@ -135,14 +81,14 @@
_DEBUG;UNICODE;_UNICODE;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;QT_DLL;%(PreprocessorDefinitions)
true
stdcpp20
- GeneratedFiles\$(ConfigurationName);GeneratedFiles;$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;$(VcpkgRoot)\installed\x64-windows\include;$(ProjectDir);%(AdditionalIncludeDirectories)
+ GeneratedFiles\$(ConfigurationName);GeneratedFiles;C:\Qt\5.15.2\msvc2019_64\include;C:\Qt\5.15.2\msvc2019_64\include\QtCore;C:\Qt\5.15.2\msvc2019_64\include\QtGui;C:\Qt\5.15.2\msvc2019_64\include\QtWidgets;C:\Users\devil\vcpkg\installed\x64-windows\include;C:\Users\devil\source\repos\SysCaller\Bind\include;%(AdditionalIncludeDirectories)
true
Windows
true
- $(QTDIR)\lib;$(VcpkgRoot)\installed\x64-windows\lib;$(ProjectDir);%(AdditionalLibraryDirectories)
- qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;cmark.lib;pe-parse.lib;%(AdditionalDependencies)
+ C:\Qt\5.15.2\msvc2019_64\lib;C:\Users\devil\vcpkg\installed\x64-windows\lib;%(AdditionalLibraryDirectories)
+ Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;cmark.lib;pe-parse.lib;%(AdditionalDependencies)
@@ -154,33 +100,20 @@
NDEBUG;UNICODE;_UNICODE;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;QT_DLL;%(PreprocessorDefinitions)
true
stdcpp20
- GeneratedFiles\$(ConfigurationName);GeneratedFiles;$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;$(VcpkgRoot)\installed\x64-windows\include;$(ProjectDir);%(AdditionalIncludeDirectories)
+ GeneratedFiles\$(ConfigurationName);GeneratedFiles;C:\Qt\5.15.2\msvc2019_64\include;C:\Qt\5.15.2\msvc2019_64\include\QtCore;C:\Qt\5.15.2\msvc2019_64\include\QtGui;C:\Qt\5.15.2\msvc2019_64\include\QtWidgets;C:\Users\devil\vcpkg\installed\x64-windows\include;C:\Users\devil\source\repos\SysCaller\Bind\include;%(AdditionalIncludeDirectories)
true
Windows
true
- $(QTDIR)\lib;$(VcpkgRoot)\installed\x64-windows\lib;$(ProjectDir);%(AdditionalLibraryDirectories)
- qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;cmark.lib;pe-parse.lib;%(AdditionalDependencies)
+ C:\Qt\5.15.2\msvc2019_64\lib;C:\Users\devil\vcpkg\installed\x64-windows\lib;%(AdditionalLibraryDirectories)
+ Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;pe-parse.lib;cmark.lib;%(AdditionalDependencies)
-
-
-
-
-
- %(AdditionalDependencies)
-
+
+ "$(QTDIR)\bin\windeployqt.exe" "$(TargetPath)"
+
-
-
-
-
-
-
-
-
-
@@ -224,26 +157,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -264,42 +179,42 @@
GeneratedFiles\moc_%(Filename).cpp
%(AdditionalDependencies)
-
+
Document
$(QTDIR)\bin\moc.exe "%(FullPath)" -o "GeneratedFiles\moc_%(Filename).cpp"
GeneratedFiles\moc_%(Filename).cpp
%(AdditionalDependencies)
-
-
+
+
Document
$(QTDIR)\bin\moc.exe "%(FullPath)" -o "GeneratedFiles\moc_%(Filename).cpp"
GeneratedFiles\moc_%(Filename).cpp
%(AdditionalDependencies)
-
-
+
+
Document
$(QTDIR)\bin\moc.exe "%(FullPath)" -o "GeneratedFiles\moc_%(Filename).cpp"
GeneratedFiles\moc_%(Filename).cpp
%(AdditionalDependencies)
-
-
+
+
Document
$(QTDIR)\bin\moc.exe "%(FullPath)" -o "GeneratedFiles\moc_%(Filename).cpp"
GeneratedFiles\moc_%(Filename).cpp
%(AdditionalDependencies)
-
-
+
+
Document
$(QTDIR)\bin\moc.exe "%(FullPath)" -o "GeneratedFiles\moc_%(Filename).cpp"
GeneratedFiles\moc_%(Filename).cpp
%(AdditionalDependencies)
-
-
+
+
Document
$(QTDIR)\bin\moc.exe "%(FullPath)" -o "GeneratedFiles\moc_%(Filename).cpp"
GeneratedFiles\moc_%(Filename).cpp
%(AdditionalDependencies)
-
+
Document
$(QTDIR)\bin\moc.exe "%(FullPath)" -o "GeneratedFiles\moc_%(Filename).cpp"
@@ -336,24 +251,24 @@
GeneratedFiles\moc_%(Filename).cpp
%(AdditionalDependencies)
-
+
Document
$(QTDIR)\bin\moc.exe "%(FullPath)" -o "GeneratedFiles\moc_%(Filename).cpp"
GeneratedFiles\moc_%(Filename).cpp
%(AdditionalDependencies)
-
-
+
+
Document
$(QTDIR)\bin\moc.exe "%(FullPath)" -o "GeneratedFiles\moc_%(Filename).cpp"
GeneratedFiles\moc_%(Filename).cpp
%(AdditionalDependencies)
-
-
+
+
Document
$(QTDIR)\bin\moc.exe "%(FullPath)" -o "GeneratedFiles\moc_%(Filename).cpp"
GeneratedFiles\moc_%(Filename).cpp
%(AdditionalDependencies)
-
+
Document
$(QTDIR)\bin\moc.exe "%(FullPath)" -o "GeneratedFiles\moc_%(Filename).cpp"
@@ -430,28 +345,27 @@
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
@@ -460,5 +374,4 @@
-
-
+
\ No newline at end of file
diff --git a/Bind/Bind.vcxproj.filters b/Bind/Bind.vcxproj.filters
deleted file mode 100644
index f14865e..0000000
--- a/Bind/Bind.vcxproj.filters
+++ /dev/null
@@ -1,396 +0,0 @@
-
-
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
-
-
- {93995380-89BD-4b04-88EB-625FBE52EBFB}
- h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
-
-
- {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-
-
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
-
-
- Resource Files
-
-
- Resource Files
-
-
- Resource Files
-
-
- Resource Files
-
-
- Resource Files
-
-
- Resource Files
-
-
- Resource Files
-
-
- Resource Files
-
-
- Resource Files
-
-
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
-
-
- Resource Files
-
-
-
-
- Resource Files
-
-
-
-
- Resource Files
-
-
-
\ No newline at end of file
diff --git a/Bind/include/Core/Integrity/Compatibility/Compatibility.h b/Bind/include/Core/Integrity/Compatibility/Compatibility.h
index e7c6338..9dcfc09 100644
--- a/Bind/include/Core/Integrity/Compatibility/Compatibility.h
+++ b/Bind/include/Core/Integrity/Compatibility/Compatibility.h
@@ -1,16 +1,14 @@
#pragma once
-#include
-#include
-#include
#include
#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
#include
-#include "include/GUI/Themes/Colors.h"
-#include "include/Core/Utils/Utils.h"
class Compatibility : public QObject {
Q_OBJECT
diff --git a/Bind/include/Core/Integrity/Integrity.h b/Bind/include/Core/Integrity/Integrity.h
new file mode 100644
index 0000000..9d9be02
--- /dev/null
+++ b/Bind/include/Core/Integrity/Integrity.h
@@ -0,0 +1,5 @@
+#pragma once
+
+#include
+#include
+#include
\ No newline at end of file
diff --git a/Bind/include/Core/Integrity/Validator/Validator.h b/Bind/include/Core/Integrity/Validator/Validator.h
index 9fab9fb..c10eb4b 100644
--- a/Bind/include/Core/Integrity/Validator/Validator.h
+++ b/Bind/include/Core/Integrity/Validator/Validator.h
@@ -1,18 +1,16 @@
#pragma once
-#include
-#include
+#include
#include
#include
-#include
#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
#include
-#include
-#include "include/GUI/Themes/Colors.h"
-#include "include/Core/Utils/Utils.h"
class Validator : public QObject {
Q_OBJECT
diff --git a/Bind/include/Core/Integrity/Verification/Verification.h b/Bind/include/Core/Integrity/Verification/Verification.h
index d54b238..5232f26 100644
--- a/Bind/include/Core/Integrity/Verification/Verification.h
+++ b/Bind/include/Core/Integrity/Verification/Verification.h
@@ -1,19 +1,16 @@
#pragma once
-#include
-#include
-#include
-#include
#include
#include
+#include
#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
#include
-#include
-#include
-#include "include/GUI/Themes/Colors.h"
-#include "include/Core/Utils/Utils.h"
class Verification : public QObject {
Q_OBJECT
@@ -92,4 +89,9 @@ class Verification : public QObject {
uint64_t imageBase;
QMap syscallNumbers;
std::function outputCallback;
+
+ QStringList outputBuffer;
+ static constexpr int OUTPUT_BATCH_SIZE = 20; /* flush buffer every 20 syscalls */
+ int processedCount;
+ void flushOutputBuffer();
};
\ No newline at end of file
diff --git a/Bind/include/Core/Obfuscation/Direct/ControlFlow/DirectControlFlow.h b/Bind/include/Core/Obfuscation/Direct/ControlFlow/DirectControlFlow.h
index 8ecb267..29a40de 100644
--- a/Bind/include/Core/Obfuscation/Direct/ControlFlow/DirectControlFlow.h
+++ b/Bind/include/Core/Obfuscation/Direct/ControlFlow/DirectControlFlow.h
@@ -1,10 +1,10 @@
#pragma once
-#include
-#include
#include
-#include
#include
+#include
+#include