mrmacete / r2-ggpack

Suite of radare2 plugins to read and manipulate the ggpack data files used by Thimbleweed Park game
MIT License
21 stars 0 forks source link

cannot parse dictionary at <address> #1

Closed rpelorosso closed 6 years ago

rpelorosso commented 6 years ago

Hi! I'm trying to export the .wimpy files from ThimbleweedPark.ggpack1. Some work fine, but there are others that trigger an error, such as

[0x00000000]> s sym.Vista.wimpy
[0x04fbc35f]> =!pDj
cannot parse dictionary at 0x4fbc35f

or

[0x0473907a]> s sym.MainStreet.wimpy
[0x03e6d4d8]> =!pDj
cannot parse dictionary at 0x3e6d4d8

Among others. Is there any way to export these?

Thank you! Rodrigo

mrmacete commented 6 years ago

hey! nice catch! probably you found a bug.

i'll try to reproduce and fix it ASAP.

meanwhile, if you're in the mood for investigating more, you can:

cheers

rpelorosso commented 6 years ago

Thank you! I'll try those steps, and will report on whatever I can find.

rpelorosso commented 6 years ago

@mrmacete Well, I was expecting a lot more noise. (unless, of course, I did something wrong). I compiled from source having enabled debugging in both files. This is the output:

[silencer@myhostname ThimblePack]$ r2 -w ggpack://ThimbleweedPark.ggpack1
gg_value_carve: unsupported type 14
gg_hash_carve: could not carve value
retry with version 1
 -- Find wide-char strings with the '/w <string>' command
[0x00000000]> s sym.Vista.wimpy
[0x04fbc35f]> =!pDj
gg_value_carve: unsupported type 6
gg_hash_carve: could not carve value
gg_value_carve: error on array item 0
gg_hash_carve: could not carve value
cannot parse dictionary at 0x4fbc35f
[0x04fbc35f]> 

Thank you!!

mrmacete commented 6 years ago

thanks!

this commit should solve the problem: https://github.com/mrmacete/r2-ggpack/commit/dfabda10642ff3dbc1139c049478e301578fd5cf

feel free to reopen if that's not the case.

cheers

rpelorosso commented 6 years ago

Thank you @mrmacete !! The commit indeed fixes the issue :D

I have to ask, how did you know that type 6 was Double? I had a look at the code, trying to figure out how to solve the issue, but could not figure out what type should 6 be.