亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fileworks.bat

?? KmdKit 匯編下開發(fā)驅(qū)動(dòng)的工具 由俄羅斯某強(qiáng)男開發(fā)
?? BAT
?? 第 1 頁 / 共 2 頁
字號(hào):
;@echo off
;goto make

;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;
;  FileWorks - File creation, writing, reading etc...
;
;  Written by Four-F (four-f@mail.ru)
;
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

.386
.model flat, stdcall
option casemap:none

;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;                                  I N C L U D E   F I L E S                                        
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

include \masm32\include\w2k\ntstatus.inc
include \masm32\include\w2k\ntifs.inc
include \masm32\include\w2k\ntoskrnl.inc

includelib \masm32\lib\w2k\ntoskrnl.lib

include \masm32\Macros\Strings.mac

;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;                                 R E A D O N L Y    D A T A                                        
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

.const

CCOUNTED_UNICODE_STRING	"\\??\\c:\\FileWorks\\test.txt", g_usFileName, 4
CCOUNTED_UNICODE_STRING	"\\??\\c:\\FileWorks", g_usDirName, 4

;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;                                         C O D E                                                   
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

.code

;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;                                      CreateDirectory                                              
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

CreateDirectory proc

local oa:OBJECT_ATTRIBUTES
local iosb:IO_STATUS_BLOCK
local hDirectory:HANDLE

	; Remember that the Unicode format codes (%C, %S, %lc, %ls, %wc, %ws, %wZ)
	; can only be used at IRQL PASSIVE_LEVEL. 
	invoke DbgPrint, $CTA0("\nFileWorks: Creating %ws directory\n"), g_usDirName.Buffer

	; Pay attention at OBJ_KERNEL_HANDLE flag. It's applicable for all object types not only for files.

	; DDK stands:
	; "Driver routines that run in a process context other than that of the system process
	; must set the OBJ_KERNEL_HANDLE attribute for the ObjectAttributes parameter of ZwCreateFile.
	; This restricts the use of the handle returned by ZwCreateFile to processes
	; running only in kernel mode. Otherwise, the handle can be accessed by the process
	; in whose context the driver is running."
	
	; But in reality even you get a handle in system process context without specifying
	; OBJ_KERNEL_HANDLE you can NOT touch this object in any other process context.
	; So better always specify OBJ_KERNEL_HANDLE if you plan access object by handle
	; in different processes. A kernel handle doesn抰 disappear until the operating system
	; shuts down and can be used without ambiguity in any process.

	InitializeObjectAttributes addr oa, addr g_usDirName, \
						OBJ_CASE_INSENSITIVE + OBJ_KERNEL_HANDLE, NULL, NULL
	invoke ZwCreateFile, addr hDirectory, SYNCHRONIZE, addr oa, addr iosb, 0, FILE_ATTRIBUTE_NORMAL, \
						0, FILE_OPEN_IF, FILE_DIRECTORY_FILE + FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0
	.if eax == STATUS_SUCCESS
		.if iosb.Information == FILE_CREATED
			invoke DbgPrint, $CTA0("FileWorks: Directory created\n")
		.elseif iosb.Information == FILE_OPENED
			invoke DbgPrint, $CTA0("FileWorks: Directory exists and was opened\n")
		.endif
		invoke ZwClose, hDirectory
	.else
		invoke DbgPrint, $CTA0("FileWorks: Can't create directory. Status: %08X\n"), eax
	.endif
	
	ret

CreateDirectory endp

;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;                                        CreateFile                                                 
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

CreateFile proc

local oa:OBJECT_ATTRIBUTES
local iosb:IO_STATUS_BLOCK
local hFile:HANDLE

	; Remember that the Unicode format codes (%C, %S, %lc, %ls, %wc, %ws, %wZ)
	; can only be used at IRQL PASSIVE_LEVEL. 
	invoke DbgPrint, $CTA0("\nFileWorks: Creating %ws file\n"), g_usFileName.Buffer

	InitializeObjectAttributes addr oa, addr g_usFileName, \
						OBJ_CASE_INSENSITIVE + OBJ_KERNEL_HANDLE, NULL, NULL

	; If the file already exists, fail the request and do not create or open the given file.
	; If it does not, create the given file.

	invoke ZwCreateFile, addr hFile, SYNCHRONIZE, addr oa, addr iosb, 0, FILE_ATTRIBUTE_NORMAL, \
						0, FILE_CREATE, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0
	.if eax == STATUS_SUCCESS

		invoke DbgPrint, $CTA0("FileWorks: File created\n")
		invoke ZwClose, hFile
	.else
		invoke DbgPrint, $CTA0("FileWorks: Can't create file. Status: %08X\n"), eax
	.endif
	
	ret

