Cpp2IL icon indicating copy to clipboard operation
Cpp2IL copied to clipboard

Fail to read NSO binary

Open ppng222 opened this issue 2 years ago • 5 comments

I'm trying to work with a Switch binary here but I keep getting the error Unhandled exception. System.Exception: Found more than 1 pointer as pCodegenModules I'm unsure what to do here or if there is nothing else I can do. I am using a build from the development branch, but this issue also occurs with release 2022.1.0#8


[Info] [Program] Running on Win32NT
[Info] [Plugins] Loading plugins from G:\JDUnity\Cpp2IL\Cpp2IL\bin\Debug\net6.0\win-x64\Plugins...
[Info] [Plugins] Using Plugin: Cpp2IL Built-In
[Warn] [Program] Using force options, I sure hope you know what you're doing!
[Info] [Library] Initializing Metadata...
[Info] [Library]        Using actual IL2CPP Metadata version 29
[Info] [Library] Initialized Metadata in 192ms
[Info] [Library] Using binary type Nintendo Switch Object (from LibCpp2IL)
[Info] [Library] Searching Binary for Required Data...
[Info] [Library]        Decompressing NSO file...
Unhandled exception. System.Exception: Found more than 1 pointer as pCodegenModules
   at LibCpp2IL.BinarySearcher.FindCodeRegistrationPost2019() in G:\JDUnity\Cpp2IL\LibCpp2IL\BinarySearcher.cs:line 196
   at LibCpp2IL.Il2CppBinary.FindCodeAndMetadataReg(Int32 methodCount, Int32 typeDefinitionsCount) in G:\JDUnity\Cpp2IL\LibCpp2IL\Il2CppBinary.cs:line 448
   at LibCpp2IL.LibCpp2IlBinaryRegistry.CreateAndInit(Byte[] buffer, Il2CppMetadata metadata) in G:\JDUnity\Cpp2IL\LibCpp2IL\LibCpp2IlBinaryRegistry.cs:line 68
   at LibCpp2IL.LibCpp2IlMain.Initialize(Byte[] binaryBytes, Byte[] metadataBytes, UnityVersion unityVersion) in G:\JDUnity\Cpp2IL\LibCpp2IL\LibCpp2IlMain.cs:line 159
   at LibCpp2IL.LibCpp2IlMain.LoadFromFile(String pePath, String metadataPath, UnityVersion unityVersion) in G:\JDUnity\Cpp2IL\LibCpp2IL\LibCpp2IlMain.cs:line 205
   at Cpp2IL.Core.Cpp2IlApi.InitializeLibCpp2Il(String assemblyPath, String metadataPath, UnityVersion unityVersion, Boolean allowUserToInputAddresses) in G:\JDUnity\Cpp2IL\Cpp2IL.Core\Cpp2IlApi.cs:line 60
   at Cpp2IL.Program.MainWithArgs(Cpp2IlRuntimeArgs runtimeArgs) in G:\JDUnity\Cpp2IL\Cpp2IL\Program.cs:line 415
   at Cpp2IL.Program.Main(String[] args) in G:\JDUnity\Cpp2IL\Cpp2IL\Program.cs:line 361```

ppng222 avatar Nov 23 '22 21:11 ppng222

Could you upload a log file also using the --verbose option?

SamboyCoding avatar Nov 23 '22 21:11 SamboyCoding

logfile.log

ppng222 avatar Nov 23 '22 21:11 ppng222

Hmm that looks like quite a painful binary, I'm afraid I don't have any immediate suggestions without having my hands on the binary. You could join my discord (linked in the readme) and we can discuss more closely there, but my free time is often rather limited these days so I don't know how immediately I'd be able to help

SamboyCoding avatar Nov 23 '22 21:11 SamboyCoding

I have similar issue finding more than one pointer to pCodegenModules I've managed to get a working dll with this other project https://github.com/Perfare/Il2CppDumper

The binary I struggled with was the v1.1.0 of title ID: 0100B0100E26C000, build ID: D6A683602B518969

EvansJahja avatar Mar 20 '23 12:03 EvansJahja

I had a similar issue here ...can you review? https://github.com/mafaca/UtinyRipper/issues/1464#issue-1646243127

ImanCol avatar Mar 29 '23 19:03 ImanCol