首页
社区
课程
招聘
[讨论]关于函数对注册表的操作
2006-6-15 19:24 4240

[讨论]关于函数对注册表的操作

2006-6-15 19:24
4240
004030EC   $  55                              push ebp
004030ED   .  8BEC                            mov ebp,esp
004030EF   .  83C4 F4                         add esp,-0C
004030F2   .  0FB705 14D04000                 movzx eax,word ptr ds:[40D014]
004030F9   .  8945 F8                         mov dword ptr ss:[ebp-8],eax
004030FC   .  8D45 FC                         lea eax,dword ptr ss:[ebp-4]
004030FF   .  50                              push eax                                ; /pHandle
00403100   .  6A 01                           push 1                                  ; |Access = KEY_QUERY_VALUE
00403102   .  6A 00                           push 0                                  ; |Reserved = 0
00403104   .  68 84314000                     push 01_u.00403184                      ; |Subkey = "SOFTWARE\Borland\Delphi\RTL"
00403109   .  68 02000080                     push 80000002                           ; |hKey = HKEY_LOCAL_MACHINE
0040310E   .  E8 01E0FFFF                     call <jmp.&advapi32.RegOpenKeyExA>      ; \RegOpenKeyExA
00403113   .  85C0                            test eax,eax
00403115   .  75 4D                           jnz short 01_u.00403164
00403117   .  33C0                            xor eax,eax
00403119   .  55                              push ebp
0040311A   .  68 5D314000                     push 01_u.0040315D
0040311F   .  64:FF30                         push dword ptr fs:[eax]
00403122   .  64:8920                         mov dword ptr fs:[eax],esp
00403125   .  C745 F4 04000000                mov dword ptr ss:[ebp-C],4
0040312C   .  8D45 F4                         lea eax,dword ptr ss:[ebp-C]
0040312F   .  50                              push eax                                ; /pBufSize
00403130   .  8D45 F8                         lea eax,dword ptr ss:[ebp-8]            ; |
00403133   .  50                              push eax                                ; |Buffer
00403134   .  6A 00                           push 0                                  ; |pValueType = NULL
00403136   .  6A 00                           push 0                                  ; |Reserved = NULL
00403138   .  68 A0314000                     push 01_u.004031A0                      ; |ValueName = "FPUMaskValue"
0040313D   .  8B45 FC                         mov eax,dword ptr ss:[ebp-4]            ; |
00403140   .  50                              push eax                                ; |hKey
00403141   .  E8 D6DFFFFF                     call <jmp.&advapi32.RegQueryValueExA>   ; \RegQueryValueExA
00403146   .  33C0                            xor eax,eax
00403148   .  5A                              pop edx
00403149   .  59                              pop ecx
0040314A   .  59                              pop ecx
0040314B   .  64:8910                         mov dword ptr fs:[eax],edx
0040314E   .  68 64314000                     push 01_u.00403164
00403153   >  8B45 FC                         mov eax,dword ptr ss:[ebp-4]
00403156   .  50                              push eax                                ; /hKey
00403157   .  E8 B0DFFFFF                     call <jmp.&advapi32.RegCloseKey>        ; \RegCloseKey
0040315C   .  C3                              retn

[CTF入门培训]顶尖高校博士及硕士团队亲授《30小时教你玩转CTF》,视频+靶场+题目!助力进入CTF世界

收藏
点赞0
打赏
分享
最新回复 (7)
雪    币: 0
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
爱一个人好难 2006-6-15 19:26
2
0
打开,读取,关闭的过程!

请教,各函数,参数的含义:
/pHandle               
|Access = KEY_QUERY_VALUE
|Reserved = 0
|Subkey = "SOFTWARE\Borland\Delphi\RTL"
|hKey = HKEY_LOCAL_MACHINE
\RegOpenKeyExA

/pBufSize
|
|Buffer
|pValueType = NULL
|Reserved = NULL
|ValueName = "FPUMaskValue"
|
|hKey
\RegQueryValueExA

雪    币: 0
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
爱一个人好难 2006-6-15 19:29
3
0
谢谢了!
雪    币: 0
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
爱一个人好难 2006-6-15 23:06
4
0
没人知道吗?
雪    币: 2367
活跃值: (756)
能力值: (RANK:410 )
在线值:
发帖
回帖
粉丝
小虾 10 2006-6-15 23:31
5
0
上面的函数只要查MSDN即可知道。
The RegOpenKeyEx function opens the specified key.

LONG RegOpenKeyEx(

    HKEY hKey,        // handle of open key
    LPCTSTR lpSubKey,        // address of name of subkey to open
    DWORD ulOptions,        // reserved
    REGSAM samDesired,        // security access mask
    PHKEY phkResult         // address of handle of open key
   );       

The RegQueryValueEx function retrieves the type and data for a specified value name associated with an open registry key.

LONG RegQueryValueEx(

    HKEY hKey,        // handle of key to query
    LPTSTR lpValueName,        // address of name of value to query
    LPDWORD lpReserved,        // reserved
    LPDWORD lpType,        // address of buffer for value type
    LPBYTE lpData,        // address of data buffer
    LPDWORD lpcbData         // address of data buffer size
   );
雪    币: 0
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
爱一个人好难 2006-6-16 00:14
6
0
上面的函数只要查MSDN即可知道。

MSDN是什么?能否高之!
雪    币: 32406
活跃值: (18805)
能力值: (RANK:350 )
在线值:
发帖
回帖
粉丝
kanxue 8 2006-6-16 09:35
7
0
最初由 爱一个人好难 发布
上面的函数只要查MSDN即可知道。

MSDN是什么?能否高之!


google搜索
雪    币: 2367
活跃值: (756)
能力值: (RANK:410 )
在线值:
发帖
回帖
粉丝
小虾 10 2006-6-16 09:37
8
0
游客
登录 | 注册 方可回帖
返回