PspDeleteServerSiloGlobals
VOID __stdcall PspDeleteServerSiloGlobals(_ESERVERSILO_GLOBALS *ServerSiloGlobals){
_ETW_SILODRIVERSTATE *EtwSiloState;
_ADAPTER_OBJECT *ApiSetSection;
void *ApiSetSchema;
_ADAPTER_OBJECT *UserSharedSection;
struct _EXP_LICENSE_STATE *ExpLicenseState;
void *ImgFileExecOptions;
_KEVENT *DeleteEvent;
DbgkCleanupServerSiloState((__int64)&ServerSiloGlobals->DbgkSiloState);
ObCleanupSiloState((VOID **)&ServerSiloGlobals->ObSiloState.SystemDeviceMap);
SeRmCleanupSiloState((_DWORD)ServerSiloGlobals + 784);
ExWnfCleanupServerSiloState(&ServerSiloGlobals->WnfSiloState);
EtwSiloState = ServerSiloGlobals->EtwSiloState;
if( EtwSiloState )
{
EtwDeleteSiloState(EtwSiloState);
ServerSiloGlobals->EtwSiloState = 0i64;
}
if( ServerSiloGlobals->SiloRootDirectoryName.Buffer )
{
RtlFreeAnsiString(&ServerSiloGlobals->SiloRootDirectoryName);
ServerSiloGlobals->SiloRootDirectoryName.Buffer = 0i64;
}
ApiSetSection = (_ADAPTER_OBJECT *)ServerSiloGlobals->ApiSetSection;
if( ApiSetSection )
{
HalPutDmaAdapter(ApiSetSection);
ServerSiloGlobals->ApiSetSection = 0i64;
}
ApiSetSchema = ServerSiloGlobals->ApiSetSchema;
if( ApiSetSchema )
{
MmUnmapViewInSystemSpace(ApiSetSchema);
ServerSiloGlobals->ApiSetSchema = 0i64;
}
PspDeleteProtectedProcessParameters((INT64)ServerSiloGlobals);
if( ServerSiloGlobals->UserSharedSection )
{
MmUnmapViewInSystemSpace(ServerSiloGlobals->UserSharedData);
UserSharedSection = (_ADAPTER_OBJECT *)ServerSiloGlobals->UserSharedSection;
ServerSiloGlobals->UserSharedData = 0i64;
HalPutDmaAdapter(UserSharedSection);
ServerSiloGlobals->UserSharedSection = 0i64;
}
ExpLicenseState = ServerSiloGlobals->ExpLicenseState;
if( ExpLicenseState )
{
ExpDeleteSiloState(ExpLicenseState);
ServerSiloGlobals->ExpLicenseState = 0i64;
}
ImgFileExecOptions = ServerSiloGlobals->ImgFileExecOptions;
if( ImgFileExecOptions )
{
ZwClose((_HANDLE)ImgFileExecOptions);
ServerSiloGlobals->ImgFileExecOptions = 0i64;
}
DeleteEvent = ServerSiloGlobals->DeleteEvent;
if( DeleteEvent )
{
KeSetEvent(DeleteEvent, 0, 0);
ObfDereferenceObjectWithTag(ServerSiloGlobals->DeleteEvent, 0x65446953ui64);
ServerSiloGlobals->DeleteEvent = 0i64;
}
if( ServerSiloGlobals->TzVirtualizationSupported )
ExFreePoolWithTag(ServerSiloGlobals->ExTimeZoneState, 0);
ExFreePoolWithTag(ServerSiloGlobals, 0x476C6953u);
}Referenced by:
PspConvertSiloToServerSilo
PspDeleteSilo