Skip to content
Guest Big Announcement

How can i call & modify a fat binary file functions from a tweak?

Featured Replies

no, i think is not necessary because in his tutorial, is just that i dint want to do it cause i tought he made a mistake, 

but no, he was right.

vy4321.jpg

i was writting data to the left-side address insted of the right-side address  :wallbash:

lol no worries... We all make mistakes :)

  • Replies 35
  • Views 6.2k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Actually, binary and tweak are different. Binary can only be modify using IDA. Tweak, can be add using 'code' which you will find it from FLEX. I don't know if you can modify it from a tweak, but

  • #import <CoreFoundation/CoreFoundation.h> #import <substrate.h> #import <Foundation/Foundation.h>   int (*old__ZN3Pig12getMaxHealthEv) ();   int $__ZN3Pig12getMaxHealthEv()

  • hehe yep, that is true. Does anyone know how to pass parameters to a function, this is the function i want to pass arguments to "Entity::setPos(Entity *__hidden this, float, float, float)". can anyo

  • Author

lol no worries... We all make mistakes :)

hehe yep, that is true.

Does anyone know how to pass parameters to a function, this is the function i want to pass arguments to "Entity::setPos(Entity *__hidden this, float, float, float)". can anyone tell me how to do this ?

hehe yep, that is true.Does anyone know how to pass parameters to a function, this is the function i want to pass arguments to "Entity::setPos(Entity *__hidden this, float, float, float)". can anyone tell me how to do this ?

mmm... I want to Learn too

hehe yep, that is true.

Does anyone know how to pass parameters to a function, this is the function i want to pass arguments to "Entity::setPos(Entity *__hidden this, float, float, float)". can anyone tell me how to do this ?

Screenshot the complete function and paste it here.


 

I use this ;) try it lol.. I think hater told me this

 

%ctor {

if(GetPrefBool(@"kMax"))

{

writeData(0x1AB4C8, 0x007080E5);

} else {

writeData(0x1AB4C8, 0x001080E5);

}

}

Updated by ZahirSher

  • Author

2mfisu8.pngqwymvl.pngu1vdi.png302o2t2.png


I use this  try it lol.. I think hater told me this 

%ctor {
if(GetPrefBool(@"kMax"))
{
writeData(0x1AB4C8, 0x007080E5);
} else {
writeData(0x1AB4C8, 0x001080E5);
}
}

ok ill try it out! thanks  :)

 

DiDA, this functions is long lol

Updated by CosnotraLF

@ @@CosnotraLF

#import <substrate.h>
 
#define plistPath @"/var/mobile/Library/Preferences/minecraftpehack.plist"
 
inline BOOL GetPrefBool(NSString *key)
{
    return [[[NSDictionary dictionaryWithContentsOfFile:plistPath] valueForKey:key] boolValue];
}
 
void (*Originals_Entity_setPos)(void *self, float x, float y, float z)
 
void Entity_setPos(void *self, float x, float b, float z)
{
     if(GetPrefBool(@"kPosHack"))
       {
             x = 1.0f;
             y = 2.0f;
             z = 3.0f;
       }
    else
       {
          return Originals_Entity_setPos(self, x, y, z);
       }
}
 
%ctor
{
      MSHookFunction((MSFindSymbol(NULL, "_ZN6Entity6setPosEfff")),(void *)Entity_setPos,(void **)&Originals_Entity_setPos);
}

 
the Entity * hidden this is a pointer to the entity class... u can ignore it

Updated by HATER

  • Author

I use this  try it lol.. I think hater told me this 

%ctor {
if(GetPrefBool(@"kMax"))
{
writeData(0x1AB4C8, 0x007080E5);
} else {
writeData(0x1AB4C8, 0x001080E5);
}
}

wait, so how do i do this? :confused:

@ @@CosnotraLF

#import <substrate.h>
 
#define plistPath @"/var/mobile/Library/Preferences/minecraftpehack.plist"
 
inline BOOL GetPrefBool(NSString *key)
{
    return [[[NSDictionary dictionaryWithContentsOfFile:plistPath] valueForKey:key] boolValue];
}
 
void (*Originals_Entity_setPos)(void *self, float x, float y, float z)
 
void Entity_setPos(void *self, float x, float b, float z)
{
     if(GetPrefBool(@"kPosHack"))
       {
             x = 1.0f;
             y = 2.0f;
             z = 3.0f;
       }
    else
       {
          return Originals_Entity_setPos(self, x, y, z);
       }
}
 
%ctor
{
      MSHookFunction((MSFindSymbol(NULL, "_ZN6Entity6setPosEfff")),(void *)Entity_setPos,(void **)&Originals_Entity_setPos);
}

 

the Entity * hidden this is a pointer to the entity class... u can ignore it

Thanks!! :).

One more problem solved!

This is my favorite forum for a bunch of reasons.

One of them is : THERE IS AWESOME PEOPLE like you all guys :)

Updated by CosnotraLF

wait, so how do i do this? :confused:

 

Thanks!! :).

One more problem solved!

This is my favorite forum for a bunch of reasons.

One of them is : THERE IS AWESOME PEOPLE like you all guys :)

:)
  • Author

I found an easier way.

What if you just make a new function that calls original function.

You just got to call new function with your parameters, and that function is going to pass the parameters to the original function :).

Finally I discovered something by myself :)(not relly discovered, cause I think some people knew this before me, but you know what I mean)

Updated by CosnotraLF

I found an easier way.

What if you just make a new function that calls original function.

You just got to call new function with your parameters, and that function is going to pass the parameters to the original function :).

Finally I discovered something by myself :)(not relly discovered, cause I think some people knew this before me, but you know what I mean)

Lol

Create an account or sign in to comment

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.