// LocateHiiSetup - decompiled from Platform.efi
void LocateHiiSetup()
{
  __int64 v0; // rax
  const CHAR8 *_nsetSecureEraseAllDIMMs_is_Successfully_disabled_n; // rdx
  __int64 v2; // rbx
  __int64 n24; // rdi
  __int64 v4; // rax
  const CHAR8 *_nSecure_erase_is_Successfully_disabled_n; // rdx
  _BYTE v6[32]; // [rsp+20h] [rbp-238h] BYREF
  _BYTE v7[528]; // [rsp+40h] [rbp-218h] BYREF
  char v8; // [rsp+260h] [rbp+8h] BYREF

  WriteProtocolVar((__int64)&unk_FAB0, (__int64)v7); /*0x13c2*/
  if ( v7[238] == 1 ) /*0x13d4*/
  {
    DebugPrint(0x40u, "setSecureEraseAllDIMMs is enabled!\n"); /*0x13df*/
    DebugPrint(0x40u, "Disabling setSecureEraseAllDIMMs...\n"); /*0x13ed*/
    v8 = 0; /*0x13fa*/
    v0 = SetupVariableReadback((__int64)&unk_FAB0, 0xEEu, (__int64)&v8); /*0x140e*/
    _nsetSecureEraseAllDIMMs_is_Successfully_disabled_n = "\nsetSecureEraseAllDIMMs is Successfully disabled\n"; /*0x1413*/
    if ( v0 ) /*0x141f*/
      _nsetSecureEraseAllDIMMs_is_Successfully_disabled_n = "\nFailed to disable setSecureEraseAllDIMMs!!!\n"; /*0x1421*/
    DebugPrint(0x40u, _nsetSecureEraseAllDIMMs_is_Successfully_disabled_n); /*0x1428*/
  }
  v2 = 0; /*0x142d*/
  n24 = 24; /*0x142f*/
  do /*0x149b*/
  {
    if ( v7[v2 + 239] == 1 ) /*0x143a*/
    {
      DebugPrint(0x40u, "secure erase is enabled!\n"); /*0x1446*/
      DebugPrint(0x40u, "Disabling secure erase...\n"); /*0x1455*/
      v6[v2] = 0; /*0x1470*/
      v4 = SetupVariableReadback((__int64)&unk_FAB0, v2 + 239, (__int64)&v6[v2]); /*0x1474*/
      _nSecure_erase_is_Successfully_disabled_n = "\nSecure erase is Successfully disabled\n"; /*0x1479*/
      if ( v4 ) /*0x1486*/
        _nSecure_erase_is_Successfully_disabled_n = "\nFailed to disable secure erase is enabled!\n"; /*0x1488*/
      DebugPrint(0x40u, _nSecure_erase_is_Successfully_disabled_n); /*0x148f*/
    }
    ++v2; /*0x1494*/
    --n24; /*0x1497*/
  }
  while ( n24 ); /*0x149b*/
}
