Help! Can we multiply k__backingfield in arm ?

RadenVJ

Solid & Active Platinian
Original poster
Nov 11, 2018
70
39
18
28
Indonesia
Example in ida :
str r1, [r0, #0x14]
Bx lr

and maybe in dll will be like this :
Set_amount(int values)
{
Return this.<amount>k__backingfield = values
}

My question how to write "return this.<amount>k__backingfield = values * 100" in arm?

Sorry for stupid question , i hope someone will guide me how to multiply in arm ? ??
 

Yaskashije

PMT Elite Modder
Staff member
Modding-Team
Sep 9, 2018
4,552
834,349
1,213
Minkowski Space
You have the following:

Code:
str r1, [r0, #0x14]

Bx lr
This means r1 value is brought by the function that calls since its an str (r1 in functA; send r1 to Set_amount(int values); save r1 into some field), you want to find it's call and edit that r1.

MUL operation only works with registries, so there are several options:
Code:
mul r1, r1, r1
Or, find when is r1 assigned its value (maybe a MOV r1, rn) andreplace it with:
Code:
mul r1, rn, rn
(Squaring is better than *100 on values bigger than 100)

If you know some other register holds a value you'd like to multiply, you can use it too.


However, I'd advice you to use hooking, since this allows you to have direct access to fields, and assign them stuff like
Code:
return this.<amount>k__backingfield = values * 100
or even slider multipliers.
 

RadenVJ

Solid & Active Platinian
Original poster
Nov 11, 2018
70
39
18
28
Indonesia
"However, I'd advice you to use hooking, since this allows you to have direct access to fields, and assign them stuff like"

Nah how to use hooking method ? ?