0

So i'm new to the whole reverse engineering thing with only experience in C#. So I wanted to try and change the framerate of applications (eg. this unity game) at an assembly level on iOS ( I have an 120hz iPad pro so I find it really important.) Therefore to learn how this was done I decrypted the binary of my very own app on the app store and then compared it with the C++ code that is created when unity exports to Xcode. enter image description here

Note the highlighted area and the value of 120 (the framerate). This is in C++. enter image description here But now in assembly note how the value is simply "System.Int32" Soo what happened to it? Maybe it's something to do with the /hidden argument/ in the C++ code? but for other apps I obviously won't have access to that. I'm still new to this and i've been trying to learn the basics of assembly. I'm just baffled as to what I should do and how the value can be changed? If someone could explain how to do so that would be great. If not a helpful pointer as to what I should learn and do next to solve this problem, maybe links to articles would be also helpful. Thanks in advance.

closed as off-topic by perror, julian, de6f, TechLord, kn0x Mar 14 '18 at 13:34

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking for help reverse-engineering a specific system are off-topic unless they demonstrate an understanding of the concepts involved and clearly identify a specific problem." – perror, julian, de6f, TechLord, kn0x
If this question can be reworded to fit the rules in the help center, please edit the question.

1

Unity is written in C# and in C#, there are things that are called properties. Behind the scene there are two methods (called getter, and setter) but in the source code it looks like there is no function calls. This is how TargetFrameRate looks like:

public int TargetFrameRate { get; set;} // getter & setter omitted for brevity

What you see in your assembly is in fact calling the setter (thus set_targetFrameRate). And as those are not method, there can only be one value that is passed to them (or assigned as in C# code they look like normal assignment operation i.e. TargetFrameRate = 120).

Of course Obj-C/Swift and C++ are different and does not support those so that have to be mitigated and for some reason they were coded like that (method & more than one value).

So there is no issue that you see only one argument that set_TargetFrameRate takes.

What more you can do is to open Unity3d in .net decompiler like dnSpy and verify that this is in fact how TargetFrameRate looks like:

enter image description here

Since it has an InternalCall & extern you would need to dig a bit deeper to get to the actual implementation.

  • ok thanks for the response but what do you mean by dig deeper? Is the code I'm looking for still in the app binary or elsewhere? – Arke12917 Mar 14 '18 at 1:56
  • it's in one of the unity dll's - but why do you need the code for that? Shouldn't you just set a value to whatever targetFrameRate you want? – Paweł Łukasik Mar 14 '18 at 7:34
  • ah it's ok I understood what you meant. Found the value, changed it, didn't do much. That was expected though, Thanks for your help. – Arke12917 Mar 15 '18 at 12:46

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .