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 @@ -71,6 +71,13 @@ internal unsafe class Class_GetFieldDefaultValue_Hook : Hook<Class_GetFieldDefau
71
71
mask = "xxxxxxxx????xxxxxxx" ,
72
72
xref = false
73
73
} ,
74
+ // Idle Slayer - Unity 2021.3.23 (x64)
75
+ new MemoryUtils . SignatureDefinition
76
+ {
77
+ pattern = "\x40 \x53 \x48 \x83 \xEC \x20 \x48 \x8B \xDA \xE8 \xCC \xCC \xCC \xCC \x4C " ,
78
+ mask = "xxxxxxxxxx????x" ,
79
+ xref = false
80
+ }
74
81
} ;
75
82
76
83
private static nint FindClassGetFieldDefaultValueXref ( bool forceICallMethod = false )
@@ -106,7 +113,11 @@ private static nint FindClassGetFieldDefaultValueXref(bool forceICallMethod = fa
106
113
var getStaticFieldValue = XrefScannerLowLevel . JumpTargets ( getStaticFieldValueAPI ) . Single ( ) ;
107
114
Logger . Instance . LogTrace ( "Field::StaticGetValue: 0x{GetStaticFieldValueAddress}" , getStaticFieldValue . ToInt64 ( ) . ToString ( "X2" ) ) ;
108
115
109
- var getStaticFieldValueInternal = XrefScannerLowLevel . JumpTargets ( getStaticFieldValue ) . Last ( ) ;
116
+ var getStaticFieldValueTargets = XrefScannerLowLevel . JumpTargets ( getStaticFieldValue ) . ToArray ( ) ;
117
+ if ( getStaticFieldValueTargets . Length > 4 )
118
+ return getStaticFieldValueTargets [ ^ 2 ] ;
119
+
120
+ var getStaticFieldValueInternal = getStaticFieldValueTargets . Last ( ) ;
110
121
Logger . Instance . LogTrace ( "Field::StaticGetValueInternal: 0x{GetStaticFieldValueInternalAddress}" , getStaticFieldValueInternal . ToInt64 ( ) . ToString ( "X2" ) ) ;
111
122
112
123
var getStaticFieldValueInternalTargets = XrefScannerLowLevel . JumpTargets ( getStaticFieldValueInternal ) . ToArray ( ) ;
You can’t perform that action at this time.
0 commit comments