ScoreHero
Home | Forum | Wiki
Inbox [ Login ]Inbox [ Login ]
SearchSearch MemberlistMemberlist
ProfileProfile Log inLog in
GH3 PC Songs Decrypter
Goto page 1, 2, 3 ... 16, 17, 18  Next
 
Post new topic   Reply to topic    ScoreHero Forum Index -> Software
View previous topic :: View next topic  
Author Message
NvNv12  





Joined: 21 Nov 2007
Posts: 1

PostPosted: Wed Nov 21, 2007 1:10 am    Post subject: GH3 PC Songs Decrypter Reply with quote

Hi everyone!
I've created a simple file decrypter for the GH3 PC version (the files inside DATA\MUSIC).
Just compile it in any visual studio (as a win32 console app)...

It accepts a fsb.xen file as input and decrypts it into FMOD FSB format (http://www.fmod.org/docs/tutorials/fsb.htm)

The fsb file contain mp3 files for the guitar, preview, rhythm and song.

None of the other files in the game is encrypted.

P.S.
The same code can also be easily modified to encrypt files ofcourse!

----------------------------------------------------------------
!!! CODE BEGINS BELOW !!!
----------------------------------------------------------------
Code:


#include "windows.h"
#include "stdio.h"
#include "sys\stat.h"

#define KEY_LEN 11

char SwapByteBits(unsigned char cInput)
{
   unsigned char nResult=0;

   for(int i=0; i<8; i++)
   {
      nResult = nResult << 1;
      nResult |= (cInput & 1);
      cInput = cInput >> 1;
   }

   return (nResult);
}

int main(int argc, char* argv[])
{
   int nError = 0;
   struct _stat32 fileStat;
   unsigned int nBufferSize = 0;
   FILE* inFile = NULL;
   FILE* outFile = NULL;
   unsigned char* pBuffer;
   unsigned char* pInput;
   unsigned int nLoopIdx = 0;
   unsigned char cpKey[KEY_LEN] = "5atu6w4zaw";

   printf ("GHIII FSB Decryptor v1.0 by Invo\n");
   printf ("--------------------------------\n");
   printf ("\n");

   // Check params
   if (argc != 3)
   {
      printf ("Usage: %s <Input> <Output>\n", argv[0]);
      return (1);
   }

   // Get the file size
   nError = _stat32(argv[1], &fileStat);
   if (nError != 0)
   {
      printf ("Failed to get the input file size!\n");
      return (1);
   }

   nBufferSize = fileStat.st_size;

   // Allocate buffer
   pBuffer = (unsigned char*)malloc(nBufferSize);
   if (pBuffer == NULL)
   {
      printf ("Failed to allocate input buffer!\n");
      return (1);
   }

   // Open and read the input
   inFile = fopen(argv[1], "rb");
   if (inFile == NULL)
   {
      printf ("Failed to open the input file!\n");
      return (1);
   }
   printf ("Reading file (%d Bytes)... ", nBufferSize);
   fread(pBuffer, 1, nBufferSize, inFile);
   fclose(inFile);
   printf ("Done!\n");

   // Decrypt
   printf ("Decrypting... ");
   pInput = pBuffer;
   for (int nLoopIdx=0; nLoopIdx<nBufferSize; nLoopIdx++)
   {
      *pInput = SwapByteBits(*pInput ^ cpKey[nLoopIdx % (KEY_LEN-1)]);

      pInput++;
   }
   printf ("Done!\n");

   // Open and write the output
   outFile = fopen(argv[2], "wb");
   if (outFile == NULL)
   {
      printf ("Failed to open the output file!\n");
      return (1);
   }
   printf ("Writing file... ");
   fwrite(pBuffer, 1, nBufferSize, outFile);
   fclose (outFile);
   printf ("Done!\n");

   // The end...
   return (0);
}

Back to top
View user's profile Send private message
ModuRaziel  





Joined: 03 Nov 2007
Posts: 78
Location: Canada

PostPosted: Wed Nov 21, 2007 2:37 am    Post subject: Reply with quote

provided this does in fact work, then all we need to do now is locate where the charts themselves are stored, and we can get modding on the pc version running
Back to top
View user's profile Send private message MSN Messenger XBL Gamertag: ModuRaziel
Rgw20014life  





Joined: 24 Jan 2007
Posts: 43

PostPosted: Wed Nov 21, 2007 2:50 am    Post subject: Reply with quote

uh has anyone compiled it and tested this yet? My PC clock is messed up (old balls computer being used currently) and I dont know when this was posted. (On the front page of scorehero, it says Rock band will come out in 15 days!)
Back to top
View user's profile Send private message MSN Messenger
Ar5eNiC  





Joined: 05 May 2007
Posts: 17

PostPosted: Wed Nov 21, 2007 4:11 am    Post subject: Reply with quote

I can confirm that this indeed works. After compiling the posted code, I ran gh3extractor.exe <input> <output>. It outputs a .fsb file, which can be extracted using this. It extracts the 4 .mp3 files, the song preview, the guitar, bass/rhythm, and the rest of the song.
Back to top
View user's profile Send private message
Rgw20014life  





Joined: 24 Jan 2007
Posts: 43

PostPosted: Wed Nov 21, 2007 4:16 am    Post subject: Reply with quote

I dont understand spanish that well in order to register for that site. If in fact that is Spanish
Back to top
View user's profile Send private message MSN Messenger
lotrdude  





Joined: 21 Oct 2007
Posts: 20

PostPosted: Wed Nov 21, 2007 4:49 am    Post subject: Reply with quote

Rgw20014life wrote:
I dont understand spanish that well in order to register for that site. If in fact that is Spanish

its in french. and i don't speak french so can you just upload the program?
Back to top
View user's profile Send private message
Rgw20014life  





Joined: 24 Jan 2007
Posts: 43

PostPosted: Wed Nov 21, 2007 5:04 am    Post subject: Reply with quote

Heh , I knew my Spanish wasnt that bad. Oh yeah and an upload to a site that does not require registration would be nice please.
Back to top
View user's profile Send private message MSN Messenger
Ar5eNiC  





Joined: 05 May 2007
Posts: 17

PostPosted: Wed Nov 21, 2007 5:18 am    Post subject: Reply with quote

What site are you talking about that requires registration?
Back to top
View user's profile Send private message
Rgw20014life  





Joined: 24 Jan 2007
Posts: 43

PostPosted: Wed Nov 21, 2007 5:23 am    Post subject: Reply with quote

Altervista , Or at least I assume it requires registration. When I click on the link on your post it directs me to the homepage. http://it.altervista.org/
Back to top
View user's profile Send private message MSN Messenger
Ar5eNiC  





Joined: 05 May 2007
Posts: 17

PostPosted: Wed Nov 21, 2007 5:31 am    Post subject: Reply with quote

Strange, it works fine when I click the link in Firefox but it doesn't work in Internet Explorer. I've uploaded it to my server, get it here: http://ar5enic.com/scorehero/fsbext.zip
Back to top
View user's profile Send private message
mweber1488  





Joined: 15 Nov 2007
Posts: 7

PostPosted: Wed Nov 21, 2007 5:33 am    Post subject: Reply with quote

I am getting these errors with gcc:
Code:
main.cpp:24: error: aggregate `_stat32 fileStat' has incomplete type and cannot be defined
main.cpp:45: error: invalid use of undefined type `struct _stat32'
main.cpp:24: error: forward declaration of `struct _stat32'
Back to top
View user's profile Send private message
Rgw20014life  





Joined: 24 Jan 2007
Posts: 43

PostPosted: Wed Nov 21, 2007 5:35 am    Post subject: Reply with quote

That was it. Got it now, Thank you.
Back to top
View user's profile Send private message MSN Messenger
Ar5eNiC  





Joined: 05 May 2007
Posts: 17

PostPosted: Wed Nov 21, 2007 5:36 am    Post subject: Reply with quote

mweber1488 wrote:
I am getting these errors with gcc:
Code:
main.cpp:24: error: aggregate `_stat32 fileStat' has incomplete type and cannot be defined
main.cpp:45: error: invalid use of undefined type `struct _stat32'
main.cpp:24: error: forward declaration of `struct _stat32'


I'm not sure what those errors mean, but I had deleted one of my other posts that mentioned you need to add the following include at the top of the code:

Code:
#include "stdlib.h"
Back to top
View user's profile Send private message
mweber1488  





Joined: 15 Nov 2007
Posts: 7

PostPosted: Wed Nov 21, 2007 5:38 am    Post subject: Reply with quote

The error should mean that _stat32 has not been defined and adding stdlib didn't fix it.
Back to top
View user's profile Send private message
Ar5eNiC  





Joined: 05 May 2007
Posts: 17

PostPosted: Wed Nov 21, 2007 5:49 am    Post subject: Reply with quote

Ah, I just noticed you were trying to compile it with gcc...not sure how to compile it like that but I do know that it will compile in Visual Studio.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ScoreHero Forum Index -> Software All times are GMT
Goto page 1, 2, 3 ... 16, 17, 18  Next
Page 1 of 18

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Copyright © 2006-2025 ScoreHero, LLC
Terms of Use | Privacy Policy


Powered by phpBB