WbAddLookupEntryEx

NTSTATUS __stdcall WbAddLookupEntryEx(INT64 *a1, INT64 a2, INT64 a3, UINT64 a4){
  unsigned int v4; 
  int v5; 
  unsigned int v6; 
  unsigned int v7; 
  int v10; 

  v4 = *((_DWORD *)a1 + 1);
  v5 = 0;
  v6 = *((_DWORD *)a1 + 2);
  v7 = a4;
  if( v4 + 1 >= v6 )
  {
    v5 = WbReAlloc((PVOID)a1[2], v6 * *(_DWORD *)a1, *(_DWORD *)a1 * (v6 + *((_DWORD *)a1 + 6)));
    if( v5 < 0 )
      return v5;
    *((_DWORD *)a1 + 2) += *((_DWORD *)a1 + 6);
    v6 = *((_DWORD *)a1 + 2);
    v4 = *((_DWORD *)a1 + 1);
  }
  if( v7 > v4 || !v6 )
    return -1073741811;
  memmove(
    (VOID *)(a1[2] + (v7 + 1) * *(_DWORD *)a1),
    (const VOID *)(a1[2] + v7 * *(_DWORD *)a1),
    *(_DWORD *)a1 * (v4 - v7));
  v10 = *(_DWORD *)a1;
  ++*((_DWORD *)a1 + 1);
  *(_QWORD *)(v7 * v10 + a1[2]) = a2;
  return v5;
}

Referenced by:

sub_14065FDF0