Jump to content

memoryTools.h | HEADER FOR WRITING/READING MEMORY


59 posts in this topic

Recommended Posts

Updated (edited)

Hello, I want to share my memory manager for iOS, it can read and write from memory, sharing it because I haven't seen anything else that lets you read memory and it's also nicer to have a templated function so you can pass a struct with 5 ints instead of having to call write_mem 5 times (CPU and code efficient) .

 

1. Create a file called memoryTools.h(doesn't matter what you call it) and paste the source to that file.

2. Place it in theos/include

3. Include it in your cheat with "#include <memoryTools.h>"

Hidden Content

React or reply to this topic to see the hidden content & download link. 👀

Usage: 

write_mem<data_type>(address, whattowrite, size(IF LEFT OUT, IT WILL USE sizeof(data_type));
data_type variable = read_mem<data_type>(address);
                     

You can pass whatever data type you want to the function so if you'd want to make a teleport cheat you could easily write a Vector3 to where your position is in memory. Saving current position could also be done with read_mem<Vector3>.

Masskill aimbots can be done by looping through all enemies and placing them infront of you.

struct Vector3
{
  public:
  float x;
  float y;
  float z;
}

Vector3 my_pos;
Vector3 teleport_pos;

teleport_pos.x = 123; teleport_pos.y = 123; teleport_pos.z = 123;

write_mem<Vector3>(get_slide() + localplayer + position_offset, teleport_pos); //Teleports you to (123,123,123)
my_pos = read_mem<Vector3>(get_slide() +  + localplayer + position_offset); //Saves your location to my_pos

Example:

#import <memoryTools.h>
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <substrate.h>
  
%ctor 
{
	port = mach_task_self();
	write_mem<int>(get_slide() + 0x100AF9654, CFSwapInt32(0x0ED0671E));
	write_mem<int>(get_slide() + 0x100AF87AC, CFSwapInt32(0xE803679E));
}
//Final Fantasy Awakening hack. https://iosgods.com/topic/65503-final-fantasy-awakening-en-v1134-arm64-god-mod-damage-offset/

@intell Used your hack as an example, should be fine as you uploaded it? Tell me if not.

 

IMPORTANT NOTE: Before contacting me and saying "this sh!t isn't working watdefuk". Look at the example above, you need to add slide to offset and if you're writing bytes you need them in reversed order (if I remember correctly), so you need to use CFSwapInt16/32/64.

 https://developer.apple.com/documentation/corefoundation/1425262-cfswapint32?language=objc

I could've included it but when writing an integer to let's say health you wouldn't want to do it.

 

Updated by Affe2626
hide tags
  • Like 82
  • Winner 5
  • Thanks 11
  • Haha 2
  • Agree 7
  • Informative 5

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