This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: Blizzard Installer Customisation  (Read 16798 times)

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blizzard Installer Customisation
« Reply #30 on: March 28, 2013, 03:49:41 pm »
Quote
Note that Z_BUF_ERROR is not fatal,
It just means, that either there is no more output or no more input. Either, it is perfectly fine and inflated everything or the input is incomplete. As output begins with 'MZ', the output is also likely to be correct.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blizzard Installer Customisation
« Reply #31 on: March 28, 2013, 03:50:49 pm »
And given, that not Z_STREAM_END is returned, it is likely that the input has stopped too early.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #32 on: March 28, 2013, 03:55:18 pm »
Well, if I trace your code through showing only the lines of code executed:

Code: [Select]
int inflateResult = inflate (&stream, 4);
...
inflateEnd (&stream);
...
return -3;

-> returned

if (res || inflated != output->size())
{
  throw std::runtime_error ("error: not inflated correctly");
}

So, if your saying it should still have worked, shall I change the code so that it continues?

edit:

I assume it should be doing this:

Code: [Select]
   if (inflateResult == 1)
    {
      *written_output = stream.total_out;
      return inflateEnd (&stream);
    }

Where, ideally 1 is returned (success?) so the written_output then gets a value (inflated), otherwise inflated will not match the output size.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blizzard Installer Customisation
« Reply #33 on: March 28, 2013, 04:03:32 pm »
Try writing output to disk and look at it. Also, try increasing input size read from BsnI. I'd wonder if, but it may be wrong.
The last possibly wrong thing is the size of unsigned int being wrong, but I really can't believe that.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #34 on: March 28, 2013, 04:06:39 pm »
Quote from: "schlumpf"
Try writing output to disk and look at it. Also, try increasing input size read from BsnI. I'd wonder if, but it may be wrong.
The last possibly wrong thing is the size of unsigned int being wrong, but I really can't believe that.

Well I modified all the error handling so that it writes it, and it resulted in three files being output:

Installer.exe
RichEd20.dll
Unicows.dll

Which looks correct to me. o_0
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blizzard Installer Customisation
« Reply #35 on: March 28, 2013, 04:12:20 pm »
The filenames of course are fine. The question is if the contents are..
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #36 on: March 28, 2013, 04:17:42 pm »
Quote from: "schlumpf"
The filenames of course are fine. The question is if the contents are..

Apparently not:

« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #37 on: March 28, 2013, 04:30:47 pm »
Quote from: "schlumpf"
try increasing input size read from BsnI.

Where is this done?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blizzard Installer Customisation
« Reply #38 on: March 28, 2013, 04:32:30 pm »
The only thing I'd suspect being wrong is the compression mode / strength chosen for inflate. But as you know, I successfully extracted your installer using exactly that source code.

May you give sizeof(BsnI_Entry) (or whatever it was called)?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #39 on: March 28, 2013, 04:37:59 pm »
Quote from: "schlumpf"
The only thing I'd suspect being wrong is the compression mode / strength chosen for inflate. But as you know, I successfully extracted your installer using exactly that source code.

May you give sizeof(BsnI_Entry) (or whatever it was called)?

sizeof(BsnI); returns 16.
sizeof(BsnI_entry); returns 76.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blizzard Installer Customisation
« Reply #40 on: March 28, 2013, 04:53:17 pm »
Those values are fine.

I have no idea what might be wrong, then. It should work fine.

Try different numbers for inflate, try using bsnientry.data_size * 2.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #41 on: March 28, 2013, 05:37:41 pm »
Quote from: "schlumpf"
Those values are fine.

I have no idea what might be wrong, then. It should work fine.

Try different numbers for inflate, try using bsnientry.data_size * 2.

When I did that, the returned result from inflation was 1 rather than -5, which signals a success. :)

However, when assembling using those output files, it still does not work. The file size was larger.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blizzard Installer Customisation
« Reply #42 on: March 28, 2013, 05:39:24 pm »
Why try assembling them? The exe is a executable itself and should be possible to run.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: Blizzard Installer Customisation
« Reply #43 on: March 28, 2013, 05:41:49 pm »
Quote from: "schlumpf"
Why try assembling them? The exe is a executable itself and should be possible to run.

Ah, didn't realise this. However, the extraction must still not be correct because:

« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Blizzard Installer Customisation
« Reply #44 on: March 28, 2013, 08:01:06 pm »
Use 1.2.3. I guess other versions than their own won't get proper results.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »