Jump to content

1 post in this topic

Recommended Posts

Posted

Hello, 

I am having a hard time trying to figure out how to get rid of the virtual memory protection in an offset ~ I want to inject a negative value to an offset 

So ...I've tried using a method called CFSwapInt32 to swap the UINT to INT the only problem is when I compile my tweak it crashes the game instantly whenever I try to go to where I changed the offset in the game

How do I know it's an unsigned int? I have been trying to inject the same code (with a negative value) without CFSwapInt32 and it doesn't crash the game but it brings the value to the max value of an unsigned int (even though I injected a negative number into the offset???)

Also the negative number value is -999

I have the correct offset because I have tried injecting 0 to the offset and it worked but I now would like to change it to -999

 

Here is the hex code I am using ~ 0xC07C8012  (which is MOV W0, #-999)

I have another hex code that I inject to return the function ~ 0xC0035FD6 (which is RET)

 

So how do I approach this issue? It seems more complex than changing the uint to an int (because of the memory protection)

How do I correctly use vm_prot to remove the memory protection? I am using a header in the Tweak.xm called "writeData.h" (where vm_prot is located)

 

 

Also I am not familiar with using the vm_prot so that is where I need the most help

THANK YOU 

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