// HiiCallbackHelper - decompiled from Platform.efi
void *HiiCallbackHelper()
{
  void *n15; // rax
  void *n15_1; // rbx
  _BYTE SourceBuffer[112]; // [rsp+20h] [rbp-E8h] BYREF
  _BYTE DestinationBuffer[120]; // [rsp+90h] [rbp-78h] BYREF

  DebugPrint(0x80000000, "[ME] MeOnEnterSetup() called\n"); /*0x1d6d*/
  n15 = (void *)WriteProtocolVar((__int64)&unk_F950, (__int64)SourceBuffer); /*0x1d7e*/
  n15_1 = n15; /*0x1d83*/
  if ( (__int64)n15 >= 0 ) /*0x1d89*/
  {
    CopyMem(DestinationBuffer, SourceBuffer, 0x67u); /*0x1d9e*/
    if ( (unsigned int)GetManufacturingMode() == 1 || (n15 = (void *)GetManufacturingMode(), (_DWORD)n15 == 15) ) /*0x1db5*/
    {
      n15 = (void *)MeExtractSpsConfigOnSetupEnter((__int64)SourceBuffer); /*0x1dbc*/
      n15_1 = n15; /*0x1dc1*/
    }
    if ( !n15_1 ) /*0x1dc7*/
    {
      n15 = StrCmpS(DestinationBuffer, (UINTN)SourceBuffer, 103); /*0x1dda*/
      if ( n15 ) /*0x1de2*/
        return (void *)RegisterHiiPackage((__int64)&unk_F950, (__int64)SourceBuffer); /*0x1df0*/
    }
  }
  return n15; /*0x1df5*/
}
