500 lines
22 KiB
C#
500 lines
22 KiB
C#
using System;
|
|
using System.IO;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.Decompression.Crc
|
|
{
|
|
// Token: 0x02001FBD RID: 8125
|
|
[Token(Token = "0x2001FBD")]
|
|
internal class CRC32
|
|
{
|
|
// Token: 0x170020C2 RID: 8386
|
|
// (get) Token: 0x0600CDEC RID: 52716 RVA: 0x002F5FE4 File Offset: 0x002F41E4
|
|
[Token(Token = "0x170020C2")]
|
|
public long TotalBytesRead
|
|
{
|
|
[Token(Token = "0x600CDEC")]
|
|
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40")]
|
|
get
|
|
{
|
|
return this._TotalBytesRead;
|
|
}
|
|
}
|
|
|
|
// Token: 0x170020C3 RID: 8387
|
|
// (get) Token: 0x0600CDED RID: 52717 RVA: 0x002F5FF8 File Offset: 0x002F41F8
|
|
[Token(Token = "0x170020C3")]
|
|
public int Crc32Result
|
|
{
|
|
[Token(Token = "0x600CDED")]
|
|
[Address(RVA = "0x5F70B0", Offset = "0x5F5EB0", VA = "0x1805F70B0")]
|
|
get
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600CDED)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.Decompression.Crc.CRC32::get_Crc32Result()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:uint32(var_0_06, ldfld:uint32(CRC32::_register, ldloc:CRC32(this)))
|
|
}
|
|
|
|
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: 0x0600CDEE RID: 52718 RVA: 0x002F600C File Offset: 0x002F420C
|
|
[Token(Token = "0x600CDEE")]
|
|
[Address(RVA = "0x1960510", Offset = "0x195F310", VA = "0x181960510")]
|
|
public int GetCrc32(Stream input)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600CDEE)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.Decompression.Crc.CRC32::GetCrc32(System.IO.Stream)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_23:
|
|
stloc:Exception(var_4_2D, newobj:Exception(Exception::.ctor, ldstr:string("The input stream must not be null.")))
|
|
}
|
|
|
|
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: 0x0600CDEF RID: 52719 RVA: 0x002F6048 File Offset: 0x002F4248
|
|
[Token(Token = "0x600CDEF")]
|
|
[Address(RVA = "0x1960390", Offset = "0x195F190", VA = "0x181960390")]
|
|
public int GetCrc32AndCopy(Stream input, Stream output)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600CDEF)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.Decompression.Crc.CRC32::GetCrc32AndCopy(System.IO.Stream,System.IO.Stream)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_3B:
|
|
stloc:Exception(var_6_45, newobj:Exception(Exception::.ctor, ldstr:string("The input stream must not be null.")))
|
|
}
|
|
|
|
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: 0x0600CDF0 RID: 52720 RVA: 0x002F609C File Offset: 0x002F429C
|
|
[Token(Token = "0x600CDF0")]
|
|
[Address(RVA = "0x5F68D0", Offset = "0x5F56D0", VA = "0x1805F68D0")]
|
|
public int ComputeCrc32(int W, byte B)
|
|
{
|
|
uint num = this.crc32Table[W];
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600CDF1 RID: 52721 RVA: 0x002F60BC File Offset: 0x002F42BC
|
|
[Token(Token = "0x600CDF1")]
|
|
[Address(RVA = "0x5F68D0", Offset = "0x5F56D0", VA = "0x1805F68D0")]
|
|
internal int _InternalComputeCrc32(uint W, byte B)
|
|
{
|
|
uint num = this.crc32Table[(int)W];
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600CDF2 RID: 52722 RVA: 0x002F60DC File Offset: 0x002F42DC
|
|
[Token(Token = "0x600CDF2")]
|
|
[Address(RVA = "0x1960650", Offset = "0x195F450", VA = "0x181960650")]
|
|
public void SlurpBlock(byte[] block, int offset, int count)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600CDF2)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.Decompression.Crc.CRC32::SlurpBlock(System.Byte[],System.Int32,System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_36:
|
|
stloc:Exception(var_4_40, newobj:Exception(Exception::.ctor, ldstr:string("The data buffer must not be null.")))
|
|
}
|
|
|
|
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: 0x0600CDF3 RID: 52723 RVA: 0x002F612C File Offset: 0x002F432C
|
|
[Token(Token = "0x600CDF3")]
|
|
[Address(RVA = "0x1960880", Offset = "0x195F680", VA = "0x181960880")]
|
|
public void UpdateCRC(byte b)
|
|
{
|
|
uint register = this._register;
|
|
uint[] array = this.crc32Table;
|
|
if (!this.reverseBits)
|
|
{
|
|
uint num = array[(int)register];
|
|
this._register = num;
|
|
return;
|
|
}
|
|
uint num2 = array[(int)register];
|
|
this._register = num2;
|
|
}
|
|
|
|
// Token: 0x0600CDF4 RID: 52724 RVA: 0x002F6178 File Offset: 0x002F4378
|
|
[Token(Token = "0x600CDF4")]
|
|
[Address(RVA = "0x19607B0", Offset = "0x195F5B0", VA = "0x1819607B0")]
|
|
public void UpdateCRC(byte b, int n)
|
|
{
|
|
if (n > 0)
|
|
{
|
|
int num = n - 1;
|
|
uint[] array = this.crc32Table;
|
|
if (!this.reverseBits)
|
|
{
|
|
}
|
|
uint register = this._register;
|
|
uint num2 = array[(int)register];
|
|
this._register = num2;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600CDF5 RID: 52725 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x600CDF5")]
|
|
[Address(RVA = "0x5F6D20", Offset = "0x5F5B20", VA = "0x1805F6D20")]
|
|
private static uint ReverseBits(uint data)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600CDF6 RID: 52726 RVA: 0x002F61BC File Offset: 0x002F43BC
|
|
[Token(Token = "0x600CDF6")]
|
|
[Address(RVA = "0x5F6D80", Offset = "0x5F5B80", VA = "0x1805F6D80")]
|
|
private static byte ReverseBits(byte data)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600CDF6)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte BestHTTP.Decompression.Crc.CRC32::ReverseBits(System.Byte)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:int64(var_0_0F, mul:uint32[exp:int64](mul:uint32(ldloc:uint8[exp:uint32](data), conv.u4:uint32(ldc.i4:int32[exp:uint32](131586))), conv.u4:uint32(ldc.i4:int32[exp:uint32](16781313))))
|
|
}
|
|
|
|
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: 0x0600CDF7 RID: 52727 RVA: 0x002F61D8 File Offset: 0x002F43D8
|
|
[Token(Token = "0x600CDF7")]
|
|
[Address(RVA = "0x1960240", Offset = "0x195F040", VA = "0x181960240")]
|
|
private void GenerateLookupTable()
|
|
{
|
|
uint[] array = new uint[256];
|
|
this.crc32Table = array;
|
|
int num = 0;
|
|
if (num == 1)
|
|
{
|
|
}
|
|
uint num2 = this.dwPolynomial;
|
|
while (num != 1)
|
|
{
|
|
}
|
|
uint[] array2 = this.crc32Table;
|
|
ulong num3;
|
|
if ((this.reverseBits ? 1UL : 0UL) == num3)
|
|
{
|
|
array2[0] = num2;
|
|
}
|
|
long num4 = (long)(num * (int)((uint)131586));
|
|
num2 += num2;
|
|
long num5 = num4 * (long)((uint)16781313);
|
|
array2[0] = (uint)num;
|
|
num++;
|
|
while (num5 != (long)array2.Length)
|
|
{
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600CDF8 RID: 52728 RVA: 0x002F6260 File Offset: 0x002F4460
|
|
[Token(Token = "0x600CDF8")]
|
|
[Address(RVA = "0x5F7180", Offset = "0x5F5F80", VA = "0x1805F7180")]
|
|
private uint gf2_matrix_times(uint[] matrix, uint vec)
|
|
{
|
|
int num = 0;
|
|
if (vec != (uint)0)
|
|
{
|
|
if (vec != (uint)1)
|
|
{
|
|
}
|
|
num++;
|
|
while (vec >= (uint)2)
|
|
{
|
|
}
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600CDF9 RID: 52729 RVA: 0x002F6288 File Offset: 0x002F4488
|
|
[Token(Token = "0x600CDF9")]
|
|
[Address(RVA = "0x5F70C0", Offset = "0x5F5EC0", VA = "0x1805F70C0")]
|
|
private void gf2_matrix_square(uint[] square, uint[] mat)
|
|
{
|
|
int num = 0;
|
|
int length = mat.Length;
|
|
int num2 = 0;
|
|
uint num3;
|
|
if (num3 != (uint)0)
|
|
{
|
|
if (num3 != (uint)1)
|
|
{
|
|
}
|
|
num2++;
|
|
while (num3 >= (uint)2)
|
|
{
|
|
}
|
|
}
|
|
num++;
|
|
}
|
|
|
|
// Token: 0x0600CDFA RID: 52730 RVA: 0x002F62C0 File Offset: 0x002F44C0
|
|
[Token(Token = "0x600CDFA")]
|
|
[Address(RVA = "0x195FE20", Offset = "0x195EC20", VA = "0x18195FE20")]
|
|
public void Combine(int crc, int length)
|
|
{
|
|
uint[] array = new uint[32];
|
|
uint[] array2 = new uint[32];
|
|
if (length != 0)
|
|
{
|
|
uint register = this._register;
|
|
uint num = this.dwPolynomial;
|
|
array2[0] = num;
|
|
uint num2;
|
|
num2 += (uint)1;
|
|
array2[0] = num2;
|
|
num2 += num2;
|
|
int num3 = 0;
|
|
int length2 = array2.Length;
|
|
int num4 = 0;
|
|
uint num5;
|
|
if (num5 != (uint)0)
|
|
{
|
|
if (num5 != (uint)1)
|
|
{
|
|
}
|
|
num4++;
|
|
while (num5 >= (uint)2)
|
|
{
|
|
}
|
|
}
|
|
num3++;
|
|
int num6 = 0;
|
|
int length3 = array.Length;
|
|
int num7 = 0;
|
|
uint num8;
|
|
if (num8 != (uint)0)
|
|
{
|
|
if (num8 != (uint)1)
|
|
{
|
|
}
|
|
num7++;
|
|
while (num8 >= (uint)2)
|
|
{
|
|
}
|
|
}
|
|
num6++;
|
|
int num9 = 0;
|
|
int length4 = array2.Length;
|
|
int num10 = 0;
|
|
uint num11;
|
|
if (num11 != (uint)0)
|
|
{
|
|
if (num11 != (uint)1)
|
|
{
|
|
}
|
|
num10++;
|
|
while (num11 >= (uint)2)
|
|
{
|
|
}
|
|
}
|
|
num9++;
|
|
int i;
|
|
if (length != 1)
|
|
{
|
|
i = 0;
|
|
int num12 = 0;
|
|
if (register != (uint)0)
|
|
{
|
|
if (register != (uint)1)
|
|
{
|
|
}
|
|
num12++;
|
|
while (register >= (uint)2)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
int num16;
|
|
if (register != (uint)2)
|
|
{
|
|
int num13 = 0;
|
|
int length5 = array.Length;
|
|
int num14 = 0;
|
|
uint num15;
|
|
if (num15 != (uint)0)
|
|
{
|
|
num11 = num15;
|
|
if (num15 != (uint)1)
|
|
{
|
|
}
|
|
num14++;
|
|
while (num11 >= (uint)2)
|
|
{
|
|
}
|
|
}
|
|
num13++;
|
|
if (length != 1)
|
|
{
|
|
num16 = 0;
|
|
int num17 = 0;
|
|
if (i != 0)
|
|
{
|
|
if (i != 1)
|
|
{
|
|
}
|
|
num17++;
|
|
while (i >= 2)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
while (i != 2)
|
|
{
|
|
}
|
|
}
|
|
this._register = (uint)num16;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600CDFB RID: 52731 RVA: 0x002F6424 File Offset: 0x002F4624
|
|
[Token(Token = "0x600CDFB")]
|
|
[Address(RVA = "0x1960A90", Offset = "0x195F890", VA = "0x181960A90")]
|
|
public CRC32()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600CDFC RID: 52732 RVA: 0x002F6434 File Offset: 0x002F4634
|
|
[Token(Token = "0x600CDFC")]
|
|
[Address(RVA = "0x1960AA0", Offset = "0x195F8A0", VA = "0x181960AA0")]
|
|
public CRC32(bool reverseBits)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600CDFD RID: 52733 RVA: 0x002F6444 File Offset: 0x002F4644
|
|
[Token(Token = "0x600CDFD")]
|
|
[Address(RVA = "0x1960920", Offset = "0x195F720", VA = "0x181960920")]
|
|
public CRC32(int polynomial, bool reverseBits)
|
|
{
|
|
this._register = (uint)((ulong)4294967295L);
|
|
base..ctor();
|
|
this.reverseBits = reverseBits;
|
|
this.dwPolynomial = (uint)polynomial;
|
|
uint[] array = new uint[256];
|
|
this.crc32Table = array;
|
|
int num = 0;
|
|
if (num != 1)
|
|
{
|
|
}
|
|
while (num != 1)
|
|
{
|
|
}
|
|
uint[] array2 = this.crc32Table;
|
|
ulong num2;
|
|
if ((this.reverseBits ? 1UL : 0UL) == num2)
|
|
{
|
|
array2[0] = (uint)num;
|
|
}
|
|
long num3 = (long)(num * (int)((uint)131586));
|
|
num += num;
|
|
long num4 = num3 * (long)((uint)16781313);
|
|
array2[0] = (uint)num;
|
|
num++;
|
|
while (num4 != (long)array2.Length)
|
|
{
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600CDFE RID: 52734 RVA: 0x002F64E4 File Offset: 0x002F46E4
|
|
[Token(Token = "0x600CDFE")]
|
|
[Address(RVA = "0x1960640", Offset = "0x195F440", VA = "0x181960640")]
|
|
public void Reset()
|
|
{
|
|
this._register = (uint)((ulong)4294967295L);
|
|
}
|
|
|
|
// Token: 0x040083D4 RID: 33748
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x40083D4")]
|
|
private uint dwPolynomial;
|
|
|
|
// Token: 0x040083D5 RID: 33749
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x40083D5")]
|
|
private long _TotalBytesRead;
|
|
|
|
// Token: 0x040083D6 RID: 33750
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x40083D6")]
|
|
private bool reverseBits;
|
|
|
|
// Token: 0x040083D7 RID: 33751
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40083D7")]
|
|
private uint[] crc32Table;
|
|
|
|
// Token: 0x040083D8 RID: 33752
|
|
[Token(Token = "0x40083D8")]
|
|
private const int BUFFER_SIZE = 8192;
|
|
|
|
// Token: 0x040083D9 RID: 33753
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x40083D9")]
|
|
private uint _register;
|
|
}
|
|
}
|