feat key and GetCurrentRunLevel mix_key xor_encrypt GetWindowsVersion

This commit is contained in:
2026-10-08 10:01:24 +08:00
parent 7ed279cfe9
commit 9e0f57a32d
2 changed files with 264 additions and 0 deletions
+28
View File
@@ -3,6 +3,26 @@
#define UTILS_H
#include "Base.h"
extern unsigned char key[8];
enum class RunLevel
{
Unknown,
User,
Administrator,
System
};
struct WINDOWS_VERSION
{
DWORD Major;
DWORD Minor;
DWORD Build;
DWORD UBR;
const char* Name;
};
namespace utils
{
auto check_mutex() -> BOOL;
@@ -11,6 +31,14 @@ namespace utils
// 不区分大小写宽字符串查找
bool StrContainsI(LPCWSTR Source, LPCWSTR Sub);
RunLevel GetCurrentRunLevel();
//Xor异或数组数据加密
BOOL xor_encrypt(_Inout_ void* buffer, _In_ size_t size);
//获取系统版本和子版本号
bool GetWindowsVersion(WINDOWS_VERSION* Version);
}
#endif // !UTILS_H