ushort hl = 0x2598; ushort bc = 0x0F8B; byte a = 0x01; byte d = 0x00; while (true) { a = savedata[hl]; hl++; a = (byte)(a + d); d = a; bc--; byte[] temp = BitConverter.GetBytes(bc); a = temp[1]; if ((a | temp[0]) == 0) break; } a = d; a = (byte)(a ^ 0xFF); savedata[0x3523] = a;