SHARE
TWEET

Untitled

a guest Nov 23rd, 2019 140 in 122 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ' Code decrypter found in the "DHL Parcel" virus
  2. ' Pasted here without the payload data
  3.  
  4. Function translateCellToCode(ByVal valueFromCell As String) As String
  5.  
  6.     Dim iteratorOne, iteratorTwo, annoyingArbitraryValue, partLength As Integer
  7.     iteratorTwo = 0
  8.     iteratorOne = 0
  9.     annoyingArbitraryValue = IIf(Right(valueFromCell, 1) Mod 2 = 0, 5, 4)
  10.     partLength = Len(valueFromCell) / annoyingArbitraryValue - 1
  11.    
  12.     Dim tempArray() As Integer
  13.     Dim codeInAsciiValues() As Long
  14.     ReDim tempArray(partLength)
  15.     ReDim codeInAsciiValues(partLength)
  16.    
  17.     valueFromCell = Left(valueFromCell, Len(valueFromCell) - IIf(Right(valueFromCell, 1) Mod 2 = 0, 1, 1))
  18.    
  19.     For iteratorOne = 0 To partLength
  20.         tempArray(iteratorOne) = iteratorOne - (partLength + 1)
  21.     Next iteratorOne
  22.    
  23.     For iteratorTwo = 0 To partLength
  24.         For iteratorOne = 0 To partLength
  25.             If CInt(Mid(valueFromCell, iteratorOne * annoyingArbitraryValue + 1, annoyingArbitraryValue - 3)) = iteratorTwo Then
  26.                 codeInAsciiValues(iteratorTwo) = (Mid(valueFromCell, (iteratorOne + 1) * annoyingArbitraryValue - 2, 3) + tempArray(iteratorTwo))
  27.             Exit For
  28.             End If
  29.         Next iteratorOne
  30.     Next iteratorTwo
  31.    
  32.     translateCellToCode = ""
  33.     For iteratorTwo = 0 To partLength
  34.         translateCellToCode = translateCellToCode & Chr(codeInAsciiValues(iteratorTwo))
  35.     Next iteratorTwo
  36. End Function
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top