200 lines
8.4 KiB
C#
200 lines
8.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Cpp2IlInjected;
|
|
using MEC;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x02000033 RID: 51
|
|
[Token(Token = "0x2000033")]
|
|
public class ExpirationChecker
|
|
{
|
|
// Token: 0x06000190 RID: 400 RVA: 0x0000697C File Offset: 0x00004B7C
|
|
[Token(Token = "0x6000190")]
|
|
[Address(RVA = "0xA68FD0", Offset = "0xA67DD0", VA = "0x180A68FD0")]
|
|
public ExpirationChecker(string passCode)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06000190)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void ExpirationChecker::.ctor(System.String)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{; Block_0:; call:void(object::.ctor, ldloc:ExpirationChecker[exp:object](this)); stfld:string(ExpirationChecker::passCode, ldloc:ExpirationChecker(this), ldloc:string(passCode)); };
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
|
|
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 344
|
|
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 1618
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06000191 RID: 401 RVA: 0x00006998 File Offset: 0x00004B98
|
|
[Token(Token = "0x6000191")]
|
|
[Address(RVA = "0xA68F20", Offset = "0xA67D20", VA = "0x180A68F20")]
|
|
public void Run()
|
|
{
|
|
int num;
|
|
ExpirationChecker.<CheckNetwork>d__13 <CheckNetwork>d__ = new ExpirationChecker.<CheckNetwork>d__13(num);
|
|
num = 0;
|
|
<CheckNetwork>d__.<>4__this = this;
|
|
CoroutineHandle coroutineHandle = Timing.RunCoroutine(<CheckNetwork>d__);
|
|
}
|
|
|
|
// Token: 0x06000192 RID: 402 RVA: 0x000069C4 File Offset: 0x00004BC4
|
|
[Token(Token = "0x6000192")]
|
|
[Address(RVA = "0xA68F00", Offset = "0xA67D00", VA = "0x180A68F00")]
|
|
private bool IsNetReachable()
|
|
{
|
|
return Application.internetReachability != NetworkReachability.NotReachable;
|
|
}
|
|
|
|
// Token: 0x06000193 RID: 403 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6000193")]
|
|
[Address(RVA = "0xA68DC0", Offset = "0xA67BC0", VA = "0x180A68DC0")]
|
|
private IEnumerator<float> CheckNetwork()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06000194 RID: 404 RVA: 0x000069E0 File Offset: 0x00004BE0
|
|
[Token(Token = "0x6000194")]
|
|
[Address(RVA = "0xA68EE0", Offset = "0xA67CE0", VA = "0x180A68EE0")]
|
|
private void InternetIsNotAvailable()
|
|
{
|
|
ExpirationChecker.ExpiryCheckingEventHandler onNetworkDisconnected = this.OnNetworkDisconnected;
|
|
if (onNetworkDisconnected != 0)
|
|
{
|
|
onNetworkDisconnected();
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000195 RID: 405 RVA: 0x00006A00 File Offset: 0x00004C00
|
|
[Token(Token = "0x6000195")]
|
|
[Address(RVA = "0xA68E30", Offset = "0xA67C30", VA = "0x180A68E30")]
|
|
private void InternetAvailable()
|
|
{
|
|
int num;
|
|
ExpirationChecker.<CheckExpirationDate>d__16 <CheckExpirationDate>d__ = new ExpirationChecker.<CheckExpirationDate>d__16(num);
|
|
num = 0;
|
|
<CheckExpirationDate>d__.<>4__this = this;
|
|
CoroutineHandle coroutineHandle = Timing.RunCoroutine(<CheckExpirationDate>d__);
|
|
}
|
|
|
|
// Token: 0x06000196 RID: 406 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6000196")]
|
|
[Address(RVA = "0xA68D50", Offset = "0xA67B50", VA = "0x180A68D50")]
|
|
private IEnumerator<float> CheckExpirationDate()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x040001F7 RID: 503
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x40001F7")]
|
|
public ExpirationChecker.ExpiryCheckingEventHandler OnNetworkDisconnected;
|
|
|
|
// Token: 0x040001F8 RID: 504
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x40001F8")]
|
|
public ExpirationChecker.ExpiryCheckingEventHandler OnExpired;
|
|
|
|
// Token: 0x040001F9 RID: 505
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x40001F9")]
|
|
public ExpirationChecker.ExpiryCheckingEventHandler OnSuccess;
|
|
|
|
// Token: 0x040001FA RID: 506
|
|
[Token(Token = "0x40001FA")]
|
|
private const string HOST_URL = "https://www.sunkindown.com/lwn";
|
|
|
|
// Token: 0x040001FB RID: 507
|
|
[Token(Token = "0x40001FB")]
|
|
private const string PING_ADDRESS = "8.8.8.8";
|
|
|
|
// Token: 0x040001FC RID: 508
|
|
[Token(Token = "0x40001FC")]
|
|
private const float WAITING_TIME = 3f;
|
|
|
|
// Token: 0x040001FD RID: 509
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40001FD")]
|
|
private Ping ping;
|
|
|
|
// Token: 0x040001FE RID: 510
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x40001FE")]
|
|
private float pingStartTime;
|
|
|
|
// Token: 0x040001FF RID: 511
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x40001FF")]
|
|
private string passCode;
|
|
|
|
// Token: 0x02000034 RID: 52
|
|
[Token(Token = "0x2000034")]
|
|
public sealed class ExpiryCheckingEventHandler : MulticastDelegate
|
|
{
|
|
// Token: 0x06000197 RID: 407 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6000197")]
|
|
[Address(RVA = "0x44EA10", Offset = "0x44D810", VA = "0x18044EA10")]
|
|
public ExpiryCheckingEventHandler(object @object, IntPtr method)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06000198 RID: 408 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6000198")]
|
|
[Address(RVA = "0x5FA210", Offset = "0x5F9010", VA = "0x1805FA210", Slot = "12")]
|
|
public void Invoke()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06000199 RID: 409 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6000199")]
|
|
[Address(RVA = "0x5FA1E0", Offset = "0x5F8FE0", VA = "0x1805FA1E0", Slot = "13")]
|
|
public IAsyncResult BeginInvoke(AsyncCallback callback, object @object)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600019A RID: 410 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x600019A")]
|
|
[Address(RVA = "0x44E730", Offset = "0x44D530", VA = "0x18044E730", Slot = "14")]
|
|
public void EndInvoke(IAsyncResult result)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
}
|
|
|
|
// Token: 0x02000035 RID: 53
|
|
[Token(Token = "0x2000035")]
|
|
private class ExpiryData
|
|
{
|
|
// Token: 0x0600019B RID: 411 RVA: 0x00006A2C File Offset: 0x00004C2C
|
|
[Token(Token = "0x600019B")]
|
|
[Address(RVA = "0x3D8B20", Offset = "0x3D7920", VA = "0x1803D8B20")]
|
|
public ExpiryData()
|
|
{
|
|
}
|
|
|
|
// Token: 0x04000200 RID: 512
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4000200")]
|
|
public int ExpiryDate;
|
|
|
|
// Token: 0x04000201 RID: 513
|
|
[FieldOffset(Offset = "0x14")]
|
|
[Token(Token = "0x4000201")]
|
|
public int CurrentDate;
|
|
|
|
// Token: 0x04000202 RID: 514
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4000202")]
|
|
public bool HasExpired;
|
|
}
|
|
}
|