用汇编语言修改IE浏览器首页

今天电脑很慢,百度了一下,知道一个不错软件——360安全卫士。清除修复了后想立即删除360软件,但此时发现360修改了本机的主页。随即打开注册表软件regedit,经查发现修改了几个地方。再次打开IE,还是没有修改过来。。。。。。
随后,我先将360完全删除,并写了一小工具,方便修改注册表的ie首页设置,汇编语言代码如下(ie.asm)
;|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.586
.model flat, stdcall
option casemap :none
        include windows.inc
        include user32.inc
        include kernel32.inc
        include advapi32.inc
        includelib user32.lib
        includelib kernel32.lib
        includelib advapi32.lib
        DLG_MAIN equ 1000
        IDC_EXIT equ 1002
        IDC_STC1 equ 1001
        IDC_URL equ 1003
        IDC_OK equ 1004
        IDC_STC equ 1005
        ICO_MAIN equ 1001
.data?
        hDlg dd ?
        hInst dd ?
        szHomePage db 1024 dup(?)
.const
        szPath1 db "SOFTWAREMicrosoftInternet ExplorerMain",0
        szPath2 db "SoftwarePoliciesMicrosoftInternet ExplorerMain",0
        szPath3 db "S-1-5-21-46629835-3481774793-248110335-1000SoftwareMicrosoftInternet ExplorerMain",0
        szPath4 db "S-1-5-21-46629835-3481774793-248110335-1000SoftwarePoliciesMicrosoftInternet ExplorerMain",0
        szKeyName db "Start Page",0
        szMsg1 db "正在进行...",0
        szMsg2 db "已完成任务.",0
.code
;|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SetRegValue proc _dwRoot,_lpKey
        local @hKey
        invoke RegCreateKey,_dwRoot,_lpKey,addr @hKey
        .if eax == 0
        invoke lstrlen,_lpKey
        inc eax
        invoke RegSetValueEx,@hKey,addr szKeyName,NULL,REG_SZ,addr szHomePage,eax
        .endif
        invoke RegCloseKey,@hKey
        ret
SetRegValue endp
;|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
_Main proc uses ebx ecx edx edi esi ebp hWnd,uMsg,wParam,lParam
        mov eax,uMsg
        .if eax == WM_COMMAND
                mov eax,wParam
                .if ax == IDC_EXIT
                        invoke EndDialog,hWnd,NULL
                .elseif ax == IDC_OK
                        invoke SetDlgItemText,hDlg,IDC_STC,addr szMsg1
                        invoke GetDlgItemText,hDlg,IDC_URL,addr szHomePage,sizeof szHomePage
                        .if eax
                        invoke SetRegValue,HKEY_LOCAL_MACHINE,addr szPath1
                        invoke SetRegValue,HKEY_LOCAL_MACHINE,addr szPath2
                        invoke SetRegValue,HKEY_USERS,addr szPath3
                        invoke SetRegValue,HKEY_USERS,addr szPath4
                        .endif
                        invoke SetDlgItemText,hDlg,IDC_STC,addr szMsg2
                .endif
        .elseif eax == WM_INITDIALOG
                push hWnd
                pop hDlg
                invoke LoadIcon,hInst,ICO_MAIN
                invoke SendMessage,hWnd,WM_SETICON,ICON_SMALL,eax
        .elseif eax == WM_CLOSE
                invoke EndDialog,hWnd,NULL
        .else
                mov eax,FALSE
                ret
        .endif
        mov eax,TRUE
        ret
_Main endp
;|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
start:
        invoke GetModuleHandle,NULL
        mov hInst,eax
        invoke DialogBoxParam,hInst,DLG_MAIN,NULL,offset _Main,NULL
        invoke ExitProcess,NULL
end start
;|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
以下是资源源文件:rsrc.rc
;|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#define DLG_MAIN 1000
#define IDC_EXIT 1002
#define IDC_STC1 1001
#define IDC_URL 1003
#define IDC_OK 1004
#define IDC_STC 1005
#define ICO_MAIN 1001
#include <resource.h>
DLG_MAIN DIALOGEX 6,6,259,65
CAPTION "设置IE首页 - 作者:FEIESOFT.COM"
FONT 9,"Microsoft Sans Serif",400,0,134
STYLE WS_VISIBLE|WS_CAPTION|WS_SYSMENU|DS_CENTER
BEGIN
CONTROL "退出",IDC_EXIT,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,209,38,38,13
CONTROL "我的上网首页:",IDC_STC1,"Static",WS_CHILD|WS_VISIBLE,13,8,53,10
CONTROL "http://www.baidu.com/",IDC_URL,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP,13,20,232,11,WS_EX_CLIENTEDGE
CONTROL "确定",IDC_OK,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,166,38,38,13
CONTROL "",IDC_STC,"Static",WS_CHILD|WS_VISIBLE,13,40,139,8
END
ICO_MAIN ICON DISCARDABLE "MAIN.ICO"
;|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

相关文章

PHP:ODBC处理EXCEL电子表格数据库实例PHP:SQLite3数据库操作代码
HTML5本地存储检测、保存、读取MySQL5存储过程视频教程,PHP操作MySQL存储过程示例
Javascript读取与设置cookie代码MySQL创建数据库:CREATE DATABASE语法
读书郎学生平板电脑G50,G12,G11详细介绍使用PHP的ODBC函数库操作ACCESS数据库
PHP+SQLite数据库操作教程与实例如何删除Word页眉横线
MySQL数据库定义语句:ALTER DATABASE语法电脑高手平时都怎么操作计算机的?
我要读书——农村儿童的心声!PHP下载文件代码
AJAX+PHP局部刷新代码用汇编语言修改IE浏览器首页
Office 2003 SP2 简体中文完整版下载与25位密钥2013年平板电脑品牌排行榜
SQLite的数据类型apache2.4.6 httpd.exe命令
版权所有 © 中山市飞娥软件工作室 证书:粤ICP备09170368号