Page 1 of 1

Resigning Maps Manually?

Posted: Tue Feb 13, 2007 5:40 am
by THE-MASTER
Is there an in depth tutorial on how to resign maps manually?

I know how to change the signature but do not know exactly how to calculate it. Thanks.

Re: Resigning Maps Manually?

Posted: Tue Feb 13, 2007 11:22 am
by Prey
THE-MASTER wrote:Is there an in depth tutorial on how to resign maps manually?

I know how to change the signature but do not know exactly how to calculate it. Thanks.
starting at offset 2048 (straight after the header) you have to xor every dword together.

So in the various resigner apps we have dotted around the site, they start a loop running that goes from offset 2048 to the very end of the map -4.
Within the loop a var is xored with the dword (read as an int32) from the current stream. The var is then xored again in the next loop with the next dword in the stream and so on. Eventually you have the final checksum, which is then written in at offset 720 :D

Re: Resigning Maps Manually?

Posted: Tue Feb 13, 2007 12:34 pm
by -DeToX-
Agreed. If you don't mind asking... Why would you need this? I mean it would be a waste of time to resign a map manually.

Unless of course you want to make a map resigner =x.

Re: Resigning Maps Manually?

Posted: Wed Feb 14, 2007 3:30 am
by THE-MASTER
-DeToX- wrote:Agreed. If you don't mind asking... Why would you need this? I mean it would be a waste of time to resign a map manually.

Unless of course you want to make a map resigner =x.
I was going to try and work out the code for a map signer myself. It all sounds a bit complicated but I might try it. Don't worry though, unless it is super special I wont post it here...

Re: Resigning Maps Manually?

Posted: Wed Feb 14, 2007 8:24 am
by Anthony
Prey wrote:a loop running that goes from offset 2048 to the very end of the map -4
why the hell would you stop at -4? :? the signature would come out incorrect, because you need to xor that last dword

heres a little sample of what you can do if your using C# and you can adapt to vb very easy

//Signature
int Signature = 0;
//Map size
int MapSize = (int)br.BaseStream.Length;

//Loop through the map xoring every dword after the map header
br.BaseStream.Position = 2048;
for(int x= 2048; x < MapSize; x+=4)
{
Signature ^= br.ReadInt32();
}

That will get you the map signature then all you have to do is go to offset 720 and write the signature

br is a BinaryReader btw

sorry if I missed something because im at school trying to explain this crap :p

Posted: Wed Feb 14, 2007 1:22 pm
by Prey
ant it would come out correct if 'for(int x= 2048; x <= MapSize-4; x+=4)' was used..

..and why did u post code? i thought the idea here was to tell him how it works so he could work it out for himself :?

Posted: Wed Feb 14, 2007 5:58 pm
by Anthony
Prey wrote:ant it would come out correct if 'for(int x= 2048; x <= MapSize-4; x+=4)' was used..

..and why did u post code? i thought the idea here was to tell him how it works so he could work it out for himself :?
I didn't post it all I gave him a basic idea he could work with :P

and why would you want to do >= -4 ? its just more work thats not needed and you didn't say >= -4 :?

Posted: Thu Feb 15, 2007 1:14 am
by THE-MASTER
Thanks very much everyone :)