| View previous topic :: View next topic |
| Author |
Message |
PedraSimon Master Cheater
Reputation: 0
Joined: 14 Feb 2006 Posts: 368
|
Posted: Thu Mar 02, 2006 9:01 am Post subject: autoassembler label help request |
|
|
hi..
I wonder if there is a way to define label to addr that are not dynamic? like a constant value/addr?
This is to make my autoscript more readable and maintainable. For example, instead of
| Code: | mov eax,[12345678]
.....
inc [12345678]
..... |
can i do something to the effect of ..
| Code: | label (hpvalue=12345678)
mov eax,[hpvalue]
.....
inc [hpvalue]
..... |
btw, is CE autoscripts based on some standard ASM instructions? I am new to assembly, but is able to deal with the standard instructions(mov, inc...etc). but things like label, I am not too sure..
Thanx in advance
_________________
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25812 Location: The netherlands
|
Posted: Thu Mar 02, 2006 1:07 pm Post subject: |
|
|
yes you can label addresses, but it wasn't really designed for values (more for addresses) but it's possible to use it like that yes: (probably not what you expected)
| Code: |
alloc(mycode,512)
label(hpvalue)
12345678:
hpvalue:
mycode:
mov eax,hpvalue
|
Also a assembler hint: addresses go between a [ ] constant values not. So don't do mov eax,[hpvalue] because that would result in reading the address 12345678 into eax instead of placing the value 12345678 in eax
also," inc [hpvalue] " is not possible. inc can only work on registers and direct memory locations. Not constant values. (so inc eax or inc [addressofvalue] )
of course if you want a variable in your auto assemble script:
| Code: |
alloc(hpvalue,4)
alloc(mycode,512)
hpvalue:
dd 0 //initialize hpvalue to 0
mycode:
mov eax,[hpvalue] //place the value hpvalue points to into eax
inc [hpvalue] //increase the value pointed to by hpvalue
|
closest standard is probably inline assembler code
_________________
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 |
|
 |
PedraSimon Master Cheater
Reputation: 0
Joined: 14 Feb 2006 Posts: 368
|
Posted: Thu Mar 09, 2006 9:10 am Post subject: |
|
|
thx DarkByte, for the explanation. Qn. How can i put the addr of alloc label in a fixed mem location.
I tried this:
| Code: | alloc(ListSize, 1024)
alloc(newCodes,1024)
004001dd:
db ListSize
newCodes:
[...blah blah...]
|
But the addr of ListSize is not inserted at 004001dd .. What is my mistake?
Thanx
_________________
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25812 Location: The netherlands
|
Posted: Thu Mar 09, 2006 10:04 am Post subject: |
|
|
try "dd ListSize" db is 1 byte, dd is 4 byte
_________________
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 |
|
 |
PedraSimon Master Cheater
Reputation: 0
Joined: 14 Feb 2006 Posts: 368
|
Posted: Thu Mar 09, 2006 1:10 pm Post subject: |
|
|
Thank you very much. You have been very helpful.
_________________
|
|
| Back to top |
|
 |
PedraSimon Master Cheater
Reputation: 0
Joined: 14 Feb 2006 Posts: 368
|
Posted: Mon May 01, 2006 11:55 pm Post subject: |
|
|
Hi DB,
I hv the following test codes, which works w/o error in 5.2 (not sure build number), but now the same code gives error "not all instructions could be injected" ( CE 5.2.78 )
| Code: | alloc(dupeFlag,4)
alloc(dodupe,256)
00400418:
dd dupeFlag
dodupe:
ret |
Essentially, I need to put the addr of a allocated memory into a specific addr (in this case, 00400418). If this is no longer allowed in latest CE, how can we workaround?
Pls help
_________________
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25812 Location: The netherlands
|
Posted: Tue May 02, 2006 12:29 am Post subject: |
|
|
disable kernelmode read/writeprocessmemory
or edit the soucecode and add the check back that filters out usermode checks
_________________
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 |
|
 |
PedraSimon Master Cheater
Reputation: 0
Joined: 14 Feb 2006 Posts: 368
|
Posted: Wed May 03, 2006 8:08 am Post subject: |
|
|
tx for the reply.. I also found an earlier thread that covers the same issue.. Kinda tied up with something now.. will try it soon..
Thanx
_________________
|
|
| Back to top |
|
 |
|