FreeER Grandmaster Cheater Supreme Reputation: 53 Joined: 09 Aug 2013 Posts: 1091
|
Posted: Mon May 08, 2017 6:26 am Post subject: |
|
|
I'd say change the code a bit then you can have two scripts, one to change the code to something like this:
Code: | [ENABLE]
aobscan(testscript,58 48 8B 83 F0 00 00 00 0F 28 90 A0 01 00 00)
alloc(newmem,$1000)
label(code)
label(return)
label(endcode)
label(scriptNameEnabled)
newmem:
cmp [rax+000000AC],0
je code
cmp byte ptr [enabled], 0
je @f
mov [rax+000001A0],(float)-10000
jmp code
@@: // anonymous label
mov [rax+000001A0],(float)-6000
code:
movaps xmm2,[rax+000001A0]
jmp return
scriptNameEnabled:
db 0 // false
testscript+08:
jmp newmem
nop
nop
return:
registersymbol(testscript)
registersymbol(scriptNameEnabled)
[DISABLE]
testscript+08:
db 0F 28 90 A0 01 00 00
dealloc(newmem)
unregistersymbol(testscript)
unregistersymbol(scriptNameEnabled)
|
and the other would toggle which value is moved. Or you could just have two separate scripts, on that moved -10000 and one that moved -6000...
Code: | [ENABLE]
scriptNameEnabled:
db 1 // true
[DISABLE]
scriptNameEnabled:
db 0 // false |
Though at that point you could do something like this:
Code: | [ENABLE]
aobscan(testscript,58 48 8B 83 F0 00 00 00 0F 28 90 A0 01 00 00)
alloc(newmem,$1000)
label(code)
label(return)
label(endcode)
label(scriptNameValue)
newmem:
cmp [rax+000000AC],0
je code
push rbx
mov rbx, dword ptr [scriptNameValue]
mov [rax+1a0], rbx
pop rbx
code:
movaps xmm2,[rax+000001A0]
jmp return
scriptNameValue:
dd (float)-10000
testscript+08:
jmp newmem
nop
nop
return:
registersymbol(testscript)
registersymbol(scriptNameValue)
[DISABLE]
testscript+08:
db 0F 28 90 A0 01 00 00
dealloc(newmem)
unregistersymbol(testscript)
unregistersymbol(scriptNameValue)
|
and then you could add a value with scriptNameValue as the address and the user can change what value is set by changing that value in the address list.
There may be other ways to do it but those are the most obvious to me.
|
|