好吧,答案很好,这只是展示如何在命令行中使用windbg 到达的补充
dbh 是windbg 安装中的一个实用程序,它可以加载任何二进制文件并使用它提供大量静态信息,而windbg cdb.exe 的命令行版本则可以在两个命令中获取方法(注意方法名称已被破坏)
C:\>dbh c:\Windows\System32\cmlua.dll "x CCM*" | grep -i vf
11 1002d58 : CCMLuaUtil::`vftable'
C:\>cdb -c "dps cmlua.dll+2d58" -z c:\Windows\System32\cmlua.dll
Microsoft (R) Windows Debugger Version 10.0.16299.15 X86
Loading Dump File [c:\Windows\System32\cmlua.dll]
cmlua!_DllMainCRTStartup:
100061e7 8bff mov edi,edi
0:000> cdb: Reading initial command 'dps cmlua.dll+2d58'
10002d58 100042ad cmlua!CCMLuaUtil::QueryInterface
10002d5c 10004e82 cmlua!CCMLuaUtil::AddRef
10002d60 10004279 cmlua!CCMLuaUtil::Release
10002d64 10004346 cmlua!CCMLuaUtil::SetRasCredentials
10002d68 10004401 cmlua!CCMLuaUtil::SetRasEntryProperties
10002d6c 100044dd cmlua!CCMLuaUtil::DeleteRasEntry
10002d70 10004573 cmlua!CCMLuaUtil::LaunchInfSection
10002d74 100045e1 cmlua!CCMLuaUtil::LaunchInfSectionEx
10002d78 10004630 cmlua!CCMLuaUtil::CreateLayerDirectory
10002d7c 1000466e cmlua!CCMLuaUtil::ShellExec
10002d80 10004690 cmlua!CCMLuaUtil::SetRegistryStringValue
10002d84 10004701 cmlua!CCMLuaUtil::DeleteRegistryStringValue
10002d88 100055da cmlua!CCMLuaUtil::DeleteRegKeysWithoutSubKeys
10002d8c 10004767 cmlua!CCMLuaUtil::DeleteRegTree
10002d90 100048cc cmlua!CCMLuaUtil::ExitWindowsFunc
10002d94 10005c72 cmlua!CCMLuaUtil::AllowAccessToTheWorld
10002d98 100048d9 cmlua!CCMLuaUtil::CreateFileAndClose
10002d9c 1000560f cmlua!CCMLuaUtil::DeleteHiddenCmProfileFiles
10002da0 1000492a cmlua!CCMLuaUtil::CallCustomActionDll
10002da4 10004b6c cmlua!CCMLuaUtil::RunCustomActionExe
10002da8 10004c2c cmlua!CCMLuaUtil::SetRasSubEntryProperties
10002dac 10004d0e cmlua!CCMLuaUtil::DeleteRasSubEntry
10002db0 10004da7 cmlua!CCMLuaUtil::SetCustomAuthData
10002db4 10005cdb cmlua!CCMLuaUtil::`vector deleting destructor'
10002db8 00000000
10002dbc 10009138 cmlua!hProxyDll+0x10
10002dc0 10009188 cmlua!hProxyDll+0x60
10002dc4 00000000
10002dc8 69727453
10002dcc 6343676e
10002dd0 706f4368
10002dd4 20784579
0:000>
现在 dbh 有一个开关 -d 将输出损坏的名称,您可以利用该开关将参数打印到方法
C:\>echo off
for /F %i in ('dbh -d c:\Windows\System32\cmlua.dll "x *CCM*" ^| awk "{print $4}"') do dbh c:\windows\system32\cmlua.
dll undec %i
?Release@CCMLuaUtil@@UAGKXZ =
public: virtual unsigned long __stdcall CCMLuaUtil::Release(void)
??_ECCMLuaUtil@@UAEPAXI@Z =
public: virtual void * __thiscall CCMLuaUtil::`vector deleting destructor'(unsigned int)
??0CCMLuaUtil@@QAE@XZ =
public: __thiscall CCMLuaUtil::CCMLuaUtil(void)
?AddRef@CCMLuaUtil@@UAGKXZ =
public: virtual unsigned long __stdcall CCMLuaUtil::AddRef(void)
?CreateFileAndClose@CCMLuaUtil@@UAGJPBGKKKK@Z =
public: virtual long __stdcall CCMLuaUtil::CreateFileAndClose(unsigned short const *,unsigned long,unsigned long,unsigne
d long,unsigned long)
?DeleteHiddenCmProfileFiles@CCMLuaUtil@@UAGJPBG@Z =
public: virtual long __stdcall CCMLuaUtil::DeleteHiddenCmProfileFiles(unsigned short const *)
??_GCCMLuaUtil@@UAEPAXI@Z =
public: virtual void * __thiscall CCMLuaUtil::`scalar deleting destructor'(unsigned int)
?SetRasSubEntryProperties@CCMLuaUtil@@UAGJPBG0KPAPAGK@Z =
public: virtual long __stdcall CCMLuaUtil::SetRasSubEntryProperties(unsigned short const *,unsigned short const *,unsign
ed long,unsigned short * *,unsigned long)
?QueryInterface@CCMLuaUtil@@UAGJABU_GUID@@PAPAX@Z =
public: virtual long __stdcall CCMLuaUtil::QueryInterface(struct _GUID const &,void * *)
?CCMLuaUtil_CreateInstance@@YGJABU_GUID@@PAPAX@Z =
long __stdcall CCMLuaUtil_CreateInstance(struct _GUID const &,void * *)
?ExitWindowsFunc@CCMLuaUtil@@UAGJXZ =
public: virtual long __stdcall CCMLuaUtil::ExitWindowsFunc(void)
?CreateLayerDirectory@CCMLuaUtil@@UAGJPBG@Z =
public: virtual long __stdcall CCMLuaUtil::CreateLayerDirectory(unsigned short const *)
?LaunchInfSectionEx@CCMLuaUtil@@UAGJPBG0K@Z =
public: virtual long __stdcall CCMLuaUtil::LaunchInfSectionEx(unsigned short const *,unsigned short const *,unsigned lon
g)
?ShellExec@CCMLuaUtil@@UAGJPBG00KK@Z =
public: virtual long __stdcall CCMLuaUtil::ShellExec(unsigned short const *,unsigned short const *,unsigned short const
*,unsigned long,unsigned long)
?DeleteRasEntry@CCMLuaUtil@@UAGJPBG0@Z =
public: virtual long __stdcall CCMLuaUtil::DeleteRasEntry(unsigned short const *,unsigned short const *)
?DeleteRegistryStringValue@CCMLuaUtil@@UAGJHPBG0@Z =
public: virtual long __stdcall CCMLuaUtil::DeleteRegistryStringValue(int,unsigned short const *,unsigned short const *)
??_7CCMLuaUtil@@6B@ =
const CCMLuaUtil::`vftable'
?LaunchInfSection@CCMLuaUtil@@UAGJPBG00H@Z =
public: virtual long __stdcall CCMLuaUtil::LaunchInfSection(unsigned short const *,unsigned short const *,unsigned short
const *,int)
?SetCustomAuthData@CCMLuaUtil@@UAGJPBG00K@Z =
public: virtual long __stdcall CCMLuaUtil::SetCustomAuthData(unsigned short const *,unsigned short const *,unsigned shor
t const *,unsigned long)
?DeleteRasSubEntry@CCMLuaUtil@@UAGJPBG0K@Z =
public: virtual long __stdcall CCMLuaUtil::DeleteRasSubEntry(unsigned short const *,unsigned short const *,unsigned long
)
?DeleteRegTree@CCMLuaUtil@@UAGJHPBG@Z =
public: virtual long __stdcall CCMLuaUtil::DeleteRegTree(int,unsigned short const *)
?DeleteRegKeysWithoutSubKeys@CCMLuaUtil@@UAGJHPBGH@Z =
public: virtual long __stdcall CCMLuaUtil::DeleteRegKeysWithoutSubKeys(int,unsigned short const *,int)
?CallCustomActionDll@CCMLuaUtil@@UAGJPBG000PAK@Z =
public: virtual long __stdcall CCMLuaUtil::CallCustomActionDll(unsigned short const *,unsigned short const *,unsigned sh
ort const *,unsigned short const *,unsigned long *)
?SetRegistryStringValue@CCMLuaUtil@@UAGJHPBG00@Z =
public: virtual long __stdcall CCMLuaUtil::SetRegistryStringValue(int,unsigned short const *,unsigned short const *,unsi
gned short const *)
?SetRasCredentials@CCMLuaUtil@@UAGJPBG00H@Z =
public: virtual long __stdcall CCMLuaUtil::SetRasCredentials(unsigned short const *,unsigned short const *,unsigned shor
t const *,int)
?SetRasEntryProperties@CCMLuaUtil@@UAGJPBG0PAPAGK@Z =
public: virtual long __stdcall CCMLuaUtil::SetRasEntryProperties(unsigned short const *,unsigned short const *,unsigned
short * *,unsigned long)
?AllowAccessToTheWorld@CCMLuaUtil@@UAGJPBG@Z =
public: virtual long __stdcall CCMLuaUtil::AllowAccessToTheWorld(unsigned short const *)
?RunCustomActionExe@CCMLuaUtil@@UAGJPBG0PAPAG@Z =
public: virtual long __stdcall CCMLuaUtil::RunCustomActionExe(unsigned short const *,unsigned short const *,unsigned sho
rt * *)