mirror of
https://github.com/dobin/SuperMega
synced 2026-06-03 01:27:11 +00:00
fix: more allocations
This commit is contained in:
@@ -17,31 +17,38 @@ void antiemulation() {
|
|||||||
void* allocs[ALLOC_NUM];
|
void* allocs[ALLOC_NUM];
|
||||||
DWORD result;
|
DWORD result;
|
||||||
|
|
||||||
for(int n=0; n<ALLOC_NUM; n++) {
|
for(int i=0; i<4; i++) {
|
||||||
allocs[n] = VirtualAlloc(
|
|
||||||
NULL,
|
for(int n=0; n<ALLOC_NUM; n++) {
|
||||||
0x1000,
|
allocs[n] = VirtualAlloc(
|
||||||
0x3000,
|
NULL,
|
||||||
p_RW
|
0x1000,
|
||||||
);
|
0x3000,
|
||||||
}
|
p_RW
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
for(int n=0; n<ALLOC_NUM; n++) {
|
for(int n=0; n<ALLOC_NUM; n++) {
|
||||||
if (VirtualProtect(
|
if (VirtualProtect(
|
||||||
allocs[n],
|
allocs[n],
|
||||||
1000,
|
1000,
|
||||||
p_RX,
|
p_RX,
|
||||||
&result) == 0)
|
&result) == 0)
|
||||||
{
|
{
|
||||||
return 7;
|
return 7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Sleep(200);
|
||||||
|
|
||||||
|
BOOL bSuccess;
|
||||||
|
for(int n=0; n<ALLOC_NUM; n++) {
|
||||||
|
bSuccess = VirtualFree(
|
||||||
|
allocs[n],
|
||||||
|
1000,
|
||||||
|
0x00008000); // MEM_RELEASE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL bSuccess;
|
|
||||||
for(int n=0; n<ALLOC_NUM; n++) {
|
|
||||||
bSuccess = VirtualFree(
|
|
||||||
allocs[n],
|
|
||||||
1000,
|
|
||||||
0x00008000); // MEM_RELEASE
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user