ObpInitStackAndObjectTables
NTSTATUS __stdcall ObpInitStackAndObjectTables(){
VOID **PoolWithTag;
VOID **v1;
VOID **v2;
_WORD *v3;
VOID **v4;
int v5;
_SLIST_ENTRY *v6;
_QWORD *v8;
_QWORD *v9;
void *v10;
void *v11;
PoolWithTag = ExAllocatePoolWithTag(0x200ui64, 0x8088ui64, 1951556175i64);
StackTable = PoolWithTag;
v1 = PoolWithTag;
if( PoolWithTag )
{
memset(PoolWithTag, 0i64, 0x88u);
memset(v1 + 17, 255i64, 0x7FFAu);
v2 = ExAllocatePoolWithTag(0x200ui64, 0x20000ui64, 1951556175i64);
v3 = StackTable;
*((_QWORD *)StackTable + 1) = v2;
if( v2 )
{
memset(v2, 0i64, 0x20000u);
v3[1] = 1024;
v4 = ExAllocatePoolWithTag(0x200ui64, 0xC88ui64, 1951556175i64);
ObjectTable = v4;
if( !v4 )
{
LABEL_14:
v11 = (void *)*((_QWORD *)StackTable + 1);
if( v11 )
ExFreePoolWithTag(v11, 0x7452624Fu);
ExFreePoolWithTag(StackTable, 0x7452624Fu);
return -1073741801;
}
memset(v4, 0i64, 0xC88u);
if( ((unsigned __int8)&ObpWorkItemFreeList & 0xF) != 0 )
RtlRaiseStatus(-2147483646);
v5 = 0;
ObpWorkItemFreeList = 0i64;
while( 1 )
{
v6 = (_SLIST_ENTRY *)ExAllocatePoolWithTag(0x200ui64, 0xB0ui64, 1951556175i64);
if( !v6 )
break;
RtlpInterlockedPushEntrySList(&ObpWorkItemFreeList, v6);
if( (unsigned int)++v5 >= 0x1F4 )
return 0;
}
RtlpInterlockedFlushSList();
v9 = v8;
while( v9 )
{
v10 = v9;
v9 = (_QWORD *)*v9;
ExFreePoolWithTag(v10, 0x7452624Fu);
}
}
if( ObjectTable )
ExFreePoolWithTag(ObjectTable, 0x7452624Fu);
goto LABEL_14;
}
return -1073741801;
}Referenced by:
ObpInitStackTrace
ObpStartRuntimeStackTrace