I'm struggling with finding the right login and password for this VB application..... I already tried : IDA,Olly,vb decompliler (code paste from there) and more... Maybe someone could help me find it or just give me an advice how to.(This is not a commercial app just a exercise I'm unable to complete :(.)
Code decompiled :
Private Sub Command1_Click() '402AA0
var_eax = arg_8.AddRef 'Ignore this
On Error Resume Next
var_eax = Form1.Text1 'Ignore this
var_A4 = Text1.Text
var_B0 = var_A4
var_90 = var_A4
var_eax = Form1.Text2 'Ignore this
var_A4 = Text2.Text
var_40 = var_A4
var_ret_1 = (Len(var_90) = "")
var_ret_2 = (Len(var_40) = "")
call Or(var_F8, var_ret_2, var_ret_1, arg_8, arg_8, 00000001h, edi, %ecx = %S_edx_S, arg_8)
If CBool(Or(var_F8, var_ret_2, var_ret_1, arg_8, arg_8, 00000001h, edi, var_E8 = %S_edx_S, arg_8)) Then
var_eax = Call Form1.clearoff
var_B8 = Len(var_90)
If (var_B8 <> 6) Then
var_eax = Call Form1.clearoff
var_50 = vbNullString
For var_A0 = "" To Len(var_90) - 1 Step 1
If var_180 Then
var_120 = vbNullString
If (var_50 = vbNullString) Then
var_E8 = Mid(var_90, CLng(Len(var_90) - var_A0), 1)
var_A4 = CStr(var_E8)
var_F0 = Asc(var_A4)
var_50 = Str(Asc(var_A4))
call undef 'Ignore this '__vbaFreeVarList(00000003h, 2, var_E8, 2)
GoTo loc_00403074
End If
var_E8 = Mid(var_90, CLng(Len(var_90) - var_A0), 1)
var_A4 = CStr(var_E8)
var_F0 = Asc(var_A4)
var_108 = Str(Asc(var_A4))
var_118 = var_50 & var_108
var_50 = var_118
call undef 'Ignore this '__vbaFreeVarList(00000004h, 2, var_E8, 2, var_108)
'Referenced from: 00402F7E
Next var_A0
GoTo loc_00402E6B
End If
var_A0 = Len(var_50)
var_30 = Str(116)
call undef 'Ignore this '__vbaFreeVar(var_180, var_190)
var_C8 = Str(114)
var_30 = var_30 + var_C8
call undef 'Ignore this '__vbaFreeVarList(00000002h, 2, var_C8)
var_C8 = Str(97)
var_30 = var_30 + var_C8
call undef 'Ignore this '__vbaFreeVarList(00000002h, 2, var_C8)
var_C8 = Str(117)
var_30 = var_30 + var_C8
call undef 'Ignore this '__vbaFreeVarList(00000002h, 2, var_C8)
var_C8 = Str(116)
var_30 = var_30 + var_C8
call undef 'Ignore this '__vbaFreeVarList(00000002h, 2, var_C8)
var_C8 = Str(83)
var_30 = var_30 + var_C8
call undef 'Ignore this '__vbaFreeVarList(00000002h, 2, var_C8)
If (var_50 <> var_30) Then
var_eax = Call Form1.clearoff
For var_A0 = 1 To Len(var_90) Step 1
If var_A0 Then
var_C8 = Mid(var_90, CLng(var_A0), 1)
call undef 'Ignore this '__vbaFreeVarList(00000002h, 2, var_C8)
var_70 = var_70 & Hex(Asc(CStr(var_C8)))
call undef 'Ignore this '__vbaFreeVar
Next var_A0
GoTo loc_0040338A
End If
For var_A0 = Len(var_70) To 1 Step -1
If var_1D0 Then
var_C8 = Mid(var_70, CLng(var_A0), 1)
ebx = IsNumeric(var_C8) + 1
call undef 'Ignore this '__vbaFreeVarList(00000002h, 2, var_C8, var_1A0, var_1B0)
If IsNumeric(var_C8) + 1 Then
var_A4 = CStr(Mid(var_70, CLng(var_A0), 1))
var_130 = Asc(var_A4)
var_60 = var_60 & Asc(var_A4)
GoTo loc_0040368C
End If
var_C8 = Mid(var_70, CLng(var_A0), 1)
var_60 = var_60 & var_C8
'Referenced from: 0040361A
call undef 'Ignore this '__vbaFreeVarList(00000002h, var_B8, var_C8, 00000002h, var_B8, var_C8)
Next var_A0
GoTo loc_004034FB
End If
If (var_40 = var_60) Then
var_120 = "Welcome "
var_130 = ", Remote access link to Mod-X terminal created"
call undef 'Ignore this '__vbaFreeVarList(00000005h, var_B8, var_C8, var_D8, var_E8, var_F8, var_1C0, var_1D0)
GoTo loc_004037D6
End If
var_eax = Call Form1.clearoff
'Referenced from: 004037AB
End
var_eax = Call Form1.clearoff
If Call Form1.clearoff < 0 Then
Call Form1.clearoff = CheckObj(arg_8, var_00402174, 1784)
Exit Sub
GoTo loc_0040386E
call undef 'Ignore this '__vbaFreeVarList(00000007, var_B8, var_C8, var_D8, var_E8, var_F8, var_108, var_118, var_004038D8)
Exit Sub
'Referenced from: 00403817
call undef 'Ignore this '__vbaFreeVarList(00000006, var_180, var_190, var_1A0, var_1B0, var_1C0, var_1D0)
call undef 'Ignore this '__vbaFreeVar
call undef 'Ignore this '__vbaFreeVar
call undef 'Ignore this '__vbaFreeVar
call undef 'Ignore this '__vbaFreeVar
call undef 'Ignore this '__vbaFreeVar
call undef 'Ignore this '__vbaFreeVar
call undef 'Ignore this '__vbaFreeVar
call undef 'Ignore this '__vbaFreeVar
End Sub
Public Sub clearoff() '403900
var_eax = arg_8.AddRef 'Ignore this
var_34 = "Failed"
var_24 = "Incorrect. Verification failed."
call undef 'Ignore this '__vbaFreeVarList(00000004, var_24, var_34, var_44, var_54, 00000008h, %ecx = %S_edx_S, 0000000Ah)
End
GoTo loc_004039EC
call undef 'Ignore this '__vbaFreeVarList(00000004, var_24, var_34, var_44, var_54, var_004039ED)
Exit Sub
'Referenced from: 004039CE
End Sub
So, without the program to test it, it appears...
Login: Stuart
Password: 472716574735
The first part merely reverses the input for the login text box and compares it to "trautS" (Ascii chars: 116,114,97,117,116,83), and if it doesn't match, then it clears the form. So the login must be Stuart.
Password: var_70 is a hex string of the login
83,116,117,97,114,116 => 537475617274
Then it loops over var_70 in reverse, looking for non-numeric values, which it then grabs a string representation of the number and adds it to the total, otherwise it just puts the number on the final (var_60).
The password appears to just be a hex string of the login name.
Edit: Found a flaw in my logic.