WheapSaveRecordForLiveDump
INT64 __fastcall WheapSaveRecordForLiveDump(INT64 a1){
UINT64 v1;
unsigned int v3;
char *PoolWithTag;
_QWORD *v5;
v1 = *(unsigned int *)(a1 + 60);
if( (int)v1 + 32 < (unsigned int)v1 )
{
return(unsigned int)-1073741675;
}
else
{
v3 = 0;
PoolWithTag = (char *)ExAllocatePoolWithTag(NonPagedPoolNx, (unsigned int)(v1 + 32), 0x61656857ui64);
if( PoolWithTag )
{
*((_DWORD *)PoolWithTag + 4) = *(_DWORD *)(*(_QWORD *)(a1 + 32) + 40i64);
*((_QWORD *)PoolWithTag + 3) = PoolWithTag + 32;
memmove((UINT8 *)PoolWithTag + 32, (UINT8 *)(a1 + 40), v1);
ExAcquireFastMutex(&WheapLiveDumpLock);
v5 = (_QWORD *)qword_140C13D28;
if( *(__int64 **)qword_140C13D28 != &WheapLiveDumpRecordList )
__fastfail(3u);
*(_QWORD *)PoolWithTag = &WheapLiveDumpRecordList;
*((_QWORD *)PoolWithTag + 1) = v5;
*v5 = PoolWithTag;
qword_140C13D28 = (__int64)PoolWithTag;
KeReleaseGuardedMutex(&WheapLiveDumpLock);
}
else
{
return(unsigned int)-1073741670;
}
}
return v3;
}Referenced by:
WheapCreateLiveDumpFromPreviousSession