ExpTranslateBootEntryNameToId

VOID __stdcall ExpTranslateBootEntryNameToId(WCHAR *Name, UINT64 *Id){
  UINT16 *v4; 
  int v5; 
  unsigned int i; 
  UINT16 v7; 
  int v8; 
  if( towlower(*Name) == 98 && towlower(Name[1]) == 111 && towlower(Name[2]) == 111 && towlower(Name[3]) == 116 )
  {
    v4 = Name + 4;
    v5 = 0;
    for( i = 4; i < 8; ++i )
    {
      v7 = towlower(*v4);
      if( (unsigned __int16)(v7 - 48) > 9u )
      {
        if( (unsigned __int16)(v7 - 97) > 5u )
          return;
        v8 = 16 * v5 - 87;
      }
      else
      {
        v8 = 16 * v5 - 48;
      }
      v5 = v7 + v8;
      ++v4;
    }
    if( !Name[8] )
      *(_DWORD *)Id = v5;
  }
}

Referenced by:

ExpIsBootEntry
NtEnumerateBootEntries