MCPcopy Create free account
hub / github.com/axhlzy/Il2CppHookScripts / showMethods

Method showMethods

Il2cppHook/_Ufunc.js:157–185  ·  view source on GitHub ↗
(mPtr, detailed = false)

Source from the content-addressed store, hash-verified

155 return klass;
156 }
157 static showMethods(mPtr, detailed = false) {
158 let klass = HookerBase.inputCheck(mPtr);
159 if (klass.methods.length == 0)
160 return;
161 newLine();
162 formart_1.formartClass.printTitile(`Found ${klass.methods.length} Methods ${klass.isEnum ? "(enum) " : ""} in class: ${klass.name} @ ${klass.handle}`);
163 if (detailed) {
164 let maxStrLen = 0;
165 klass.methods.forEach((method) => {
166 LOGD(`\n[*] ${method.handle} ---> ${method.virtualAddress} ---> ${method.relativeVirtualAddress}`);
167 let methodInfoDes = `\t${(0, il2cppM_1.getMethodDesFromMethodInfo)(method)}`;
168 LOGD(methodInfoDes);
169 maxStrLen = Math.max(maxStrLen, methodInfoDes.length);
170 let countArgs = -1;
171 method.parameters
172 .map((param) => `\t\t---> args[${++countArgs}]\t${param.type.handle} <- ${param.type.name}`)
173 .forEach(LOGZ);
174 LOGZ(`\t\t---> retval\t${method.returnType.class.handle} <- ${method.returnType.class.name}`);
175 });
176 newLine();
177 LOGO(getLine(maxStrLen));
178 }
179 else {
180 klass.methods.forEach((method) => {
181 LOGD(`[*] ${method.handle} ---> ${method.virtualAddress} ---> ${method.relativeVirtualAddress}\t| ${(0, il2cppM_1.getMethodDesFromMethodInfo)(method)}`);
182 });
183 newLine();
184 }
185 }
186 static showFields(mPtr) {
187 let klass = HookerBase.inputCheck(mPtr);
188 if (klass.fields.length == 0) {

Callers

nothing calls this directly

Calls 6

LOGDFunction · 0.70
LOGZFunction · 0.70
LOGOFunction · 0.70
getLineFunction · 0.70
inputCheckMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected