IopAllocateReserveIrp
_IRP *__stdcall IopAllocateReserveIrp(CHAR StackSize, _IOP_RESERVE_IRP_TYPE IrpType, _IOP_RESERVE_IRP_TYPE a3){
char v3;
__int16 v4;
__int64 v5;
__int64 v6;
__int64 v8;
__int64 v9;
__int64 v10;
__int64 v11;
_LARGE_INTEGER v12;
v12.QuadPart = StackSize;
if( (char)IrpType > *(&stru_140C452E0 + 1984) )
return 0i64;
v3 = IrpType + 1;
v4 = (char)(IrpType + 1);
if( a3 == IopPagefileReadIrp )
{
while( _InterlockedExchange((_DWORD *)&stru_140C452E0 + 442, 1) == 1 )
KeWaitForSingleObject((UINT64)&stru_140C452E0 + 1776, 0, 0, 0, 0i64);
LOBYTE(a3) = v3;
IoInitializeIrp(*(&stru_140C452E0 + 220), 8 * (8 * v3 + v4) + 208, a3);
*(_BYTE *)(*(&stru_140C452E0 + 220) + 71i64) = 33;
v5 = *(&stru_140C452E0 + 220);
*(_QWORD *)(*(&stru_140C452E0 + 220) + 184i64) -= 72i64;
v6 = *(_QWORD *)(v5 + 184);
--*(_BYTE *)(v5 + 67);
--*(_BYTE *)(v5 + 66);
*(_QWORD *)(v5 + 200) = v6;
if( IopIsActivityTracingEnabled() )
IopInitActivityIdIrp(*(&stru_140C452E0 + 220));
return(_IRP *)*(&stru_140C452E0 + 220);
}
if( a3 == IopPagefileWriteIrp )
{
while( _InterlockedExchange((_DWORD *)&stru_140C452E0 + 452, 1) == 1 )
KeWaitForSingleObject((UINT64)&stru_140C452E0 + 1816, 0, 0, 0, 0i64);
LOBYTE(a3) = v3;
IoInitializeIrp(*(&stru_140C452E0 + 225), 72 * v3 + 208, a3);
*(_BYTE *)(*(&stru_140C452E0 + 225) + 71i64) = 33;
v8 = *(&stru_140C452E0 + 225);
*(_QWORD *)(*(&stru_140C452E0 + 225) + 184i64) -= 72i64;
v9 = *(_QWORD *)(v8 + 184);
--*(_BYTE *)(v8 + 67);
--*(_BYTE *)(v8 + 66);
*(_QWORD *)(v8 + 200) = v9;
if( IopIsActivityTracingEnabled() )
IopInitActivityIdIrp(*(&stru_140C452E0 + 225));
return(_IRP *)*(&stru_140C452E0 + 225);
}
if( a3 != IopMustSucceedIrp )
return 0i64;
v12.QuadPart = 0i64;
while( _InterlockedExchange((_DWORD *)&stru_140C452E0 + 462, 1) == 1 )
{
v12.QuadPart = -50000000i64;
if( KeWaitForSingleObject((UINT64)&stru_140C452E0 + 1856, 0, 0, 0, (INT64)&v12) == 258 )
return 0i64;
}
LOBYTE(a3) = v3;
IoInitializeIrp(*(&stru_140C452E0 + 230), 72 * v3 + 208, a3);
*(_BYTE *)(*(&stru_140C452E0 + 230) + 71i64) = 33;
v10 = *(&stru_140C452E0 + 230);
*(_QWORD *)(*(&stru_140C452E0 + 230) + 184i64) -= 72i64;
v11 = *(_QWORD *)(v10 + 184);
--*(_BYTE *)(v10 + 67);
--*(_BYTE *)(v10 + 66);
*(_QWORD *)(v10 + 200) = v11;
if( IopIsActivityTracingEnabled() )
IopInitActivityIdIrp(*(&stru_140C452E0 + 230));
return(_IRP *)*(&stru_140C452E0 + 230);
}Referenced by:
IoAsynchronousPageWrite
IoSynchronousPageWriteEx
IopAllocateIrpMustSucceed