m
This commit is contained in:
+103
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls
|
||||
{
|
||||
// Token: 0x02001C1B RID: 7195
|
||||
[Token(Token = "0x2001C1B")]
|
||||
public class HeartbeatMessage
|
||||
{
|
||||
// Token: 0x0600B11D RID: 45341 RVA: 0x00264D44 File Offset: 0x00262F44
|
||||
[Token(Token = "0x600B11D")]
|
||||
[Address(RVA = "0x494930", Offset = "0x493930", VA = "0x180494930")]
|
||||
public HeartbeatMessage(byte type, byte[] payload, int paddingLength)
|
||||
{
|
||||
do
|
||||
{
|
||||
base..ctor();
|
||||
}
|
||||
while (payload == 0 || payload.Length >= 65536);
|
||||
this.mType = type;
|
||||
this.mPaddingLength = paddingLength;
|
||||
this.mPayload = payload;
|
||||
}
|
||||
|
||||
// Token: 0x0600B11E RID: 45342 RVA: 0x00264D90 File Offset: 0x00262F90
|
||||
[Token(Token = "0x600B11E")]
|
||||
[Address(RVA = "0x4944C0", Offset = "0x4934C0", VA = "0x1804944C0", Slot = "4")]
|
||||
public virtual void Encode(TlsContext context, Stream output)
|
||||
{
|
||||
TlsUtilities.WriteUint8(this.mType, output);
|
||||
TlsUtilities.CheckUint16(this.mPayload.Length);
|
||||
TlsUtilities.WriteUint16(this.mPayload.Length, output);
|
||||
byte[] array = this.mPayload;
|
||||
int num = output.ReadByte();
|
||||
byte[] array2 = new byte[this.mPaddingLength];
|
||||
int num2 = output.ReadByte();
|
||||
}
|
||||
|
||||
// Token: 0x0600B11F RID: 45343 RVA: 0x00264DF4 File Offset: 0x00262FF4
|
||||
[Token(Token = "0x600B11F")]
|
||||
[Address(RVA = "0x494620", Offset = "0x493620", VA = "0x180494620")]
|
||||
public static HeartbeatMessage Parse(Stream input)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B11F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.HeartbeatMessage BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.HeartbeatMessage::Parse(System.IO.Stream)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_69:
|
||||
stloc:TlsFatalAlert(var_7_70, newobj:TlsFatalAlert(TlsFatalAlert::.ctor, ldloc:uint64[exp:uint8](var_8)))
|
||||
}
|
||||
|
||||
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 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x040070D6 RID: 28886
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40070D6")]
|
||||
protected readonly byte mType;
|
||||
|
||||
// Token: 0x040070D7 RID: 28887
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40070D7")]
|
||||
protected readonly byte[] mPayload;
|
||||
|
||||
// Token: 0x040070D8 RID: 28888
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40070D8")]
|
||||
protected readonly int mPaddingLength;
|
||||
|
||||
// Token: 0x02001C1C RID: 7196
|
||||
[Token(Token = "0x2001C1C")]
|
||||
internal class PayloadBuffer : MemoryStream
|
||||
{
|
||||
// Token: 0x0600B120 RID: 45344 RVA: 0x00264E74 File Offset: 0x00263074
|
||||
[Token(Token = "0x600B120")]
|
||||
[Address(RVA = "0x4951D0", Offset = "0x4941D0", VA = "0x1804951D0")]
|
||||
internal byte[] ToTruncatedByteArray(int payloadLength)
|
||||
{
|
||||
bool canWrite = this.CanWrite;
|
||||
byte[] array;
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B121 RID: 45345 RVA: 0x00264E8C File Offset: 0x0026308C
|
||||
[Token(Token = "0x600B121")]
|
||||
[Address(RVA = "0x495270", Offset = "0x494270", VA = "0x180495270")]
|
||||
public PayloadBuffer()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user