Ai
1 Star 0 Fork 0

phy0292/cheat-engine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
tracerignore.pas 2.09 KB
一键复制 编辑 原始数据 按行查看 历史
cheat-engine 提交于 2019-12-20 00:49 +08:00 . Fix registry issues
unit tracerIgnore;
{$mode delphi}
interface
uses
Classes, SysUtils, symbolhandler, symbolhandlerstructs, cefuncproc, globals;
type
TTracerIgnore=class
private
ignoredtracerregions: array of record
start: ptruint;
stop: ptruint;
end;
public
function InIgnoredModuleRange(address: ptruint): boolean;
procedure loadIgnoredModules;
end;
var IgnoredModuleListHandler: TTracerIgnore;
implementation
procedure TTracerIgnore.loadIgnoredModules;
var
s: string;
i,j: integer;
donottrace: tstringlist;
mi: tmoduleinfo;
begin
//parse the donottrace.txt file and find the range
setlength(ignoredtracerregions, 0);
s:=cheatenginedir+'donottrace.txt';
if FileExists(s) then //if the list exists
begin
donottrace:=tstringlist.create;
try
donottrace.LoadFromFile(s{$if FPC_FULLVERSION>=030200}, true{$endif});
i:=0;
while i<donottrace.Count do
begin
j:=pos('#', donottrace[i]);
if j>0 then
donottrace[i]:=trim(copy(donottrace[i], 1, j-1));
donottrace[i]:=lowercase(donottrace[i]);
if donottrace[i]='' then
donottrace.Delete(i)
else
begin
if symhandler.getmodulebyname(donottrace[i], mi) then
begin
//found it
setlength(ignoredtracerregions, length(ignoredtracerregions)+1);
ignoredtracerregions[length(ignoredtracerregions)-1].start:=mi.baseaddress;
ignoredtracerregions[length(ignoredtracerregions)-1].stop:=mi.baseaddress+mi.basesize;
end;
inc(i);
end;
end;
except
//don't care if file can't be loaded anyhow
end;
end;
end;
function TTracerIgnore.InIgnoredModuleRange(address: ptruint): boolean;
var i: integer;
begin
result:=false;
for i:=0 to length(ignoredtracerregions)-1 do
if InRangeX(address, ignoredtracerregions[i].start, ignoredtracerregions[i].stop) then
exit(true);
end;
initialization
IgnoredModuleListHandler:=TTracerIgnore.create;
end.
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/phy0292/cheat-engine.git
git@gitee.com:phy0292/cheat-engine.git
phy0292
cheat-engine
cheat-engine
master

搜索帮助