Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
HideakiAtsuyo authored Nov 28, 2021
1 parent 95e4667 commit 7da5cdb
Show file tree
Hide file tree
Showing 83 changed files with 839 additions and 737 deletions.
2 changes: 1 addition & 1 deletion PRose/Rose/Protections/Abs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public override ArithmeticTypes ArithmeticTypes
}
}

// Token: 0x0600005A RID: 90 RVA: 0x00007EB8 File Offset: 0x000060B8
// Token: 0x0600005A RID: 90 RVA: 0x0000555C File Offset: 0x0000375C
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
return null;
Expand Down
2 changes: 1 addition & 1 deletion PRose/Rose/Protections/Add.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public override ArithmeticTypes ArithmeticTypes
}
}

// Token: 0x06000054 RID: 84 RVA: 0x00007D60 File Offset: 0x00005F60
// Token: 0x06000054 RID: 84 RVA: 0x00005474 File Offset: 0x00003674
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
if (!ArithmeticUtils.CheckArithmetic(instruction))
Expand Down
24 changes: 12 additions & 12 deletions PRose/Rose/Protections/AddJunk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Rose.Protections
// Token: 0x02000004 RID: 4
internal static class AddJunk
{
// Token: 0x0600000F RID: 15 RVA: 0x00003158 File Offset: 0x00001358
// Token: 0x0600000F RID: 15 RVA: 0x00002D68 File Offset: 0x00000F68
public static void Execute(ModuleDefMD module)
{
TypeDefUser item2;
Expand All @@ -16,19 +16,19 @@ public static void Execute(ModuleDefMD module)
{
if (xd.renamertype == "Symbols")
{
goto IL_2A;
goto IL_13;
}
goto IL_13A;
IL_1B3:
if (xd.renamertype == "Numbers")
goto IL_C1;
IL_F7:
if (!(xd.renamertype == "Numbers"))
{
break;
continue;
}
continue;
IL_2A:
break;
IL_13:
if (!(xd.renamertype == "Ascii"))
{
goto IL_1B3;
goto IL_F7;
}
TypeDefUser item = new TypeDefUser(RUtils.RandomSymbols(xd.thelength), module.CorLibTypes.Object.TypeDefOrRef);
module.Types.Add(item);
Expand All @@ -37,17 +37,17 @@ public static void Execute(ModuleDefMD module)
module.Types.Add(item3);
item3 = new TypeDefUser(RUtils.RandomChinese(xd.thelength), module.CorLibTypes.Object.TypeDefOrRef);
int num = Convert.ToInt32(10);
IL_13A:
IL_C1:
if (xd.renamertype == "Chinese")
{
if (num2 < num)
{
goto IL_2A;
goto IL_13;
}
module.Types.Add(item4);
}
num2++;
goto IL_1B3;
goto IL_F7;
}
item2 = new TypeDefUser(RUtils.GenerateRandomString2(xd.thelength), module.CorLibTypes.Object.TypeDefOrRef);
item4 = new TypeDefUser(RUtils.RandomNum(xd.thelength), module.CorLibTypes.Object.TypeDefOrRef);
Expand Down
6 changes: 3 additions & 3 deletions PRose/Rose/Protections/AntiDe4dot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Rose.Protections
// Token: 0x02000005 RID: 5
public class AntiDe4dot
{
// Token: 0x06000010 RID: 16 RVA: 0x000033E4 File Offset: 0x000015E4
// Token: 0x06000010 RID: 16 RVA: 0x00002EF4 File Offset: 0x000010F4
public static void Execute1(AssemblyDef mod)
{
using (IEnumerator<ModuleDef> enumerator = mod.Modules.GetEnumerator())
Expand All @@ -34,7 +34,7 @@ public static void Execute1(AssemblyDef mod)
}
}

// Token: 0x06000011 RID: 17 RVA: 0x0000351C File Offset: 0x0000171C
// Token: 0x06000011 RID: 17 RVA: 0x00003004 File Offset: 0x00001204
public static void Execute2(Context context, ModuleDef moduleDef)
{
TypeDef typeDef;
Expand Down Expand Up @@ -75,7 +75,7 @@ public static void Execute2(Context context, ModuleDef moduleDef)
};
}

// Token: 0x06000012 RID: 18 RVA: 0x00003900 File Offset: 0x00001B00
// Token: 0x06000012 RID: 18 RVA: 0x0000329C File Offset: 0x0000149C
public static ModuleWriterOptions Execute(ModuleDef moduleDef)
{
Context context;
Expand Down
6 changes: 3 additions & 3 deletions PRose/Rose/Protections/AntiDebug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Rose.Protections
// Token: 0x02000007 RID: 7
public static class AntiDebug
{
// Token: 0x06000015 RID: 21 RVA: 0x000039F4 File Offset: 0x00001BF4
// Token: 0x06000015 RID: 21 RVA: 0x00003340 File Offset: 0x00001540
public static void Execute(ModuleDef module)
{
ModuleDefMD moduleDefMD = ModuleDefMD.Load(typeof(AntiDebugSafe).Module);
Expand All @@ -35,11 +35,11 @@ public static void Execute(ModuleDef module)
}
if (!enumerator.MoveNext())
{
goto Block_4;
goto IL_117;
}
}
module.GlobalType.Remove(methodDef2);
Block_4:;
IL_117:;
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions PRose/Rose/Protections/AntiDebug2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Rose.Protections
// Token: 0x0200000A RID: 10
public class AntiDebug2
{
// Token: 0x0600001B RID: 27 RVA: 0x00004000 File Offset: 0x00002200
// Token: 0x0600001B RID: 27 RVA: 0x000035CC File Offset: 0x000017CC
public static void Execute(ModuleDef module)
{
AntiDebug2.debuggerMethod.Body.Instructions.Insert(0, Instruction.Create(OpCodes.Call, AntiDebug2.debuggerMethod));
Expand All @@ -31,11 +31,11 @@ public static void Execute(ModuleDef module)
}
if (!enumerator.MoveNext())
{
goto Block_4;
goto IL_108;
}
}
module.GlobalType.Remove(methodDef);
Block_4:;
IL_108:;
}
}

