harpov Posted April 15, 2024 Posted April 15, 2024 Hi! Can you tell me how to hook a parameter of this method through game guardian. (il2cpp.so) I will be grateful for your help below is an example of my method [Token(Token = "0x60014AD")] [Address(RVA = "0xAFA720", Offset = "0xAFA720", VA = "0xAFA720")] public static Sprite getFrame(string id = "") { return null; }
MC874 Posted April 17, 2024 Posted April 17, 2024 Hi @harpov, you're trying to pass a string as parameter. It is kind of difficult in Game Guardian, since it can only replace existing memory. String is handled as pointer, when function asking for string types, it is asking the pointer of the string not the string itself. It is because string can consist more than one character, which there will be several hex/bytes representing each character. You might want to read this: ARM Patching Quote public static Sprite getFrame(string id = "") { return null; } I've seen that you're only trying to make it return null. First, you need to check wether the function is void or returning something. If you're intending to disable the function just do: BX LR 1E FF 2F E1 If it's void, disabling the function can crash the game. Alternatively you can pass one character to the parameter. You can try to convert character to hex: UTF8 to Hex. For example, character 'a' is '0x61' in hex. So you can do something like this: MOV R1, 0x61 61 10 A0 E3 Note that you need to adjust the 'R1' or the register according to the parameter. First parameter is usually passed into R1 register, but since it is a string, you might looking for LDR/LDRB instruction inside the function and change it with the instruction above.
THETWINSOFFICIAL Posted June 4, 2024 Posted June 4, 2024 On 4/15/2024 at 10:59 PM, harpov said: Hi! Can you tell me how to hook a parameter of this method through game guardian. (il2cpp.so) I will be grateful for your help below is an example of my method [Token(Token = "0x60014AD")] [Address(RVA = "0xAFA720", Offset = "0xAFA720", VA = "0xAFA720")] public static Sprite getFrame(string id = "") { return null; } https://youtu.be/cfW7I9IRe6E
Question
harpov
Hi! Can you tell me how to hook a parameter of this method through game guardian. (il2cpp.so) I will be grateful for your help
below is an example of my method
[Token(Token = "0x60014AD")]
[Address(RVA = "0xAFA720", Offset = "0xAFA720", VA = "0xAFA720")]
public static Sprite getFrame(string id = "")
{
return null;
}
3 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.