ArbArbiterHandler
VOID __stdcall ArbArbiterHandler(PVOID Context, ARBITER_ACTION Action, _ARBITER_PARAMETERS *Params){
_ETHREAD *CurrentThread;
int v7;
UINT64 v8;
UINT8 v9;
UINT8 v10;
struct _KEVENT *v11;
VOID *v12;
IRP *v13;
CurrentThread = (_ETHREAD *)KeGetCurrentThread();
--*((_WORD *)CurrentThread + 242);
KeWaitForSingleObject(*((PVOID *)Context + 1), Executive, 0, 0, 0i64);
if( Action > ArbiterActionWriteReservedResources )
{
if( Action == ArbiterActionQueryConflict )
{
v7 = (*((__int64(__fastcall **)(PVOID, _ARBITER_PARAMETERS *))Context + 25))(Context, Params);
}
else if( Action == ArbiterActionQueryArbitrate )
{
v7 = (*((__int64(__fastcall **)(PVOID, _ARBITER_PARAMETERS *))Context + 24))(Context, Params);
}
else
{
if( Action == ArbiterActionAddReserved || Action != ArbiterActionBootAllocation )
goto LABEL_9;
v7 = (*((__int64(__fastcall **)(PVOID, _ARBITER_PARAMETERS *))Context + 23))(Context, Params);
}
}
else
{
if( Action >= ArbiterActionQueryAllocatedResources )
goto LABEL_9;
if( Action )
{
switch( Action )
{
case ArbiterActionRetestAllocation:
v7 = (*((__int64(__fastcall **)(PVOID, _ARBITER_PARAMETERS *))Context + 20))(Context, Params);
break;
case ArbiterActionCommitAllocation:
v7 = (*((__int64(__fastcall **)(PVOID))Context + 21))(Context);
break;
case ArbiterActionRollbackAllocation:
v7 = (*((__int64(__fastcall **)(PVOID))Context + 22))(Context);
break;
default:
goto LABEL_9;
}
}
else
{
v7 = (*((__int64(__fastcall **)(PVOID, _ARBITER_PARAMETERS *))Context + 19))(Context, Params);
}
}
if( v7 >= 0 )
{
if( (unsigned int)Action <= ArbiterActionRetestAllocation )
{
v12 = (VOID *)*((_QWORD *)Context + 38);
*((_BYTE *)Context + 296) = 1;
KeResetEvent(v12, v8, v9, v10, v13);
}
else if( (unsigned int)(Action - 2) <= 1 )
{
v11 = (struct _KEVENT *)*((_QWORD *)Context + 38);
*((_BYTE *)Context + 296) = 0;
KeSetEvent(v11, 0);
}
}
LABEL_9:
KeSetEvent(*((PRKEVENT *)Context + 1), 0);
KeLeaveCriticalRegionThread((__int64)KeGetCurrentThread());
}Referenced by:
No references.