MachO: Add ability to fetch exports with GetExports()

This commit is contained in:
Katy Coe
2020-07-18 19:05:15 +02:00
parent 67b979cd05
commit e74663a2ba
3 changed files with 100 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
/*
Copyright 2020 Katy Coe - http://www.djkaty.com - https://github.com/djkaty
All rights reserved.
*/
using System.IO;
namespace Il2CppInspector
{
internal class ULEB128
{
public static ulong Decode(IFileFormatReader next) {
ulong uleb = 0;
byte b = 0x80;
for (var shift = 0; b >> 7 == 1; shift += 7) {
b = next.ReadByte();
uleb |= (ulong) (b & 0x7f) << shift;
}
return uleb;
}
}
}