MCPcopy Create free account
hub / github.com/Inori/GPCS4 / VMProtect

Function VMProtect

GPCS4/Platform/PlatMemory.cpp:178–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178bool VMProtect(void* pAddress, size_t nSize,
179 VM_PROTECT_FLAG nNewProtect, VM_PROTECT_FLAG* pOldProtect)
180{
181 DWORD dwNewProtect = GetProtectFlag(nNewProtect);
182 DWORD dwOldProtect = 0;
183 BOOL bSuc = VirtualProtect(pAddress, nSize, dwNewProtect, &dwOldProtect);
184 if (pOldProtect)
185 {
186 *pOldProtect = RecoverProtectFlag(dwOldProtect);
187 }
188 return bSuc;
189}
190
191bool VMQuery(void* pAddress, MemoryInformation* pInfo)
192{

Callers 1

patchTLSInstructionMethod · 0.85

Calls 2

GetProtectFlagFunction · 0.85
RecoverProtectFlagFunction · 0.85

Tested by

no test coverage detected