Format code
This commit is contained in:
parent
13ff1ca4f0
commit
d69544ff5a
@ -10,17 +10,18 @@ namespace arxan
|
||||
{
|
||||
DWORD get_steam_pid()
|
||||
{
|
||||
static auto steam_pid = [] {
|
||||
HKEY hRegKey;
|
||||
static auto steam_pid = []
|
||||
{
|
||||
HKEY reg_key;
|
||||
DWORD pid{};
|
||||
|
||||
if (RegOpenKeyExA(HKEY_CURRENT_USER, "Software\\Valve\\Steam\\ActiveProcess", 0, KEY_QUERY_VALUE,
|
||||
&hRegKey) != ERROR_SUCCESS)
|
||||
®_key) != ERROR_SUCCESS)
|
||||
return pid;
|
||||
|
||||
DWORD dwLength = sizeof(pid);
|
||||
RegQueryValueExA(hRegKey, "pid", nullptr, nullptr, reinterpret_cast<BYTE*>(&pid), &dwLength);
|
||||
RegCloseKey(hRegKey);
|
||||
DWORD length = sizeof(pid);
|
||||
RegQueryValueExA(reg_key, "pid", nullptr, nullptr, reinterpret_cast<BYTE*>(&pid), &length);
|
||||
RegCloseKey(reg_key);
|
||||
|
||||
return pid;
|
||||
}();
|
||||
@ -32,7 +33,8 @@ namespace arxan
|
||||
utils::hook::detour nt_query_information_process_hook;
|
||||
utils::hook::detour create_mutex_ex_a_hook;
|
||||
|
||||
HANDLE create_mutex_ex_a_stub(const LPSECURITY_ATTRIBUTES attributes, const LPCSTR name, const DWORD flags, const DWORD access)
|
||||
HANDLE create_mutex_ex_a_stub(const LPSECURITY_ATTRIBUTES attributes, const LPCSTR name, const DWORD flags,
|
||||
const DWORD access)
|
||||
{
|
||||
if (name == "$ IDA trusted_idbs"s || name == "$ IDA registry mutex $"s)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user