SC_GPT::ReadHeader
__int64 __fastcall SC_GPT::ReadHeader(SC_GPT *this, int a2, struct GPT_HEADER *a3){
SC_DISK *v4;
__int64 v6;
int Sectors;
int v8;
int v9;
int v10;
v4 = *(SC_DISK **)this;
if( a2 )
v6 = *((_QWORD *)v4 + 30) - 1i64;
else
v6 = 1i64;
Sectors = SC_DISK::ReadSectors(v4, 1, v6, a3);
if( Sectors >= 0 )
{
Sectors = -1073741774;
if( *(_QWORD *)a3 == 0x5452415020494645i64
&& *((_DWORD *)a3 + 2) == 0x10000
&& *((_DWORD *)a3 + 3) == 92
&& *((_DWORD *)a3 + 21) == 128 )
{
v8 = *((_DWORD *)a3 + 20);
if( (unsigned int)(v8 - 1) <= 0x3FF && *((_QWORD *)a3 + 3) == v6 )
{
v9 = *((_DWORD *)a3 + 4);
*((_DWORD *)a3 + 4) = 0;
v10 = RtlComputeCrc32(0i64, (UINT8 *)a3, 0x5Cui64);
*((_DWORD *)a3 + 4) = v9;
if( v10 == v9 )
return *((_QWORD *)a3 + 5) < (unsigned __int64)(((((v8 << 7) + *(_DWORD *)(*(_QWORD *)this + 228i64) - 1) & (unsigned int)-*(_DWORD *)(*(_QWORD *)this + 228i64)) >> *(_DWORD *)(*(_QWORD *)this + 232i64))
+ 2) ? 0xC0000032 : 0;
}
}
}
return(unsigned int)Sectors;
}Referenced by:
No references.