CreateFile endp

;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;                                            WriteFile                                              
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

WriteFile proc

local oa:OBJECT_ATTRIBUTES
local iosb:IO_STATUS_BLOCK
local hFile:HANDLE

	invoke DbgPrint, $CTA0("\nFileWorks: Opening file for writing\n")

	InitializeObjectAttributes addr oa, addr g_usFileName, \
						OBJ_CASE_INSENSITIVE + OBJ_KERNEL_HANDLE, NULL, NULL
	
	; ZwCreateFile can be used for opening existing file. FILE_OPEN should be specified.
	; I use:
	; - FILE_WRITE_DATA because only I want is to write data into the file;
	; - SYNCHRONIZE because of FILE_SYNCHRONOUS_IO_NONALERT.
	; But you can simply use less strict FILE_ALL_ACCESS.

	invoke ZwCreateFile, addr hFile, FILE_WRITE_DATA + SYNCHRONIZE, addr oa, addr iosb, \
						0, 0, FILE_SHARE_READ, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0
	.if eax == STATUS_SUCCESS
		invoke DbgPrint, $CTA0("FileWorks: File openeded\n")

		CTA0 "Data can be written to an open file", g_szData, 4

		invoke ZwWriteFile, hFile, 0, NULL, NULL, addr iosb, \
						addr g_szData, sizeof g_szData - 1, NULL, NULL
		.if eax == STATUS_SUCCESS
			invoke DbgPrint, $CTA0("FileWorks: File was written\n")
		.else
			invoke DbgPrint, $CTA0("FileWorks: Can't write to the file. Status: %08X\n"), eax
		.endif

		invoke ZwClose, hFile
	.else
		invoke DbgPrint, $CTA0("FileWorks: Can't open file. Status: %08X\n"), eax
	.endif

	ret

WriteFile endp

;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;                                        MarkAsReadOnly                                             
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

MarkAsReadOnly proc

local oa:OBJECT_ATTRIBUTES
local iosb:IO_STATUS_BLOCK
local hFile:HANDLE
local fbi:FILE_BASIC_INFORMATION

	invoke DbgPrint, $CTA0("\nFileWorks: Opening file for changing attributes\n")

	InitializeObjectAttributes addr oa, addr g_usFileName, \
						OBJ_CASE_INSENSITIVE + OBJ_KERNEL_HANDLE, NULL, NULL
	
	; ZwCreateFile can be used for opening existing file. FILE_OPEN should be specified.
	; I use:
	; - FILE_READ_ATTRIBUTES because I want to query file attributes;
	; - FILE_WRITE_ATTRIBUTES because I want to change file attributes;
	; - SYNCHRONIZE because of FILE_SYNCHRONOUS_IO_NONALERT.
	; But you can simply use less strict FILE_ALL_ACCESS.

	invoke ZwCreateFile, addr hFile, FILE_READ_ATTRIBUTES + FILE_WRITE_ATTRIBUTES + SYNCHRONIZE, \
						addr oa, addr iosb, 0, 0, FILE_SHARE_READ, \
						FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0
	.if eax == STATUS_SUCCESS
		invoke DbgPrint, $CTA0("FileWorks: File openeded\n")

		; Protect the file from deletion.
		invoke ZwQueryInformationFile, hFile, addr iosb, addr fbi, sizeof fbi, FileBasicInformation
		; Undocumented ZwQueryAttributesFile does the same.
		.if eax == STATUS_SUCCESS
			invoke DbgPrint, $CTA0("FileWorks: File attributes were: %08X\n"), fbi.FileAttributes
			or fbi.FileAttributes, FILE_ATTRIBUTE_READONLY
			invoke ZwSetInformationFile, hFile, addr iosb, addr fbi, sizeof fbi, FileBasicInformation
			.if eax == STATUS_SUCCESS
				invoke DbgPrint, $CTA0("FileWorks: Now file marked as read-only\n")
			.else
				invoke DbgPrint, $CTA0("FileWorks: Can't change file attributes. Status: %08X\n"), eax
			.endif
		.else
			invoke DbgPrint, $CTA0("FileWorks: Can't query file attributes. Status: %08X\n"), eax
		.endif

		invoke ZwClose, hFile
	.else
		invoke DbgPrint, $CTA0("FileWorks: Can't open file. Status: %08X\n"), eax
	.endif

	ret

