| View previous topic :: View next topic |
| Author |
Message |
brisingr Cheater
Reputation: 0
Joined: 23 Jan 2016 Posts: 39
|
Posted: Sat Jan 23, 2016 8:07 am Post subject: Starcraft Cheat table |
|
|
Hi all,
I'me new, and I've some problem in creating my first cheat table.
I've found the instruction and created the structures. unfortunately, when I use the script the game crashe .
the original code is: "Starcraft.exe"+798B9: mov [ebx+08],eax
in the structure i found the value +1b44 where 0 is for player units and different value for enemy units.
When executed the game crashes. What's wrong?
Here is my script:
[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(player)
newmem:
cmp [ebx+1b44],0
je originalcode
jmp player
originalcode:
mov [ebx+08],eax
jmp returnhere
player:
nop
nop
mov [ebx+08],eax
jmp returnhere
"Starcraft.exe"+798B9:
jmp newmem
nop
nop
returnhere:
[DISABLE]
dealloc(newmem)
"Starcraft.exe"+798B9:
mov [ebx+08],eax
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 154
Joined: 06 Jul 2014 Posts: 4754
|
Posted: Sat Jan 23, 2016 10:22 am Post subject: |
|
|
It's unlikely, but if there's something that checks EFLAGS just after "Starcraft.exe"+798B9 (e.g. Jcc, CMOVcc), then it would probably crash the game since you're changing the EFLAGS register in your script.
The more likely scenario is that the game has some kind of a memory integrity check that makes sure its instructions aren't modified. If they have been modified, it'll crash the game. You can try disabling this yourself, or you could try the stealthedit plugin.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
brisingr Cheater
Reputation: 0
Joined: 23 Jan 2016 Posts: 39
|
Posted: Sat Jan 23, 2016 2:06 pm Post subject: |
|
|
how can I find this address by myself?
I don't know if this can help, but, after the crash i found a new opcode writing for the life value, this: 00C80012 - 89 43 08 - mov [ebx+08],eax
|
|
| Back to top |
|
 |
hhhuut Grandmaster Cheater
Reputation: 6
Joined: 08 Feb 2015 Posts: 607
|
Posted: Sat Jan 23, 2016 2:13 pm Post subject: |
|
|
Click on "Add address manually", type "Starcraft.exe"+798B9 as address (it's the address from your script), save, rightclick on the new entry and choose "Find out what access this address".
Then continue the game for a while (some minutes should do), but do not activate any script.
If something pop's up in the debugger window, then it's probably a memory integrity check ...
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 154
Joined: 06 Jul 2014 Posts: 4754
|
Posted: Sun Jan 24, 2016 12:52 am Post subject: |
|
|
| brisingr wrote: | | how can I find this address by myself? | What's "this address"?
If you mean "Starcraft.exe"+798B9, then that's the address you gave us in the first post.
If you mean the possible instruction after the aforementioned instruction, then I'm not even sure it exists. If there's anything that modifies EFLAGS (e.g. CMP, TEST) just before "Starcraft.exe"+798B9 and something that checks EFLAGS just after it (e.g. JE, JL, CMOVG), then you should probably backup the EFLAGS register using PUSHFD and restore that backup using POPFD in your script.
If you mean the instruction that's doing the memory integrity check, then try hhhuut's method.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
brisingr Cheater
Reputation: 0
Joined: 23 Jan 2016 Posts: 39
|
Posted: Sun Jan 24, 2016 9:11 am Post subject: |
|
|
thank you both for the help.
@ParkourPenguin: Sorry for the misunderstanding, I meant the instruction for the memory integrity check.
@hhhuut: in the debugger i found:
StarCraft.exe+798B7 - 2B C7 - sub eax,edi.
When replaced with the code that does nothing, the god mode affects player units and enemy units. Is it the memory check? How can I make god mode?
|
|
| Back to top |
|
 |
hhhuut Grandmaster Cheater
Reputation: 6
Joined: 08 Feb 2015 Posts: 607
|
Posted: Sun Jan 24, 2016 9:17 am Post subject: |
|
|
I don't think that's the integrity check since it's the instruction directly before the one you've used for your godmode (as you should have noticed).
Are you sure you've done all the steps I suggested in my previous post correctly?
And besides, what astonishes me about your godmode script (the one from your very first post) is, that the unit's life seems to be stored at offset "+08", but your ID is at "+1B44" which is a pretty huge offset ... Are you sure the unit sturcture really is that big?
Becuase if not, you maybe try to read from memory that is not always initialized and therefore your game can crash ...
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 154
Joined: 06 Jul 2014 Posts: 4754
|
Posted: Sun Jan 24, 2016 9:56 am Post subject: |
|
|
| brisingr wrote: | | ... the god mode affects player units and enemy units. Is it the memory check? How can I make god mode? | That's called "shared code". It's run in more than a single scenario- in this case, when any unit takes damage (not just your units). There's no definite way to fix this, but the most common is to look through the structure as you were doing. And try to find something that's a bit closer to the base of the structure... +1B44 is pretty large.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
brisingr Cheater
Reputation: 0
Joined: 23 Jan 2016 Posts: 39
|
Posted: Sun Jan 24, 2016 10:22 am Post subject: |
|
|
| hhhuut wrote: | I don't think that's the integrity check since it's the instruction directly before the one you've used for your godmode (as you should have noticed).
Are you sure you've done all the steps I suggested in my previous post correctly?
And besides, what astonishes me about your godmode script (the one from your very first post) is, that the unit's life seems to be stored at offset "+08", but your ID is at "+1B44" which is a pretty huge offset ... Are you sure the unit sturcture really is that big?
Becuase if not, you maybe try to read from memory that is not always initialized and therefore your game can crash ... |
Yeah, I've typed the address manually, then I played, but, for a long time (after ~ 20 minutes I've started the next mission) nothing happens, also when attacking enemy units.
After trying to attack a friendly unit the game freezes, looking at the access window there was only that address with more than 35k counts and more counts were adding faster.
After stopping the searching process, the game becomed playable again. And as I told before trying to replace that instruction with nop makes enemies and friendly units invincible.
You're right, the offset I'm using in the script is huge, as I told before this is my first script and after making 2 structures with 4096 values (where I didn't find any values equal for friendly and different for enemies) I've created a very big structure (more than 65k offsets) with 4 friendly units and 4 enemy units and I've used the first value different for group structure that I found. Maybe I'm doing something wrong here.
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sun Jan 24, 2016 10:31 am Post subject: |
|
|
It's likely one of two things...
1. As previously mentioned, your offset is too big.
2. You didn't let CE build your script for you.
|
|
| Back to top |
|
 |
brisingr Cheater
Reputation: 0
Joined: 23 Jan 2016 Posts: 39
|
Posted: Sun Jan 24, 2016 11:44 am Post subject: |
|
|
update:
meanwhile I've tried with another game (TA Kingdoms) and I've use the same procedure, the script works fine.
I've done a new structure dissect for starcraft.
the difference between the 2 games, in the structure dissect, concern the opset of the units health.
In the other game I found exactly the health value, in starcraft instead, at the +08 I found a pointer.
Is this difference important?
|
|
| Back to top |
|
 |
brisingr Cheater
Reputation: 0
Joined: 23 Jan 2016 Posts: 39
|
Posted: Thu Jan 28, 2016 3:37 pm Post subject: |
|
|
Hi again,
I think I found the right address for comparison. I think I had the appcrash for the wrong address used before (I'm not sure but maybe the reason is 'cause I've also used the address of some friendly units with different colors in the same structuregroup)
Now I've not getting any crash... But unfortunately I don't know how to write the code to freeze friendly units health's.
| Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(unitshealth)
label(originalcode)
label(exit)
newmem: //this is allocated memory, you have read,write,execute access
cmp [ebx+0064],00000000
je unitshealth
jmp originalcode
unitshealth:
nop
nop
originalcode:
mov [ebx+08],eax
push 00
exit:
jmp returnhere
"StarCraft.exe"+798B9:
jmp newmem
returnhere:
|
Can someone help me?
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
|
|
| Back to top |
|
 |
hhhuut Grandmaster Cheater
Reputation: 6
Joined: 08 Feb 2015 Posts: 607
|
Posted: Thu Jan 28, 2016 3:45 pm Post subject: |
|
|
From now on it's pretty simple (when you know where the maximum health is):
| Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
newmem: //this is allocated memory, you have read,write,execute access
cmp dword ptr [ebx+0064],00
jne originalcode //jump if [ebx+64] is not zero
mov eax,[ebx+10] //assuming that the maximum health is stored at [ebx+10]
originalcode:
mov [ebx+08],eax
push 00
exit:
jmp returnhere
"StarCraft.exe"+798B9:
jmp newmem
returnhere:
[DISABLE]
dealloc(newmem)
"Starcraft.exe"+798B9:
mov [ebx+08],eax
push 00 |
And regarding the "push 00" which was missing in your first script, I also think I know, why you crashed the game ...
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Jan 28, 2016 3:47 pm Post subject: |
|
|
| Code: | cmp [ebx+0064],00000000 //Comparing a zero value for ID is seldom reliable.
je unitshealth
jmp originalcode
unitshealth:
nop //Not needed.
nop //Not needed.
push 00 //Needed.
jmp returnhere //Needed.
|
Last edited by ++METHOS on Thu Jan 28, 2016 3:50 pm; edited 1 time in total |
|
| Back to top |
|
 |
brisingr Cheater
Reputation: 0
Joined: 23 Jan 2016 Posts: 39
|
Posted: Thu Jan 28, 2016 3:49 pm Post subject: |
|
|
Great! It works perfect.
Thank you so much.
Can you explain me why the command "push 00"?
|
|
| Back to top |
|
 |
|