📄 cehook.dpr.svn-base
字号:
else
begin
for j:=0 to memoryregion[i].MemorySize-4 do
begin
check:=(not (isnan(singlep^) or isinfinite(singlep^)));
if check then
case roundingtype of
rounded:
begin
helpsingle:=RoundTo(SingleP^,-decim);
check:=(helpsingle=SingleValue);
end;
extremerounded:
begin
//if a scan for 1 it scans for 0<x<2
//if a scan for 1.0 it scans for 9.9<x<1.10
check:=((SingleP^<(singlevalue+helpsingle3)) and (SingleP^>(singlevalue-helpsingle3)) );
end;
truncated:
begin
//if a scan for 1 it scans for 1>=x<2
//if a scan for 1.0 it scans for 1.0>=x<1.10
check:=((SingleP^<(singlevalue+helpsingle3)) and (singlep^>=singlevalue));
end;
else check:=false;
end;
if check then
begin
foundaddress[found]:=dword(singlep);
foundvalue4[found]:=singlep^;
inc(found);
if found=number then
begin
blockwrite(Addressfile,pointer(foundaddress)^,4*number,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue4)^,number*4,actualwrite);
found:=0;
end;
end;
asm
inc singlep;
end;
end;
end;
except
end;
postmessage(scansettings^.formscanningHandle,ESSetProgressbarPos,position,0);
end;
blockwrite(Addressfile,pointer(foundaddress)^,4*found,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue4)^,found*4,actualwrite);
result:=filesize(Memoryfile) div 4;
end;
if scantype=BiggerThan then
begin
for i:=0 to memoryregions do
begin
if not scansettings^.scanning then break;
inc(position,memoryregion[i].MemorySize);
singlep:=pointer(memoryregion[i].BaseAddress);
try
if scansettings^.FastScan then
begin
for j:=0 to (memoryregion[i].MemorySize-1 div 4)-1 do
begin
if (not (isnan(singlep^) or isinfinite(singlep^))) and (SingleP^>SingleValue) then
begin
foundaddress[found]:=dword(singlep);
foundvalue4[found]:=singlep^;
inc(found);
if found=number then
begin
blockwrite(Addressfile,pointer(foundaddress)^,4*number,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue4)^,number*4,actualwrite);
found:=0;
end;
end;
inc(singlep);
end;
end
else
begin
for j:=0 to memoryregion[i].MemorySize-4 do
begin
if (not (isnan(singlep^) or isinfinite(singlep^))) and (SingleP^>SingleValue) then
begin
foundaddress[found]:=dword(singlep);
foundvalue4[found]:=singlep^;
inc(found);
if found=number then
begin
blockwrite(Addressfile,pointer(foundaddress)^,4*number,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue4)^,number*4,actualwrite);
found:=0;
end;
end;
asm
inc singlep;
end;
end;
end;
except
end;
postmessage(scansettings^.formscanningHandle,ESSetProgressbarPos,position,0);
end;
blockwrite(Addressfile,pointer(foundaddress)^,4*found,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue4)^,found*4,actualwrite);
result:=filesize(Memoryfile) div 4;
end;
if scantype=SmallerThan then
begin
for i:=0 to memoryregions do
begin
if not scansettings^.scanning then break;
inc(position,memoryregion[i].MemorySize);
singlep:=pointer(memoryregion[i].BaseAddress);
try
if scansettings^.FastScan then
begin
for j:=0 to (memoryregion[i].MemorySize-1 div 4)-1 do
begin
if (not (isnan(singlep^) or isinfinite(singlep^))) and (SingleP^<SingleValue) then
begin
foundaddress[found]:=dword(singlep);
foundvalue4[found]:=singlep^;
inc(found);
if found=number then
begin
blockwrite(Addressfile,pointer(foundaddress)^,4*number,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue4)^,number*4,actualwrite);
found:=0;
end;
end;
inc(singlep);
end;
end
else
begin
for j:=0 to memoryregion[i].MemorySize-4 do
begin
if (not (isnan(singlep^) or isinfinite(singlep^))) and (SingleP^<SingleValue) then
begin
foundaddress[found]:=dword(singlep);
foundvalue4[found]:=singlep^;
inc(found);
if found=number then
begin
blockwrite(Addressfile,pointer(foundaddress)^,4*number,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue4)^,number*4,actualwrite);
found:=0;
end;
end;
asm
inc singlep;
end;
end;
end;
except
end;
postmessage(scansettings^.formscanningHandle,ESSetProgressbarPos,position,0);
end;
blockwrite(Addressfile,pointer(foundaddress)^,4*found,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue4)^,found*4,actualwrite);
result:=filesize(Memoryfile) div 4;
end;
if scantype=ValueBetween then
begin
for i:=0 to memoryregions do
begin
if not scansettings^.scanning then break;
inc(position,memoryregion[i].MemorySize);
singlep:=pointer(memoryregion[i].BaseAddress);
try
if scansettings^.FastScan then
begin
for j:=0 to (memoryregion[i].MemorySize-1 div 4)-1 do
begin
if (not (isnan(singlep^) or isinfinite(singlep^))) and (SingleP^>=SingleValue) and (Singlep^<=singlevalue2) then
begin
foundaddress[found]:=dword(singlep);
foundvalue4[found]:=singlep^;
inc(found);
if found=number then
begin
blockwrite(Addressfile,pointer(foundaddress)^,4*number,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue4)^,number*4,actualwrite);
found:=0;
end;
end;
inc(singlep);
end;
end
else
begin
for j:=0 to memoryregion[i].MemorySize-4 do
begin
if (not (isnan(singlep^) or isinfinite(singlep^))) and (SingleP^>=SingleValue) and ((SingleP^<=SingleValue2)) then
begin
foundaddress[found]:=dword(singlep);
foundvalue4[found]:=singlep^;
inc(found);
if found=number then
begin
blockwrite(Addressfile,pointer(foundaddress)^,4*number,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue4)^,number*4,actualwrite);
found:=0;
end;
end;
asm
inc singlep;
end;
end;
end;
except
end;
postmessage(scansettings^.formscanningHandle,ESSetProgressbarPos,position,0);
end;
blockwrite(Addressfile,pointer(foundaddress)^,4*found,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue4)^,found*4,actualwrite);
result:=filesize(Memoryfile) div 4;
end;
end else
if vartype=4 then //double
begin
//no need to bother with fastscan routines
setlength(foundvalue5,number);
if scantype=exact_value then
begin
for i:=0 to memoryregions do
begin
if not scansettings^.scanning then break;
inc(position,memoryregion[i].MemorySize);
doublep:=pointer(memoryregion[i].BaseAddress);
if decim=0 then helpdouble3:=1 else
helpdouble3:=1/((decim)*10); //the range for extremerounded scans
try
if scansettings^.FastScan then
begin
for j:=0 to (memoryregion[i].MemorySize div 8)-1 do
begin
check:=(not (isnan(doublep^) or isinfinite(doublep^)));
if check then
case roundingtype of
rounded:
begin
helpdouble:=RoundTo(doubleP^,-decim);
check:=(helpdouble=doubleValue);
end;
extremerounded:
begin
//if a scan for 1 it scans for 0<x<2
//if a scan for 1.0 it scans for 9.9<x<1.10
check:=((doubleP^<(doublevalue+helpdouble3)) and (doubleP^>(doublevalue-helpdouble3)) );
end;
truncated:
begin
//if a scan for 1 it scans for 1>=x<2
//if a scan for 1.0 it scans for 1.0>=x<1.10
check:=((doubleP^<(doublevalue+helpdouble3)) and (doublep^>=doublevalue));
end;
else check:=false;
end;
if check then
begin
foundaddress[found]:=dword(doublep);
foundvalue5[found]:=doublep^;
inc(found);
if found=number then
begin
blockwrite(Addressfile,pointer(foundaddress)^,4*number,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue5)^,number*8,actualwrite);
found:=0;
end;
end;
inc(doublep);
end;
end
else
begin
for j:=0 to memoryregion[i].MemorySize-8 do
begin
check:=(not (isnan(doublep^) or isinfinite(doublep^)));
if check then
case roundingtype of
rounded:
begin
helpdouble:=RoundTo(doubleP^,-decim);
check:=(helpdouble=doubleValue);
end;
extremerounded:
begin
//if a scan for 1 it scans for 0<x<2
//if a scan for 1.0 it scans for 9.9<x<1.10
check:=((doubleP^<(doublevalue+helpdouble3)) and (doubleP^>(doublevalue-helpdouble3)) );
end;
truncated:
begin
//if a scan for 1 it scans for 1>=x<2
//if a scan for 1.0 it scans for 1.0>=x<1.10
check:=((doubleP^<(doublevalue+helpdouble3)) and (doublep^>=doublevalue));
end;
else check:=false;
end;
if check then
begin
foundaddress[found]:=dword(doublep);
foundvalue5[found]:=doublep^;
inc(found);
if found=number then
begin
blockwrite(Addressfile,pointer(foundaddress)^,4*number,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue5)^,number*8,actualwrite);
found:=0;
end;
end;
asm
inc doublep;
end;
end;
end;
except
end;
postmessage(scansettings^.formscanningHandle,ESSetProgressbarPos,position,0);
end;
blockwrite(Addressfile,pointer(foundaddress)^,4*found,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue5)^,found*8,actualwrite);
result:=filesize(Memoryfile) div 8;
end;
if scantype=biggerthan then
begin
for i:=0 to memoryregions do
begin
if not scansettings^.scanning then break;
inc(position,memoryregion[i].MemorySize);
doublep:=pointer(memoryregion[i].BaseAddress);
try
if scansettings^.FastScan then
begin
for j:=0 to (memoryregion[i].MemorySize div 8)-1 do
begin
if (not (isnan(doublep^) or isinfinite(doublep^))) and (doublep^>DoubleValue) then
begin
foundaddress[found]:=dword(doublep);
foundvalue5[found]:=doublep^;
inc(found);
if found=number then
begin
blockwrite(Addressfile,pointer(foundaddress)^,4*number,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue5)^,number*8,actualwrite);
found:=0;
end;
end;
inc(doublep);
end;
end
else
begin
for j:=0 to memoryregion[i].MemorySize-8 do
begin
if (not (isnan(doublep^) or isinfinite(doublep^))) and (doublep^>DoubleValue) then
begin
foundaddress[found]:=dword(doublep);
foundvalue5[found]:=doublep^;
inc(found);
if found=number then
begin
blockwrite(Addressfile,pointer(foundaddress)^,4*number,actualwrite);
blockwrite(Memoryfile,pointer(foundvalue5)^,number*8,actualwrite);
found:=0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -