Newer
Older
AMI-Aptio-BIOS-Reversed / PurleyPlatPkg / Platform / Pei / EarlyVideoPei / ImageRenderWriteScanline.c
@Ajax Dong Ajax Dong 2 days ago 662 bytes Full restructure
char __thiscall ImageRenderWriteScanline(int *this)
{
  int v2; // edi
  int v3; // edx
  int v4; // ecx
  int *v5; // eax
  char result; // al

  v2 = *(this + 8);
  if ( v2 < *(this + 1) )
  {
    v3 = v2 % *(this + 6);
    v4 = v2 / *(this + 6);
    v5 = (int *)*(this + 7);
    if ( v4 >= *v5 )
      v3 += *(this + 5);
    result = *(_BYTE *)(v4 + v5[4 * v3 + 1]);
    goto LABEL_7;
  }
  if ( v2 < *(this + 1) + *(this + 2) )
  {
    result = *(_BYTE *)((v2 - *(this + 1)) / *(this + 6)
                      + *(_DWORD *)(*(this + 7) + 16 * ((v2 - *(this + 1)) % *(this + 6)) + 12));
LABEL_7:
    *(this + 8) = v2 + 1;
    return result;
  }
  return 0;
}