protodec is a tool to decompile protobuf parser/serializer classes compiled by protoc, from dotnet assemblies back into .proto definitions
Go to file
Xpl0itR b1eed86d6c
Various improvements
including but not limited to:
- Move parsing logic to library project
- Expanding coverage of the proto3 spec
- Option to parse types from only a specified assembly
- More accurate field name translation
- Accept custom lookup functions for types and names
- Some resilience to obfuscation
- Fix infinite recursion bug causing stack overflow
2023-10-31 07:21:41 +00:00
LibProtodec Various improvements 2023-10-31 07:21:41 +00:00
protodec Various improvements 2023-10-31 07:21:41 +00:00
.gitignore Initial commit 2023-04-20 23:01:53 +01:00
LICENSE Initial commit 2023-04-20 23:01:53 +01:00
README.md Various improvements 2023-10-31 07:21:41 +00:00
protodec.sln Various improvements 2023-10-31 07:21:41 +00:00

README.md

protodec

A tool to decompile protobuf parser/serializer classes compiled by protoc, from dotnet assemblies back into .proto definitions.

Usage

Usage: protodec(.exe) <target_assembly_dir> <out_path> [target_assembly_name] [options]
Arguments:
  target_assembly_dir   A directory of assemblies to be loaded.
  out_path              An existing directory to output into individual files, otherwise output to a single file.
  target_assembly_name  The name of an assembly to parse. If omitted, all assemblies in the target_assembly_dir will be parsed.
Options:
  --skip_enums          Skip parsing enums and replace references to them with int32.

Limitations

  • Integers are assumed to be (u)int32/64 as C# doesn't differentiate between them and sint32/64 and (s)fixed32/64.

Decompiling from Il2CppDumper DummyDLLs

  • The Name parameter of OriginalNameAttribute is not dumped. In this case the C# names are used after conforming them to protobuf conventions
  • Dumped assemblies depend on strong-named core libs, however the ones dumped are not strong-named. This interferes with loading and can be mitigated by copying the assemblies from your runtime into the target assembly directory.

I recommend using Cpp2IL instead of Il2CppDumper.

License

This project is subject to the terms of the Mozilla Public License, v. 2.0.