CcZeroDataInCache
UINT8 __stdcall CcZeroDataInCache(
FILE_OBJECT *FileObject,
LARGE_INTEGER *StartingOffset,
UINT64 LengthToZero,
UINT8 Wait){
int v4;
unsigned int v5;
unsigned int v7;
char v8;
__int64 v10;
unsigned int v11;
unsigned int v12;
_MDL *MemoryDescriptorList;
PVOID BcbVoid;
LONGLONG v15;
LONGLONG QuadPart;
void *VirtualAddress[2];
UINT8 v18;
v4 = Wait;
v5 = LengthToZero;
v7 = 0;
v15 = 0i64;
QuadPart = StartingOffset->QuadPart;
BcbVoid = 0i64;
VirtualAddress[0] = 0i64;
v18 = 1;
while( 1 )
{
LODWORD(v10) = v4;
if( !(unsigned __int8)CcPinFileData(
(__int64)FileObject,
&QuadPart,
v5 - v7,
0,
1,
v10,
&BcbVoid,
(__int64 *)VirtualAddress,
&v15) )
break;
v11 = v15 - QuadPart;
v12 = v15 - QuadPart + v7;
MemoryDescriptorList = IoAllocateMdl(VirtualAddress[0], (int)v15 - (int)QuadPart, 0, 0, 0i64);
if( !MemoryDescriptorList )
RtlRaiseStatus(-1073741670);
v8 = *((_BYTE *)KeGetCurrentThread() + 1309) + 2;
*((_BYTE *)KeGetCurrentThread() + 1309) = 1;
MiProbeAndLockPages((INT64)MemoryDescriptorList, 0, 0i64);
*((_BYTE *)KeGetCurrentThread() + 1309) = v8 - 2;
QuadPart = v15;
MmSetAddressRangeModifiedEx((UINT64)VirtualAddress[0], v11);
CcSetDirtyPinnedData(BcbVoid, 0i64);
CcUnpinFileDataEx(BcbVoid, 0, 0);
BcbVoid = 0i64;
MmUnlockPages(MemoryDescriptorList);
IoFreeMdl(MemoryDescriptorList);
v7 = v12;
if( v5 <= v12 )
goto LABEL_8;
}
v18 = 0;
LABEL_8:
if( BcbVoid )
CcUnpinFileDataEx(BcbVoid, 0, 0);
return v18;
}Referenced by:
CcZeroData