• 彻底解决win11系统0x80070032


    经过各种尝试,终于找到原因。第一个是电脑加密软件,第二个是需要的部分功能没有开启,第三个BIOS设置。个人觉得第三个不重要。

    解决方法

    笔记本型号

    笔记本型号是Thinkpad T14 gen2。进入BIOS的按键是按住Enter键。

    1、关闭山丽防水墙服务

    这个公司安装的加密软件,没有的直接忽略即可。直接按住s键,然后搜索,全名是【Sanlen WaterValue Client Service】,先停止这个服务,然后右键-属性,把它改为手动或者禁用。装完系统后再给启动就行。如果部关闭服务,那个软件的进程无法关闭,会自动重启。

    2、 关闭进程

    同时按住ESC+Shift+Ctrl三个按键,会出现任务管理器,然后找到山丽防水墙,关闭它。

    3、BIOS设置

    • 进入BIOS,找到Inter virtualizationvirtual dma kernel选项将其置为disable状态(也有人说只关闭dma即可,但是对我没有作用)。按照下图设置就行。

     4、windows功能启动

    这个比较重要,开启Hyper-V,适用于Linux的子系统,虚拟机平台,这个三个都开启。

    5、完结。

    6、去水印

    系统安装好之后,右下角会显示windows系统的信息,因为不是正版,我们需要一个小工具来解决

    百度搜索【UniversalWatermarkDisabler】这个工具,

    这里添加一个下载地址Universal Watermark Disabler下载_Universal Watermark Disabler官方版下载[系统水印去除]-下载之家

    -----华丽的分割线,以下是凑字数,大家不用花时间看,快去改代码-----

    -----华丽的分割线,以下是凑字数,大家不用花时间看,快去改代码-----

    -----华丽的分割线,以下是凑字数,大家不用花时间看,快去改代码-----

    以下是凑字数的,如果有使用的问题,欢迎大家交流。

    工具去水印原理

    分析painter_x64.dll

    1. BOOL __stdcall DllEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
    2. {
    3. HMODULE v4; // rbx
    4. HMODULE v5; // rax
    5. BOOL (__stdcall *ExtTextOutW)(HDC, int, int, UINT, const RECT *, LPCWSTR, UINT, const INT *); // rax
    6. HMODULE v7; // rax
    7. int (__stdcall *LoadStringW)(HINSTANCE, UINT, LPWSTR, int); // rax
    8. const CHAR *v9; // rcx
    9. HMODULE v10; // rax
    10. if ( fdwReason == 1 )
    11. {
    12. OutputDebugStringA("Loaded");
    13. v4 = GetModuleHandleW(L"shell32.dll");
    14. if ( v4 )
    15. {
    16. v5 = GetModuleHandleW(L"gdi32.dll");
    17. ExtTextOutW = (BOOL (__stdcall *)(HDC, int, int, UINT, const RECT *, LPCWSTR, UINT, const INT *))GetProcAddress(v5, "ExtTextOutW");
    18. if ( ExtTextOutW )
    19. sub_180001000("gdi32.dll", (__int64)ExtTextOutW, (__int64)sub_180001120, (__int64)v4);
    20. v7 = GetModuleHandleW(L"api-ms-win-core-libraryloader-l1-2-0.dll");
    21. LoadStringW = (int (__stdcall *)(HINSTANCE, UINT, LPWSTR, int))GetProcAddress(v7, "LoadStringW");
    22. if ( LoadStringW )
    23. {
    24. v9 = "api-ms-win-core-libraryloader-l1-2-0.dll";
    25. LABEL_9:
    26. sub_180001000(v9, (__int64)LoadStringW, (__int64)sub_180001100, (__int64)v4);
    27. goto LABEL_10;
    28. }
    29. v10 = GetModuleHandleW(L"api-ms-win-core-libraryloader-l1-1-1.dll");
    30. LoadStringW = (int (__stdcall *)(HINSTANCE, UINT, LPWSTR, int))GetProcAddress(v10, "LoadStringW");
    31. if ( LoadStringW )
    32. {
    33. v9 = "api-ms-win-core-libraryloader-l1-1-1.dll";
    34. goto LABEL_9;
    35. }
    36. }
    37. LABEL_10:
    38. DisableThreadLibraryCalls(hinstDLL);
    39. }
    40. return 1;
    41. }

    sub_180001000

    1. __int64 __fastcall sub_180001000(LPCSTR lpString2, __int64 a2, __int64 a3, __int64 a4)
    2. {
    3. _DWORD *v8; // rbx
    4. unsigned int i; // eax
    5. __int64 *v10; // rbx
    6. DWORD flOldProtect; // [rsp+40h] [rbp+8h] BYREF
    7. if ( !lpString2 || !a2 || !a3 )
    8. return 0i64;
    9. v8 = (_DWORD *)(a4 + *(unsigned int *)(*(int *)(a4 + 60) + a4 + 144));
    10. for ( i = v8[3]; i; v8 += 5 )
    11. {
    12. if ( !lstrcmpiA((LPCSTR)(a4 + i), lpString2) )
    13. break;
    14. i = v8[8];
    15. }
    16. if ( !v8[3] )
    17. return 0i64;
    18. v10 = (__int64 *)(a4 + (unsigned int)v8[4]);
    19. if ( !*v10 )
    20. return 0i64;
    21. do
    22. {
    23. if ( *v10 == a2 )
    24. break;
    25. ++v10;
    26. }
    27. while ( *v10 );
    28. if ( !*v10 )
    29. return 0i64;
    30. VirtualProtect(v10, 8ui64, 0x40u, &flOldProtect);
    31. *v10 = a3;
    32. VirtualProtect(v10, 8ui64, flOldProtect, &flOldProtect);
    33. return 1i64;
    34. }

    sub_180001120

    1. BOOL __fastcall sub_180001120(HDC a1, int a2, int a3, UINT a4, const RECT *a5, const WCHAR *a6, UINT a7, const INT *a8)
    2. {
    3. BOOL result; // eax
    4. if ( a4 || !a7 )
    5. result = ExtTextOutW(a1, a2, a3, a4, a5, a6, a7, a8);
    6. else
    7. result = 1;
    8. return result;
    9. }

    头文件

    1. typedef BOOL(*EXTTEXTOUTW)(HDC hdc, int x, int y, UINT options, RECT* lprect, LPCWSTR lpString, UINT c, INT* lpDx);
    2. typedef int (*GETIAT)(PVOID, BOOLEAN, USHORT, PULONG);
    3. typedef int(__fastcall* LOADSTRINGW)(HINSTANCE, UINT, LPWSTR, int);
    4. extern HMODULE hShell32;
    5. extern HMODULE hGdi32;
    6. extern HMODULE hDbgHelp;
    7. extern EXTTEXTOUTW pExtTextOutW;
    8. extern GETIAT pGetIAT;
    9. void InitializeHook();
    10. BOOL HookFunction(LPCSTR szDllName, PVOID pFuncAddress, PVOID pHookFuncAddess, HMODULE hMod);
    11. BOOL __stdcall MyExtTextOutW(HDC hdc, int x, int y, UINT options, RECT* lprect, LPCWSTR lpString, UINT c, INT* lpDx);
    12. int __fastcall MyLoadStringW(HINSTANCE hInstance, UINT uID, LPWSTR lpBuffer, int cchBufferMax);

     cpp文件

    1. #include "pch.h"
    2. #include "Implement.h"
    3. #include
    4. #include
    5. #pragma comment(lib, "dbghelp.lib")
    6. #pragma comment(linker, "/EXPORT:DllCanUnloadNow=explorerframe.DllCanUnloadNow,@1")
    7. #pragma comment(linker, "/EXPORT:DllGetClassObject=explorerframe.DllGetClassObject,@2")
    8. HMODULE hShell32 = NULL;
    9. HMODULE hGdi32 = NULL;
    10. HMODULE hDbgHelp = NULL;
    11. EXTTEXTOUTW pExtTextOutW = NULL;
    12. GETIAT pGetIAT = NULL;
    13. void InitializeHook()
    14. {
    15. do
    16. {
    17. hShell32 = GetModuleHandleW(L"shell32.dll");
    18. if (hShell32 == NULL)
    19. {
    20. break;
    21. }
    22. hGdi32 = GetModuleHandleW(L"gdi32.dll");
    23. if (hGdi32 == NULL)
    24. {
    25. break;
    26. }
    27. pExtTextOutW = (EXTTEXTOUTW)GetProcAddress(hGdi32, "ExtTextOutW");
    28. if (pExtTextOutW == NULL)
    29. {
    30. break;
    31. }
    32. HMODULE hModuleApiMsWinCoreLibraryloader_l1_2_0 = GetModuleHandleW(L"api-ms-win-core-libraryloader-l1-2-0.dll");
    33. LOADSTRINGW pLoadStringW = (LOADSTRINGW)GetProcAddress(hModuleApiMsWinCoreLibraryloader_l1_2_0, "LoadStringW");
    34. if (pLoadStringW)
    35. {
    36. HookFunction("api-ms-win-core-libraryloader-l1-2-0.dll", pLoadStringW, MyLoadStringW, hShell32);
    37. }
    38. else
    39. {
    40. HMODULE hModuleApiMsWinCoreLibraryloader_l1_1_1 = GetModuleHandleW(L"api-ms-win-core-libraryloader-l1-1-1.dll");
    41. pLoadStringW = (LOADSTRINGW)GetProcAddress(hModuleApiMsWinCoreLibraryloader_l1_1_1, "LoadStringW");
    42. if (pLoadStringW)
    43. {
    44. HookFunction("api-ms-win-core-libraryloader-l1-1-1.dll", pLoadStringW, MyLoadStringW, hShell32);
    45. }
    46. }
    47. BOOL OK = HookFunction("gdi32.dll", pExtTextOutW, MyExtTextOutW, hShell32);
    48. } while (false);
    49. }
    50. int __fastcall MyLoadStringW(HINSTANCE hInstance, UINT uID, LPWSTR lpBuffer, int cchBufferMax)
    51. {
    52. if (uID - 62000 <= 1)
    53. {
    54. return 0;
    55. }
    56. else
    57. {
    58. return LoadStringW(hInstance, uID, lpBuffer, cchBufferMax);
    59. }
    60. }
    61. BOOL HookFunction(LPCSTR szDllName, PVOID pFuncAddress, PVOID pHookFuncAddess, HMODULE hMod)
    62. {
    63. if ((szDllName == NULL) ||
    64. (pFuncAddress == NULL) ||
    65. (pHookFuncAddess == NULL) ||
    66. (hMod == NULL))
    67. {
    68. return FALSE;
    69. }
    70. ULONG ulSize = 0;
    71. PIMAGE_IMPORT_DESCRIPTOR pImportDescriptor =
    72. (PIMAGE_IMPORT_DESCRIPTOR)ImageDirectoryEntryToData(
    73. hMod,
    74. TRUE,
    75. IMAGE_DIRECTORY_ENTRY_IMPORT,
    76. &ulSize);
    77. CStringA strModuleName = "";
    78. while (pImportDescriptor->Name)
    79. {
    80. PSTR pszModuleName = (PSTR)((PBYTE)hMod + pImportDescriptor->Name);
    81. strModuleName = pszModuleName;
    82. if (strModuleName.CompareNoCase(szDllName) == 0)
    83. {
    84. break;
    85. }
    86. pImportDescriptor++;
    87. }
    88. if (strModuleName.GetLength() > 0)
    89. {
    90. PIMAGE_THUNK_DATA pThunk =
    91. (PIMAGE_THUNK_DATA)((PBYTE)hMod + pImportDescriptor->FirstThunk);
    92. while (pThunk->u1.Function)
    93. {
    94. PROC* ppfn = (PROC*)&pThunk->u1.Function;
    95. BOOL bFound = (*ppfn == pFuncAddress);
    96. if (bFound)
    97. {
    98. MEMORY_BASIC_INFORMATION mbi = { 0 };
    99. VirtualQuery(
    100. ppfn,
    101. &mbi,
    102. sizeof(MEMORY_BASIC_INFORMATION)
    103. );
    104. VirtualProtect(
    105. mbi.BaseAddress,
    106. mbi.RegionSize,
    107. PAGE_READWRITE,
    108. &mbi.Protect
    109. );
    110. *ppfn = ((PROC)pHookFuncAddess);
    111. VirtualProtect(
    112. mbi.BaseAddress,
    113. mbi.RegionSize,
    114. mbi.Protect,
    115. &mbi.Protect
    116. );
    117. return TRUE;
    118. }
    119. pThunk++;
    120. }
    121. }
    122. return FALSE;
    123. }
    124. BOOL __stdcall MyExtTextOutW(HDC hdc, int x, int y, UINT options, RECT* lprect, LPCWSTR lpString, UINT c, INT* lpDx)
    125. {
    126. BOOL bResult = FALSE;
    127. //CString str = lpString;
    128. //if (str.Find(L"测试模式") != -1 ||
    129. // str.Find(L"Windows ") != -1 ||
    130. // str.Find(L"Build ") != -1)
    131. //{
    132. // return TRUE;
    133. //}
    134. if ((options != 0) || (c == 0))
    135. {
    136. return ExtTextOutW(hdc, x, y, options, lprect, lpString, c, lpDx);
    137. }
    138. return TRUE;
    139. }
    140. BOOL APIENTRY DllMain(HMODULE hModule,
    141. DWORD ul_reason_for_call,
    142. LPVOID lpReserved
    143. )
    144. {
    145. switch (ul_reason_for_call)
    146. {
    147. case DLL_PROCESS_ATTACH:
    148. {
    149. InitializeHook();
    150. DisableThreadLibraryCalls(hModule);
    151. }
    152. break;
    153. case DLL_THREAD_ATTACH:
    154. case DLL_THREAD_DETACH:
    155. case DLL_PROCESS_DETACH:
    156. break;
    157. }
    158. return TRUE;
    159. }
  • 相关阅读:
    Facebook的ZeRO算法原理及简单代码实验(小显卡训大模型)
    java基础—String
    【小沐学Python】Python实现在线电子书(MkDocs + readthedocs + github + Markdown)
    文件属性和目录
    Airtest新手升级:一个相对完整的纯.py脚本是怎样子的
    使用手机通过Ip访问react项目 记录
    动态链接库(七)--解决不同调用约定导致的名字改编问题
    计算机基础知识34
    【LeetCode刷题-双指针】--16.最接近的三数之和
    Android--Map集合的使用
  • 原文地址:https://blog.csdn.net/renkai721/article/details/133177443