PiDevCfgResolveVariableConstant
INT64 __fastcall PiDevCfgResolveVariableConstant(INT64 a1, VOID *a2, INT64 a3){
NTSTATUS RegistryValue;
UINT8 *v5;
unsigned int v6;
UINT64 v7;
int v8;
UINT8 *PoolWithTag;
UINT8 *v10;
PVOID P;
P = 0i64;
RegistryValue = IopGetRegistryValue(a2, (PWCHAR)L"Value", 0i64, (KEY_VALUE_FULL_INFORMATION **)&P);
v5 = (UINT8 *)P;
v6 = RegistryValue;
if( RegistryValue >= 0 )
{
if( !PnpValidateRegistryValue((_KEY_VALUE_FULL_INFORMATION *)P) )
{
v6 = -1073741823;
goto LABEL_10;
}
v7 = *((unsigned int *)v5 + 3);
v8 = *((_DWORD *)v5 + 1);
if( (_DWORD)v7 )
{
PoolWithTag = (UINT8 *)ExAllocatePoolWithTag(PagedPool, (unsigned int)v7, 0x63647050ui64);
v10 = PoolWithTag;
if( !PoolWithTag )
{
v6 = -1073741670;
goto LABEL_10;
}
memmove(PoolWithTag, &v5[*((unsigned int *)v5 + 2)], v7);
}
else
{
v10 = 0i64;
}
*(_DWORD *)(a3 + 32) = v8;
*(_DWORD *)(a3 + 36) = v7;
*(_QWORD *)(a3 + 40) = v10;
}
LABEL_10:
if( v5 )
ExFreePoolWithTag(v5, 0);
return v6;
}Referenced by:
No references.