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