// HiiRouteConfig - decompiled from Platform.efi
void HiiRouteConfig()
{
  _WORD *v0; // rax
  _WORD *v1; // rax
  signed __int64 v2; // rax
  _BYTE v3[688]; // [rsp+20h] [rbp-E0h] BYREF
  _BYTE SourceBuffer[1504]; // [rsp+2D0h] [rbp+1D0h] BYREF
  _BYTE DestinationBuffer[1504]; // [rsp+8B0h] [rbp+7B0h] BYREF

  DebugPrint(0x80000000, "PchOnSetupEnter() called\n"); /*0x19af*/
  if ( WriteProtocolVar((__int64)&unk_F9F0, (__int64)SourceBuffer) >= 0 ) /*0x19ca*/
  {
    CopyMem(DestinationBuffer, SourceBuffer, 0x5D7u); /*0x19e4*/
    SourceBuffer[0] = GetManufacturingMode(); /*0x19f5*/
    v0 = HiiStringToToken2((__int64)&unk_FAF0); /*0x19fb*/
    if ( v0 ) /*0x1a03*/
    {
      v1 = v0 + 12; /*0x1a05*/
      if ( v1 ) /*0x1a09*/
        SourceBuffer[1] = (*(_DWORD *)((_BYTE *)v1 + 2975) & 0x1000) != 0; /*0x1a16*/
    }
    SourceBuffer[11] = *(_BYTE *)(qword_12B70 + 150); /*0x1a36*/
    SourceBuffer[12] = *(_BYTE *)(qword_12B70 + 148); /*0x1a49*/
    if ( StrCmpS(DestinationBuffer, (UINTN)SourceBuffer, 1495) ) /*0x1a4f*/
      RegisterHiiPackage((__int64)&unk_F9F0, (__int64)SourceBuffer); /*0x1a67*/
  }
  if ( WriteProtocolVar((__int64)&unk_FB40, (__int64)v3) >= 0 )
  {
    v3[102] = *(_BYTE *)(qword_12B70 + 149); /*0x1a9a*/
    v3[108] = *(_BYTE *)(qword_12B70 + 151); /*0x1aa3*/
    v3[109] = *(_BYTE *)(qword_12B70 + 152); /*0x1aac*/
    v3[103] = *(_BYTE *)(qword_12B70 + 142); /*0x1ab5*/
    v3[104] = *(_BYTE *)(qword_12B70 + 143); /*0x1abe*/
    v3[105] = *(_BYTE *)(qword_12B70 + 144); /*0x1ac7*/
    v3[106] = *(_BYTE *)(qword_12B70 + 145); /*0x1ad0*/
    v3[107] = *(_BYTE *)(qword_12B70 + 146); /*0x1ad9*/
    v3[101] = *(_BYTE *)(qword_12B70 + 147); /*0x1ae7*/
    v2 = RegisterHiiPackage((__int64)&unk_FB40, (__int64)v3); /*0x1aea*/
    if ( v2 < 0 )
      DebugPrint(0x80000000, "The Setup variables are not updated... Status: %r\n", v2);
  }
}
