RtlCalculateUnwindInfoSizeForRetpoline

INT64 __fastcall RtlCalculateUnwindInfoSizeForRetpoline(INT64 a1, INT64 a2, _DWORD *a3){
  _BYTE *v3; 
  int v4; 
  unsigned int v5; 
  INT64 result; 
  v3 = (_BYTE *)(a1 + *(unsigned int *)(a2 + 8));
  v4 = (unsigned __int8)v3[2];
  v5 = 2 * v4 + 6;
  if( (v4 & 1) == 0 )
    v5 = 2 * v4 + 4;
  result = v5 + 8;
  if( (*v3 & 0x18) == 0 )
    result = v5;
  if( a3 )
    *a3 = (*v3 & 0x18) != 0 ? v5 : 0;
  return result;
}

Referenced by:

RtlCopyRetpolineStubsUnwindInfo
RtlCreateRetpolineStubsFunctionTable