• Welcome to Valhalla Legends Archive.
 

Checksums of IX86ver#.mpq files used during SID_AUTH_CHECK

Started by Trojan, July 13, 2006, 09:11 PM

Previous topic - Next topic

Trojan

Hello,

When logging in to battle.net, the client is told the name of an MPQ file (IX86ver1-7.mpq for the IX86 platform for example), which is then downloaded (if not already in bncache), and some checksum of this file is then used in the challenge calculation in SID_AUTH_CHECK. In all implementations of CheckRevision that I have seen, the programmer uses a hardcoded list of checksums for these files.

How are those checksums generated? I have tried taking the CRC32 of the mpq file, but that doesn't match. Neither is it the CRC32 of the file contained within the MPQ file. I am very interested if anyone knows what process is used to generate these values. Hopefully someone has knowledge of this area that they can share.

Thanks for your help!

MyndFyre

As I understand it, it's not actually a checksum of the MPQ.  The downloaded MPQ files only differ by seed value, and that (the seed value) is what you see as a checksum.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Trojan

Thanks for the information.
How were the seed values initially determined for the mpqs? I am interested in the process of determining them myself at runtime.

MyndFyre

Quote from: Trojan on July 13, 2006, 09:52 PM
Thanks for the information.
How were the seed values initially determined for the mpqs? I am interested in the process of determining them myself at runtime.
I don't know how they were initially determined, but I bet it was done by decompilation.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Eric

The MPQs each contain a nearly identical copy of the CheckRevision() function, which is used to compute the checksum of the three main game files.  The only difference, as MyndFyre mentioned, is that each MPQ uses its own unique seed value.  You can discover these values by extracting the dynamic libraries from each MPQ and reverse engineering or, more simply, comparing them.  If you compare the various libraries, you'll be able to quickly discover the values.

l2k-Shadow

Quote from: Trojan on July 13, 2006, 09:52 PM
Thanks for the information.
How were the seed values initially determined for the mpqs? I am interested in the process of determining them myself at runtime.

They're not determined, they're just chosen constants by Battle.net, the way they were retrieved by users is by decompilation. Each MPQ has the same CheckRevision() function with different seed value, so all you need to do is tell a single function which seed to use.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Trojan

Excellent, I see these values and understand how it works now. Thanks very much for everyone's help.