3246 lines
106 KiB
C#
3246 lines
106 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Text;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Math
|
|
{
|
|
// Token: 0x020019D4 RID: 6612
|
|
[Token(Token = "0x20019D4")]
|
|
[Serializable]
|
|
public class BigInteger
|
|
{
|
|
// Token: 0x06009DFD RID: 40445 RVA: 0x0021218C File Offset: 0x0021038C
|
|
[Token(Token = "0x6009DFD")]
|
|
[Address(RVA = "0x1820B50", Offset = "0x181F950", VA = "0x181820B50")]
|
|
static BigInteger()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009DFD)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger::.cctor()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_7FA:
|
|
stelem:int32[]([mscorlib]System.Int32, ldloc:int32[][](var_0_07), ldc.i4:int32(58), ldloc:int32[](var_59_7E7))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009DFE RID: 40446 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x6009DFE")]
|
|
[Address(RVA = "0x1819580", Offset = "0x1818380", VA = "0x181819580")]
|
|
private static int GetByteLength(int nBits)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06009DFF RID: 40447 RVA: 0x0021299C File Offset: 0x00210B9C
|
|
[Token(Token = "0x6009DFF")]
|
|
[Address(RVA = "0x18172A0", Offset = "0x18160A0", VA = "0x1818172A0")]
|
|
internal static BigInteger Arbitrary(int sizeInBits)
|
|
{
|
|
SecureRandom randomSource = BigInteger.RandomSource;
|
|
return new BigInteger(sizeInBits, randomSource);
|
|
}
|
|
|
|
// Token: 0x06009E00 RID: 40448 RVA: 0x002129B8 File Offset: 0x00210BB8
|
|
[Token(Token = "0x6009E00")]
|
|
[Address(RVA = "0x18237A0", Offset = "0x18225A0", VA = "0x1818237A0")]
|
|
private BigInteger(int signum, int[] mag, bool checkMag)
|
|
{
|
|
this.nBits = (int)((ulong)(-1L));
|
|
base..ctor();
|
|
if (!checkMag)
|
|
{
|
|
this.sign = signum;
|
|
this.magnitude = mag;
|
|
return;
|
|
}
|
|
int num = 0;
|
|
int num2 = 0;
|
|
int length = mag.Length;
|
|
if (num2 < length && "{il2cpp array field mag->}" == (ulong)0L)
|
|
{
|
|
num++;
|
|
}
|
|
if (num != length)
|
|
{
|
|
this.sign = signum;
|
|
while (num == 0)
|
|
{
|
|
}
|
|
int num3 = mag.Length;
|
|
num3 -= num;
|
|
int[] array = new int[num3];
|
|
this.magnitude = array;
|
|
int length2 = array.Length;
|
|
int num4 = 0;
|
|
Array.Copy(mag, num, array, num4, length2);
|
|
}
|
|
this.sign = (int)((ulong)0L);
|
|
int[] zeroMagnitude = BigInteger.ZeroMagnitude;
|
|
this.magnitude = zeroMagnitude;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009E01 RID: 40449 RVA: 0x00212A68 File Offset: 0x00210C68
|
|
[Token(Token = "0x6009E01")]
|
|
[Address(RVA = "0x1823AB0", Offset = "0x18228B0", VA = "0x181823AB0")]
|
|
public BigInteger(string value)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06009E02 RID: 40450 RVA: 0x00212A78 File Offset: 0x00210C78
|
|
[Token(Token = "0x6009E02")]
|
|
[Address(RVA = "0x1823170", Offset = "0x1821F70", VA = "0x181823170")]
|
|
public BigInteger(string str, int radix)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009E02)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger::.ctor(System.String,System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_1F3:
|
|
stloc:FormatException(var_43_1FA, newobj:FormatException(FormatException::.ctor, ldloc:string(var_42)))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009E03 RID: 40451 RVA: 0x00212C80 File Offset: 0x00210E80
|
|
[Token(Token = "0x6009E03")]
|
|
[Address(RVA = "0x1823D50", Offset = "0x1822B50", VA = "0x181823D50")]
|
|
public BigInteger(byte[] bytes)
|
|
{
|
|
int length = bytes.Length;
|
|
}
|
|
|
|
// Token: 0x06009E04 RID: 40452 RVA: 0x00212C9C File Offset: 0x00210E9C
|
|
[Token(Token = "0x6009E04")]
|
|
[Address(RVA = "0x1823AC0", Offset = "0x18228C0", VA = "0x181823AC0")]
|
|
public BigInteger(byte[] bytes, int offset, int length)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009E04)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger::.ctor(System.Byte[],System.Int32,System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_8F:
|
|
stloc:FormatException(var_11_99, newobj:FormatException(FormatException::.ctor, ldstr:string("Zero length BigInteger")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009E05 RID: 40453 RVA: 0x00212D44 File Offset: 0x00210F44
|
|
[Token(Token = "0x6009E05")]
|
|
[Address(RVA = "0x181A060", Offset = "0x1818E60", VA = "0x18181A060")]
|
|
private static int[] MakeMagnitude(byte[] bytes, int offset, int length)
|
|
{
|
|
return BigInteger.ZeroMagnitude;
|
|
}
|
|
|
|
// Token: 0x06009E06 RID: 40454 RVA: 0x00212D84 File Offset: 0x00210F84
|
|
[Token(Token = "0x6009E06")]
|
|
[Address(RVA = "0x1823030", Offset = "0x1821E30", VA = "0x181823030")]
|
|
public BigInteger(int sign, byte[] bytes)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009E06)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger::.ctor(System.Int32,System.Byte[])
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_58:
|
|
stloc:FormatException(var_5_62, newobj:FormatException(FormatException::.ctor, ldstr:string("Invalid sign value")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009E07 RID: 40455 RVA: 0x00212DF4 File Offset: 0x00210FF4
|
|
[Token(Token = "0x6009E07")]
|
|
[Address(RVA = "0x1822F00", Offset = "0x1821D00", VA = "0x181822F00")]
|
|
public BigInteger(int sign, byte[] bytes, int offset, int length)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009E07)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger::.ctor(System.Int32,System.Byte[],System.Int32,System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_3E:
|
|
stloc:FormatException(var_3_48, newobj:FormatException(FormatException::.ctor, ldstr:string("Invalid sign value")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009E08 RID: 40456 RVA: 0x00212E4C File Offset: 0x0021104C
|
|
[Token(Token = "0x6009E08")]
|
|
[Address(RVA = "0x18238E0", Offset = "0x18226E0", VA = "0x1818238E0")]
|
|
public BigInteger(int sizeInBits, Random random)
|
|
{
|
|
int num = 0;
|
|
this.nBits = (int)((ulong)(-1L));
|
|
base..ctor();
|
|
this.nBits = (int)((ulong)(-1L));
|
|
if (sizeInBits != 0)
|
|
{
|
|
byte[] array = new byte[num];
|
|
double num2 = random.NextDouble();
|
|
int num3 = 0;
|
|
int length = array.Length;
|
|
int[] array2 = BigInteger.MakeMagnitude(array, num3, length);
|
|
this.magnitude = array2;
|
|
bool flag = array2.Length >= 1;
|
|
this.sign = (flag ? 1 : 0);
|
|
return;
|
|
}
|
|
int num4 = 0;
|
|
this.sign = num4;
|
|
int[] zeroMagnitude = BigInteger.ZeroMagnitude;
|
|
this.magnitude = zeroMagnitude;
|
|
}
|
|
|
|
// Token: 0x06009E09 RID: 40457 RVA: 0x00212EE0 File Offset: 0x002110E0
|
|
[Token(Token = "0x6009E09")]
|
|
[Address(RVA = "0x1823D80", Offset = "0x1822B80", VA = "0x181823D80")]
|
|
public BigInteger(int bitLength, int certainty, Random random)
|
|
{
|
|
int num = 0;
|
|
base..ctor();
|
|
this.nBitLength = bitLength;
|
|
if (bitLength != 2)
|
|
{
|
|
byte[] array = new byte[num];
|
|
num -= bitLength;
|
|
uint num2;
|
|
num2 -= (uint)num;
|
|
int num3 = 0;
|
|
byte b = array[0];
|
|
array[0] = b;
|
|
array[0] = b;
|
|
int length = array.Length;
|
|
int num4 = 0;
|
|
int[] array2 = BigInteger.MakeMagnitude(array, num4, length);
|
|
this.magnitude = array2;
|
|
this.mQuote = num3;
|
|
ulong num5;
|
|
if (this.CheckProbablePrime(certainty, random, num5 != 0UL))
|
|
{
|
|
return;
|
|
}
|
|
int num6 = this.magnitude.Length - 1;
|
|
uint num7;
|
|
if (num7 < (uint)num6)
|
|
{
|
|
double num8 = random.Sample();
|
|
ulong num9;
|
|
if (this.CheckProbablePrime(certainty, random, num9 != 0UL))
|
|
{
|
|
return;
|
|
}
|
|
num7 += (uint)1;
|
|
}
|
|
}
|
|
int num10;
|
|
if (num10 == 0)
|
|
{
|
|
}
|
|
int[] array3 = BigInteger.Three.magnitude;
|
|
this.magnitude = array3;
|
|
}
|
|
|
|
// Token: 0x06009E0A RID: 40458 RVA: 0x00212FC0 File Offset: 0x002111C0
|
|
[Token(Token = "0x6009E0A")]
|
|
[Address(RVA = "0x1816A30", Offset = "0x1815830", VA = "0x181816A30")]
|
|
public BigInteger Abs()
|
|
{
|
|
int num = this.sign;
|
|
int num2 = this.sign;
|
|
if (num2 != 0)
|
|
{
|
|
int[] array = this.magnitude;
|
|
BigInteger bigInteger;
|
|
bigInteger.nBits = (int)((ulong)(-1L));
|
|
bigInteger.magnitude = array;
|
|
bigInteger.sign = num2;
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// Token: 0x06009E0B RID: 40459 RVA: 0x00213000 File Offset: 0x00211200
|
|
[Token(Token = "0x6009E0B")]
|
|
[Address(RVA = "0x1816AD0", Offset = "0x18158D0", VA = "0x181816AD0")]
|
|
private static int[] AddMagnitudes(int[] a, int[] b)
|
|
{
|
|
int length = a.Length;
|
|
int length2 = b.Length;
|
|
int num = a[length];
|
|
int num2 = b[length2];
|
|
uint num3;
|
|
num3 += (uint)num;
|
|
num3 += (uint)num2;
|
|
a[0] = (int)num3;
|
|
if (num3 != (uint)0)
|
|
{
|
|
num2 = length;
|
|
while (num2 == a.Length)
|
|
{
|
|
}
|
|
}
|
|
return a;
|
|
}
|
|
|
|
// Token: 0x06009E0C RID: 40460 RVA: 0x00213058 File Offset: 0x00211258
|
|
[Token(Token = "0x6009E0C")]
|
|
[Address(RVA = "0x1816D60", Offset = "0x1815B60", VA = "0x181816D60")]
|
|
public BigInteger Add(BigInteger value)
|
|
{
|
|
int num = this.sign;
|
|
if (num == 0)
|
|
{
|
|
return value;
|
|
}
|
|
int num2 = value.sign;
|
|
if (num == num2)
|
|
{
|
|
int[] array = value.magnitude;
|
|
return this.AddToMagnitude(array);
|
|
}
|
|
if (num2 != 0)
|
|
{
|
|
BigInteger bigInteger = this.Negate();
|
|
return value.Subtract(bigInteger);
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// Token: 0x06009E0D RID: 40461 RVA: 0x002130B0 File Offset: 0x002112B0
|
|
[Token(Token = "0x6009E0D")]
|
|
[Address(RVA = "0x1816BB0", Offset = "0x18159B0", VA = "0x181816BB0")]
|
|
private BigInteger AddToMagnitude(int[] magToAdd)
|
|
{
|
|
int[] array;
|
|
int length3;
|
|
do
|
|
{
|
|
array = this.magnitude;
|
|
int length = magToAdd.Length;
|
|
int length2 = magToAdd.Length;
|
|
length3 = array.Length;
|
|
if (length2 == length3)
|
|
{
|
|
}
|
|
if ("{il2cpp array field magToAdd->}" >= (uint)(-1))
|
|
{
|
|
break;
|
|
}
|
|
if (length3 == 0)
|
|
{
|
|
}
|
|
}
|
|
while (length3 == 0);
|
|
int[] array2 = new int[0];
|
|
int num = 0;
|
|
int[] array3 = BigInteger.AddMagnitudes(array2, array);
|
|
return new BigInteger(this.sign, array3, num != 0);
|
|
}
|
|
|
|
// Token: 0x06009E0E RID: 40462 RVA: 0x00213118 File Offset: 0x00211318
|
|
[Token(Token = "0x6009E0E")]
|
|
[Address(RVA = "0x1816E60", Offset = "0x1815C60", VA = "0x181816E60")]
|
|
public BigInteger And(BigInteger value)
|
|
{
|
|
int num = this.sign;
|
|
if (num != 0 && value.sign != 0)
|
|
{
|
|
if (num > 0)
|
|
{
|
|
}
|
|
BigInteger one = BigInteger.One;
|
|
int[] array = this.Add(one).magnitude;
|
|
if (value.sign > 0)
|
|
{
|
|
}
|
|
BigInteger one2 = BigInteger.One;
|
|
int[] array2 = value.Add(one2).magnitude;
|
|
int num2 = value.sign;
|
|
int num3 = array2.Length;
|
|
num3 = Math.Max(array.Length, num3);
|
|
int[] array3 = new int[num3];
|
|
int num4 = array3.Length;
|
|
int num5 = 0;
|
|
int num6 = 0;
|
|
num4 -= num4;
|
|
int length = array3.Length;
|
|
if (num6 < length)
|
|
{
|
|
num6 += num5;
|
|
int num7 = 0;
|
|
array3[0] = num7;
|
|
if (num2 != 0)
|
|
{
|
|
array3[0] = num7;
|
|
}
|
|
num5++;
|
|
}
|
|
uint num8;
|
|
ulong num9;
|
|
BigInteger bigInteger = new BigInteger((int)num8, array3, num9 != 0UL);
|
|
if (num2 != 0)
|
|
{
|
|
BigInteger bigInteger2 = bigInteger.Inc();
|
|
int num10 = bigInteger2.sign;
|
|
if (num10 != 0)
|
|
{
|
|
int[] array4 = bigInteger2.magnitude;
|
|
BigInteger bigInteger3;
|
|
bigInteger3.nBits = (int)((ulong)(-1L));
|
|
bigInteger3.sign = num10;
|
|
bigInteger3.magnitude = array4;
|
|
}
|
|
}
|
|
}
|
|
return BigInteger.Zero;
|
|
}
|
|
|
|
// Token: 0x06009E0F RID: 40463 RVA: 0x00213244 File Offset: 0x00211444
|
|
[Token(Token = "0x6009E0F")]
|
|
[Address(RVA = "0x1816E10", Offset = "0x1815C10", VA = "0x181816E10")]
|
|
public BigInteger AndNot(BigInteger val)
|
|
{
|
|
BigInteger bigInteger = val.Inc().Negate();
|
|
return this.And(bigInteger);
|
|
}
|
|
|
|
// Token: 0x17001926 RID: 6438
|
|
// (get) Token: 0x06009E10 RID: 40464 RVA: 0x0021326C File Offset: 0x0021146C
|
|
[Token(Token = "0x17001926")]
|
|
public int BitCount
|
|
{
|
|
[Token(Token = "0x6009E10")]
|
|
[Address(RVA = "0x18241E0", Offset = "0x1822FE0", VA = "0x1818241E0")]
|
|
get
|
|
{
|
|
int num = this.nBits;
|
|
if (num == -1)
|
|
{
|
|
int[] array = this.magnitude;
|
|
int num2 = 0;
|
|
if (num2 < array.Length)
|
|
{
|
|
int num3 = array[num2];
|
|
int[] array2 = this.magnitude;
|
|
num2++;
|
|
num3 -= num3;
|
|
num3 += num3;
|
|
num3 += num3;
|
|
num3 += num3;
|
|
num3 += num3;
|
|
num2 += num3;
|
|
}
|
|
this.nBits = num2;
|
|
}
|
|
return num;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009E11 RID: 40465 RVA: 0x002132EC File Offset: 0x002114EC
|
|
[Token(Token = "0x6009E11")]
|
|
[Address(RVA = "0x1817330", Offset = "0x1816130", VA = "0x181817330")]
|
|
public static int BitCnt(int i)
|
|
{
|
|
return i;
|
|
}
|
|
|
|
// Token: 0x06009E12 RID: 40466 RVA: 0x002132FC File Offset: 0x002114FC
|
|
[Token(Token = "0x6009E12")]
|
|
[Address(RVA = "0x1817540", Offset = "0x1816340", VA = "0x181817540")]
|
|
private static int CalcBitLength(int sign, int indx, int[] mag)
|
|
{
|
|
int num = mag.Length;
|
|
if (indx < num)
|
|
{
|
|
int num2 = mag[indx];
|
|
if (num2 == 0)
|
|
{
|
|
}
|
|
num -= indx;
|
|
int num3 = 0;
|
|
int num4 = BigInteger.BitLen(num2);
|
|
num4 = num2;
|
|
if (num4 == num2)
|
|
{
|
|
int length = mag.Length;
|
|
if (indx < length)
|
|
{
|
|
while ("{il2cpp array field mag->}" == (ulong)0L)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
return num3;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x17001927 RID: 6439
|
|
// (get) Token: 0x06009E13 RID: 40467 RVA: 0x00213354 File Offset: 0x00211554
|
|
[Token(Token = "0x17001927")]
|
|
public int BitLength
|
|
{
|
|
[Token(Token = "0x6009E13")]
|
|
[Address(RVA = "0x1824340", Offset = "0x1823140", VA = "0x181824340")]
|
|
get
|
|
{
|
|
int num = this.nBitLength;
|
|
if (num == -1)
|
|
{
|
|
int num2 = this.sign;
|
|
if (num2 == 0)
|
|
{
|
|
int num3 = 0;
|
|
this.nBitLength = num3;
|
|
return num3;
|
|
}
|
|
int[] array = this.magnitude;
|
|
int num4 = 0;
|
|
int num5 = BigInteger.CalcBitLength(num2, num4, array);
|
|
this.nBitLength = num5;
|
|
}
|
|
return num;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009E14 RID: 40468 RVA: 0x002133A0 File Offset: 0x002115A0
|
|
[Token(Token = "0x6009E14")]
|
|
[Address(RVA = "0x1817370", Offset = "0x1816170", VA = "0x181817370")]
|
|
internal static int BitLen(int w)
|
|
{
|
|
if (w == 0)
|
|
{
|
|
if (w == 0)
|
|
{
|
|
if (w == 0)
|
|
{
|
|
byte[] bitLengthTable = BigInteger.BitLengthTable;
|
|
}
|
|
byte[] bitLengthTable2 = BigInteger.BitLengthTable;
|
|
}
|
|
byte[] bitLengthTable3 = BigInteger.BitLengthTable;
|
|
}
|
|
byte[] bitLengthTable4 = BigInteger.BitLengthTable;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009E15 RID: 40469 RVA: 0x002133D8 File Offset: 0x002115D8
|
|
[Token(Token = "0x6009E15")]
|
|
[Address(RVA = "0x181CF60", Offset = "0x181BD60", VA = "0x18181CF60")]
|
|
private bool QuickPow2Check()
|
|
{
|
|
return this.nBits == 1;
|
|
}
|
|
|
|
// Token: 0x06009E16 RID: 40470 RVA: 0x002133F0 File Offset: 0x002115F0
|
|
[Token(Token = "0x6009E16")]
|
|
[Address(RVA = "0x1817A90", Offset = "0x1816890", VA = "0x181817A90")]
|
|
public int CompareTo(object obj)
|
|
{
|
|
do
|
|
{
|
|
if (obj == 0)
|
|
{
|
|
}
|
|
}
|
|
while (obj == 0);
|
|
int num;
|
|
return num;
|
|
}
|
|
|
|
// Token: 0x06009E17 RID: 40471 RVA: 0x00213408 File Offset: 0x00211608
|
|
[Token(Token = "0x6009E17")]
|
|
[Address(RVA = "0x1817C10", Offset = "0x1816A10", VA = "0x181817C10")]
|
|
private static int CompareTo(int xIndx, int[] x, int yIndx, int[] y)
|
|
{
|
|
int length = x.Length;
|
|
if (xIndx == length || "{il2cpp array field x->}" == (ulong)0L)
|
|
{
|
|
}
|
|
int length2 = y.Length;
|
|
if (yIndx == length2 || "{il2cpp array field y->}" == (ulong)0L)
|
|
{
|
|
}
|
|
return BigInteger.CompareNoLeadingZeroes(xIndx, x, yIndx, y);
|
|
}
|
|
|
|
// Token: 0x06009E18 RID: 40472 RVA: 0x00213450 File Offset: 0x00211650
|
|
[Token(Token = "0x6009E18")]
|
|
[Address(RVA = "0x18179D0", Offset = "0x18167D0", VA = "0x1818179D0")]
|
|
private static int CompareNoLeadingZeroes(int xIndx, int[] x, int yIndx, int[] y)
|
|
{
|
|
int num = x.Length;
|
|
int length = y.Length;
|
|
num -= length;
|
|
num -= xIndx;
|
|
num += yIndx;
|
|
if (y == 0)
|
|
{
|
|
if (xIndx < xIndx)
|
|
{
|
|
int num2 = y[yIndx];
|
|
while ("{il2cpp array field x->}" == num2)
|
|
{
|
|
}
|
|
if ("{il2cpp array field x->}" >= num2)
|
|
{
|
|
goto IL_40;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
IL_40:
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009E19 RID: 40473 RVA: 0x002134A4 File Offset: 0x002116A4
|
|
[Token(Token = "0x6009E19")]
|
|
[Address(RVA = "0x1817B30", Offset = "0x1816930", VA = "0x181817B30")]
|
|
public int CompareTo(BigInteger value)
|
|
{
|
|
int num = this.sign;
|
|
if (num < value.sign)
|
|
{
|
|
return -1;
|
|
}
|
|
if (num > value.sign)
|
|
{
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
// Token: 0x06009E1A RID: 40474 RVA: 0x002134DC File Offset: 0x002116DC
|
|
[Token(Token = "0x6009E1A")]
|
|
[Address(RVA = "0x1818760", Offset = "0x1817560", VA = "0x181818760")]
|
|
private int[] Divide(int[] x, int[] y)
|
|
{
|
|
int num = 0;
|
|
int num2 = 0;
|
|
int length = x.Length;
|
|
if (num2 < length && "{il2cpp array field x->}" == (ulong)0L)
|
|
{
|
|
num++;
|
|
}
|
|
int num3 = 0;
|
|
int num4 = 0;
|
|
int length2 = y.Length;
|
|
if (num4 < length2 && "{il2cpp array field y->}" == (ulong)0L)
|
|
{
|
|
num3++;
|
|
}
|
|
int num5 = BigInteger.CompareNoLeadingZeroes(num, x, num3, y);
|
|
int[] array = new int[1];
|
|
int num6 = y.Length;
|
|
if (num3 < num6)
|
|
{
|
|
if (y[num3] == 0)
|
|
{
|
|
num3++;
|
|
}
|
|
num6 -= num3;
|
|
}
|
|
int num7 = 0;
|
|
ulong num8;
|
|
if (num8 == (ulong)0L)
|
|
{
|
|
}
|
|
int num9 = x.Length;
|
|
if (num < num9)
|
|
{
|
|
int num10 = x[num];
|
|
if (num10 == 0)
|
|
{
|
|
num++;
|
|
}
|
|
num9 -= num;
|
|
int num11 = BigInteger.BitLen(num10);
|
|
}
|
|
int num12 = 0;
|
|
num12 -= num7;
|
|
int num13 = 0;
|
|
int num14 = 0;
|
|
(new int[0])[0] = (int)((ulong)1L);
|
|
num12 -= num3;
|
|
int[] array2 = new int[num12];
|
|
num7++;
|
|
if (array2.Length < num13)
|
|
{
|
|
num7++;
|
|
}
|
|
uint num15;
|
|
array2[0] = (int)num15;
|
|
int[] array3 = new int[array2.Length];
|
|
int[] array4;
|
|
int num16 = BigInteger.CompareNoLeadingZeroes(num, x, num14, array4);
|
|
int[] array5 = BigInteger.Subtract(num, x, num14, array4);
|
|
int[] array6 = BigInteger.AddMagnitudes(array3, array2);
|
|
int length3 = x.Length;
|
|
if (x[num] == 0)
|
|
{
|
|
while (1 != length3)
|
|
{
|
|
}
|
|
return array3;
|
|
}
|
|
int num17 = x.Length;
|
|
num17--;
|
|
int num18;
|
|
num17 += num18;
|
|
int num19 = x.Length;
|
|
num19--;
|
|
num19 += num3;
|
|
if (1 < num19)
|
|
{
|
|
num3++;
|
|
uint num20;
|
|
if (num20 == (uint)0)
|
|
{
|
|
int[] array7 = BigInteger.One.magnitude;
|
|
int[] array8 = BigInteger.AddMagnitudes(array3, array7);
|
|
int num21 = x.Length;
|
|
num21--;
|
|
Array.Clear(x, 1, num21);
|
|
}
|
|
}
|
|
uint num22;
|
|
while (num22 == (uint)0)
|
|
{
|
|
}
|
|
num12 -= num17;
|
|
if (num12 != 1 || x > "{il2cpp array field x->}")
|
|
{
|
|
}
|
|
num14++;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009E1B RID: 40475 RVA: 0x002136C4 File Offset: 0x002118C4
|
|
[Token(Token = "0x6009E1B")]
|
|
[Address(RVA = "0x1818570", Offset = "0x1817370", VA = "0x181818570")]
|
|
public BigInteger Divide(BigInteger val)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009E1B)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger::Divide(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_90:
|
|
stloc:ArithmeticException(var_10_9A, newobj:ArithmeticException(ArithmeticException::.ctor, ldstr:string("Division by zero error")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009E1C RID: 40476 RVA: 0x0021376C File Offset: 0x0021196C
|
|
[Token(Token = "0x6009E1C")]
|
|
[Address(RVA = "0x1817FE0", Offset = "0x1816DE0", VA = "0x181817FE0")]
|
|
public BigInteger[] DivideAndRemainder(BigInteger val)
|
|
{
|
|
BigInteger[] array;
|
|
for (;;)
|
|
{
|
|
if (val.sign != 0)
|
|
{
|
|
array = new BigInteger[2];
|
|
if (this.sign == 0)
|
|
{
|
|
goto IL_E0;
|
|
}
|
|
if (val.sign > 0 && val.nBits == 1)
|
|
{
|
|
int bitLength = val.Abs().BitLength;
|
|
BigInteger bigInteger = this.Abs();
|
|
int num = bitLength - 1;
|
|
BigInteger bigInteger2 = bigInteger.ShiftRight(num);
|
|
int num2 = bitLength - 1;
|
|
int[] array2 = this.LastNBits(num2);
|
|
int num3 = this.sign;
|
|
if (val.sign != num3)
|
|
{
|
|
BigInteger bigInteger3 = bigInteger2.Negate();
|
|
}
|
|
if (bigInteger2 != 0)
|
|
{
|
|
}
|
|
array[0] = bigInteger2;
|
|
if (new BigInteger(this.sign, array2, true) != 0)
|
|
{
|
|
}
|
|
}
|
|
int[] array3 = this.magnitude;
|
|
if (array == 0)
|
|
{
|
|
}
|
|
if (array != 0)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
int num4 = this.sign;
|
|
int num5 = val.sign;
|
|
int num6;
|
|
int[] array4;
|
|
BigInteger bigInteger4 = new BigInteger(num6, array4, true);
|
|
num6 = num5 * num4;
|
|
if (bigInteger4 != 0)
|
|
{
|
|
}
|
|
array[0] = bigInteger4;
|
|
BigInteger bigInteger5;
|
|
if (bigInteger5 != 0)
|
|
{
|
|
}
|
|
IL_E0:
|
|
BigInteger zero = BigInteger.Zero;
|
|
if (zero != 0)
|
|
{
|
|
}
|
|
array[0] = zero;
|
|
BigInteger zero2 = BigInteger.Zero;
|
|
if (zero2 != 0)
|
|
{
|
|
}
|
|
array[1] = zero2;
|
|
return array;
|
|
}
|
|
|
|
// Token: 0x06009E1D RID: 40477 RVA: 0x0021388C File Offset: 0x00211A8C
|
|
[Token(Token = "0x6009E1D")]
|
|
[Address(RVA = "0x1818FE0", Offset = "0x1817DE0", VA = "0x181818FE0", Slot = "0")]
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (obj != this)
|
|
{
|
|
if (obj != 0)
|
|
{
|
|
int num = 0;
|
|
if (obj != 0 && this.sign == num)
|
|
{
|
|
bool flag;
|
|
return flag;
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// Token: 0x06009E1E RID: 40478 RVA: 0x002138B8 File Offset: 0x00211AB8
|
|
[Token(Token = "0x6009E1E")]
|
|
[Address(RVA = "0x1819B80", Offset = "0x1818980", VA = "0x181819B80")]
|
|
private bool IsEqualMagnitude(BigInteger x)
|
|
{
|
|
int[] array = this.magnitude;
|
|
int[] array2 = x.magnitude;
|
|
int length = array.Length;
|
|
if (length == array2.Length)
|
|
{
|
|
int num = 0;
|
|
if (num < length)
|
|
{
|
|
int num2 = array2[num];
|
|
if ("{il2cpp array field local2->}" != num2)
|
|
{
|
|
goto IL_3C;
|
|
}
|
|
num++;
|
|
}
|
|
return true;
|
|
}
|
|
IL_3C:
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009E1F RID: 40479 RVA: 0x0021390C File Offset: 0x00211B0C
|
|
[Token(Token = "0x6009E1F")]
|
|
[Address(RVA = "0x1819470", Offset = "0x1818270", VA = "0x181819470")]
|
|
public BigInteger Gcd(BigInteger value)
|
|
{
|
|
int num;
|
|
do
|
|
{
|
|
num = this.sign;
|
|
if (value.sign == 0)
|
|
{
|
|
goto IL_2A;
|
|
}
|
|
}
|
|
while (num == 0);
|
|
if (value.sign != 0)
|
|
{
|
|
return this.Mod(value).Abs();
|
|
}
|
|
BigInteger bigInteger;
|
|
return bigInteger;
|
|
IL_2A:
|
|
int num2 = this.sign;
|
|
if (num2 != 0)
|
|
{
|
|
int[] array = this.magnitude;
|
|
bigInteger.nBits = (int)((ulong)(-1L));
|
|
bigInteger.magnitude = array;
|
|
bigInteger.sign = num2;
|
|
}
|
|
return bigInteger;
|
|
}
|
|
|
|
// Token: 0x06009E20 RID: 40480 RVA: 0x00213974 File Offset: 0x00211B74
|
|
[Token(Token = "0x6009E20")]
|
|
[Address(RVA = "0x1819590", Offset = "0x1818390", VA = "0x181819590", Slot = "2")]
|
|
public override int GetHashCode()
|
|
{
|
|
int[] array = this.magnitude;
|
|
int length = array.Length;
|
|
int length2 = array.Length;
|
|
if (length != 0 && length2 > 1)
|
|
{
|
|
int num = length2 - 1;
|
|
}
|
|
if (this.sign < 0)
|
|
{
|
|
}
|
|
return length2;
|
|
}
|
|
|
|
// Token: 0x06009E21 RID: 40481 RVA: 0x002139B4 File Offset: 0x00211BB4
|
|
[Token(Token = "0x6009E21")]
|
|
[Address(RVA = "0x1819A30", Offset = "0x1818830", VA = "0x181819A30")]
|
|
private BigInteger Inc()
|
|
{
|
|
if (this.sign != 0)
|
|
{
|
|
int[] array = BigInteger.One.magnitude;
|
|
return this.AddToMagnitude(array);
|
|
}
|
|
return BigInteger.One;
|
|
}
|
|
|
|
// Token: 0x17001928 RID: 6440
|
|
// (get) Token: 0x06009E22 RID: 40482 RVA: 0x00213A00 File Offset: 0x00211C00
|
|
[Token(Token = "0x17001928")]
|
|
public int IntValue
|
|
{
|
|
[Token(Token = "0x6009E22")]
|
|
[Address(RVA = "0x18243E0", Offset = "0x18231E0", VA = "0x1818243E0")]
|
|
get
|
|
{
|
|
if (this.sign != 0)
|
|
{
|
|
int[] array = this.magnitude;
|
|
int num = array.Length - 1;
|
|
return array[num];
|
|
}
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009E23 RID: 40483 RVA: 0x00213A38 File Offset: 0x00211C38
|
|
[Token(Token = "0x6009E23")]
|
|
[Address(RVA = "0x1819DA0", Offset = "0x1818BA0", VA = "0x181819DA0")]
|
|
public bool IsProbablePrime(int certainty)
|
|
{
|
|
if (certainty > 0)
|
|
{
|
|
BigInteger bigInteger = this.Abs();
|
|
int num = 0;
|
|
if (bigInteger.TestBit(num))
|
|
{
|
|
int num2 = 0;
|
|
SecureRandom randomSource = BigInteger.RandomSource;
|
|
return bigInteger.CheckProbablePrime(certainty, randomSource, num2 != 0);
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// Token: 0x06009E24 RID: 40484 RVA: 0x00213A7C File Offset: 0x00211C7C
|
|
[Token(Token = "0x6009E24")]
|
|
[Address(RVA = "0x1819C10", Offset = "0x1818A10", VA = "0x181819C10")]
|
|
internal bool IsProbablePrime(int certainty, bool randomlySelected)
|
|
{
|
|
if (certainty > 0)
|
|
{
|
|
BigInteger bigInteger = this.Abs();
|
|
int num = 0;
|
|
if (bigInteger.TestBit(num))
|
|
{
|
|
SecureRandom randomSource = BigInteger.RandomSource;
|
|
return bigInteger.CheckProbablePrime(certainty, randomSource, randomlySelected);
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// Token: 0x06009E25 RID: 40485 RVA: 0x00213ABC File Offset: 0x00211CBC
|
|
[Token(Token = "0x6009E25")]
|
|
[Address(RVA = "0x1817670", Offset = "0x1816470", VA = "0x181817670")]
|
|
private bool CheckProbablePrime(int certainty, Random random, bool randomlySelected)
|
|
{
|
|
int bitLength = this.BitLength;
|
|
int length = BigInteger.primeLists.Length;
|
|
int num = Math.Min(bitLength - 1, length);
|
|
int num2 = 0;
|
|
if (num > 0)
|
|
{
|
|
int num3 = BigInteger.primeProducts[num2];
|
|
int num4 = this.Remainder(num3);
|
|
int[] array = BigInteger.primeLists[num2];
|
|
int num5 = 0;
|
|
if (num5 < array.Length)
|
|
{
|
|
if (num3 == 0)
|
|
{
|
|
throw new NullReferenceException();
|
|
}
|
|
num5++;
|
|
}
|
|
num2++;
|
|
}
|
|
return this.RabinMillerTest(certainty, random, randomlySelected);
|
|
}
|
|
|
|
// Token: 0x06009E26 RID: 40486 RVA: 0x00213B40 File Offset: 0x00211D40
|
|
[Token(Token = "0x6009E26")]
|
|
[Address(RVA = "0x181CF80", Offset = "0x181BD80", VA = "0x18181CF80")]
|
|
public bool RabinMillerTest(int certainty, Random random)
|
|
{
|
|
int num = 0;
|
|
return this.RabinMillerTest(certainty, random, num != 0);
|
|
}
|
|
|
|
// Token: 0x06009E27 RID: 40487 RVA: 0x00213B58 File Offset: 0x00211D58
|
|
[Token(Token = "0x6009E27")]
|
|
[Address(RVA = "0x181CFA0", Offset = "0x181BDA0", VA = "0x18181CFA0")]
|
|
internal bool RabinMillerTest(int certainty, Random random, bool randomlySelected)
|
|
{
|
|
int num3;
|
|
int lowestSetBitMaskFirst;
|
|
BigInteger bigInteger;
|
|
BigInteger bigInteger2;
|
|
BigInteger bigInteger3;
|
|
BigInteger bigInteger4;
|
|
do
|
|
{
|
|
int num = 0;
|
|
int bitLength = this.BitLength;
|
|
int num2 = certainty - 1;
|
|
num2 -= num;
|
|
num3 = num2 + 1;
|
|
if (randomlySelected)
|
|
{
|
|
num3 += -50;
|
|
uint num4;
|
|
num3 += (int)num4;
|
|
num3 = Math.Min((int)num4, num3);
|
|
}
|
|
lowestSetBitMaskFirst = this.GetLowestSetBitMaskFirst(-2);
|
|
bigInteger = this.ShiftRight(lowestSetBitMaskFirst);
|
|
int[] array = this.magnitude;
|
|
BigInteger one = BigInteger.One;
|
|
int length = array.Length;
|
|
bigInteger2 = one.ShiftLeft(length).Remainder(this);
|
|
bigInteger3 = this.Subtract(bigInteger2);
|
|
if (this.nBitLength == -1)
|
|
{
|
|
int num5 = this.sign;
|
|
if (num5 == 0)
|
|
{
|
|
}
|
|
int[] array2 = this.magnitude;
|
|
int num6 = 0;
|
|
num5 = BigInteger.CalcBitLength(num5, num6, array2);
|
|
this.nBitLength = num5;
|
|
}
|
|
while (bigInteger4.sign == 0)
|
|
{
|
|
}
|
|
int num7 = bigInteger4.CompareTo(this);
|
|
}
|
|
while (bigInteger4.IsEqualMagnitude(bigInteger2) || bigInteger4.IsEqualMagnitude(bigInteger3));
|
|
int num8 = 0;
|
|
BigInteger bigInteger5 = BigInteger.ModPowMonty(bigInteger4, bigInteger, this, num8 != 0);
|
|
if (bigInteger5 == 0)
|
|
{
|
|
if (1 != lowestSetBitMaskFirst)
|
|
{
|
|
int num9 = 0;
|
|
BigInteger two = BigInteger.Two;
|
|
BigInteger bigInteger6 = BigInteger.ModPowMonty(bigInteger5, two, this, num9 != 0);
|
|
}
|
|
}
|
|
num3--;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x17001929 RID: 6441
|
|
// (get) Token: 0x06009E28 RID: 40488 RVA: 0x00213C80 File Offset: 0x00211E80
|
|
[Token(Token = "0x17001929")]
|
|
public long LongValue
|
|
{
|
|
[Token(Token = "0x6009E28")]
|
|
[Address(RVA = "0x1824430", Offset = "0x1823230", VA = "0x181824430")]
|
|
get
|
|
{
|
|
if (this.sign != 0)
|
|
{
|
|
int length = this.magnitude.Length;
|
|
int num = length - 1;
|
|
if (length > 1)
|
|
{
|
|
}
|
|
}
|
|
throw new IndexOutOfRangeException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009E29 RID: 40489 RVA: 0x00213CB4 File Offset: 0x00211EB4
|
|
[Token(Token = "0x6009E29")]
|
|
[Address(RVA = "0x181A200", Offset = "0x1819000", VA = "0x18181A200")]
|
|
public BigInteger Max(BigInteger value)
|
|
{
|
|
int num = this.CompareTo(value);
|
|
return this;
|
|
}
|
|
|
|
// Token: 0x06009E2A RID: 40490 RVA: 0x00213CCC File Offset: 0x00211ECC
|
|
[Token(Token = "0x6009E2A")]
|
|
[Address(RVA = "0x181A230", Offset = "0x1819030", VA = "0x18181A230")]
|
|
public BigInteger Min(BigInteger value)
|
|
{
|
|
int num = this.CompareTo(value);
|
|
return this;
|
|
}
|
|
|
|
// Token: 0x06009E2B RID: 40491 RVA: 0x00213CE4 File Offset: 0x00211EE4
|
|
[Token(Token = "0x6009E2B")]
|
|
[Address(RVA = "0x181B970", Offset = "0x181A770", VA = "0x18181B970")]
|
|
public BigInteger Mod(BigInteger m)
|
|
{
|
|
BigInteger bigInteger = this.Remainder(m);
|
|
if (bigInteger.sign < 0)
|
|
{
|
|
BigInteger bigInteger2 = bigInteger.Add(m);
|
|
}
|
|
return bigInteger;
|
|
}
|
|
|
|
// Token: 0x06009E2C RID: 40492 RVA: 0x00213D14 File Offset: 0x00211F14
|
|
[Token(Token = "0x6009E2C")]
|
|
[Address(RVA = "0x181A5F0", Offset = "0x18193F0", VA = "0x18181A5F0")]
|
|
public BigInteger ModInverse(BigInteger m)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009E2C)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger::ModInverse(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_73:
|
|
stloc:BigInteger(var_8_7A, call:BigInteger(BigInteger::ModInversePow2, ldloc:BigInteger(this), ldloc:BigInteger(m)))
|
|
stloc:ArithmeticException(var_9_86, newobj:ArithmeticException(ArithmeticException::.ctor, ldstr:string("Modulus must be positive")))
|
|
stloc:ArithmeticException(var_10_92, newobj:ArithmeticException(ArithmeticException::.ctor, ldstr:string("Numbers not relatively prime.")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009E2D RID: 40493 RVA: 0x00213DB4 File Offset: 0x00211FB4
|
|
[Token(Token = "0x6009E2D")]
|
|
[Address(RVA = "0x181A310", Offset = "0x1819110", VA = "0x18181A310")]
|
|
private BigInteger ModInversePow2(BigInteger m)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009E2D)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger::ModInversePow2(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_111:
|
|
stloc:ArithmeticException(var_23_11B, newobj:ArithmeticException(ArithmeticException::.ctor, ldstr:string("Numbers not relatively prime.")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009E2E RID: 40494 RVA: 0x00213EE0 File Offset: 0x002120E0
|
|
[Token(Token = "0x6009E2E")]
|
|
[Address(RVA = "0x181A260", Offset = "0x1819060", VA = "0x18181A260")]
|
|
private static int ModInverse32(int d)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009E2E)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger::ModInverse32(System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:uint32(var_1_03, mul:uint32(ldloc:uint32(var_0), ldloc:int32[exp:uint32](d)))
|
|
stloc:uint32(var_0, sub:uint32(ldloc:uint32(var_0), ldloc:uint32(var_1_03)))
|
|
stloc:uint32(var_2_0B, mul:uint32(ldloc:uint32(var_0), ldloc:int32[exp:uint32](d)))
|
|
stloc:uint32(var_0, sub:uint32(ldloc:uint32(var_0), ldloc:uint32(var_2_0B)))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009E2F RID: 40495 RVA: 0x00213EFC File Offset: 0x002120FC
|
|
[Token(Token = "0x6009E2F")]
|
|
[Address(RVA = "0x181A2B0", Offset = "0x18190B0", VA = "0x18181A2B0")]
|
|
private static long ModInverse64(long d)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009E2F)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int64 BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger::ModInverse64(System.Int64)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:uint32(var_1_03, mul:int64[exp:uint32](ldloc:uint32[exp:int64](var_0), ldloc:int64(d)))
|
|
stloc:uint32(var_0, sub:uint32(ldloc:uint32(var_0), ldloc:uint32(var_1_03)))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009E30 RID: 40496 RVA: 0x00213F10 File Offset: 0x00212110
|
|
[Token(Token = "0x6009E30")]
|
|
[Address(RVA = "0x1819090", Offset = "0x1817E90", VA = "0x181819090")]
|
|
private static BigInteger ExtEuclid(BigInteger a, BigInteger b, out BigInteger u1Out)
|
|
{
|
|
BigInteger one = BigInteger.One;
|
|
BigInteger zero = BigInteger.Zero;
|
|
if (b.sign > 0)
|
|
{
|
|
BigInteger[] array = a.DivideAndRemainder(b);
|
|
int length = array.Length;
|
|
if (array[1].sign > 0)
|
|
{
|
|
BigInteger bigInteger = array[0];
|
|
BigInteger bigInteger2 = zero.Multiply(bigInteger);
|
|
BigInteger bigInteger3 = one.Subtract(bigInteger2);
|
|
}
|
|
}
|
|
return a;
|
|
}
|
|
|
|
// Token: 0x06009E31 RID: 40497 RVA: 0x00213F74 File Offset: 0x00212174
|
|
[Token(Token = "0x6009E31")]
|
|
[Address(RVA = "0x1820B20", Offset = "0x181F920", VA = "0x181820B20")]
|
|
private static void ZeroOut(int[] x)
|
|
{
|
|
int length = x.Length;
|
|
int num = 0;
|
|
Array.Clear(x, num, length);
|
|
}
|
|
|
|
// Token: 0x06009E32 RID: 40498 RVA: 0x00213F98 File Offset: 0x00212198
|
|
[Token(Token = "0x6009E32")]
|
|
[Address(RVA = "0x181B6C0", Offset = "0x181A4C0", VA = "0x18181B6C0")]
|
|
public BigInteger ModPow(BigInteger e, BigInteger m)
|
|
{
|
|
int num;
|
|
BigInteger bigInteger4;
|
|
do
|
|
{
|
|
num = e.sign;
|
|
if (num == 0 || this.sign == 0)
|
|
{
|
|
goto IL_61;
|
|
}
|
|
if (num != 0)
|
|
{
|
|
BigInteger bigInteger = e.Negate();
|
|
}
|
|
BigInteger bigInteger2 = this.Mod(m);
|
|
int num2 = m.magnitude.Length - 1;
|
|
if ("{il2cpp array field local10->}" != (ulong)1L)
|
|
{
|
|
BigInteger bigInteger3 = BigInteger.ModPowMonty(bigInteger2, e, m, true);
|
|
}
|
|
bigInteger4 = BigInteger.ModPowBarrett(bigInteger2, e, m);
|
|
}
|
|
while (num == 0);
|
|
return bigInteger4.ModInverse(m);
|
|
IL_61:
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009E33 RID: 40499 RVA: 0x0021400C File Offset: 0x0021220C
|
|
[Token(Token = "0x6009E33")]
|
|
[Address(RVA = "0x181A880", Offset = "0x1819680", VA = "0x18181A880")]
|
|
private static BigInteger ModPowBarrett(BigInteger b, BigInteger e, BigInteger m)
|
|
{
|
|
int num = m.magnitude.Length;
|
|
BigInteger one = BigInteger.One;
|
|
int num2 = num + 1;
|
|
BigInteger bigInteger = one.ShiftLeft(num2);
|
|
BigInteger one2 = BigInteger.One;
|
|
num2 = num;
|
|
BigInteger bigInteger2 = one2.ShiftLeft(num2).Divide(m);
|
|
int num3 = 0;
|
|
num = e.BitLength;
|
|
int[] expWindowThresholds = BigInteger.ExpWindowThresholds;
|
|
if (num > "{il2cpp array field local17->}")
|
|
{
|
|
num3++;
|
|
}
|
|
BigInteger[] array = new BigInteger[1];
|
|
if (b != 0)
|
|
{
|
|
}
|
|
array[0] = b;
|
|
BigInteger bigInteger3 = BigInteger.ReduceBarrett(b.Square(), m, bigInteger, bigInteger2);
|
|
uint num4;
|
|
if (num4 > num4)
|
|
{
|
|
uint num5 = num4 - 1U;
|
|
BigInteger bigInteger4 = array[(int)num5].Multiply(bigInteger3);
|
|
throw new ArrayTypeMismatchException();
|
|
}
|
|
int[] array2;
|
|
int num6 = array2[0];
|
|
BigInteger bigInteger5;
|
|
if (num6 != (int)num4)
|
|
{
|
|
bigInteger5 = array[num6];
|
|
}
|
|
int num7 = array2[(int)num4];
|
|
if (num7 != -1)
|
|
{
|
|
byte[] bitLengthTable = BigInteger.BitLengthTable;
|
|
int num8 = 0;
|
|
byte b2 = (byte)((int)b2 + num6);
|
|
BigInteger bigInteger6 = bigInteger5.Square();
|
|
num8++;
|
|
BigInteger bigInteger7 = array[num7];
|
|
BigInteger bigInteger9;
|
|
BigInteger bigInteger8 = bigInteger9.Multiply(bigInteger7);
|
|
ulong num9;
|
|
num9 += (ulong)1L;
|
|
}
|
|
int num10 = 0;
|
|
if (num7 > 0)
|
|
{
|
|
BigInteger bigInteger11;
|
|
BigInteger bigInteger10 = bigInteger11.Square();
|
|
num10++;
|
|
}
|
|
BigInteger bigInteger12;
|
|
return bigInteger12;
|
|
}
|
|
|
|
// Token: 0x06009E34 RID: 40500 RVA: 0x00214154 File Offset: 0x00212354
|
|
[Token(Token = "0x6009E34")]
|
|
[Address(RVA = "0x181D340", Offset = "0x181C140", VA = "0x18181D340")]
|
|
private static BigInteger ReduceBarrett(BigInteger x, BigInteger m, BigInteger mr, BigInteger yu)
|
|
{
|
|
int num = x.BitLength;
|
|
int bitLength = m.BitLength;
|
|
num -= bitLength;
|
|
if (num > 1)
|
|
{
|
|
int num2 = m.magnitude.Length;
|
|
int num3 = num2 - 1;
|
|
BigInteger bigInteger = x.DivideWords(num3).Multiply(yu);
|
|
num2++;
|
|
BigInteger bigInteger2 = bigInteger.DivideWords(num2);
|
|
BigInteger bigInteger3 = x.RemainderWords(num2);
|
|
BigInteger bigInteger4 = bigInteger2.Multiply(m).RemainderWords(num2);
|
|
BigInteger bigInteger5 = bigInteger3.Subtract(bigInteger4);
|
|
if (bigInteger5.sign < 0)
|
|
{
|
|
BigInteger bigInteger6 = bigInteger5.Add(mr);
|
|
}
|
|
}
|
|
int num4 = x.CompareTo(m);
|
|
return x.Subtract(m);
|
|
}
|
|
|
|
// Token: 0x06009E35 RID: 40501 RVA: 0x002141F4 File Offset: 0x002123F4
|
|
[Token(Token = "0x6009E35")]
|
|
[Address(RVA = "0x181AE60", Offset = "0x1819C60", VA = "0x18181AE60")]
|
|
private static BigInteger ModPowMonty(BigInteger b, BigInteger e, BigInteger m, bool convert)
|
|
{
|
|
int length = m.magnitude.Length;
|
|
int num = m.BitLength;
|
|
num += 2;
|
|
int num2 = m.mQuote;
|
|
uint num5;
|
|
if (num2 == 0)
|
|
{
|
|
int[] array = m.magnitude;
|
|
int num3 = array.Length - 1;
|
|
int num4 = array[num3];
|
|
array += num4;
|
|
int[] array2 = array * num4;
|
|
num5 -= array2;
|
|
int[] array3 = array * num5;
|
|
int[] array4 = array3 * num4;
|
|
num5 -= array4;
|
|
int[] array5 = array3 * num5;
|
|
int[] array6 = array5 * num4;
|
|
num5 -= array6;
|
|
uint num6 = num5 * array5;
|
|
m.mQuote = (int)num6;
|
|
}
|
|
BigInteger bigInteger;
|
|
if (convert)
|
|
{
|
|
bigInteger = b.ShiftLeft(length).Remainder(m);
|
|
}
|
|
int num7 = length + 1;
|
|
int[] array7 = new int[num7];
|
|
int[] array8;
|
|
if (bigInteger.magnitude.Length < length)
|
|
{
|
|
num7 = length;
|
|
array8 = new int[num7];
|
|
}
|
|
int num8 = 0;
|
|
int[] array9 = e.magnitude;
|
|
if (e.BitCount > (int)num5)
|
|
{
|
|
int bitLength = e.BitLength;
|
|
int[] expWindowThresholds = BigInteger.ExpWindowThresholds;
|
|
if (bitLength > "{il2cpp array field local36->}")
|
|
{
|
|
num8++;
|
|
}
|
|
}
|
|
int[][] array10 = new int[1][];
|
|
if (array8 != 0)
|
|
{
|
|
}
|
|
array10[0] = array8;
|
|
int[] array11 = Arrays.Clone(array8);
|
|
uint num9;
|
|
uint num10;
|
|
if (num9 > num10)
|
|
{
|
|
uint num11 = num10 - 1U;
|
|
int[] array12 = Arrays.Clone(array10[(int)num11]);
|
|
throw new ArrayTypeMismatchException();
|
|
}
|
|
int[] windowList = BigInteger.GetWindowList(e.magnitude, num8);
|
|
int num12 = windowList[0];
|
|
int[] array13;
|
|
if (num12 != 1)
|
|
{
|
|
array13 = Arrays.Clone(array10[num12]);
|
|
}
|
|
uint num14;
|
|
int num13 = windowList[(int)num14];
|
|
if (num13 != -1)
|
|
{
|
|
num2 = num13;
|
|
byte[] bitLengthTable = BigInteger.BitLengthTable;
|
|
byte b2 = (byte)((int)b2 + num12);
|
|
num14 = num5;
|
|
num5 += (uint)1;
|
|
}
|
|
if (num13 > 0)
|
|
{
|
|
}
|
|
int[] array14 = m.magnitude;
|
|
int num15 = 0;
|
|
int num16 = BigInteger.CompareTo(0, array13, num15, array14);
|
|
int[] array15 = m.magnitude;
|
|
int num17 = 0;
|
|
int[] array16 = BigInteger.Subtract(0, array13, num17, array15);
|
|
int[] array17 = m.magnitude;
|
|
BigInteger.MontgomeryReduce(array13, array17, (uint)num2);
|
|
uint num18;
|
|
ulong num19;
|
|
return new BigInteger((int)num18, array13, num19 != 0UL);
|
|
}
|
|
|
|
// Token: 0x06009E36 RID: 40502 RVA: 0x002143FC File Offset: 0x002125FC
|
|
[Token(Token = "0x6009E36")]
|
|
[Address(RVA = "0x18197B0", Offset = "0x18185B0", VA = "0x1818197B0")]
|
|
private static int[] GetWindowList(int[] mag, int extraBits)
|
|
{
|
|
int num = mag[0];
|
|
int num2 = 0;
|
|
int num3 = BigInteger.BitLen(num);
|
|
int num4 = mag.Length;
|
|
num4 += num3;
|
|
int[] array = new int[num2];
|
|
uint num5;
|
|
num5 -= (uint)num3;
|
|
int num6 = 0;
|
|
int num7 = 0;
|
|
int num8 = 0;
|
|
uint num9;
|
|
if (num5 < (uint)32)
|
|
{
|
|
num7++;
|
|
num += num;
|
|
num5 += (uint)1;
|
|
num6++;
|
|
if (num9 == (uint)1)
|
|
{
|
|
num7++;
|
|
while (num9 == (uint)1)
|
|
{
|
|
}
|
|
}
|
|
num += num;
|
|
array[0] = num7;
|
|
num5 += (uint)1;
|
|
num += num;
|
|
num5 += (uint)1;
|
|
}
|
|
num8++;
|
|
if (num8 != mag.Length)
|
|
{
|
|
}
|
|
if (num9 == (uint)1)
|
|
{
|
|
num7++;
|
|
while (num9 == (uint)1)
|
|
{
|
|
}
|
|
}
|
|
array[0] = num7;
|
|
num6++;
|
|
array[0] = (int)((ulong)4294967295L);
|
|
return array;
|
|
}
|
|
|
|
// Token: 0x06009E37 RID: 40503 RVA: 0x002144D8 File Offset: 0x002126D8
|
|
[Token(Token = "0x6009E37")]
|
|
[Address(RVA = "0x1817FC0", Offset = "0x1816DC0", VA = "0x181817FC0")]
|
|
private static int CreateWindowEntry(int mult, int zeroes)
|
|
{
|
|
if (mult == 1)
|
|
{
|
|
while (mult == 1)
|
|
{
|
|
}
|
|
}
|
|
return zeroes;
|
|
}
|
|
|
|
// Token: 0x06009E38 RID: 40504 RVA: 0x002144F0 File Offset: 0x002126F0
|
|
[Token(Token = "0x6009E38")]
|
|
[Address(RVA = "0x181EFE0", Offset = "0x181DDE0", VA = "0x18181EFE0")]
|
|
private static int[] Square(int[] w, int[] x)
|
|
{
|
|
int num = w.Length;
|
|
int num2 = x.Length;
|
|
int num3 = num2 - 1;
|
|
if (num3 > 0)
|
|
{
|
|
num2 = num3;
|
|
int num4 = num3 - 1;
|
|
int num5 = x[num2];
|
|
int num6 = w[num];
|
|
int num7 = num5 * num5;
|
|
num7 += num6;
|
|
w[0] = num7;
|
|
num = num7;
|
|
num6 = num4;
|
|
int num8 = x[num6] * num5;
|
|
num7 += num6;
|
|
num7 += num;
|
|
num7 += num8;
|
|
num8 = num7;
|
|
int num9 = num - 1;
|
|
num6 += num8;
|
|
if (num9 > 0)
|
|
{
|
|
w[0] = num6;
|
|
}
|
|
int num10 = num3 - 1;
|
|
num10 += num9;
|
|
}
|
|
int num11 = x[0];
|
|
int num12 = w[num];
|
|
int num13 = num11 * num11;
|
|
num13 += num12;
|
|
w[0] = num13;
|
|
if (num > 0)
|
|
{
|
|
int num14 = num - 1;
|
|
}
|
|
return w;
|
|
}
|
|
|
|
// Token: 0x06009E39 RID: 40505 RVA: 0x002145D4 File Offset: 0x002127D4
|
|
[Token(Token = "0x6009E39")]
|
|
[Address(RVA = "0x181C1E0", Offset = "0x181AFE0", VA = "0x18181C1E0")]
|
|
private static int[] Multiply(int[] x, int[] y, int[] z)
|
|
{
|
|
int num = z.Length;
|
|
int length = x.Length;
|
|
num--;
|
|
int num2 = z[num];
|
|
int num3 = 0;
|
|
if (num2 != 0)
|
|
{
|
|
int length2 = y.Length;
|
|
int num4 = y[length2];
|
|
int num5 = x[z];
|
|
num3 += num5;
|
|
int num6 = num4 * num2;
|
|
num3 += num6;
|
|
x[0] = num3;
|
|
}
|
|
x[0] = num3;
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x06009E3A RID: 40506 RVA: 0x00214648 File Offset: 0x00212848
|
|
[Token(Token = "0x6009E3A")]
|
|
[Address(RVA = "0x18196D0", Offset = "0x18184D0", VA = "0x1818196D0")]
|
|
private int GetMQuote()
|
|
{
|
|
int num = this.mQuote;
|
|
if (num == 0)
|
|
{
|
|
int[] array = this.magnitude;
|
|
int num2 = array.Length - 1;
|
|
int num3 = array[num2];
|
|
uint num4;
|
|
num4 -= typeof(BigInteger).TypeHandle;
|
|
num4 -= typeof(BigInteger).TypeHandle;
|
|
uint num5 = num4 * (uint)num3;
|
|
num4 -= num5;
|
|
this.mQuote = (int)num4;
|
|
}
|
|
return num;
|
|
}
|
|
|
|
// Token: 0x06009E3B RID: 40507 RVA: 0x002146A8 File Offset: 0x002128A8
|
|
[Token(Token = "0x6009E3B")]
|
|
[Address(RVA = "0x181BA10", Offset = "0x181A810", VA = "0x18181BA10")]
|
|
private static void MontgomeryReduce(int[] x, int[] m, uint mDash)
|
|
{
|
|
int length = m.Length;
|
|
int num = length - 1;
|
|
int num2 = length - 1;
|
|
int num3 = x[num2];
|
|
int num4 = num3 * (int)mDash;
|
|
int num5 = m[num2] * num4;
|
|
num5 += num3;
|
|
int length2 = x.Length;
|
|
int num6;
|
|
num5 += num6;
|
|
int num8;
|
|
int num7 = num8 * num4;
|
|
num5 += num7;
|
|
x[0] = num5;
|
|
x[0] = num5;
|
|
int num9 = 0;
|
|
int num10 = BigInteger.CompareTo(0, x, num9, m);
|
|
int num11 = 0;
|
|
int[] array = BigInteger.Subtract(0, x, num11, m);
|
|
}
|
|
|
|
// Token: 0x06009E3C RID: 40508 RVA: 0x0021473C File Offset: 0x0021293C
|
|
[Token(Token = "0x6009E3C")]
|
|
[Address(RVA = "0x181BC40", Offset = "0x181AA40", VA = "0x18181BC40")]
|
|
private static void MultiplyMonty(int[] a, int[] x, int[] y, int[] m, uint mDash, bool smallMontyModulus)
|
|
{
|
|
int num = m.Length;
|
|
if (num != 1)
|
|
{
|
|
int num2 = num - 1;
|
|
int num3 = y[num2];
|
|
int num5;
|
|
int num4 = num3 * num5;
|
|
int num7;
|
|
int num6 = num7 * num4;
|
|
num6 += num4;
|
|
num6 += num6;
|
|
int num8 = m[num4];
|
|
int num9 = y[num4];
|
|
int num10 = num8 * num4;
|
|
num = num10;
|
|
num += num6;
|
|
num += num2;
|
|
num6 += num10;
|
|
a[0] = num;
|
|
num6 += num;
|
|
a[0] = num6;
|
|
int num11 = a[num];
|
|
int num13;
|
|
int num12 = num3 * num13;
|
|
num11 += num12;
|
|
int num14 = num - 1;
|
|
num = num11;
|
|
int num15 = m[num14] * num;
|
|
num14 = num15;
|
|
num14 += num11;
|
|
num14 += num15;
|
|
num14 += num12;
|
|
int length = a.Length;
|
|
int num16 = a[num15];
|
|
int num18;
|
|
int num17 = num18 * num13;
|
|
num15 = num17;
|
|
num16 += num15;
|
|
num += num14;
|
|
num += num16;
|
|
a[0] = num;
|
|
num14 += num;
|
|
num14 += num17;
|
|
num15 = num6;
|
|
num14 += num15;
|
|
a[0] = num14;
|
|
num6 = num14;
|
|
a[0] = num6;
|
|
int num19 = 0;
|
|
int num20 = BigInteger.CompareTo(0, a, num19, m);
|
|
int num21 = 0;
|
|
int[] array = BigInteger.Subtract(0, a, num21, m);
|
|
int num22 = 0;
|
|
Array.Copy(a, 1, x, num22, num);
|
|
return;
|
|
}
|
|
int length2 = x.Length;
|
|
int num23 = x[0];
|
|
int num24 = y[0];
|
|
int num25 = m[0];
|
|
int length3 = x.Length;
|
|
int num26 = num24 * num23;
|
|
int num27 = num26 * num25;
|
|
num26 += num27;
|
|
num26 += num27;
|
|
num27 = num26;
|
|
num27 -= num25;
|
|
if (num26 <= num25)
|
|
{
|
|
num27 = num26;
|
|
}
|
|
x[0] = num27;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009E3D RID: 40509 RVA: 0x00214904 File Offset: 0x00212B04
|
|
[Token(Token = "0x6009E3D")]
|
|
[Address(RVA = "0x181E9D0", Offset = "0x181D7D0", VA = "0x18181E9D0")]
|
|
private static void SquareMonty(int[] a, int[] x, int[] m, uint mDash, bool smallMontyModulus)
|
|
{
|
|
int num = m.Length;
|
|
if (num != 1)
|
|
{
|
|
int num2 = num - 1;
|
|
int num3 = x[num2];
|
|
int num4 = num3 * num3;
|
|
int num5 = num4 * (int)mDash;
|
|
int num6 = m[num2] * num5;
|
|
num6 += num4;
|
|
num6 += num6;
|
|
int num7 = x[(int)mDash] * num3;
|
|
int num8 = m[(int)mDash] * num5;
|
|
num8 += num6;
|
|
num8 += num2;
|
|
num6 = num7;
|
|
num6 += num8;
|
|
a[0] = num8;
|
|
num6 += num8;
|
|
num8 = num;
|
|
a[0] = num6;
|
|
int num9 = a[num8];
|
|
int num10 = num8 - 1;
|
|
num = num9;
|
|
int num11 = num * (int)mDash;
|
|
int num12 = m[num10] * num11;
|
|
num12 += num9;
|
|
int num13;
|
|
if (num7 > num7)
|
|
{
|
|
int length = a.Length;
|
|
num10 = num7;
|
|
num13 = num10 + 1;
|
|
int num14 = m[num10];
|
|
int num15 = a[num13];
|
|
num12 += num15;
|
|
int num16 = num14 * num11;
|
|
num12 += num16;
|
|
a[0] = num12;
|
|
}
|
|
num13 = num7;
|
|
int num17 = x[num13];
|
|
num7 = num17;
|
|
int num18 = num7 * num17;
|
|
int length2 = a.Length;
|
|
int num19 = num13 + 1;
|
|
int num20 = a[num19];
|
|
int num21 = m[num13];
|
|
num13 += 2;
|
|
int num22 = num21 * num11;
|
|
num19 = num18;
|
|
num20 += num19;
|
|
num19 = num22;
|
|
num12 += num19;
|
|
num12 += num20;
|
|
int num23 = num7 - 1;
|
|
a[0] = num12;
|
|
num22 += num18;
|
|
num13 = num23;
|
|
num22 += num12;
|
|
num7 = num13;
|
|
int num24 = x[num7] * num17;
|
|
int length3 = a.Length;
|
|
int num25 = num7 + 1;
|
|
int num26 = m[num7];
|
|
int num27 = a[num25];
|
|
num7 += 2;
|
|
num27 += num23;
|
|
num23 += num22;
|
|
num23 += num27;
|
|
num22 += num24;
|
|
a[0] = num23;
|
|
num22 += num23;
|
|
num25 = num6;
|
|
num22 += num25;
|
|
a[0] = num22;
|
|
num6 = num22;
|
|
a[0] = num6;
|
|
int num28 = 0;
|
|
int num29 = BigInteger.CompareTo(0, a, num28, m);
|
|
int num30 = 0;
|
|
int[] array = BigInteger.Subtract(0, a, num30, m);
|
|
int num31 = 0;
|
|
Array.Copy(a, 1, x, num31, num);
|
|
return;
|
|
}
|
|
int length4 = x.Length;
|
|
int num32 = x[0];
|
|
int num33 = m[0];
|
|
int length5 = x.Length;
|
|
int num34 = num32 * num32;
|
|
int num35 = num34 * (int)mDash * num33;
|
|
num34 += num35;
|
|
num34 += num35;
|
|
num35 = num34;
|
|
num35 -= num33;
|
|
if (num34 <= num33)
|
|
{
|
|
num35 = num34;
|
|
}
|
|
x[0] = num35;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009E3E RID: 40510 RVA: 0x00214BB4 File Offset: 0x00212DB4
|
|
[Token(Token = "0x6009E3E")]
|
|
[Address(RVA = "0x181BC00", Offset = "0x181AA00", VA = "0x18181BC00")]
|
|
private static uint MultiplyMontyNIsOne(uint x, uint y, uint m, uint mDash)
|
|
{
|
|
uint num = x * y;
|
|
uint num2 = x * mDash * m;
|
|
return y;
|
|
}
|
|
|
|
// Token: 0x06009E3F RID: 40511 RVA: 0x00214BCC File Offset: 0x00212DCC
|
|
[Token(Token = "0x6009E3F")]
|
|
[Address(RVA = "0x181C340", Offset = "0x181B140", VA = "0x18181C340")]
|
|
public BigInteger Multiply(BigInteger val)
|
|
{
|
|
if (val != this)
|
|
{
|
|
int num = val.sign;
|
|
int num2 = this.sign;
|
|
if (num2 != num)
|
|
{
|
|
if (num > 0 && val.nBits == 1)
|
|
{
|
|
int num3 = val.Abs().BitLength - 1;
|
|
BigInteger bigInteger = this.ShiftLeft(num3);
|
|
}
|
|
if (num2 > 0 && this.nBits == 1)
|
|
{
|
|
int num4 = this.Abs().BitLength - 1;
|
|
return val.ShiftLeft(num4).Negate();
|
|
}
|
|
int[] array = this.magnitude;
|
|
int[] array2 = new int[val.magnitude.Length];
|
|
int[] array3 = this.magnitude;
|
|
int[] array4 = val.magnitude;
|
|
int num5 = array4.Length;
|
|
int length = array2.Length;
|
|
int num6 = num5 - 1;
|
|
num5 = num6;
|
|
int num7 = array4[num5];
|
|
int num8 = 0;
|
|
int length2;
|
|
int num10;
|
|
if (num7 != 0)
|
|
{
|
|
length2 = array3.Length;
|
|
num6 = length2;
|
|
int num9 = array3[num6];
|
|
num8 += num10;
|
|
int num11 = num9 * num7;
|
|
num8 += num11;
|
|
array2[0] = num8;
|
|
}
|
|
num10 = length;
|
|
array2[0] = num8;
|
|
ulong num12;
|
|
BigInteger bigInteger2 = new BigInteger(length2, array2, num12 != 0UL);
|
|
}
|
|
}
|
|
return this.Square();
|
|
}
|
|
|
|
// Token: 0x06009E40 RID: 40512 RVA: 0x00214CFC File Offset: 0x00212EFC
|
|
[Token(Token = "0x6009E40")]
|
|
[Address(RVA = "0x181F210", Offset = "0x181E010", VA = "0x18181F210")]
|
|
public BigInteger Square()
|
|
{
|
|
int num = this.sign;
|
|
if (num == 0)
|
|
{
|
|
return BigInteger.Zero;
|
|
}
|
|
if (num > 0 && this.nBits == 1)
|
|
{
|
|
int num2 = this.Abs().BitLength - 1;
|
|
return this.ShiftLeft(num2);
|
|
}
|
|
int length = this.magnitude.Length;
|
|
int[] array = this.magnitude;
|
|
int[] array3;
|
|
int[] array2 = BigInteger.Square(array3, array);
|
|
BigInteger bigInteger;
|
|
bigInteger.nBits = (int)((ulong)(-1L));
|
|
bigInteger.sign = (int)((ulong)1L);
|
|
bigInteger.magnitude = array3;
|
|
return bigInteger;
|
|
}
|
|
|
|
// Token: 0x06009E41 RID: 40513 RVA: 0x00214D80 File Offset: 0x00212F80
|
|
[Token(Token = "0x6009E41")]
|
|
[Address(RVA = "0x181C640", Offset = "0x181B440", VA = "0x18181C640")]
|
|
public BigInteger Negate()
|
|
{
|
|
int num = this.sign;
|
|
if (num != 0)
|
|
{
|
|
int[] array = this.magnitude;
|
|
BigInteger bigInteger;
|
|
bigInteger.nBits = (int)((ulong)(-1L));
|
|
bigInteger.magnitude = array;
|
|
bigInteger.sign = num;
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// Token: 0x06009E42 RID: 40514 RVA: 0x00214DB8 File Offset: 0x00212FB8
|
|
[Token(Token = "0x6009E42")]
|
|
[Address(RVA = "0x181C6D0", Offset = "0x181B4D0", VA = "0x18181C6D0")]
|
|
public BigInteger NextProbablePrime()
|
|
{
|
|
BigInteger bigInteger;
|
|
SecureRandom randomSource;
|
|
int num5;
|
|
do
|
|
{
|
|
BigInteger two = BigInteger.Two;
|
|
int num = this.CompareTo(two);
|
|
bigInteger = this.Inc();
|
|
int num2 = 0;
|
|
if (!bigInteger.TestBit(num2))
|
|
{
|
|
if (bigInteger.sign > 0 && bigInteger.BitLength > 0)
|
|
{
|
|
int num3 = 0;
|
|
BigInteger bigInteger2 = bigInteger.FlipExistingBit(num3);
|
|
}
|
|
BigInteger one = BigInteger.One;
|
|
int num4 = 0;
|
|
BigInteger bigInteger3 = one.ShiftLeft(num4);
|
|
BigInteger bigInteger4 = bigInteger.Or(bigInteger3);
|
|
}
|
|
randomSource = BigInteger.RandomSource;
|
|
num5 = 0;
|
|
}
|
|
while (bigInteger.CheckProbablePrime(100, randomSource, num5 != 0));
|
|
BigInteger two2 = BigInteger.Two;
|
|
return bigInteger.Add(two2);
|
|
}
|
|
|
|
// Token: 0x06009E43 RID: 40515 RVA: 0x00214E64 File Offset: 0x00213064
|
|
[Token(Token = "0x6009E43")]
|
|
[Address(RVA = "0x181C930", Offset = "0x181B730", VA = "0x18181C930")]
|
|
public BigInteger Not()
|
|
{
|
|
return this.Inc().Negate();
|
|
}
|
|
|
|
// Token: 0x06009E44 RID: 40516 RVA: 0x00214E84 File Offset: 0x00213084
|
|
[Token(Token = "0x6009E44")]
|
|
[Address(RVA = "0x181CCF0", Offset = "0x181BAF0", VA = "0x18181CCF0")]
|
|
public BigInteger Pow(int exp)
|
|
{
|
|
if (exp <= 0)
|
|
{
|
|
return BigInteger.One;
|
|
}
|
|
int num = this.sign;
|
|
if (num == 0)
|
|
{
|
|
return this;
|
|
}
|
|
if (num > 0 && this.nBits == 1)
|
|
{
|
|
int num2 = this.BitLength * exp;
|
|
return BigInteger.One.ShiftLeft(num2);
|
|
}
|
|
BigInteger one = BigInteger.One;
|
|
BigInteger bigInteger;
|
|
if (exp != 1)
|
|
{
|
|
bigInteger = one.Multiply(this);
|
|
}
|
|
if (one != 0)
|
|
{
|
|
BigInteger bigInteger2 = this.Multiply(this);
|
|
}
|
|
return bigInteger;
|
|
}
|
|
|
|
// Token: 0x06009E45 RID: 40517 RVA: 0x00214EF8 File Offset: 0x002130F8
|
|
[Token(Token = "0x6009E45")]
|
|
[Address(RVA = "0x181CEF0", Offset = "0x181BCF0", VA = "0x18181CEF0")]
|
|
public static BigInteger ProbablePrime(int bitLength, Random random)
|
|
{
|
|
return new BigInteger(bitLength, 100, random);
|
|
}
|
|
|
|
// Token: 0x06009E46 RID: 40518 RVA: 0x00214F10 File Offset: 0x00213110
|
|
[Token(Token = "0x6009E46")]
|
|
[Address(RVA = "0x181D5D0", Offset = "0x181C3D0", VA = "0x18181D5D0")]
|
|
private int Remainder(int m)
|
|
{
|
|
int[] array = this.magnitude;
|
|
int num = 0;
|
|
int length = array.Length;
|
|
if (num < length)
|
|
{
|
|
num++;
|
|
}
|
|
return num;
|
|
}
|
|
|
|
// Token: 0x06009E47 RID: 40519 RVA: 0x00214F3C File Offset: 0x0021313C
|
|
[Token(Token = "0x6009E47")]
|
|
[Address(RVA = "0x181D8F0", Offset = "0x181C6F0", VA = "0x18181D8F0")]
|
|
private static int[] Remainder(int[] x, int[] y)
|
|
{
|
|
int num = 0;
|
|
int num2 = 0;
|
|
int length = x.Length;
|
|
if (num2 < length && "{il2cpp array field x->}" == (ulong)0L)
|
|
{
|
|
num++;
|
|
}
|
|
int num3 = 0;
|
|
int num4 = 0;
|
|
int length2 = y.Length;
|
|
if (num4 < length2 && "{il2cpp array field y->}" == (ulong)0L)
|
|
{
|
|
num3++;
|
|
}
|
|
if (BigInteger.CompareNoLeadingZeroes(num, x, num3, y) > 0)
|
|
{
|
|
int num5 = y.Length;
|
|
if (num3 < num5)
|
|
{
|
|
if (y[num3] == 0)
|
|
{
|
|
num3++;
|
|
}
|
|
num5 -= num3;
|
|
}
|
|
int num6 = 0;
|
|
ulong num7;
|
|
if (num7 == (ulong)0L)
|
|
{
|
|
}
|
|
int num8 = x.Length;
|
|
if (num < num8)
|
|
{
|
|
int num9 = x[num];
|
|
if (num9 == 0)
|
|
{
|
|
num++;
|
|
}
|
|
num8 -= num;
|
|
int num10 = BigInteger.BitLen(num9);
|
|
}
|
|
int num11 = 0;
|
|
int num12 = 0;
|
|
num11 -= num6;
|
|
num11 -= num3;
|
|
int[] array = new int[num11];
|
|
int num13 = x.Length;
|
|
int[] array2;
|
|
int length3 = array2.Length;
|
|
num13 -= length3;
|
|
num13 -= num;
|
|
num13 += num12;
|
|
if (array2 == 0 && num < num13)
|
|
{
|
|
num++;
|
|
num12++;
|
|
int num14 = array2[num12];
|
|
while ("{il2cpp array field x->}" == num14)
|
|
{
|
|
}
|
|
if ("{il2cpp array field x->}" < num14)
|
|
{
|
|
}
|
|
}
|
|
int[] array3 = BigInteger.Subtract(num, x, num12, array2);
|
|
int length4 = x.Length;
|
|
int num15 = x[num];
|
|
if (num15 == 0)
|
|
{
|
|
while (1 != length4)
|
|
{
|
|
}
|
|
}
|
|
int num16 = BigInteger.BitLen(num15);
|
|
int num17 = x.Length;
|
|
num17--;
|
|
num17 += num16;
|
|
int num18 = x.Length;
|
|
num18 -= num15;
|
|
num18--;
|
|
num18 += num3;
|
|
if (1 >= num18)
|
|
{
|
|
uint num19;
|
|
while (num19 == (uint)0)
|
|
{
|
|
}
|
|
int num20;
|
|
if (num20 > "{il2cpp array field x->}")
|
|
{
|
|
}
|
|
while ("{il2cpp array field local25->}" != (ulong)0L)
|
|
{
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
num3++;
|
|
}
|
|
uint num21;
|
|
if (num21 == (uint)0)
|
|
{
|
|
int num22 = x.Length;
|
|
num22--;
|
|
Array.Clear(x, 1, num22);
|
|
}
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x06009E48 RID: 40520 RVA: 0x00215118 File Offset: 0x00213318
|
|
[Token(Token = "0x6009E48")]
|
|
[Address(RVA = "0x181D640", Offset = "0x181C440", VA = "0x18181D640")]
|
|
public BigInteger Remainder(BigInteger n)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009E48)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger::Remainder(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_E1:
|
|
stloc:ArithmeticException(var_16_EB, newobj:ArithmeticException(ArithmeticException::.ctor, ldstr:string("Division by zero error")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009E49 RID: 40521 RVA: 0x00215214 File Offset: 0x00213414
|
|
[Token(Token = "0x6009E49")]
|
|
[Address(RVA = "0x1819F10", Offset = "0x1818D10", VA = "0x181819F10")]
|
|
private int[] LastNBits(int n)
|
|
{
|
|
int num = this.magnitude.Length;
|
|
int num2;
|
|
num = num2;
|
|
int[] array = new int[num];
|
|
int[] array2 = this.magnitude;
|
|
int num3 = array2.Length;
|
|
int num4 = 0;
|
|
num3 -= num2;
|
|
Array.Copy(array2, num3, array, num4, num2);
|
|
num2 -= n;
|
|
if (num2 > 0)
|
|
{
|
|
}
|
|
return array;
|
|
}
|
|
|
|
// Token: 0x06009E4A RID: 40522 RVA: 0x00215270 File Offset: 0x00213470
|
|
[Token(Token = "0x6009E4A")]
|
|
[Address(RVA = "0x1818450", Offset = "0x1817250", VA = "0x181818450")]
|
|
private BigInteger DivideWords(int w)
|
|
{
|
|
int num = this.magnitude.Length;
|
|
if (w < num)
|
|
{
|
|
num -= w;
|
|
int[] array = new int[w];
|
|
int[] array2 = this.magnitude;
|
|
int num2 = 0;
|
|
int num3 = 0;
|
|
Array.Copy(array2, num3, array, num2, num);
|
|
int num4 = this.sign;
|
|
BigInteger bigInteger;
|
|
bigInteger.nBits = (int)((ulong)(-1L));
|
|
bigInteger.sign = num4;
|
|
bigInteger.magnitude = array;
|
|
return bigInteger;
|
|
}
|
|
return BigInteger.Zero;
|
|
}
|
|
|
|
// Token: 0x06009E4B RID: 40523 RVA: 0x002152E0 File Offset: 0x002134E0
|
|
[Token(Token = "0x6009E4B")]
|
|
[Address(RVA = "0x181D4D0", Offset = "0x181C2D0", VA = "0x18181D4D0")]
|
|
private BigInteger RemainderWords(int w)
|
|
{
|
|
int num = this.magnitude.Length;
|
|
if (w < num)
|
|
{
|
|
int[] array = new int[w];
|
|
int[] array2 = this.magnitude;
|
|
num -= w;
|
|
int num2 = 0;
|
|
Array.Copy(array2, w, array, num2, w);
|
|
int num3 = this.sign;
|
|
BigInteger bigInteger;
|
|
bigInteger.nBits = (int)((ulong)(-1L));
|
|
bigInteger.sign = num3;
|
|
bigInteger.magnitude = array;
|
|
return bigInteger;
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// Token: 0x06009E4C RID: 40524 RVA: 0x0021534C File Offset: 0x0021354C
|
|
[Token(Token = "0x6009E4C")]
|
|
[Address(RVA = "0x181E0F0", Offset = "0x181CEF0", VA = "0x18181E0F0")]
|
|
private static int[] ShiftLeft(int[] mag, int n)
|
|
{
|
|
int length = mag.Length;
|
|
if (n != 0)
|
|
{
|
|
int num = 0;
|
|
int num2 = mag[0];
|
|
if (num2 == 0)
|
|
{
|
|
int[] array = new int[n];
|
|
}
|
|
int[] array2 = new int[n];
|
|
array2[0] = num2;
|
|
int length2 = mag.Length;
|
|
if (length - 1 > 0)
|
|
{
|
|
num++;
|
|
num++;
|
|
array2[0] = n;
|
|
int length3 = mag.Length;
|
|
}
|
|
int num3 = length - 1;
|
|
int num4 = mag[num3];
|
|
array2[0] = num4;
|
|
}
|
|
return new int[n];
|
|
}
|
|
|
|
// Token: 0x06009E4D RID: 40525 RVA: 0x002153E0 File Offset: 0x002135E0
|
|
[Token(Token = "0x6009E4D")]
|
|
[Address(RVA = "0x181E090", Offset = "0x181CE90", VA = "0x18181E090")]
|
|
private static int ShiftLeftOneInPlace(int[] x, int carry)
|
|
{
|
|
int length = x.Length;
|
|
x[0] = x;
|
|
return carry;
|
|
}
|
|
|
|
// Token: 0x06009E4E RID: 40526 RVA: 0x00215408 File Offset: 0x00213608
|
|
[Token(Token = "0x6009E4E")]
|
|
[Address(RVA = "0x181E310", Offset = "0x181D110", VA = "0x18181E310")]
|
|
public BigInteger ShiftLeft(int n)
|
|
{
|
|
if (this.sign != 0)
|
|
{
|
|
int[] array = this.magnitude;
|
|
if (array.Length != 0 && n != 0)
|
|
{
|
|
int[] array2 = BigInteger.ShiftLeft(array, n);
|
|
ulong num;
|
|
BigInteger bigInteger = new BigInteger(n, array2, num != 0UL);
|
|
if (this.nBits != -1)
|
|
{
|
|
bigInteger.nBits = bigInteger;
|
|
}
|
|
int num2 = this.nBitLength;
|
|
if (num2 != -1)
|
|
{
|
|
num2 += n;
|
|
bigInteger.nBitLength = num2;
|
|
}
|
|
BigInteger bigInteger2 = this.ShiftRight(n);
|
|
}
|
|
}
|
|
return BigInteger.Zero;
|
|
}
|
|
|
|
// Token: 0x06009E4F RID: 40527 RVA: 0x00215484 File Offset: 0x00213684
|
|
[Token(Token = "0x6009E4F")]
|
|
[Address(RVA = "0x181E480", Offset = "0x181D280", VA = "0x18181E480")]
|
|
private static void ShiftRightInPlace(int start, int[] mag, int n)
|
|
{
|
|
int i = mag.Length;
|
|
if (n != start)
|
|
{
|
|
int length = mag.Length;
|
|
int num = mag[start];
|
|
mag[0] = num;
|
|
while (i >= n)
|
|
{
|
|
}
|
|
int j = n - 1;
|
|
int num2 = 0;
|
|
mag[0] = num2;
|
|
while (j >= start)
|
|
{
|
|
}
|
|
}
|
|
if (n != 0)
|
|
{
|
|
int length2 = mag.Length;
|
|
int num = i;
|
|
int num3 = mag[num];
|
|
if (i > n)
|
|
{
|
|
int length3 = mag.Length;
|
|
int num4 = start - 1;
|
|
mag[0] = num3;
|
|
}
|
|
int num5 = mag[n];
|
|
mag[0] = num5;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009E50 RID: 40528 RVA: 0x00215524 File Offset: 0x00213724
|
|
[Token(Token = "0x6009E50")]
|
|
[Address(RVA = "0x181E630", Offset = "0x181D430", VA = "0x18181E630")]
|
|
private static void ShiftRightOneInPlace(int start, int[] mag)
|
|
{
|
|
int num = mag.Length;
|
|
int num2 = num - 1;
|
|
int num3 = mag[num2];
|
|
if (num2 > start)
|
|
{
|
|
int length = mag.Length;
|
|
num = num2;
|
|
int num4 = num - 1;
|
|
mag[0] = num3;
|
|
}
|
|
int num5 = mag[start];
|
|
mag[0] = num5;
|
|
}
|
|
|
|
// Token: 0x06009E51 RID: 40529 RVA: 0x00215578 File Offset: 0x00213778
|
|
[Token(Token = "0x6009E51")]
|
|
[Address(RVA = "0x181E700", Offset = "0x181D500", VA = "0x18181E700")]
|
|
public BigInteger ShiftRight(int n)
|
|
{
|
|
while (n != 0)
|
|
{
|
|
int bitLength = this.BitLength;
|
|
if (n < bitLength)
|
|
{
|
|
int bitLength2 = this.BitLength;
|
|
uint num;
|
|
num -= (uint)n;
|
|
num += (uint)bitLength2;
|
|
int[] array = new int[31];
|
|
if (n != bitLength)
|
|
{
|
|
int num2 = this.magnitude.Length;
|
|
uint num3 = num - 1U;
|
|
num2 -= n;
|
|
int num4 = this.magnitude[num2];
|
|
array[0] = num4;
|
|
int[] array2 = this.magnitude;
|
|
int num5 = array2[n];
|
|
array[0] = num5;
|
|
}
|
|
int length = array.Length;
|
|
int num6 = 0;
|
|
int[] array3 = this.magnitude;
|
|
int num7 = 0;
|
|
Array.Copy(array3, num7, array, num6, length);
|
|
int num8 = this.sign;
|
|
BigInteger bigInteger;
|
|
bigInteger.nBits = (int)((ulong)(-1L));
|
|
bigInteger.sign = num8;
|
|
bigInteger.magnitude = array;
|
|
return bigInteger;
|
|
}
|
|
if (this.sign < 0)
|
|
{
|
|
return BigInteger.One.Negate().ShiftLeft(n);
|
|
}
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// Token: 0x1700192A RID: 6442
|
|
// (get) Token: 0x06009E52 RID: 40530 RVA: 0x00215678 File Offset: 0x00213878
|
|
[Token(Token = "0x1700192A")]
|
|
public int SignValue
|
|
{
|
|
[Token(Token = "0x6009E52")]
|
|
[Address(RVA = "0x40B720", Offset = "0x40A520", VA = "0x18040B720")]
|
|
get
|
|
{
|
|
return this.sign;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009E53 RID: 40531 RVA: 0x0021568C File Offset: 0x0021388C
|
|
[Token(Token = "0x6009E53")]
|
|
[Address(RVA = "0x181F390", Offset = "0x181E190", VA = "0x18181F390")]
|
|
private static int[] Subtract(int xStart, int[] x, int yStart, int[] y)
|
|
{
|
|
int length = x.Length;
|
|
int num = y.Length;
|
|
num--;
|
|
int num2 = y[num];
|
|
if (yStart != 0)
|
|
{
|
|
while (length == -1)
|
|
{
|
|
}
|
|
}
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x06009E54 RID: 40532 RVA: 0x002156C8 File Offset: 0x002138C8
|
|
[Token(Token = "0x6009E54")]
|
|
[Address(RVA = "0x181F490", Offset = "0x181E290", VA = "0x18181F490")]
|
|
public BigInteger Subtract(BigInteger n)
|
|
{
|
|
int num = n.sign;
|
|
if (num != 0)
|
|
{
|
|
int num2 = this.sign;
|
|
if (num2 != 0)
|
|
{
|
|
if (num2 == num)
|
|
{
|
|
int[] array = this.magnitude;
|
|
int[] array2 = n.magnitude;
|
|
int num3 = 0;
|
|
int num4 = BigInteger.CompareNoLeadingZeroes(0, array, num3, array2);
|
|
if (num4 != 0)
|
|
{
|
|
int num5 = this.sign;
|
|
int[] array3 = n.magnitude;
|
|
int[] array4 = this.magnitude;
|
|
int[] array5 = BigInteger.doSubBigLil(array3, array4);
|
|
int num6;
|
|
BigInteger bigInteger = new BigInteger(num6, array5, true);
|
|
num6 = num5 * num4;
|
|
return this;
|
|
}
|
|
}
|
|
BigInteger bigInteger3;
|
|
BigInteger bigInteger2 = this.Add(bigInteger3);
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// Token: 0x06009E55 RID: 40533 RVA: 0x00215758 File Offset: 0x00213958
|
|
[Token(Token = "0x6009E55")]
|
|
[Address(RVA = "0x1824110", Offset = "0x1822F10", VA = "0x181824110")]
|
|
private static int[] doSubBigLil(int[] bigMag, int[] lilMag)
|
|
{
|
|
int[] array;
|
|
return array;
|
|
}
|
|
|
|
// Token: 0x06009E56 RID: 40534 RVA: 0x00215770 File Offset: 0x00213970
|
|
[Token(Token = "0x6009E56")]
|
|
[Address(RVA = "0x181F780", Offset = "0x181E580", VA = "0x18181F780")]
|
|
public byte[] ToByteArray()
|
|
{
|
|
int num = 0;
|
|
return this.ToByteArray(num != 0);
|
|
}
|
|
|
|
// Token: 0x06009E57 RID: 40535 RVA: 0x00215788 File Offset: 0x00213988
|
|
[Token(Token = "0x6009E57")]
|
|
[Address(RVA = "0x181F770", Offset = "0x181E570", VA = "0x18181F770")]
|
|
public byte[] ToByteArrayUnsigned()
|
|
{
|
|
return this.ToByteArray(true);
|
|
}
|
|
|
|
// Token: 0x06009E58 RID: 40536 RVA: 0x0021579C File Offset: 0x0021399C
|
|
[Token(Token = "0x6009E58")]
|
|
[Address(RVA = "0x181F790", Offset = "0x181E590", VA = "0x18181F790")]
|
|
private byte[] ToByteArray(bool unsigned)
|
|
{
|
|
byte[] array2;
|
|
int num5;
|
|
int num6;
|
|
do
|
|
{
|
|
int num = this.sign;
|
|
if (num == 0)
|
|
{
|
|
goto IL_196;
|
|
}
|
|
if (unsigned && num > 0)
|
|
{
|
|
int bitLength = this.BitLength;
|
|
}
|
|
if (this.nBitLength == -1)
|
|
{
|
|
int num2 = this.sign;
|
|
if (num2 == 0)
|
|
{
|
|
}
|
|
int[] array = this.magnitude;
|
|
int num3 = 0;
|
|
int num4 = BigInteger.CalcBitLength(num2, num3, array);
|
|
this.nBitLength = num4;
|
|
}
|
|
array2 = new byte[unsigned ? 1 : 0];
|
|
num5 = this.magnitude.Length;
|
|
num6 = array2.Length;
|
|
}
|
|
while (num5 <= 1);
|
|
int num7 = this.magnitude[num5];
|
|
ulong num8;
|
|
int num9;
|
|
bool flag;
|
|
if (num8 != (ulong)0L)
|
|
{
|
|
num9 = num7 + 1;
|
|
num7 = num9;
|
|
flag = num9 == 0;
|
|
}
|
|
num9 = num6;
|
|
int num10 = num9 - 1;
|
|
array2[0] = (byte)num7;
|
|
num9 = num7;
|
|
array2[0] = (byte)num9;
|
|
num10 = num6;
|
|
num10 += -3;
|
|
num9 = num7;
|
|
num6 += -4;
|
|
array2[0] = (byte)num9;
|
|
int i = this.magnitude[0];
|
|
if (flag)
|
|
{
|
|
}
|
|
if (i > 255)
|
|
{
|
|
num6--;
|
|
while (i > 255)
|
|
{
|
|
}
|
|
}
|
|
num5 = num6;
|
|
int num11 = num5 - 1;
|
|
if (num6 - 1 > 0)
|
|
{
|
|
return array2;
|
|
}
|
|
return array2;
|
|
IL_196:
|
|
if (unsigned)
|
|
{
|
|
return BigInteger.ZeroEncoding;
|
|
}
|
|
throw new IndexOutOfRangeException();
|
|
}
|
|
|
|
// Token: 0x06009E59 RID: 40537 RVA: 0x00215950 File Offset: 0x00213B50
|
|
[Token(Token = "0x6009E59")]
|
|
[Address(RVA = "0x181FC80", Offset = "0x181EA80", VA = "0x18181FC80", Slot = "3")]
|
|
public override string ToString()
|
|
{
|
|
return this.ToString(10);
|
|
}
|
|
|
|
// Token: 0x06009E5A RID: 40538 RVA: 0x00215968 File Offset: 0x00213B68
|
|
[Token(Token = "0x6009E5A")]
|
|
[Address(RVA = "0x181FC90", Offset = "0x181EA90", VA = "0x18181FC90")]
|
|
public string ToString(int radix)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009E5A)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.String BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger::ToString(System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_14F:
|
|
stloc:FormatException(var_34_159, newobj:FormatException(FormatException::.ctor, ldstr:string("Only bases 2, 8, 10, 16 are allowed")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009E5B RID: 40539 RVA: 0x00215AD0 File Offset: 0x00213CD0
|
|
[Token(Token = "0x6009E5B")]
|
|
[Address(RVA = "0x1820420", Offset = "0x181F220", VA = "0x181820420")]
|
|
private static void ToString(StringBuilder sb, int radix, IList moduli, int scale, BigInteger pos)
|
|
{
|
|
int num;
|
|
int num2;
|
|
do
|
|
{
|
|
num = 0;
|
|
num2 = scale - 1;
|
|
if (radix == 0)
|
|
{
|
|
}
|
|
}
|
|
while (radix == 0);
|
|
BigInteger[] array;
|
|
BigInteger bigInteger = array[0];
|
|
BigInteger.ToString(sb, radix, moduli, num2, bigInteger);
|
|
BigInteger bigInteger2 = array[1];
|
|
string text = Convert.ToString(bigInteger2.LongValue, radix);
|
|
int length = sb.Length;
|
|
if (sb.Length == 1)
|
|
{
|
|
int num3 = 0;
|
|
char c = sb[num3];
|
|
}
|
|
if (bigInteger2.sign != num)
|
|
{
|
|
StringBuilder stringBuilder = sb.Append(text);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009E5C RID: 40540 RVA: 0x00215B58 File Offset: 0x00213D58
|
|
[Token(Token = "0x6009E5C")]
|
|
[Address(RVA = "0x1817220", Offset = "0x1816020", VA = "0x181817220")]
|
|
private static void AppendZeroExtendedString(StringBuilder sb, string s, int minLength)
|
|
{
|
|
int num = s.m_stringLength;
|
|
if (num < minLength)
|
|
{
|
|
num++;
|
|
}
|
|
StringBuilder stringBuilder = sb.Append(s);
|
|
}
|
|
|
|
// Token: 0x06009E5D RID: 40541 RVA: 0x00215B84 File Offset: 0x00213D84
|
|
[Token(Token = "0x6009E5D")]
|
|
[Address(RVA = "0x1817D00", Offset = "0x1816B00", VA = "0x181817D00")]
|
|
private static BigInteger CreateUValueOf(ulong value)
|
|
{
|
|
if (value != (ulong)0L)
|
|
{
|
|
int[] array = new int[2];
|
|
array[0] = (int)value;
|
|
array[0] = (int)value;
|
|
BigInteger bigInteger;
|
|
bigInteger.nBits = (int)((ulong)(-1L));
|
|
bigInteger.sign = (int)((ulong)1L);
|
|
bigInteger.magnitude = array;
|
|
return bigInteger;
|
|
}
|
|
if (value == (ulong)0L)
|
|
{
|
|
return BigInteger.Zero;
|
|
}
|
|
int[] array2 = new int[] { (int)value };
|
|
BigInteger bigInteger2;
|
|
bigInteger2.nBits = (int)((ulong)(-1L));
|
|
bigInteger2.sign = (int)((ulong)1L);
|
|
bigInteger2.magnitude = array2;
|
|
if (value == 0UL)
|
|
{
|
|
bigInteger2.nBits = (int)((ulong)1L);
|
|
}
|
|
return bigInteger2;
|
|
}
|
|
|
|
// Token: 0x06009E5E RID: 40542 RVA: 0x00215C10 File Offset: 0x00213E10
|
|
[Token(Token = "0x6009E5E")]
|
|
[Address(RVA = "0x1817EE0", Offset = "0x1816CE0", VA = "0x181817EE0")]
|
|
private static BigInteger CreateValueOf(long value)
|
|
{
|
|
return BigInteger.CreateUValueOf((ulong)value);
|
|
}
|
|
|
|
// Token: 0x06009E5F RID: 40543 RVA: 0x00215C3C File Offset: 0x00213E3C
|
|
[Token(Token = "0x6009E5F")]
|
|
[Address(RVA = "0x1820690", Offset = "0x181F490", VA = "0x181820690")]
|
|
public static BigInteger ValueOf(long value)
|
|
{
|
|
int length = BigInteger.SMALL_CONSTANTS.Length;
|
|
if (value < (long)length)
|
|
{
|
|
return BigInteger.SMALL_CONSTANTS[(int)value];
|
|
}
|
|
return BigInteger.CreateValueOf(value);
|
|
}
|
|
|
|
// Token: 0x06009E60 RID: 40544 RVA: 0x00215C70 File Offset: 0x00213E70
|
|
[Token(Token = "0x6009E60")]
|
|
[Address(RVA = "0x18196B0", Offset = "0x18184B0", VA = "0x1818196B0")]
|
|
public int GetLowestSetBit()
|
|
{
|
|
if (this.sign != 0)
|
|
{
|
|
return this.GetLowestSetBitMaskFirst(-1);
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
// Token: 0x06009E61 RID: 40545 RVA: 0x00215C90 File Offset: 0x00213E90
|
|
[Token(Token = "0x6009E61")]
|
|
[Address(RVA = "0x1819610", Offset = "0x1818410", VA = "0x181819610")]
|
|
private int GetLowestSetBitMaskFirst(int firstWordMask)
|
|
{
|
|
int[] array;
|
|
int num2;
|
|
int num4;
|
|
do
|
|
{
|
|
array = this.magnitude;
|
|
int num = array.Length;
|
|
num2 = 0;
|
|
int num3 = num - 1;
|
|
num = num3;
|
|
num4 = array[num];
|
|
if (num3 != num)
|
|
{
|
|
break;
|
|
}
|
|
num4 = num3;
|
|
num2 += 32;
|
|
}
|
|
while (array[num4] == 0);
|
|
if (num4 == 0)
|
|
{
|
|
num2 += 8;
|
|
while (num4 == 0)
|
|
{
|
|
}
|
|
}
|
|
if (num4 == 1)
|
|
{
|
|
num2++;
|
|
while (num4 == 1)
|
|
{
|
|
}
|
|
}
|
|
return num2;
|
|
}
|
|
|
|
// Token: 0x06009E62 RID: 40546 RVA: 0x00215CF8 File Offset: 0x00213EF8
|
|
[Token(Token = "0x6009E62")]
|
|
[Address(RVA = "0x181F640", Offset = "0x181E440", VA = "0x18181F640")]
|
|
public bool TestBit(int n)
|
|
{
|
|
int length = this.magnitude.Length;
|
|
if (n < length)
|
|
{
|
|
int num = n - 1;
|
|
}
|
|
BigInteger bigInteger;
|
|
return !bigInteger.Negate().TestBit(n);
|
|
}
|
|
|
|
// Token: 0x06009E63 RID: 40547 RVA: 0x00215D38 File Offset: 0x00213F38
|
|
[Token(Token = "0x6009E63")]
|
|
[Address(RVA = "0x181C960", Offset = "0x181B760", VA = "0x18181C960")]
|
|
public BigInteger Or(BigInteger value)
|
|
{
|
|
int num = this.sign;
|
|
if (num != 0 && value.sign != 0)
|
|
{
|
|
if (num > 0)
|
|
{
|
|
}
|
|
BigInteger one = BigInteger.One;
|
|
int[] array = this.Add(one).magnitude;
|
|
if (value.sign > 0)
|
|
{
|
|
}
|
|
BigInteger one2 = BigInteger.One;
|
|
int[] array2 = value.Add(one2).magnitude;
|
|
if (this.sign < 0)
|
|
{
|
|
}
|
|
int num2 = value.sign;
|
|
int num3 = array2.Length;
|
|
num3 = Math.Max(array.Length, num3);
|
|
int[] array3 = new int[num3];
|
|
int num4 = array3.Length;
|
|
int num5 = 0;
|
|
int num6 = 0;
|
|
num4 -= num4;
|
|
int length = array3.Length;
|
|
if (num6 < length)
|
|
{
|
|
num6 += num5;
|
|
int num7 = 0;
|
|
array3[0] = num7;
|
|
if (num2 != 0)
|
|
{
|
|
array3[0] = num7;
|
|
}
|
|
num5++;
|
|
}
|
|
uint num8;
|
|
ulong num9;
|
|
BigInteger bigInteger = new BigInteger((int)num8, array3, num9 != 0UL);
|
|
BigInteger bigInteger3;
|
|
if (num2 != 0)
|
|
{
|
|
BigInteger bigInteger2 = bigInteger.Inc();
|
|
int num10 = bigInteger2.sign;
|
|
if (num10 != 0)
|
|
{
|
|
int[] array4 = bigInteger2.magnitude;
|
|
bigInteger3.nBits = (int)((ulong)(-1L));
|
|
bigInteger3.sign = num10;
|
|
bigInteger3.magnitude = array4;
|
|
}
|
|
}
|
|
return bigInteger3;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
// Token: 0x06009E64 RID: 40548 RVA: 0x00215E6C File Offset: 0x0021406C
|
|
[Token(Token = "0x6009E64")]
|
|
[Address(RVA = "0x1820780", Offset = "0x181F580", VA = "0x181820780")]
|
|
public BigInteger Xor(BigInteger value)
|
|
{
|
|
int num = this.sign;
|
|
if (num != 0 && value.sign != 0)
|
|
{
|
|
if (num > 0)
|
|
{
|
|
}
|
|
BigInteger one = BigInteger.One;
|
|
int[] array = this.Add(one).magnitude;
|
|
if (value.sign > 0)
|
|
{
|
|
}
|
|
BigInteger one2 = BigInteger.One;
|
|
int[] array2 = value.Add(one2).magnitude;
|
|
int num2 = value.sign;
|
|
if (this.sign < 0)
|
|
{
|
|
}
|
|
int num3 = array2.Length;
|
|
num3 = Math.Max(array.Length, num3);
|
|
int[] array3 = new int[num3];
|
|
int num4 = array3.Length;
|
|
int num5 = 0;
|
|
int num6 = 0;
|
|
num4 -= num4;
|
|
int length = array3.Length;
|
|
if (num6 < length)
|
|
{
|
|
num6 += num5;
|
|
int num7 = 0;
|
|
array3[0] = num7;
|
|
if (num2 != 0)
|
|
{
|
|
array3[0] = num7;
|
|
}
|
|
num5++;
|
|
}
|
|
uint num8;
|
|
ulong num9;
|
|
BigInteger bigInteger = new BigInteger((int)num8, array3, num9 != 0UL);
|
|
BigInteger bigInteger3;
|
|
if (num2 != 0)
|
|
{
|
|
BigInteger bigInteger2 = bigInteger.Inc();
|
|
int num10 = bigInteger2.sign;
|
|
if (num10 != 0)
|
|
{
|
|
int[] array4 = bigInteger2.magnitude;
|
|
bigInteger3.nBits = (int)((ulong)(-1L));
|
|
bigInteger3.sign = num10;
|
|
bigInteger3.magnitude = array4;
|
|
}
|
|
}
|
|
return bigInteger3;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
// Token: 0x06009E65 RID: 40549 RVA: 0x00215FA0 File Offset: 0x002141A0
|
|
[Token(Token = "0x6009E65")]
|
|
[Address(RVA = "0x181DF70", Offset = "0x181CD70", VA = "0x18181DF70")]
|
|
public BigInteger SetBit(int n)
|
|
{
|
|
if (!this.TestBit(n))
|
|
{
|
|
if (this.sign > 0)
|
|
{
|
|
int bitLength = this.BitLength;
|
|
if (n < bitLength)
|
|
{
|
|
return this.FlipExistingBit(n);
|
|
}
|
|
}
|
|
BigInteger bigInteger = BigInteger.One.ShiftLeft(n);
|
|
return this.Or(bigInteger);
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// Token: 0x06009E66 RID: 40550 RVA: 0x00215FF4 File Offset: 0x002141F4
|
|
[Token(Token = "0x6009E66")]
|
|
[Address(RVA = "0x1817890", Offset = "0x1816690", VA = "0x181817890")]
|
|
public BigInteger ClearBit(int n)
|
|
{
|
|
if (this.TestBit(n))
|
|
{
|
|
if (this.sign > 0)
|
|
{
|
|
int bitLength = this.BitLength;
|
|
if (n < bitLength)
|
|
{
|
|
return this.FlipExistingBit(n);
|
|
}
|
|
}
|
|
BigInteger bigInteger = BigInteger.One.ShiftLeft(n).Inc().Negate();
|
|
return this.And(bigInteger);
|
|
}
|
|
return this;
|
|
}
|
|
|
|
// Token: 0x06009E67 RID: 40551 RVA: 0x00216054 File Offset: 0x00214254
|
|
[Token(Token = "0x6009E67")]
|
|
[Address(RVA = "0x18191E0", Offset = "0x1817FE0", VA = "0x1818191E0")]
|
|
public BigInteger FlipBit(int n)
|
|
{
|
|
if (this.sign > 0)
|
|
{
|
|
int num = this.nBitLength;
|
|
if (num == -1)
|
|
{
|
|
int num2 = this.sign;
|
|
if (num2 == 0)
|
|
{
|
|
}
|
|
int[] array = this.magnitude;
|
|
int num3 = 0;
|
|
int num4 = BigInteger.CalcBitLength(num2, num3, array);
|
|
this.nBitLength = num4;
|
|
}
|
|
if (n < num)
|
|
{
|
|
return this.FlipExistingBit(n);
|
|
}
|
|
}
|
|
BigInteger bigInteger = BigInteger.One.ShiftLeft(n);
|
|
return this.Xor(bigInteger);
|
|
}
|
|
|
|
// Token: 0x06009E68 RID: 40552 RVA: 0x002160C8 File Offset: 0x002142C8
|
|
[Token(Token = "0x6009E68")]
|
|
[Address(RVA = "0x1819340", Offset = "0x1818140", VA = "0x181819340")]
|
|
private BigInteger FlipExistingBit(int n)
|
|
{
|
|
int[] array = this.magnitude;
|
|
array -= n;
|
|
int num = this.sign;
|
|
BigInteger bigInteger;
|
|
bigInteger.nBits = (int)((ulong)(-1L));
|
|
bigInteger.sign = num;
|
|
return bigInteger;
|
|
}
|
|
|
|
// Token: 0x04006A24 RID: 27172
|
|
[Token(Token = "0x4006A24")]
|
|
internal static readonly int[][] primeLists;
|
|
|
|
// Token: 0x04006A25 RID: 27173
|
|
[Token(Token = "0x4006A25")]
|
|
internal static readonly int[] primeProducts;
|
|
|
|
// Token: 0x04006A26 RID: 27174
|
|
[Token(Token = "0x4006A26")]
|
|
private const long IMASK = 4294967295L;
|
|
|
|
// Token: 0x04006A27 RID: 27175
|
|
[Token(Token = "0x4006A27")]
|
|
private const ulong UIMASK = 4294967295UL;
|
|
|
|
// Token: 0x04006A28 RID: 27176
|
|
[Token(Token = "0x4006A28")]
|
|
private static readonly int[] ZeroMagnitude;
|
|
|
|
// Token: 0x04006A29 RID: 27177
|
|
[Token(Token = "0x4006A29")]
|
|
private static readonly byte[] ZeroEncoding;
|
|
|
|
// Token: 0x04006A2A RID: 27178
|
|
[Token(Token = "0x4006A2A")]
|
|
private static readonly BigInteger[] SMALL_CONSTANTS;
|
|
|
|
// Token: 0x04006A2B RID: 27179
|
|
[Token(Token = "0x4006A2B")]
|
|
public static readonly BigInteger Zero;
|
|
|
|
// Token: 0x04006A2C RID: 27180
|
|
[Token(Token = "0x4006A2C")]
|
|
public static readonly BigInteger One;
|
|
|
|
// Token: 0x04006A2D RID: 27181
|
|
[Token(Token = "0x4006A2D")]
|
|
public static readonly BigInteger Two;
|
|
|
|
// Token: 0x04006A2E RID: 27182
|
|
[Token(Token = "0x4006A2E")]
|
|
public static readonly BigInteger Three;
|
|
|
|
// Token: 0x04006A2F RID: 27183
|
|
[Token(Token = "0x4006A2F")]
|
|
public static readonly BigInteger Ten;
|
|
|
|
// Token: 0x04006A30 RID: 27184
|
|
[Token(Token = "0x4006A30")]
|
|
private static readonly byte[] BitLengthTable;
|
|
|
|
// Token: 0x04006A31 RID: 27185
|
|
[Token(Token = "0x4006A31")]
|
|
private const int chunk2 = 1;
|
|
|
|
// Token: 0x04006A32 RID: 27186
|
|
[Token(Token = "0x4006A32")]
|
|
private const int chunk8 = 1;
|
|
|
|
// Token: 0x04006A33 RID: 27187
|
|
[Token(Token = "0x4006A33")]
|
|
private const int chunk10 = 19;
|
|
|
|
// Token: 0x04006A34 RID: 27188
|
|
[Token(Token = "0x4006A34")]
|
|
private const int chunk16 = 16;
|
|
|
|
// Token: 0x04006A35 RID: 27189
|
|
[Token(Token = "0x4006A35")]
|
|
private static readonly BigInteger radix2;
|
|
|
|
// Token: 0x04006A36 RID: 27190
|
|
[Token(Token = "0x4006A36")]
|
|
private static readonly BigInteger radix2E;
|
|
|
|
// Token: 0x04006A37 RID: 27191
|
|
[Token(Token = "0x4006A37")]
|
|
private static readonly BigInteger radix8;
|
|
|
|
// Token: 0x04006A38 RID: 27192
|
|
[Token(Token = "0x4006A38")]
|
|
private static readonly BigInteger radix8E;
|
|
|
|
// Token: 0x04006A39 RID: 27193
|
|
[Token(Token = "0x4006A39")]
|
|
private static readonly BigInteger radix10;
|
|
|
|
// Token: 0x04006A3A RID: 27194
|
|
[Token(Token = "0x4006A3A")]
|
|
private static readonly BigInteger radix10E;
|
|
|
|
// Token: 0x04006A3B RID: 27195
|
|
[Token(Token = "0x4006A3B")]
|
|
private static readonly BigInteger radix16;
|
|
|
|
// Token: 0x04006A3C RID: 27196
|
|
[Token(Token = "0x4006A3C")]
|
|
private static readonly BigInteger radix16E;
|
|
|
|
// Token: 0x04006A3D RID: 27197
|
|
[Token(Token = "0x4006A3D")]
|
|
private static readonly SecureRandom RandomSource;
|
|
|
|
// Token: 0x04006A3E RID: 27198
|
|
[Token(Token = "0x4006A3E")]
|
|
private static readonly int[] ExpWindowThresholds;
|
|
|
|
// Token: 0x04006A3F RID: 27199
|
|
[Token(Token = "0x4006A3F")]
|
|
private const int BitsPerByte = 8;
|
|
|
|
// Token: 0x04006A40 RID: 27200
|
|
[Token(Token = "0x4006A40")]
|
|
private const int BitsPerInt = 32;
|
|
|
|
// Token: 0x04006A41 RID: 27201
|
|
[Token(Token = "0x4006A41")]
|
|
private const int BytesPerInt = 4;
|
|
|
|
// Token: 0x04006A42 RID: 27202
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4006A42")]
|
|
private int[] magnitude;
|
|
|
|
// Token: 0x04006A43 RID: 27203
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4006A43")]
|
|
private int sign;
|
|
|
|
// Token: 0x04006A44 RID: 27204
|
|
[FieldOffset(Offset = "0x1C")]
|
|
[Token(Token = "0x4006A44")]
|
|
private int nBits;
|
|
|
|
// Token: 0x04006A45 RID: 27205
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4006A45")]
|
|
private int nBitLength;
|
|
|
|
// Token: 0x04006A46 RID: 27206
|
|
[FieldOffset(Offset = "0x24")]
|
|
[Token(Token = "0x4006A46")]
|
|
private int mQuote;
|
|
}
|
|
}
|