View previous topic :: View next topic |
Author |
Message |
Skyrimfus Cheater Reputation: 1
Joined: 17 Mar 2016 Posts: 42
|
Posted: Wed Aug 11, 2021 5:48 am Post subject: define AA labels with lua (inside the same script) |
|
|
Is it possible to define a AA label inside the {$lua} part of the script?
Example:
Code: |
[ENABLE]
//aobscanmodule(INJECT,Tutorial-x86_64.exe,81 BB F0 07 00 00 E8 03 00 00)
//alloc(newmem,$1000,INJECT)
{$lua}
if syntaxcheck then return end
INJECT = AOBScan("81 BB F0 07 00 00 E8 03 00 00 75 ?? 48 8B 8B C0 07 00 00")
newmem = allocateMemory(1000,INJECT)
{$asm}
label(code)
label(return)
newmem:
code:
cmp [rbx+000007F0],000003E8
jmp return
INJECT:
jmp newmem
nop 5
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db 81 BB F0 07 00 00 E8 03 00 00
unregistersymbol(INJECT)
dealloc(newmem) |
So in this script i want to reference the INJECT and newmem lua variables as AA labels, is that possible?
I know I can register symbols with lua and reference them that way, but those symbols are then global, is there something similar that's local to the script?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Wed Aug 11, 2021 5:59 am Post subject: |
|
|
before {$asm} add the line:
Code: |
return string.format('define(newmem,%x)',newmem)
|
you may also want to adjust the dealloc in disable and replace it with a lua block (You'll have to keep track of the address of newmem yourself)
_________________
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 |
|
|
Skyrimfus Cheater Reputation: 1
Joined: 17 Mar 2016 Posts: 42
|
Posted: Wed Aug 11, 2021 6:01 am Post subject: |
|
|
ah ofcourse, I had completely forgot that whatever string you return it gets "pasted" into the script. Thanks!
|
|
Back to top |
|
|
|