PipMigrateCleanServiceCallback
NTSTATUS __stdcall PipMigrateCleanServiceCallback(HPNPCTX *hPnpCtx, VOID *rdx0, WCHAR *r8){
VOID **PoolWithTag;
VOID *v5;
INT64 v6;
INT64 v7;
int v8;
unsigned int v9;
WCHAR *i;
NTSTATUS v11;
UINT64 DesiredAccess;
UINT64 *DesiredAccessa;
UINT64 *DataSize;
INT64 v16;
INT64 v17;
UINT64 RegType;
int Data;
int v20;
unsigned int v21;
UINT64 KeyIndex;
KeyIndex = 0i64;
LODWORD(RegType) = 0;
PoolWithTag = 0i64;
v20 = 0;
v21 = 0;
Data = 0;
LODWORD(DesiredAccess) = 983103;
if( PnpCtxRegOpenKey(hPnpCtx, rdx0, r8, 0i64, DesiredAccess, (VOID **)&KeyIndex) >= 0 )
{
HIDWORD(RegType) = 4;
if( PnpCtxRegQueryValue(
(HPNPCTX *)v5,
(VOID *)KeyIndex,
(WCHAR *)L"Clean",
&RegType,
&Data,
(UINT64 *)((char *)&RegType + 4)) >= 0
&& RegType == 0x400000004i64 )
{
if( Data )
{
if( (int)PnpCtxRegQueryInfoKey((__int64)v5, (VOID *)KeyIndex, &v20, &v21, 0i64, 0i64, 0i64) >= 0 )
{
if( v20 )
{
v8 = v21 + 1;
PoolWithTag = ExAllocatePoolWithTag(1ui64, 2i64 * (v21 + 1), 1852403792i64);
if( PoolWithTag )
{
v9 = 0;
for( i = 0i64; ; i = (WCHAR *)v9 )
{
DesiredAccessa = &RegType;
LODWORD(RegType) = v8;
v11 = PnpCtxRegEnumKey(v5, KeyIndex, i, (UINT64 *)PoolWithTag);
if( v11 == -2147483622 || v11 < 0 )
break;
if( PnpCtxRegDeleteTree(hPnpCtx, (VOID *)KeyIndex, (WCHAR *)PoolWithTag) >= 0 )
v9 = 0;
else
++v9;
}
}
}
}
}
}
}
if( KeyIndex )
PnpCtxRegCloseKey((HPNPCTX *)v5, (VOID *)KeyIndex, v6, v7, (INT64)DesiredAccessa, (INT64)DataSize, v16, v17);
if( PoolWithTag )
ExFreePoolWithTag(PoolWithTag, 0);
return 0;
}Referenced by:
No references.