mirror of
https://github.com/fang139842/WoW-MPQ-Library.git
synced 2025-11-10 16:44:15 +08:00
尝试提取MPQ文件路径的DLL
This commit is contained in:
parent
7e5b80cece
commit
56d76abef2
179
MPQDumper/MPQDumper.cpp
Normal file
179
MPQDumper/MPQDumper.cpp
Normal file
@ -0,0 +1,179 @@
|
||||
#include "pch.h"
|
||||
#include <windows.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
#include "MPQDumper.h"
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct MPQHeader {
|
||||
DWORD magic; // 'MPQ\x1A'
|
||||
DWORD headerSize;
|
||||
DWORD archiveSize;
|
||||
DWORD formatVersion;
|
||||
DWORD sectorSize;
|
||||
DWORD hashTableOffset;
|
||||
DWORD blockTableOffset;
|
||||
DWORD hashTableEntries;
|
||||
DWORD blockTableEntries;
|
||||
};
|
||||
|
||||
struct MPQHashTableEntry {
|
||||
DWORD hashA;
|
||||
DWORD hashB;
|
||||
WORD locale;
|
||||
WORD platform;
|
||||
DWORD blockIndex;
|
||||
};
|
||||
|
||||
struct MPQBlockTableEntry {
|
||||
DWORD fileOffset;
|
||||
DWORD fileSize;
|
||||
DWORD compressedSize;
|
||||
DWORD flags;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
unsigned long cryptTable[0x500];
|
||||
|
||||
void PrepareCryptTable() {
|
||||
unsigned long seed = 0x00100001, index1 = 0, index2 = 0, i;
|
||||
|
||||
for (index1 = 0; index1 < 0x100; index1++) {
|
||||
for (index2 = index1, i = 0; i < 5; i++, index2 += 0x100) {
|
||||
unsigned long temp1, temp2;
|
||||
|
||||
seed = (seed * 125 + 3) % 0x2AAAAB;
|
||||
temp1 = (seed & 0xFFFF) << 0x10;
|
||||
|
||||
seed = (seed * 125 + 3) % 0x2AAAAB;
|
||||
temp2 = (seed & 0xFFFF);
|
||||
|
||||
cryptTable[index2] = (temp1 | temp2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 哈希算法
|
||||
unsigned long HashString(const char* lpszFileName, unsigned long dwHashType) {
|
||||
unsigned char* key = (unsigned char*)lpszFileName;
|
||||
unsigned long seed1 = 0x7FED7FED, seed2 = 0xEEEEEEEE;
|
||||
int ch;
|
||||
|
||||
while (*key != 0) {
|
||||
ch = toupper(*key++);
|
||||
seed1 = cryptTable[(dwHashType << 8) + ch] ^ (seed1 + seed2);
|
||||
seed2 = ch + seed1 + seed2 + (seed2 << 5) + 3;
|
||||
}
|
||||
return seed1;
|
||||
}
|
||||
|
||||
// 解析 MPQ 文件
|
||||
void ParseMPQ(const std::string& mpqPath) {
|
||||
// 打开 MPQ 文件
|
||||
HANDLE hFile = CreateFileA(mpqPath.c_str(), GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
if (hFile == INVALID_HANDLE_VALUE) {
|
||||
std::ofstream logFile("C:\\MPQDump\\dll_error.txt", std::ios::app);
|
||||
if (logFile.is_open()) {
|
||||
logFile << "无法打开 MPQ 文件!错误代码: " << GetLastError() << std::endl;
|
||||
logFile.close();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 读取文件头
|
||||
MPQHeader header;
|
||||
DWORD bytesRead;
|
||||
if (!ReadFile(hFile, &header, sizeof(header), &bytesRead, nullptr) || bytesRead != sizeof(header)) {
|
||||
std::ofstream logFile("C:\\MPQDump\\dll_error.txt", std::ios::app);
|
||||
if (logFile.is_open()) {
|
||||
logFile << "无法读取 MPQ 文件头!错误代码: " << GetLastError() << std::endl;
|
||||
logFile.close();
|
||||
}
|
||||
CloseHandle(hFile);
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查魔数
|
||||
if (header.magic != 0x1A51504D) { // 'MPQ\x1A'
|
||||
std::ofstream logFile("C:\\MPQDump\\dll_error.txt", std::ios::app);
|
||||
if (logFile.is_open()) {
|
||||
logFile << "无效的 MPQ 文件!魔数: " << std::hex << header.magic << std::endl;
|
||||
logFile.close();
|
||||
}
|
||||
CloseHandle(hFile);
|
||||
return;
|
||||
}
|
||||
|
||||
// 读取哈希表
|
||||
std::vector<MPQHashTableEntry> hashTable(header.hashTableEntries);
|
||||
SetFilePointer(hFile, header.hashTableOffset, nullptr, FILE_BEGIN);
|
||||
if (!ReadFile(hFile, hashTable.data(), header.hashTableEntries * sizeof(MPQHashTableEntry), &bytesRead, nullptr)) {
|
||||
std::ofstream logFile("C:\\MPQDump\\dll_error.txt", std::ios::app);
|
||||
if (logFile.is_open()) {
|
||||
logFile << "无法读取哈希表!错误代码: " << GetLastError() << std::endl;
|
||||
logFile.close();
|
||||
}
|
||||
CloseHandle(hFile);
|
||||
return;
|
||||
}
|
||||
|
||||
// 读取块表
|
||||
std::vector<MPQBlockTableEntry> blockTable(header.blockTableEntries);
|
||||
SetFilePointer(hFile, header.blockTableOffset, nullptr, FILE_BEGIN);
|
||||
if (!ReadFile(hFile, blockTable.data(), header.blockTableEntries * sizeof(MPQBlockTableEntry), &bytesRead, nullptr)) {
|
||||
std::ofstream logFile("C:\\MPQDump\\dll_error.txt", std::ios::app);
|
||||
if (logFile.is_open()) {
|
||||
logFile << "无法读取块表!错误代码: " << GetLastError() << std::endl;
|
||||
logFile.close();
|
||||
}
|
||||
CloseHandle(hFile);
|
||||
return;
|
||||
}
|
||||
|
||||
// 创建输出文件
|
||||
std::ofstream mpqFile("C:\\MPQDump\\mpq_paths.txt");
|
||||
if (!mpqFile.is_open()) {
|
||||
std::ofstream logFile("C:\\MPQDump\\dll_error.txt", std::ios::app);
|
||||
if (logFile.is_open()) {
|
||||
logFile << "无法创建输出文件!" << std::endl;
|
||||
logFile.close();
|
||||
}
|
||||
CloseHandle(hFile);
|
||||
return;
|
||||
}
|
||||
|
||||
// 遍历哈希表
|
||||
for (DWORD i = 0; i < header.hashTableEntries; i++) {
|
||||
if (hashTable[i].blockIndex != 0xFFFFFFFF) { // 有效的文件条目
|
||||
mpqFile << "Entry " << i << ": HashA=" << std::hex << hashTable[i].hashA
|
||||
<< ", HashB=" << hashTable[i].hashB
|
||||
<< ", BlockIndex=" << hashTable[i].blockIndex << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
// 关闭文件
|
||||
CloseHandle(hFile);
|
||||
mpqFile.close();
|
||||
|
||||
std::ofstream logFile("C:\\MPQDump\\dll_success.txt", std::ios::app);
|
||||
if (logFile.is_open()) {
|
||||
logFile << "MPQ 文件解析完成,结果已保存到 C:\\MPQDump\\mpq_paths.txt" << std::endl;
|
||||
logFile.close();
|
||||
}
|
||||
}
|
||||
|
||||
// 线程函数:解析 MPQ 文件
|
||||
DWORD WINAPI DumpMPQPaths(LPVOID lpParam) {
|
||||
// 写入日志
|
||||
std::ofstream logFile("C:\\MPQDump\\dll_thread.txt", std::ios::app);
|
||||
if (logFile.is_open()) {
|
||||
logFile << "DumpMPQPaths 线程已启动" << std::endl;
|
||||
logFile.close();
|
||||
}
|
||||
|
||||
PrepareCryptTable();
|
||||
|
||||
ParseMPQ("D:\\wow_cn_3.3.5\\Data\\patch-3.mpq");//MPQ路径
|
||||
return 0;
|
||||
}
|
||||
13
MPQDumper/MPQDumper.h
Normal file
13
MPQDumper/MPQDumper.h
Normal file
@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// 导出函数
|
||||
__declspec(dllexport) DWORD WINAPI DumpMPQPaths(LPVOID lpParam);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
28
MPQDumper/MPQDumper.sln
Normal file
28
MPQDumper/MPQDumper.sln
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.12.35527.113 d17.12
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MPQDumper", "MPQDumper.vcxproj", "{A9ADDF85-D1B5-4002-8765-FE6E728F103D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A9ADDF85-D1B5-4002-8765-FE6E728F103D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A9ADDF85-D1B5-4002-8765-FE6E728F103D}.Debug|x64.Build.0 = Debug|x64
|
||||
{A9ADDF85-D1B5-4002-8765-FE6E728F103D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A9ADDF85-D1B5-4002-8765-FE6E728F103D}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A9ADDF85-D1B5-4002-8765-FE6E728F103D}.Release|x64.ActiveCfg = Release|x64
|
||||
{A9ADDF85-D1B5-4002-8765-FE6E728F103D}.Release|x64.Build.0 = Release|x64
|
||||
{A9ADDF85-D1B5-4002-8765-FE6E728F103D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A9ADDF85-D1B5-4002-8765-FE6E728F103D}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
159
MPQDumper/MPQDumper.vcxproj
Normal file
159
MPQDumper/MPQDumper.vcxproj
Normal file
@ -0,0 +1,159 @@
|
||||
<?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>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{a9addf85-d1b5-4002-8765-fe6e728f103d}</ProjectGuid>
|
||||
<RootNamespace>MPQDumper</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>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</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" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;MPQDUMPER_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;MPQDUMPER_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;MPQDUMPER_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;MPQDUMPER_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="MPQDumper.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp" />
|
||||
<ClCompile Include="MPQDumper.cpp" />
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">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>
|
||||
39
MPQDumper/MPQDumper.vcxproj.filters
Normal file
39
MPQDumper/MPQDumper.vcxproj.filters
Normal file
@ -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="源文件">
|
||||
<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="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<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>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="pch.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MPQDumper.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="pch.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MPQDumper.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
4
MPQDumper/MPQDumper.vcxproj.user
Normal file
4
MPQDumper/MPQDumper.vcxproj.user
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
19
MPQDumper/MPQDumper/Release/MPQDumper.Build.CppClean.log
Normal file
19
MPQDumper/MPQDumper/Release/MPQDumper.Build.CppClean.log
Normal file
@ -0,0 +1,19 @@
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\release\mpqdumper.pch
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\release\vc143.pdb
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\release\pch.obj
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\release\mpqdumper.obj
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\release\dllmain.obj
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\release\mpqdumper.dll
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\release\mpqdumper.pdb
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\release\mpqdumper.lib
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\release\mpqdumper.exp
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\release\mpqdumper.ipdb
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\release\mpqdumper.iobj
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\release\mpqdumper.tlog\cl.command.1.tlog
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\release\mpqdumper.tlog\cl.items.tlog
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\release\mpqdumper.tlog\cl.read.1.tlog
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\release\mpqdumper.tlog\cl.write.1.tlog
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\release\mpqdumper.tlog\link.command.1.tlog
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\release\mpqdumper.tlog\link.read.1.tlog
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\release\mpqdumper.tlog\link.secondary.1.tlog
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\release\mpqdumper.tlog\link.write.1.tlog
|
||||
11
MPQDumper/MPQDumper/Release/MPQDumper.dll.recipe
Normal file
11
MPQDumper/MPQDumper/Release/MPQDumper.dll.recipe
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<ProjectOutputs>
|
||||
<ProjectOutput>
|
||||
<FullPath>D:\sm_az\Tool\MPQDumper\MPQDumper\Release\MPQDumper.dll</FullPath>
|
||||
</ProjectOutput>
|
||||
</ProjectOutputs>
|
||||
<ContentFiles />
|
||||
<SatelliteDlls />
|
||||
<NonRecipeFileRefs />
|
||||
</Project>
|
||||
BIN
MPQDumper/MPQDumper/Release/MPQDumper.iobj
Normal file
BIN
MPQDumper/MPQDumper/Release/MPQDumper.iobj
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/Release/MPQDumper.ipdb
Normal file
BIN
MPQDumper/MPQDumper/Release/MPQDumper.ipdb
Normal file
Binary file not shown.
9
MPQDumper/MPQDumper/Release/MPQDumper.log
Normal file
9
MPQDumper/MPQDumper/Release/MPQDumper.log
Normal file
@ -0,0 +1,9 @@
|
||||
pch.cpp
|
||||
dllmain.cpp
|
||||
MPQDumper.cpp
|
||||
正在创建库 D:\sm_az\Tool\MPQDumper\MPQDumper\Release\MPQDumper.lib 和对象 D:\sm_az\Tool\MPQDumper\MPQDumper\Release\MPQDumper.exp
|
||||
正在生成代码
|
||||
Previous IPDB not found, fall back to full compilation.
|
||||
All 226 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
|
||||
已完成代码的生成
|
||||
MPQDumper.vcxproj -> D:\sm_az\Tool\MPQDumper\MPQDumper\Release\MPQDumper.dll
|
||||
BIN
MPQDumper/MPQDumper/Release/MPQDumper.obj
Normal file
BIN
MPQDumper/MPQDumper/Release/MPQDumper.obj
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/Release/MPQDumper.pch
Normal file
BIN
MPQDumper/MPQDumper/Release/MPQDumper.pch
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/Release/MPQDumper.tlog/CL.command.1.tlog
Normal file
BIN
MPQDumper/MPQDumper/Release/MPQDumper.tlog/CL.command.1.tlog
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/Release/MPQDumper.tlog/CL.read.1.tlog
Normal file
BIN
MPQDumper/MPQDumper/Release/MPQDumper.tlog/CL.read.1.tlog
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/Release/MPQDumper.tlog/CL.write.1.tlog
Normal file
BIN
MPQDumper/MPQDumper/Release/MPQDumper.tlog/CL.write.1.tlog
Normal file
Binary file not shown.
3
MPQDumper/MPQDumper/Release/MPQDumper.tlog/Cl.items.tlog
Normal file
3
MPQDumper/MPQDumper/Release/MPQDumper.tlog/Cl.items.tlog
Normal file
@ -0,0 +1,3 @@
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\dllmain.cpp;D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper\Release\dllmain.obj
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper.cpp;D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper\Release\MPQDumper.obj
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\pch.cpp;D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper\Release\pch.obj
|
||||
@ -0,0 +1,2 @@
|
||||
PlatformToolSet=v143:VCToolArchitecture=Native32Bit:VCToolsVersion=14.42.34433:TargetPlatformVersion=10.0.26100.0:
|
||||
Release|Win32|D:\sm_az\Tool\MPQDumper\MPQDumper\|
|
||||
BIN
MPQDumper/MPQDumper/Release/MPQDumper.tlog/link.command.1.tlog
Normal file
BIN
MPQDumper/MPQDumper/Release/MPQDumper.tlog/link.command.1.tlog
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/Release/MPQDumper.tlog/link.read.1.tlog
Normal file
BIN
MPQDumper/MPQDumper/Release/MPQDumper.tlog/link.read.1.tlog
Normal file
Binary file not shown.
@ -0,0 +1,5 @@
|
||||
^D:\SM_AZ\TOOL\MPQDUMPER\MPQDUMPER\MPQDUMPER\RELEASE\DLLMAIN.OBJ|D:\SM_AZ\TOOL\MPQDUMPER\MPQDUMPER\MPQDUMPER\RELEASE\MPQDUMPER.OBJ|D:\SM_AZ\TOOL\MPQDUMPER\MPQDUMPER\MPQDUMPER\RELEASE\PCH.OBJ
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\Release\MPQDumper.lib
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\Release\MPQDumper.EXP
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper\Release\MPQDumper.IPDB
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper\Release\MPQDumper.iobj
|
||||
BIN
MPQDumper/MPQDumper/Release/MPQDumper.tlog/link.write.1.tlog
Normal file
BIN
MPQDumper/MPQDumper/Release/MPQDumper.tlog/link.write.1.tlog
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/Release/dllmain.obj
Normal file
BIN
MPQDumper/MPQDumper/Release/dllmain.obj
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/Release/pch.obj
Normal file
BIN
MPQDumper/MPQDumper/Release/pch.obj
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/Release/vc143.pdb
Normal file
BIN
MPQDumper/MPQDumper/Release/vc143.pdb
Normal file
Binary file not shown.
19
MPQDumper/MPQDumper/x64/Release/MPQDumper.Build.CppClean.log
Normal file
19
MPQDumper/MPQDumper/x64/Release/MPQDumper.Build.CppClean.log
Normal file
@ -0,0 +1,19 @@
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\x64\release\mpqdumper.pch
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\x64\release\vc143.pdb
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\x64\release\pch.obj
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\x64\release\mpqdumper.obj
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\x64\release\dllmain.obj
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\x64\release\mpqdumper.dll
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\x64\release\mpqdumper.pdb
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\x64\release\mpqdumper.lib
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\x64\release\mpqdumper.exp
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\x64\release\mpqdumper.ipdb
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\x64\release\mpqdumper.iobj
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\x64\release\mpqdumper.tlog\cl.command.1.tlog
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\x64\release\mpqdumper.tlog\cl.items.tlog
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\x64\release\mpqdumper.tlog\cl.read.1.tlog
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\x64\release\mpqdumper.tlog\cl.write.1.tlog
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\x64\release\mpqdumper.tlog\link.command.1.tlog
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\x64\release\mpqdumper.tlog\link.read.1.tlog
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\x64\release\mpqdumper.tlog\link.secondary.1.tlog
|
||||
d:\sm_az\tool\mpqdumper\mpqdumper\mpqdumper\x64\release\mpqdumper.tlog\link.write.1.tlog
|
||||
11
MPQDumper/MPQDumper/x64/Release/MPQDumper.dll.recipe
Normal file
11
MPQDumper/MPQDumper/x64/Release/MPQDumper.dll.recipe
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<ProjectOutputs>
|
||||
<ProjectOutput>
|
||||
<FullPath>D:\sm_az\Tool\MPQDumper\MPQDumper\x64\Release\MPQDumper.dll</FullPath>
|
||||
</ProjectOutput>
|
||||
</ProjectOutputs>
|
||||
<ContentFiles />
|
||||
<SatelliteDlls />
|
||||
<NonRecipeFileRefs />
|
||||
</Project>
|
||||
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.iobj
Normal file
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.iobj
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.ipdb
Normal file
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.ipdb
Normal file
Binary file not shown.
21
MPQDumper/MPQDumper/x64/Release/MPQDumper.log
Normal file
21
MPQDumper/MPQDumper/x64/Release/MPQDumper.log
Normal file
@ -0,0 +1,21 @@
|
||||
pch.cpp
|
||||
dllmain.cpp
|
||||
MPQDumper.cpp
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper.cpp(34,28): warning C4311: “reinterpret_cast”: 从“PBYTE”到“DWORD”的指针截断
|
||||
(编译源文件“/MPQDumper.cpp”)
|
||||
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper.cpp(34,28): warning C4302: “reinterpret_cast”: 从“PBYTE”到“DWORD”截断
|
||||
(编译源文件“/MPQDumper.cpp”)
|
||||
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper.cpp(56,45): warning C4311: “reinterpret_cast”: 从“PVOID”到“DWORD”的指针截断
|
||||
(编译源文件“/MPQDumper.cpp”)
|
||||
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper.cpp(56,45): warning C4302: “reinterpret_cast”: 从“PVOID”到“DWORD”截断
|
||||
(编译源文件“/MPQDumper.cpp”)
|
||||
|
||||
正在创建库 D:\sm_az\Tool\MPQDumper\MPQDumper\x64\Release\MPQDumper.lib 和对象 D:\sm_az\Tool\MPQDumper\MPQDumper\x64\Release\MPQDumper.exp
|
||||
正在生成代码
|
||||
Previous IPDB not found, fall back to full compilation.
|
||||
All 149 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
|
||||
已完成代码的生成
|
||||
MPQDumper.vcxproj -> D:\sm_az\Tool\MPQDumper\MPQDumper\x64\Release\MPQDumper.dll
|
||||
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.obj
Normal file
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.obj
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.pch
Normal file
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.pch
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.tlog/CL.command.1.tlog
Normal file
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.tlog/CL.command.1.tlog
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.tlog/CL.read.1.tlog
Normal file
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.tlog/CL.read.1.tlog
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.tlog/CL.write.1.tlog
Normal file
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.tlog/CL.write.1.tlog
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\dllmain.cpp;D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper\x64\Release\dllmain.obj
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper.cpp;D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper\x64\Release\MPQDumper.obj
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\pch.cpp;D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper\x64\Release\pch.obj
|
||||
@ -0,0 +1,2 @@
|
||||
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.42.34433:TargetPlatformVersion=10.0.26100.0:
|
||||
Release|x64|D:\sm_az\Tool\MPQDumper\MPQDumper\|
|
||||
Binary file not shown.
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.tlog/link.read.1.tlog
Normal file
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.tlog/link.read.1.tlog
Normal file
Binary file not shown.
@ -0,0 +1,5 @@
|
||||
^D:\SM_AZ\TOOL\MPQDUMPER\MPQDUMPER\MPQDUMPER\X64\RELEASE\DLLMAIN.OBJ|D:\SM_AZ\TOOL\MPQDUMPER\MPQDUMPER\MPQDUMPER\X64\RELEASE\MPQDUMPER.OBJ|D:\SM_AZ\TOOL\MPQDUMPER\MPQDUMPER\MPQDUMPER\X64\RELEASE\PCH.OBJ
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\x64\Release\MPQDumper.lib
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\x64\Release\MPQDumper.EXP
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper\x64\Release\MPQDumper.IPDB
|
||||
D:\sm_az\Tool\MPQDumper\MPQDumper\MPQDumper\x64\Release\MPQDumper.iobj
|
||||
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.tlog/link.write.1.tlog
Normal file
BIN
MPQDumper/MPQDumper/x64/Release/MPQDumper.tlog/link.write.1.tlog
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/x64/Release/dllmain.obj
Normal file
BIN
MPQDumper/MPQDumper/x64/Release/dllmain.obj
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/x64/Release/pch.obj
Normal file
BIN
MPQDumper/MPQDumper/x64/Release/pch.obj
Normal file
Binary file not shown.
BIN
MPQDumper/MPQDumper/x64/Release/vc143.pdb
Normal file
BIN
MPQDumper/MPQDumper/x64/Release/vc143.pdb
Normal file
Binary file not shown.
24
MPQDumper/dllmain.cpp
Normal file
24
MPQDumper/dllmain.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
#include "pch.h"
|
||||
#include <windows.h>
|
||||
#include "MPQDumper.h"
|
||||
#include <fstream>
|
||||
|
||||
// DLL 入口点
|
||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
|
||||
if (ul_reason_for_call == DLL_PROCESS_ATTACH) {
|
||||
// 创建目录
|
||||
CreateDirectoryA("C:\\MPQDump", NULL);
|
||||
|
||||
// 写入日志
|
||||
std::ofstream logFile("C:\\MPQDump\\dll_load.txt");
|
||||
if (logFile.is_open()) {
|
||||
logFile << "DLL已加载" << std::endl;
|
||||
logFile.close();
|
||||
}
|
||||
|
||||
// 延迟创建线程,避免DLL加载时的线程安全问题
|
||||
Sleep(5000); // 延迟5秒,确保游戏完全加载
|
||||
CreateThread(NULL, 0, DumpMPQPaths, NULL, 0, NULL);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
5
MPQDumper/framework.h
Normal file
5
MPQDumper/framework.h
Normal file
@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的内容
|
||||
// Windows 头文件
|
||||
#include <windows.h>
|
||||
5
MPQDumper/pch.cpp
Normal file
5
MPQDumper/pch.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
// pch.cpp: 与预编译标头对应的源文件
|
||||
|
||||
#include "pch.h"
|
||||
|
||||
// 当使用预编译的头时,需要使用此源文件,编译才能成功。
|
||||
13
MPQDumper/pch.h
Normal file
13
MPQDumper/pch.h
Normal file
@ -0,0 +1,13 @@
|
||||
// pch.h: 这是预编译标头文件。
|
||||
// 下方列出的文件仅编译一次,提高了将来生成的生成性能。
|
||||
// 这还将影响 IntelliSense 性能,包括代码完成和许多代码浏览功能。
|
||||
// 但是,如果此处列出的文件中的任何一个在生成之间有更新,它们全部都将被重新编译。
|
||||
// 请勿在此处添加要频繁更新的文件,这将使得性能优势无效。
|
||||
|
||||
#ifndef PCH_H
|
||||
#define PCH_H
|
||||
|
||||
// 添加要在此处预编译的标头
|
||||
#include "framework.h"
|
||||
|
||||
#endif //PCH_H
|
||||
Loading…
x
Reference in New Issue
Block a user