CmpGetBootValueData
UINT8 __stdcall CmpGetBootValueData(_HHIVE *Hive, _CM_KEY_VALUE *Value, PVOID Buffer, UINT64 a4){
UINT64 v4;
unsigned int DataLength;
unsigned int v8;
UINT8 *v9;
__int64 Data;
char v11;
__int64 v12;
__int64 v13;
__int64 v14;
unsigned int v15;
unsigned __int16 v16;
UINT8 *v17;
UINT64 v18;
int v20[2];
int v21[2];
__int64 v22;
__int64 v23;
int v24;
int v25;
v23 = (__int64)Hive;
v4 = (unsigned int)a4;
v21[1] = 0;
DataLength = Value->DataLength;
v21[0] = -1;
v8 = DataLength + 0x80000000;
if( DataLength < 0x80000000 )
v8 = DataLength;
if( DataLength >= 0x80000000 )
{
memmove((UINT8 *)Buffer, (UINT8 *)&Value->Data, (unsigned int)a4);
LABEL_5:
LOBYTE(v9) = 1;
return(unsigned __int8)v9;
}
if( (unsigned int)dword_140D5B834 < 4 || v8 - 16345 > 0x7FFFC026 )
{
v9 = (UINT8 *)((__int64(__fastcall *)(ULONG_PTR *, _QWORD, int *))qword_140D5B768)(
&CmControlHive,
Value->Data,
v21);
if( !v9 )
return(unsigned __int8)v9;
memmove((UINT8 *)Buffer, v9, v4);
((void(__fastcall *)(ULONG_PTR *, int *))qword_140D5B770)(&CmControlHive, v21);
goto LABEL_5;
}
Data = Value->Data;
v20[0] = -1;
v20[1] = 0;
v11 = 1;
v25 = 0;
v23 = 0xFFFFFFFFi64;
v24 = -1;
v12 = ((__int64(__fastcall *)(ULONG_PTR *, __int64, int *))qword_140D5B768)(&CmControlHive, Data, v20);
v13 = v12;
if( v12 )
{
v14 = ((__int64(__fastcall *)(ULONG_PTR *, _QWORD, int *))qword_140D5B768)(
&CmControlHive,
*(unsigned int *)(v12 + 4),
&v24);
v22 = v14;
if( v14 )
{
v15 = Value->DataLength;
if( v15 > (unsigned int)v4 )
v15 = v4;
v16 = 0;
if( *(_WORD *)(v13 + 2) )
{
while( 1 )
{
v17 = (UINT8 *)((__int64(__fastcall *)(ULONG_PTR *, _QWORD, __int64 *))qword_140D5B768)(
&CmControlHive,
*(unsigned int *)(v14 + 4i64 * v16),
&v23);
if( !v17 )
break;
v18 = v15;
if( v15 > 0x3FD8 )
v18 = 16344i64;
memmove((UINT8 *)Buffer + 16344 * v16, v17, v18);
((void(__fastcall *)(ULONG_PTR *, __int64 *))qword_140D5B770)(&CmControlHive, &v23);
if( v15 > 0x3FD8 )
{
v14 = v22;
v15 -= 16344;
if( ++v16 < *(_WORD *)(v13 + 2) )
continue;
}
goto LABEL_20;
}
v11 = 0;
}
LABEL_20:
((void(__fastcall *)(ULONG_PTR *, int *))qword_140D5B770)(&CmControlHive, &v24);
}
else
{
v11 = 0;
}
((void(__fastcall *)(ULONG_PTR *, int *))qword_140D5B770)(&CmControlHive, v20);
}
else
{
v11 = 0;
}
LOBYTE(v9) = v11;
return(unsigned __int8)v9;
}Referenced by:
CmpGetSystemControlValues