first commit

master
cheetah 2 years ago committed by Simon Friedrich
commit e3e83f15f8

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

@ -0,0 +1,149 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
namespace TestFuckFramework
{
class MatrixAPI
{
private static bool Is32Bit()
{
return IntPtr.Size == 4;
}
// Token: 0x06001395 RID: 5013 RVA: 0x0000EC0A File Offset: 0x0000CE0A
public static short Init_MatrixAPI()
{
if (MatrixAPI.Is32Bit())
{
return MatrixAPI.Matrix32.Init_MatrixAPI();
}
return MatrixAPI.Matrix64.Init_MatrixAPI();
}
// Token: 0x06001396 RID: 5014 RVA: 0x0000EC1E File Offset: 0x0000CE1E
public static short Release_MatrixAPI()
{
if (MatrixAPI.Is32Bit())
{
return MatrixAPI.Matrix32.Release_MatrixAPI();
}
return MatrixAPI.Matrix64.Release_MatrixAPI();
}
// Token: 0x06001397 RID: 5015 RVA: 0x0000EC32 File Offset: 0x0000CE32
public static int Dongle_Model(short A_0, short A_1)
{
if (MatrixAPI.Is32Bit())
{
return MatrixAPI.Matrix32.Dongle_Model(A_0, A_1);
}
return MatrixAPI.Matrix64.Dongle_Model(A_0, A_1);
}
// Token: 0x06001398 RID: 5016 RVA: 0x0000EC4A File Offset: 0x0000CE4A
public static int Dongle_ReadSerNr(int A_0, short A_1, short A_2)
{
if (MatrixAPI.Is32Bit())
{
return MatrixAPI.Matrix32.Dongle_ReadSerNr(A_0, A_1, A_2);
}
return MatrixAPI.Matrix64.Dongle_ReadSerNr(A_0, A_1, A_2);
}
// Token: 0x06001399 RID: 5017 RVA: 0x0000EC64 File Offset: 0x0000CE64
public static short Dongle_MemSize(short A_0, short A_1)
{
if (MatrixAPI.Is32Bit())
{
return MatrixAPI.Matrix32.Dongle_MemSize(A_0, A_1);
}
return MatrixAPI.Matrix64.Dongle_MemSize(A_0, A_1);
}
// Token: 0x0600139A RID: 5018 RVA: 0x0000EC7C File Offset: 0x0000CE7C
public static short Dongle_Count(short A_0)
{
return 1;
}
// Token: 0x0600139B RID: 5019 RVA: 0x0000EC85 File Offset: 0x0000CE85
public static short Dongle_ReadData(int A_0, IntPtr A_1, short A_2, short A_3, short A_4)
{
if (MatrixAPI.Is32Bit())
{
return MatrixAPI.Matrix32.Dongle_ReadData(A_0, A_1, A_2, A_3, A_4);
}
return MatrixAPI.Matrix64.Dongle_ReadData(A_0, A_1, A_2, A_3, A_4);
}
// Token: 0x02000155 RID: 341
private sealed class Matrix32
{
// Token: 0x0600139E RID: 5022
[DllImport("matrix32.dll", CallingConvention = CallingConvention.StdCall)]
public static extern short Init_MatrixAPI();
// Token: 0x0600139F RID: 5023
[DllImport("matrix32.dll", CallingConvention = CallingConvention.StdCall)]
public static extern short Release_MatrixAPI();
// Token: 0x060013A0 RID: 5024
[DllImport("matrix32.dll", CallingConvention = CallingConvention.StdCall)]
public static extern int Dongle_Model(short a, short b);
// Token: 0x060013A1 RID: 5025
[DllImport("matrix32.dll", CallingConvention = CallingConvention.StdCall)]
public static extern short Dongle_MemSize(short a, short b);
// Token: 0x060013A2 RID: 5026
[DllImport("matrix32.dll", CallingConvention = CallingConvention.StdCall)]
public static extern short Dongle_Count(short a);
// Token: 0x060013A3 RID: 5027
[DllImport("matrix32.dll", CallingConvention = CallingConvention.StdCall)]
public static extern short Dongle_ReadData(int a, IntPtr b, short c, short d, short e);
// Token: 0x060013A4 RID: 5028
[DllImport("matrix32.dll", CallingConvention = CallingConvention.StdCall)]
public static extern int Dongle_ReadSerNr(int a, short b, short c);
}
// Token: 0x02000156 RID: 342
private sealed class Matrix64
{
// Token: 0x060013A6 RID: 5030
[DllImport("matrix64.dll", CallingConvention = CallingConvention.StdCall)]
public static extern short Init_MatrixAPI();
// Token: 0x060013A7 RID: 5031
[DllImport("matrix64.dll", CallingConvention = CallingConvention.StdCall)]
public static extern short Release_MatrixAPI();
// Token: 0x060013A8 RID: 5032
[DllImport("matrix64.dll", CallingConvention = CallingConvention.StdCall)]
public static extern int Dongle_Model(short a, short b);
// Token: 0x060013A9 RID: 5033
[DllImport("matrix64.dll", CallingConvention = CallingConvention.StdCall)]
public static extern short Dongle_MemSize(short a, short b);
// Token: 0x060013AA RID: 5034
[DllImport("matrix64.dll", CallingConvention = CallingConvention.StdCall)]
public static extern short Dongle_Count(short a);
// Token: 0x060013AB RID: 5035
[DllImport("matrix64.dll", CallingConvention = CallingConvention.StdCall)]
public static extern short Dongle_ReadData(int a, IntPtr b, short c, short d, short e);
// Token: 0x060013AC RID: 5036
[DllImport("matrix64.dll", CallingConvention = CallingConvention.StdCall)]
public static extern int Dongle_ReadSerNr(int a, short b, short c);
}
}
}

