I am new to assembly code and am learning a lot through examining disassembled iOS code through Hopper. One thing I cannot figure out is how to determine the variables that are being used in a formatted string. Here is a code snippet.
r0 = [var_60 myCustomString];
r0 = [r0 retain];
r22 = [[NSString stringWithFormat:@"%@%@%@"] retain];
[r0 release];
As you can see a variable is set in r0 just prior to r22. Then stringWithFormat:@"%@%@%@"
is called with three variables (i.e. %@
).
How would I go about finding what the other two variables are. I know one is myCustomString but do I just go back through the code and determine what other variables have not been released? If so, what order would the formatted string work in. For example, would myCustomString
be the first format variable (%@
) or the last one since it was most recently defined.
Thank you for your help!
EDIT
Here is the decompiled view of this variable: