RtlAddDynamicEnforcedAddressRange

INT64 __fastcall RtlAddDynamicEnforcedAddressRange(RTL_BALANCED_NODE **RootPointer, INT64 a2, INT64 a3){
  _QWORD *Pool2; 
  bool v7; 
  _QWORD *v8; 
  RTL_BALANCED_NODE *v10; 
  int v11; 
  RTL_BALANCED_NODE *v12; 
  Pool2 = ExAllocatePool2(257i64, 0x28ui64, 0x52414544ui64);
  v7 = 0;
  v8 = Pool2;
  if( !Pool2 )
    return 3221225495i64;
  Pool2[3] = a2;
  Pool2[4] = a3;
  v10 = *RootPointer;
  if( !*RootPointer )
  {
LABEL_7:
    RtlAvlInsertNodeEx((unsigned __int64 *)RootPointer, (__int64)v10, v7, v8);
    return 0i64;
  }
  while( 1 )
  {
    v11 = RtlpDynamicEnforcedAddressRangesTreeCompare((INT64)v8, (INT64)v10);
    if( v11 <= 0 )
      break;
    v12 = v10->Children[1];
    if( !v12 )
    {
      v7 = 1;
      goto LABEL_7;
    }
LABEL_10:
    v10 = v12;
  }
  if( v11 < 0 )
  {
    v12 = v10->Children[0];
    if( !v10->Children[0] )
      goto LABEL_7;
    goto LABEL_10;
  }
  ExFreePoolWithTag(v8, 0);
  return 3221225496i64;
}

Referenced by:

PspProcessDynamicEnforcedAddressRanges