Discussion no update function

power2020202020

Solid & Active Platinian
Original poster
Nov 3, 2022
58
15
8
34
brazil
Hello, I know how to do hooking with update but I have a game that in its class there is no update to connect a function maximum private field I found was this 2 similar in the same class but I did hooking and it didn't work does anyone have any tips when there is no function update in the same class?

private int _newTrophyCount; // 0x2C
public void set_newTrophyCount(int value) { } 0x1352E98


bool trophies = false;

void(*old_newTrophyCount)(void *instance);
void newTrophyCount(void *instance) {
if(instance != NULL) {
if (thophies) {
*(int *) ((uint64_t) instance + 0x2C) = 50;
}
}
old_newTrophyCount(instance);
}

MSHookFunction((void *)getAbsoluteAddress("libil2cpp.so", 0x1352E98), (void *) newTrophyCount, (void **) &old_newTrophyCount);

OBFUSCATE("10_Toggle_trophies"),

case 10:
trophies = !trophies;
break;

here this whole class yes I already used the public int mode with the same name public int get_newTrophyCount() { } and nothing in the game changed I did it with hexpatcher and with connect int mode

complete class if anyone can help me find the hidden update function

public class AC_RoundEndOk : IPacket // TypeDefIndex: 8635
{
// Fields
public static readonly uint Key; // 0x0
private MatchResult _result; // 0x8
private int _isLastRound; // 0xC
private List<int> _score; // 0x10
private int _chestSlot; // 0x14
private int _chestId; // 0x18
private long _chestTimeObtained; // 0x20
private int _newKnockoutProgress; // 0x28
private int _newTrophyCount; // 0x2C
private int _newLeagueId; // 0x30
private int _leagueChange; // 0x34

// Methods

// RVA: 0x1352CAC Offset: 0x1352CAC VA: 0x1352CAC Slot: 5
public uint GetCommand() { }

// RVA: 0x1352D20 Offset: 0x1352D20 VA: 0x1352D20
public static AC_RoundEndOk CreatePacket() { }

// RVA: 0x1352E18 Offset: 0x1352E18 VA: 0x1352E18
public MatchResult get_result() { }

// RVA: 0x1352E20 Offset: 0x1352E20 VA: 0x1352E20
public void set_result(MatchResult value) { }

// RVA: 0x1352E28 Offset: 0x1352E28 VA: 0x1352E28
public int get_isLastRound() { }

// RVA: 0x1352E30 Offset: 0x1352E30 VA: 0x1352E30
public void set_isLastRound(int value) { }

// RVA: 0x1352E38 Offset: 0x1352E38 VA: 0x1352E38
public List<int> get_score() { }

// RVA: 0x1352E40 Offset: 0x1352E40 VA: 0x1352E40
public void set_score(List<int> value) { }

// RVA: 0x1352E48 Offset: 0x1352E48 VA: 0x1352E48
public int get_chestSlot() { }

// RVA: 0x1352E50 Offset: 0x1352E50 VA: 0x1352E50
public void set_chestSlot(int value) { }

// RVA: 0x1352E58 Offset: 0x1352E58 VA: 0x1352E58
public int get_chestId() { }

// RVA: 0x1352E60 Offset: 0x1352E60 VA: 0x1352E60
public void set_chestId(int value) { }

// RVA: 0x1352E68 Offset: 0x1352E68 VA: 0x1352E68
public long get_chestTimeObtained() { }

// RVA: 0x1352E70 Offset: 0x1352E70 VA: 0x1352E70
public void set_chestTimeObtained(long value) { }

// RVA: 0x1352E80 Offset: 0x1352E80 VA: 0x1352E80
public int get_newKnockoutProgress() { }

// RVA: 0x1352E88 Offset: 0x1352E88 VA: 0x1352E88
public void set_newKnockoutProgress(int value) { }

// RVA: 0x1352E90 Offset: 0x1352E90 VA: 0x1352E90
public int get_newTrophyCount() { }

// RVA: 0x1352E98 Offset: 0x1352E98 VA: 0x1352E98
public void set_newTrophyCount(int value) { }

// RVA: 0x1352EA0 Offset: 0x1352EA0 VA: 0x1352EA0
public int get_newLeagueId() { }

// RVA: 0x1352EA8 Offset: 0x1352EA8 VA: 0x1352EA8
public void set_newLeagueId(int value) { }

// RVA: 0x1352EB0 Offset: 0x1352EB0 VA: 0x1352EB0
public int get_leagueChange() { }

// RVA: 0x1352EB8 Offset: 0x1352EB8 VA: 0x1352EB8
public void set_leagueChange(int value) { }

// RVA: 0x1352EC0 Offset: 0x1352EC0 VA: 0x1352EC0 Slot: 4
public uint GetSize() { }

// RVA: 0x1352F1C Offset: 0x1352F1C VA: 0x1352F1C Slot: 6
public bool Encode(BinaryEncoder encoder) { }

// RVA: 0x13530E4 Offset: 0x13530E4 VA: 0x13530E4 Slot: 7
public bool Decode(BinaryDecoder decoder) { }

// RVA: 0x1352D7C Offset: 0x1352D7C VA: 0x1352D7C
public void .ctor() { }

// RVA: 0x1353380 Offset: 0x1353380 VA: 0x1353380
private static void .cctor() { }
 

Francois284Modz

Awesome Active Platinian
Jun 10, 2018
188
2,442
193
26
france
You Can trace thé class with frida to sée if its bee' called and you Can also in dnspy analyse thé class to sée if its been call from a other class if yes then you Can use that class update