WmipRegisterOrUpdateDS
__int64 __fastcall WmipRegisterOrUpdateDS(__int64 a1, char a2){
unsigned int Information;
unsigned int v5;
_DWORD *Buffer;
int v7;
int v8;
IO_STATUS_BLOCK Iosb;
Information = 0;
Iosb.Information = 0i64;
v5 = 0x2000;
do
{
Buffer = ExAllocatePoolWithTag(NonPagedPoolNx, v5, 0x44696D57ui64);
if( Buffer )
{
v7 = WmipSendWmiIrp(0xBu, *(unsigned int *)(a1 + 56), (VOID *)(a2 != 0), v5, Buffer, &Iosb);
v8 = v7;
if( v7 < 0 )
{
if( v7 == -1073741789 )
goto LABEL_14;
v8 = WmipSendWmiIrp(8u, *(unsigned int *)(a1 + 56), (VOID *)(a2 != 0), v5, Buffer, &Iosb);
}
if( v8 != -1073741789 )
{
Information = Iosb.Information;
if( Iosb.Information != 4 )
continue;
goto LABEL_15;
}
LABEL_14:
Information = Iosb.Information;
LABEL_15:
v5 = *Buffer;
ExFreePoolWithTag(Buffer, 0);
v8 = -1073741789;
continue;
}
v8 = -1073741670;
}
while( v8 == -1073741789 );
if( v8 >= 0 )
v8 = WmipProcessWmiRegInfo(a1, (UINT64 *)Buffer, Information, a2);
if( Buffer )
ExFreePoolWithTag(Buffer, 0);
return(unsigned int)v8;
}Referenced by:
WmipRegisterDevice