You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
2.6 KiB
C++
85 lines
2.6 KiB
C++
2 years ago
|
#include "pch.h"
|
||
|
#include "matrix.h"
|
||
|
|
||
|
_mxINT16 Init_MatrixAPI() {
|
||
|
#pragma EXPORT
|
||
|
return 0;
|
||
|
}
|
||
|
_mxINT16 Release_MatrixAPI() {
|
||
|
#pragma EXPORT
|
||
|
return 0;
|
||
|
}
|
||
|
_mxINT16 Dongle_Count(_mxINT16 dongleMemSize) {
|
||
|
#pragma EXPORT
|
||
|
return 1;
|
||
|
}
|
||
|
_mxINT16 Dongle_MemSize(_mxINT16 dongleIndex, _mxINT16 dongleMemSize) {
|
||
|
#pragma EXPORT
|
||
|
return 79 * 4; // 316 Bytes
|
||
|
}
|
||
|
_mxINT16 Dongle_ReadData(_mxINT32 dongleFuckFuck, UINT_PTR targetMemoryPtr, _mxINT16 readLength, _mxINT16 dongleIndex, _mxINT16 dongleMemSize) {
|
||
|
#pragma EXPORT
|
||
|
|
||
|
_mxINT32 dongleBytes[] = {
|
||
|
/* 0x00 */ 0x00000000,
|
||
|
/* 0x01 */ 0x00000000,
|
||
|
/* 0x02 */ 0x00B727B1,
|
||
|
/* 0x03 */ 0x4D4D4144, // has to be this exact value
|
||
|
|
||
|
/* 0x04 */ 0x00000000,
|
||
|
|
||
|
/* 0x05 */ 0x00000000+8, //ltype 1
|
||
|
/* 0x06 */ 0x00000002+8, //ltype 2
|
||
|
|
||
|
/* 0x07 */ 0x00000000,0x00000000,0x00000000,0x00000000,
|
||
|
/* 0x0B */ 0x00000000,0x00000000,0x00000000,
|
||
|
/* 0x0D */
|
||
|
/* 0x0D */ 0x00B727B1, // something
|
||
|
/* 0x0E */ 0x00000191, // 401 license validation type 1
|
||
|
0x00000000,
|
||
|
0x01404895, // expiry date 20990101
|
||
|
0x00000004, // min date
|
||
|
0x00000000,
|
||
|
|
||
|
0x00000000,0x00000000,0x00000000,0x00000000,
|
||
|
0x00000000,0x00000000,0x00000000,0x00000000,
|
||
|
0x00000000,0x00000000,0x00000000,0x00000000,
|
||
|
0x00000000,0x00000000,0x00000000,0x00000000,
|
||
|
0x00000000,0x00000000,0x00000000,0x00000000,
|
||
|
0x00000000,0x00000000,0x00000000,0x00000000,
|
||
|
0x00000000,0x00000000,0x00000000,0x00000000,
|
||
|
0x00000000,0x00000000,0x00000000,0x00000000,
|
||
|
0x00000000,0x00000000,0x00000000,0x00000000,
|
||
|
0x00000000,0x00000000,0x00000000,0x00000000,
|
||
|
0x00000000,0x00000000,0x00000000,0x00000000,
|
||
|
0x00000000,0x00000000,0x00000000,0x00000000,
|
||
|
0x00000000,0x00000000,0x00000000,0x00000000,
|
||
|
0x00000000,0x00000000,0x00000000,0x00000000,
|
||
|
0x00000000,0x00000000,0x00000000
|
||
|
};
|
||
|
|
||
|
dongleBytes[15] = 401; // license validation type 1
|
||
|
dongleBytes[15 + 4] = 0; // license validation type 1
|
||
|
dongleBytes[15 + 16 + 0] = 402; // license validation type 2
|
||
|
dongleBytes[15 + 16 + 1] = 0; // 20690325; // if less than o2, invalid
|
||
|
dongleBytes[15 + 16 + 2] = 20121102; // 20121102 if less than this, invalid
|
||
|
dongleBytes[15 + 16 + 3] = 7; // accesslvl?
|
||
|
|
||
|
|
||
|
int* lol = (int*)targetMemoryPtr;
|
||
|
for (int i = 0; i < readLength; i++) {
|
||
|
lol[i] = dongleBytes[i];
|
||
|
}
|
||
|
// why u no work?
|
||
|
//memcpy(&targetMemoryPtr, &staticFuck2, sizeof(int) * readLength);
|
||
|
return 0;
|
||
|
}
|
||
|
int Dongle_ReadSerNr(int dongleFuckFuck, _mxINT16 dongleIndex, _mxINT16 dongleMemSize) {
|
||
|
#pragma EXPORT
|
||
|
return 1296908612;
|
||
|
}
|
||
|
int Dongle_Model(_mxINT16 dongleIndex, _mxINT16 dongleMemSize) {
|
||
|
#pragma EXPORT
|
||
|
return 420;
|
||
|
}
|