Game address in code injection keeps changing

Memory scanning, code injection, debugger internals and other gamemodding related discussion
Post Reply
Fenekie
Cheater
Cheater
Posts: 35
Joined: Sun Mar 19, 2017 10:57 pm
Reputation: 10

Game address in code injection keeps changing

Post by Fenekie »

Hello there again,
sooo... I came here with another issue... O.o
I'm trying to make another simple code which will "freeze" battery drain for any device/tool in Subnautica.
The problem is, that the game address keeps changing and I dunno what to do about it... >.<

Code: Select all

define(address,2415E868)
define(bytes,E9 93 17 EA DB)

[ENABLE]

assert(address,bytes)
alloc(newmem,E868)

label(code)
label(return)

newmem:

code:
  // movss [rsi+1C],xmm5
  jmp return

address:
  jmp newmem
return:

[DISABLE]

address:
  db bytes
  // movss [rsi+1C],xmm5

dealloc(newmem)
Any idea how to solve it? ^.^

Bloodybone
Table Makers
Table Makers
Posts: 336
Joined: Thu Aug 03, 2017 6:19 am
Reputation: 206

Re: Game address in code injection keeps changing

Post by Bloodybone »

Fenekie wrote:
Mon Nov 06, 2017 2:53 pm
Hello there again,
sooo... I came here with another issue... O.o
I'm trying to make another simple code which will "freeze" battery drain for any device/tool in Subnautica.
The problem is, that the game address keeps changing and I dunno what to do about it... >.<

Code: Select all

define(address,2415E868)
define(bytes,E9 93 17 EA DB)

[ENABLE]

assert(address,bytes)
alloc(newmem,E868)

label(code)
label(return)

newmem:

code:
  // movss [rsi+1C],xmm5
  jmp return

address:
  jmp newmem
return:

[DISABLE]

address:
  db bytes
  // movss [rsi+1C],xmm5

dealloc(newmem)
Any idea how to solve it? ^.^
Use aob injection instead

Squall8
RCE Fanatics
RCE Fanatics
Posts: 564
Joined: Fri Mar 03, 2017 7:43 am
Reputation: 1120

Re: Game address in code injection keeps changing

Post by Squall8 »

Activate mono features. You can do this through the main UI or with a parent script using the lua call LaunchMonoDataCollector(). Also make sure Show Symbols is checked under View. I think it's checked by default anyways.

Now you can use whatever appears in the address list as a valid address for every restart.

Fenekie
Cheater
Cheater
Posts: 35
Joined: Sun Mar 19, 2017 10:57 pm
Reputation: 10

Re: Game address in code injection keeps changing

Post by Fenekie »

Mono features doesn't work for me. Maybe I'm doing something wrong, but code looks still same, maybe it should, but I just don't see any change... O.o
AOB injection works, but it takes some time, before it will still start work - tolerable for me. :D But that mono feature could be interesting, but dunno how... O.o

Squall8
RCE Fanatics
RCE Fanatics
Posts: 564
Joined: Fri Mar 03, 2017 7:43 am
Reputation: 1120

Re: Game address in code injection keeps changing

Post by Squall8 »

Of course the instruction will be the same (movss [rsi+1C],xmm5). But with mono features activated, your address (2415E868), or whatever it is at the time, will change to something like blahblahUpdateBattery+60. You can right click on the instruction in the disassembler window and click Copy To Clipboard>Opcodes and simply paste it over the address in your script. It will also copy the movss part but you can just delete that. It also eliminates the need to update the value in game just to activate the script.

For example:

Code: Select all

assert(blahblahUpdateBattery+60,E9 93 17 EA DB) - You can use your defines here too. You're just changing that initial 
address. 

Also your bytes used here is for a jmp instruction not a movss. But I'm not here to pick apart your script.
Write the rest of the code how you want.

Post Reply

Who is online

Users browsing this forum: No registered users