| View previous topic :: View next topic |
| Author |
Message |
themandem Cheater
Reputation: 0
Joined: 06 Dec 2019 Posts: 41
|
Posted: Sat Aug 21, 2021 12:18 am Post subject: How to jump near allocated memory when there is long jump? |
|
|
in this 64 bit game, Final Fantasy XV, i'm trying to make infinite health and one hit kills, but when i activate the script it does a long jump (use larger allocated memory) which means my game could likely crash while enabling/disabling the script.
Is there a way to tell the script to jump 'near' or jump 'short' in allocated memory? How can I do it? I will post my script, if you have suggestion to add to my code to fix this large jump issue, please specify where I need to put the code you're telling me to edit. Thanks
| Code: |
[ENABLE]
aobscanmodule(health1,ffxv_s.exe,89 83 A0 01 00 00 41 D1 C8) // should be unique
alloc(newmem,$1000,"ffxv_s.exe"+1D5A41)
label(code)
label(return)
label(infhealth)
label(infhealth_flag)
label(ohk)
label(ohk_flag)
registersymbol(infhealth_flag)
registersymbol(ohk_flag)
registersymbol(health1)
newmem:
cmp [rbx+180],#257 //player check
je infhealth
cmp byte ptr [ohk_flag],1
je ohk
jmp code
infhealth:
cmp byte ptr [infhealth_flag],0
je code
push rcx
mov rcx,[rbx+1A4] // health cap
mov [rbx+1A0],rcx // current health
pop rcx
jmp return
code:
mov [rbx+000001A0],eax // original code
jmp return
ohk:
mov eax,0
mov [rbx+000001A0],eax
jmp return
infhealth_flag:
db 0
ohk_flag:
db 0
health1:
jmp newmem
nop
return:
[DISABLE]
health1:
db 89 83 A0 01 00 00 41 D1 C8
unregistersymbol(health1)
unregistersymbol(infhealth_flag)
unregistersymbol(ohk_flag)
dealloc(newmem)
|
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25806 Location: The netherlands
|
Posted: Sat Aug 21, 2021 2:17 am Post subject: |
|
|
is kernelmode query memory regions enabled in settings? if so, disable that
alternatively, adjust your code that it assumes a 14 byte jmp and use jmp far newmem
_________________
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 |
|
 |
themandem Cheater
Reputation: 0
Joined: 06 Dec 2019 Posts: 41
|
Posted: Sat Aug 21, 2021 7:04 pm Post subject: |
|
|
| Dark Byte wrote: | is kernelmode query memory regions enabled in settings? if so, disable that
alternatively, adjust your code that it assumes a 14 byte jmp and use jmp far newmem |
hmm you know kernel mode was on from the previous game I was working on and ever since that I've started having this issue (don't think I was having it before ).
Anyway, I did what you said. I put
| Code: | health1:
jmp far newmem
nop
return:
[DISABLE] |
ahh I can't post screenshots, but game is still crashing. The code looks like this now. Did I miss something? anything else I need to change?:
| Code: | [ENABLE]
aobscanmodule(health1,ffxv_s.exe,89 83 A0 01 00 00 41 D1 C8) // should be unique
alloc(newmem,$1000,health1)
label(code)
label(return)
label(infhealth)
label(infhealth_flag)
label(ohk)
label(ohk_flag)
registersymbol(infhealth_flag)
registersymbol(ohk_flag)
registersymbol(health1)
newmem:
cmp [rbx+180],#257 //player check
je infhealth
cmp [ohk_flag],1
je ohk
jmp code
infhealth:
cmp [infhealth_flag],0
je code
push rcx
mov rcx,[rbx+1A4] // health cap
mov [rbx+1A0],rcx // current health
pop rcx
jmp far return
code:
mov [rbx+000001A0],eax // original code
jmp far return
ohk:
mov eax,0
mov [rbx+000001A0],eax
jmp far return
infhealth_flag:
dd 0
ohk_flag:
dd 0
health1:
// "ffxv_s.exe"+1D5A41:
jmp far newmem
nop
return:
[DISABLE]
health1:
db 89 83 A0 01 00 00 41 D1 C8
unregistersymbol(health1)
unregistersymbol(infhealth_flag)
unregistersymbol(ohk_flag)
dealloc(newmem) |
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25806 Location: The netherlands
|
Posted: Sat Aug 21, 2021 7:18 pm Post subject: |
|
|
you're not executing all of the original 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 |
|
 |
themandem Cheater
Reputation: 0
Joined: 06 Dec 2019 Posts: 41
|
Posted: Sat Aug 21, 2021 8:30 pm Post subject: |
|
|
| Dark Byte wrote: | | you're not executing all of the original code |
sorry bear with me, i'm noob o.o
but what do you mean by that? what code do I need to add?
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25806 Location: The netherlands
|
Posted: Sun Aug 22, 2021 12:11 am Post subject: |
|
|
your jmp to newmem is now 14 bytes
so all 14 bytes+the leftover need to be saved
_________________
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 |
|
 |
themandem Cheater
Reputation: 0
Joined: 06 Dec 2019 Posts: 41
|
Posted: Sun Aug 22, 2021 8:34 am Post subject: |
|
|
| Dark Byte wrote: | your jmp to newmem is now 14 bytes
so all 14 bytes+the leftover need to be saved |
just to clarify, when I inject the code, something like this appears:
| Code: | health1 - FF25 00000000 0000BB0700000000 - jmp 07BB0000
|
how did you even know it's jumping 14 bytes when I haven't showed you o.O you know what nvm.
anyway i just wanna thank you DARK BYTE for the help. and cheat engine is a great program. i hope you can add something to it that can help avoid this whole thing with the long jumps for 64-bit games.
The late replies from me were because i was trying to understand what's going on getting help from 4 different people in the discord. yeah it took 4 ppl to help me understand lool I learned a lot!
oh Dark byte, since I have your attention, can I ask you to add a GUI thing to CE where when you Ctrl+S (save) your cheat table it shows a notification of some sort. I Ctrl+S my cheat tables throughout, but like i hit the hotkey probably 10-20 times because of my OCD LOL. just need a little affirmation that shows it indeed has saved and i'll be relieved. The way Microsoft word does...
|
|
| Back to top |
|
 |
|