6
0
mirror of https://github.com/avast/ioc synced 2024-07-03 00:33:49 +00:00
ioc-collection/VB-Research/binary_ConstPoolEntry2/Module1.bas

30 lines
761 B
QBasic
Raw Normal View History

2021-05-19 11:26:37 +00:00
Attribute VB_Name = "Module1"
Option Explicit
Declare Function callback Lib "dummy" (ByRef b As Byte) As Long
Declare Function progress Lib "dummy" (ByVal b As Byte) As Long
'Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDest As Any, pSrc As Any, ByVal ByteLen As Long)
Sub Main()
End Sub
Function test(ByVal xorKey As Long) As Long
Dim b() As Byte
Dim i As Long
progress xorKey
b() = "this is my string"
progress UBound(b)
For i = 0 To UBound(b)
b(i) = b(i) Xor xorKey
Next
callback b(0) 'we should receive decoded C string that we can modify
test = progress(b(0)) 'just to pass back the data to see if modified..
End Function