ApiSetpLoadSchemaExtensions
NTSTATUS __stdcall ApiSetpLoadSchemaExtensions(HANDLE KeyHandle){
UINT8 **v1;
UINT64 *v2;
UINT8 **v3;
unsigned int v4;
UINT64 v5;
UINT64 *v6;
HANDLE v7;
NTSTATUS SchemaExtension;
NTSTATUS v9;
UINT64 Length;
UINT64 ResultLength;
void *KeyHandlea;
__int16 v14[2];
int v15;
char *v16;
struct _OBJECT_ATTRIBUTES ObjectAttributes;
char KeyInformation[12];
__int16 v19;
char v20;
v3 = v1;
KeyHandlea = 0i64;
v4 = 0;
LODWORD(ResultLength) = 0;
v5 = 0i64;
v6 = v2;
v7 = KeyHandle;
while( 1 )
{
LODWORD(Length) = 536;
v9 = ZwEnumerateKey(KeyHandle, v5, KeyBasicInformation, KeyInformation, Length, &ResultLength);
SchemaExtension = v9;
if( v9 < 0 )
break;
v15 = 0;
v16 = &v20;
v14[0] = v19;
v14[1] = v19;
*(_QWORD *)&ObjectAttributes.Length = 48i64;
ObjectAttributes.ObjectName = (_UNICODE_STRING *)v14;
*(_QWORD *)&ObjectAttributes.Attributes = 576i64;
ObjectAttributes.RootDirectory = v7;
*(_OWORD *)&ObjectAttributes.SecurityDescriptor = 0i64;
SchemaExtension = ZwOpenKey(&KeyHandlea, 0x20019u, &ObjectAttributes);
if( SchemaExtension < 0 )
return SchemaExtension;
SchemaExtension = ApiSetpLoadSchemaExtension(KeyHandlea, v3, v6);
ZwClose(KeyHandlea);
if( SchemaExtension < 0 )
return SchemaExtension;
++v4;
KeyHandle = v7;
v5 = v4;
}
if( v9 == -2147483622 )
return 0;
return SchemaExtension;
}Referenced by:
ApiSetLoadSchemaWithExtensions