@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace TestFuckFramework
{
class Program
{
static void Main(string[] args)
{
short initRes = MatrixAPI.Init_MatrixAPI();
Console.WriteLine("Init_MatrixAPI result = {0}", initRes);
short dongleMemSize = 85;
short dongleCount = MatrixAPI.Dongle_Count(dongleMemSize);
Console.WriteLine("Dongle_Count result = {0}", dongleCount);
short dongleIndex = 0;
int dongleMemSize2 = (int)MatrixAPI.Dongle_MemSize(dongleIndex, dongleMemSize);
Console.WriteLine("Dongle_MemSize result = {0}", dongleMemSize2);
int[] dongleBytes = new int[dongleMemSize2 / 4];
IntPtr intPtr = Marshal.AllocHGlobal(4 * dongleBytes.Length);
try
{
Console.WriteLine("memory dump before");
for (int i = 0; i < dongleBytes.Length; i++)
{
if (i > 0 && i % 8 == 0) Console.WriteLine();
Console.Write("{0:X8} ", dongleBytes[i]);
}
Console.WriteLine();
Console.WriteLine();
initRes = MatrixAPI.Dongle_ReadData(3838057, intPtr, (short)dongleBytes.Length, dongleIndex, dongleMemSize);
Marshal.Copy(intPtr, dongleBytes, 0, dongleBytes.Length);
Console.WriteLine("memory dump after");
for (int i = 0; i < dongleBytes.Length; i++)
{
if (i > 0 && i % 8 == 0) Console.WriteLine();
Console.Write("{0:X8} ", dongleBytes[i]);
}
Console.WriteLine();
Console.WriteLine();
}
finally
{
Marshal.FreeHGlobal(intPtr);
}
Console.WriteLine("memory dump after GC free");
for (int i = 0; i < dongleBytes.Length; i++)
{
if (i > 0 && i % 8 == 0) Console.WriteLine();
Console.Write("{0:X8} ", dongleBytes[i]);
}
Console.WriteLine();
Console.WriteLine();
int dongleModel = MatrixAPI.Dongle_Model(dongleIndex, dongleMemSize);
Console.WriteLine("Dongle_Model result = {0}", dongleModel);
int dongleSerial = MatrixAPI.Dongle_ReadSerNr(3838057, dongleIndex, dongleMemSize);
Console.WriteLine("Dongle_ReadSerNr result = {0}", dongleSerial);
Console.ReadKey();
}
}
}

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("TestFuckFramework")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TestFuckFramework")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("6aac66eb-119a-429f-819e-bfa561a9e2b2")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6AAC66EB-119A-429F-819E-BFA561A9E2B2}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>TestFuckFramework</RootNamespace>
<AssemblyName>TestFuckFramework</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject>TestFuckFramework.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="MatrixAPI.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]

