RtlGetIntegerAtom

UINT8 __stdcall RtlGetIntegerAtom(PWCHAR Name, UINT16 *Atom){
  PWCHAR v4; 
  PWCHAR v5; 
  wchar_t v6; 
  UNICODE_STRING String; 
  UINT64 Value; 
  String = 0i64;
  if( ((unsigned __int64)Name & 0xFFFFFFFFFFFF0000ui64) == 0 )
  {
    if( (unsigned __int16)Name < 0xC000u )
    {
      if( !(_WORD)Name )
        LOWORD(Name) = -16384;
      if( Atom )
        *Atom = (unsigned __int16)Name;
      return 1;
    }
    return 0;
  }
  if( *Name != 35 )
    return 0;
  v4 = Name + 1;
  v5 = Name + 1;
  if( Name[1] )
  {
    v6 = *v4;
    while( (unsigned __int16)(v6 - 48) <= 9u )
    {
      v6 = *++v5;
      if( !*v5 )
        goto LABEL_8;
    }
    return 0;
  }
LABEL_8:
  String.Buffer = v4;
  String.Length = (_WORD)v5 - (_WORD)v4;
  String.MaximumLength = (_WORD)v5 - (_WORD)v4;
  LODWORD(Value) = 0;
  if( RtlUnicodeStringToInteger(&String, 0xAui64, &Value) < 0 )
    return 0;
  if( Atom )
  {
    if( (unsigned int)(Value - 1) > 0xBFFF )
      *Atom = -16384;
    else
      *Atom = Value;
  }
  return 1;
}

Referenced by:

RtlAddAtomToAtomTableEx
RtlLookupAtomInAtomTable