SmProcessListRequestExtended

INT64 __fastcall SmProcessListRequestExtended(INT64 a1, INT64 a2){
  UINT64 v4; 
  unsigned int v5; 
  unsigned int v6; 
  INT64 v7; 
  unsigned __int64 v8; 
  int Path; 
  struct _EX_RUNDOWN_REF *v10; 
  struct _EX_RUNDOWN_REF *v11; 
  v4 = 0i64;
  v5 = 0;
  if( *(_BYTE *)(a2 + 1) )
  {
    v6 = 1;
    do
    {
      v7 = a2 + 4i64 * v5;
      v4 = SmKmStoreReference(a1, *(unsigned int *)(v7 + 4));
      if( v4 )
      {
        v8 = a2 + ((unsigned __int64)v5 << 7);
        if( *(_BYTE *)(v4 + 6020) == 1 )
        {
          Path = SmKmFileInfoGetPath(v4 + 6216, (void *)(v8 + 132), 0x80u);
          if( Path < 0 )
            goto LABEL_12;
        }
        else
        {
          *(_WORD *)(v8 + 132) = 0;
        }
        v10 = (struct _EX_RUNDOWN_REF *)SmKmStoreRefFromStoreIndex(a1, *(_DWORD *)(v4 + 6016) & 0x3FF);
        ExReleaseRundownProtection(v10 + 1);
        v4 = 0i64;
      }
      else
      {
        memmove((UINT8 *)(v7 + 4), (UINT8 *)(a2 + 4 * (v6-- + 1i64)), 4 * (*(unsigned __int8 *)(a2 + 1) - v5--) - 4);
        --*(_BYTE *)(a2 + 1);
      }
      ++v5;
      ++v6;
    }
    while( v5 < *(unsigned __int8 *)(a2 + 1) );
  }
  Path = 0;
LABEL_12:
  if( v4 )
  {
    v11 = (struct _EX_RUNDOWN_REF *)SmKmStoreRefFromStoreIndex(a1, *(_DWORD *)(v4 + 6016) & 0x3FF);
    ExReleaseRundownProtection(v11 + 1);
  }
  return(unsigned int)Path;
}

Referenced by:

SmProcessListRequest