frida-il2cpp-bridge-my
Version:
(my:Support IOS)Frida module to dump, manipulate and hijack any IL2CPP application at runtime with a high level of abstraction.
53 lines (52 loc) • 2.17 kB
JavaScript
;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports._Il2CppParameter = void 0;
const decorator_cache_getter_1 = require("decorator-cache-getter");
const api_1 = require("../api");
const decorators_1 = require("../decorators");
const native_struct_1 = require("../native-struct");
const utils_1 = require("../utils");
const type_1 = require("./type");
let _Il2CppParameter = class _Il2CppParameter extends native_struct_1.NativeStruct {
get name() {
return api_1.Api._parameterGetName(this.handle);
}
get position() {
return api_1.Api._parameterGetPosition(this.handle);
}
get type() {
return new type_1._Il2CppType(api_1.Api._parameterGetType(this.handle));
}
asHeld(holder, startIndex) {
const position = this.position;
const type = this.type;
return {
valueHandle: holder[startIndex + position],
get value() {
return utils_1.readRawValue(holder[startIndex + position], type);
},
set value(v) {
holder[startIndex + position] = utils_1.allocRawValue(v, type);
}
};
}
};
__decorate([
decorator_cache_getter_1.cache
], _Il2CppParameter.prototype, "name", null);
__decorate([
decorator_cache_getter_1.cache
], _Il2CppParameter.prototype, "position", null);
__decorate([
decorator_cache_getter_1.cache
], _Il2CppParameter.prototype, "type", null);
_Il2CppParameter = __decorate([
decorators_1.nonNullHandle
], _Il2CppParameter);
exports._Il2CppParameter = _Il2CppParameter;