Valhalla Legends Forums Archive | Advanced programming | WoW - VersionCheck

AuthorMessageTime
UserLoserMy function wasn't returning right values causing server to reject my logon

Code:
void CheckVersion(const BYTE *ChecksumKey, const BYTE *ClientKey, BYTE *Result)
// Begin: HashA = SHA1(BufferA, WoW.exe, fmod.dll, ijl15.dll, dbghelp.dll, unicows.dll)
// End: HashA = SHA1(BufferA, WoW.exe, fmod.dll, ijl15.dll, dbghelp.dll, unicows.dll)
// Begin: HashB = SHA1(BufferB, HashA);
// End: HashB = SHA1(BufferB, HashA)
// Begin: Final = SHA1(A, HashB)
// End: Final = SHA1(A, HashB)
}


Edit: Removed code left comments.  You all have WoW.exe, do it your self
March 31, 2005, 04:37 am
TheMinisteredYes, run WoW.exe side by side with yours -- running with the same values.  step through it instr by instr and find where you go wrongMarch 31, 2005, 07:02 pm
UserLoser
Yes, run WoW.exe side by side with yours -- running with the same values.  step through it instr by instr and find where you go wrong

Edit: They never broke because my IDB was older than the current version of WoW I am running Tongue
March 31, 2005, 09:26 pm
EpicOfTimeWastedNevermind, I made a mistake.April 01, 2005, 02:06 am
EpicOfTimeWastedIt has to be SHA1 (or at least one of Blizzard's famous "modified" algorithms)... the Init and Update functions are the same, Final LOOKS the same (except for the two calls to HashUpdate, that seems a bit odd).  Happen to have a link to a current copy of WoW.exe?  Would be fun to look at when I get bored.April 01, 2005, 02:31 am
UserLoserFor anyone who wants have fun:

http://www.userloser.net/files/WoW.rar
April 01, 2005, 02:37 am
EpicOfTimeWastedWell, I glanced at it a bit before work today... so far the only things I've found are:

HashTransform is the standard SHA1 transform, with loops unrolled.
HashInit seems to be standard, except for moving the bit length to the start of the message (before the constants), rather than at the end.  That would explain the mov [ecx], 0 and mov [ecx+4], 0.
HashUpdate at first glance appears to be standard, but I have to agree with you about not wanting to reverse the damned thing just to find out.
HashFinal... who knows.  I'm used to just throwing an 0x80 at the end of my digest and calling it good, so that first call to HashUpdate seems odd to me.  It appears to just be a stupid looking way to figure out 64 - sizeof(current_block_to_hash) though.
April 02, 2005, 12:38 am
UserLoserOk, to finalize this, it is the same exact SHA1 as it is for logon stuff.  It seems Blizzard just wanted to change things around to make people work for it.  Thanks to drivehappy for pointing out that my code indeed did work after he tested it, which led me to believe I had old WoW.exeApril 05, 2005, 01:34 am