[*] Expand NT AuProcAddresses' blacklist to include symbols

This commit is contained in:
Reece Wilson 2023-10-17 08:14:20 +01:00
parent 13e8ff460b
commit 97decebfe9

View File

@ -24,9 +24,9 @@ namespace Aurora
#endif
#if !defined(AURORA_DLL_BLACKLIST)
static AuUInt32 gBlockedDLLTable[32] {};
static AuUInt32 gBlockedDLLTable[64] {};
#else
static AuUInt32 gBlockedDLLTable[32] { AURORA_DLL_BLACKLIST };
static AuUInt32 gBlockedDLLTable[64] { AURORA_DLL_BLACKLIST };
#endif
AUKN_SYM bool AddBlockedDLL(const char *pString)
@ -101,44 +101,56 @@ namespace Aurora
ADD_LOAD_LIB(COM);
ADD_LOAD_LIB(User32);
#define ADD_GET_PROC(name, proc) \
if (h ## name) \
{ \
p ## proc = AuReinterpretCast<decltype(p ## proc)>(pGetProcAddress(h ## name, #proc)); \
#define ADD_GET_PROC(name, proc) \
if (!IsBlocked(#proc)) \
{ \
if (h ## name) \
{ \
p ## proc = AuReinterpretCast<decltype(p ## proc)>(pGetProcAddress(h ## name, #proc)); \
} \
}
#define ADD_GET_PROC_BI(name, name2, proc) \
p ## proc = nullptr; \
if (h ## name) \
{ \
p ## proc = AuReinterpretCast<decltype(p ## proc)>(pGetProcAddress(h ## name, #proc)); \
} \
if (!p ## proc) \
{ \
if (h ## name2) \
{ \
p ## proc = AuReinterpretCast<decltype(p ## proc)>(pGetProcAddress(h ## name2, #proc));\
} \
#define ADD_GET_PROC_BI(name, name2, proc) \
if (!IsBlocked(#proc)) \
{ \
p ## proc = nullptr; \
if (h ## name) \
{ \
p ## proc = AuReinterpretCast<decltype(p ## proc)>(pGetProcAddress(h ## name, #proc)); \
} \
if (!p ## proc) \
{ \
if (h ## name2) \
{ \
p ## proc = AuReinterpretCast<decltype(p ## proc)>(pGetProcAddress(h ## name2, #proc));\
} \
} \
}
#define ADD_GET_PROC_BI2(name, name2, proc, proc2) \
p ## proc2 = nullptr; \
if (h ## name) \
{ \
p ## proc2 = AuReinterpretCast<decltype(p ## proc2)>(pGetProcAddress(h ## name, #proc)); \
} \
if (!p ## proc2) \
{ \
if (h ## name2) \
{ \
p ## proc2 = AuReinterpretCast<decltype(p ## proc2)>(pGetProcAddress(h ## name2, #proc2)); \
} \
#define ADD_GET_PROC_BI2(name, name2, proc, proc2) \
if (!IsBlocked(#proc)) \
{ \
p ## proc2 = nullptr; \
if (h ## name) \
{ \
p ## proc2 = AuReinterpretCast<decltype(p ## proc2)>(pGetProcAddress(h ## name, #proc)); \
} \
if (!p ## proc2) \
{ \
if (h ## name2) \
{ \
p ## proc2 = AuReinterpretCast<decltype(p ## proc2)>(pGetProcAddress(h ## name2, #proc2)); \
} \
} \
}
#define ADD_GET_PROC_INTERNAL_MAP(name, proc, symbol) \
if (h ## name) \
{ \
p ## proc = AuReinterpretCast<decltype(p ## proc)>(pGetProcAddress(h ## name, #symbol)); \
#define ADD_GET_PROC_INTERNAL_MAP(name, proc, symbol) \
if (!IsBlocked(#proc)) \
{ \
if (h ## name) \
{ \
p ## proc = AuReinterpretCast<decltype(p ## proc)>(pGetProcAddress(h ## name, #symbol)); \
} \
}
if (pRtlGetVersion)