Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main Thread panicked at index out of bounds #21

Open
nthometzki opened this issue Jan 2, 2023 · 2 comments
Open

Main Thread panicked at index out of bounds #21

nthometzki opened this issue Jan 2, 2023 · 2 comments

Comments

@nthometzki
Copy link

Hey, I was trying to decompile a game (where I'm pretty sure it was made in GM8, but maybe it's GM7) and I'm getting this error:

WARNING: Failed to recover an icon: id 1, rva 0x25B374
thread 'main' panicked at 'index out of bounds: the len is 1059 but the index is 4294948444', C:\projects\gm8decompiler\gm8exe\src\upx.rs:139:25

At first, I thought this maybe happens because of obfuscation, but even with -d on it was still giving me the same error.

@0x08088405
Copy link
Member

It looks like the game in question uses UPX for packing the executable, which generally indicates some custom protection, as that's not part of the standard export. The index out of bounds suggests it's a negative number that's unaccounted for while trying to unpack it which isn't too surprising as the logic was originally based on disassembly, although it tends to work on GM8 games, so it's possible we're dealing with a GM7 game here.

Do you mind sharing a link to the game so we can take a look? Improving this part of the codebase is something we've been wanting to do for a while now and it'd be great to have some testcases.

@nthometzki
Copy link
Author

The game is called Wanderlust: Rebirth and is technically only available on Steam. Anyway, I uploaded the files I have from Steam here: https://drive.google.com/file/d/1wa2rr4eSkY9irg0hfQCaZgjn1ngxU9cL/view?usp=share_link
The executable is called "Wanderlust.exe". The other executables are launchers.

I also tried to decompile it with the GM7 Java decompiler. It gave me a 7MB .gm7 file, which sounds about right, but I can't open it in GM7. I don't even know why it's a .gm7 file, since GM7 only supported .gmk files. I always get the message, that the file is corrupted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants