InitializeSidLookupTable

UINT8 __stdcall InitializeSidLookupTable(UINT8 InitFlag){
  UINT64 v1; 
  __int64 *v2; 
  unsigned int v3; 
  int v4; 
  __int64 *v5; 
  int v6; 
  int v7; 
  int v8; 
  int v9; 
  int v10; 
  UINT64 v11; 
  int v13; 
  int v14; 
  int v15; 
  int *p_IdentifierAuthority; 
  UINT *v17; 
  int v18; 
  __int16 v19; 
  int v20; 
  __int16 v21; 
  int v22; 
  __int16 v23; 
  SID_IDENTIFIER_AUTHORITY v24; 
  struct _SID_IDENTIFIER_AUTHORITY IdentifierAuthority; 
  int v26; 
  __int16 v27; 
  SID_IDENTIFIER_AUTHORITY v28; 
  *(_WORD *)&v24.Value[4] = 256;
  *(_DWORD *)v24.Value = 0;
  v2 = &qword_140C0F420;
  v22 = 0;
  v3 = 0;
  v20 = 0;
  *(_DWORD *)IdentifierAuthority.Value = 0;
  v18 = 0;
  *(_DWORD *)v28.Value = 0;
  v26 = 0;
  v23 = 512;
  v21 = 768;
  *(_WORD *)&IdentifierAuthority.Value[4] = 1280;
  v19 = 4096;
  *(_WORD *)&v28.Value[4] = 3840;
  v27 = 4608;
  do
  {
    if( *((_BYTE *)v2 - 16) != 1 || !*v2 )
    {
      v4 = *((_DWORD *)v2 + 3);
      v5 = &qword_140C0F430[13 * v3];
      *v2 = (__int64)v5;
      v6 = v4 - 1;
      if( !v6 )
      {
        LOBYTE(v1) = 1;
        RtlInitializeSid(v5, &v24, v1);
        *RtlSubAuthoritySid((void *)*v2, 0i64) = *((_DWORD *)v2 + 2);
        goto LABEL_11;
      }
      v7 = v6 - 1;
      if( !v7 )
      {
        p_IdentifierAuthority = &v22;
        goto LABEL_20;
      }
      v8 = v7 - 2;
      if( !v8 )
      {
        p_IdentifierAuthority = &v20;
LABEL_20:
        LOBYTE(v1) = 1;
        RtlInitializeSid(v5, (SID_IDENTIFIER_AUTHORITY *)p_IdentifierAuthority, v1);
        v11 = 0i64;
        goto LABEL_10;
      }
      v9 = v8 - 1;
      if( !v9 )
      {
        p_IdentifierAuthority = (int *)&IdentifierAuthority;
        goto LABEL_20;
      }
      v10 = v9 - 1;
      if( !v10 )
      {
        LOBYTE(v1) = 2;
        RtlInitializeSid(v5, &IdentifierAuthority, v1);
        *RtlSubAuthoritySid((void *)*v2, 0i64) = 32;
        goto LABEL_9;
      }
      v13 = v10 - 2;
      if( !v13 )
      {
        p_IdentifierAuthority = &v18;
        goto LABEL_20;
      }
      v14 = v13 - 1;
      if( !v14 )
      {
        LOBYTE(v1) = 2;
        RtlInitializeSid(v5, &v28, v1);
        *RtlSubAuthoritySid((void *)*v2, 0i64) = 2;
LABEL_9:
        v11 = 1i64;
LABEL_10:
        *RtlSubAuthoritySid((void *)*v2, v11) = *((_DWORD *)v2 + 2);
LABEL_11:
        *((_BYTE *)v2 - 16) = 1;
        goto LABEL_12;
      }
      v15 = v14 - 1;
      if( !v15 )
      {
        LOBYTE(v1) = 6;
        RtlInitializeSid(v5, &IdentifierAuthority, v1);
        *RtlSubAuthoritySid((void *)*v2, 0i64) = 84;
        v17 = RtlSubAuthoritySid((void *)*v2, 1ui64);
        *(_OWORD *)v17 = 0i64;
        v17[4] = 0;
        goto LABEL_11;
      }
      if( v15 == 1 )
      {
        p_IdentifierAuthority = &v26;
        goto LABEL_20;
      }
    }
LABEL_12:
    ++v3;
    v2 += 13;
  }
  while( v3 < 0x3F );
  return 1;
}

Referenced by:

SddlBaseInitialize