MCPcopy Create free account
hub / github.com/GrowthEase/GameSentry / valueTypeToArray

Function valueTypeToArray

lib/component/agent/utils.js:201–214  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

199exports.toFridaValue = toFridaValue;
200
201function valueTypeToArray(value) {
202 const instanceFields = value.type.class.fields.filter(f => !f.isStatic);
203 return instanceFields.length == 0
204 ? [value.handle.readU8()]
205 : instanceFields
206 .map(field => field.withHolder(value).value)
207 .map(value => value instanceof Il2Cpp.ValueType
208 ? valueTypeToArray(value)
209 : value instanceof native_struct.NativeStruct
210 ? value.handle
211 : typeof value == "boolean"
212 ? +value
213 : value);
214}
215
216function arrayToValueType(type, nativeValues) {
217 function iter(type, startOffset = 0) {

Callers 1

toFridaValueFunction · 0.85

Calls 1

withHolderMethod · 0.45

Tested by

no test coverage detected