Skip to content

Add "pngs" command#25

Draft
slaugaus wants to merge 2 commits intorjkiv:mainfrom
slaugaus:main
Draft

Add "pngs" command#25
slaugaus wants to merge 2 commits intorjkiv:mainfrom
slaugaus:main

Conversation

@slaugaus
Copy link

Completes #21, kinda.
Here's my scuffed generic algorithm that pulls everything PNG-ish out of an arbitrary set of bytes. Unfortunately I'm a little too stupid to integrate it with the EXE or XEX parsers, but it will get all the PNGS out of an extracted EXE, plus 2 garbage files.

image

It looks like jeff EXEs also have filenames for the achievements/gamerpics that I'm not parsing:

strings gh2.exe | grep png
.png
_spec.png
_norm.png
%s/pngquant_r.exe -platform %s -rndcache "%s"
game.png
coop_perfectscore.png
coop_8x.png
coop_500streak.png
coop_100streak.png
coop1000streak.png
coop_1mil.png
coop_800k.png
coop_600k.png
coop_400k.png
coop_200k.png
win_tutorials.png
win_thunder_trogdor.png
win_no_encore.png
win_medium_5stars.png
win_medium.png
win_leftyflip.png
win_hard_5stars.png
win_hard.png
win_expert_5stars.png
win_expert.png
win_easy_5stars.png
win_easy.png
win_buckethead.png
watch_credits.png
venue_theater.png
venue_stonehenge.png
venue_small2.png
venue_small1.png
venue_fest.png
venue_bigclub.png
venue_arena.png
unlock_bonus_chars.png
streak_perfect.png
streak_8x.png
streak_500.png
streak_1000.png
streak_100.png
spend_10k.png
practice_3_songs.png
fail_song_easy.png
buy_all_songs.png
buy_all_guitar_skins.png
buy_all_guitars.png
buy_all_char_skins.png
beat_all_unlocks.png
500k.png
400k.png
300k.png
200k.png
100k.pngXSRC

@rjkiv
Copy link
Owner

rjkiv commented Feb 22, 2026

This is a solid start, nice work so far!

I was thinking this would be a subcommand of xex, so xex pngs . In order to actually parse the xex and obtain the relevant info, you'd use process_xex (see cmd/xex.rs for uses of it). That'll return an ObjInfo for you. From there, you can get the .reloc section, and parse that specific section's data for PNGs.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants