mXOR.bas
XOR obfuscation logic
VBScript XORs a character-code sliceSource references XOR syntax
SHA-2564e417802ce0b0a9be91fedf79b702c37fc36779c937965cb9ef5d995d5770c4a
MaleculeO₂(AsC)H(Db)
Evidence
1Attribute VB_Name = "mXOR"
2Public Function XORDecryption(CodeKey As String, DataIn As String) As String
3
4 Dim lonDataPtr As Long
5 Dim strDataOut As String
6 Dim intXOrValue1 As Integer
7 Dim intXOrValue2 As Integer
8
9
10 For lonDataPtr = 1 To (Len(DataIn) / 2)
11 'The first value to be XOr-ed comes from the data to be encrypted
12 intXOrValue1 = Val("&H" & (Mid$(DataIn, (2 * lonDataPtr) - 1, 2)))
13 'Th …
13:42… code key
14 intXOrValue2 = Asc(Mid$(CodeKey, ((lonDataPtr Mod Len(CodeKey)) + 1), 1))
15
16 strDataOut = strDataOut + Chr(intXOrValue1 Xor intXOrValue2)
17 Next lonDataPtr
18 XORDecryption = strDataOut
19End Function
20
21
22Public Function XOREncryption(CodeKey As String, DataIn As String) As String
23
24 Dim lonDataPtr As Long
25 Dim strDataOut As String
26 Dim temp As Integer
27 Dim tempstring As String
28 Dim intXOrValue1 As Integer
29 Dim intXOrValue2 As Integer
30
31
32 For lo …