feat key and GetCurrentRunLevel mix_key xor_encrypt GetWindowsVersion
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user