프리다 뉴비 질문입니다 ㅠ
function awaitForCondition(callback) {
var i = setInterval(function () {
var addr = Module.findBaseAddress("libil2cpp.so");
console.log("Adress: ", addr);
if (addr) {
clearInterval(i);
callback(+addr);
}
}, 0);
}
var il2cpp = null;
Java.perform(function() {
awaitForCondition(function (base) {
il2cpp = ptr(base);
get_ATKBase_hook();
})
})
function get_ATKBase_hook()
{
var offset = 0x1A85F4C
var get_Attack = il2cpp.add(offset);
Interceptor.attach(get_Attack,
{
onEnter: function(args)
{
console.log("[+]Hook In");
},
onLeave: function(retVal)
{
var Attack = retVal.toInt32();
var New_Attack = 9999;
retVal.replace(New_Attack);
console.log("ATK Hooked ");
}
});
}