Jump to content

5 posts in this topic

Recommended Posts

Posted

i have found this 2 line but with has SUB but with SP, i don't think i can manage to hack that.....another line has no SUB....pls advice if theres any hackable things in this 2 line:

LINE 1

; EnergyUsedChangeEvent - (id)csv
; Attributes: bp-based frame

; id __cdecl -[EnergyUsedChangeEvent csv](struct EnergyUsedChangeEvent *self, SEL)
__EnergyUsedChangeEvent_csv_

var_18= -0x18
var_14= -0x14
var_10= -0x10

PUSH            {R4-R7,LR}
ADD             R7, SP, #0xC
SUB             SP, SP, #0x14
MOV             R1, #(off_354998 - 0xC7A3E)
MOV             R12, #(_OBJC_IVAR_$_EnergyUsedChangeEvent.remainingEnergy - 0xC7A48) ; int remainingEnergy;
MOV             LR, #(_OBJC_IVAR_$_EnergyUsedChangeEvent.sceneItems - 0xC7A54) ; NSString *sceneItems;
MOVW            R9, #:lower16:(_OBJC_IVAR_$_EnergyUsedChangeEvent.usedEnergy - 0xC7A52) ; int usedEnergy;
ADD             R1, PC ; off_354998
MOVT.W          R9, #:upper16:(_OBJC_IVAR_$_EnergyUsedChangeEvent.usedEnergy - 0xC7A52) ; int usedEnergy;
MOVW            R5, #:lower16:(_OBJC_IVAR_$_EnergyUsedChangeEvent.sceneId - 0xC7A50) ; int sceneId;
ADD             R12, PC ; int remainingEnergy;
MOVT.W          R5, #:upper16:(_OBJC_IVAR_$_EnergyUsedChangeEvent.sceneId - 0xC7A50) ; int sceneId;
LDR             R1, [R1] ; int version;
ADD             R5, PC  ; int sceneId;
ADD             R9, PC  ; int usedEnergy;
ADD             LR, PC  ; NSString *sceneItems;
LDR.W           R3, [R12] ; int remainingEnergy;
LDR.W           R4, [R9] ; int usedEnergy;
MOVW            R9, #:lower16:(selRef_stringWithFormat_ - 0xC7A6C)
LDR.W           R12, [LR] ; NSString *sceneItems;
MOVT.W          R9, #:upper16:(selRef_stringWithFormat_ - 0xC7A6C)
LDR             R5, [R5] ; int sceneId;
ADD             R9, PC ; selRef_stringWithFormat_
LDR             R2, [R1] ; int version;
LDR.W           LR, [R0,R3]
LDR             R6, [R0,R4]
LDR             R5, [R0,R5]
LDR.W           R12, [R0,R12]
LDR             R3, [R0,R2]
MOV             R2, #(off_354994 - 0xC7A8A)
LDR.W           R1, [R9] ; "stringWithFormat:"
ADD             R2, PC ; off_354994
LDR             R2, [R2] ; int time;
LDR             R2, [R2] ; int time;
LDR             R4, [R0,R2]
MOV             R0, #(classRef_NSString - 0xC7A9A)
ADD             R0, PC ; classRef_NSString
LDR             R0, [R0] ; _OBJC_CLASS_$_NSString
MOV             R2, #(cfstr_DDEuDDD - 0xC7AAA) ; "%d,%d,eu,%d,%d,%d,%@"
STMEA.W         SP, {R4,R6}
ADD             R2, PC  ; "%d,%d,eu,%d,%d,%d,%@"
STR             R5, [SP,#0x20+var_18]
STR.W           LR, [SP,#0x20+var_14]
STR.W           R12, [SP,#0x20+var_10]
BLX             _objc_msgSend
ADD             SP, SP, #0x14
POP             {R4-R7,PC}
; End of function -[EnergyUsedChangeEvent csv]

 

LINE 2

; EnergyUsedChangeEvent - (int)usedEnergy

; int __cdecl -[EnergyUsedChangeEvent usedEnergy](struct EnergyUsedChangeEvent *self, SEL)
__EnergyUsedChangeEvent_usedEnergy_
MOV             R1, #(_OBJC_IVAR_$_EnergyUsedChangeEvent.usedEnergy - 0xC7AC8) ; int usedEnergy;
ADD             R1, PC  ; int usedEnergy;
LDR             R1, [R1] ; int usedEnergy;
LDR             R0, [R0,R1]
BX              LR
; End of function -[EnergyUsedChangeEvent usedEnergy]

Posted

Try one of these 

	STR             R5, [SP,#0x20+var_18]
STR.W           LR, [SP,#0x20+var_14]
STR.W           R12, [SP,#0x20+var_10] 

Posted
10 minutes ago, Archangel04 said:

Try one of these 

 


	STR             R5, [SP,#0x20+var_18]
STR.W           LR, [SP,#0x20+var_14]
STR.W           R12, [SP,#0x20+var_10] 

 

I'm sorry, I'm still a noob....those line looks complicated to me.....just change STR to NOP ?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines