PDA

View Full Version : How to use ASM in .Net


Drigo
June 26th, 2007, 10:56
Hey

I was trying this tut from cracks:
http://woodmann.com/crackz/Tutorials/Goatass1.htm

To call the "Make Key Routine" is in ASM :
push <length of string>
push <pointer to buffer>
push <pointer to string>
call EncryptInfoCode3

I dont understand, how is the syntax in VB.net

blurcode
June 26th, 2007, 15:17
If EncryptInfoCode3 is an export then it should be something like:

Code:

<DllImport("Atilib.dll", CallingConvention:="CallingConvention.Cdecl)"> _
Private Shared Sub EncryptInfoCode3(ByRef Message As String, ByRef Buffer As String, Len As Integer)
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Message As String = "some encrypted info"
Dim Buffer As String

EncryptInfoCode3(Message, Buffer, 19)

MessageBox.Show(Buffer)
End Sub

LLXX
June 26th, 2007, 22:33
Ditch the .NET, and especially the VB. You're a reverser now, you should be writing code in Asm and C, and if you can't, then it's time to start learning.

I don't even think .NET uses standard null-terminated strings (the last time I looked at .NET I think it used string objects...) nor the usual byte-per-character encoding.