// HiiStringToToken2 - decompiled from Platform.efi
_WORD *__fastcall HiiStringToToken2(const void *DestinationBuffer, __int64 a2, UINTN Length)
{
  _WORD *i; // rdx
  __int64 v5; // rcx
  _WORD *v6; // rax
  UINTN Length_1; // r8
  _WORD *v8; // rbx

  for ( i = (_WORD *)WriteS3BootScript((__int64)DestinationBuffer, a2, Length); /*0x7bee*/
        ;
        i = (_WORD *)((char *)v8 + (unsigned __int16)v8[1]) )
  {
    v6 = HiiStringToToken(v5, i); /*0x7c0a*/
    v8 = v6; /*0x7c0f*/
    if ( !v6 || (unsigned __int8)CompareMem(DestinationBuffer, v6 + 4, Length_1) ) /*0x7bfa*/
      break; /*0x7bfa*/
  }
  return v8; /*0x7c1f*/
}
