vfsfitvnm / frida-il2cpp-bridge

A Frida module to dump, trace or hijack any Il2Cpp application at runtime, without needing the global-metadata.dat file.

Home Page:https://github.com/vfsfitvnm/frida-il2cpp-bridge/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with passing value type to function

soletsabuse opened this issue · comments

Il2Cpp.perform(() => {
const List = Il2Cpp.corlib.class("System.Collections.Generic.List1");
const Int32List = List.inflate(Il2Cpp.corlib.class("System.Int32"));

const list = Int32List.new();
list.method("Add").invoke(1);
});

Error: access violation at 0x1 ...

Seems like it treats argument as address. Need some workaraounds asap

Seems like in my game there is no implementation for List<System.Int32>.Add
In other project that works.

If somebody has any workarounds how to create this object please tell me.

Maybe some methods from mscorelib.dll were stripped? Can I create this object directly in the memory and pass it to the function as a parameter after that?

Any help is apreciated <3

Call list.method('.ctor').invoke() after new

I did it. I tried different ways. There is no problem in different game. Looks like there are not such method in compiled il2cpp code. So I need to recreate the whole structure somehow.

Still have such problem

still not solved?
try

const list = Int32List.alloc();
list.method(".ctor").invoke();
list.add(1337);