This commit is contained in:
Perfare 2020-06-19 00:36:32 +08:00
parent 3ff284ee2d
commit 99ba2697ad

View file

@ -47,7 +47,11 @@ namespace Il2CppDumper
public override ulong MapVATR(ulong absAddr)
{
var addr = absAddr - imageBase;
var section = sections.First(x => addr >= x.VirtualAddress && addr <= x.VirtualAddress + x.VirtualSize);
var section = sections.FirstOrDefault(x => addr >= x.VirtualAddress && addr <= x.VirtualAddress + x.VirtualSize);
if (section == null)
{
return 0ul;
}
return addr - (section.VirtualAddress - section.PointerToRawData);
}