Click here to Skip to main content
15,889,876 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Public Sub Proc_Data

  Dim var_17C As String
 var_90 = CStr(Ucase(Left(Format(DateAdd("m", CSng((Format(Date, "MM") Mod 4)), Date), "MMMM"), 3)))
 For var_178 = 1 To CInt(Len(var_90)): MemVar_27041A0 = var_178 'Integer
   var_8C = CStr(CVar(vbNullString) & Chr(CLng((&H41 + (Asc(CStr(Mid(var_90, CLng(MemVar_27041A0), 1))) Mod &H1A)))))
  If (MemVar_27041A0 < 3) Then
     var_17C = CStr(Mid(CStr(Format(DateAdd("M", CSng((Format(Date, "YY") * Format(Date, "MM"))), Date), "YY")), CLng(MemVar_27041A0), 1))
     var_8C = var_8C & CStr(((((Asc(var_17C) * &H4D) * MemVar_27041A0) + 7) Mod &HA))
   Else
     var_8C = CStr(CVar(var_8C) & Chr(CLng((&H41 + ((Asc(CStr(Mid(var_90, CLng(MemVar_27041A0), 1))) + 7) Mod &H1A)))))
   End If
 Next var_178 'Integer
 var_88 = CStr(LCase(var_8C))
 Exit Sub
End Sub


What I have tried:

I tried to make a sql query but i could't succeed.
Posted
Updated 27-Aug-19 0:28am

Quote:
I tried to make a sql query but i could't succeed.

I'm not surprised. I can't make head or tail of that: it looks like de-obfuscated code and is deliberately hard to work out.

I'd go back to where you got that and see if they can explain exactly what that is supposed to do ... but as SQL? Since that doesn't appear to process any database data I can see, probably not ...
 
Share this answer
 
Quote:
I tried to make a sql query but i could't succeed.

I agree with OG, this code have been obfuscated, this mean that the code have been made deliberately difficult to read and understand for humans.
This means that analyzing the code is a real job, even for a little piece of code like that.
Understanding the code is a prerequisite for translating as things are not done the same way from a language to another.

Note that the values of variables defined outside of this code can mean a lot and make it impossible to understand because it is a missing information.
 
Share this answer
 
Seems, it's VB6 code instead of VB.NET...

We can't help you, because there's a lot of variables which were defined out of scope of Proc_Data procedure, for example: var_90, MemVar_27041A0, var_8C, var_88.

BTW: This piece of code is ugly... I'm serious. It's not a joke!
Note, that below line of code makes unnecessary calls of several VB functions:
VB
var_90 = CStr(Ucase(Left(Format(DateAdd("m", CSng((Format(Date, "MM") Mod 4)), Date), "MMMM"), 3)))

It can be simplify to this form:
VB
var_90 = UCase(Format(DateAdd("m", CSng((Format(Date, "MM") Mod 4)), Date), "MMM"))


So, CStr() and Left() function calls are redundant!
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900