Newer
Older
AMI-Aptio-BIOS-Reversed / PurleyPlatPkg / Platform / Pei / EarlyVideoPei / SetMem32.c
@Ajax Dong Ajax Dong 2 days ago 831 bytes Full restructure
_BYTE *__fastcall SetMem32(_BYTE *a1, unsigned int n10, __int64 n0xA, char a4)
{
  int v4; // ebx
  unsigned int _EDX; // edx
  int Height; // ecx
  char v9; // al

  v4 = HIDWORD(n0xA);
  if ( n0xA >= 0 )
    goto LABEL_2;
  if ( n10 == 10 )
  {
    Height = -(int)n0xA;
    _EDX = (unsigned __int64)-n0xA >> 32;
    goto LABEL_8;
  }
  if ( a4 )
LABEL_2:
    _EDX = HIDWORD(n0xA);
  else
    _EDX = 0;
  Height = n0xA;
LABEL_8:
  if ( __PAIR64__(Height, _EDX) )
  {
    do
    {
      Height = ImageDecodeGetHeight(n10, (unsigned int *)&n0xA, Height, _EDX);
      if ( (unsigned int)n0xA >= 0xA )
        v9 = n0xA + 87;
      else
        v9 = n0xA + 48;
      *a1++ = v9;
    }
    while ( __PAIR64__(Height, _EDX) );
  }
  else
  {
    *a1++ = 48;
  }
  if ( n10 == 10 && v4 < 0 )
    *a1++ = 45;
  *a1 = 0;
  return a1 - 1;
}