MarkAsReadOnly endp

;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;                                          ReadFile                                                 
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

ReadFile proc

local oa:OBJECT_ATTRIBUTES
local iosb:IO_STATUS_BLOCK
local hFile:HANDLE
local p:PVOID
local cb:DWORD
local fsi:FILE_STANDARD_INFORMATION

	invoke DbgPrint, $CTA0("\nFileWorks: Opening file for reading\n")

	InitializeObjectAttributes addr oa, addr g_usFileName, \
						OBJ_CASE_INSENSITIVE + OBJ_KERNEL_HANDLE, NULL, NULL
	invoke ZwOpenFile, addr hFile, FILE_READ_DATA + SYNCHRONIZE, addr oa, addr iosb, \
				FILE_SHARE_READ + FILE_SHARE_WRITE + FILE_SHARE_DELETE, FILE_SYNCHRONOUS_IO_NONALERT
	.if eax == STATUS_SUCCESS

		invoke DbgPrint, $CTA0("FileWorks: File openeded\n")

		invoke ZwQueryInformationFile, hFile, addr iosb, addr fsi, sizeof fsi, FileStandardInformation
		.if eax == STATUS_SUCCESS

			mov eax, fsi.EndOfFile.LowPart
			inc eax								; one byte more for terminating zero
			mov cb, eax

			invoke ExAllocatePool, PagedPool, cb
			.if eax != NULL
				mov p, eax

				invoke RtlZeroMemory, p, cb

				invoke ZwReadFile, hFile, 0, NULL, NULL, addr iosb, p, cb, 0, NULL
				.if eax == STATUS_SUCCESS
					invoke DbgPrint, $CTA0("FileWorks: File content: \=%s\=\n"), p
				.else
					invoke DbgPrint, $CTA0("FileWorks: Can't read from the file. Status: %08X\n"), eax
				.endif

				invoke ExFreePool, p

			.else
				invoke DbgPrint, $CTA0("FileWorks: Can't allocate memory. Status: %08X\n"), eax
			.endif
		.else
			invoke DbgPrint, $CTA0("FileWorks: Can't query file size. Status: %08X\n"), eax
		.endif

		invoke ZwClose, hFile

	.else
		invoke DbgPrint, $CTA0("FileWorks: Can't open file. Status: %08X\n"), eax
	.endif

	ret

ReadFile endp

;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;                                        UnmarkAsReadOnly                                           
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

UnmarkAsReadOnly proc

