我有这么一段代码,我使用的是VS2010IDE,直接编译Release模式,开O2,谁能猜到编译器怎么给我编的

 typedef HRESULT (__stdcall *FTSHGetFolderLocation)(HWND hwndOwner,
int nFolder,
HANDLE hToken,
DWORD dwReserved,
void *ppidl
);
typedef HRESULT (__stdcall *FTSHGetFolderPathW)(
_In_ HWND hwndOwner,
_In_ int nFolder,
_In_ HANDLE hToken,
_In_ DWORD dwFlags,
_Out_ LPTSTR pszPath
);
typedef BOOL (__stdcall *FTSHGetPathFromIDListW)(
_In_ void *pidl,
_Out_ LPTSTR pszPath
);
typedef void (__stdcall *FTILFree)(
_In_ VOID *pidl
);
typedef BOOL (WINAPI *FTGetFileAttributesExW)(
__in LPCWSTR lpFileName,
__in GET_FILEEX_INFO_LEVELS fInfoLevelId,
__out LPVOID lpFileInformation
);
typedef BOOL (WINAPI *FTCreateDirectoryA)(
__in LPCSTR lpPathName,
__in LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
typedef DWORD (WINAPI *FTGetTempPathA)(
_In_ DWORD nBufferLength,
_Out_ LPSTR lpBuffer
); typedef WINADVAPI LSTATUS (APIENTRY *FTRegOpenKeyExW) (
__in HKEY hKey,
__in_opt LPCWSTR lpSubKey,
__reserved DWORD ulOptions,
__in REGSAM samDesired,
__out PHKEY phkResult
); typedef WINADVAPI
LSTATUS
(APIENTRY *FTRegQueryValueExW)(
__in HKEY hKey,
__in_opt LPCWSTR lpValueName,
__reserved LPDWORD lpReserved,
__out_opt LPDWORD lpType,
__out_bcount_part_opt(*lpcbData, *lpcbData) __out_data_source(REGISTRY) LPBYTE lpData,
__inout_opt LPDWORD lpcbData
); typedef WINADVAPI
LSTATUS
(APIENTRY *FTRegCloseKey)(
__in HKEY hKey
); typedef HRESULT (__stdcall* FTCoInitialize)(
_In_opt_ LPVOID pvReserved
); typedef HRESULT (__stdcall* FTCoCreateInstance)(
__in REFCLSID rclsid,
__in_opt LPUNKNOWN pUnkOuter,
__in DWORD dwClsContext,
__in REFIID riid,
__deref_out LPVOID FAR* ppv); typedef void (__stdcall* FTCoUninitialize)(void); typedef BOOL (__stdcall* FTPathRemoveFileSpecW)(
__inout LPWSTR pszPath
); typedef BOOL (WINAPI* FTDeleteFileW)(
_In_ LPCWSTR lpFileName
); #define START_FUNC_ARRAY() \
struct FunctionArray \
{ \
long size
#define ADD_FUN_ARRAY(_M_, _N_) \
FT ## _N_ p ## _N_
#define END_FUNC_ARRAY() \
} #define GET_MODE_PROC_ADDRESS(_M_, _F_, _T_, _V_) \
do \
{ \
_V_ = (_T_)GetProcAddress(::LoadLibraryA(_M_), _F_); \
if (_V_ == NULL) \
{ \
ErrorLog(); \
return FALSE; \
} \
} while (FALSE) #define GET_PROC_ADDRESS(__M_, __F_) \
GET_MODE_PROC_ADDRESS(__M_, #__F_, FT ## __F_, g_funArray.p ## __F_) #define CALL(_F_) \
g_funArray.p ## _F_ START_FUNC_ARRAY();
ADD_FUN_ARRAY("shell32.dll", SHGetFolderLocation);
ADD_FUN_ARRAY("shell32.dll", SHGetFolderPathW);
ADD_FUN_ARRAY("shell32.dll", SHGetPathFromIDListW);
ADD_FUN_ARRAY("shell32.dll", ILFree); ADD_FUN_ARRAY("Kernel32.dll", GetFileAttributesExW);
ADD_FUN_ARRAY("Kernel32.dll", CreateDirectoryA);
ADD_FUN_ARRAY("Kernel32.dll", GetTempPathA);
ADD_FUN_ARRAY("Kernel32.dll", DeleteFileW); ADD_FUN_ARRAY("Advapi32.dll", RegOpenKeyExW);
ADD_FUN_ARRAY("Advapi32.dll", RegQueryValueExW);
ADD_FUN_ARRAY("Advapi32.dll", RegCloseKey); ADD_FUN_ARRAY("Ole32.dll", CoInitialize);
ADD_FUN_ARRAY("Ole32.dll", CoCreateInstance);
ADD_FUN_ARRAY("Ole32.dll", CoUninitialize); ADD_FUN_ARRAY("Shlwapi.dll", PathRemoveFileSpecW);
END_FUNC_ARRAY(); FunctionArray g_funArray = {sizeof(FunctionArray)}; BOOL InitFunction()
{
GET_PROC_ADDRESS("shell32.dll" , SHGetFolderLocation);
GET_PROC_ADDRESS("shell32.dll" , SHGetFolderPathW);
GET_PROC_ADDRESS("shell32.dll" , SHGetPathFromIDListW);
GET_PROC_ADDRESS("shell32.dll" , ILFree); GET_PROC_ADDRESS("Kernel32.dll" , GetFileAttributesExW);
GET_PROC_ADDRESS("Kernel32.dll" , CreateDirectoryA);
GET_PROC_ADDRESS("Kernel32.dll" , GetTempPathA);
GET_PROC_ADDRESS("Kernel32.dll" , DeleteFileW); GET_PROC_ADDRESS("Advapi32.dll" , RegOpenKeyExW);
GET_PROC_ADDRESS("Advapi32.dll" , RegQueryValueExW);
GET_PROC_ADDRESS("Advapi32.dll" , RegCloseKey); GET_PROC_ADDRESS("Ole32.dll" , CoInitialize);
GET_PROC_ADDRESS("Ole32.dll" , CoCreateInstance);
GET_PROC_ADDRESS("Ole32.dll" , CoUninitialize); GET_PROC_ADDRESS("Shlwapi.dll" , PathRemoveFileSpecW);
return TRUE;
}

先猜猜看,猜不到的往下看

 ; __int64 Initialize(void)
?Initialize@@YAHXZ proc near ; CODE XREF: DllMain+51p
; DATA XREF: .pdata:000000018000E060o
sub rsp, 28h
lea rcx, LibFileName ; "shell32.dll"
call cs:LoadLibraryA
lea rdx, ProcName ; "SHGetFolderLocation"
mov rcx, rax ; hModule
call cs:GetProcAddress
mov cs:qword_18000CED0, rax
test rax, rax
jnz short loc_180002154 loc_18000214D: ; CODE XREF: Initialize(void)+5Bj
; Initialize(void)+84j ...
xor eax, eax
add rsp, 28h
retn
; --------------------------------------------------------------------------- loc_180002154: ; CODE XREF: Initialize(void)+2Bj
lea rcx, LibFileName ; "shell32.dll"
call cs:LoadLibraryA
lea rdx, aShgetfolderpat ; "SHGetFolderPathW"
mov rcx, rax ; hModule
call cs:GetProcAddress
mov cs:qword_18000CED8, rax
test rax, rax
jz short loc_18000214D
lea rcx, LibFileName ; "shell32.dll"
call cs:LoadLibraryA
lea rdx, aShgetpathfromi ; "SHGetPathFromIDListW"
mov rcx, rax ; hModule
call cs:GetProcAddress
mov cs:qword_18000CEE0, rax
test rax, rax
jz short loc_18000214D
lea rcx, LibFileName ; "shell32.dll"
call cs:LoadLibraryA
lea rdx, aIlfree ; "ILFree"
mov rcx, rax ; hModule
call cs:GetProcAddress
mov cs:qword_18000CEE8, rax
test rax, rax
jz loc_18000214D
lea rcx, aKernel32_dll_0 ; "Kernel32.dll"
call cs:LoadLibraryA
lea rdx, aGetfileattribu ; "GetFileAttributesExW"
mov rcx, rax ; hModule
call cs:GetProcAddress
mov cs:qword_18000CEF0, rax
test rax, rax
jz loc_18000214D
lea rcx, aKernel32_dll_0 ; "Kernel32.dll"
call cs:LoadLibraryA
lea rdx, aCreatedirector ; "CreateDirectoryA"
mov rcx, rax ; hModule
call cs:GetProcAddress
mov cs:qword_18000CEF8, rax
test rax, rax
jz loc_18000214D
lea rcx, aKernel32_dll_0 ; "Kernel32.dll"
call cs:LoadLibraryA
lea rdx, aGettemppatha ; "GetTempPathA"
mov rcx, rax ; hModule
call cs:GetProcAddress
mov cs:qword_18000CF00, rax
test rax, rax
jz loc_18000214D
lea rcx, aKernel32_dll_0 ; "Kernel32.dll"
call cs:LoadLibraryA
lea rdx, aDeletefilew ; "DeleteFileW"
mov rcx, rax ; hModule
call cs:GetProcAddress
mov cs:qword_18000CF40, rax
test rax, rax
jz loc_18000214D
lea rcx, aAdvapi32_dll ; "Advapi32.dll"
call cs:LoadLibraryA
lea rdx, aRegopenkeyexw ; "RegOpenKeyExW"
mov rcx, rax ; hModule
call cs:GetProcAddress
mov cs:qword_18000CF08, rax
test rax, rax
jz loc_18000214D
lea rcx, aAdvapi32_dll ; "Advapi32.dll"
call cs:LoadLibraryA
lea rdx, aRegqueryvaluee ; "RegQueryValueExW"
mov rcx, rax ; hModule
call cs:GetProcAddress
mov cs:qword_18000CF10, rax
test rax, rax
jz loc_18000214D
lea rcx, aAdvapi32_dll ; "Advapi32.dll"
call cs:LoadLibraryA
lea rdx, aRegclosekey ; "RegCloseKey"
mov rcx, rax ; hModule
call cs:GetProcAddress
mov cs:qword_18000CF18, rax
test rax, rax
jz loc_18000214D
lea rcx, aOle32_dll ; "Ole32.dll"
call cs:LoadLibraryA
lea rdx, aCoinitialize ; "CoInitialize"
mov rcx, rax ; hModule
call cs:GetProcAddress
mov cs:qword_18000CF20, rax
test rax, rax
jz loc_18000214D
lea rcx, aOle32_dll ; "Ole32.dll"
call cs:LoadLibraryA
lea rdx, aCocreateinstan ; "CoCreateInstance"
mov rcx, rax ; hModule
call cs:GetProcAddress
mov cs:qword_18000CF28, rax
test rax, rax
jz loc_18000214D
lea rcx, aOle32_dll ; "Ole32.dll"
call cs:LoadLibraryA
lea rdx, aCouninitialize ; "CoUninitialize"
mov rcx, rax ; hModule
call cs:GetProcAddress
mov cs:qword_18000CF30, rax
test rax, rax
jz loc_18000214D
lea rcx, aShlwapi_dll ; "Shlwapi.dll"
call cs:LoadLibraryA
lea rdx, aPathremovefile ; "PathRemoveFileSpecW"
mov rcx, rax ; hModule
call cs:GetProcAddress
xor ecx, ecx
test rax, rax
mov cs:qword_18000CF38, rax
setnz cl
mov eax, ecx
add rsp, 28h
retn
?Initialize@@YAHXZ endp ; ---------------------------------------------------------------------------

最新文章

  1. 校验码(海明校验,CRC冗余校验,奇偶校验)
  2. 如何使用eclipse打开已有工程
  3. HTML中的图像
  4. SpringMVC学习系列(9) 之 实现注解式权限验证
  5. 接收 ajax POST 方式传入的参数
  6. 关于J-LINK升级最新固件后无法连上的一点分析
  7. html中的body标签
  8. requireJS define require
  9. "a newer version of unity web player is required but the auto-update failed"
  10. 十四、职责链(Chain of Responsibility)模式--行为型模式(Behavioral Pattern)
  11. PHP中利用redis实现消息队列处理高并发请求
  12. [hihoCoder]无间道之并查集
  13. 体验mssql-cli
  14. [数据清洗]- Pandas 清洗“脏”数据(二)
  15. html备战春招の一
  16. [Kubernetes]浅谈容器网络
  17. Newtonsoft.Json序列化字符串-格式化
  18. hashMap源码分析1--翻译
  19. Linux vsftd配置文件
  20. C语言表驱动法编程实践

热门文章

  1. 数据批量导入HBase
  2. Spring Cloud动态刷新配置信息
  3. Window/Linux + Vim + MingW 配置
  4. BUUCTF MISC ZIP
  5. Inversion of Control 控制反转 有什么好处
  6. 数据结构:堆(Heap)
  7. transform:translate(-50%,-50%)
  8. python小项目(-)图片转字符画
  9. vue中的$nextTick的常用思路
  10. python3-xlwt-Excel设置(字体大小、颜色、对齐方式、换行、合并单元格、边框、背景、下划线、斜体、加粗)