terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
ZipCrypto.cs
Go to the documentation of this file.
1using System;
3using Ionic.Crc;
4
5namespace Ionic.Zip
6{
7 // Token: 0x0200001A RID: 26
8 internal class ZipCrypto
9 {
10 // Token: 0x0600008C RID: 140 RVA: 0x00002CC0 File Offset: 0x00000EC0
11 private ZipCrypto()
12 {
13 }
14
15 // Token: 0x0600008D RID: 141 RVA: 0x00002122 File Offset: 0x00000322
16 public static ZipCrypto ForWrite(string password)
17 {
18 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
19 }
20
21 // Token: 0x0600008E RID: 142 RVA: 0x00002CD4 File Offset: 0x00000ED4
22 public static ZipCrypto ForRead(string password, ZipEntry e)
23 {
24 if (!true)
25 {
26 }
27 return "This entry requires a password.";
28 }
29
30 // Token: 0x1700001B RID: 27
31 // (get) Token: 0x0600008F RID: 143 RVA: 0x00002CEC File Offset: 0x00000EEC
32 private byte MagicByte
33 {
34 get
35 {
36 /*
37An exception occurred when decompiling this method (0600008F)
38
39ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte Ionic.Zip.ZipCrypto::get_MagicByte()
40
41 ---> System.Exception: Basic block has to end with unconditional control flow.
42{
43 Block_0:
44 stloc:uint32[](var_0_06, ldfld:uint32[](ZipCrypto::_Keys, ldloc:ZipCrypto(this)))
45}
46
47 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
48 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
49 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
50 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
51 --- End of inner exception stack trace ---
52 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
53 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 1683
54*/;
55 }
56 }
57
58 // Token: 0x06000090 RID: 144 RVA: 0x00002D00 File Offset: 0x00000F00
59 public byte[] DecryptMessage(byte[] cipherText, int length)
60 {
61 /*
62An exception occurred when decompiling this method (06000090)
63
64ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] Ionic.Zip.ZipCrypto::DecryptMessage(System.Byte[],System.Int32)
65
66 ---> System.Exception: Basic block has to end with unconditional control flow.
67{
68 Block_0:
69 stloc:uint32[](var_1_0B, ldfld:uint32[](ZipCrypto::_Keys, ldloc:ZipCrypto(this)))
70 call:void(ZipCrypto::UpdateKeys, ldloc:ZipCrypto(this), ldloc:uint8[][exp:uint8](cipherText))
71}
72
73 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
74 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
75 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
76 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
77 --- End of inner exception stack trace ---
78 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
79 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 1683
80*/;
81 }
82
83 // Token: 0x06000091 RID: 145 RVA: 0x00002D20 File Offset: 0x00000F20
84 public byte[] EncryptMessage(byte[] plainText, int length)
85 {
86 /*
87An exception occurred when decompiling this method (06000091)
88
89ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] Ionic.Zip.ZipCrypto::EncryptMessage(System.Byte[],System.Int32)
90
91 ---> System.Exception: Basic block has to end with unconditional control flow.
92{
93 Block_0:
94 stloc:uint32[](var_1_0B, ldfld:uint32[](ZipCrypto::_Keys, ldloc:ZipCrypto(this)))
95 call:void(ZipCrypto::UpdateKeys, ldloc:ZipCrypto(this), ldloc:int32[exp:uint8](length))
96}
97
98 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
99 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
100 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
101 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
102 --- End of inner exception stack trace ---
103 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
104 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 1683
105*/;
106 }
107
108 // Token: 0x06000092 RID: 146 RVA: 0x00002D40 File Offset: 0x00000F40
109 public void InitCipher(string passphrase)
110 {
111 if (!true)
112 {
113 }
115 int stringLength = passphrase._stringLength;
116 }
117
118 // Token: 0x06000093 RID: 147 RVA: 0x00002D60 File Offset: 0x00000F60
119 private void UpdateKeys(byte byteValue)
120 {
121 uint[] keys = this._Keys;
122 int num = this.crc32.ComputeCrc32((int)byteValue, byteValue);
123 uint[] keys2 = this._Keys;
124 int num2 = this.crc32.ComputeCrc32((int)byteValue, byteValue);
125 }
126
127 // Token: 0x04000044 RID: 68
128 private uint[] _Keys;
129
130 // Token: 0x04000045 RID: 69
131 private CRC32 crc32;
132 }
133}
class f__AnonymousType0<< Count > j__TPar
int ComputeCrc32(int W, byte B)
Definition CRC32.cs:85
static byte[] StringToByteArray(string value, Encoding encoding)
static ZipCrypto ForWrite(string password)
Definition ZipCrypto.cs:16
void UpdateKeys(byte byteValue)
Definition ZipCrypto.cs:119
void InitCipher(string passphrase)
Definition ZipCrypto.cs:109
static ZipCrypto ForRead(string password, ZipEntry e)
Definition ZipCrypto.cs:22
byte[] DecryptMessage(byte[] cipherText, int length)
Definition ZipCrypto.cs:59
byte[] EncryptMessage(byte[] plainText, int length)
Definition ZipCrypto.cs:84