@ -0,0 +1,7 @@
C:\Users\Simon Friedrich\source\repos\matrixFuck\TestFuckFramework\bin\Release\TestFuckFramework.exe.config
C:\Users\Simon Friedrich\source\repos\matrixFuck\TestFuckFramework\bin\Release\TestFuckFramework.exe
C:\Users\Simon Friedrich\source\repos\matrixFuck\TestFuckFramework\bin\Release\TestFuckFramework.pdb
C:\Users\Simon Friedrich\source\repos\matrixFuck\TestFuckFramework\obj\Release\TestFuckFramework.csproj.AssemblyReference.cache
C:\Users\Simon Friedrich\source\repos\matrixFuck\TestFuckFramework\obj\Release\TestFuckFramework.csproj.CoreCompileInputs.cache
C:\Users\Simon Friedrich\source\repos\matrixFuck\TestFuckFramework\obj\Release\TestFuckFramework.exe
C:\Users\Simon Friedrich\source\repos\matrixFuck\TestFuckFramework\obj\Release\TestFuckFramework.pdb

@ -0,0 +1,49 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31911.196
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "matrixFuck", "matrixFuck\matrixFuck.vcxproj", "{551ED528-EAB5-4CDF-ABCA-074100799A8D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestFuckFramework", "TestFuckFramework\TestFuckFramework.csproj", "{6AAC66EB-119A-429F-819E-BFA561A9E2B2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{551ED528-EAB5-4CDF-ABCA-074100799A8D}.Debug|Any CPU.ActiveCfg = Debug|Win32
{551ED528-EAB5-4CDF-ABCA-074100799A8D}.Debug|x64.ActiveCfg = Debug|x64
{551ED528-EAB5-4CDF-ABCA-074100799A8D}.Debug|x64.Build.0 = Debug|x64
{551ED528-EAB5-4CDF-ABCA-074100799A8D}.Debug|x86.ActiveCfg = Debug|Win32
{551ED528-EAB5-4CDF-ABCA-074100799A8D}.Debug|x86.Build.0 = Debug|Win32
{551ED528-EAB5-4CDF-ABCA-074100799A8D}.Release|Any CPU.ActiveCfg = Release|Win32
{551ED528-EAB5-4CDF-ABCA-074100799A8D}.Release|x64.ActiveCfg = Release|x64
{551ED528-EAB5-4CDF-ABCA-074100799A8D}.Release|x64.Build.0 = Release|x64
{551ED528-EAB5-4CDF-ABCA-074100799A8D}.Release|x86.ActiveCfg = Release|Win32
{551ED528-EAB5-4CDF-ABCA-074100799A8D}.Release|x86.Build.0 = Release|Win32
{6AAC66EB-119A-429F-819E-BFA561A9E2B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6AAC66EB-119A-429F-819E-BFA561A9E2B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6AAC66EB-119A-429F-819E-BFA561A9E2B2}.Debug|x64.ActiveCfg = Debug|Any CPU
{6AAC66EB-119A-429F-819E-BFA561A9E2B2}.Debug|x64.Build.0 = Debug|Any CPU
{6AAC66EB-119A-429F-819E-BFA561A9E2B2}.Debug|x86.ActiveCfg = Debug|Any CPU
{6AAC66EB-119A-429F-819E-BFA561A9E2B2}.Debug|x86.Build.0 = Debug|Any CPU
{6AAC66EB-119A-429F-819E-BFA561A9E2B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6AAC66EB-119A-429F-819E-BFA561A9E2B2}.Release|Any CPU.Build.0 = Release|Any CPU
{6AAC66EB-119A-429F-819E-BFA561A9E2B2}.Release|x64.ActiveCfg = Release|Any CPU
{6AAC66EB-119A-429F-819E-BFA561A9E2B2}.Release|x64.Build.0 = Release|Any CPU
{6AAC66EB-119A-429F-819E-BFA561A9E2B2}.Release|x86.ActiveCfg = Release|Any CPU
{6AAC66EB-119A-429F-819E-BFA561A9E2B2}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {10701223-AA34-4F25-96CF-C62EE7D0DF5F}
EndGlobalSection
EndGlobal

Binary file not shown.

@ -0,0 +1,5 @@
 pch.cpp
dllmain.cpp
matrix.cpp
C:\Users\Simon Friedrich\source\repos\matrixFuck\matrixFuck\matrix.h(16,31): error C2061: Syntaxfehler: Bezeichner "IntPtr"
Code wird generiert...

Binary file not shown.