Expand Down
22 changes: 11 additions & 11 deletions PRose/Rose/Protections/AntiDebugSafe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal static class AntiDebugSafe
[DllImport("ntdll.dll", CharSet = CharSet.Auto)]
public static extern int NtQueryInformationProcess(IntPtr test, int test2, int[] test3, int test4, ref int test5);

// Token: 0x0600001A RID: 26 RVA: 0x00003BC8 File Offset: 0x00001DC8
// Token: 0x0600001A RID: 26 RVA: 0x00003488 File Offset: 0x00001688
private static void xEQAW()
{
for (;;)
Expand All @@ -22,28 +22,28 @@ private static void xEQAW()
if (AntiDebugSafe.NtQueryInformationProcess(intPtr, 0, array, 24, ref num) != 0)
{
intPtr2 = Marshal.ReadIntPtr(intPtr, 0);
goto IL_56;
goto IL_26;
}
goto IL_10A;
IL_CB:
goto IL_A1;
IL_60:
if (Environment.OSVersion.Platform != PlatformID.Win32NT)
{
if (array[0] != 0)
{
goto IL_10A;
goto IL_A1;
}
continue;
}
IL_56:
IL_26:
array = new int[6];
IntPtr ptr;
IntPtr value = Marshal.ReadIntPtr(ptr, 8);
num = 0;
if (array[0] != 1)
{
goto IL_CB;
goto IL_60;
}
IL_192:
IL_73:
if (AntiDebugSafe.NtQueryInformationProcess(intPtr, 30, array, 4, ref num) != 0)
{
continue;
Expand All @@ -52,14 +52,14 @@ private static void xEQAW()
{
break;
}
goto IL_CB;
IL_10A:
goto IL_60;
IL_A1:
intPtr = Marshal.ReadIntPtr(Marshal.ReadIntPtr((IntPtr)array[1], 12), 12);
ptr = intPtr2;
Environment.Exit(0);
IntPtr ptr2;
Marshal.WriteInt32(ptr2, 0, (int)value);
goto IL_192;
goto IL_73;
}
Environment.Exit(0);
}
Expand Down
Loading

0 comments on commit 7da5cdb

Please sign in to comment.