SdbpValidateAndApplyCompatFlags

__int64 __fastcall SdbpValidateAndApplyCompatFlags(__int64 a1, _DWORD *a2){
  unsigned int v2; 
  v2 = 0;
  if( *a2 == 1 )
  {
    *(_DWORD *)(a1 + 1328) |= 1u;
    goto LABEL_8;
  }
  if( *a2 == 2 )
  {
LABEL_8:
    *(_DWORD *)(a1 + 1328) |= 2u;
    goto LABEL_4;
  }
  if( *a2 != 3 )
  {
    AslLogCallPrintf(
      1ui64,
      "SdbpValidateAndApplyCompatFlags",
      0x32Aui64,
      "MajorVersion mismatch, MajorVersion 0x%lx Expected 0x%lx",
      *a2,
      3);
    return v2;
  }
LABEL_4:
  if( !(unsigned int)SdbGetDatabaseID(a1, (void *)(a1 + 28)) )
    AslLogCallPrintf(1ui64, "SdbpValidateAndApplyCompatFlags", 0x334ui64, "Failed to get the database ID");
  return 1;
}

Referenced by:

SdbOpenDatabaseEx
SdbpOpenDatabaseInMemory