$IFNDEF CALL_ASM_PROC_X
$DEFINE CALL_ASM_PROC_X
DECLARE FUNCTION CallAsmProc LIB "user32" ALIAS "CallWindowProcA" _
(Proc AS LONG, A1 AS LONG, A2 AS LONG, A3 AS LONG, A4 AS LONG) AS LONG
$ENDIF
DEFBYTE RC4BinStrArray (0 TO 310) = _
{ _
&HC8, &H00, &H00, &H00, &H81, &HEC, &H2C, &H01, &H00, &H00, _
&H89, &HE8, &H2D, &H2C, &H01, &H00, &H00, &H89, &H45, &HD8, _
&H53, &H51, &H52, &H56, &H57, &H8B, &H75, &H08, &H81, &HEE, _
&H04, &H00, &H00, &H00, &H8B, &H06, &H89, &H45, &HDC, &H8B, _
&H75, &H0C, &H81, &HEE, &H04, &H00, &H00, &H00, &H8B, &H06, _
&H89, &H45, &HE0, &H81, &H7D, &H0C, &H00, &H00, &H00, &H00, _
&H75, &H0A, &HB8, &H01, &H00, &H00, &H00, &HE9, &HE6, &H00, _
&H00, &H00, &H81, &H7D, &HE0, &H00, &H00, &H00, &H00, &H75, _
&H0A, &HB8, &H02, &H00, &H00, &H00, &HE9, &HD3, &H00, &H00, _
&H00, &H81, &H7D, &H08, &H00, &H00, &H00, &H00, &H75, &H0A, _
&HB8, &H03, &H00, &H00, &H00, &HE9, &HC0, &H00, &H00, &H00, _
&H81, &H7D, &HDC, &H00, &H00, &H00, &H00, &H75, &H0A, &HB8, _
&H04, &H00, &H00, &H00, &HE9, &HAD, &H00, &H00, &H00, &HE8, _
&H6A, &H00, &H00, &H00, &HB8, &H00, &H00, &H00, &H00, &HBB, _
&H00, &H00, &H00, &H00, &H8B, &H75, &HD8, &H8B, &H7D, &H08, _
&HB9, &H00, &H00, &H00, &H00, &HBA, &H00, &H00, &H00, &H00, _
&HFE, &HC3, &H02, &H04, &H33, &H8A, &H14, &H33, &H86, &H14, _
&H30, &H86, &H14, &H33, &H8A, &H14, &H33, &H02, &H14, &H30, _
&H50, &HB8, &H00, &H00, &H00, &H00, &H25, &HFF, &H00, &H00, _
&H00, &H8A, &H04, &H32, &H30, &H04, &H39, &H58, &H41, &H3B, _
&H4D, &HDC, &H75, &HD4, &HB8, &H00, &H00, &H00, &H00, &HE9, _
&H58, &H00, &H00, &H00, &HB8, &H00, &H00, &H00, &H00, &H8B, _
&H7D, &HD8, &H88, &H07, &H47, &HFE, &HC0, &H75, &HF9, &HB8, _
&H00, &H00, &H00, &H00, &HB8, &H00, &H00, &H00, &H00, &HC3, _
&HE8, &HE1, &HFF, &HFF, &HFF, &HB8, &H00, &H00, &H00, &H00, _
&HBB, &H00, &H00, &H00, &H00, &HB9, &H00, &H00, &H00, &H00, _
&H8B, &H75, &HD8, &H8B, &H7D, &H0C, &HBA, &H00, &H00, &H00, _
&H00, &H02, &H04, &H1E, &H39, &H4D, &HE0, &H75, &H05, &HB9, _
&H00, &H00, &H00, &H00, &H02, &H04, &H0F, &H8A, &H14, &H30, _
&H86, &H14, &H33, &H86, &H14, &H30, &H41, &HFE, &HC3, &H75, _
&HE2, &HC3, &H5F, &H5E, &H5A, &H59, &H5B, &HC9, &HC2, &H10, _
&H00 _
}
DEFINT ptrRC4BinStr
ptrRC4BinStr = VARPTR (RC4BinStrArray(0))
FUNCTION RC4BinStr (sDatas AS STRING, sKEY AS STRING) AS LONG
DEFSTR ssDatas = sDatas
DEFSTR ssKEY = sKEY
Result = CallAsmProc (ptrRC4BinStr, VARPTR(ssDatas), VARPTR(ssKEY), 0, 0)
END FUNCTION
DEFBYTE RC4InitArray (0 TO 187) = _
{ _
&HC8, &H00, &H00, &H00, &H81, &HEC, &H28, &H00, &H00, &H00, _
&H53, &H51, &H52, &H56, &H57, &H8B, &H75, &H0C, &H81, &HEE, _
&H04, &H00, &H00, &H00, &H8B, &H06, &H89, &H45, &HD8, &H81, _
&H7D, &H08, &H00, &H00, &H00, &H00, &H75, &H0A, &HB8, &H05, _
&H00, &H00, &H00, &HE9, &H83, &H00, &H00, &H00, &H81, &H7D, _
&H0C, &H00, &H00, &H00, &H00, &H75, &H0A, &HB8, &H01, &H00, _
&H00, &H00, &HE9, &H70, &H00, &H00, &H00, &H81, &H7D, &HD8, _
&H00, &H00, &H00, &H00, &H75, &H0A, &HB8, &H02, &H00, &H00, _
&H00, &HE9, &H5D, &H00, &H00, &H00, &HB8, &H00, &H00, &H00, _
&H00, &H8B, &H7D, &H08, &H88, &H07, &H47, &HFE, &HC0, &H75, _
&HF9, &HB8, &H00, &H00, &H00, &H00, &HBB, &H00, &H00, &H00, _
&H00, &HB9, &H00, &H00, &H00, &H00, &H8B, &H75, &H08, &H8B, _
&H7D, &H0C, &HBA, &H00, &H00, &H00, &H00, &H02, &H04, &H1E, _
&H39, &H4D, &HD8, &H75, &H05, &HB9, &H00, &H00, &H00, &H00, _
&H02, &H04, &H0F, &H8A, &H14, &H30, &H86, &H14, &H33, &H86, _
&H14, &H30, &H41, &HFE, &HC3, &H75, &HE2, &H8B, &H7D, &H08, _
&HC6, &H87, &H00, &H01, &H00, &H00, &H00, &HC6, &H87, &H01, _
&H01, &H00, &H00, &H00, &HB8, &H00, &H00, &H00, &H00, &H5F, _
&H5E, &H5A, &H59, &H5B, &HC9, &HC2, &H10, &H00 _
}
DEFINT ptrRC4Init
ptrRC4Init = VARPTR (RC4InitArray(0))
FUNCTION RC4Init (sTable AS STRING, sKEY AS STRING) AS LONG
DEFSTR ssTable = sTable
DEFSTR ssKEY = sKEY
Result = CallAsmProc (ptrRC4Init, VARPTR(ssTable), VARPTR(ssKEY), 0, 0)
END FUNCTION
DEFBYTE RC4PipeArray (0 TO 195) = _
{ _
&HC8, &H00, &H00, &H00, &H81, &HEC, &H28, &H00, &H00, &H00, _
&H53, &H51, &H52, &H56, &H57, &H8B, &H75, &H0C, &H81, &HEE, _
&H04, &H00, &H00, &H00, &H8B, &H06, &H89, &H45, &HD8, &H81, _
&H7D, &H0C, &H00, &H00, &H00, &H00, &H75, &H0A, &HB8, &H03, _
&H00, &H00, &H00, &HE9, &H8B, &H00, &H00, &H00, &H81, &H7D, _
&HD8, &H00, &H00, &H00, &H00, &H75, &H0A, &HB8, &H04, &H00, _
&H00, &H00, &HE9, &H78, &H00, &H00, &H00, &H81, &H7D, &H08, _
&H00, &H00, &H00, &H00, &H75, &H0A, &HB8, &H05, &H00, &H00, _
&H00, &HE9, &H65, &H00, &H00, &H00, &H8B, &H75, &H08, &H8A, _
&H9E, &H00, &H01, &H00, &H00, &H81, &HE3, &HFF, &H00, &H00, _
&H00, &H8A, &H86, &H01, &H01, &H00, &H00, &H25, &HFF, &H00, _
&H00, &H00, &H8B, &H7D, &H0C, &HB9, &H00, &H00, &H00, &H00, _
&HBA, &H00, &H00, &H00, &H00, &HFE, &HC3, &H02, &H04, &H33, _
&H8A, &H14, &H33, &H86, &H14, &H30, &H86, &H14, &H33, &H8A, _
&H14, &H33, &H02, &H14, &H30, &H50, &HB8, &H00, &H00, &H00, _
&H00, &H81, &HE2, &HFF, &H00, &H00, &H00, &H8A, &H04, &H32, _
&H30, &H04, &H39, &H58, &H41, &H3B, &H4D, &HD8, &H75, &HD3, _
&H88, &H9E, &H00, &H01, &H00, &H00, &H88, &H86, &H01, &H01, _
&H00, &H00, &HB8, &H00, &H00, &H00, &H00, &H5F, &H5E, &H5A, _
&H59, &H5B, &HC9, &HC2, &H10, &H00 _
}
DEFINT ptrRC4Pipe
ptrRC4Pipe = VARPTR (RC4PipeArray(0))
FUNCTION RC4Pipe (sTable AS STRING, sDatas AS STRING) AS LONG
DEFSTR ssTable = sTable
DEFSTR ssDatas = sDatas
Result = CallAsmProc (ptrRC4Pipe, VARPTR(ssTable), VARPTR(ssDatas), 0, 0)
END FUNCTION
|
|