local oa:OBJECT_ATTRIBUTES
local iosb:IO_STATUS_BLOCK
local hFile:HANDLE
local fbi:FILE_BASIC_INFORMATION

	invoke DbgPrint, $CTA0("\nFileWorks: Opening file for changing attributes\n")

	InitializeObjectAttributes addr oa, addr g_usFileName, \
						OBJ_CASE_INSENSITIVE + OBJ_KERNEL_HANDLE, NULL, NULL
	
	; ZwCreateFile can be used for opening existing file. FILE_OPEN should be specified.
	; I use:
	; - FILE_READ_ATTRIBUTES because I want to query file attributes;
	; - FILE_WRITE_ATTRIBUTES because I want to change file attributes;
	; - SYNCHRONIZE because of FILE_SYNCHRONOUS_IO_NONALERT.
	; But you can simply use less strict FILE_ALL_ACCESS.

	invoke ZwCreateFile, addr hFile, FILE_READ_ATTRIBUTES + FILE_WRITE_ATTRIBUTES + SYNCHRONIZE, \
						addr oa, addr iosb, 0, 0, FILE_SHARE_READ, FILE_OPEN, \
						FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0
	.if eax == STATUS_SUCCESS
		invoke DbgPrint, $CTA0("FileWorks: File openeded\n")

		; Allow delete file.
		invoke ZwQueryInformationFile, hFile, addr iosb, addr fbi, sizeof fbi, FileBasicInformation
		; Undocumented ZwQueryAttributesFile does the same.
		.if eax == STATUS_SUCCESS
			invoke DbgPrint, $CTA0("FileWorks: File attributes were: %08X\n"), fbi.FileAttributes
			and fbi.FileAttributes, not FILE_ATTRIBUTE_READONLY
			invoke ZwSetInformationFile, hFile, addr iosb, addr fbi, sizeof fbi, FileBasicInformation
			.if eax == STATUS_SUCCESS
				invoke DbgPrint, $CTA0("FileWorks: Now file can be written or deleted\n")
			.else
				invoke DbgPrint, $CTA0("FileWorks: Can't change file attributes. Status: %08X\n"), eax
			.endif
		.else
			invoke DbgPrint, $CTA0("FileWorks: Can't query file attributes. Status: %08X\n"), eax
		.endif

		invoke ZwClose, hFile
	.else
		invoke DbgPrint, $CTA0("FileWorks: Can't open file. Status: %08X\n"), eax
	.endif

	ret

