scripts
This commit is contained in:
@@ -0,0 +1,156 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.PlatformSupport.FileSystem;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP
|
||||
{
|
||||
// Token: 0x0200129C RID: 4764
|
||||
[Token(Token = "0x200129C")]
|
||||
[StructLayout(3)]
|
||||
internal sealed class FileConnection : ConnectionBase
|
||||
{
|
||||
// Token: 0x06007695 RID: 30357 RVA: 0x00187AF4 File Offset: 0x00185CF4
|
||||
[Token(Token = "0x6007695")]
|
||||
[Address(RVA = "0x1C89FC0", Offset = "0x1C889C0", VA = "0x181C89FC0")]
|
||||
public FileConnection(string serverAddress)
|
||||
: base(serverAddress)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06007696 RID: 30358 RVA: 0x00187B08 File Offset: 0x00185D08
|
||||
[Token(Token = "0x6007696")]
|
||||
[Address(RVA = "0x1C898C0", Offset = "0x1C882C0", VA = "0x181C898C0", Slot = "6")]
|
||||
internal override void Abort(HTTPConnectionStates newState)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007696)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.FileConnection::Abort(BestHTTP.HTTPConnectionStates)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_1C:
|
||||
stloc:NotImplementedException(var_3_21, newobj:NotImplementedException(NotImplementedException::.ctor))
|
||||
}
|
||||
|
||||
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: 0x06007697 RID: 30359 RVA: 0x00187B38 File Offset: 0x00185D38
|
||||
[Token(Token = "0x6007697")]
|
||||
[Address(RVA = "0x1C89950", Offset = "0x1C88350", VA = "0x181C89950", Slot = "7")]
|
||||
protected override void ThreadFunc(object param)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
int num = 0;
|
||||
IIOService ioservice = HTTPManager.IOService;
|
||||
HTTPRequest <CurrentRequest>k__BackingField = this.<CurrentRequest>k__BackingField;
|
||||
if (<CurrentRequest>k__BackingField.<IsRedirected>k__BackingField)
|
||||
{
|
||||
}
|
||||
string localPath = <CurrentRequest>k__BackingField.<Uri>k__BackingField.LocalPath;
|
||||
num += num;
|
||||
num++;
|
||||
Stream[] array = new Stream[2];
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
if (memoryStream != 0)
|
||||
{
|
||||
}
|
||||
array[0] = memoryStream;
|
||||
if (num != 0)
|
||||
{
|
||||
}
|
||||
array[1] = num;
|
||||
StreamList streamList = new StreamList(array);
|
||||
streamList.Write("HTTP/1.1 200 Ok\r\n");
|
||||
streamList.Write("Content-Type: application/octet-stream\r\n");
|
||||
string text;
|
||||
streamList.Write(text);
|
||||
streamList.Write("\r\n");
|
||||
HTTPResponse httpresponse;
|
||||
this.<CurrentRequest>k__BackingField.<Response>k__BackingField = httpresponse;
|
||||
this.<CurrentRequest>k__BackingField.<Response>k__BackingField.Dispose();
|
||||
this.<CurrentRequest>k__BackingField.<Response>k__BackingField = num;
|
||||
if (streamList != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
if (streamList != 0)
|
||||
{
|
||||
goto IL_1C5;
|
||||
}
|
||||
if (num != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
if (streamList == 0)
|
||||
{
|
||||
HTTPRequest <CurrentRequest>k__BackingField2 = this.<CurrentRequest>k__BackingField;
|
||||
if (<CurrentRequest>k__BackingField2 == 0)
|
||||
{
|
||||
goto IL_10F;
|
||||
}
|
||||
int num2 = 0;
|
||||
<CurrentRequest>k__BackingField2.<Response>k__BackingField = num2;
|
||||
if (this.<State>k__BackingField == HTTPConnectionStates.AbortRequested)
|
||||
{
|
||||
this.<CurrentRequest>k__BackingField.<State>k__BackingField = (HTTPRequestStates)((ulong)5L);
|
||||
goto IL_10F;
|
||||
}
|
||||
IL_113:
|
||||
HTTPRequest <CurrentRequest>k__BackingField3;
|
||||
if (num == 8)
|
||||
{
|
||||
<CurrentRequest>k__BackingField3 = this.<CurrentRequest>k__BackingField;
|
||||
<CurrentRequest>k__BackingField3.<State>k__BackingField = (HTTPRequestStates)((ulong)7L);
|
||||
}
|
||||
this.<CurrentRequest>k__BackingField.<Exception>k__BackingField = <CurrentRequest>k__BackingField3;
|
||||
this.<CurrentRequest>k__BackingField.<State>k__BackingField = (HTTPRequestStates)((ulong)4L);
|
||||
this.<State>k__BackingField = (HTTPConnectionStates)((ulong)9L);
|
||||
HTTPRequest <CurrentRequest>k__BackingField4 = this.<CurrentRequest>k__BackingField;
|
||||
if (<CurrentRequest>k__BackingField4.<State>k__BackingField == HTTPRequestStates.Processing)
|
||||
{
|
||||
if (<CurrentRequest>k__BackingField4.<Response>k__BackingField != (ulong)0L)
|
||||
{
|
||||
break;
|
||||
}
|
||||
<CurrentRequest>k__BackingField4.<State>k__BackingField = (HTTPRequestStates)((ulong)4L);
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
if (streamList == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
IL_10F:
|
||||
num++;
|
||||
goto IL_113;
|
||||
}
|
||||
goto IL_1D1;
|
||||
}
|
||||
return;
|
||||
IL_1C5:
|
||||
throw new NullReferenceException();
|
||||
IL_1D1:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user