View previous topic :: View next topic |
Author |
Message |
vener Grandmaster Cheater Supreme
Reputation: 0
Joined: 18 Feb 2006 Posts: 1668
|
Posted: Sat Oct 14, 2006 8:53 pm Post subject: coding delphi |
|
|
Code: | procedure TTrainer.CheckBox6Click(Sender: TObject);
var
address:integer;
size:integer;
fzid1:integer;
maxid:integer;
baseaddress:integer;
offsetcount:integer;
i:dword;
offsets:cefuncproc.pDwordarray;
a:dword;
begin
if checkbox6.checked then
begin
baseaddress:=($00642818);
offsetcount:=1;
offsets[i]:=($274);
ce_getaddressfrompointer(baseaddress,offsetcount,offsets);
label1.caption:=inttostr(a);
address:=(a);
size:=4;
ce_freezemem(address,size);
maxid:=fzid1 ;
label1.caption:=inttostr(fzid1);
end
else
begin
ce_unfreezemem(fzid1);
label1.Caption:='sucess';
end;
end; |
when i activaed it it showed
---------------------------
ProjectX
---------------------------
Access violation at address 0045AADB in module 'ProjectX.exe'. Read of address 00000260.
---------------------------
OK
---------------------------
any ideas?
whats offsetcount anyway?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 468
Joined: 09 May 2003 Posts: 25712 Location: The netherlands
|
Posted: Sun Oct 15, 2006 1:55 am Post subject: |
|
|
you're forgetting to allocate memory for the offsets array and initializing i (or in this case replace it with 0)
so at least before the line: offsets[i]:=$274; have the code:
Code: |
setlength(offsets,1);
i:=0;
|
and you're also forgetting to set a.
should be:
Code: |
a:=ce_getaddressfrompointer(baseaddress,offsetcount,offsets);
|
same goes for fzid, should be:
Code: |
ce_freezemem(address,size);
|
and fzid has to be declared globally or at least inside the TTrainer object. Not inside the current function since that variable gets destroyed as soon as you exit the function
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
vener Grandmaster Cheater Supreme
Reputation: 0
Joined: 18 Feb 2006 Posts: 1668
|
Posted: Sun Oct 15, 2006 10:50 am Post subject: |
|
|
after the modifications recomended by you,theres still errors
---------------------------
ProjectX
---------------------------
Access violation at address 004F238F in module 'ProjectX.exe'. Write of address 00000000.
---------------------------
OK
---------------------------
but with
Code: | a:=ce_getaddressfrompointer(baseaddress,offsetcount,offsets); |
and
Code: | fzid1:=ce_freezemem(address,size); |
commented
it wont show errors,i also put the array directly instead of declearing I=0
offsets[0]:=$274;
since setlength will generate a imcopatible type error
PS:this is my first time working with arrays
|
|
Back to top |
|
 |
N-Y-M Master Cheater
Reputation: 0
Joined: 13 Jul 2006 Posts: 475 Location: Emergency
|
Posted: Sun Oct 15, 2006 11:58 am Post subject: |
|
|
1. can i call writeprocessmemory to freeze addr? (just like what db do under freezethem)
2. may i know where is processhandle being declared in mainunit?
thanks
_________________
|
|
Back to top |
|
 |
vener Grandmaster Cheater Supreme
Reputation: 0
Joined: 18 Feb 2006 Posts: 1668
|
Posted: Mon Oct 23, 2006 10:22 pm Post subject: |
|
|
simillarly to changing registers i tried to use the same idea on AA
1stly i tried to use the plugin exports part
i try it with this code
Code: | procedure TTrainer.CheckBox4Click(Sender: TObject);
var script: tstringlist;
s:pchar;
begin
if checkbox4.checked then
begin
script:=tstringlist.create;
with script do
begin
add('code...');
add('code...');
autoassemble(script,false);
script.free;
end
end
else
script:=tstringlist.create;
with fscript do
begin
add('code...');
add('code...');
autoassemble(script,false);
script.free;
end;
end; |
the code executed and works like i want it to be but returned with this
---------------------------
ProjectX
---------------------------
Access violation at address 00506508 in module 'ProjectX.exe'. Read of address 000003A0.
---------------------------
OK
---------------------------
any help?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 468
Joined: 09 May 2003 Posts: 25712 Location: The netherlands
|
Posted: Tue Oct 24, 2006 1:30 am Post subject: |
|
|
no idea, it should work (assuming you included the autoassembler unit to the uses), looks like a property of a undeclared (nil) object is being accessed
Is this code execute before the symbolhandler is initialized ? (usually happens in oncreate iof mainform)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
vener Grandmaster Cheater Supreme
Reputation: 0
Joined: 18 Feb 2006 Posts: 1668
|
Posted: Tue Oct 24, 2006 6:21 am Post subject: |
|
|
no,its executed after mainunit is executed,i special thing is when i disable it
Code: | else
script:=tstringlist.create;
with fscript do
begin
add('code...');
add('code...');
autoassemble(script,false);
script.free;
end; |
it won't have that violation,any ideas?
btw symbolhandler,frmautoinject,autoassembler is included in uses
|
|
Back to top |
|
 |
|