"this instruction cannot be assembled because the distance..."
Posted: Mon Nov 04, 2024 9:04 am
hi friends....
i'm facing a problem that require your help and knowledge i'm lacking of...
sometime when i write some scripts like infinite health or whatever, the script syntax is ok but when i want to execute it by ticking the box in cheat engine, it does not activate and i got the following warning message....
"This instruction cannot be assembled because the distance between the current adress and adressed adress is too big.
Try placing the adress in a register first and use that"
Can someone show me how to bypass this problem...what code should i use instead ?
thanx you all...
here is the script that pops this message up...
[ENABLE]
aobscan(INJECT,89 87 FC 00 00 00 48 8B 47 68)
alloc(newmem,$1000,INJECT)
label(code infhp)
label(return)
newmem:
cmp [basepl],rdi // ---> Line that is source of the problem
je infhp
code:
mov [rdi+000000FC],eax
jmp return
infhp:
mov eax,#999
mov [rdi+000000FC],eax
jmp return
INJECT:
jmp newmem
nop
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db 89 87 FC 00 00 00
unregistersymbol(INJECT)
dealloc(newmem)
i'm facing a problem that require your help and knowledge i'm lacking of...
sometime when i write some scripts like infinite health or whatever, the script syntax is ok but when i want to execute it by ticking the box in cheat engine, it does not activate and i got the following warning message....
"This instruction cannot be assembled because the distance between the current adress and adressed adress is too big.
Try placing the adress in a register first and use that"
Can someone show me how to bypass this problem...what code should i use instead ?
thanx you all...
here is the script that pops this message up...
[ENABLE]
aobscan(INJECT,89 87 FC 00 00 00 48 8B 47 68)
alloc(newmem,$1000,INJECT)
label(code infhp)
label(return)
newmem:
cmp [basepl],rdi // ---> Line that is source of the problem
je infhp
code:
mov [rdi+000000FC],eax
jmp return
infhp:
mov eax,#999
mov [rdi+000000FC],eax
jmp return
INJECT:
jmp newmem
nop
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db 89 87 FC 00 00 00
unregistersymbol(INJECT)
dealloc(newmem)