@ -0,0 +1,2 @@
PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:VCServicingVersionATL=14.29.30136:VCServicingVersionCrtHeaders=14.29.30136:TargetPlatformVersion=10.0.19041.0:
Debug|Win32|C:\Users\Simon Friedrich\source\repos\matrixFuck\|

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,18 @@
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\release\matrixfuck.pch
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\release\vc142.pdb
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\release\pch.obj
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\release\dllmain.obj
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\release\matrix.obj
c:\users\simon friedrich\source\repos\matrixfuck\release\matrixfuck.dll
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\release\matrixfuck.ipdb
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\release\matrixfuck.iobj
c:\users\simon friedrich\source\repos\matrixfuck\release\matrixfuck.pdb
c:\users\simon friedrich\source\repos\matrixfuck\release\matrixfuck.lib
c:\users\simon friedrich\source\repos\matrixfuck\release\matrixfuck.exp
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\release\matrixfuck.tlog\cl.command.1.tlog
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\release\matrixfuck.tlog\cl.read.1.tlog
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\release\matrixfuck.tlog\cl.write.1.tlog
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\release\matrixfuck.tlog\link.command.1.tlog
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\release\matrixfuck.tlog\link.read.1.tlog
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\release\matrixfuck.tlog\link.write.1.tlog
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\release\matrixfuck.tlog\matrixfuck.write.1u.tlog

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>C:\Users\Simon Friedrich\source\repos\matrixFuck\Release\matrixFuck.dll</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
<SatelliteDlls />
<NonRecipeFileRefs />
</Project>

@ -0,0 +1,8 @@
 matrix.cpp
Bibliothek "C:\Users\Simon Friedrich\source\repos\matrixFuck\Release\matrixFuck.lib" und Objekt "C:\Users\Simon Friedrich\source\repos\matrixFuck\Release\matrixFuck.exp" werden erstellt.
Code wird generiert.
7 of 8 functions (87.5%) were compiled, the rest were copied from previous compilation.
7 functions were new in current compilation
0 functions had inline decision re-evaluated but remain unchanged
Codegenerierung ist abgeschlossen.
matrixFuck.vcxproj -> C:\Users\Simon Friedrich\source\repos\matrixFuck\Release\matrixFuck.dll

Binary file not shown.

@ -0,0 +1,2 @@
PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:VCServicingVersionATL=14.29.30136:VCServicingVersionCrtHeaders=14.29.30136:TargetPlatformVersion=10.0.19041.0:
Release|Win32|C:\Users\Simon Friedrich\source\repos\matrixFuck\|

Binary file not shown.

Binary file not shown.

@ -0,0 +1,19 @@
// dllmain.cpp : Definiert den Einstiegspunkt für die DLL-Anwendung.
#include "pch.h"
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}

@ -0,0 +1,5 @@
#pragma once
#define WIN32_LEAN_AND_MEAN // Selten verwendete Komponenten aus Windows-Headern ausschließen
// Windows-Headerdateien
#include <windows.h>

@ -0,0 +1,84 @@
#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;
}

@ -0,0 +1,31 @@
#define EXPORT_SHIT extern "C" __declspec(dllexport)
#define EXTERN_DLL_EXPORT extern "C" __declspec(dllexport)
#define EXPORT comment(linker, "/EXPORT:" __FUNCTION__ "=" __FUNCDNAME__)
#if _WIN64
#define _mxINT32 long
#define _mxUINT32 unsigned long
#define _mxINT16 short
#define _mxUINT16 unsigned short
#elif _WIN32
#define _mxINT32 int
#define _mxUINT32 unsigned int
#define _mxINT16 short
#define _mxUINT16 unsigned short
#else
#error can not define Matrix-API data types
#endif
#pragma once
class matrix
{
_mxINT16 Init_MatrixAPI();
_mxINT16 Release_MatrixAPI();
_mxINT16 Dongle_Count(_mxINT16 dongleMemSize);
_mxINT16 Dongle_MemSize(_mxINT16 dongleIndex, _mxINT16 dongleMemSize);
_mxINT16 Dongle_ReadData(_mxINT32 dongleFuckFuck, _mxINT32* targetMemoryPtr, _mxINT16 readLength, _mxINT16 dongleIndex, _mxINT16 dongleMemSize);
_mxINT32 Dongle_ReadSerNr(_mxINT32 dongleFuckFuck, _mxINT16 dongleIndex, _mxINT16 dongleMemSize);
_mxINT32 Dongle_Model(_mxINT16 dongleIndex, _mxINT16 dongleMemSize);
};

