Skip to content

Instantly share code, notes, and snippets.

@ephemient
Created October 16, 2015 02:41
Show Gist options
  • Save ephemient/cc6176488cda184f523b to your computer and use it in GitHub Desktop.
Save ephemient/cc6176488cda184f523b to your computer and use it in GitHub Desktop.
swfuncompress
#!/usr/bin/perl
use Compress::Zlib;
undef $/;
binmode(ARGV);
while (<>) {
my ($a, $b, $c) = unpack 'a3a5a*' => $_;
if ($a eq 'CWS') {
open FH, '>:raw', "${ARGV}.raw";
syswrite FH, "FWS$b";
syswrite FH, uncompress($c);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment