Page 1 of 1

my script not working why?

Posted: Sat Jan 01, 2022 1:10 pm
by Evoked100
This script basicaly change the float value ( trove.exe+D9D4A0 = 0.009999999776)

Float Value: 0.009999999776

to

Float Value : 1

Image

Script :

Code: Select all

define(address,trove.exe+4B4CCA)
define(bytes,D8 0D A0 D4 61 01)

[ENABLE]
aobScanModule(MyCheat3, Trove.exe, D80Dxxxxxxxx8BE55DC3D945FC8BE55DC3CCCCCCCCCC558BEC83EC6056)
assert(MyCheat3, D8 0D)
registerSymbol(MyCheat3)

alloc(newmem, 0x100)

label(code)
label(return)

label(SavedBytes)
registerSymbol(SavedBytes)

label(newValue)

newmem:
	code:
		fmul dword ptr [newValue]
		jmp return
	SavedBytes:
		readMem(MyCheat3, 6)
	newValue:
		dd (float)1

MyCheat3:
	jmp newmem
	nop
	return:

[DISABLE]

MyCheat3:
	readMem(SavedBytes, 6)

dealloc(newmem)
unregisterSymbol(MyCheat3)
unregisterSymbol(SavedBytes)
after enable script :

Image

this

Code: Select all

4F2D0000 - D8 0D 11002D4F        - fmul dword ptr [4F2D0011]
create this "4F2D0011" and no change the float 0.009999999776 to 1

Re: my script not working why?

Posted: Sat Jan 01, 2022 1:25 pm
by ShyTwig16
Your multiplying the value not setting it. Instead of:

Code: Select all

//...
fmul dword ptr [newValue]
//...
Try something like this, that replaces the value with a float value of one:

Code: Select all

//...
fstp st(0) // pop the current value off the FPU stack.
fld1 // load a value of 1 onto the FPU stack.
//...
EDIT:
And just to note. 0x4F2D0011 is the address of "newValue" so it is multiplying using the "newValue" and thus the loaded value won't be changed. In case that's actually what you're going for.

Re: my script not working why?

Posted: Sat Jan 01, 2022 1:33 pm
by Evoked100
ShyTwig16 wrote:
Sat Jan 01, 2022 1:25 pm
Your multiplying the value not setting it. Instead of:

Code: Select all

//...
fmul dword ptr [newValue]
//...
Try something like this, that replaces the value with a float value of one:

Code: Select all

//...
fstp st(0) // pop the current value off the FPU stack.
fld1 // load a value of 1 onto the FPU stack.
//...
thanks for reply.

new script :

Code: Select all

define(address,trove.exe+4B4CCA)
define(bytes,D8 0D A0 D4 61 01)

[ENABLE]
aobScanModule(MyCheat3, Trove.exe, D80Dxxxxxxxx8BE55DC3D945FC8BE55DC3CCCCCCCCCC558BEC83EC6056)
assert(MyCheat3, D8 0D)
registerSymbol(MyCheat3)

alloc(newmem, 0x100)

label(code)
label(return)

label(SavedBytes)
registerSymbol(SavedBytes)

label(newValue)

newmem:
	code:
		fstp st(0)
        jmp return
	SavedBytes:
		readMem(MyCheat3, 6)
	newValue:
		dd (float)1

MyCheat3:
	jmp newmem
	nop
	return:

[DISABLE]

MyCheat3:
	readMem(SavedBytes, 6)

dealloc(newmem)
unregisterSymbol(MyCheat3)
unregisterSymbol(SavedBytes)
i tryed not working

Re: my script not working why?

Posted: Sat Jan 01, 2022 1:35 pm
by ShyTwig16
You only pop the value, you still never set it with that.

Code: Select all

define(address,trove.exe+4B4CCA)
define(bytes,D8 0D A0 D4 61 01)

[ENABLE]
aobScanModule(MyCheat3, Trove.exe, D80Dxxxxxxxx8BE55DC3D945FC8BE55DC3CCCCCCCCCC558BEC83EC6056)
assert(MyCheat3, D8 0D)
registerSymbol(MyCheat3)

alloc(newmem, 0x100)

label(code)
label(return)

label(SavedBytes)
registerSymbol(SavedBytes)

newmem:
	code:
		fstp st(0)
		fld1
        jmp return
	SavedBytes:
		readMem(MyCheat3, 6)

MyCheat3:
	jmp newmem
	nop
	return:

[DISABLE]

MyCheat3:
	readMem(SavedBytes, 6)

dealloc(newmem)
unregisterSymbol(MyCheat3)
unregisterSymbol(SavedBytes)

Re: my script not working why?

Posted: Sat Jan 01, 2022 1:40 pm
by Evoked100
ShyTwig16 wrote:
Sat Jan 01, 2022 1:35 pm
You only pop the value, you still never set it with that.

Code: Select all

define(address,trove.exe+4B4CCA)
define(bytes,D8 0D A0 D4 61 01)

[ENABLE]
aobScanModule(MyCheat3, Trove.exe, D80Dxxxxxxxx8BE55DC3D945FC8BE55DC3CCCCCCCCCC558BEC83EC6056)
assert(MyCheat3, D8 0D)
registerSymbol(MyCheat3)

alloc(newmem, 0x100)

label(code)
label(return)

label(SavedBytes)
registerSymbol(SavedBytes)

newmem:
	code:
		fstp st(0)
		fld1
        jmp return
	SavedBytes:
		readMem(MyCheat3, 6)

MyCheat3:
	jmp newmem
	nop
	return:

[DISABLE]

MyCheat3:
	readMem(SavedBytes, 6)

dealloc(newmem)
unregisterSymbol(MyCheat3)
unregisterSymbol(SavedBytes)
How do I set it now to 1 instead of 0.009999999776?

add on script this?

Code: Select all

newValue:
		dd (float)1

Re: my script not working why?

Posted: Sat Jan 01, 2022 2:38 pm
by ShyTwig16
Evoked100 wrote:
Sat Jan 01, 2022 1:40 pm
...

How do I set it now to 1 instead of 0.009999999776?

add on script this?

Code: Select all

newValue:
		dd (float)1
That's what the FLD1 does, it loads a floating point value of 1 onto the FPU stack. Thus whatever the value was is popped (removed) form the FPU stack, then you load (replace) it with a value of 1.

EDIT:
Basically using one or zero is so common that there's an instruction for both. I.e.: fld1 and fldz plus some others as well.
[Link]