PnpResizeTargetDeviceBlock
INT64 __fastcall PnpResizeTargetDeviceBlock(const VOID **a1, INT64 a2){
unsigned int v2;
unsigned int v4;
__int64 v5;
int v6;
int v7;
unsigned int v8;
CHAR *CriticalMemory;
CHAR *v10;
const VOID *v11;
v2 = 0;
v4 = *((_DWORD *)*a1 + 37) + 112;
v5 = -1i64;
do
++v5;
while( *((_WORD *)*a1 + v5 + 80) );
v6 = 2 * v5 + 2;
v7 = 0;
if( v6 != 2 )
v7 = v6;
v8 = v4 - v7 + 400;
if( v8 > v4 )
{
CriticalMemory = PnpAllocateCriticalMemory((unsigned int)a2, PagedPool, v8, 0x4B706E50ui64);
v10 = CriticalMemory;
if( CriticalMemory )
{
memset((INT64)CriticalMemory, 0i64);
v11 = *a1;
memmove((UINT8 *)v10, (UINT8 *)*a1, v4);
*((_DWORD *)v10 + 16) = 1;
*((_DWORD *)v10 + 37) = v8 - 112;
*((_QWORD *)v10 + 10) = v11;
*a1 = v10;
}
else
{
return(unsigned int)-1073741670;
}
}
return v2;
}Referenced by:
PnpProcessQueryRemoveAndEject