int __fastcall BitmapRenderBlock(int p_n26, int n26, int a3)
{
unsigned int *p_n3; // edi
int n26_1; // eax
int v5; // ebp
int n26_2; // esi
int v7; // edx
int count; // ebx
int ImageSize; // eax
int ColorsUsed; // eax
int ImageSize_1; // [esp+8h] [ebp-8h]
p_n3 = *(unsigned int **)(p_n26 + 8);
n26_1 = n26;
v5 = 0;
if ( p_n3 )
{
while ( 1 )
{
n26_2 = n26_1;
if ( !n26_1 )
n26_2 = 1;
if ( !*p_n3 )
{
count = p_n3[1];
ImageSize = BitmapGetImageSize(count);
goto LABEL_11;
}
if ( *p_n3 == 1 )
break;
if ( *p_n3 == 2 )
{
count = p_n3[1];
ImageSize = 8 * count;
LABEL_11:
ImageSize_1 = ImageSize;
ColorsUsed = BitmapGetColorsUsed(*p_n3, n26_2, a3);
v7 = ImageSize_1 + (ColorsUsed + 4) * ((count + (1 << ColorsUsed) - 1) / (1 << ColorsUsed));
goto LABEL_12;
}
v7 = 0;
LABEL_12:
p_n3 = (unsigned int *)p_n3[4];
v5 += v7;
n26_1 = n26;
if ( !p_n3 )
return v5;
}
count = p_n3[1];
ImageSize = BitmapGetDataOffset(count);
goto LABEL_11;
}
return v5;
}