MachO: Add ability to fetch exports with GetExports()
This commit is contained in:
23
Il2CppInspector.Common/ULEB128.cs
Normal file
23
Il2CppInspector.Common/ULEB128.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user