@ -0,0 +1,171 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{551ed528-eab5-4cdf-abca-074100799a8d}</ProjectGuid>
<RootNamespace>matrixFuck</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;MATRIXFUCK_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;MATRIXFUCK_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;MATRIXFUCK_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;MATRIXFUCK_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="framework.h" />
<ClInclude Include="matrix.h" />
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="matrix.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Quelldateien">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Headerdateien">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Ressourcendateien">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="pch.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="matrix.h">
<Filter>Headerdateien</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="pch.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="matrix.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
</ItemGroup>
</Project>

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

@ -0,0 +1,5 @@
// pch.cpp: Quelldatei, die dem vorkompilierten Header entspricht
#include "pch.h"
// Bei der Verwendung vorkompilierter Header ist diese Quelldatei für eine erfolgreiche Kompilierung erforderlich.

@ -0,0 +1,13 @@
// pch.h: Dies ist eine vorkompilierte Headerdatei.
// Die unten aufgeführten Dateien werden nur einmal kompiliert, um die Buildleistung für zukünftige Builds zu verbessern.
// Dies wirkt sich auch auf die IntelliSense-Leistung aus, Codevervollständigung und viele Features zum Durchsuchen von Code eingeschlossen.
// Die hier aufgeführten Dateien werden jedoch ALLE neu kompiliert, wenn mindestens eine davon zwischen den Builds aktualisiert wird.
// Fügen Sie hier keine Dateien hinzu, die häufig aktualisiert werden sollen, da sich so der Leistungsvorteil ins Gegenteil verkehrt.
#ifndef PCH_H
#define PCH_H
// Fügen Sie hier Header hinzu, die vorkompiliert werden sollen.
#include "framework.h"
#endif //PCH_H

Binary file not shown.

@ -0,0 +1,18 @@
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\x64\release\matrixfuck.pch
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\x64\release\vc142.pdb
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\x64\release\pch.obj
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\x64\release\matrix.obj
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\x64\release\dllmain.obj
c:\users\simon friedrich\source\repos\matrixfuck\x64\release\matrixfuck.dll
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\x64\release\matrixfuck.ipdb
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\x64\release\matrixfuck.iobj
c:\users\simon friedrich\source\repos\matrixfuck\x64\release\matrixfuck.pdb
c:\users\simon friedrich\source\repos\matrixfuck\x64\release\matrixfuck.lib
c:\users\simon friedrich\source\repos\matrixfuck\x64\release\matrixfuck.exp
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\x64\release\matrixfuck.tlog\cl.command.1.tlog
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\x64\release\matrixfuck.tlog\cl.read.1.tlog
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\x64\release\matrixfuck.tlog\cl.write.1.tlog
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\x64\release\matrixfuck.tlog\link.command.1.tlog
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\x64\release\matrixfuck.tlog\link.read.1.tlog
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\x64\release\matrixfuck.tlog\link.write.1.tlog
c:\users\simon friedrich\source\repos\matrixfuck\matrixfuck\x64\release\matrixfuck.tlog\matrixfuck.write.1u.tlog

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>C:\Users\Simon Friedrich\source\repos\matrixFuck\x64\Release\matrixFuck.dll</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
<SatelliteDlls />
<NonRecipeFileRefs />
</Project>

@ -0,0 +1,9 @@
 pch.cpp
dllmain.cpp
matrix.cpp
Bibliothek "C:\Users\Simon Friedrich\source\repos\matrixFuck\x64\Release\matrixFuck.lib" und Objekt "C:\Users\Simon Friedrich\source\repos\matrixFuck\x64\Release\matrixFuck.exp" werden erstellt.
Code wird generiert.
Previous IPDB not found, fall back to full compilation.
All 8 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
Codegenerierung ist abgeschlossen.
matrixFuck.vcxproj -> C:\Users\Simon Friedrich\source\repos\matrixFuck\x64\Release\matrixFuck.dll

@ -0,0 +1,2 @@
PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:VCServicingVersionATL=14.29.30136:VCServicingVersionCrtHeaders=14.29.30136:TargetPlatformVersion=10.0.19041.0:
Release|x64|C:\Users\Simon Friedrich\source\repos\matrixFuck\|

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save