28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
// Decompiled with JetBrains decompiler
|
|||
|
|
// Type: MindLated.Protection.Arithmetic.Functions.Xor
|
||
|
|
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||
|
|
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||
|
|
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||
|
|
|
||
|
|
using dnlib.DotNet;
|
||
|
|
using dnlib.DotNet.Emit;
|
||
|
|
using MindLated.Protection.Arithmetic.Utils;
|
||
|
|
|
||
|
|
//#nullable disable
|
||
|
|
namespace MindLated.Protection.Arithmetic.Functions {
|
||
|
|
|
||
|
|
public class Xor : Function
|
||
|
|
{
|
||
|
|
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Xor;
|
||
|
|
|
||
|
|
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||
|
|
{
|
||
|
|
MindLated.Protection.Arithmetic.Generator.Generator generator = new MindLated.Protection.Arithmetic.Generator.Generator();
|
||
|
|
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||
|
|
return (ArithmeticVt) null;
|
||
|
|
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), (double) generator.Next(), this.ArithmeticTypes);
|
||
|
|
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(), arithmeticEmulator.GetY()), new Token(OpCodes.Xor), this.ArithmeticTypes);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|