File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Il2CppInterop.Runtime/Injection/Hooks Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,13 @@ internal unsafe class Class_GetFieldDefaultValue_Hook : Hook<Class_GetFieldDefau
56
56
mask = "xxxxxxxx????xxxxxxx" ,
57
57
xref = false
58
58
} ,
59
+ // Idle Slayer - Unity 2021.3.23 (x64)
60
+ new MemoryUtils . SignatureDefinition
61
+ {
62
+ pattern = "\x40 \x53 \x48 \x83 \xEC \x20 \x48 \x8B \xDA \xE8 \xCC \xCC \xCC \xCC \x4C " ,
63
+ mask = "xxxxxxxxxx????x" ,
64
+ xref = false
65
+ }
59
66
} ;
60
67
61
68
private static nint FindClassGetFieldDefaultValueXref ( bool forceICallMethod = false )
@@ -91,7 +98,11 @@ private static nint FindClassGetFieldDefaultValueXref(bool forceICallMethod = fa
91
98
var getStaticFieldValue = XrefScannerLowLevel . JumpTargets ( getStaticFieldValueAPI ) . Single ( ) ;
92
99
Logger . Instance . LogTrace ( "Field::StaticGetValue: 0x{GetStaticFieldValueAddress}" , getStaticFieldValue . ToInt64 ( ) . ToString ( "X2" ) ) ;
93
100
94
- var getStaticFieldValueInternal = XrefScannerLowLevel . JumpTargets ( getStaticFieldValue ) . Last ( ) ;
101
+ var getStaticFieldValueTargets = XrefScannerLowLevel . JumpTargets ( getStaticFieldValue ) . ToArray ( ) ;
102
+ if ( getStaticFieldValueTargets . Length > 4 )
103
+ return getStaticFieldValueTargets [ ^ 2 ] ;
104
+
105
+ var getStaticFieldValueInternal = getStaticFieldValueTargets . Last ( ) ;
95
106
Logger . Instance . LogTrace ( "Field::StaticGetValueInternal: 0x{GetStaticFieldValueInternalAddress}" , getStaticFieldValueInternal . ToInt64 ( ) . ToString ( "X2" ) ) ;
96
107
97
108
var getStaticFieldValueInternalTargets = XrefScannerLowLevel . JumpTargets ( getStaticFieldValueInternal ) . ToArray ( ) ;
You can’t perform that action at this time.
0 commit comments