переведи функцию на c++
void __fastcall CCoronas::RegisterCorona(
        u_native ID,
        CEntity *pAttachedToEntity,
        UInt8 R,
        UInt8 G,
        UInt8 B,
        unsigned int Intensity,
        const CVector *Coors,
        float Size,
        float Range,
        RwTexture_0 *pCoronaTex,
        UInt8 FlareType,
        UInt8 ReflType,
        UInt8 LOSCheck,
        UInt8 UsesTrails,
        float fNormalAngle,
        int bNeonFade,
        float ArgPullTowardsCam,
        bool bFullBrightAtStart,
        float FadeSpeed,
        bool bOnlyFromBelow,
        bool bWhiteCore)
{
  CMatrix *m_pMat; // r1
  float32x2_t v26; // d16
  float z; // s0
  CSimpleTransform *p_tx; // r2
  float32x2_t v29; // d16
  unsigned __int64 v30; // d1
  float v31; // s2
  unsigned int v32; // r1
  float v33; // s0
  unsigned __int16 v34; // lr
  bool v35; // r6
  u_native *p_Identifier; // r11
  int v37; // r2
  int v38; // r3
  u_native *v39; // r3
  int v40; // r2
  int v41; // r6
  char v42; // r11
  CRegisteredCorona *v43; // r2
  char v44; // r0
  CRegisteredCorona *v45; // r2
  __int64 v46; // d16
  char v47; // r1
  _BYTE *v48; // r2
  char v49; // t1
  char v50; // r0
  CRegisteredCorona *v51; // r1
  char v52; // [sp+4h] [bp-3Ch]
  CVector v53; // [sp+8h] [bp-38h] BYREF

  if ( pAttachedToEntity )
  {
    m_pMat = pAttachedToEntity->m_pMat;
    if ( !m_pMat )
    {
      CPlaceable::AllocateMatrix(pAttachedToEntity);
      CSimpleTransform::UpdateMatrix(&pAttachedToEntity->m_transform, pAttachedToEntity->m_pMat);
      m_pMat = pAttachedToEntity->m_pMat;
    }
    operator*(&v53, m_pMat, Coors);
    v26.n64_u64[0] = *&v53.x;
    z = v53.z;
  }
  else
  {
    v26.n64_u64[0] = *&Coors->x;
    z = Coors->z;
  }
  p_tx = &TheCamera.m_pMat->tx;
  if ( !TheCamera.m_pMat )
    p_tx = &TheCamera.m_transform;
  v29.n64_u64[0] = vsub_f32(*&p_tx->m_translate.x, v26).n64_u64[0];
  v30 = vmul_f32(v29, v29).n64_u64[0];
  v31 = *&v30 + *(&v30 + 1);
  if ( v31 <= (Range * Range) )
  {
    v32 = Intensity;
    if ( bNeonFade == 1 )
    {
      v33 = sqrtf(v31 + ((p_tx->m_translate.z - z) * (p_tx->m_translate.z - z)));
      if ( v33 < 35.0 )
        return;
      if ( v33 < 50.0 )
        v32 = (((v33 + -35.0) / 15.0) * Intensity);
    }
    v34 = 0;
    v35 = bOnlyFromBelow;
    p_Identifier = &CCoronas::aCoronas[0].Identifier;
    v37 = 0;
    do
    {
      if ( *p_Identifier == ID )
      {
        v38 = v37;
        goto LABEL_24;
      }
      ++v34;
      p_Identifier += 0xF;
      ++v37;
      v38 = v34;
    }
    while ( v34 < 0x40u );
    if ( v34 == 0x40 )
    {
      if ( !v32 )
        return;
      v34 = 0;
      v39 = &CCoronas::aCoronas[0].Identifier;
      v40 = 0;
      do
      {
        if ( !*v39 )
        {
          v41 = v40;
          goto LABEL_27;
        }
        ++v34;
        v39 += 0xF;
        ++v40;
        v41 = v34;
      }
      while ( v34 < 0x40u );
      if ( v34 == 0x40 )
        return;
LABEL_27:
      v42 = bNeonFade;
      v43 = &CCoronas::aCoronas[v41];
      v52 = *(v43 + 0x36);
      v44 = *(v43 + 0x34);
      v43->FadedIntensity = -bFullBrightAtStart;
      v43->JustCreated = 1;
      v43->Identifier = ID;
      *(v43 + 0x34) = v44 | 2;
      v35 = bOnlyFromBelow;
      *(v43 + 0x36) = v52 & 0xFB;
      ++CCoronas::NumCoronas;
      goto LABEL_28;
    }
LABEL_24:
    v42 = bNeonFade;
    if ( !((CCoronas::aCoronas[v38].FadedIntensity | v32) << 0x18) )
    {
      CCoronas::aCoronas[v38].Identifier = 0;
      --CCoronas::NumCoronas;
      return;
    }
LABEL_28:
    v45 = &CCoronas::aCoronas[v34];
    v45->Green = G;
    v45->Red = R;
    v45->Blue = B;
    v45->Intensity = v32;
    v46 = *&Coors->x;
    v47 = *(v45 + 0x34);
    v45->Coordinates.z = Coors->z;
    v45->RegisteredThisFrame = 1;
    v45->Size = Size;
    v45->NormalAngle = fNormalAngle;
    v45->Range = Range;
    v45->pTex = pCoronaTex;
    v45->FlareType = FlareType;
    v45->ReflectionType = ReflType;
    *&v45->Coordinates.x = v46;
    *(v45 + 0x34) = v47 & 0xFE | LOSCheck & 1;
    v49 = *(v45 + 0x36);
    v48 = v45 + 0x36;
    *(v48 + 0xFFFFFFEA) = ArgPullTowardsCam;
    *(v48 + 0xFFFFFFF2) = FadeSpeed;
    v50 = v49 & 0xF4 | v42 | (8 * bWhiteCore) | (2 * v35);
    *v48 = v50;
    if ( pAttachedToEntity )
    {
      *v48 = v50 | 0x10;
      v51 = &CCoronas::aCoronas[v34];
      v51->pEntityAttachedTo = pAttachedToEntity;
      CEntity::RegisterReference(pAttachedToEntity, &v51->pEntityAttachedTo);
    }
    else
    {
      *v48 = v50 & 0xEF;
      CCoronas::aCoronas[v34].pEntityAttachedTo = 0;
    }
  }
}