mov al,0a0h ;Drive 0, head 0 out dx,al mov dx,1f2h ;Sector count port mov al,1 ;Write one sector out dx,al mov dx,1f3h ;Sector number port mov al,1 ;Wrote to sector two out dx,al mov dx,1f4h ;Cylinder low port mov al,0 ;Cylinder 0 out dx,al mov dx,1f5h ;Cylinder high port mov al,0 ;The rest of the cylinder 0 out dx,al mov dx,1f7h ;Command port mov al,30h ;Write with retry. out dx,al oogle: in al,dx test al,8 ;Wait for sector buffer ready. jz oogle xor ecx,ecx mov cx,512/2 ;One sector /2 mov esi,offset Buffer mov dx,1f0h ;Data port - data comes in and out of here. rep outsw ;Send it. LEAVERING0 _Ring0Proc ENDP Ring0CodeLen=$-_Ring0Proc
SetPhyscialMemorySectionCanBeWrited proc uses ebx esi edi hSection:HANDLE local pDacl: PACL local pNewDacl:PACL local pSD :PSECURITY_DEscriptOR local dwRes:DWORD ; local ea:EXPLICIT_ACCESS ; invoke GetSecurityInfo,hSection,SE_KERNEL_OBJECT,DACL_SECURITY_INFORMATION,\ NULL,NULL, addr pDacl,NULL, addr pSD cmp eax,ERROR_SUCCESS jz @f jmp OutSet @@: mov dwRes,eax mov ea.grfAccessPermissions ,SECTION_MAP_WRITE;2 mov ea.grfAccessMode ,GRANT_ACCESS;1 mov ea.grfInheritance,NO_INHERITANCE;0 mov ea.Trustee.pMultipleTrustee,0 mov ea.Trustee.MultipleTrusteeOperation,0
上一篇:一种可以穿透还原卡和还原软件的代码 下一篇:扩展int13h调用详解(修正) |