UnmarkAsReadOnly endp

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一二三四区| 日本少妇一区二区| 欧美激情一区二区| 精品国产伦理网| 日韩视频在线一区二区| 欧美肥妇毛茸茸| 欧美日本视频在线| 欧美一区二区三区四区五区| 国产精品丝袜黑色高跟| 国产精品每日更新在线播放网址| 日本一区二区三区四区在线视频| 国产色产综合产在线视频| 国产女人18水真多18精品一级做| 国产欧美精品一区| 中文字幕在线不卡一区| 亚洲精品视频一区| 亚洲午夜久久久久久久久电影院| 丝袜亚洲另类欧美| 麻豆精品一区二区| 国产电影一区二区三区| 99精品久久免费看蜜臀剧情介绍| 色激情天天射综合网| 欧美日韩免费一区二区三区| 欧美一级精品大片| 26uuu欧美日本| 综合中文字幕亚洲| 亚洲午夜在线视频| 精品在线播放午夜| 99久久久久免费精品国产 | 成人国产电影网| 色成年激情久久综合| 欧美体内she精视频| 日韩一级大片在线观看| 国产亚洲精久久久久久| 日韩理论片在线| 日本成人在线网站| 丰满少妇在线播放bd日韩电影| 91年精品国产| 日韩一区二区三区电影在线观看| 国产午夜精品福利| 亚洲国产欧美在线| 国产成人综合亚洲91猫咪| 色偷偷久久一区二区三区| 日韩欧美国产一二三区| 国产精品久久久久国产精品日日| 午夜电影网亚洲视频| 国产激情一区二区三区四区| 欧美午夜精品久久久久久孕妇| 精品国产成人系列| 亚洲一区二区三区四区在线免费观看 | 国产乱码精品一区二区三区忘忧草| 国产91露脸合集magnet| 欧美久久久久中文字幕| 国产精品美女久久久久久久 | 成人激情开心网| 国产欧美一区二区在线观看| 亚洲美女淫视频| 日本美女视频一区二区| 91视频.com| 26uuu亚洲综合色欧美| 亚洲精品国产a| 国产激情偷乱视频一区二区三区| 欧美日韩一区在线| 日韩一区欧美小说| 国产一区欧美二区| 3d动漫精品啪啪一区二区竹菊| 国产精品不卡一区二区三区| 国内精品免费在线观看| 这里只有精品99re| 亚洲综合成人网| av中文字幕在线不卡| 337p日本欧洲亚洲大胆色噜噜| 亚洲国产欧美一区二区三区丁香婷| 成人黄色777网| 久久色.com| 美女一区二区三区在线观看| 欧美无砖专区一中文字| 亚洲男人天堂一区| 不卡av在线网| 国产亚洲欧美一区在线观看| 久久福利资源站| 51午夜精品国产| 亚洲国产综合色| 色综合天天在线| 日韩伦理电影网| 成人99免费视频| 国产拍揄自揄精品视频麻豆| 狠狠色丁香九九婷婷综合五月| 日韩亚洲欧美一区二区三区| 香蕉影视欧美成人| 欧美三区在线视频| 亚洲一区免费在线观看| 在线亚洲一区二区| 一区二区成人在线| 色一区在线观看| 一区二区三区在线视频观看58| 91丨九色丨蝌蚪丨老版| 亚洲欧美区自拍先锋| 91免费观看视频| 亚洲日本va午夜在线影院| 成人福利视频在线看| 日本一区二区三区国色天香 | 欧美一级xxx| 日韩成人dvd| 日韩午夜av电影| 九九精品视频在线看| 26uuu亚洲综合色| 国产成人免费视频精品含羞草妖精| 久久久精品综合| 成人丝袜18视频在线观看| 国产精品区一区二区三| 91小视频免费观看| 亚洲一区二区av电影| 欧美日本韩国一区| 老司机精品视频在线| 久久伊人蜜桃av一区二区| 成人一区在线观看| 一区二区三区在线观看国产| 欧美探花视频资源| 日本不卡视频在线观看| 久久嫩草精品久久久精品一| 成人动漫一区二区在线| 最新不卡av在线| 欧美综合天天夜夜久久| 日本强好片久久久久久aaa| 久久综合五月天婷婷伊人| 成人在线综合网站| 亚洲最新视频在线观看| 日韩视频在线永久播放| 成人午夜激情在线| 亚洲综合色噜噜狠狠| 欧美一级片免费看| 高清久久久久久| 亚洲午夜av在线| 欧美精品一区男女天堂| 成人av在线播放网址| 亚洲成av人片在线| 久久婷婷成人综合色| 91久久一区二区| 看电视剧不卡顿的网站| 中文字幕不卡的av| 在线电影欧美成精品| 国产传媒欧美日韩成人| 亚洲一区中文日韩| 久久综合久久鬼色中文字| 不卡视频一二三| 日本中文字幕一区二区视频| 中文字幕第一区| 777久久久精品| 成人a免费在线看| 日韩国产一二三区| 国产精品久久久久久久久动漫| 欧美日韩精品专区| 成人精品在线视频观看| 日本91福利区| 亚洲黄色在线视频| 久久久蜜桃精品| 欧美日韩免费在线视频| 成人听书哪个软件好| 日本强好片久久久久久aaa| 日韩美女视频一区| 精品国产免费人成在线观看| 91久久精品日日躁夜夜躁欧美| 国模一区二区三区白浆| 亚洲国产成人av网| 亚洲欧洲一区二区在线播放| 精品国产sm最大网站免费看| 欧美日韩免费电影| 99久久精品国产一区| 黄色日韩网站视频| 视频一区免费在线观看| 一区二区三区高清不卡| 国产精品麻豆视频| 久久亚洲免费视频| 91精品国产91久久久久久一区二区 | 欧美日韩三级视频| 97国产精品videossex| 国产99精品在线观看| 欧美tk—视频vk| 日韩电影网1区2区| 日韩视频在线一区二区| 日日摸夜夜添夜夜添亚洲女人| 亚洲三级免费观看| 国产蜜臀97一区二区三区| 7777精品久久久大香线蕉| 一本大道av一区二区在线播放| 国产精品2024| 韩国理伦片一区二区三区在线播放| 国产亚洲欧洲一区高清在线观看| 日韩欧美国产综合| 久久久久久久久97黄色工厂| 欧美国产激情二区三区| 国产精品乱子久久久久| 亚洲男同1069视频| 亚洲福中文字幕伊人影院| 蜜臀久久99精品久久久画质超高清| 六月丁香婷婷色狠狠久久| 国产精品456| 色偷偷久久人人79超碰人人澡| 欧美视频你懂的|