Newer
Older
AMI-Aptio-BIOS-Reversed / PurleyPlatPkg / Platform / Pei / EarlyVideoPei / ImageRenderRle.c
@Ajax Dong Ajax Dong 2 days ago 759 bytes Full restructure
_DWORD *__fastcall ImageRenderRle(int a1, int Pool)
{
  _DWORD *p_count; // eax
  _DWORD *p_count_1; // esi
  int v6; // ecx
  bool *v7; // ebx
  unsigned __int8 v8; // dl
  int n8; // ebp
  bool v10; // al
  _DWORD *p_count_2; // [esp+Ch] [ebp-4h]

  p_count = ImageRenderAllocContext();
  p_count_1 = p_count;
  p_count_2 = p_count;
  if ( !p_count || ImageRenderCheckContext(p_count, (void *)(8 * a1)) )
    return 0;
  v6 = 0;
  v7 = (bool *)p_count_1[1];
  if ( a1 > 0 )
  {
    do
    {
      v8 = 0x80;
      n8 = 8;
      do
      {
        v10 = (v8 & *(_BYTE *)(v6 + Pool)) != 0;
        v8 >>= 1;
        *v7++ = v10;
        --n8;
      }
      while ( n8 );
      ++v6;
    }
    while ( v6 < a1 );
    return p_count_2;
  }
  return p_count_1;
}