WarlockD / GMdsam

Some junk test stuff trying to decompile GM bytecode
45 stars 5 forks source link

Doesn't work with v1.05 #16

Open NarryG opened 7 years ago

NarryG commented 7 years ago

The new update just came out and underdecomp fails to decompile the data.win


Unhandled Exception: System.Exception: String not zero terminated
   at GameMaker.BinaryReaderExtensions.ReadZeroTerminatedString(BinaryReader r) in C:\Users\Daniel\Downloads\GMdsam-master\GMdsam-master\GMdsam\GameMaker\Resources.cs:line 162
   at GameMaker.BinaryReaderExtensions.ReadStringFromOffset(BinaryReader r, Int32 offset) in C:\Users\Daniel\Downloads\GMdsam-master\GMdsam-master\GMdsam\GameMaker\Resources.cs:line 139
   at GameMaker.BinaryReaderExtensions.ReadStringFromNextOffset(BinaryReader r) in C:\Users\Daniel\Downloads\GMdsam-master\GMdsam-master\GMdsam\GameMaker\Resources.cs:line 132
   at GameMaker.File.Font.InternalRead(BinaryReader r) in C:\Users\Daniel\Downloads\GMdsam-master\GMdsam-master\GMdsam\GameMaker\ChunkTypes.cs:line 986
   at GameMaker.File.GameMakerStructure.Read(BinaryReader r, Int32 index) in C:\Users\Daniel\Downloads\GMdsam-master\GMdsam-master\GMdsam\GameMaker\ChunkTypes.cs:line 89
   at GameMaker.File.ReadList[T](List`1 list, BinaryReader r, Int32 start, Int32 end) in C:\Users\Daniel\Downloads\GMdsam-master\GMdsam-master\GMdsam\GameMaker\Resources.cs:line 864
   at GameMaker.File.CheckList[T](String chunkName, List`1& list) in C:\Users\Daniel\Downloads\GMdsam-master\GMdsam-master\GMdsam\GameMaker\Resources.cs:line 854
   at GameMaker.File.LoadEveything() in C:\Users\Daniel\Downloads\GMdsam-master\GMdsam-master\GMdsam\GameMaker\Resources.cs:line 821
   at GameM```
theclashingfritz commented 7 years ago

This is probably because 1.5 uses a newer Game Maker by chance.

colinator27 commented 7 years ago

I got it to work with few modifications. Then I had to disable a bunch of error (Debug.Assert) messages to be able to decompile everything.

NarryG commented 7 years ago

Could you post a build or the source by any chance?

colinator27 commented 7 years ago

(replied to danne2 via Reddit)

tsudou commented 7 years ago

if you don't mind, could you send me a build or the source, too...? I managed to extract sprites and strings, but couldn't do other stuffs...

colinator27 commented 7 years ago

Sure, here's a build: https://drive.google.com/file/d/0B6A6RJXhqzalaUxDRzhSUFUzRmc/view.

tsudou commented 7 years ago

Thank you so much!! It seemed there might be something wrong because I got a lot of errors and warnings...? However, I could get all what I wanted!!

WarlockD commented 7 years ago

Sorry I had NO idea there was a new version. Freaking 1.5. I will take a look and patch it in. I never fixed the case detection code so I might just convert it to a bit train of if statements just so the ast works. As for the byte code it looks like its still using the newish code. Sigh. To many projects.

WarlockD commented 7 years ago

Could you put in a pull for the changes?