EmpParseTargetRuleStringIndexList

UINT8 __stdcall EmpParseTargetRuleStringIndexList(
        VOID *ParsedInfHandle,
        INT8 *ArgString,
        UINT64 ExpectedNumberOfStrings,
        UINT64 ExpectedNumberOfNumerics,
        UINT64 *StringIndexList,
        UINT64 IndexListCount,
        UINT64 *StartingIndex){
  unsigned int v7; 
  char v9; 
  int v10; 
  unsigned int v11; 
  int v12; 
  bool v13; 
  __int64 v14; 
  CHAR *v15; 
  __int64 v16; 
  VOID **PoolWithTag; 
  char *v18; 
  __int64 v19; 
  int v21; 
  UINT64 Value[10]; 
  unsigned int v24; 
  unsigned int v25; 
  int v26; 

  v26 = ExpectedNumberOfNumerics;
  v25 = ExpectedNumberOfStrings;
  v7 = 0;
  v9 = 0;
  LODWORD(Value[0]) = 0;
  v10 = 0;
  v11 = 0;
  v24 = 0;
  v12 = *(_DWORD *)StartingIndex;
  v21 = *(_DWORD *)StartingIndex;
  if( StringIndexList )
  {
    while( 1 )
    {
      while( 1 )
      {
        while( 1 )
        {
          v13 = v9 == 0;
          if( v9 )
            return v13;
          if( v10 )
            break;
          if( *ArgString != 123 )
            goto LABEL_27;
LABEL_7:
          ++ArgString;
          v10 = 1;
        }
        if( v10 == 1 )
          break;
        if( v10 != 2 )
        {
          if( !*ArgString && v11 == (_DWORD)ExpectedNumberOfStrings && v7 == (_DWORD)ExpectedNumberOfNumerics )
          {
            *(_DWORD *)StartingIndex = v12 + v7 + v11;
            return v9 == 0;
          }
          goto LABEL_27;
        }
        if( *ArgString == 46 )
          goto LABEL_7;
        if( *ArgString == 125 )
        {
LABEL_35:
          ++ArgString;
          v10 = 3;
        }
        else
        {
LABEL_27:
          v9 = 1;
        }
      }
      if( *ArgString == 125 )
        goto LABEL_35;
      if( v11 > (unsigned int)ExpectedNumberOfStrings
        || v7 > (unsigned int)ExpectedNumberOfNumerics
        || (v14 = v12 + v7 + v11, (unsigned int)v14 >= (unsigned int)IndexListCount) )
      {
        v9 = 1;
        return v9 == 0;
      }
      v15 = ArgString;
      do
      {
        strchr((UINT8 *)".}", *ArgString);
        if( v16 )
          break;
        ++ArgString;
      }
      while( ArgString );
      if( ArgString - v15 != -1 )
      {
        PoolWithTag = ExAllocatePoolWithTag(1ui64, ArgString - v15 + 1, 1953058117i64);
        v18 = (char *)PoolWithTag;
        if( PoolWithTag )
        {
          if( RtlStringCbCopyNA((CHAR *)PoolWithTag, ArgString - v15 + 1, v15, ArgString - v15) >= 0 )
            break;
        }
      }
      v7 = v24;
      v9 = 1;
LABEL_23:
      v12 = v21;
      LODWORD(ExpectedNumberOfStrings) = v25;
      LODWORD(ExpectedNumberOfNumerics) = v26;
    }
    if( v11 < v25 )
    {
      v7 = v24;
      if( EmpInfParseGetStringIndexFromName(ParsedInfHandle, v18, Value) >= 0 )
      {
        v19 = v11 + v21;
        ++v11;
        *((_DWORD *)StringIndexList + v19) = Value[0];
        goto LABEL_21;
      }
    }
    else
    {
      v7 = v24;
      if( RtlCharToInteger(v18, 0x10ui64, Value) >= 0 )
      {
        v7 = ++v24;
        *((_DWORD *)StringIndexList + v14) = Value[0];
LABEL_21:
        v10 = 2;
LABEL_22:
        ExFreePoolWithTag(v18, 0x74694D45u);
        goto LABEL_23;
      }
    }
    v9 = 1;
    goto LABEL_22;
  }
  return 0;
}

Referenced by:

EmpParseTargetRules