void __thiscall CPlayerTags::DrawHealthBar(
        CPlayerTags *this,
        struct sampapi::CVector *pPosition,
        float fHealth,
        float fArmour,
        float fDistanceToCamera)
{
  float x; // ecx
  float y; // edx
  IDirect3DDevice9 *m_pDevice; // eax
  signed int v9; // [esp+60h] [ebp-74h]
  float v10; // [esp+64h] [ebp-70h] BYREF
  float v11; // [esp+68h] [ebp-6Ch]
  float v12; // [esp+6Ch] [ebp-68h]
  int v13[2]; // [esp+70h] [ebp-64h] BYREF
  float z; // [esp+78h] [ebp-5Ch]
  D3DVIEWPORT9 v15; // [esp+7Ch] [ebp-58h] BYREF
  int v16[16]; // [esp+94h] [ebp-40h] BYREF

  x = pPosition->x;
  y = pPosition->y;
  z = pPosition->z;
  m_pDevice = this->m_pDevice;
  *(float *)&v13[1] = y;
  *(float *)v13 = x;
  z = fDistanceToCamera * 0.047499999 + z + 0.2;
  m_pDevice->lpVtbl->GetViewport(m_pDevice, &v15);
  memset(&v16[11], 0, 16);
  memset(&v16[6], 0, 16);
  memset(&v16[1], 0, 16);
  v16[15] = 1065353216;
  v16[10] = 1065353216;
  v16[5] = 1065353216;
  v16[0] = 1065353216;
  ((void (__stdcall *)(float *, int *, D3DVIEWPORT9 *, float *, void *, int *))loc_100B4536)(
    &v10,
    v13,
    &v15,
    &flt_1012C980,
    &unk_1012C940,
    v16);
  if ( v12 <= 1.0 && fHealth >= 0.0 )
  {
    v10 = (float)(int)sub_100B5CE4(v10);
    v9 = sub_100B5CE4(v11);
    dword_100F0544 = -4644312;
    dword_100F0530 = -4644312;
    v11 = (float)v9;
    dword_100F051C = -4644312;
    dword_100F0508 = -4644312;
    dword_100F04F4 = -11859180;
    dword_100F04E0 = -11859180;
    flt_100F0458 = v10 - 20.0;
    dword_100F04CC = -11859180;
    dword_100F04B8 = -11859180;
    flt_100F045C = v11 + 18.0;
    flt_100F046C = flt_100F0458;
    flt_100F0470 = v11 + 24.0;
    flt_100F0480 = v10 + 21.0;
    flt_100F0484 = flt_100F0470;
    flt_100F0494 = flt_100F0480;
    flt_100F0498 = flt_100F045C;
    flt_100F04F8 = v10 - 19.0;
    flt_100F04A8 = flt_100F04F8;
    flt_100F04FC = v11 + 19.0;
    dword_100F04AC = LODWORD(flt_100F04FC);
    flt_100F050C = flt_100F04F8;
    flt_100F04BC = flt_100F04F8;
    flt_100F0510 = v11 + 23.0;
    dword_100F04C0 = LODWORD(flt_100F0510);
    flt_100F04D0 = v10 + 19.0;
    flt_100F0524 = flt_100F0510;
    dword_100F04D4 = LODWORD(flt_100F0510);
    flt_100F04E4 = flt_100F04D0;
    flt_100F0538 = flt_100F04FC;
    dword_100F04E8 = LODWORD(flt_100F04FC);
    if ( fHealth > 100.0 )
      fHealth = 100.0;
    flt_100F0520 = fHealth * 0.38461539 - 19.0 + v10;
    flt_100F0534 = flt_100F0520;
    if ( fArmour > 0.0 )
    {
      flt_100F045C = flt_100F045C + 8.0;
      *(float *)&dword_100F04AC = flt_100F04FC + 8.0;
      flt_100F04FC = flt_100F04FC + 8.0;
      flt_100F0470 = flt_100F0470 + 8.0;
      *(float *)&dword_100F04C0 = flt_100F0510 + 8.0;
      flt_100F0510 = flt_100F0510 + 8.0;
      flt_100F0484 = flt_100F0484 + 8.0;
      *(float *)&dword_100F04D4 = flt_100F0524 + 8.0;
      flt_100F0524 = flt_100F0524 + 8.0;
      flt_100F0498 = flt_100F0498 + 8.0;
      *(float *)&dword_100F04E8 = flt_100F0538 + 8.0;
      flt_100F0538 = flt_100F0538 + 8.0;
    }
    this->m_pDevice->lpVtbl->SetFVF(this->m_pDevice, 68);
    this->m_pDevice->lpVtbl->DrawPrimitiveUP(this->m_pDevice, D3DPT_TRIANGLEFAN, 2, &flt_100F0458, 20);
    this->m_pDevice->lpVtbl->DrawPrimitiveUP(this->m_pDevice, D3DPT_TRIANGLEFAN, 2, &flt_100F04A8, 20);
    this->m_pDevice->lpVtbl->DrawPrimitiveUP(this->m_pDevice, D3DPT_TRIANGLEFAN, 2, &flt_100F04F8, 20);
    if ( fArmour > 0.0 )
    {
      dword_100F0544 = -3618616;
      dword_100F0530 = -3618616;
      dword_100F051C = -3618616;
      flt_100F045C = flt_100F045C - 8.0;
      dword_100F0508 = -3618616;
      dword_100F04F4 = -14145496;
      dword_100F04E0 = -14145496;
      dword_100F04CC = -14145496;
      *(float *)&dword_100F04AC = *(float *)&dword_100F04AC - 8.0;
      dword_100F04B8 = -14145496;
      flt_100F04FC = flt_100F04FC - 8.0;
      flt_100F0470 = flt_100F0470 - 8.0;
      *(float *)&dword_100F04C0 = *(float *)&dword_100F04C0 - 8.0;
      flt_100F0510 = flt_100F0510 - 8.0;
      flt_100F0484 = flt_100F0484 - 8.0;
      *(float *)&dword_100F04D4 = *(float *)&dword_100F04D4 - 8.0;
      flt_100F0524 = flt_100F0524 - 8.0;
      flt_100F0498 = flt_100F0498 - 8.0;
      *(float *)&dword_100F04E8 = *(float *)&dword_100F04E8 - 8.0;
      flt_100F0538 = flt_100F0538 - 8.0;
      if ( fArmour > 100.0 )
        fArmour = 100.0;
      flt_100F0520 = fArmour * 0.38461539 - 19.0 + v10;
      flt_100F0534 = flt_100F0520;
      this->m_pDevice->lpVtbl->SetFVF(this->m_pDevice, 68);
      this->m_pDevice->lpVtbl->DrawPrimitiveUP(this->m_pDevice, D3DPT_TRIANGLEFAN, 2, &flt_100F0458, 20);
      this->m_pDevice->lpVtbl->DrawPrimitiveUP(this->m_pDevice, D3DPT_TRIANGLEFAN, 2, &flt_100F04A8, 20);
      this->m_pDevice->lpVtbl->DrawPrimitiveUP(this->m_pDevice, D3DPT_TRIANGLEFAN, 2, &flt_100F04F8, 20);
    }
  }
}

перепиши в луа псевдокод без потери логики и функционала. можешь использовать ффи, желательно использовать более понятные имена переменным