sub_14065EB58

INT64 __fastcall sub_14065EB58(INT64 a1, INT64 a2, UINT64 a3, _QWORD *a4, INT64 *a5){
  int v5; 
  int v6; 
  unsigned int v8; 
  int v11; 
  int v12; 
  __int64 v13; 
  v5 = 0;
  v6 = *(_DWORD *)(a1 + 4) - 1;
  v8 = a3;
  v11 = 0;
  v12 = -1073741198;
  if( v6 >= 0 )
  {
    while( 1 )
    {
      v11 = (v6 + v5) / 2;
      v13 = (*(__int64(__fastcall **)(_QWORD, INT64, _QWORD))(a1 + 32))(
              *(_QWORD *)((unsigned int)(v11 * *(_DWORD *)a1) + *(_QWORD *)(a1 + 16)),
              a2,
              v8);
      if( !v13 )
        break;
      if( v13 < 0 )
        v6 = v11 - 1;
      else
        v5 = ++v11;
      if( v5 > v6 )
        goto LABEL_8;
    }
    v12 = 0;
  }
LABEL_8:
  if( a5 )
    *(_DWORD *)a5 = v11;
  if( a4 && v12 >= 0 )
    *a4 = *(_QWORD *)((unsigned int)(v11 * *(_DWORD *)a1) + *(_QWORD *)(a1 + 16));
  return(unsigned int)v12;
}

Referenced by:

WbGetWarbirdThread
sub_1405D21B8
sub_14065D374
sub_14065DA88
sub_14065E484
sub_14065EAF4
sub_14065FDF0