 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
GuruD How do I cheat?
Reputation: 0
Joined: 28 May 2025 Posts: 1
|
Posted: Wed Jun 25, 2025 10:16 pm Post subject: I get an error |
|
|
I would love some help with this error
Quote: | "This script uses nearby allocation but it's impossible to allocate nearby "some_address", please rewrite the script to function without nearby allocation" |
if anyone can help me out and explain a preferably simple work around that would be greatly appreciated, thanks.
this is my script:
Code: | [ENABLE]
aobscan(CharacterAfflictions1,F3 0F 10 8E D0 00 00 00 F3 0F 5A) // should be unique
alloc(newmem,$1000,CharacterAfflictions1)
globalalloc(CharacterAfflictions2,8)
label(code)
label(return)
newmem:
code:
push rax
mov rax,rsi
mov [CharacterAfflictions2],rax
pop rax
movss xmm1,[rsi+000000D0]
jmp return
CharacterAfflictions1:
jmp newmem
nop 3
return:
registersymbol(CharacterAfflictions1)
[DISABLE]
CharacterAfflictions1:
db F3 0F 10 8E D0 00 00 00
unregistersymbol(CharacterAfflictions1)
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: CharacterAfflictions:UpdateNormalStatuses+1ff
CharacterAfflictions:UpdateNormalStatuses+1ce: 83 38 00 - cmp dword ptr [rax],00
CharacterAfflictions:UpdateNormalStatuses+1d1: 48 8D 64 24 00 - lea rsp,[rsp+00]
CharacterAfflictions:UpdateNormalStatuses+1d6: 49 BB 10 F5 61 6F 15 02 00 00 - mov r11,CharacterData:get_fullyConscious
CharacterAfflictions:UpdateNormalStatuses+1e0: 41 FF D3 - call r11
CharacterAfflictions:UpdateNormalStatuses+1e3: 85 C0 - test eax,eax
CharacterAfflictions:UpdateNormalStatuses+1e5: 0F 84 68 00 00 00 - je CharacterAfflictions:UpdateNormalStatuses+253
CharacterAfflictions:UpdateNormalStatuses+1eb: 66 66 90 - nop 3
CharacterAfflictions:UpdateNormalStatuses+1ee: 49 BB 20 4C 9A 6E 15 02 00 00 - mov r11,UnityEngine.Time:get_deltaTime
CharacterAfflictions:UpdateNormalStatuses+1f8: 41 FF D3 - call r11
CharacterAfflictions:UpdateNormalStatuses+1fb: F3 0F 5A C0 - cvtss2sd xmm0,xmm0
// ---------- INJECTING HERE ----------
CharacterAfflictions:UpdateNormalStatuses+1ff: F3 0F 10 8E D0 00 00 00 - movss xmm1,[rsi+000000D0]
// ---------- DONE INJECTING ----------
CharacterAfflictions:UpdateNormalStatuses+207: F3 0F 5A C9 - cvtss2sd xmm1,xmm1
CharacterAfflictions:UpdateNormalStatuses+20b: F2 0F 59 C1 - mulsd xmm0,xmm1
CharacterAfflictions:UpdateNormalStatuses+20f: F2 0F 11 45 E8 - movsd [rbp-18],xmm0
CharacterAfflictions:UpdateNormalStatuses+214: 66 90 - nop 2
CharacterAfflictions:UpdateNormalStatuses+216: 49 BB 60 F5 61 6F 15 02 00 00 - mov r11,Ascents:get_hungerRateMultiplier
CharacterAfflictions:UpdateNormalStatuses+220: 41 FF D3 - call r11
CharacterAfflictions:UpdateNormalStatuses+223: F3 0F 5A C8 - cvtss2sd xmm1,xmm0
CharacterAfflictions:UpdateNormalStatuses+227: F2 0F 10 45 E8 - movsd xmm0,[rbp-18]
CharacterAfflictions:UpdateNormalStatuses+22c: F2 0F 59 C1 - mulsd xmm0,xmm1
CharacterAfflictions:UpdateNormalStatuses+230: 48 8B CE - mov rcx,rsi
} |
_________________
... |
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4691
|
Posted: Thu Jun 26, 2025 12:01 am Post subject: |
|
|
Select the instruction at the address CharacterAfflictions:UpdateNormalStatuses+1ff, open a new AA script window, and generate a new AOBScan template using a 14-byte jmp instead. There should be a setting in the template menu IIRC. It could also be named "far jmp" or "long jump". Then, copy what you did in the script you already wrote.
If you want to do it manually, extend the AOBscan pattern to enough instructions to fill 14 bytes (here it's 16 bytes), remove the third parameter to alloc (",CharacterAfflictions1"), put the additional instructions in the code injection (cvtss2sd / mulsd), change "jmp newmem" to "jmp far newmem", change the number of nops to the number of extra bytes past 14 bytes (2), and change the `db` pseudoinstruction such that it writes back all of the new original code (all 16 bytes).
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|