ObpInitStackTrace

VOID __stdcall ObpInitStackTrace(){
  int v0; 
  __int64 v1; 
  __int64 v2; 
  unsigned __int16 v3; 
  VOID **PoolWithTag; 
  unsigned int v5; 
  unsigned int v6; 
  int *v7; 
  int v8; 
  unsigned int i; 
  unsigned int v10; 
  int v11; 
  int v12; 

  stru_140C25A40._bf_0 = 0i64;
  stru_140C25A20.Parameter = 0i64;
  stru_140C25A20.List.Flink = 0i64;
  qword_140C25A18 = 0i64;
  v0 = 0;
  stru_140C25A20.WorkerRoutine = (void(__fastcall *)(void *))ObpPushStackInfoQueue;
  memset(&unk_140C25980, 0i64, 0x40u);
  memset(dword_140C25940, 0i64, 0x40u);
  v1 = -1i64;
  dword_140C25A14 = 0;
  dword_140C25A10 = 0;
  if( word_140C25B60[0] )
  {
    v2 = -1i64;
    do
      ++v2;
    while( word_140C25B60[v2] );
    v3 = 2 * v2;
    PoolWithTag = ExAllocatePoolWithTag(0x200ui64, v3 + 2i64, 1951556175i64);
    qword_140C259E8 = PoolWithTag;
    if( !PoolWithTag )
      return;
    LOWORD(qword_140C259E0) = v3;
    WORD1(qword_140C259E0) = v3 + 2;
    memmove(PoolWithTag, word_140C25B60, (unsigned __int16)(v3 + 2));
    v0 = 32;
  }
  if( word_140C25A60[0] )
  {
    do
      ++v1;
    while( word_140C25A60[v1] );
    v5 = 0;
    v6 = ((int)v1 + 1) / 5u;
    if( v6 > 0x10 )
      v6 = 16;
    if( v6 )
    {
      v7 = (int *)&unk_140C25980;
      do
      {
        v8 = *v7;
        for( i = 0; i < 4; ++i )
        {
          v10 = 5 * v5 - i;
          v11 = (v8 << 8) | word_140C25A60[v10 + 3];
          v8 = v11;
        }
        *v7 = v11;
        ++v5;
        ++v7;
      }
      while( v5 < v6 );
    }
    v0 |= 0x10u;
  }
  if( v0 )
  {
    if( dword_140C25C60 )
      v0 |= 0x40u;
    if( ObpInitStackAndObjectTables() < 0 )
    {
      if( (v0 & 0x10) != 0 )
        memset(&unk_140C25980, 0i64, 0x40u);
      if( (v0 & 0x20) != 0 )
      {
        ExFreePoolWithTag(qword_140C259E8, 0x7452624Fu);
        qword_140C259E0 = 0i64;
        qword_140C259E8 = 0i64;
      }
    }
    else
    {
      v12 = v0 | 1;
      dword_140C259FC = v12;
      ObpTraceFlags = v12;
      if( (v12 & 0x10) != 0 )
        qword_140C259F0 = (__int64)&unk_140C25980;
      if( (v12 & 0x20) != 0 )
        qword_140C259C0 = (PCUNICODE_STRING)&qword_140C259E0;
    }
  }
}

Referenced by:

ObInitSystem