PopSetupKsrCallbacks
NTSTATUS __stdcall PopSetupKsrCallbacks(){
NTSTATUS result;
_UNICODE_STRING DestinationString;
_OBJECT_ATTRIBUTES ObjectAttributes;
PCALLBACK_OBJECT CallbackObject;
__int64 v4;
CallbackObject = 0i64;
v4 = 0i64;
*(&ObjectAttributes.Length + 1) = 0;
*(&ObjectAttributes.Attributes + 1) = 0;
DestinationString = 0i64;
result = KsrGetFirmwareInformation(&v4);
if( result >= 0 )
{
RtlInitUnicodeString(&DestinationString, L"\\Callback\\SoftRestart");
ObjectAttributes.RootDirectory = 0i64;
ObjectAttributes.ObjectName = &DestinationString;
ObjectAttributes.Length = 48;
ObjectAttributes.Attributes = 80;
*(_OWORD *)&ObjectAttributes.SecurityDescriptor = 0i64;
result = ExCreateCallback(&CallbackObject, &ObjectAttributes, 0, 1u);
if( result >= 0 )
return(unsigned int)ExRegisterCallback(CallbackObject, PopKsrCallback, 0i64);
}
return result;
}Referenced by:
PoInitSystem