ObpInitStackAndObjectTables

INT64 __fastcall ObpInitStackAndObjectTables(){
  void *PoolWithTag; 
  void *v1; 
  VOID *v2; 
  _WORD *v3; 
  void *v4; 
  int v5; 
  struct _SLIST_ENTRY *v6; 
  PSLIST_ENTRY v8; 
  PSLIST_ENTRY v9; 
  void *v10; 
  PoolWithTag = ExAllocatePoolWithTag(NonPagedPoolNx, 0x8088ui64, 0x7452624Fui64);
  ObpStackTable = PoolWithTag;
  v1 = PoolWithTag;
  if( PoolWithTag )
  {
    memset((INT64)PoolWithTag, 0i64);
    memset((INT64)v1 + 136, 255i64);
    v2 = ExAllocatePoolWithTag(NonPagedPoolNx, 0x20000ui64, 0x7452624Fui64);
    v3 = ObpStackTable;
    *((_QWORD *)ObpStackTable + 1) = v2;
    if( v2 )
    {
      memset((INT64)v2, 0i64);
      v3[1] = 1024;
      v4 = ExAllocatePoolWithTag(NonPagedPoolNx, 0xC88ui64, 0x7452624Fui64);
      ObpObjectTable = v4;
      if( !v4 )
      {
LABEL_14:
        v10 = (void *)*((_QWORD *)ObpStackTable + 1);
        if( v10 )
          ExFreePoolWithTag(v10, 0x7452624Fu);
        ExFreePoolWithTag(ObpStackTable, 0x7452624Fu);
        return 3221225495i64;
      }
      memset((INT64)v4, 0i64);
      if( ((unsigned __int8)&ObpWorkItemFreeList & 0xF) != 0 )
        RtlRaiseStatus(-2147483646);
      v5 = 0;
      ObpWorkItemFreeList = 0i64;
      while( 1 )
      {
        v6 = (struct _SLIST_ENTRY *)ExAllocatePoolWithTag(NonPagedPoolNx, 0xB0ui64, 0x7452624Fui64);
        if( !v6 )
          break;
        RtlpInterlockedPushEntrySList((PSLIST_HEADER)&ObpWorkItemFreeList, v6);
        if( (unsigned int)++v5 >= 0x1F4 )
          return 0i64;
      }
      v8 = RtlpInterlockedFlushSList((PSLIST_HEADER)&ObpWorkItemFreeList);
      while( v8 )
      {
        v9 = v8;
        v8 = v8->Next;
        ExFreePoolWithTag(v9, 0x7452624Fu);
      }
    }
    if( ObpObjectTable )
      ExFreePoolWithTag(ObpObjectTable, 0x7452624Fu);
    goto LABEL_14;
  }
  return 3221225495i64;
}

Referenced by:

ObpInitStackTrace
ObpStartRuntimeStackTrace