Guy Expert Cheater Reputation: 0
Joined: 30 May 2009 Posts: 187
|
Posted: Sat Jun 27, 2009 11:44 pm Post subject: |
|
|
What's to crack? You used a shitty obfuscator, hid a few imports:
Code: |
<DllImport("user32", EntryPoint:="EnumChildWindows", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)>
<DllImport("kernel32", EntryPoint:="MoveFileEx")> _
<DllImport("kernel32", EntryPoint:="SetProcessWorkingSetSize")> _
|
Then there's this..
Method_0:
Code: |
<DllImport("kernel32", EntryPoint:="MoveFileEx")> _
Private Shared Function Method_0(ByVal String, ByVal String, ByVal Integer) As Boolean
End Function
|
Code: |
Friend Shared Function Method_3(ByVal Object, ByVal args1 As ResolveEventArgs) As Assembly
Dim type As New Class_156_ValueType(args1.Name)
Dim s As String = type.Method_0(False)
Dim str2 As String = Convert.ToBase64String(Encoding.UTF8.GetBytes(s))
Dim strArray As String() = Class_136_Object.Method_0(&H232).Split(New Char() { ","c })
Dim key As String = String.Empty
Dim flag As Boolean = False
Dim flag2 As Boolean = False
Dim flag3 As Boolean = False
Dim index As Integer = 0
Do
If (strArray(index) = str2) Then
key = strArray((index + 1))
Exit Do
End If
index = (index + 2)
Loop While (index < (strArray.Length - 1))
If ((key.Length = 0) AndAlso (type.Field_3.Length = 0)) Then
str2 = Convert.ToBase64String(Encoding.UTF8.GetBytes(type.Field_0))
Dim num2 As Integer = 0
Do
If (strArray(num2) = str2) Then
key = strArray((num2 + 1))
Exit Do
End If
num2 = (num2 + 2)
Loop While (num2 < (strArray.Length - 1))
End If
If (key.Length > 0) Then
If (key.Chars(0) = "["c) Then
Dim num3 As Integer = key.IndexOf("]"c)
Dim str4 As String = key.Substring(1, (num3 - 1))
flag = (str4.IndexOf("z"c) >= 0)
flag2 = (str4.IndexOf("g"c) >= 0)
flag3 = (str4.IndexOf("t"c) >= 0)
key = key.Substring((num3 + 1))
End If
SyncLock Class_155_Object.Field_0
If Class_155_Object.Field_0.ContainsKey(key) Then
Return DirectCast(Class_155_Object.Field_0.Item(key), Assembly)
End If
End SyncLock
Dim manifestResourceStream As Stream = Assembly.GetExecutingAssembly.GetManifestResourceStream(key)
If (Not manifestResourceStream Is Nothing) Then
Dim length As Integer = CInt(manifestResourceStream.Length)
Dim buffer As Byte() = New Byte(length - 1) {}
manifestResourceStream.Read(buffer, 0, length)
If flag Then
buffer = Class_139_Object.Method_0(buffer)
End If
If flag2 Then
Try
Dim path As String = String.Format(Class_136_Object.Method_0(780), Path.GetTempPath, key)
Directory.CreateDirectory(path)
Dim str6 As String = (path & type.Field_0 & Class_136_Object.Method_0(&H319))
If Not File.Exists(str6) Then
Dim assembly As Assembly = Nothing
Dim stream2 As FileStream = File.OpenWrite(str6)
stream2.Write(buffer, 0, buffer.Length)
stream2.Close
If Class_157_Object.Method_1(str6) Then
[assembly] = Assembly.Load(type.Method_0(True))
End If
File.Delete(str6)
Directory.Delete(path)
If (Not [assembly] Is Nothing) Then
SyncLock Class_155_Object.Field_0
If Class_155_Object.Field_0.ContainsKey(key) Then
[assembly] = DirectCast(Class_155_Object.Field_0.Item(key), Assembly)
End If
Class_155_Object.Field_0.Add(key, [assembly])
End SyncLock
Return [assembly]
End If
End If
Catch obj1 As Object
End Try
End If
Dim assembly2 As Assembly = Nothing
If Not flag3 Then
Try
assembly2 = Assembly.Load(buffer)
Catch exception1 As FileLoadException
flag3 = True
Catch exception2 As BadImageFormatException
flag3 = True
End Try
End If
If flag3 Then
Try
Dim str7 As String = String.Format(Class_136_Object.Method_0(780), Path.GetTempPath, key)
Directory.CreateDirectory(str7)
Dim str8 As String = (str7 & type.Field_0 & Class_136_Object.Method_0(&H319))
If Not File.Exists(str8) Then
Dim stream3 As FileStream = File.OpenWrite(str8)
stream3.Write(buffer, 0, buffer.Length)
stream3.Close
Class_155_Object.Method_0(str8, Nothing, 4)
Class_155_Object.Method_0(str7, Nothing, 4)
End If
assembly2 = Assembly.LoadFile(str8)
Catch obj2 As Object
End Try
End If
SyncLock Class_155_Object.Field_0
Class_155_Object.Field_0.Add(key, assembly2)
End SyncLock
Return assembly2
End If
End If
Return Nothing
End Function
|
Method_2:
Code: |
Friend Shared Sub Method_2()
Try
AddHandler AppDomain.CurrentDomain.AssemblyResolve, New ResolveEventHandler(AddressOf Class_155_Object.Method_3)
If (Assembly.GetExecutingAssembly.GlobalAssemblyCache AndAlso Class_155_Object.Method_1) Then
Dim strArray As String() = Class_136_Object.Method_0(&H232).Split(New Char() { ","c })
Dim index As Integer = 0
Do
Try
Dim s As String = strArray(index)
Dim str2 As String = Encoding.UTF8.GetString(Convert.FromBase64String(s))
Dim name As String = strArray((index + 1))
If ((name.Length > 0) AndAlso (name.Chars(0) = "["c)) Then
Dim num2 As Integer = name.IndexOf("]"c)
Dim str4 As String = name.Substring(1, (num2 - 1))
name = name.Substring((num2 + 1))
Dim flag As Boolean = (str4.IndexOf("z"c) >= 0)
If (str4.IndexOf("f"c) >= 0) Then
Dim manifestResourceStream As Stream = Assembly.GetExecutingAssembly.GetManifestResourceStream(name)
If (Not manifestResourceStream Is Nothing) Then
Dim length As Integer = CInt(manifestResourceStream.Length)
Dim buffer As Byte() = New Byte(length - 1) {}
manifestResourceStream.Read(buffer, 0, length)
If flag Then
buffer = Class_139_Object.Method_0(buffer)
End If
Try
Dim path As String = String.Format(Class_136_Object.Method_0(780), Path.GetTempPath, name)
Directory.CreateDirectory(path)
Dim type As New Class_156_ValueType(str2)
Dim str6 As String = (path & type.Field_0 & Class_136_Object.Method_0(&H319))
If Not File.Exists(str6) Then
Dim stream2 As FileStream = File.OpenWrite(str6)
stream2.Write(buffer, 0, buffer.Length)
stream2.Close
End If
Class_157_Object.Method_1(str6)
Try
File.Delete(str6)
Directory.Delete(path)
Catch obj1 As Object
End Try
Catch exception1 As Exception
End Try
End If
End If
End If
Catch exception2 As Exception
End Try
index = (index + 2)
Loop While (index < (strArray.Length - 1))
End If
Catch exception3 As Exception
End Try
End Sub
|
Method_3:
Code: |
Friend Shared Function Method_3(ByVal Object, ByVal args1 As ResolveEventArgs) As Assembly
Dim type As New Class_156_ValueType(args1.Name)
Dim s As String = type.Method_0(False)
Dim str2 As String = Convert.ToBase64String(Encoding.UTF8.GetBytes(s))
Dim strArray As String() = Class_136_Object.Method_0(&H232).Split(New Char() { ","c })
Dim key As String = String.Empty
Dim flag As Boolean = False
Dim flag2 As Boolean = False
Dim flag3 As Boolean = False
Dim index As Integer = 0
Do
If (strArray(index) = str2) Then
key = strArray((index + 1))
Exit Do
End If
index = (index + 2)
Loop While (index < (strArray.Length - 1))
If ((key.Length = 0) AndAlso (type.Field_3.Length = 0)) Then
str2 = Convert.ToBase64String(Encoding.UTF8.GetBytes(type.Field_0))
Dim num2 As Integer = 0
Do
If (strArray(num2) = str2) Then
key = strArray((num2 + 1))
Exit Do
End If
num2 = (num2 + 2)
Loop While (num2 < (strArray.Length - 1))
End If
If (key.Length > 0) Then
If (key.Chars(0) = "["c) Then
Dim num3 As Integer = key.IndexOf("]"c)
Dim str4 As String = key.Substring(1, (num3 - 1))
flag = (str4.IndexOf("z"c) >= 0)
flag2 = (str4.IndexOf("g"c) >= 0)
flag3 = (str4.IndexOf("t"c) >= 0)
key = key.Substring((num3 + 1))
End If
SyncLock Class_155_Object.Field_0
If Class_155_Object.Field_0.ContainsKey(key) Then
Return DirectCast(Class_155_Object.Field_0.Item(key), Assembly)
End If
End SyncLock
Dim manifestResourceStream As Stream = Assembly.GetExecutingAssembly.GetManifestResourceStream(key)
If (Not manifestResourceStream Is Nothing) Then
Dim length As Integer = CInt(manifestResourceStream.Length)
Dim buffer As Byte() = New Byte(length - 1) {}
manifestResourceStream.Read(buffer, 0, length)
If flag Then
buffer = Class_139_Object.Method_0(buffer)
End If
If flag2 Then
Try
Dim path As String = String.Format(Class_136_Object.Method_0(780), Path.GetTempPath, key)
Directory.CreateDirectory(path)
Dim str6 As String = (path & type.Field_0 & Class_136_Object.Method_0(&H319))
If Not File.Exists(str6) Then
Dim assembly As Assembly = Nothing
Dim stream2 As FileStream = File.OpenWrite(str6)
stream2.Write(buffer, 0, buffer.Length)
stream2.Close
If Class_157_Object.Method_1(str6) Then
[assembly] = Assembly.Load(type.Method_0(True))
End If
File.Delete(str6)
Directory.Delete(path)
If (Not [assembly] Is Nothing) Then
SyncLock Class_155_Object.Field_0
If Class_155_Object.Field_0.ContainsKey(key) Then
[assembly] = DirectCast(Class_155_Object.Field_0.Item(key), Assembly)
End If
Class_155_Object.Field_0.Add(key, [assembly])
End SyncLock
Return [assembly]
End If
End If
Catch obj1 As Object
End Try
End If
Dim assembly2 As Assembly = Nothing
If Not flag3 Then
Try
assembly2 = Assembly.Load(buffer)
Catch exception1 As FileLoadException
flag3 = True
Catch exception2 As BadImageFormatException
flag3 = True
End Try
End If
If flag3 Then
Try
Dim str7 As String = String.Format(Class_136_Object.Method_0(780), Path.GetTempPath, key)
Directory.CreateDirectory(str7)
Dim str8 As String = (str7 & type.Field_0 & Class_136_Object.Method_0(&H319))
If Not File.Exists(str8) Then
Dim stream3 As FileStream = File.OpenWrite(str8)
stream3.Write(buffer, 0, buffer.Length)
stream3.Close
Class_155_Object.Method_0(str8, Nothing, 4)
Class_155_Object.Method_0(str7, Nothing, 4)
End If
assembly2 = Assembly.LoadFile(str8)
Catch obj2 As Object
End Try
End If
SyncLock Class_155_Object.Field_0
Class_155_Object.Field_0.Add(key, assembly2)
End SyncLock
Return assembly2
End If
End If
Return Nothing
End Function
|
Method_1:
Code: |
Friend Shared Function Method_1() As Boolean
Try
Dim str As String = Process.GetCurrentProcess.MainModule.ModuleName.ToLower
If (str = Class_136_Object.Method_0(&H210)) Then
Return True
End If
If (str = Class_136_Object.Method_0(&H21D)) Then
Return True
End If
Label_0043:
Return False
Catch exception1 As Exception
goto Label_0043
End Try
End Function
|
The rest is for the GUI..
VM run: http://anubis.iseclab.org/?action=result&task_id=1007a8dc6240e26c4955070af8b2eb7d2&format=html
|
|