Didn't know that. EnjoyWow it worked in CODM lol, I tried il2cppdumper and it did not work, this one does
Thanks mann :)Didn't know that. Enjoy
It has worked very well for me, but I have tried the fake lib method in a game and I have been able to obtain the dump.cs file, but the problem is that the function offsets do not appear in the file, I only get the RVA and VA.Didn't know that. Enjoy
Just use RVA offset. If RVA is incorrect, use a different device to dump withIt has worked very well for me, but I have tried the fake lib method in a game and I have been able to obtain the dump.cs file, but the problem is that the function offsets do not appear in the file, I only get the RVA and VA.
I'll take a look but I don't think Auto dumper relies on CodeRegistration and MetadataRegistration. It uses Il2Cpp API pointers which is a different methodWith this method, the dump turned out, but there is not enough structure for ghidra. And Il2cppDumper-GUI does not find the offset.
Is it possible to also save offsets for CodeRegistration and MetadataRegistration to a file?
Please tell me if there are instructions on how to get offsets for CodeRegistration and MetadataRegistration if they are both zero.I'll take a look but I don't think Auto dumper relies on CodeRegistration and MetadataRegistration. It uses Il2Cpp API pointers which is a different method
There is one, but outdated Manually dump il2cpp unity 2019.x.x on Android games - Platinmods.com - Android & iOS MODs, Mobile Games & Apps. I don't have time to check on newer versionPlease tell me if there are instructions on how to get offsets for CodeRegistration and MetadataRegistration if they are both zero.
Thank you for the answers, and in general for all the information, you are super)There is one, but outdated Manually dump il2cpp unity 2019.x.x on Android games - Platinmods.com - Android & iOS MODs, Mobile Games & Apps. I don't have time to check on newer version
But it's really pointless to find offset if il2cpp is encrypted or stripped out offsets. 0 offset always means it failed to find it due to protections
Just use Auto dumper and get used to use dump.cs only
class DataDump2json {
function parse($body) {
$body=explode("\n",$body);
$methods=[];
$namespace='';
$classname='';
$lastrva='';
$allowGetMethods=false;
$len=count($body);
for($i=0; $i<$len; $i++) {
$line=trim($body[$i]);
if (!$line) continue;
if ($line=='{') {
$allowGetMethods=true;
continue;
}
if ($line=='}') {
$allowGetMethods=false;
$namespace='';
$classname='';
$lastrva='';
continue;
}
if (preg_match("%// Namespace: (.*)%",$line,$m)) {
$namespace=trim($m[1]);
continue;
}
if (preg_match("%(?:internal|public|private|protected)(?:.*)(?:class|struct) (.+?) (?:\:|//) %",$line,$m)) {
$classname=trim($m[1]);
continue;
} else if (preg_match("%(?:internal|public|private|protected)(?:.*)(?:class|struct) (.+?)$%",$line,$m)) {
$classname=trim($m[1]);
continue;
}
/*else if (!preg_match("%(?:internal|public|private|protected)(?:.*)(?:class|struct) (.+?) (?:\:|//) %",$line,$m)&&preg_match("%(?:class|struct)(.+?)(?:\:|//) %",$line,$m)) {
var_dump($line);
continue;
} */
if ($allowGetMethods) {
if (preg_match("%// RVA: (0x[0-9a-fA-F]+) %",$line,$m)) {
$lastrva=trim($m[1]);
continue;
}
if (preg_match("%(?:public|private|protected) (?:.+) (.+)\(%",$line,$m)) {
$lastmethod=trim($m[1]);
if ($classname&&$lastrva) {
$name=($namespace?$namespace.".":"").$classname."$$".$lastmethod;
$methods[]=["Address"=>hexdec($lastrva),"Name"=>$name];
}
//var_dump([$name,$lastrva,hexdec($lastrva)]);
continue;
}
}
//var_dump($line);
//echo $line."\n";
//break;
}
$res=["ScriptMethod"=>$methods];
$json=json_encode($res, JSON_PRETTY_PRINT);
return $json;
}
function doFile($fn='') {
$body=file_get_contents($fn);
if (!$body) return false;
return $this->parse($body);
}
function test() {
$fnin='/home/ich/dump.cs';
$fnout=$fnin.'.json';
$json=$this->doFile($fnin);
if ($json===false) return false;
file_put_contents($fnout,$json);
return true;
}
}
$cls = new DataDump2json();
$cls->test();
That's cool. Don't you need a server to execute php file?As a result, I sketched a script in php, since I understand it better.
Collects the names of classes / structures of methods and offsets from dumps, and saves them in a format suitable for ghidra.py from
GitHub - Perfare/Il2CppDumper: Unity il2cpp reverse engineer
Unity il2cpp reverse engineer. Contribute to Perfare/Il2CppDumper development by creating an account on GitHub.github.com
I'll leave the code here in case anyone else needs it.
Yes, php needs a server with phpThat's cool. Don't you need a server to execute php file?
Understood thanksAnd I checked the source of the auto dumper, it does not rely on CodeRegistration and MetadataRegistration, it is pointing to Il2Cpp APIs like il2cpp_field_get_type, il2cpp_class_from_type, il2cpp_class_get_name, etc