I've decompiled Cherno's srPatcher,
So here's the code executed when the checkbox 'Allow to enter game when service offline' is checked and button is clicked.
[Only registered and activated users can see links. Click Here To Register...]
It opens the gatewayserver.exe, creates a new istance of binarywriter etc. etc. I know that stuff but the thing i want to learn is what is the corresponding address of these byte arrays in olly.
Code as text:
PHP Code:
FileStream output = new FileStream(this.openFileDialog1.FileName, FileMode.Open);
BinaryWriter writer = new BinaryWriter(output);
byte[] buffer = new byte[] { 0xeb };
byte[] buffer2 = new byte[1];
byte[] buffer3 = new byte[] {
0x42, 0x6c, 0x6f, 0x6f, 100, 0x79, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5d, 0x55, 0x73,
0x65, 0x72, 0x20, 0x63, 0x6f, 110, 110, 0x65, 0x63, 0x74, 0x69, 110, 0x67, 0x20, 0x5b, 0x25,
100, 0x2e, 0x25, 100, 0x2e, 0x25, 100, 0x2e, 0x25, 100, 0x5d
};
byte[] buffer4 = new byte[0x2c];
if (this.checkBox1.Checked)
{
writer.Seek(0x53c6, SeekOrigin.Begin);
writer.Write(buffer, 0, 1);
writer.Seek(0x5428, SeekOrigin.Begin);
writer.Write(buffer2, 0, 1);
writer.Seek(0xd9431, SeekOrigin.Begin);
writer.Write(buffer3, 0, 0x2b);
writer.Seek(0xd945c, SeekOrigin.Begin);
writer.Write(buffer4, 0, 0x2c);
}
MessageBox.Show("Successfully patched GatewayServer.exe.");
writer.Close();