mirror of
https://github.com/hfiref0x/KDU
synced 2026-06-21 13:53:28 +00:00
Add DBPACK and packed resource DB support
Introduce DBPACK tool and packed resource database support. Adds a new DBPACK utility and project (Source/Utils/DBPACK) and a kdu.db resource; provides dbmanifest.txt and moves many per-driver/data binaries into the packer data area. Clean up Tanikaze project files and filters to remove many inlined resource entries and update resource.rc/resource.h to reference the single kdu.db RCDATA. Several binary resource files were updated as part of the packing process.
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerCommandArguments>-test</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerCommandArguments>-prv 22 -map c:\install\dummy.sys</LocalDebuggerCommandArguments>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArgumentsHistory>-list|-listcsv c:\test\out.csv|-listcsv|-listcsv C:\test\out.csv|-test|</LocalDebuggerCommandArgumentsHistory>
|
||||
<LocalDebuggerCommandArgumentsHistory>-listcsv c:\test\out.csv|-listcsv|-listcsv C:\test\out.csv|-test|-prv 22 -map c:\install\dummy.sys|</LocalDebuggerCommandArgumentsHistory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerCommandArguments>-prv 64 -map c:\install\dummy.sys</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerCommandArguments>-list</LocalDebuggerCommandArguments>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArgumentsHistory>-prv 27 -map c:\install\dummy.sys|-prv 26 -map c:\install\dummy.sys|-prv 62 -map c:\install\dummy.sys|-prv 63 -map c:\install\dummy.sys|-prv 64 -map c:\install\dummy.sys|</LocalDebuggerCommandArgumentsHistory>
|
||||
<LocalDebuggerCommandArgumentsHistory>-prv 54 -map c:\install\dummy.sys|-prv 20 -map c:\install\dummy.sys|-prv 16 -map c:\install\dummy.sys|-prv 1 -map c:\install\dummy.sys|-list|</LocalDebuggerCommandArgumentsHistory>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,12 +1,12 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* (C) COPYRIGHT AUTHORS, 2015 - 2023
|
||||
* (C) COPYRIGHT AUTHORS, 2015 - 2026
|
||||
*
|
||||
* TITLE: COMPRESS.CPP
|
||||
*
|
||||
* VERSION: 1.31
|
||||
* VERSION: 1.49
|
||||
*
|
||||
* DATE: 08 Apr 2023
|
||||
* DATE: 10 Jun 2026
|
||||
*
|
||||
* Compression support routines.
|
||||
*
|
||||
@@ -22,6 +22,61 @@
|
||||
|
||||
#pragma comment(lib, "msdelta.lib")
|
||||
|
||||
/*
|
||||
* KDULookupResourceFromDatabase
|
||||
*
|
||||
* Purpose:
|
||||
*
|
||||
* Query KDU db entry by id.
|
||||
*
|
||||
*/
|
||||
PVOID KDULookupResourceFromDatabase(
|
||||
_In_ PVOID Database,
|
||||
_In_ DWORD ResourceId,
|
||||
_In_ DWORD* Size
|
||||
)
|
||||
{
|
||||
RESOURCE_DB_HEADER* Header;
|
||||
RESOURCE_DB_ENTRY* Entries;
|
||||
|
||||
LONG Left;
|
||||
LONG Right;
|
||||
|
||||
Header = (RESOURCE_DB_HEADER*)Database;
|
||||
|
||||
if (Header->Signature != RESOURCE_DB_SIGNATURE) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Entries = (RESOURCE_DB_ENTRY*)(Header + 1);
|
||||
|
||||
Left = 0;
|
||||
Right = (LONG)Header->EntryCount - 1;
|
||||
|
||||
while (Left <= Right) {
|
||||
|
||||
LONG Mid;
|
||||
Mid = (Left + Right) / 2;
|
||||
if (Entries[Mid].Id == ResourceId) {
|
||||
if (Size)
|
||||
*Size = Entries[Mid].Size;
|
||||
return ((PBYTE)Database) + Entries[Mid].Offset;
|
||||
}
|
||||
|
||||
if (Entries[Mid].Id <
|
||||
ResourceId)
|
||||
{
|
||||
Left = Mid + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
Right = Mid - 1;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* EncodeBuffer
|
||||
*
|
||||
@@ -65,26 +120,35 @@ VOID EncodeBuffer(
|
||||
*
|
||||
*/
|
||||
PVOID KDULoadResource(
|
||||
_In_ ULONG_PTR ResourceId,
|
||||
_In_ ULONG ResourceId,
|
||||
_In_ PVOID DllHandle,
|
||||
_In_ PULONG DataSize,
|
||||
_In_ ULONG DecryptKey,
|
||||
_In_ BOOLEAN VerifyChecksum
|
||||
)
|
||||
{
|
||||
BOOL bSelf;
|
||||
PBYTE dataPtr;
|
||||
ULONG dataSize = 0;
|
||||
SIZE_T decompressedSize = 0;
|
||||
ULONG resKey;
|
||||
|
||||
if (DataSize)
|
||||
*DataSize = 0;
|
||||
|
||||
dataPtr = supQueryResourceData(ResourceId,
|
||||
bSelf = DllHandle == NtCurrentPeb()->ImageBaseAddress;
|
||||
resKey = (bSelf) ? ResourceId : IDR_KDUDB;
|
||||
|
||||
dataPtr = supQueryResourceData(resKey,
|
||||
DllHandle,
|
||||
&dataSize);
|
||||
|
||||
if (dataPtr && dataSize) {
|
||||
|
||||
if (!bSelf) {
|
||||
dataPtr = (PBYTE)KDULookupResourceFromDatabase(dataPtr, ResourceId, &dataSize);
|
||||
}
|
||||
|
||||
dataPtr = (PBYTE)KDUDecompressResource(dataPtr,
|
||||
dataSize,
|
||||
&decompressedSize,
|
||||
@@ -95,7 +159,6 @@ PVOID KDULoadResource(
|
||||
*DataSize = (ULONG)decompressedSize;
|
||||
|
||||
return dataPtr;
|
||||
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -125,6 +188,8 @@ PVOID KDUDecompressResource(
|
||||
PVOID resultPtr = NULL, dataBlob;
|
||||
|
||||
*DecompressedSize = 0;
|
||||
if (ResourcePtr == NULL)
|
||||
return NULL;
|
||||
|
||||
RtlSecureZeroMemory(&diSource, sizeof(DELTA_INPUT));
|
||||
RtlSecureZeroMemory(&diDelta, sizeof(DELTA_INPUT));
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* (C) COPYRIGHT AUTHORS, 2015 - 2021
|
||||
* (C) COPYRIGHT AUTHORS, 2015 - 2026
|
||||
*
|
||||
* TITLE: COMPRESS.H
|
||||
*
|
||||
* VERSION: 1.11
|
||||
* VERSION: 1.49
|
||||
*
|
||||
* DATE: 18 Apr 2021
|
||||
* DATE: 11 Jun 2026
|
||||
*
|
||||
* Compression support routines.
|
||||
*
|
||||
@@ -25,7 +25,7 @@ VOID EncodeBuffer(
|
||||
_In_ ULONG Key);
|
||||
|
||||
PVOID KDULoadResource(
|
||||
_In_ ULONG_PTR ResourceId,
|
||||
_In_ ULONG ResourceId,
|
||||
_In_ PVOID DllHandle,
|
||||
_In_ PULONG DataSize,
|
||||
_In_ ULONG DecryptKey,
|
||||
|
||||
@@ -437,9 +437,6 @@ VOID KDUProvList()
|
||||
|
||||
for (ULONG i = 0; i < provTable->NumberOfEntries; i++) {
|
||||
|
||||
if (i == 60)
|
||||
Beep(0, 0);
|
||||
|
||||
ULONG resourceSize;
|
||||
PBYTE drvBuffer;
|
||||
KDU_IMAGE_HASH_INFO hashInfo;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -2,9 +2,9 @@
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by resource.rc
|
||||
//
|
||||
#define IDI_ICON1 1001
|
||||
#define IDR_TAIGEI32 2000
|
||||
#define IDR_TAIGEI64 2001
|
||||
#define IDI_ICON1 10001
|
||||
#define IDR_TAIGEI32 20000
|
||||
#define IDR_TAIGEI64 20001
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* VERSION: 1.49
|
||||
*
|
||||
* DATE: 08 Jun 2026
|
||||
* DATE: 11 Jun 2026
|
||||
*
|
||||
* Global consts.
|
||||
*
|
||||
@@ -99,6 +99,11 @@
|
||||
#define IDR_DATA_ASUSCERTSERVICE 1004
|
||||
#define IDR_DATA_NEACSAFEINF 1005
|
||||
|
||||
//
|
||||
// Database id
|
||||
//
|
||||
#define IDR_KDUDB 7000
|
||||
|
||||
//
|
||||
// Driver id table
|
||||
//
|
||||
|
||||
+26
-1
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* VERSION: 1.49
|
||||
*
|
||||
* DATE: 06 Jun 2026
|
||||
* DATE: 12 Jun 2026
|
||||
*
|
||||
* Base KDU definitions.
|
||||
*
|
||||
@@ -80,3 +80,28 @@ typedef struct _KDU_DB_VERSION {
|
||||
WORD Revision;
|
||||
WORD Build;
|
||||
} KDU_DB_VERSION, * PKDU_DB_VERSION;
|
||||
|
||||
#define RESOURCE_DB_SIGNATURE 'XDMR'
|
||||
#define RESOURCE_DB_VERSION 1
|
||||
#define MAX_PACK_ITEMS 256
|
||||
|
||||
#pragma pack(push, 1)
|
||||
typedef struct _RESOURCE_DB_HEADER {
|
||||
DWORD Signature;
|
||||
DWORD Version;
|
||||
DWORD EntryCount;
|
||||
} RESOURCE_DB_HEADER;
|
||||
|
||||
typedef struct _RESOURCE_DB_ENTRY {
|
||||
DWORD Id;
|
||||
DWORD Offset;
|
||||
DWORD Size;
|
||||
} RESOURCE_DB_ENTRY;
|
||||
#pragma pack(pop)
|
||||
|
||||
typedef struct _PACK_ITEM {
|
||||
DWORD Id;
|
||||
CHAR Path[MAX_PATH];
|
||||
DWORD Offset;
|
||||
DWORD Size;
|
||||
} PACK_ITEM;
|
||||
|
||||
@@ -180,83 +180,6 @@
|
||||
<ClInclude Include="tanikaze.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="data\AsusCertService.bin" />
|
||||
<None Include="data\dbutilcat.bin" />
|
||||
<None Include="data\dbutilinf.bin" />
|
||||
<None Include="data\KMUEXE.bin" />
|
||||
<None Include="data\KMUSIG.bin" />
|
||||
<None Include="data\NeacSafe64Cat.bin" />
|
||||
<None Include="drv\affdriver.bin" />
|
||||
<None Include="drv\ALSysIO64.bin" />
|
||||
<None Include="drv\AMDRyzenMasterDriver.bin" />
|
||||
<None Include="drv\amsdk.bin" />
|
||||
<None Include="drv\AODDriver215.bin" />
|
||||
<None Include="drv\AppShopDrv103.bin" />
|
||||
<None Include="drv\asio2.bin" />
|
||||
<None Include="drv\AsIO3.bin" />
|
||||
<None Include="drv\AsrDrv106.bin" />
|
||||
<None Include="drv\AsrDrv107.bin" />
|
||||
<None Include="drv\AsrDrv107n.bin" />
|
||||
<None Include="drv\ATSZIO64.bin" />
|
||||
<None Include="drv\AxtuDrv.bin" />
|
||||
<None Include="drv\Cormem.bin" />
|
||||
<None Include="drv\dbk64.bin" />
|
||||
<None Include="drv\DbUtil2_3.bin" />
|
||||
<None Include="drv\dbutildrv2.bin" />
|
||||
<None Include="drv\DirectIo64.bin" />
|
||||
<None Include="drv\DirectIo64_2.bin" />
|
||||
<None Include="drv\echo_driver.bin" />
|
||||
<None Include="drv\eleetx1.bin" />
|
||||
<None Include="drv\ene2.bin" />
|
||||
<None Include="drv\eneio64.bin" />
|
||||
<None Include="drv\enetechio64.bin" />
|
||||
<None Include="drv\etdsupp.bin" />
|
||||
<None Include="drv\gdrv.bin" />
|
||||
<None Include="drv\glckio2.bin" />
|
||||
<None Include="drv\gmerdrv.bin" />
|
||||
<None Include="drv\heavenluo.bin" />
|
||||
<None Include="drv\HW64.bin" />
|
||||
<None Include="drv\HwRwDrv.x64.bin" />
|
||||
<None Include="drv\inpoutx64.bin" />
|
||||
<None Include="drv\ipctype.bin" />
|
||||
<None Include="drv\iQVM64.bin" />
|
||||
<None Include="drv\irec.bin" />
|
||||
<None Include="drv\KExplore.bin" />
|
||||
<None Include="drv\KObjExp.bin" />
|
||||
<None Include="drv\kprocesshacker.bin" />
|
||||
<None Include="drv\KRegExp.bin" />
|
||||
<None Include="drv\LDD.bin" />
|
||||
<None Include="drv\LECOMAx.bin" />
|
||||
<None Include="drv\lha.bin" />
|
||||
<None Include="drv\LnvMSRIO.bin" />
|
||||
<None Include="drv\mimidrv.bin" />
|
||||
<None Include="drv\mktoolsx64.bin" />
|
||||
<None Include="drv\msio64.bin" />
|
||||
<None Include="drv\mtxC9CB.bin" />
|
||||
<None Include="drv\NeacSafe64.bin" />
|
||||
<None Include="drv\nvoclock.bin" />
|
||||
<None Include="drv\pcdsrvc_x64.bin" />
|
||||
<None Include="drv\PdFwKrnl.bin" />
|
||||
<None Include="drv\PGRHostControl.bin" />
|
||||
<None Include="drv\PhyDMACC.bin" />
|
||||
<None Include="drv\phymemx64.bin" />
|
||||
<None Include="drv\phymem_panda.bin" />
|
||||
<None Include="drv\physmem.bin" />
|
||||
<None Include="drv\pmxdrv64.bin" />
|
||||
<None Include="drv\procexp.bin" />
|
||||
<None Include="drv\procexp1627.bin" />
|
||||
<None Include="drv\procexp1702.bin" />
|
||||
<None Include="drv\RTCore64.bin" />
|
||||
<None Include="drv\rtkio64.bin" />
|
||||
<None Include="drv\rzpnk.bin" />
|
||||
<None Include="drv\SysDrv3S.bin" />
|
||||
<None Include="drv\ThrottleStop.bin" />
|
||||
<None Include="drv\TPwSav.bin" />
|
||||
<None Include="drv\WinHwDrv64.bin" />
|
||||
<None Include="drv\WinRing0x64.bin" />
|
||||
<None Include="drv\wnBios64.bin" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -33,233 +33,6 @@
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="drv\iQVM64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\procexp.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\RTCore64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\gdrv.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\ATSZIO64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\msio64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\glckio2.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\eneio64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\WinRing0x64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\enetechio64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\phymemx64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\rtkio64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\ene2.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\lha.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\asio2.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\DirectIo64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\gmerdrv.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\DbUtil2_3.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\mimidrv.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\kprocesshacker.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\dbutildrv2.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="data\dbutilcat.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="data\dbutilinf.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="data\KMUEXE.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="data\KMUSIG.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\dbk64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\AsIO3.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="data\AsusCertService.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\HW64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\SysDrv3S.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\amsdk.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\inpoutx64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\mktoolsx64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\DirectIo64_2.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\AsrDrv106.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\ALSysIO64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\AMDRyzenMasterDriver.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\physmem.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\procexp1627.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\procexp1702.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\LDD.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\pcdsrvc_x64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\heavenluo.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\etdsupp.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\KExplore.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\KObjExp.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\KRegExp.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\echo_driver.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\nvoclock.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\irec.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\rzpnk.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\PhyDMACC.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\PdFwKrnl.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\AODDriver215.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\phymem_panda.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\wnBios64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\eleetx1.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\AxtuDrv.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\AppShopDrv103.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\AsrDrv107n.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\AsrDrv107.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\pmxdrv64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\HwRwDrv.x64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\NeacSafe64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="data\NeacSafe64Cat.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\ThrottleStop.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\TPwSav.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\LnvMSRIO.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\Cormem.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\ipctype.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\WinHwDrv64.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\affdriver.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\mtxC9CB.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\PGRHostControl.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="drv\LECOMAx.bin">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
|
||||
Binary file not shown.
@@ -2,78 +2,7 @@
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by resource.rc
|
||||
//
|
||||
#define IDR_INTEL_NAL 103
|
||||
#define IDR_RZPNK 104
|
||||
#define IDR_RTCORE64 105
|
||||
#define IDR_GDRV 106
|
||||
#define IDR_ATSZIO64 107
|
||||
#define IDR_MSIO64 108
|
||||
#define IDR_GLCKIO2 109
|
||||
#define IDR_ENEIO64 110
|
||||
#define IDR_WINRING0 111
|
||||
#define IDR_ENETECHIO64 112
|
||||
#define IDR_PHYMEMX64 113
|
||||
#define IDR_RTKIO64 114
|
||||
#define IDR_ENETECHIO64B 115
|
||||
#define IDR_LHA 116
|
||||
#define IDR_ASIO2 117
|
||||
#define IDR_DIRECTIO64 118
|
||||
#define IDR_GMERDRV 119
|
||||
#define IDR_DBUTIL23 120
|
||||
#define IDR_MIMIDRV 121
|
||||
#define IDR_KPH 122
|
||||
#define IDR_DBUTILDRV2 123
|
||||
#define IDR_DBK64 124
|
||||
#define IDR_ASIO3 125
|
||||
#define IDR_HW64 126
|
||||
#define IDR_SYSDRV3S 127
|
||||
#define IDR_ZEMANA 128
|
||||
#define IDR_INPOUTX64 129
|
||||
#define IDR_PASSMARK_OSF 130
|
||||
#define IDR_ASROCKDRV 131
|
||||
#define IDR_ALSYSIO64 132
|
||||
#define IDR_AMD_RYZENMASTER 133
|
||||
#define IDR_PHYSMEM 134
|
||||
#define IDR_LDD 135
|
||||
#define IDR_PCDSRVC 136
|
||||
#define IDR_MSI_WINIO 137
|
||||
#define IDR_HP_ETDSUPP 138
|
||||
#define IDR_KEXPLORE 139
|
||||
#define IDR_KOBJEXP 140
|
||||
#define IDR_KREGEXP 141
|
||||
#define IDR_PHYDMACC 142
|
||||
#define IDR_ECHODRV 143
|
||||
#define IDR_NVOCLOCK 144
|
||||
#define IDR_IREC 145
|
||||
#define IDR_AMD_PDFWKRNL 146
|
||||
#define IDR_AMD_AOD215 147
|
||||
#define IDR_WNBIOS64 148
|
||||
#define IDR_EVGA_ELEETX1 149
|
||||
#define IDR_ASROCKDRV2 150
|
||||
#define IDR_ASROCKAPPSHOP103 151
|
||||
#define IDR_ASROCKDRV3 152
|
||||
#define IDR_ASROCKDRV4 153
|
||||
#define IDR_PMXDRV64 154
|
||||
#define IDR_HWRWDRVX64 155
|
||||
#define IDR_NEACSAFE64 156
|
||||
#define IDR_THROTTLESTOP 157
|
||||
#define IDR_TPWSAV 158
|
||||
#define IDR_LENOVOMSRIO 159
|
||||
#define IDR_TELEDYNE 160
|
||||
#define IDR_IPCTYPE 161
|
||||
#define IDR_SHANGKE_WHD 162
|
||||
#define IDR_AMD_AFFDRIVER 163
|
||||
#define IDR_MATROX_MTXC9CB 164
|
||||
#define IDR_FLIR_PGRHOSTCONTROL 165
|
||||
#define IDR_LECOMA 166
|
||||
#define IDR_DATA_DBUTILCAT 1000
|
||||
#define IDR_DATA_DBUTILINF 1001
|
||||
#define IDR_DATA_KMUEXE 1002
|
||||
#define IDR_DATA_KMUSIG 1003
|
||||
#define IDR_DATA_ASUSCERTSERVICE 1004
|
||||
#define IDR_DATA_NEACSAFEINF 1005
|
||||
#define IDR_PROCEXP1627 2000
|
||||
#define IDR_PROCEXP1702 2001
|
||||
#define IDR_KDUDB 7000
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
||||
+1
-143
@@ -50,149 +50,7 @@ END
|
||||
// RCDATA
|
||||
//
|
||||
|
||||
IDR_INTEL_NAL RCDATA "drv\\iQVM64.bin"
|
||||
|
||||
IDR_PROCEXP1627 RCDATA "drv\\procexp1627.bin"
|
||||
|
||||
IDR_RTCORE64 RCDATA "drv\\RTCore64.bin"
|
||||
|
||||
IDR_GDRV RCDATA "drv\\gdrv.bin"
|
||||
|
||||
IDR_ATSZIO64 RCDATA "drv\\ATSZIO64.bin"
|
||||
|
||||
IDR_MSIO64 RCDATA "drv\\msio64.bin"
|
||||
|
||||
IDR_GLCKIO2 RCDATA "drv\\glckio2.bin"
|
||||
|
||||
IDR_ENEIO64 RCDATA "drv\\eneio64.bin"
|
||||
|
||||
IDR_WINRING0 RCDATA "drv\\WinRing0x64.bin"
|
||||
|
||||
IDR_ENETECHIO64 RCDATA "drv\\enetechio64.bin"
|
||||
|
||||
IDR_PHYMEMX64 RCDATA "drv\\phymemx64.bin"
|
||||
|
||||
IDR_RTKIO64 RCDATA "drv\\rtkio64.bin"
|
||||
|
||||
IDR_ENETECHIO64B RCDATA "drv\\ene2.bin"
|
||||
|
||||
IDR_LHA RCDATA "drv\\lha.bin"
|
||||
|
||||
IDR_ASIO2 RCDATA "drv\\asio2.bin"
|
||||
|
||||
IDR_DIRECTIO64 RCDATA "drv\\DirectIo64.bin"
|
||||
|
||||
IDR_GMERDRV RCDATA "drv\\gmerdrv.bin"
|
||||
|
||||
IDR_DBUTIL23 RCDATA "drv\\DbUtil2_3.bin"
|
||||
|
||||
IDR_MIMIDRV RCDATA "drv\\mimidrv.bin"
|
||||
|
||||
IDR_KPH RCDATA "drv\\kprocesshacker.bin"
|
||||
|
||||
IDR_DBUTILDRV2 RCDATA "drv\\dbutildrv2.bin"
|
||||
|
||||
IDR_DATA_DBUTILCAT RCDATA "data\\dbutilcat.bin"
|
||||
|
||||
IDR_DATA_DBUTILINF RCDATA "data\\dbutilinf.bin"
|
||||
|
||||
IDR_DATA_KMUEXE RCDATA "data\\KMUEXE.bin"
|
||||
|
||||
IDR_DATA_KMUSIG RCDATA "data\\KMUSIG.bin"
|
||||
|
||||
IDR_DBK64 RCDATA "drv\\dbk64.bin"
|
||||
|
||||
IDR_ASIO3 RCDATA "drv\\AsIO3.bin"
|
||||
|
||||
IDR_DATA_ASUSCERTSERVICE RCDATA "data\\AsusCertService.bin"
|
||||
|
||||
IDR_HW64 RCDATA "drv\\HW64.bin"
|
||||
|
||||
IDR_SYSDRV3S RCDATA "drv\\SysDrv3S.bin"
|
||||
|
||||
IDR_ZEMANA RCDATA "drv\\amsdk.bin"
|
||||
|
||||
IDR_INPOUTX64 RCDATA "drv\\inpoutx64.bin"
|
||||
|
||||
IDR_PASSMARK_OSF RCDATA "drv\\DirectIo64_2.bin"
|
||||
|
||||
IDR_ASROCKDRV RCDATA "drv\\AsrDrv106.bin"
|
||||
|
||||
IDR_ALSYSIO64 RCDATA "drv\\ALSysIO64.bin"
|
||||
|
||||
IDR_AMD_RYZENMASTER RCDATA "drv\\AMDRyzenMasterDriver.bin"
|
||||
|
||||
IDR_PHYSMEM RCDATA "drv\\physmem.bin"
|
||||
|
||||
IDR_PROCEXP1702 RCDATA "drv\\procexp1702.bin"
|
||||
|
||||
IDR_LDD RCDATA "drv\\LDD.bin"
|
||||
|
||||
IDR_PCDSRVC RCDATA "drv\\pcdsrvc_x64.bin"
|
||||
|
||||
IDR_MSI_WINIO RCDATA "drv\\heavenluo.bin"
|
||||
|
||||
IDR_HP_ETDSUPP RCDATA "drv\\etdsupp.bin"
|
||||
|
||||
IDR_KEXPLORE RCDATA "drv\\KExplore.bin"
|
||||
|
||||
IDR_KOBJEXP RCDATA "drv\\KObjExp.bin"
|
||||
|
||||
IDR_KREGEXP RCDATA "drv\\KRegExp.bin"
|
||||
|
||||
IDR_ECHODRV RCDATA "drv\\echo_driver.bin"
|
||||
|
||||
IDR_NVOCLOCK RCDATA "drv\\nvoclock.bin"
|
||||
|
||||
IDR_IREC RCDATA "drv\\irec.bin"
|
||||
|
||||
IDR_PHYDMACC RCDATA "drv\\PhyDMACC.bin"
|
||||
|
||||
IDR_RZPNK RCDATA "drv\\rzpnk.bin"
|
||||
|
||||
IDR_AMD_PDFWKRNL RCDATA "drv\\PdFwKrnl.bin"
|
||||
|
||||
IDR_AMD_AOD215 RCDATA "drv\\AODDriver215.bin"
|
||||
|
||||
IDR_WNBIOS64 RCDATA "drv\\wnBios64.bin"
|
||||
|
||||
IDR_EVGA_ELEETX1 RCDATA "drv\\eleetx1.bin"
|
||||
|
||||
IDR_ASROCKDRV2 RCDATA "drv\\AxtuDrv.bin"
|
||||
|
||||
IDR_ASROCKAPPSHOP103 RCDATA "drv\\AppShopDrv103.bin"
|
||||
|
||||
IDR_ASROCKDRV3 RCDATA "drv\\AsrDrv107n.bin"
|
||||
|
||||
IDR_ASROCKDRV4 RCDATA "drv\\AsrDrv107.bin"
|
||||
|
||||
IDR_PMXDRV64 RCDATA "drv\\pmxdrv64.bin"
|
||||
|
||||
IDR_HWRWDRVX64 RCDATA "drv\\HwRwDrv.x64.bin"
|
||||
|
||||
IDR_DATA_NEACSAFEINF RCDATA "data\\NeacSafe64Cat.bin"
|
||||
|
||||
IDR_NEACSAFE64 RCDATA "drv\\NeacSafe64.bin"
|
||||
|
||||
IDR_THROTTLESTOP RCDATA "drv\\ThrottleStop.bin"
|
||||
|
||||
IDR_TPWSAV RCDATA "drv\\TPwSav.bin"
|
||||
|
||||
IDR_LENOVOMSRIO RCDATA "drv\\LnvMSRIO.bin"
|
||||
|
||||
IDR_TELEDYNE RCDATA "drv\\Cormem.bin"
|
||||
|
||||
IDR_IPCTYPE RCDATA "drv\\ipctype.bin"
|
||||
|
||||
IDR_SHANGKE_WHD RCDATA "drv\\WinHwDrv64.bin"
|
||||
|
||||
IDR_AMD_AFFDRIVER RCDATA "drv\\affdriver.bin"
|
||||
|
||||
IDR_MATROX_MTXC9CB RCDATA "drv\\mtxC9CB.bin"
|
||||
|
||||
IDR_FLIR_PGRHOSTCONTROL RCDATA "drv\\PGRHostControl.bin"
|
||||
|
||||
IDR_LECOMA RCDATA "drv\\LECOMAx.bin"
|
||||
IDR_KDUDB RCDATA "data\\kdu.db"
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -928,7 +928,7 @@ KDU_DB_ENTRY gProvEntry[] = {
|
||||
{
|
||||
KDU_MIN_NTBUILDNUMBER,
|
||||
KDU_MAX_NTBUILDNUMBER,
|
||||
IDR_SHANGKE_WHD,
|
||||
IDR_SHANGKE_WND,
|
||||
KDU_PROVIDER_SHANGKE_WHD,
|
||||
KDU_VICTIM_DEFAULT,
|
||||
SourceBaseWinRing0,
|
||||
|
||||
@@ -0,0 +1,432 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* (C) COPYRIGHT AUTHORS, 2025 - 2026
|
||||
*
|
||||
* TITLE: DBPACK.CPP
|
||||
*
|
||||
* VERSION: 1.05
|
||||
*
|
||||
* DATE: 12 Jun 2026
|
||||
*
|
||||
* DBPACK - KDU's Provider Database packager.
|
||||
*
|
||||
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
* TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
#include <Windows.h>
|
||||
#include <strsafe.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#include "../../Shared/ntos/ntos.h"
|
||||
#include "../../Shared/minirtl/minirtl.h"
|
||||
#include "../../Shared/minirtl/cmdline.h"
|
||||
#include "../../Shared/minirtl/_filename.h"
|
||||
#include "../../Shared/kdubase.h"
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOL StringToDword(
|
||||
LPCSTR String,
|
||||
DWORD* Value
|
||||
)
|
||||
{
|
||||
DWORD Result = 0;
|
||||
|
||||
if (!String || !*String)
|
||||
return FALSE;
|
||||
|
||||
while (*String)
|
||||
{
|
||||
CHAR Ch = *String++;
|
||||
|
||||
if (Ch < '0' || Ch > '9')
|
||||
return FALSE;
|
||||
|
||||
Result =
|
||||
Result * 10 +
|
||||
(DWORD)(Ch - '0');
|
||||
}
|
||||
|
||||
*Value = Result;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ParseManifestLine(
|
||||
LPSTR Line,
|
||||
PACK_ITEM* Item
|
||||
)
|
||||
{
|
||||
LPSTR Equal;
|
||||
LPSTR Quote1;
|
||||
LPSTR Quote2;
|
||||
|
||||
DWORD Id;
|
||||
|
||||
Equal = Line;
|
||||
|
||||
while (*Equal && *Equal != '=')
|
||||
Equal++;
|
||||
|
||||
if (*Equal != '=')
|
||||
return FALSE;
|
||||
|
||||
*Equal = 0;
|
||||
|
||||
if (!StringToDword(Line, &Id))
|
||||
return FALSE;
|
||||
|
||||
Quote1 = Equal + 1;
|
||||
|
||||
if (*Quote1 != '"')
|
||||
return FALSE;
|
||||
|
||||
Quote1++;
|
||||
|
||||
Quote2 = Quote1;
|
||||
|
||||
while (*Quote2 && *Quote2 != '"')
|
||||
Quote2++;
|
||||
|
||||
if (*Quote2 != '"')
|
||||
return FALSE;
|
||||
|
||||
*Quote2 = 0;
|
||||
|
||||
if (FAILED(StringCchCopyA(
|
||||
Item->Path,
|
||||
ARRAYSIZE(Item->Path),
|
||||
Quote1)))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Item->Id = Id;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LoadManifest(
|
||||
LPCSTR FileName,
|
||||
PACK_ITEM* Items,
|
||||
DWORD* CountOut
|
||||
)
|
||||
{
|
||||
HANDLE hFile;
|
||||
|
||||
DWORD FileSize;
|
||||
DWORD ReadBytes;
|
||||
|
||||
LPSTR Buffer;
|
||||
LPSTR Current;
|
||||
|
||||
DWORD Count = 0;
|
||||
|
||||
hFile = CreateFileA(
|
||||
FileName,
|
||||
GENERIC_READ,
|
||||
FILE_SHARE_READ,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL);
|
||||
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
return FALSE;
|
||||
|
||||
FileSize = GetFileSize(hFile, NULL);
|
||||
Buffer = (LPSTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, FileSize + 1);
|
||||
if (!Buffer) {
|
||||
CloseHandle(hFile);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!ReadFile(
|
||||
hFile,
|
||||
Buffer,
|
||||
FileSize,
|
||||
&ReadBytes,
|
||||
NULL))
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, Buffer);
|
||||
CloseHandle(hFile);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
CloseHandle(hFile);
|
||||
|
||||
Current = Buffer;
|
||||
|
||||
while (*Current) {
|
||||
|
||||
LPSTR End;
|
||||
|
||||
End = Current;
|
||||
|
||||
while (*End &&
|
||||
*End != '\r' &&
|
||||
*End != '\n')
|
||||
{
|
||||
End++;
|
||||
}
|
||||
|
||||
if (*End) {
|
||||
*End = 0;
|
||||
End++;
|
||||
|
||||
if (*End == '\n')
|
||||
End++;
|
||||
}
|
||||
|
||||
if (*Current) {
|
||||
if (Count >= MAX_PACK_ITEMS) {
|
||||
HeapFree(GetProcessHeap(), 0, Buffer);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!ParseManifestLine(
|
||||
Current,
|
||||
&Items[Count]))
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, Buffer);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Count++;
|
||||
}
|
||||
|
||||
Current = End;
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, Buffer);
|
||||
*CountOut = Count;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
VOID SortItems(
|
||||
PACK_ITEM* Items,
|
||||
DWORD Count
|
||||
)
|
||||
{
|
||||
DWORD i;
|
||||
|
||||
for (i = 1; i < Count; i++) {
|
||||
DWORD j;
|
||||
PACK_ITEM Temp;
|
||||
|
||||
Temp = Items[i];
|
||||
|
||||
j = i;
|
||||
|
||||
while (j > 0 &&
|
||||
Items[j - 1].Id > Temp.Id)
|
||||
{
|
||||
Items[j] =
|
||||
Items[j - 1];
|
||||
|
||||
j--;
|
||||
}
|
||||
|
||||
Items[j] = Temp;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL GetFileSize32(
|
||||
LPCSTR Path,
|
||||
DWORD* SizeOut
|
||||
)
|
||||
{
|
||||
HANDLE hFile;
|
||||
LARGE_INTEGER Size;
|
||||
|
||||
hFile = CreateFileA(
|
||||
Path,
|
||||
GENERIC_READ,
|
||||
FILE_SHARE_READ,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
0,
|
||||
NULL);
|
||||
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
return FALSE;
|
||||
|
||||
if (!GetFileSizeEx(hFile, &Size)) {
|
||||
CloseHandle(hFile);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
CloseHandle(hFile);
|
||||
|
||||
if (Size.QuadPart > MAXDWORD)
|
||||
return FALSE;
|
||||
|
||||
*SizeOut = (DWORD)Size.QuadPart;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL BuildDatabase(
|
||||
LPCSTR ManifestFile,
|
||||
LPCSTR OutputFile
|
||||
)
|
||||
{
|
||||
PACK_ITEM Items[MAX_PACK_ITEMS];
|
||||
RESOURCE_DB_ENTRY Entries[MAX_PACK_ITEMS];
|
||||
|
||||
RESOURCE_DB_HEADER Header;
|
||||
|
||||
HANDLE hOut;
|
||||
|
||||
DWORD Count;
|
||||
DWORD i;
|
||||
DWORD Written;
|
||||
|
||||
DWORD CurrentOffset;
|
||||
|
||||
if (!LoadManifest(
|
||||
ManifestFile,
|
||||
Items,
|
||||
&Count))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SortItems(
|
||||
Items,
|
||||
Count);
|
||||
|
||||
for (i = 1; i < Count; i++) {
|
||||
if (Items[i].Id ==
|
||||
Items[i - 1].Id)
|
||||
{
|
||||
OutputDebugStringA("Duplicate resource ID\n");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
CurrentOffset = sizeof(Header) + Count * sizeof(RESOURCE_DB_ENTRY);
|
||||
|
||||
for (i = 0; i < Count; i++) {
|
||||
if (!GetFileSize32(
|
||||
Items[i].Path,
|
||||
&Items[i].Size))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Items[i].Offset =
|
||||
CurrentOffset;
|
||||
|
||||
Entries[i].Id =
|
||||
Items[i].Id;
|
||||
|
||||
Entries[i].Offset =
|
||||
CurrentOffset;
|
||||
|
||||
Entries[i].Size =
|
||||
Items[i].Size;
|
||||
|
||||
CurrentOffset +=
|
||||
Items[i].Size;
|
||||
}
|
||||
|
||||
Header.Signature = RESOURCE_DB_SIGNATURE;
|
||||
Header.Version = RESOURCE_DB_VERSION;
|
||||
Header.EntryCount = Count;
|
||||
|
||||
hOut = CreateFileA(
|
||||
OutputFile,
|
||||
GENERIC_WRITE,
|
||||
0,
|
||||
NULL,
|
||||
CREATE_ALWAYS,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL);
|
||||
|
||||
if (hOut == INVALID_HANDLE_VALUE)
|
||||
return FALSE;
|
||||
|
||||
WriteFile(
|
||||
hOut,
|
||||
&Header,
|
||||
sizeof(Header),
|
||||
&Written,
|
||||
NULL);
|
||||
|
||||
WriteFile(
|
||||
hOut,
|
||||
Entries,
|
||||
Count * sizeof(RESOURCE_DB_ENTRY),
|
||||
&Written,
|
||||
NULL);
|
||||
|
||||
for (i = 0; i < Count; i++) {
|
||||
HANDLE hIn;
|
||||
|
||||
BYTE Buffer[65536];
|
||||
|
||||
DWORD ReadBytes;
|
||||
|
||||
hIn = CreateFileA(
|
||||
Items[i].Path,
|
||||
GENERIC_READ,
|
||||
FILE_SHARE_READ,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL);
|
||||
|
||||
if (hIn == INVALID_HANDLE_VALUE) {
|
||||
CloseHandle(hOut);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
while (ReadFile(
|
||||
hIn,
|
||||
Buffer,
|
||||
sizeof(Buffer),
|
||||
&ReadBytes,
|
||||
NULL) &&
|
||||
ReadBytes)
|
||||
{
|
||||
WriteFile(
|
||||
hOut,
|
||||
Buffer,
|
||||
ReadBytes,
|
||||
&Written,
|
||||
NULL);
|
||||
}
|
||||
|
||||
CloseHandle(hIn);
|
||||
}
|
||||
|
||||
CloseHandle(hOut);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* main
|
||||
*
|
||||
* Purpose:
|
||||
*
|
||||
* Program entrypoint.
|
||||
*
|
||||
*/
|
||||
int main()
|
||||
{
|
||||
if (!BuildDatabase(
|
||||
"dbmanifest.txt",
|
||||
"kdu.db"))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<Solution>
|
||||
<Configurations>
|
||||
<Platform Name="x64" />
|
||||
</Configurations>
|
||||
<Project Path="DBPACK.vcxproj" Id="a57f36b0-ae61-4290-90de-e775e0d30201" />
|
||||
</Solution>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?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>18.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{a57f36b0-ae61-4290-90de-e775e0d30201}</ProjectGuid>
|
||||
<RootNamespace>DBPACK</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v145</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|x64'">
|
||||
<OutDir>.\output\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>.\output\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>.\output\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>.\output\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<EnableSegmentHeap>true</EnableSegmentHeap>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<EnableSegmentHeap>true</EnableSegmentHeap>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<EnableSegmentHeap>true</EnableSegmentHeap>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalOptions>/NOCOFFGRPINFO %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<EnableSegmentHeap>true</EnableSegmentHeap>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="DBPACK.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<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="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<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>
|
||||
<ClCompile Include="DBPACK.cpp">
|
||||
<Filter>Source Files</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>
|
||||
BIN
Binary file not shown.
Binary file not shown.
@@ -1,2 +1,2 @@
|
||||
°€°7ÏÐ|à°zæÃ,]ãqq«>Vf[æÒ&S–>§˜oœƒÖ°ÝükFzQ šÊy,°-Ò·}eÎI8×ôq^gÉ0¤”^ Áûr*œ(®ò™aÃ7p}‡?š4FjB\0K$1g^퉄”Œ¸bÿÓïV`Í´µý%뇱Þ7—*óÙÖ¯>ôÌwiá
|
||||
°€°7/c»_Œ°zæÃ,]ãqq«>Vf[æÒ&S–>§˜oœƒÖ°ÝükFzQ šÊy,°-Ò·}eÎI8×ôq^gÉ0¤”^ Áûr*œ(®ò™aÃ7p}‡?š4FjB\0K$1g^퉄”Œ¸bÿÓïV`Í´µý%뇱Þ7—*óÙÖ¯>ôÌwiá
|
||||
mV?‰SHטז/�0£8”־Hˆ
]אל
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,72 @@
|
||||
103="drv\\iQVM64.bin"
|
||||
104="drv\\rzpnk.bin"
|
||||
105="drv\\RTCore64.bin"
|
||||
106="drv\\gdrv.bin"
|
||||
107="drv\\ATSZIO64.bin"
|
||||
108="drv\\msio64.bin"
|
||||
109="drv\\glckio2.bin"
|
||||
110="drv\\eneio64.bin"
|
||||
111="drv\\WinRing0x64.bin"
|
||||
112="drv\\enetechio64.bin"
|
||||
113="drv\\phymemx64.bin"
|
||||
114="drv\\rtkio64.bin"
|
||||
115="drv\\ene2.bin"
|
||||
116="drv\\lha.bin"
|
||||
117="drv\\asio2.bin"
|
||||
118="drv\\DirectIo64.bin"
|
||||
119="drv\\gmerdrv.bin"
|
||||
120="drv\\DbUtil2_3.bin"
|
||||
121="drv\\mimidrv.bin"
|
||||
122="drv\\kprocesshacker.bin"
|
||||
123="drv\\dbutildrv2.bin"
|
||||
124="drv\\dbk64.bin"
|
||||
125="drv\\AsIO3.bin"
|
||||
126="drv\\HW64.bin"
|
||||
127="drv\\SysDrv3S.bin"
|
||||
128="drv\\amsdk.bin"
|
||||
129="drv\\inpoutx64.bin"
|
||||
130="drv\\DirectIo64_2.bin"
|
||||
131="drv\\AsrDrv106.bin"
|
||||
132="drv\\ALSysIO64.bin"
|
||||
133="drv\\AMDRyzenMasterDriver.bin"
|
||||
134="drv\\physmem.bin"
|
||||
135="drv\\LDD.bin"
|
||||
136="drv\\pcdsrvc_x64.bin"
|
||||
137="drv\\heavenluo.bin"
|
||||
138="drv\\etdsupp.bin"
|
||||
139="drv\\KExplore.bin"
|
||||
140="drv\\KObjExp.bin"
|
||||
141="drv\\KRegExp.bin"
|
||||
142="drv\\PhyDMACC.bin"
|
||||
143="drv\\echo_driver.bin"
|
||||
144="drv\\nvoclock.bin"
|
||||
145="drv\\irec.bin"
|
||||
146="drv\\PdFwKrnl.bin"
|
||||
147="drv\\AODDriver215.bin"
|
||||
148="drv\\wnBios64.bin"
|
||||
149="drv\\eleetx1.bin"
|
||||
150="drv\\AxtuDrv.bin"
|
||||
151="drv\\AppShopDrv103.bin"
|
||||
152="drv\\AsrDrv107n.bin"
|
||||
153="drv\\AsrDrv107.bin"
|
||||
154="drv\\pmxdrv64.bin"
|
||||
155="drv\\HwRwDrv.x64.bin"
|
||||
156="drv\\NeacSafe64.bin"
|
||||
157="drv\\ThrottleStop.bin"
|
||||
158="drv\\TPwSav.bin"
|
||||
159="drv\\LnvMSRIO.bin"
|
||||
160="drv\\Cormem.bin"
|
||||
161="drv\\ipctype.bin"
|
||||
162="drv\\WinHwDrv64.bin"
|
||||
163="drv\\affdriver.bin"
|
||||
164="drv\\mtxC9CB.bin"
|
||||
165="drv\\PGRHostControl.bin"
|
||||
166="drv\\LECOMAx.bin"
|
||||
1000="data\\dbutilcat.bin"
|
||||
1001="data\\dbutilinf.bin"
|
||||
1002="data\\KMUEXE.bin"
|
||||
1003="data\\KMUSIG.bin"
|
||||
1004="data\\AsusCertService.bin"
|
||||
1005="data\\NeacSafe64Cat.bin"
|
||||
2000="drv\\procexp1627.bin"
|
||||
2001="drv\\procexp1702.bin"
|
||||
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,5 @@
|
||||
Dbpack is a special utility used to generate single KDU database file which is next embedded into Tanikaze dll.
|
||||
|
||||
GenAsIo2Unlock is a special utility used to generate the "unlocking" resource required for working with the AsIO2 driver. The full source for this utility is included in Source\Utils\GenAsIo2Unlock. The compiled version is located in Sources\Hamakaze\Utils\GenAsIo2Unlock.exe. **Warning:** This utility is set to execute as a post-build event for both Debug and Release configurations. If you do not want to run the precompiled version, replace it with a newly compiled version from the sources. If you remove this post-build event, newly compiled KDU will NOT BE ABLE to use the AsIO2 driver (provider #13).
|
||||
|
||||
PCOMP is an auxiliary utility used to compress provider files. It is not intended for general use and is only used when you need to generate new binary blobs for provider DLLs.
|
||||
|
||||
Reference in New Issue
Block a user