| View previous topic :: View next topic |
| Author |
Message |
gid2525 Expert Cheater
Reputation: 2
Joined: 21 Oct 2013 Posts: 103
|
Posted: Mon Mar 14, 2016 10:19 pm Post subject: Script for writing and freezing an address if conditional??? |
|
|
Ok so, I have this here
| Code: |
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
[fs2_open_3_7_2.exe+00933DE4]+3a9:
db 6B 46 43 01
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
[fs2_open_3_7_2.exe+00933DE4]+3a9:
db 6B 46 43 00
|
the pointer is the address 00D34655 right above blue highlighted one.
What I need the script to do:
When [fs2_open_3_7_2.exe+00933DE4]+3a9 is ONLY :
6B 46 43 00
then write
db 6B 46 43 01
and FREEZE THAT until script is deactivated.
I can't really write scripts, i just plug in info into the auto assembler. So how would you add it to the code I posted above? Thanks!
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Mar 14, 2016 10:36 pm Post subject: |
|
|
Add Address Manually: [fs2_open_3_7_2.exe+00933DE4]+3a9
Assign a hotkey to set the value and freeze it.
Don't push the hotkey when you don't want to.
|
|
| Back to top |
|
 |
gid2525 Expert Cheater
Reputation: 2
Joined: 21 Oct 2013 Posts: 103
|
Posted: Mon Mar 14, 2016 11:29 pm Post subject: |
|
|
| Zanzer wrote: | Add Address Manually: [fs2_open_3_7_2.exe+00933DE4]+3a9
Assign a hotkey to set the value and freeze it.
Don't push the hotkey when you don't want to. |
Already have that. I want it in a script though to add in an AOB for upgrading to a different version if needed.
|
|
| Back to top |
|
 |
rog9001 Expert Cheater
Reputation: 2
Joined: 22 Dec 2015 Posts: 214 Location: Jupiter
|
Posted: Tue Mar 15, 2016 5:30 am Post subject: |
|
|
do you mean this?
| Code: |
[ENABLE]
aobscanmodule(INJECT,fs2_open_3_7_2.exe,6B 46 43 00)
registersymbol(INJECT)
INJECT+3:
db 01
[DISABLE]
INJECT+3:
db 00
unregistersymbol(INJECT)
|
This should work fine but if you mean something else then do tell me.
|
|
| Back to top |
|
 |
gid2525 Expert Cheater
Reputation: 2
Joined: 21 Oct 2013 Posts: 103
|
Posted: Tue Mar 15, 2016 7:41 am Post subject: |
|
|
| No, that does not freeze the value like I wanted. The value changes when I do certain things. So just changing it won't do any good, as it will just change back again. I need it like I said in the first post. Thanks!
|
|
| Back to top |
|
 |
rog9001 Expert Cheater
Reputation: 2
Joined: 22 Dec 2015 Posts: 214 Location: Jupiter
|
Posted: Tue Mar 15, 2016 7:59 am Post subject: |
|
|
| If you give me the game download and tell me what you are trying to change/freeze then I will try and make it myself and then I will give you the script I make.
|
|
| Back to top |
|
 |
Cake-san Grandmaster Cheater
Reputation: 8
Joined: 18 Dec 2014 Posts: 541 Location: Semenanjung
|
|
| Back to top |
|
 |
gid2525 Expert Cheater
Reputation: 2
Joined: 21 Oct 2013 Posts: 103
|
Posted: Tue Mar 15, 2016 12:12 pm Post subject: |
|
|
| Well, that part of the code thats AOB actually changes. So I guess can you try it as a simple injection with no AOB? Thanks!
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4725
|
Posted: Wed Mar 16, 2016 6:19 pm Post subject: |
|
|
An AoB scan is intended to be used to search for ASM instructions. If you want to use that, find an instruction that accesses that address and hook it.
If you don't want to use that, then the next best thing would be to create your own thread that does what you want.
| Code: | [ENABLE]
alloc(newmem,2048)
label(loop)
label(exit)
label(myFreezeExit)
registersymbol(myFreezeExit)
createthread(newmem)
newmem:
mov eax,[fs2_open_3_7_2.exe+00933DE4]
lea esi,[eax+3a9]
mov eax,[esi]
cmp eax,0043466B
jne exit
loop:
mov [esi],0143466B
push 50
call Sleep
mov eax,[myFreezeExit]
test eax,eax
je loop
exit:
pop eax
push 8000
push 0
push newmem
push eax
jmp VirtualFree
db CC CC CC CC
myFreezeExit:
dd 0
[DISABLE]
{$lua}
errorOnLookupFailure(false)
if getAddress("myFreezeExit") ~= 0 then
writeInteger("myFreezeExit",1)
end
errorOnLookupFailure(true)
unregisterSymbol("myFreezeExit") |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Wed Mar 16, 2016 6:36 pm Post subject: |
|
|
| If the AOB changes, use wildcard entries. You can use read memory for bytes that are dynamic, for your disable section.
|
|
| Back to top |
|
 |
gid2525 Expert Cheater
Reputation: 2
Joined: 21 Oct 2013 Posts: 103
|
Posted: Thu Mar 17, 2016 3:58 pm Post subject: |
|
|
| ++METHOS wrote: | | If the AOB changes, use wildcard entries. You can use read memory for bytes that are dynamic, for your disable section. |
Yea, I started getting into using wildcards. I hate that this game shifts huge sections of code around and duplicates so much of it for the ai/npc. Having to sift thru multiple AOBs to get signature with 200+ bytes, sometimes a LOT more just to find a unique and to have to use that many wild cards blows. But its just that way with some of the things in this game. With some of the entries that have such huge duplicate AOB sections I decided it would be easier just to get another pointer in the updated game I have a Desktop and a laptop with game both on them so its not too hard getting the pointers.
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Mar 17, 2016 4:56 pm Post subject: |
|
|
You can save a lot of time with AOB signatures and wildcards by using GH*master's AAmaker plugin. It can generate large signatures and incorporate wildcards automatically.
|
|
| Back to top |
|
 |
gid2525 Expert Cheater
Reputation: 2
Joined: 21 Oct 2013 Posts: 103
|
Posted: Thu Mar 17, 2016 5:49 pm Post subject: |
|
|
| ++METHOS wrote: | You can save a lot of time with AOB signatures and wildcards by using GH*master's AAmaker plugin. It can generate large signatures and incorporate wildcards automatically.  |
Great Ill check it out.
|
|
| Back to top |
|
 |
|